Semver calculator
Work out the next semantic version from Conventional Commits or by bump type, including pre-releases, and test whether a version satisfies an npm-style range. Runs in your browser.
Free · Runs in your browserNext version
| major | Breaking change | 2.0.0 | |
| minor | New feature | 1.5.0 | |
| patch | Bug fix | 1.4.3 | |
| premajor | Pre-release of the next major | 2.0.0-beta.0 | |
| preminor | Pre-release of the next minor | 1.5.0-beta.0 | |
| prepatch | Pre-release of the next patch | 1.4.3-beta.0 | |
| prerelease | Next pre-release | 1.4.3-beta.0 |
Does a version match a range?
How to use it
Enter your version
The current release, like 1.4.2 or 2.0.0-rc.1.
See every next version
Major, minor, patch and pre-releases, with the same rules as npm's semver package.
Test a range
Check whether a version satisfies ^, ~, x-ranges, hyphen ranges or || combinations.
Semantic versioning in one paragraph
A version is MAJOR.MINOR.PATCH. Increase MAJOR for incompatible API changes, MINOR for backwards-compatible features, and PATCH for backwards-compatible fixes. A pre-release like 2.0.0-rc.1 sorts before 2.0.0. Versions below 1.0.0 are for initial development, when anything may change.
Reading npm ranges
^1.2.3allows changes that don't modify the left-most non-zero number:>=1.2.3 <2.0.0. But^0.2.3means>=0.2.3 <0.3.0.~1.2.3allows patch changes:>=1.2.3 <1.3.0.1.x,1.2 - 2.3and^1 || ^2work too.- Pre-releases only match ranges that mention a pre-release of the same version, so a new beta doesn't slip into ^1.2.0.
Let commits pick the number
With Conventional Commits, the next version follows from the commits: any breaking change is major, any feat is minor, otherwise a fix is a patch. Paste your commits above and the calculator highlights the right bump. Then write the entry with the Keep a Changelog generator.
Questions about this tool.
01What's the next version after 1.0.0-rc.1 for a major bump?
1.0.0. Bumping a pre-release to the release it was leading up to drops the pre-release label, as npm version does.
02Should breaking changes bump the major in 0.x?
The spec says anything may change in 0.x. Many projects bump the minor for breaking changes before 1.0; the calculator lets you choose.
03Does build metadata (+build.5) affect order?
No. Build metadata is ignored when comparing versions.
04Is my input sent anywhere?
No. Everything runs in your browser.
More free tools
All toolsOr let every release announce itself.
When a release ships, DevRelay drafts the changelog, posts and docs updates for it, grounded in the actual diff, ready for your approval.
No credit card · Nothing posts without your approval