Skip to content

Commit 352b66e

Browse files
authored
Merge pull request #1555 from MeilCli/update/action
update actions
2 parents 4807125 + de34bef commit 352b66e

File tree

1 file changed

+24
-5
lines changed

1 file changed

+24
-5
lines changed

dist/index.js

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13379,6 +13379,7 @@ const isSatisfiable = (comparators, options) => {
1337913379
// already replaced the hyphen ranges
1338013380
// turn into a set of JUST comparators.
1338113381
const parseComparator = (comp, options) => {
13382+
comp = comp.replace(re[t.BUILD], '')
1338213383
debug('comp', comp, options)
1338313384
comp = replaceCarets(comp, options)
1338413385
debug('caret', comp)
@@ -13799,11 +13800,25 @@ class SemVer {
1379913800
other = new SemVer(other, this.options)
1380013801
}
1380113802

13802-
return (
13803-
compareIdentifiers(this.major, other.major) ||
13804-
compareIdentifiers(this.minor, other.minor) ||
13805-
compareIdentifiers(this.patch, other.patch)
13806-
)
13803+
if (this.major < other.major) {
13804+
return -1
13805+
}
13806+
if (this.major > other.major) {
13807+
return 1
13808+
}
13809+
if (this.minor < other.minor) {
13810+
return -1
13811+
}
13812+
if (this.minor > other.minor) {
13813+
return 1
13814+
}
13815+
if (this.patch < other.patch) {
13816+
return -1
13817+
}
13818+
if (this.patch > other.patch) {
13819+
return 1
13820+
}
13821+
return 0
1380713822
}
1380813823

1380913824
comparePre (other) {
@@ -14704,6 +14719,10 @@ module.exports = debug
1470414719

1470514720
const numeric = /^[0-9]+$/
1470614721
const compareIdentifiers = (a, b) => {
14722+
if (typeof a === 'number' && typeof b === 'number') {
14723+
return a === b ? 0 : a < b ? -1 : 1
14724+
}
14725+
1470714726
const anum = numeric.test(a)
1470814727
const bnum = numeric.test(b)
1470914728

0 commit comments

Comments
 (0)