-
Notifications
You must be signed in to change notification settings - Fork 492
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fix: semver.diff prerelease to release recognition #533
Conversation
In this line: Lines 8 to 9 in b3a7d63
If we parse it first, we can speedup this from 300k op/s to ~470k to ~500k op/s. Like this: const v1 = parse(version1)
const v2 = parse(version2)
if (eq(v1, v2)) { Because Should I open another PR for this one?
|
6a4fd89
to
cc279ff
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this one was a bit confusing and is a little unintuitive, but it does make sense. for future readers here's what helped me wrap my head around it:
the versions 1.0.0
, 1.1.0-pre
and 1.1.0
would sort in that same order. the transition from 1.0.0
to 1.1.0-pre
could be considered a pre-release, but it's also a minor and since the minor is the more impactful change that's what we report the diff as.
Cleanup of #334
Closes #333
Authored by @deefactorial