jspm / sver

Simple Semver and SemverRange classes
MIT License
16 stars 4 forks source link

Better range comparisons #4

Open guybedford opened 3 years ago

guybedford commented 3 years ago

For the range comparison:

const r1 = new SemverRange('^1.2.3');
const r2 = new SemverRange('~1.2.5');

r1.gt(r2);

currently this will return false, when we should really be returning true for this case. That is, range comparisons should be based on comparing the upper bound not the lower bound.