-
Notifications
You must be signed in to change notification settings - Fork 508
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] diff prerelease changed between 7.3.8 and 7.5.4 #607
Comments
|
Yes, the check was vice versa actually, just on mobile - however Okay if you are seeing it from that perspective this is true. I saw it from a perspective where the version string actually differs. Just not sure how many occurrences exist, that broke, which interpreted it like me and not only use But then see it the other way around. TBH imo it is a breaking change, but it is not much effort to adapt our code, so I will do this, as we rely on this. |
This tripped us also, we updated So what we observed with diff was: // semver 7.3.8
diff('1.2.0-nightly.0', '1.2.0') // → 'prerelease'
// semver 7.5.4
diff('1.2.0-nightly.0', '1.2.0') // → 'minor' |
@ljharb Is this a bug then? According to the docs regarding
|
it looks like a bug, since |
No, the diff between
The inc you want is probably
This subtlety is why
|
Afaict this is working as expected now, the change was a bugfix that was discussed heavily in #546. |
Cheers @wraithgar. Thanks for your detailed answer. I assume that the only way that a |
Yes, exactly. If they differ by anything more you'll get at the very least a > semver.inc('1.2.9', 'prerelease')
'1.2.10-0'
> semver.inc('1.2.9', 'prepatch')
'1.2.10-0'
> semver.diff('1.2.9', '1.2.10-0')
'prepatch' |
Is there an existing issue for this?
Current Behavior
a diff between a non prerelease version like
5.5.0
and a prerelease version on the same patch now creates amajor
diff while it previously wasprerelease
see https://github.com/npm/node-semver/pull/566/files
Expected Behavior
It should be either
prerelease
or mention the breaking change it the changelog and why you think it should be that way.Steps To Reproduce
Environment
The text was updated successfully, but these errors were encountered: