node-semver
node-semver copied to clipboard
[BUG] X-Range with Prerelease Ignores Prerelease
Is there an existing issue for this?
- [X] I have searched the existing issues
Current Behavior
A range like >=1.x.x-rc
appears to ignore the -rc
and be treated as equal to >=1.x.x
. For example, it does not match the version 1.0.0-rc.1
.
Expected Behavior
Since it isn't clear what prerelease versions >=1.x.x-rc
should match, I think it should be an invalid range. If one really wanted to support it, then it would need to match multiple prerelease ranges (e.g. 1.0.0-rc
, 1.0.5-rc
, 1.5.6-rc
, etc.).
Steps To Reproduce
As I am not a Node developer but rather a maintainer of a semver package for C# that needs to support npm style version ranges, I am using https://semver.npmjs.com/ to test. Simply put the listed versions into it.