Semantic Versioning (SemVer) is a convention for version numbers in the form MAJOR.MINOR.PATCH, for example 2.4.1. The numbers tell users what kind of change to expect.
| Number | Increase when | Example |
|---|---|---|
| MAJOR | You make an incompatible API change | 2.4.1 to 3.0.0 |
| MINOR | You add functionality in a backward-compatible way | 2.4.1 to 2.5.0 |
| PATCH | You make backward-compatible bug fixes | 2.4.1 to 2.4.2 |
Details that matter
- When you raise a number, the numbers to its right reset to zero.
- Versions below
1.0.0(0.y.z) are for initial development; anything may change. - A pre-release is marked with a hyphen, such as
1.0.0-rc.1, and sorts before1.0.0. - Build metadata after a plus sign, such as
1.0.0+20260101, is ignored when comparing versions. - Once a version is released, its contents must not change. Publish a new version instead.
Common mistakes
- Shipping a breaking change in a minor release because it feels small.
- Never leaving
0.x, so users cannot tell what is stable. - Treating the public API as unclear. Say what counts as the API.
With agents
Ask the agent to say whether a change is breaking, and check it yourself: removed exports, changed defaults and changed error types count. Put the answer in the pull request.