Update checked-in dependencies

This commit is contained in:
github-actions[bot] 2025-02-10 17:23:18 +00:00
parent 8c70d43f73
commit ccc5046d0b
17 changed files with 1088 additions and 958 deletions

View file

@ -1,6 +1,6 @@
const debug = require('../internal/debug')
const { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants')
const { safeRe: re, t } = require('../internal/re')
const { safeRe: re, safeSrc: src, t } = require('../internal/re')
const parseOptions = require('../internal/parse-options')
const { compareIdentifiers } = require('../internal/identifiers')
@ -182,7 +182,8 @@ class SemVer {
}
// Avoid an invalid semver results
if (identifier) {
const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE])
const r = new RegExp(`^${this.options.loose ? src[t.PRERELEASELOOSE] : src[t.PRERELEASE]}$`)
const match = `-${identifier}`.match(r)
if (!match || match[1] !== identifier) {
throw new Error(`invalid identifier: ${identifier}`)
}

2
node_modules/semver/internal/re.js generated vendored
View file

@ -10,6 +10,7 @@ exports = module.exports = {}
const re = exports.re = []
const safeRe = exports.safeRe = []
const src = exports.src = []
const safeSrc = exports.safeSrc = []
const t = exports.t = {}
let R = 0
@ -42,6 +43,7 @@ const createToken = (name, value, isGlobal) => {
debug(name, index, value)
t[name] = index
src[index] = value
safeSrc[index] = safe
re[index] = new RegExp(value, isGlobal ? 'g' : undefined)
safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined)
}

2
node_modules/semver/package.json generated vendored
View file

@ -1,6 +1,6 @@
{
"name": "semver",
"version": "7.7.0",
"version": "7.7.1",
"description": "The semantic version parser used by npm.",
"main": "index.js",
"scripts": {