Semantic versioning
A rule for version numbers like 2.4.1, so each part tells you how risky an update is.
Semantic versioning, or SemVer, is a convention for numbering software releases as three numbers: MAJOR.MINOR.PATCH, for example 2.4.1. Each number has a precise meaning, so anyone using the software can tell what kind of change a new version brings just by looking at which number went up. The rules are written at semver.org, first published by Tom Preston-Werner, one of GitHub's founders.
A patch bump, 2.4.1 to 2.4.2, means bug fixes only: nothing new, nothing removed. A minor bump, to 2.5.0, adds new features but keeps everything that worked before working the same way. A major bump, to 3.0.0, means there are breaking changes: something was removed or behaves differently, and code that used the old version may need adjusting. Versions starting with 0., like 0.7.3, signal early development, where anything may change.
This matters because modern software is built from hundreds of libraries, and keeping them updated by hand would be impossible. Package managers like npm or pip read these numbers to update safely: a rule like ^2.4.1 means "accept any 2.x version from 2.4.1 up, but not 3.0". It only works if authors follow the rules honestly, and in practice a minor update occasionally breaks something anyway, which is why projects also lock exact versions and run their tests after updating.
Keep in mind
- Three numbers: MAJOR.MINOR.PATCH.
- Patch fixes bugs, minor adds compatible features, major can break things.
- Versions below 1.0.0 promise no stability.
- Package managers rely on it to update dependencies automatically.