Skip to content

Conversation

@jmorrell
Copy link
Contributor

The previous library: github.com/Mastermind/semver proved to not match the behavior of https://github.com/npm/node-semver in some important ways. The dark launch showed that ~1% of all node builds would either fail, or get the wrong version. Examples:

10.15 -> 10.15.0 instead of 10.15.3
^0.27.2 -> 0.28.4 instead of 0.27.2
>= 8.* <12 would give 12.x instead of 11.x
7 - 10 style ranges weren't supported
etc

I forked https://github.com/blang/semver and cribbed the logic from the Node library as https://github.com/jmorrell/semver

Let's dark-launch this V2 and see if we are still not matching up anywhere.

@jmorrell jmorrell requested a review from a team as a code owner May 10, 2019 02:59
@jmorrell jmorrell force-pushed the fix-resolve-mismatches branch from 63df938 to 56fdfe9 Compare May 10, 2019 03:00

for _, rel := range filtered {
if rel.version.Equal(resolvedVersion) {
if rel.version.Equals(resolvedVersion) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the convention in stdlib is Equal (like bytes.Equal), but I already hate myself for even bringing this up

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's inherited from the library I forked for this. I'll make a note to change that as I polish it up and document it :)

@jmorrell jmorrell merged commit 4665819 into master May 10, 2019
@jmorrell jmorrell deleted the fix-resolve-mismatches branch May 10, 2019 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants