Skip to content

Commit 53a9199

Browse files
author
“gowridurgad”
committed
check failure fix
1 parent 83f1d24 commit 53a9199

File tree

2 files changed

+30
-19
lines changed

2 files changed

+30
-19
lines changed

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

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/setup/index.js

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

6399263992
const debug = __nccwpck_require__(427)
6399363993
const { MAX_LENGTH, MAX_SAFE_INTEGER } = __nccwpck_require__(2293)
63994-
const { safeRe: re, t } = __nccwpck_require__(9523)
63994+
const { safeRe: re, safeSrc: src, t } = __nccwpck_require__(9523)
6399563995

6399663996
const parseOptions = __nccwpck_require__(785)
6399763997
const { compareIdentifiers } = __nccwpck_require__(2463)
@@ -64001,7 +64001,7 @@ class SemVer {
6400164001

6400264002
if (version instanceof SemVer) {
6400364003
if (version.loose === !!options.loose &&
64004-
version.includePrerelease === !!options.includePrerelease) {
64004+
version.includePrerelease === !!options.includePrerelease) {
6400564005
return version
6400664006
} else {
6400764007
version = version.version
@@ -64167,6 +64167,20 @@ class SemVer {
6416764167
// preminor will bump the version up to the next minor release, and immediately
6416864168
// down to pre-release. premajor and prepatch work the same way.
6416964169
inc (release, identifier, identifierBase) {
64170+
if (release.startsWith('pre')) {
64171+
if (!identifier && identifierBase === false) {
64172+
throw new Error('invalid increment argument: identifier is empty')
64173+
}
64174+
// Avoid an invalid semver results
64175+
if (identifier) {
64176+
const r = new RegExp(`^${this.options.loose ? src[t.PRERELEASELOOSE] : src[t.PRERELEASE]}$`)
64177+
const match = `-${identifier}`.match(r)
64178+
if (!match || match[1] !== identifier) {
64179+
throw new Error(`invalid identifier: ${identifier}`)
64180+
}
64181+
}
64182+
}
64183+
6417064184
switch (release) {
6417164185
case 'premajor':
6417264186
this.prerelease.length = 0
@@ -64197,6 +64211,12 @@ class SemVer {
6419764211
}
6419864212
this.inc('pre', identifier, identifierBase)
6419964213
break
64214+
case 'release':
64215+
if (this.prerelease.length === 0) {
64216+
throw new Error(`version ${this.raw} is not a prerelease`)
64217+
}
64218+
this.prerelease.length = 0
64219+
break
6420064220

6420164221
case 'major':
6420264222
// If this is a pre-major version, bump up to the same major version.
@@ -64240,10 +64260,6 @@ class SemVer {
6424064260
case 'pre': {
6424164261
const base = Number(identifierBase) ? 1 : 0
6424264262

64243-
if (!identifier && identifierBase === false) {
64244-
throw new Error('invalid increment argument: identifier is empty')
64245-
}
64246-
6424764263
if (this.prerelease.length === 0) {
6424864264
this.prerelease = [base]
6424964265
} else {
@@ -64502,20 +64518,13 @@ const diff = (version1, version2) => {
6450264518
return 'major'
6450364519
}
6450464520

64505-
// Otherwise it can be determined by checking the high version
64506-
64507-
if (highVersion.patch) {
64508-
// anything higher than a patch bump would result in the wrong version
64521+
// If the main part has no difference
64522+
if (lowVersion.compareMain(highVersion) === 0) {
64523+
if (lowVersion.minor && !lowVersion.patch) {
64524+
return 'minor'
64525+
}
6450964526
return 'patch'
6451064527
}
64511-
64512-
if (highVersion.minor) {
64513-
// anything higher than a minor bump would result in the wrong version
64514-
return 'minor'
64515-
}
64516-
64517-
// bumping major/minor/patch all have same result
64518-
return 'major'
6451964528
}
6452064529

6452164530
// add the `pre` prefix if we are going to a prerelease version
@@ -65022,6 +65031,7 @@ exports = module.exports = {}
6502265031
const re = exports.re = []
6502365032
const safeRe = exports.safeRe = []
6502465033
const src = exports.src = []
65034+
const safeSrc = exports.safeSrc = []
6502565035
const t = exports.t = {}
6502665036
let R = 0
6502765037

@@ -65054,6 +65064,7 @@ const createToken = (name, value, isGlobal) => {
6505465064
debug(name, index, value)
6505565065
t[name] = index
6505665066
src[index] = value
65067+
safeSrc[index] = safe
6505765068
re[index] = new RegExp(value, isGlobal ? 'g' : undefined)
6505865069
safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined)
6505965070
}

0 commit comments

Comments
 (0)