Skip to main content
Ganesh Joshi
Back to Cheatsheets

Semantic versioning (semver)

Updated 2026-02-15

Major.Minor.Patch and version ranges. npm caret, tilde, and exact. When to bump what.

Version and ranges (npm)

Major.Minor.Patch. ^1.2.3 = >=1.2.3 <2.0.0 (same major). ~1.2.3 = >=1.2.3 <1.3.0 (same minor). No prefix = exact. 1.x = 1.0.0 to <2.0.0.

When to bump

Major: breaking changes. Minor: new backward-compatible feature. Patch: backward-compatible bug fix. npm version major|minor|patch.

Semantic versioning (semver) | Cheatsheet | Ganesh Joshi