New version
Git tag: v1.2.4
npm range implications
Allows compatible upgrades (default in npm install)
Allows patch-level changes only
No upgrades allowed (most strict)
package.json snippets
What is Semantic Version Calculator?
Semantic versioning (semver) is a versioning scheme where version numbers convey meaning about changes: MAJOR.MINOR.PATCH. A major bump (1.0.0 → 2.0.0) signals breaking changes, a minor bump (1.0.0 → 1.1.0) signals new backwards-compatible features, and a patch bump (1.0.0 → 1.0.1) signals backwards-compatible bug fixes. Pre-release versions (1.0.0-alpha.1) signal unstable builds. This tool calculates bumps and shows npm-compatible version ranges.
How to Use
- Enter your current version (e.g. 1.2.3 or v2.0.0-beta.1).
- Select the bump type: major, minor, patch, or prerelease.
- For prerelease bumps, set the tag label (alpha, beta, rc).
- See the new version and the resulting npm-compatible ranges (^ and ~).
- Copy the version string for use in package.json or Git tags.
Why Use This Tool?
Tips & Best Practices
- Start at 0.1.0 for initial development — version 0.x.y has different stability expectations than 1.x.y
- Breaking change to a 0.x version: bump minor (0.1.0 → 0.2.0), not major
- npm caret (^1.2.3) allows minor+patch bumps. Tilde (~1.2.3) allows only patch bumps.
- Git tag convention: use "v" prefix (v1.2.3) even though the semver spec has no prefix
- Use prereleases for feature flags: 1.3.0-beta.1, 1.3.0-beta.2, ..., 1.3.0
Frequently Asked Questions
What is the difference between ^ and ~ in package.json?
Caret (^) allows updates that do not change the leftmost non-zero digit: ^1.2.3 allows >=1.2.3 <2.0.0. Tilde (~) allows patch-level changes: ~1.2.3 allows >=1.2.3 <1.3.0. For 0.x versions, caret is more restrictive: ^0.2.3 allows only >=0.2.3 <0.3.0. Use ^ for dependencies where you trust the maintainer follows semver; use ~ for stricter control.
When should I use a prerelease version?
Use prereleases (1.3.0-beta.1) when a feature is ready for testing but not for production. The naming convention: alpha (internal testing), beta (external testing), rc (release candidate, feature-complete). npm will not install a prerelease version unless explicitly requested (npm install package@next or @1.3.0-beta.1).
How do I handle breaking changes in a 0.x version?
By semver convention, major version 0 is for initial development where anything may change. Many projects treat minor version bumps (0.1.0 → 0.2.0) as breaking changes during 0.x development. Once you publish 1.0.0, you commit to semver guarantees: no breaking changes without a major bump.