Cómo usar: Semantic Version Calculator
- Compare: enter two versions to see which is newer and why (prerelease and build metadata included).
- Bump: enter the current version and click the change type to get the next version — copied automatically.
- Range check: enter an npm range like
^1.2.0,~1.2,1.xor>=1.2 <2and a list of versions. - Read the plain-English explanation and see which versions satisfy the range.
Semantic versioning: MAJOR.MINOR.PATCH
| Part | Increase when… | Example |
|---|---|---|
| MAJOR | you make breaking changes | 1.4.2 → 2.0.0 |
| MINOR | you add features, backwards-compatible | 1.4.2 → 1.5.0 |
| PATCH | you fix bugs, backwards-compatible | 1.4.2 → 1.4.3 |
| Prerelease | you publish a test version | 2.0.0-beta.1 |
| Build metadata | you tag a build (ignored for precedence) | 1.4.2+sha.5114f85 |
npm range cheat sheet
| Range | Means | Allows |
|---|---|---|
^1.2.3 | Compatible with 1.2.3 | >=1.2.3 <2.0.0 |
^0.2.3 | For 0.x, minor is “major” | >=0.2.3 <0.3.0 |
~1.2.3 | Patch updates only | >=1.2.3 <1.3.0 |
1.x / 1 | Any 1.y.z | >=1.0.0 <2.0.0 |
1.2.3 - 2.3 | Hyphen range | >=1.2.3 <2.4.0 |
>=1.2 <1.5 || 2.x | Either set | 1.2.0–1.4.x or 2.x |
Prereleases only match a range if a comparator in the same set has a prerelease on the same major.minor.patch — so ^1.2.0 does not match 1.3.0-beta.1, but ^1.3.0-beta.0 does. This avoids installing unstable versions by accident.
Ranges live in your package.json. To decide the next version from your commits, use the Changelog Generator; to tag the release, the Git Command Generator.
También se busca como: semver calculator, semver range checker, npm version range, caret vs tilde, semantic versioning, version bump, compare versions, semver prerelease.
Herramientas que combinan con: Semantic Version Calculator
- Generador de flujos de trabajo de GitHub Actions — Elige tu pila, tus desencadenantes y tus pasos, y obtén un .github/workflows/ci.yml — instalación, caché, lint, pruebas, compilación, una matriz de versiones y, si quieres, una implementación en GitHub Pages, Vercel o un registro de contenedores.
- Number Base Converter — Type a number in any base and see it in all the others instantly.
- Comprobador de diferencias — Pega la versión original y la modificada para ver, una al lado de la otra, las líneas añadidas, eliminadas y modificadas, con las palabras exactas que han cambiado resaltadas dentro de cada línea.
- YAML Validator — Paste a Docker Compose file, Kubernetes manifest, GitHub Actions workflow or any YAML to pinpoint errors, catch common pitfalls and get a cleanly formatted version.
Preguntas frecuentes
Can I use this as a semver tester?
What is the difference between ^ and ~ in package.json?
^1.2.3 allows minor and patch updates (up to, but not including, 2.0.0). ~1.2.3 allows only patch updates (up to 1.3.0). For 0.x versions, ^ is stricter: ^0.2.3 only allows 0.2.x.