Dependency range evaluator

See exactly which versions your semver range allows

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.

  • No registry lookup
  • Prerelease toggle
  • Version matrix

Use it before dependency policy review

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.

Range workbench

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.

Clean

Shows the common npm default: allow compatible 1.x releases from 1.2.3, but stop before 2.0.0.

Range input

Evaluation result

Normalized range>=1.2.3 <2.0.0-0
Matches3/6
Min version1.2.3
Duration2 ms
Min satisfying
1.2.3
Max satisfying
1.9.9

Comparator sets

>=1.2.3 <2.0.0-0

Version matrix

1.2.21.2.2 NO MATCH
1.2.31.2.3 MATCH
1.3.01.3.0 MATCH
1.9.91.9.9 MATCH
2.0.0-beta.12.0.0-beta.1 NO MATCH
2.0.02.0.0 NO MATCH

Copyable semver snippet

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 });

Range review notes

Caret and tilde are policy choices

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.

0.x is intentionally narrow

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 matching is explicit

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.