Chris Collins

Tools · dev

Version ranges and SemVer

Test version ranges in npm, Cargo, Python, and Maven syntax, inspect and bump SemVer versions, sort version lists, and get the next release from Conventional Commits.

Added

How to use it

Range checker — pick the ecosystem, type a range, and list versions to test (one per line). Each version is marked as matching or not, the highest match is highlighted, and the range is shown normalised to plain comparators with an English reading.

npm

^1.2.3 (same major; for 0.x the same minor; for 0.0.x the same patch), ~1.2.3 (same minor), 1.x and *, hyphen ranges 1.2 - 2.3, comparators >=1.2 <2, and || alternatives. Pre-releases only match when a comparator in the same set names a pre-release of the same major.minor.patch — tick Include pre-releases for npm’s includePrerelease. Results agree with node-semver.

Cargo

A bare 1.2.3 means ^1.2.3. Comparators are separated by commas (AND); there is no ||. 0.0 is >=0.0.0, <0.1.0.

Python

PEP 440 specifiers: ~=2.28 (compatible release), ==1.4. and !=1.4., >=, <, ===. Versions are normalised (1.0-ALPHA.1 → 1.0a1) and ordered with dev, pre, post, epoch, and local parts. <2.0 excludes 2.0rc1, >1.7 excludes 1.7.post1, and pre-releases are excluded unless a specifier mentions one or the box is ticked (pip --pre).

Maven

Ranges [1.0,2.0), (,1.0], [1.5], and unions (,1.0],[1.2,). A bare 1.0 is a soft requirement that any version satisfies. Versions compare like Maven’s ComparableVersion: alpha < beta < milestone < rc < snapshot < release < sp, 1.0 = 1.0.0 = 1-ga. Maven has no pre-release exclusion: [1.0,2.0) includes 2.0-alpha-1.

Inspect & bump splits a SemVer version into its parts and lists every next version the way npm version computes it — major, minor, patch, the pre* variants with an optional pre-release id, and release. Give a second version to compare precedence; build metadata (+build.42) never affects ordering.

Sort orders a list by any ecosystem’s rules and lists entries that are not valid.

From commits reads Conventional Commit subjects (feat:, fix:, perf:, type!:) and BREAKING CHANGE: footers, and suggests the next version: breaking → major, feat → minor, fix/perf → patch. Below 1.0.0 everything shifts down one level, as most projects do.

Sharing

Share link copies a URL that opens this tool exactly as you have it. Hand-written links work too: Range checker ?system=npm&range=^1.2.0&versions=…&pre=1, Inspect ?a=1.2.3&b=1.3.0-rc.1&preid=beta, Sort ?list=…&sortSystem=cargo&desc=1, From commits ?current=1.4.2&log=…. For example ?system=npm&range=%5E1.2.0%20%7C%7C%202.0.1&versions=1.2.9%0A1.9.0%0A2.0.3%0A2.1.0.

Runs entirely in your browser; nothing you type leaves this page.