Skip to content

Commit 7d2407f

Browse files
Bump semver from 7.6.3 to 7.7.1 (#464)
* Bump semver from 7.6.3 to 7.7.1 Bumps [semver](https://github.com/npm/node-semver) from 7.6.3 to 7.7.1. - [Release notes](https://github.com/npm/node-semver/releases) - [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md) - [Commits](npm/node-semver@v7.6.3...v7.7.1) --- updated-dependencies: - dependency-name: semver dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * npm run build --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Austin Valle <austinvalle@gmail.com>
1 parent 9e5c386 commit 7d2407f

File tree

3 files changed

+38
-26
lines changed

3 files changed

+38
-26
lines changed

‎dist/index.js

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18279,7 +18279,7 @@ const testSet = (set, version, options) => {
1827918279

1828018280
const debug = __nccwpck_require__(1159)
1828118281
const { MAX_LENGTH, MAX_SAFE_INTEGER } = __nccwpck_require__(5101)
18282-
const { safeRe: re, t } = __nccwpck_require__(5471)
18282+
const { safeRe: re, safeSrc: src, t } = __nccwpck_require__(5471)
1828318283

1828418284
const parseOptions = __nccwpck_require__(356)
1828518285
const { compareIdentifiers } = __nccwpck_require__(3348)
@@ -18289,7 +18289,7 @@ class SemVer {
1828918289

1829018290
if (version instanceof SemVer) {
1829118291
if (version.loose === !!options.loose &&
18292-
version.includePrerelease === !!options.includePrerelease) {
18292+
version.includePrerelease === !!options.includePrerelease) {
1829318293
return version
1829418294
} else {
1829518295
version = version.version
@@ -18455,6 +18455,20 @@ class SemVer {
1845518455
// preminor will bump the version up to the next minor release, and immediately
1845618456
// down to pre-release. premajor and prepatch work the same way.
1845718457
inc (release, identifier, identifierBase) {
18458+
if (release.startsWith('pre')) {
18459+
if (!identifier && identifierBase === false) {
18460+
throw new Error('invalid increment argument: identifier is empty')
18461+
}
18462+
// Avoid an invalid semver results
18463+
if (identifier) {
18464+
const r = new RegExp(`^${this.options.loose ? src[t.PRERELEASELOOSE] : src[t.PRERELEASE]}$`)
18465+
const match = `-${identifier}`.match(r)
18466+
if (!match || match[1] !== identifier) {
18467+
throw new Error(`invalid identifier: ${identifier}`)
18468+
}
18469+
}
18470+
}
18471+
1845818472
switch (release) {
1845918473
case 'premajor':
1846018474
this.prerelease.length = 0
@@ -18485,6 +18499,12 @@ class SemVer {
1848518499
}
1848618500
this.inc('pre', identifier, identifierBase)
1848718501
break
18502+
case 'release':
18503+
if (this.prerelease.length === 0) {
18504+
throw new Error(`version ${this.raw} is not a prerelease`)
18505+
}
18506+
this.prerelease.length = 0
18507+
break
1848818508

1848918509
case 'major':
1849018510
// If this is a pre-major version, bump up to the same major version.
@@ -18528,10 +18548,6 @@ class SemVer {
1852818548
case 'pre': {
1852918549
const base = Number(identifierBase) ? 1 : 0
1853018550

18531-
if (!identifier && identifierBase === false) {
18532-
throw new Error('invalid increment argument: identifier is empty')
18533-
}
18534-
1853518551
if (this.prerelease.length === 0) {
1853618552
this.prerelease = [base]
1853718553
} else {
@@ -18790,20 +18806,13 @@ const diff = (version1, version2) => {
1879018806
return 'major'
1879118807
}
1879218808

18793-
// Otherwise it can be determined by checking the high version
18794-
18795-
if (highVersion.patch) {
18796-
// anything higher than a patch bump would result in the wrong version
18809+
// If the main part has no difference
18810+
if (lowVersion.compareMain(highVersion) === 0) {
18811+
if (lowVersion.minor && !lowVersion.patch) {
18812+
return 'minor'
18813+
}
1879718814
return 'patch'
1879818815
}
18799-
18800-
if (highVersion.minor) {
18801-
// anything higher than a minor bump would result in the wrong version
18802-
return 'minor'
18803-
}
18804-
18805-
// bumping major/minor/patch all have same result
18806-
return 'major'
1880718816
}
1880818817

1880918818
// add the `pre` prefix if we are going to a prerelease version
@@ -19310,6 +19319,7 @@ exports = module.exports = {}
1931019319
const re = exports.re = []
1931119320
const safeRe = exports.safeRe = []
1931219321
const src = exports.src = []
19322+
const safeSrc = exports.safeSrc = []
1931319323
const t = exports.t = {}
1931419324
let R = 0
1931519325

@@ -19342,6 +19352,7 @@ const createToken = (name, value, isGlobal) => {
1934219352
debug(name, index, value)
1934319353
t[name] = index
1934419354
src[index] = value
19355+
safeSrc[index] = safe
1934519356
re[index] = new RegExp(value, isGlobal ? 'g' : undefined)
1934619357
safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined)
1934719358
}

‎package-lock.json

Lines changed: 8 additions & 7 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
@@ -24,7 +24,7 @@
2424
"@actions/io": "^1.1.3",
2525
"@actions/tool-cache": "^2.0.2",
2626
"@hashicorp/js-releases": "^1.7.3",
27-
"semver": "^7.6.3"
27+
"semver": "^7.7.1"
2828
},
2929
"devDependencies": {
3030
"@vercel/ncc": "^0.38.3",

0 commit comments

Comments
 (0)