Skip to content

Use semver.compare instead of semver.cmp#16

Open
blockwell-admin wants to merge 1 commit into
merklejerk:masterfrom
blockwell-ai:master
Open

Use semver.compare instead of semver.cmp#16
blockwell-admin wants to merge 1 commit into
merklejerk:masterfrom
blockwell-ai:master

Conversation

@blockwell-admin

Copy link
Copy Markdown

The cmp function in semver expects an operand: function cmp (a, op, b, loose), but it was being called with just two versions: sv.cmp(a, b).

The compare function matches the expected signature and behavior: function compare (a, b, loose).

In practice, this meant that the sorting at the end of semver-merge didn't work correctly. I ran into this when contracts had the same base version, but different range specifiers, eg.: =0.4.24 and >=0.4.24.

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.

1 participant