Skip to content

Commit 30ed380

Browse files
authored
Merge pull request #1300 from arduino/dependabot/npm_and_yarn/semver-7.7.3
build(deps): bump semver from 7.7.2 to 7.7.3
2 parents 52ff852 + f2330c8 commit 30ed380

File tree

4 files changed

+33
-15
lines changed

4 files changed

+33
-15
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
@@ -8854,6 +8854,7 @@ const isSatisfiable = (comparators, options) => {
88548854
// already replaced the hyphen ranges
88558855
// turn into a set of JUST comparators.
88568856
const parseComparator = (comp, options) => {
8857+
comp = comp.replace(re[t.BUILD], '')
88578858
debug('comp', comp, options)
88588859
comp = replaceCarets(comp, options)
88598860
debug('caret', comp)
@@ -9274,11 +9275,25 @@ class SemVer {
92749275
other = new SemVer(other, this.options)
92759276
}
92769277

9277-
return (
9278-
compareIdentifiers(this.major, other.major) ||
9279-
compareIdentifiers(this.minor, other.minor) ||
9280-
compareIdentifiers(this.patch, other.patch)
9281-
)
9278+
if (this.major < other.major) {
9279+
return -1
9280+
}
9281+
if (this.major > other.major) {
9282+
return 1
9283+
}
9284+
if (this.minor < other.minor) {
9285+
return -1
9286+
}
9287+
if (this.minor > other.minor) {
9288+
return 1
9289+
}
9290+
if (this.patch < other.patch) {
9291+
return -1
9292+
}
9293+
if (this.patch > other.patch) {
9294+
return 1
9295+
}
9296+
return 0
92829297
}
92839298

92849299
comparePre (other) {
@@ -10179,6 +10194,10 @@ module.exports = debug
1017910194

1018010195
const numeric = /^[0-9]+$/
1018110196
const compareIdentifiers = (a, b) => {
10197+
if (typeof a === 'number' && typeof b === 'number') {
10198+
return a === b ? 0 : a < b ? -1 : 1
10199+
}
10200+
1018210201
const anum = numeric.test(a)
1018310202
const bnum = numeric.test(b)
1018410203

package-lock.json

Lines changed: 7 additions & 8 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
"dependencies": {
1919
"@actions/core": "^1.11.1",
2020
"@actions/tool-cache": "^2.0.2",
21-
"semver": "^7.7.2",
21+
"semver": "^7.7.3",
2222
"typed-rest-client": "^2.1.0"
2323
},
2424
"devDependencies": {

0 commit comments

Comments
 (0)