What this tool does
Four tabs for working with version numbers:
- Range check: type an npm range and a list of versions. Each version is marked as matching or not, with the reason: which comparator it passes or fails, or that a pre-release was left out by npm's pre-release rule. The tool shows what the range really means (
^1.2.3is>=1.2.3 <2.0.0-0) and the highest version in your list that matches, which is whatnpm installwould pick. - Compare two: which of two versions is higher, and which part decides it.
- Sort a list: SemVer order, lowest or highest first, with invalid entries listed and explained.
- Bump: the next version for each of npm's release types (major, minor, patch, premajor, preminor, prepatch, prerelease), with an optional identifier such as
rc.
Everything follows the Semantic Versioning 2.0.0 specification and npm's own range rules (node-semver). The tests check the ordering example from semver.org, about a hundred of node-semver's own include and exclude fixtures, and 20,000 random ranges against node-semver itself (in its default mode).