</>CodexBash
All articles
Programming

Semantic versioning

How semantic versioning works and why it matters: MAJOR.MINOR.PATCH and what counts as a breaking change, pre-release and build metadata, the special meaning of 0.x versions, version ranges in npm, Maven and Python, lock files, deprecation policies, automating versions with Conventional Commits, and versioning APIs and applications.

CodexBash, , 5 min read

When a library you depend on releases a new version, you need to know one thing: will upgrading break my code? Semantic versioning (SemVer) answers that question with the version number itself. 2.4.1 to 2.4.2 should be a safe bug fix; 2.4.1 to 3.0.0 warns of breaking changes. Package managers rely on this convention to choose which updates to install automatically, so understanding it matters both when you consume libraries and when you publish them. This article explains the rules, the corner cases and the tooling around them.

Sign in to read the rest

The whole 5 minute article is free with an account, along with every problem, lesson and tutorial. No card.