diff --git a/node_modules/npm-pick-manifest/lib/index.js b/node_modules/npm-pick-manifest/lib/index.js index 42e41b1180461..82807971844bf 100644 --- a/node_modules/npm-pick-manifest/lib/index.js +++ b/node_modules/npm-pick-manifest/lib/index.js @@ -123,9 +123,15 @@ const pickManifest = (packument, wanted, opts) => { const defaultVer = distTags[defaultTag] if (defaultVer && (range === '*' || semver.satisfies(defaultVer, range, { loose: true })) && + !restricted[defaultVer] && !shouldAvoid(defaultVer, avoid)) { const mani = versions[defaultVer] - if (mani && isBefore(verTimes, defaultVer, time)) { + const ok = mani && + isBefore(verTimes, defaultVer, time) && + engineOk(mani, npmVersion, nodeVersion) && + !mani.deprecated && + !staged[defaultVer] + if (ok) { return mani } } @@ -155,10 +161,10 @@ const pickManifest = (packument, wanted, opts) => { const [verb, manib] = b const notavoida = !shouldAvoid(vera, avoid) const notavoidb = !shouldAvoid(verb, avoid) - const notrestra = !restricted[a] - const notrestrb = !restricted[b] - const notstagea = !staged[a] - const notstageb = !staged[b] + const notrestra = !restricted[vera] + const notrestrb = !restricted[verb] + const notstagea = !staged[vera] + const notstageb = !staged[verb] const notdepra = !mania.deprecated const notdeprb = !manib.deprecated const enginea = engineOk(mania, npmVersion, nodeVersion) diff --git a/node_modules/npm-pick-manifest/package.json b/node_modules/npm-pick-manifest/package.json index 1167be1272712..4c0dd50630def 100644 --- a/node_modules/npm-pick-manifest/package.json +++ b/node_modules/npm-pick-manifest/package.json @@ -1,6 +1,6 @@ { "name": "npm-pick-manifest", - "version": "9.0.1", + "version": "9.1.0", "description": "Resolves a matching manifest from a package metadata document according to standard npm semver resolution rules.", "main": "./lib", "files": [ diff --git a/package-lock.json b/package-lock.json index 5872e5a26da04..cd8fec7706234 100644 --- a/package-lock.json +++ b/package-lock.json @@ -133,7 +133,7 @@ "npm-audit-report": "^5.0.0", "npm-install-checks": "^6.3.0", "npm-package-arg": "^11.0.2", - "npm-pick-manifest": "^9.0.1", + "npm-pick-manifest": "^9.1.0", "npm-profile": "^10.0.0", "npm-registry-fetch": "^17.1.0", "npm-user-validate": "^2.0.1", @@ -9545,9 +9545,9 @@ } }, "node_modules/npm-pick-manifest": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-9.0.1.tgz", - "integrity": "sha512-Udm1f0l2nXb3wxDpKjfohwgdFUSV50UVwzEIpDXVsbDMXVIEF81a/i0UhuQbhrPMMmdiq3+YMFLFIRVLs3hxQw==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-9.1.0.tgz", + "integrity": "sha512-nkc+3pIIhqHVQr085X9d2JzPzLyjzQS96zbruppqC9aZRm/x8xx6xhI98gHtsfELP2bE+loHq8ZaHFHhe+NauA==", "inBundle": true, "license": "ISC", "dependencies": { diff --git a/package.json b/package.json index 36a18ad335f74..d6be8cad04c49 100644 --- a/package.json +++ b/package.json @@ -98,7 +98,7 @@ "npm-audit-report": "^5.0.0", "npm-install-checks": "^6.3.0", "npm-package-arg": "^11.0.2", - "npm-pick-manifest": "^9.0.1", + "npm-pick-manifest": "^9.1.0", "npm-profile": "^10.0.0", "npm-registry-fetch": "^17.1.0", "npm-user-validate": "^2.0.1",