practice

Semantic Versioning

also called SemVer

A version scheme where the number itself states the compatibility promise — major for breaking, minor for additive, patch for fixes.

versioningcompatibilitycontracts

The value is that a consumer can decide whether to upgrade without reading a changelog. 2.3.1 to 2.4.0 is safe by contract; 2.4.0 to 3.0.0 requires work.

Where it applies well: libraries, SDKs, and any artefact a consumer explicitly pins. Where it fits awkwardly: HTTP APIs, because a consumer of a hosted API does not choose when to upgrade — the provider deploys and everyone gets it. That mismatch is why API versioning schemes tend to diverge from SemVer towards date-based versions, account pinning, or "we never break anything".

The discipline that makes it real, and the reason it often fails: something must enforce it. A major version bump that happens because a breaking change was noticed in review is a version bump that will be missed. Schema diffing in CI — comparing the published contract between builds and failing the build on a breaking change — is what turns the promise into a guarantee.