The encyclopedia · Engineering & Operations · Technical decision · 2011-2013
Semantic Versioning encoded compatibility into MAJOR.MINOR.PATCH
SemVer made version numbers state whether a change breaks, so dependency managers can resolve automatically.
GitHub
the move
Software depends on other software, and when a library releases a new version, no third party knows whether the change broke anything. The naive contract is to always take the latest, which produces dependency hell: a new release compiles, then an app breaks with no obvious cause.
Semantic Versioning fixes this by making the version number itself a contract. The three positions MAJOR.MINOR.PATCH each carry meaning: bump the major position for incompatible changes, the minor position for backward-compatible additions, and the patch position for fixes.
Once the number encodes compatibility, a resolver can decide automatically. The human judgement that used to be sprayed across every integration is now bundled into a single three-part number that tools can read.
why it works
- The MAJOR bump as a hard breaking-change signal lets a resolver refuse incompatible updates without talking to a human.
- Because MINOR and PATCH guarantees are backward-compatible, they give a dependency a safe range to fall within.
- Restricting the three positions removes the arbitrary version inflation that used to make latest meaningless.
- Tools like npm, Cargo and Composer built their entire resolution rules around this one convention.
what transfers
A small enforceable convention can remove an entire class of manual judgment if it encodes the thing people were guessing at.
what came after
Tom Preston-Werner published the spec in 2011 and formalized it as 2.0.0 in 2013. It became the de facto versioning standard for the open-source package ecosystems. It does not catch semantic mistakes in the bump, and pre-release and build metadata rules add complexity, but the core contract made automated dependency resolution possible.
references
spotted an error? The archive wants to know.