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.
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
.