Paste a range, compare package versions and review the normalized comparator set before changing package.json. The worker runs locally, never fetches npm metadata and keeps prerelease behavior explicit.
Semver ranges look compact, but they control upgrade windows, prerelease exposure and 0.x safety. This playground turns ranges into normalized comparators, min/max satisfying versions and a row-by-row matrix that makes the decision visible.
Interactive browser runs evaluate ranges with the npm semver package in a worker. The page does not fetch package metadata, does not query registry.npmjs.org and does not store pasted version lists.
Start from a preset or paste a range and candidate versions. Toggle loose parsing or prerelease inclusion to mirror the policy you want to review.
Shows the common npm default: allow compatible 1.x releases from 1.2.3, but stop before 2.0.0.
>=1.2.3 <2.0.0-01.2.2 NO MATCH 1.2.3 MATCH 1.3.0 MATCH 1.9.9 MATCH 2.0.0-beta.1 NO MATCH 2.0.0 NO MATCH import { maxSatisfying, satisfies, validRange } from 'semver';
const range = "^1.2.3";
const versions = [
"1.2.2",
"1.2.3",
"1.3.0",
"1.9.9",
"2.0.0",
"2.0.0-beta.1"
];
const options = {};
const normalizedRange = validRange(range, options);
const matching = versions.filter((version) => satisfies(version, range, options));
const latestAllowed = maxSatisfying(versions, range, options);
console.log({ normalizedRange, matching, latestAllowed });Caret usually opens a wider compatible lane than tilde. For libraries with strong compatibility, that can be useful. For fragile integrations, a narrower tilde lane may be easier to review.
A caret range under 1.0.0 does not behave like a stable major range. ^0.2.3 stops before 0.3.0, and ^0.0.3 only accepts patch-compatible releases.
Prerelease versions are excluded unless the tuple participates in the range or includePrerelease is enabled. That prevents accidental beta adoption during normal package upgrades.
Use these when dependency policy connects to date formatting, TypeScript compiler options or schema contract review.