-
Notifications
You must be signed in to change notification settings - Fork 511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] subset() incorrectly returns false for prerelease versions that should be subsets #757
Comments
What if you set |
dang now it works! Thanks for the SUPER fast resposne. |
Actually, I realized it's not what I expect. I see that part about
So essentially it seems like |
To clarify, |
Yes that's exactly my point.
The last 2 examples demonstrates that despite |
Is there an existing issue for this?
Current Behavior
Description
semver.subset(subRange, superRange)
is expected to returntrue
when every version insubRange
is also contained insuperRange
. However, when dealing with prerelease versions,semver.subset()
appears to incorrectly returnfalse
even when the subrange is fully contained in the superrange.Steps to Reproduce
Expected Behavior
Expected Behavior
The first test (semver.subset('^10.2.0-beta.2', '^10.2.0-beta.1')) should return true because:
• ^10.2.0-beta.2 includes 10.2.0-beta.2, 10.2.0-beta.3, 10.2.0-beta.4, etc.
• ^10.2.0-beta.1 includes everything in ^10.2.0-beta.2, plus 10.2.0-beta.1.
• Since every version in ^10.2.0-beta.2 is also in ^10.2.0-beta.1, semver.subset() should return true.
Actual Behavior
Instead of returning true, semver.subset('^10.2.0-beta.2', '^10.2.0-beta.1') returns false.
Steps To Reproduce
No response
Environment
No response
The text was updated successfully, but these errors were encountered: