From c7aa1fc762ec8424e49b95f80963ab3bfda578e0 Mon Sep 17 00:00:00 2001 From: Aparna Jyothi Date: Tue, 13 Jan 2026 16:05:09 +0530 Subject: [PATCH] check failure fix --- ...ver-7.7.2.dep.yml => semver-7.7.3.dep.yml} | 2 +- dist/setup/index.js | 29 +++++++++++++++---- package-lock.json | 4 +-- package.json | 2 +- 4 files changed, 28 insertions(+), 9 deletions(-) rename .licenses/npm/{semver-7.7.2.dep.yml => semver-7.7.3.dep.yml} (98%) diff --git a/.licenses/npm/semver-7.7.2.dep.yml b/.licenses/npm/semver-7.7.3.dep.yml similarity index 98% rename from .licenses/npm/semver-7.7.2.dep.yml rename to .licenses/npm/semver-7.7.3.dep.yml index 41578916..77ae9813 100644 --- a/.licenses/npm/semver-7.7.2.dep.yml +++ b/.licenses/npm/semver-7.7.3.dep.yml @@ -1,6 +1,6 @@ --- name: semver -version: 7.7.2 +version: 7.7.3 type: npm summary: The semantic version parser used by npm. homepage: diff --git a/dist/setup/index.js b/dist/setup/index.js index 48d93766..9a0b9f49 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -66159,6 +66159,7 @@ const isSatisfiable = (comparators, options) => { // already replaced the hyphen ranges // turn into a set of JUST comparators. const parseComparator = (comp, options) => { + comp = comp.replace(re[t.BUILD], '') debug('comp', comp, options) comp = replaceCarets(comp, options) debug('caret', comp) @@ -66579,11 +66580,25 @@ class SemVer { other = new SemVer(other, this.options) } - return ( - compareIdentifiers(this.major, other.major) || - compareIdentifiers(this.minor, other.minor) || - compareIdentifiers(this.patch, other.patch) - ) + if (this.major < other.major) { + return -1 + } + if (this.major > other.major) { + return 1 + } + if (this.minor < other.minor) { + return -1 + } + if (this.minor > other.minor) { + return 1 + } + if (this.patch < other.patch) { + return -1 + } + if (this.patch > other.patch) { + return 1 + } + return 0 } comparePre (other) { @@ -67484,6 +67499,10 @@ module.exports = debug const numeric = /^[0-9]+$/ const compareIdentifiers = (a, b) => { + if (typeof a === 'number' && typeof b === 'number') { + return a === b ? 0 : a < b ? -1 : 1 + } + const anum = numeric.test(a) const bnum = numeric.test(b) diff --git a/package-lock.json b/package-lock.json index c3440d04..548e0fdf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "setup-node", - "version": "6.0.0", + "version": "6.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "setup-node", - "version": "6.0.0", + "version": "6.2.0", "license": "MIT", "dependencies": { "@actions/cache": "^4.1.0", diff --git a/package.json b/package.json index 69e68873..9e6a2b70 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "setup-node", - "version": "6.0.0", + "version": "6.2.0", "private": true, "description": "setup node action", "main": "lib/setup-node.js",