Test versions against a semver range and read what the range means, including why the caret behaves differently below 1.0.0 and how pre-releases are excluded.
^1.2.3 — one comparator set
1.2.3 and above, but below 2.0.0
>=1.2.3 <2.0.0A caret does three different things depending on the version it is applied to. ^1.2.3 allows up to but not including 2.0.0; ^0.2.3 only up to 0.3.0, because below 1.0.0 the caret pins the leftmost non-zero component; and ^0.0.3 allows nothing but 0.0.3.
Pre-releases are excluded, which is what the specification says. ^1.0.0 does not match 1.5.0-beta.1 unless the range itself mentions a pre-release for that exact version. This is usually the reason a range appears to be broken.
This tests the versions you type. It does not know which versions a package has actually published, so it cannot tell you what your range would resolve to today — that needs the registry. What it can tell you is exactly what the range admits, which is the part that does not change.
Semver Range Tester runs entirely on your device — nothing is uploaded.
You’re on the Free plan. Compare plans
A range is easier to write than to read, and the caret is the reason. It does three different things depending on the version it is applied to: `^1.2.3` allows anything up to but not including 2.0.0; `^0.2.3` allows only up to 0.3.0, because below 1.0.0 the caret pins the leftmost non-zero component; and `^0.0.3` allows nothing but 0.0.3. One operator, three behaviours, none of them visible in the syntax.
Pre-releases are excluded by default, and that default is the specification's rather than a choice made here. `^1.0.0` does not match `1.5.0-beta.1`, and it does not match `2.0.0-rc.1` either. The exception is narrow: a range mentioning a pre-release for the same major.minor.patch will match other pre-releases of that exact version. This is the behaviour that makes people think their range is broken, so the toggle is here with the explanation beside it.
The range is also shown as plain comparators, which is what it desugars to. Seeing `^1.2.3` written out as `>=1.2.3 <2.0.0` removes the guesswork, and it is the form that makes a union with `||` readable.
No registry is contacted. The versions tested are the ones you type, so this cannot tell you what your range would resolve to today — but what the range admits does not change, and that is the part worth being sure about.
Because a range excludes pre-releases unless it mentions one for the same major.minor.patch. The reasoning is that a pre-release of 1.5.0 is not something you opted into by writing ^1.0.0 — you would have had no way to know 1.5.0 would exist.
Patches only: up to but not including 0.3.0. The caret pins the leftmost non-zero component, and below 1.0.0 that is the minor rather than the major. ^0.0.3 allows nothing but 0.0.3 for the same reason.
None in meaning. `1.2.3 - 2.3.4` is exactly `>=1.2.3 <=2.3.4`; it is sugar. Note that the hyphen range is inclusive at both ends, unlike a caret or tilde, which is the detail that catches people.
It is a union of comparator sets — a version matching any one set matches the range. Everything between the || operators is a set, and within a set the comparators are combined with AND.
No. That depends on what the registry has published. This tells you exactly what the range permits, which is the part that does not change between today and next week.