Skip to content

Commit

Permalink
deps: semver@7.6.3
Browse files Browse the repository at this point in the history
  • Loading branch information
wraithgar committed Aug 21, 2024
1 parent 12587fa commit 4e965ad
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 16 deletions.
34 changes: 24 additions & 10 deletions node_modules/semver/classes/range.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const SPACE_CHARACTERS = /\s+/g

// hoisted class for cyclic dependency
class Range {
constructor (range, options) {
Expand All @@ -18,7 +20,7 @@ class Range {
// just put it in the set and return
this.raw = range.value
this.set = [[range]]
this.format()
this.formatted = undefined
return this
}

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

// First, split on ||
this.set = this.raw
Expand Down Expand Up @@ -66,14 +65,29 @@ class Range {
}
}

this.format()
this.formatted = undefined
}

get range () {
if (this.formatted === undefined) {
this.formatted = ''
for (let i = 0; i < this.set.length; i++) {
if (i > 0) {
this.formatted += '||'
}
const comps = this.set[i]
for (let k = 0; k < comps.length; k++) {
if (k > 0) {
this.formatted += ' '
}
this.formatted += comps[k].toString().trim()
}
}
}
return this.formatted
}

format () {
this.range = this.set
.map((comps) => comps.join(' ').trim())
.join('||')
.trim()
return this.range
}

Expand Down
2 changes: 1 addition & 1 deletion node_modules/semver/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "semver",
"version": "7.6.2",
"version": "7.6.3",
"description": "The semantic version parser used by npm.",
"main": "index.js",
"scripts": {
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
"proc-log": "^4.2.0",
"qrcode-terminal": "^0.12.0",
"read": "^3.0.1",
"semver": "^7.6.2",
"semver": "^7.6.3",
"spdx-expression-parse": "^4.0.0",
"ssri": "^10.0.6",
"supports-color": "^9.4.0",
Expand Down Expand Up @@ -11549,9 +11549,9 @@
}
},
"node_modules/semver": {
"version": "7.6.2",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz",
"integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==",
"version": "7.6.3",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz",
"integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==",
"inBundle": true,
"license": "ISC",
"bin": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
"proc-log": "^4.2.0",
"qrcode-terminal": "^0.12.0",
"read": "^3.0.1",
"semver": "^7.6.2",
"semver": "^7.6.3",
"spdx-expression-parse": "^4.0.0",
"ssri": "^10.0.6",
"supports-color": "^9.4.0",
Expand Down

0 comments on commit 4e965ad

Please sign in to comment.