Inside the bounds, still skipped
^1.2.0 becomes >=1.2.0 <2.0.0-0. 1.9.0-rc.1 sorts between those bounds, yet:
1.9.0-rc.1 is inside the bounds, but it is a prerelease and no comparator in this branch names a prerelease of 1.9.0, so npm skips it.
The rule exists so that a range written for stable releases never pulls in a release candidate someone published by accident. It is why npm install keeps picking 1.8.3 even though 1.9.0-rc.1 is newer.
Opting in to one version's prereleases
Name a prerelease and that version's prereleases open, and only that version's. With >=2.0.0-beta.1 <2.0.0, 2.0.0-beta.4:
matches; it is a prerelease, allowed because >=2.0.0-beta.1 names a prerelease of 2.0.0.
But with >=2.0.0-beta.1 and no upper bound, 2.1.0-beta.0 is above the floor and still out:
2.1.0-beta.0 is inside the bounds, but it is a prerelease and no comparator in this branch names a prerelease of 2.1.0, so npm skips it.
To accept prereleases of every version, npm needs --include-prerelease (node-semver's includePrerelease option). The explainer has a switch for it.
The || * trap
node-semver applies one more rule when a range has several branches: if any branch is a bare *, the whole range becomes *. ^1.2.3-rc.1 matches 1.2.3-rc.1, but ^1.2.3-rc.1 || * does not:
1.2.3-rc.1 is inside the bounds, but it is a prerelease and no comparator in this branch names a prerelease of 1.2.3, so npm skips it.
The explainer flags this as a high-severity finding whenever the swallowed branches had opened a prerelease.
The -0 on upper bounds
npm writes ^1.2.0 as <2.0.0-0, not <2.0.0. 0 is the lowest possible prerelease, so <2.0.0-0 also shuts out 2.0.0-alpha, 2.0.0-beta and every other 2.0.0 prerelease, even with --include-prerelease on. A plain <2.0.0 would let them through in that mode.
Questions
Why does ^1.2.0 not match 1.9.0-rc.1?
Because 1.9.0-rc.1 is a prerelease and no comparator in ^1.2.0 names a prerelease of 1.9.0. npm only lets a prerelease through when the same || branch has a comparator with a prerelease on the same major.minor.patch.
How do I make a range accept prereleases?
Name one: >=2.0.0-beta.1 <2.0.0 accepts every later 2.0.0 prerelease and nothing else. To accept prereleases of every version, run npm with --include-prerelease, which most installs do not.
Why does adding || * break my prerelease range?
Because npm treats a range in which one || branch is a bare * as just *, and * accepts no prereleases. ^1.2.3-rc.1 matches 1.2.3-rc.1, but ^1.2.3-rc.1 || * does not.