Skip to content

Commit d09f4e2

Browse files
authored
Merge pull request #393 from arduino/dependabot/npm_and_yarn/semver-7.6.3
Bump semver from 7.6.2 to 7.6.3
2 parents 864ea16 + d931ff0 commit d09f4e2

File tree

3 files changed

+32
-18
lines changed

3 files changed

+32
-18
lines changed

dist/index.js

+24-10
Original file line numberDiff line numberDiff line change
@@ -8109,6 +8109,8 @@ const Range = __nccwpck_require__(9828)
81098109
/***/ 9828:
81108110
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
81118111

8112+
const SPACE_CHARACTERS = /\s+/g
8113+
81128114
// hoisted class for cyclic dependency
81138115
class Range {
81148116
constructor (range, options) {
@@ -8129,7 +8131,7 @@ class Range {
81298131
// just put it in the set and return
81308132
this.raw = range.value
81318133
this.set = [[range]]
8132-
this.format()
8134+
this.formatted = undefined
81338135
return this
81348136
}
81358137

@@ -8140,10 +8142,7 @@ class Range {
81408142
// First reduce all whitespace as much as possible so we do not have to rely
81418143
// on potentially slow regexes like \s*. This is then stored and used for
81428144
// future error messages as well.
8143-
this.raw = range
8144-
.trim()
8145-
.split(/\s+/)
8146-
.join(' ')
8145+
this.raw = range.trim().replace(SPACE_CHARACTERS, ' ')
81478146

81488147
// First, split on ||
81498148
this.set = this.raw
@@ -8177,14 +8176,29 @@ class Range {
81778176
}
81788177
}
81798178

8180-
this.format()
8179+
this.formatted = undefined
8180+
}
8181+
8182+
get range () {
8183+
if (this.formatted === undefined) {
8184+
this.formatted = ''
8185+
for (let i = 0; i < this.set.length; i++) {
8186+
if (i > 0) {
8187+
this.formatted += '||'
8188+
}
8189+
const comps = this.set[i]
8190+
for (let k = 0; k < comps.length; k++) {
8191+
if (k > 0) {
8192+
this.formatted += ' '
8193+
}
8194+
this.formatted += comps[k].toString().trim()
8195+
}
8196+
}
8197+
}
8198+
return this.formatted
81818199
}
81828200

81838201
format () {
8184-
this.range = this.set
8185-
.map((comps) => comps.join(' ').trim())
8186-
.join('||')
8187-
.trim()
81888202
return this.range
81898203
}
81908204

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
@@ -25,7 +25,7 @@
2525
"@actions/core": "^1.10.1",
2626
"@actions/http-client": "^2.2.1",
2727
"@actions/tool-cache": "^2.0.1",
28-
"semver": "^7.6.2"
28+
"semver": "^7.6.3"
2929
},
3030
"devDependencies": {
3131
"@actions/io": "^1.1.3",

0 commit comments

Comments
 (0)