Helm

Semantic Version Comparator

Compare two versions, classify the bump, and check a version against a caret or tilde constraint.

Compare two versions
majorMajor bump: 1.2.3 → 2.0.0. Expect breaking changes.
From
major 1 · minor 2 · patch 3
To
major 2 · minor 0 · patch 0

A prerelease sorts before its release, so 1.0.0-rc.1 is older than 1.0.0. Build metadata after + is ignored entirely when comparing.

Check a constraint

1.5.0 satisfies ^1.2.0

^1.2.0
≥ 1.2.0 and < 2.0.0 — no change to the left-most non-zero digit.
^0.2.0
≥ 0.2.0 and < 0.3.0 — for 0.x, the minor is the breaking digit.
~1.2.0
≥ 1.2.0 and < 1.3.0 — patch-level changes only.
>=1.0.0
Any version at or above 1.0.0.
Sort a list
Oldest first
  1. 11.0.0-rc.1
  2. 21.0.0
  3. 31.2.0
  4. 41.10.0
  5. 52.0.0-alpha
  6. 62.0.0

Note that 1.10.0 sorts above 1.2.0 — semver compares each part numerically, not as text.