Skip to content

Commit 583384a

Browse files
authored
Merge pull request #568 from arduino/dependabot/npm_and_yarn/semver-7.7.3
Bump semver from 7.7.2 to 7.7.3
2 parents 2a4e84b + 1bebd56 commit 583384a

File tree

4 files changed

+30
-11
lines changed

4 files changed

+30
-11
lines changed

.licenses/npm/semver-7.7.2.dep.yml renamed to .licenses/npm/semver-7.7.3.dep.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: semver
3-
version: 7.7.2
3+
version: 7.7.3
44
type: npm
55
summary: The semantic version parser used by npm.
66
homepage:

dist/index.js

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7961,6 +7961,7 @@ const isSatisfiable = (comparators, options) => {
79617961
// already replaced the hyphen ranges
79627962
// turn into a set of JUST comparators.
79637963
const parseComparator = (comp, options) => {
7964+
comp = comp.replace(re[t.BUILD], '')
79647965
debug('comp', comp, options)
79657966
comp = replaceCarets(comp, options)
79667967
debug('caret', comp)
@@ -8381,11 +8382,25 @@ class SemVer {
83818382
other = new SemVer(other, this.options)
83828383
}
83838384

8384-
return (
8385-
compareIdentifiers(this.major, other.major) ||
8386-
compareIdentifiers(this.minor, other.minor) ||
8387-
compareIdentifiers(this.patch, other.patch)
8388-
)
8385+
if (this.major < other.major) {
8386+
return -1
8387+
}
8388+
if (this.major > other.major) {
8389+
return 1
8390+
}
8391+
if (this.minor < other.minor) {
8392+
return -1
8393+
}
8394+
if (this.minor > other.minor) {
8395+
return 1
8396+
}
8397+
if (this.patch < other.patch) {
8398+
return -1
8399+
}
8400+
if (this.patch > other.patch) {
8401+
return 1
8402+
}
8403+
return 0
83898404
}
83908405

83918406
comparePre (other) {
@@ -9286,6 +9301,10 @@ module.exports = debug
92869301

92879302
const numeric = /^[0-9]+$/
92889303
const compareIdentifiers = (a, b) => {
9304+
if (typeof a === 'number' && typeof b === 'number') {
9305+
return a === b ? 0 : a < b ? -1 : 1
9306+
}
9307+
92899308
const anum = numeric.test(a)
92909309
const bnum = numeric.test(b)
92919310

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"@actions/core": "^1.11.1",
1919
"@actions/http-client": "^2.2.3",
2020
"@actions/tool-cache": "^2.0.2",
21-
"semver": "^7.7.2"
21+
"semver": "^7.7.3"
2222
},
2323
"devDependencies": {
2424
"@actions/io": "^1.1.3",

0 commit comments

Comments
 (0)