Check an AI version range on versions you already listed
On npm semver 7.8.6, list five versions for ^0.2.3 first. Keep the chat’s range only when the command prints 0.2.3 and 0.2.9.
In short
- Name the tool: this guide uses the
semverCLI from package 7.8.6 and its README caret rules. - List five expected results before you read the reply. For
^0.2.3: 0.2.2 out, 0.2.3 in, 0.2.9 in, 0.3.0 out, 1.0.0 out. - Keep the chat’s range only when
semver -rprints0.2.3and0.2.9(and the other three are absent).
Example (made up): a shop wants "shop-receipt": "^0.2.3" for a 0.2.x helper. A chat may say “use a caret for compatible releases.” On 24 November 2026, npm view shop-receipt returned 404 — the name is a label only.
Same habit as testing a regex on rows you already classified.

1.0.0 is on the list because chats often treat it as the ceiling. 0.3.0 is the version that sentence usually gets wrong. Both should stay out for ^0.2.3.
What ^ means on this tool
From the semver 7.8.6 README caret section (npm view semver version → 7.8.6):
A caret allows changes that do not change the left-most non-zero number:
^1.2.3→>=1.2.3 <2.0.0-0^0.2.3→>=0.2.3 <0.3.0-0^0.0.3→>=0.0.3 <0.0.4-0
semver.org defines X.Y.Z but not ^. On 0.x, anything may change (spec item 4). The README still expands ^0.2.3 to stop before 0.3.0.

satisfies('0.2.10', '^0.2.3') was also true — 10 > 9 as numbers, still under 0.3.0.
What the command printed
Node v22.23.4 + bin/semver.js from that tarball. Useful validRange results:
| Range | validRange |
|---|---|
^0.2.3 |
>=0.2.3 <0.3.0-0 |
^1.2.3 |
>=1.2.3 <2.0.0-0 |
^0.0.3 |
>=0.0.3 <0.0.4-0 |
^0.x |
<1.0.0-0 |
~0.2.3 |
>=0.2.3 <0.3.0-0 |
Shop check:
semver -r '^0.2.3' 0.2.2 0.2.3 0.2.9 0.3.0 1.0.0
Printed 0.2.3, then 0.2.9, exit 0. The other three were absent.
A chat-style ^0.x on the same five versions printed 0.2.2, 0.2.3, 0.2.9, and 0.3.0 — so it fails this checklist even though it stops before 1.0.0.
~0.2.3 matched the same two lines on these five versions; the caret/tilde split shows up on 1.x (e.g. 1.9.0 is in for ^1.2.3, out for ~1.2.3).
Ask the chat, then run the command
npm semver 7.8.6 only. The caret rows in that package's README are the rule.
Range you are checking: ^0.2.3
Expected, written before your answer:
0.2.2 out
0.2.3 in
0.2.9 in
0.3.0 out
1.0.0 out
That README expands ^0.2.3 to >=0.2.3 <0.3.0-0.
Give one package.json line. I will run:
semver -r '<your range>' 0.2.2 0.2.3 0.2.9 0.3.0 1.0.0
Keep the reply only when the print is 0.2.3 then 0.2.9. Exit 0 alone is not enough — it only means some version matched.

A print of only 0.2.3 still fails — 0.2.9 was marked in.
Watch-outs
^0.2lowers the floor to>=0.2.0and pulls in0.2.2.^0.0.xis wider than^0.0.3(allows 0.0.4, 0.0.9).- Prereleases follow the README examples — re-check with the versions you care about; this shop command does not pass
-p. - In-range ≠ compatible. Spec item 4: anything may change in
0.y.z. This run did not install a package. - Other installers (pip, Cargo) need their own docs, then the same habit: list expected versions first, run their checker second.
Related
Share