diff --git a/node_modules/@npmcli/metavuln-calculator/lib/advisory.js b/node_modules/@npmcli/metavuln-calculator/lib/advisory.js index 1f479a90dd999..01f6a66fc2ac4 100644 --- a/node_modules/@npmcli/metavuln-calculator/lib/advisory.js +++ b/node_modules/@npmcli/metavuln-calculator/lib/advisory.js @@ -106,7 +106,7 @@ class Advisory { this[_packument] = packument - const pakuVersions = Object.keys(packument.versions) + const pakuVersions = Object.keys(packument.versions || {}) const allVersions = new Set([...pakuVersions, ...this.versions]) const versionsAdded = [] const versionsRemoved = [] @@ -242,7 +242,7 @@ class Advisory { // check the dependency of this version on the vulnerable dep // if we got a version that's not in the packument, fall back on // the spec provided, if possible. - const mani = this[_packument].versions[version] || { + const mani = this[_packument]?.versions?.[version] || { dependencies: { [this.dependency]: spec, }, diff --git a/node_modules/@npmcli/metavuln-calculator/package.json b/node_modules/@npmcli/metavuln-calculator/package.json index baf59c47fcb40..18ebb68c4bfd1 100644 --- a/node_modules/@npmcli/metavuln-calculator/package.json +++ b/node_modules/@npmcli/metavuln-calculator/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/metavuln-calculator", - "version": "5.0.0", + "version": "5.0.1", "main": "lib/index.js", "files": [ "bin/", @@ -33,8 +33,8 @@ ] }, "devDependencies": { - "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "4.5.1", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.13.0", "require-inject": "^1.4.4", "tap": "^16.0.1" }, @@ -49,6 +49,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.5.1" + "version": "4.13.0", + "publish": "true" } } diff --git a/package-lock.json b/package-lock.json index dcdbf32500f79..5e7a6d018fb20 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2150,9 +2150,9 @@ } }, "node_modules/@npmcli/metavuln-calculator": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/metavuln-calculator/-/metavuln-calculator-5.0.0.tgz", - "integrity": "sha512-BBFQx4M12wiEuVwCgtX/Depx0B/+NHMwDWOlXT41/Pdy5W/1Fenk+hibUlMSrFWwASbX+fY90UbILAEIYH02/A==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/metavuln-calculator/-/metavuln-calculator-5.0.1.tgz", + "integrity": "sha512-qb8Q9wIIlEPj3WeA1Lba91R4ZboPL0uspzV0F9uwP+9AYMVB2zOoa7Pbk12g6D2NHAinSbHh6QYmGuRyHZ874Q==", "dependencies": { "cacache": "^17.0.0", "json-parse-even-better-errors": "^3.0.0",