Skip to content

Commit df756c1

Browse files
authored
Merge pull request #1019 from arduino/dependabot/npm_and_yarn/semver-7.6.3
build(deps): bump semver from 7.6.2 to 7.6.3
2 parents 397c82f + 3764cfd commit df756c1

File tree

4 files changed

+33
-19
lines changed

4 files changed

+33
-19
lines changed

.licenses/npm/semver-7.6.2.dep.yml renamed to .licenses/npm/semver-7.6.3.dep.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: semver
3-
version: 7.6.2
3+
version: 7.6.3
44
type: npm
55
summary: The semantic version parser used by npm.
66
homepage:

dist/index.js

+24-10
Original file line numberDiff line numberDiff line change
@@ -8666,6 +8666,8 @@ const Range = __nccwpck_require__(9828)
86668666
/***/ 9828:
86678667
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
86688668

8669+
const SPACE_CHARACTERS = /\s+/g
8670+
86698671
// hoisted class for cyclic dependency
86708672
class Range {
86718673
constructor (range, options) {
@@ -8686,7 +8688,7 @@ class Range {
86868688
// just put it in the set and return
86878689
this.raw = range.value
86888690
this.set = [[range]]
8689-
this.format()
8691+
this.formatted = undefined
86908692
return this
86918693
}
86928694

@@ -8697,10 +8699,7 @@ class Range {
86978699
// First reduce all whitespace as much as possible so we do not have to rely
86988700
// on potentially slow regexes like \s*. This is then stored and used for
86998701
// future error messages as well.
8700-
this.raw = range
8701-
.trim()
8702-
.split(/\s+/)
8703-
.join(' ')
8702+
this.raw = range.trim().replace(SPACE_CHARACTERS, ' ')
87048703

87058704
// First, split on ||
87068705
this.set = this.raw
@@ -8734,14 +8733,29 @@ class Range {
87348733
}
87358734
}
87368735

8737-
this.format()
8736+
this.formatted = undefined
8737+
}
8738+
8739+
get range () {
8740+
if (this.formatted === undefined) {
8741+
this.formatted = ''
8742+
for (let i = 0; i < this.set.length; i++) {
8743+
if (i > 0) {
8744+
this.formatted += '||'
8745+
}
8746+
const comps = this.set[i]
8747+
for (let k = 0; k < comps.length; k++) {
8748+
if (k > 0) {
8749+
this.formatted += ' '
8750+
}
8751+
this.formatted += comps[k].toString().trim()
8752+
}
8753+
}
8754+
}
8755+
return this.formatted
87388756
}
87398757

87408758
format () {
8741-
this.range = this.set
8742-
.map((comps) => comps.join(' ').trim())
8743-
.join('||')
8744-
.trim()
87458759
return this.range
87468760
}
87478761

package-lock.json

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"dependencies": {
1919
"@actions/core": "^1.10.1",
2020
"@actions/tool-cache": "^2.0.1",
21-
"semver": "^7.6.2",
21+
"semver": "^7.6.3",
2222
"typed-rest-client": "^2.0.2"
2323
},
2424
"devDependencies": {

0 commit comments

Comments
 (0)