-
Notifications
You must be signed in to change notification settings - Fork 507
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
[QUESTION] semver.intersects('>=16.0.0 <17.0.0', '^17.0.0-0', { includePrereleases: true })
should be false
#345
Comments
Hm, I disagree with the stated intent here.
|
Ah ok, I can swap them - that makes sense to me, I just misunderstood our slack discussion. I just need it to be true with one of the options :-) Updated. |
semver.intersects('>=16.0.0 <17.0.0', '^17.0.0-0', { includePrereleases: true })
should be false
semver.intersects('>=16.0.0 <17.0.0', '^17.0.0-0', { includePrereleases: true })
should be false
Action Item:
|
This comment was marked as spam.
This comment was marked as spam.
Same comment as here: Comparison functions -which are ultimately called by |
@mbtools if it accepts the option, it should obey it - iow, the bug is either that it doesn't obey the option, or that it accepts it, but either way there's a bug. |
It comes down to this: cmp = new SemVer('1.2.3', { includePrerelease: false }).compare('1.2.3-10')
// 1, not equal
cmp = new SemVer('1.2.3', { includePrerelease: true }).compare('1.2.3-10')
// 1, not equal I don't think we can change the constructor. So are we saying the default behaviour of |
Yes, I'd say that when the Separately, I'm not sure why the constructors need to constrain the functions - i'm not using the instances at all in my OP (the implementation detail that it's using them internally isn't something I should need to think about) |
What / Why
semver.intersects('>=16.0.0 <17.0.0', '^17.0.0-0')
should betrue
, and is.semver.intersects('>=16.0.0 <17.0.0', '^17.0.0-0', { includePrereleases: true })
should befalse
, and is not.I made test cases:
but i can't figure out how to fix it.
The text was updated successfully, but these errors were encountered: