Semver Range Lab
This browser-local lab intersects each package's written ranges against only the version candidates you provide, then lists independent package combinations. It uses pinned node-semver 6.3.1 for caret, tilde, comparator, OR and prerelease matching. A green candidate satisfies every range for its package. A zero result means no listed version matches, not that no possible future or unlisted version exists. It does not query npm, resolve peer dependencies or prove an installation will succeed.
Key features
- Check caret, tilde, comparator AND and OR ranges using node-semver rules
- Show every supplied candidate in a per-constraint pass/fail matrix
- Explain default prerelease tuple opt-in and an explicit include-prerelease mode
- Identify a smallest subset of constraints with no shared listed candidate
- Count independent cross-package choices exactly and display the first 100
- Export input and bounded results as a local JSON file
How to use
- Load the safe example or add up to six named packages.
- Enter strict X.Y.Z candidate versions, one per line or comma-separated, and one range per line. Separate alternatives within a range with ||.
- Choose whether to include otherwise-excluded prereleases and analyze.
- Review each package's candidate matrix and the smallest conflicting rule group if nothing matches.
- Inspect compatible package combinations and download the JSON report if useful.
Use cases
- Check whether two dependency declarations have a common listed release
- See why ^0.2.3 excludes 0.3.0 while ~1.2.3 excludes 1.3.0
- Find an excluded prerelease and explicitly compare policy modes
- Enumerate a small finite set of upgrade choices across independent packages
Frequently asked questions
Does zero combinations prove the ranges themselves are impossible?
No. It proves no combination among the candidate versions entered here. A compatible version could be missing from the list or released later. The highlighted conflict subset is also defined only over supplied candidates.
How are OR and multiple lines combined?
A single line follows node-semver grammar: whitespace joins comparators with AND and || joins alternatives with OR. Different lines for the same package must all pass, so they form an intersection.
Why is a prerelease rejected even though it compares inside the range?
By default, node-semver only accepts a prerelease when a comparator in that same OR clause opts into the same major.minor.patch tuple. The checkbox applies includePrerelease to every range test and may admit other prereleases.
Is this a dependency solver for npm install?
No. Packages here are independent selection dimensions. It does not read a registry, recursively resolve dependencies, account for peer/optional/platform/workspace rules or run npm. Verify a real installation with its package manager.
Why are only 100 combinations shown?
The exact finite product count is computed from accepted candidates. At most the first 100 combinations are displayed and exported so a large Cartesian product cannot freeze the page.
Are versions or package details uploaded?
No. Parsing, filtering and JSON creation happen in this browser tab. No registry request, automatic save or app API submission is used.
Privacy
Package names, version lists and ranges stay in browser memory. Analysis and optional JSON download are local; nothing is sent to a registry or application API.
Comments & questions