From f7da341322c2f860156e8144b208583596504479 Mon Sep 17 00:00:00 2001 From: Gar Date: Mon, 16 Dec 2024 10:12:35 -0800 Subject: [PATCH 01/24] fix(search): properly display multiple search terms (#7980) When searching for multiple terms in npm, the highlighting code has a bug where it duplicates the output any time there are matching terms. This fixes the highlighting code. Before: ![output of "npm search gar promisify" showing the name being duplicated](https://github.com/user-attachments/assets/2f34ece7-7563-4db1-a540-3bb661a4c3e0) After: ![output of "node . search gar promisify" showing the name being displayed correctly](https://github.com/user-attachments/assets/ba31fcd9-caf3-4a08-8bbb-7f5242f0098b) --- lib/utils/format-search-stream.js | 51 +++--- .../test/lib/commands/search.js.test.cjs | 146 ++++++++++++++++++ test/lib/commands/search.js | 24 +++ 3 files changed, 194 insertions(+), 27 deletions(-) diff --git a/lib/utils/format-search-stream.js b/lib/utils/format-search-stream.js index b70bd915123da..9b144ceae1984 100644 --- a/lib/utils/format-search-stream.js +++ b/lib/utils/format-search-stream.js @@ -82,7 +82,8 @@ class TextOutputStream extends Minipass { constructor (opts) { super() - this.#args = opts.args.map(s => s.toLowerCase()).filter(Boolean) + // Consider a search for "cowboys" and "boy". If we highlight "boys" first the "cowboys" string will no longer string match because of the ansi highlighting added to "boys". If we highlight "boy" second then the ansi reset at the end will make the highlighting only on "cowboy" with a normal "s". Neither is perfect but at least the first option doesn't do partial highlighting. So, we sort strings smaller to larger + this.#args = opts.args.map(s => s.toLowerCase()).filter(Boolean).sort((a, b) => a.length - b.length) this.#chalk = opts.npm.chalk this.#exclude = opts.exclude this.#parseable = opts.parseable @@ -124,38 +125,17 @@ class TextOutputStream extends Minipass { } }).join(' ') - let description = [] - for (const arg of this.#args) { - const finder = pkg.description.toLowerCase().split(arg.toLowerCase()) - let p = 0 - for (const f of finder) { - description.push(pkg.description.slice(p, p + f.length)) - const word = pkg.description.slice(p + f.length, p + f.length + arg.length) - description.push(this.#chalk.cyan(word)) - p += f.length + arg.length - } - } - description = description.filter(Boolean) - let name = pkg.name + const description = this.#highlight(pkg.description) + let name if (this.#args.includes(pkg.name)) { name = this.#chalk.cyan(pkg.name) } else { - name = [] - for (const arg of this.#args) { - const finder = pkg.name.toLowerCase().split(arg.toLowerCase()) - let p = 0 - for (const f of finder) { - name.push(pkg.name.slice(p, p + f.length)) - const word = pkg.name.slice(p + f.length, p + f.length + arg.length) - name.push(this.#chalk.cyan(word)) - p += f.length + arg.length - } - } - name = this.#chalk.blue(name.join('')) + name = this.#highlight(pkg.name) + name = this.#chalk.blue(name) } if (description.length) { - output = `${name}\n${description.join('')}\n` + output = `${name}\n${description}\n` } else { output = `${name}\n` } @@ -171,4 +151,21 @@ class TextOutputStream extends Minipass { output += `${this.#chalk.blue(`https://npm.im/${pkg.name}`)}\n` return super.write(output) } + + #highlight (input) { + let output = input + for (const arg of this.#args) { + let i = output.toLowerCase().indexOf(arg) + while (i > -1) { + const highlit = this.#chalk.cyan(output.slice(i, i + arg.length)) + output = [ + output.slice(0, i), + highlit, + output.slice(i + arg.length), + ].join('') + i = output.toLowerCase().indexOf(arg, i + highlit.length) + } + } + return output + } } diff --git a/tap-snapshots/test/lib/commands/search.js.test.cjs b/tap-snapshots/test/lib/commands/search.js.test.cjs index f1fa0363c8e68..f8dc5d94f4b21 100644 --- a/tap-snapshots/test/lib/commands/search.js.test.cjs +++ b/tap-snapshots/test/lib/commands/search.js.test.cjs @@ -932,6 +932,152 @@ Maintainers: lukekarrys https://npm.im/pkg-no-desc ` +exports[`test/lib/commands/search.js TAP search multiple terms --color > should have expected search results with color 1`] = ` +libnpm +Collection of programmatic APIs for the npm CLI +Version 3.0.1 published 2019-07-16 by isaacs +Maintainers: nlf ruyadorno darcyclarke isaacs +Keywords: npm api package manager lib +https://npm.im/libnpm +libnpmaccess +programmatic library for \`npm access\` commands +Version 4.0.1 published 2020-11-03 by nlf +Maintainers: nlf ruyadorno darcyclarke isaacs +Keywords: libnpmaccess +https://npm.im/libnpmaccess +@evocateur/libnpmaccess +programmatic library for \`npm access\` commands +Version 3.1.2 published 2019-07-16 by evocateur +Maintainers: evocateur +https://npm.im/@evocateur/libnpmaccess +@evocateur/libnpmpublish +Programmatic API for the bits behind npm publish and unpublish +Version 1.2.2 published 2019-07-16 by evocateur +Maintainers: evocateur +https://npm.im/@evocateur/libnpmpublish +libnpmorg +Programmatic api for \`npm org\` commands +Version 2.0.1 published 2020-11-03 by nlf +Maintainers: nlf ruyadorno darcyclarke isaacs +Keywords: libnpm npm package manager api orgs teams +https://npm.im/libnpmorg +libnpmsearch +Programmatic API for searching in npm and compatible registries. +Version 3.1.0 published 2020-12-08 by isaacs +Maintainers: nlf ruyadorno darcyclarke isaacs +Keywords: npm search api libnpm +https://npm.im/libnpmsearch +libnpmteam +npm Team management APIs +Version 2.0.2 published 2020-11-03 by nlf +Maintainers: nlf ruyadorno darcyclarke isaacs +https://npm.im/libnpmteam +libnpmpublish +Programmatic API for the bits behind npm publish and unpublish +Version 4.0.0 published 2020-11-03 by nlf +Maintainers: nlf ruyadorno darcyclarke isaacs +https://npm.im/libnpmpublish +libnpmfund +Programmatic API for npm fund +Version 1.0.2 published 2020-12-08 by isaacs +Maintainers: nlf ruyadorno darcyclarke isaacs +Keywords: npm npmcli libnpm cli git fund gitfund +https://npm.im/libnpmfund +@npmcli/map-workspaces +Retrieves a name:pathname Map for a given workspaces config +Version 1.0.1 published 2020-09-30 by ruyadorno +Maintainers: nlf ruyadorno darcyclarke isaacs +Keywords: npm bad map npmcli libnpm cli workspaces map-workspaces +https://npm.im/@npmcli/map-workspaces +libnpmversion +library to do the things that 'npm version' does +Version 1.0.7 published 2020-11-04 by isaacs +Maintainers: nlf ruyadorno darcyclarke isaacs +https://npm.im/libnpmversion +@types/libnpmsearch +TypeScript definitions for libnpmsearch +Version 2.0.1 published 2019-09-26 by types +Maintainers: types +https://npm.im/@types/libnpmsearch +pkg-no-desc +Version 1.0.0 published 2019-09-26 by lukekarrys +Maintainers: lukekarrys +https://npm.im/pkg-no-desc +` + +exports[`test/lib/commands/search.js TAP search multiple terms text > should have expected search results 1`] = ` +libnpm +Collection of programmatic APIs for the npm CLI +Version 3.0.1 published 2019-07-16 by isaacs +Maintainers: nlf ruyadorno darcyclarke isaacs +Keywords: npm api package manager lib +https://npm.im/libnpm +libnpmaccess +programmatic library for \`npm access\` commands +Version 4.0.1 published 2020-11-03 by nlf +Maintainers: nlf ruyadorno darcyclarke isaacs +Keywords: libnpmaccess +https://npm.im/libnpmaccess +@evocateur/libnpmaccess +programmatic library for \`npm access\` commands +Version 3.1.2 published 2019-07-16 by evocateur +Maintainers: evocateur +https://npm.im/@evocateur/libnpmaccess +@evocateur/libnpmpublish +Programmatic API for the bits behind npm publish and unpublish +Version 1.2.2 published 2019-07-16 by evocateur +Maintainers: evocateur +https://npm.im/@evocateur/libnpmpublish +libnpmorg +Programmatic api for \`npm org\` commands +Version 2.0.1 published 2020-11-03 by nlf +Maintainers: nlf ruyadorno darcyclarke isaacs +Keywords: libnpm npm package manager api orgs teams +https://npm.im/libnpmorg +libnpmsearch +Programmatic API for searching in npm and compatible registries. +Version 3.1.0 published 2020-12-08 by isaacs +Maintainers: nlf ruyadorno darcyclarke isaacs +Keywords: npm search api libnpm +https://npm.im/libnpmsearch +libnpmteam +npm Team management APIs +Version 2.0.2 published 2020-11-03 by nlf +Maintainers: nlf ruyadorno darcyclarke isaacs +https://npm.im/libnpmteam +libnpmpublish +Programmatic API for the bits behind npm publish and unpublish +Version 4.0.0 published 2020-11-03 by nlf +Maintainers: nlf ruyadorno darcyclarke isaacs +https://npm.im/libnpmpublish +libnpmfund +Programmatic API for npm fund +Version 1.0.2 published 2020-12-08 by isaacs +Maintainers: nlf ruyadorno darcyclarke isaacs +Keywords: npm npmcli libnpm cli git fund gitfund +https://npm.im/libnpmfund +@npmcli/map-workspaces +Retrieves a name:pathname Map for a given workspaces config +Version 1.0.1 published 2020-09-30 by ruyadorno +Maintainers: nlf ruyadorno darcyclarke isaacs +Keywords: npm bad map npmcli libnpm cli workspaces map-workspaces +https://npm.im/@npmcli/map-workspaces +libnpmversion +library to do the things that 'npm version' does +Version 1.0.7 published 2020-11-04 by isaacs +Maintainers: nlf ruyadorno darcyclarke isaacs +https://npm.im/libnpmversion +@types/libnpmsearch +TypeScript definitions for libnpmsearch +Version 2.0.1 published 2019-09-26 by types +Maintainers: types +https://npm.im/@types/libnpmsearch +pkg-no-desc +Version 1.0.0 published 2019-09-26 by lukekarrys +Maintainers: lukekarrys +https://npm.im/pkg-no-desc +` + exports[`test/lib/commands/search.js TAP search no publisher > should have filtered expected search results 1`] = ` custom-registry Version 1.0.0 published prehistoric by ??? diff --git a/test/lib/commands/search.js b/test/lib/commands/search.js index de4a58ca78a8f..97adffd8e1432 100644 --- a/test/lib/commands/search.js +++ b/test/lib/commands/search.js @@ -26,6 +26,18 @@ t.test('search', t => { t.matchSnapshot(joinedOutput(), 'should have expected search results') }) + t.test('multiple terms text', async t => { + const { npm, joinedOutput } = await loadMockNpm(t) + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + }) + + registry.search({ results: libnpmsearchResultFixture }) + await npm.exec('search', ['libnpm', 'publish']) + t.matchSnapshot(joinedOutput(), 'should have expected search results') + }) + t.test(' --json', async t => { const { npm, joinedOutput } = await loadMockNpm(t, { config: { json: true } }) const registry = new MockRegistry({ @@ -68,6 +80,18 @@ t.test('search', t => { t.matchSnapshot(joinedOutput(), 'should have expected search results with color') }) + t.test('multiple terms --color', async t => { + const { npm, joinedOutput } = await loadMockNpm(t, { config: { color: 'always' } }) + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + }) + + registry.search({ results: libnpmsearchResultFixture }) + await npm.exec('search', ['libnpm', 'publish']) + t.matchSnapshot(joinedOutput(), 'should have expected search results with color') + }) + t.test('//--color', async t => { const { npm, joinedOutput } = await loadMockNpm(t, { config: { color: 'always' } }) const registry = new MockRegistry({ From ab9ddc0413374fbf4879da535f82e03bc4e62cf3 Mon Sep 17 00:00:00 2001 From: Brian DeHamer Date: Fri, 20 Dec 2024 08:55:56 -0800 Subject: [PATCH 02/24] fix(sbom): deduplicate sbom dependencies (#7992) Certain project dependency trees may result in an SBOM with duplicate entries. This fix ensures that each unique dependency (identified by the combination of package name and version) only appears in the SBOM once. Applies to both SPDX and CycloneDX SBOM formats. Specific to the CycloneDX format, this change also removes the `cdx:npm:package:path` property from the `component` entries in the generated SBOM. Since the same package may be present at multiple paths within the project and we're now de-duplicating those packages, it no longer makes sense to include this in the SBOM. This does not impact the SPDX format as there is no equivalent property. Fixes: #6967 Signed-off-by: Brian DeHamer --- lib/utils/sbom-cyclonedx.js | 29 +- lib/utils/sbom-spdx.js | 12 +- .../test/lib/commands/sbom.js.test.cjs | 274 ++++++++++++++++-- .../test/lib/utils/sbom-cyclonedx.js.test.cjs | 202 +++++-------- .../test/lib/utils/sbom-spdx.js.test.cjs | 89 ++++++ test/lib/commands/sbom.js | 91 ++++++ test/lib/utils/sbom-cyclonedx.js | 12 + test/lib/utils/sbom-spdx.js | 11 + 8 files changed, 554 insertions(+), 166 deletions(-) diff --git a/lib/utils/sbom-cyclonedx.js b/lib/utils/sbom-cyclonedx.js index f3bab28000953..e09d2486e21c4 100644 --- a/lib/utils/sbom-cyclonedx.js +++ b/lib/utils/sbom-cyclonedx.js @@ -8,7 +8,6 @@ const CYCLONEDX_SCHEMA = 'http://cyclonedx.org/schema/bom-1.5.schema.json' const CYCLONEDX_FORMAT = 'CycloneDX' const CYCLONEDX_SCHEMA_VERSION = '1.5' -const PROP_PATH = 'cdx:npm:package:path' const PROP_BUNDLED = 'cdx:npm:package:bundled' const PROP_DEVELOPMENT = 'cdx:npm:package:development' const PROP_EXTRANEOUS = 'cdx:npm:package:extraneous' @@ -31,19 +30,18 @@ const cyclonedxOutput = ({ npm, nodes, packageType, packageLockOnly }) => { const childNodes = nodes.filter(node => !node.isRoot && !node.isLink) const uuid = crypto.randomUUID() - const deps = [] - const seen = new Set() - for (let node of nodes) { - if (node.isLink) { - node = node.target + // Create list of child nodes w/ unique IDs + const childNodeMap = new Map() + for (const item of childNodes) { + const id = toCyclonedxID(item) + if (!childNodeMap.has(id)) { + childNodeMap.set(id, item) } - - if (seen.has(node)) { - continue - } - seen.add(node) - deps.push(toCyclonedxDependency(node, nodes)) } + const uniqueChildNodes = Array.from(childNodeMap.values()) + + const deps = [rootNode, ...uniqueChildNodes] + .map(node => toCyclonedxDependency(node, nodes)) const bom = { $schema: CYCLONEDX_SCHEMA, @@ -65,7 +63,7 @@ const cyclonedxOutput = ({ npm, nodes, packageType, packageLockOnly }) => { ], component: toCyclonedxItem(rootNode, { packageType }), }, - components: childNodes.map(toCyclonedxItem), + components: uniqueChildNodes.map(toCyclonedxItem), dependencies: deps, } @@ -109,10 +107,7 @@ const toCyclonedxItem = (node, { packageType }) => { : (node.package?.author || undefined), description: node.package?.description || undefined, purl: purl, - properties: [{ - name: PROP_PATH, - value: node.location, - }], + properties: [], externalReferences: [], } diff --git a/lib/utils/sbom-spdx.js b/lib/utils/sbom-spdx.js index 16aed18656764..7f6ce0580ed41 100644 --- a/lib/utils/sbom-spdx.js +++ b/lib/utils/sbom-spdx.js @@ -26,6 +26,16 @@ const spdxOutput = ({ npm, nodes, packageType }) => { const uuid = crypto.randomUUID() const ns = `http://spdx.org/spdxdocs/${npa(rootID).escapedName}-${rootNode.version}-${uuid}` + // Create list of child nodes w/ unique IDs + const childNodeMap = new Map() + for (const item of childNodes) { + const id = toSpdxID(item) + if (!childNodeMap.has(id)) { + childNodeMap.set(id, item) + } + } + const uniqueChildNodes = Array.from(childNodeMap.values()) + const relationships = [] const seen = new Set() for (let node of nodes) { @@ -65,7 +75,7 @@ const spdxOutput = ({ npm, nodes, packageType }) => { ], }, documentDescribes: [toSpdxID(rootNode)], - packages: [toSpdxItem(rootNode, { packageType }), ...childNodes.map(toSpdxItem)], + packages: [toSpdxItem(rootNode, { packageType }), ...uniqueChildNodes.map(toSpdxItem)], relationships: [ { spdxElementId: SPDX_IDENTIFER, diff --git a/tap-snapshots/test/lib/commands/sbom.js.test.cjs b/tap-snapshots/test/lib/commands/sbom.js.test.cjs index 826cf074e6038..5b2e93a3df6d6 100644 --- a/tap-snapshots/test/lib/commands/sbom.js.test.cjs +++ b/tap-snapshots/test/lib/commands/sbom.js.test.cjs @@ -259,12 +259,7 @@ exports[`test/lib/commands/sbom.js TAP sbom basic sbom - cyclonedx > must match "version": "1.0.0", "scope": "required", "purl": "pkg:npm/test-npm-sbom@1.0.0", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "" - } - ], + "properties": [], "externalReferences": [] } }, @@ -276,12 +271,7 @@ exports[`test/lib/commands/sbom.js TAP sbom basic sbom - cyclonedx > must match "version": "1.0.0", "scope": "required", "purl": "pkg:npm/chai@1.0.0", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "node_modules/chai" - } - ], + "properties": [], "externalReferences": [] }, { @@ -291,12 +281,7 @@ exports[`test/lib/commands/sbom.js TAP sbom basic sbom - cyclonedx > must match "version": "1.0.0", "scope": "required", "purl": "pkg:npm/foo@1.0.0", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "node_modules/foo" - } - ], + "properties": [], "externalReferences": [] }, { @@ -306,12 +291,7 @@ exports[`test/lib/commands/sbom.js TAP sbom basic sbom - cyclonedx > must match "version": "1.0.0", "scope": "required", "purl": "pkg:npm/dog@1.0.0", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "node_modules/foo/node_modules/dog" - } - ], + "properties": [], "externalReferences": [] } ], @@ -453,6 +433,252 @@ exports[`test/lib/commands/sbom.js TAP sbom basic sbom - spdx > must match snaps } ` +exports[`test/lib/commands/sbom.js TAP sbom duplicate deps - cyclonedx > must match snapshot 1`] = ` +{ + "$schema": "http://cyclonedx.org/schema/bom-1.5.schema.json", + "bomFormat": "CycloneDX", + "specVersion": "1.5", + "serialNumber": "urn:uuid:00000000-0000-0000-0000-000000000000", + "version": 1, + "metadata": { + "timestamp": "2020-01-01T00:00:00.000Z", + "lifecycles": [ + { + "phase": "build" + } + ], + "tools": [ + { + "vendor": "npm", + "name": "cli", + "version": "10.0.0" + } + ], + "component": { + "bom-ref": "test-npm-sbom@1.0.0", + "type": "library", + "name": "prefix", + "version": "1.0.0", + "scope": "required", + "purl": "pkg:npm/test-npm-sbom@1.0.0", + "properties": [], + "externalReferences": [] + } + }, + "components": [ + { + "bom-ref": "bar@1.0.0", + "type": "library", + "name": "bar", + "version": "1.0.0", + "scope": "required", + "purl": "pkg:npm/bar@1.0.0", + "properties": [], + "externalReferences": [] + }, + { + "bom-ref": "chai@1.0.0", + "type": "library", + "name": "chai", + "version": "1.0.0", + "scope": "required", + "purl": "pkg:npm/chai@1.0.0", + "properties": [], + "externalReferences": [] + }, + { + "bom-ref": "chai@2.0.0", + "type": "library", + "name": "chai", + "version": "2.0.0", + "scope": "required", + "purl": "pkg:npm/chai@2.0.0", + "properties": [], + "externalReferences": [] + }, + { + "bom-ref": "foo@1.0.0", + "type": "library", + "name": "foo", + "version": "1.0.0", + "scope": "required", + "purl": "pkg:npm/foo@1.0.0", + "properties": [], + "externalReferences": [] + } + ], + "dependencies": [ + { + "ref": "test-npm-sbom@1.0.0", + "dependsOn": [ + "foo@1.0.0", + "bar@1.0.0", + "chai@2.0.0" + ] + }, + { + "ref": "bar@1.0.0", + "dependsOn": [ + "chai@1.0.0" + ] + }, + { + "ref": "chai@1.0.0", + "dependsOn": [] + }, + { + "ref": "chai@2.0.0", + "dependsOn": [] + }, + { + "ref": "foo@1.0.0", + "dependsOn": [ + "chai@1.0.0" + ] + } + ] +} +` + +exports[`test/lib/commands/sbom.js TAP sbom duplicate deps - spdx > must match snapshot 1`] = ` +{ + "spdxVersion": "SPDX-2.3", + "dataLicense": "CC0-1.0", + "SPDXID": "SPDXRef-DOCUMENT", + "name": "test-npm-sbom@1.0.0", + "documentNamespace": "http://spdx.org/spdxdocs/test-npm-sbom-1.0.0-00000000-0000-0000-0000-000000000000", + "creationInfo": { + "created": "2020-01-01T00:00:00.000Z", + "creators": [ + "Tool: npm/cli-10.0.0" + ] + }, + "documentDescribes": [ + "SPDXRef-Package-test-npm-sbom-1.0.0" + ], + "packages": [ + { + "name": "test-npm-sbom", + "SPDXID": "SPDXRef-Package-test-npm-sbom-1.0.0", + "versionInfo": "1.0.0", + "packageFileName": "", + "primaryPackagePurpose": "LIBRARY", + "downloadLocation": "NOASSERTION", + "filesAnalyzed": false, + "homepage": "NOASSERTION", + "licenseDeclared": "NOASSERTION", + "externalRefs": [ + { + "referenceCategory": "PACKAGE-MANAGER", + "referenceType": "purl", + "referenceLocator": "pkg:npm/test-npm-sbom@1.0.0" + } + ] + }, + { + "name": "bar", + "SPDXID": "SPDXRef-Package-bar-1.0.0", + "versionInfo": "1.0.0", + "packageFileName": "node_modules/bar", + "downloadLocation": "NOASSERTION", + "filesAnalyzed": false, + "homepage": "NOASSERTION", + "licenseDeclared": "NOASSERTION", + "externalRefs": [ + { + "referenceCategory": "PACKAGE-MANAGER", + "referenceType": "purl", + "referenceLocator": "pkg:npm/bar@1.0.0" + } + ] + }, + { + "name": "chai", + "SPDXID": "SPDXRef-Package-chai-1.0.0", + "versionInfo": "1.0.0", + "packageFileName": "node_modules/bar/node_modules/chai", + "downloadLocation": "NOASSERTION", + "filesAnalyzed": false, + "homepage": "NOASSERTION", + "licenseDeclared": "NOASSERTION", + "externalRefs": [ + { + "referenceCategory": "PACKAGE-MANAGER", + "referenceType": "purl", + "referenceLocator": "pkg:npm/chai@1.0.0" + } + ] + }, + { + "name": "chai", + "SPDXID": "SPDXRef-Package-chai-2.0.0", + "versionInfo": "2.0.0", + "packageFileName": "node_modules/chai", + "downloadLocation": "NOASSERTION", + "filesAnalyzed": false, + "homepage": "NOASSERTION", + "licenseDeclared": "NOASSERTION", + "externalRefs": [ + { + "referenceCategory": "PACKAGE-MANAGER", + "referenceType": "purl", + "referenceLocator": "pkg:npm/chai@2.0.0" + } + ] + }, + { + "name": "foo", + "SPDXID": "SPDXRef-Package-foo-1.0.0", + "versionInfo": "1.0.0", + "packageFileName": "node_modules/foo", + "downloadLocation": "NOASSERTION", + "filesAnalyzed": false, + "homepage": "NOASSERTION", + "licenseDeclared": "NOASSERTION", + "externalRefs": [ + { + "referenceCategory": "PACKAGE-MANAGER", + "referenceType": "purl", + "referenceLocator": "pkg:npm/foo@1.0.0" + } + ] + } + ], + "relationships": [ + { + "spdxElementId": "SPDXRef-DOCUMENT", + "relatedSpdxElement": "SPDXRef-Package-test-npm-sbom-1.0.0", + "relationshipType": "DESCRIBES" + }, + { + "spdxElementId": "SPDXRef-Package-foo-1.0.0", + "relatedSpdxElement": "SPDXRef-Package-test-npm-sbom-1.0.0", + "relationshipType": "DEPENDENCY_OF" + }, + { + "spdxElementId": "SPDXRef-Package-bar-1.0.0", + "relatedSpdxElement": "SPDXRef-Package-test-npm-sbom-1.0.0", + "relationshipType": "DEPENDENCY_OF" + }, + { + "spdxElementId": "SPDXRef-Package-chai-2.0.0", + "relatedSpdxElement": "SPDXRef-Package-test-npm-sbom-1.0.0", + "relationshipType": "DEPENDENCY_OF" + }, + { + "spdxElementId": "SPDXRef-Package-chai-1.0.0", + "relatedSpdxElement": "SPDXRef-Package-bar-1.0.0", + "relationshipType": "DEPENDENCY_OF" + }, + { + "spdxElementId": "SPDXRef-Package-chai-1.0.0", + "relatedSpdxElement": "SPDXRef-Package-foo-1.0.0", + "relationshipType": "DEPENDENCY_OF" + } + ] +} +` + exports[`test/lib/commands/sbom.js TAP sbom extraneous dep > must match snapshot 1`] = ` { "spdxVersion": "SPDX-2.3", diff --git a/tap-snapshots/test/lib/utils/sbom-cyclonedx.js.test.cjs b/tap-snapshots/test/lib/utils/sbom-cyclonedx.js.test.cjs index 7a8d79017f36a..2f0af32f7f501 100644 --- a/tap-snapshots/test/lib/utils/sbom-cyclonedx.js.test.cjs +++ b/tap-snapshots/test/lib/utils/sbom-cyclonedx.js.test.cjs @@ -34,12 +34,7 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP node - with deps > must match snap "scope": "required", "author": "Author", "purl": "pkg:npm/root@1.0.0", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "" - } - ], + "properties": [], "externalReferences": [] } }, @@ -51,12 +46,7 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP node - with deps > must match snap "version": "0.0.1", "scope": "required", "purl": "pkg:npm/dep1@0.0.1", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "node_modules/dep1" - } - ], + "properties": [], "externalReferences": [] }, { @@ -66,12 +56,7 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP node - with deps > must match snap "version": "0.0.2", "scope": "required", "purl": "pkg:npm/dep2@0.0.2", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "node_modules/dep2" - } - ], + "properties": [], "externalReferences": [] } ], @@ -97,6 +82,66 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP node - with deps > must match snap } ` +exports[`test/lib/utils/sbom-cyclonedx.js TAP node - with duplicate deps > must match snapshot 1`] = ` +{ + "$schema": "http://cyclonedx.org/schema/bom-1.5.schema.json", + "bomFormat": "CycloneDX", + "specVersion": "1.5", + "serialNumber": "urn:uuid:00000000-0000-0000-0000-000000000000", + "version": 1, + "metadata": { + "timestamp": "2020-01-01T00:00:00.000Z", + "lifecycles": [ + { + "phase": "build" + } + ], + "tools": [ + { + "vendor": "npm", + "name": "cli", + "version": "10.0.0 " + } + ], + "component": { + "bom-ref": "root@1.0.0", + "type": "library", + "name": "root", + "version": "1.0.0", + "scope": "required", + "author": "Author", + "purl": "pkg:npm/root@1.0.0", + "properties": [], + "externalReferences": [] + } + }, + "components": [ + { + "bom-ref": "dep1@0.0.1", + "type": "library", + "name": "dep1", + "version": "0.0.1", + "scope": "required", + "purl": "pkg:npm/dep1@0.0.1", + "properties": [], + "externalReferences": [] + } + ], + "dependencies": [ + { + "ref": "root@1.0.0", + "dependsOn": [ + "dep1@0.0.1" + ] + }, + { + "ref": "dep1@0.0.1", + "dependsOn": [] + } + ] +} +` + exports[`test/lib/utils/sbom-cyclonedx.js TAP single node - application package type > must match snapshot 1`] = ` { "$schema": "http://cyclonedx.org/schema/bom-1.5.schema.json", @@ -126,12 +171,7 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP single node - application package "scope": "required", "author": "Author", "purl": "pkg:npm/root@1.0.0", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "" - } - ], + "properties": [], "externalReferences": [] } }, @@ -175,10 +215,6 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP single node - bundled > must match "author": "Author", "purl": "pkg:npm/root@1.0.0", "properties": [ - { - "name": "cdx:npm:package:path", - "value": "" - }, { "name": "cdx:npm:package:bundled", "value": "true" @@ -227,10 +263,6 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP single node - development > must m "author": "Author", "purl": "pkg:npm/root@1.0.0", "properties": [ - { - "name": "cdx:npm:package:path", - "value": "" - }, { "name": "cdx:npm:package:development", "value": "true" @@ -279,10 +311,6 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP single node - extraneous > must ma "author": "Author", "purl": "pkg:npm/root@1.0.0", "properties": [ - { - "name": "cdx:npm:package:path", - "value": "" - }, { "name": "cdx:npm:package:extraneous", "value": "true" @@ -330,12 +358,7 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP single node - from git url > must "scope": "required", "author": "Author", "purl": "pkg:npm/root@1.0.0?vcs_url=https://github.com/foo/bar#1234", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "" - } - ], + "properties": [], "externalReferences": [ { "type": "distribution", @@ -382,12 +405,7 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP single node - no package info > mu "version": "1.0.0", "scope": "required", "purl": "pkg:npm/root@1.0.0", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "" - } - ], + "properties": [], "externalReferences": [] } }, @@ -430,12 +448,7 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP single node - optional > must matc "scope": "optional", "author": "Author", "purl": "pkg:npm/root@1.0.0", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "" - } - ], + "properties": [], "externalReferences": [] } }, @@ -478,12 +491,7 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP single node - package lock only > "scope": "required", "author": "Author", "purl": "pkg:npm/root@1.0.0", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "" - } - ], + "properties": [], "externalReferences": [] } }, @@ -527,10 +535,6 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP single node - private > must match "author": "Author", "purl": "pkg:npm/root@1.0.0", "properties": [ - { - "name": "cdx:npm:package:path", - "value": "" - }, { "name": "cdx:npm:package:private", "value": "true" @@ -578,12 +582,7 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP single node - with author object > "scope": "required", "author": "Arthur", "purl": "pkg:npm/root@1.0.0", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "" - } - ], + "properties": [], "externalReferences": [] } }, @@ -627,12 +626,7 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP single node - with description > m "author": "Author", "description": "Package description", "purl": "pkg:npm/root@1.0.0", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "" - } - ], + "properties": [], "externalReferences": [] } }, @@ -675,12 +669,7 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP single node - with distribution ur "scope": "required", "author": "Author", "purl": "pkg:npm/root@1.0.0", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "" - } - ], + "properties": [], "externalReferences": [ { "type": "distribution", @@ -728,12 +717,7 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP single node - with homepage > must "scope": "required", "author": "Author", "purl": "pkg:npm/root@1.0.0", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "" - } - ], + "properties": [], "externalReferences": [ { "type": "website", @@ -781,12 +765,7 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP single node - with integrity > mus "scope": "required", "author": "Author", "purl": "pkg:npm/root@1.0.0", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "" - } - ], + "properties": [], "externalReferences": [], "hashes": [ { @@ -835,12 +814,7 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP single node - with issue tracker > "scope": "required", "author": "Author", "purl": "pkg:npm/root@1.0.0", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "" - } - ], + "properties": [], "externalReferences": [ { "type": "issue-tracker", @@ -888,12 +862,7 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP single node - with license express "scope": "required", "author": "Author", "purl": "pkg:npm/root@1.0.0", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "" - } - ], + "properties": [], "externalReferences": [], "licenses": [ { @@ -941,12 +910,7 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP single node - with license object "scope": "required", "author": "Author", "purl": "pkg:npm/root@1.0.0", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "" - } - ], + "properties": [], "externalReferences": [], "licenses": [ { @@ -996,12 +960,7 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP single node - with repository url "scope": "required", "author": "Author", "purl": "pkg:npm/root@1.0.0", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "" - } - ], + "properties": [], "externalReferences": [ { "type": "vcs", @@ -1049,12 +1008,7 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP single node - with single license "scope": "required", "author": "Author", "purl": "pkg:npm/root@1.0.0", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "" - } - ], + "properties": [], "externalReferences": [], "licenses": [ { diff --git a/tap-snapshots/test/lib/utils/sbom-spdx.js.test.cjs b/tap-snapshots/test/lib/utils/sbom-spdx.js.test.cjs index b887e13ca7dc0..3583c0bc83577 100644 --- a/tap-snapshots/test/lib/utils/sbom-spdx.js.test.cjs +++ b/tap-snapshots/test/lib/utils/sbom-spdx.js.test.cjs @@ -182,6 +182,95 @@ exports[`test/lib/utils/sbom-spdx.js TAP node - with deps > must match snapshot } ` +exports[`test/lib/utils/sbom-spdx.js TAP node - with duplicate deps > must match snapshot 1`] = ` +{ + "spdxVersion": "SPDX-2.3", + "dataLicense": "CC0-1.0", + "SPDXID": "SPDXRef-DOCUMENT", + "name": "root@1.0.0", + "documentNamespace": "docns", + "creationInfo": { + "created": "2020-01-01T00:00:00.000Z", + "creators": [ + "Tool: npm/cli-10.0.0 " + ] + }, + "documentDescribes": [ + "SPDXRef-Package-root-1.0.0" + ], + "packages": [ + { + "name": "root", + "SPDXID": "SPDXRef-Package-root-1.0.0", + "versionInfo": "1.0.0", + "packageFileName": "", + "downloadLocation": "NOASSERTION", + "filesAnalyzed": false, + "homepage": "NOASSERTION", + "licenseDeclared": "NOASSERTION", + "externalRefs": [ + { + "referenceCategory": "PACKAGE-MANAGER", + "referenceType": "purl", + "referenceLocator": "pkg:npm/root@1.0.0" + } + ] + }, + { + "name": "dep1", + "SPDXID": "SPDXRef-Package-dep1-0.0.1", + "versionInfo": "0.0.1", + "packageFileName": "node_modules/dep1", + "downloadLocation": "NOASSERTION", + "filesAnalyzed": false, + "homepage": "NOASSERTION", + "licenseDeclared": "NOASSERTION", + "externalRefs": [ + { + "referenceCategory": "PACKAGE-MANAGER", + "referenceType": "purl", + "referenceLocator": "pkg:npm/dep1@0.0.1" + } + ] + }, + { + "name": "dep2", + "SPDXID": "SPDXRef-Package-dep2-0.0.2", + "versionInfo": "0.0.2", + "packageFileName": "node_modules/dep2", + "downloadLocation": "NOASSERTION", + "filesAnalyzed": false, + "homepage": "NOASSERTION", + "licenseDeclared": "NOASSERTION", + "externalRefs": [ + { + "referenceCategory": "PACKAGE-MANAGER", + "referenceType": "purl", + "referenceLocator": "pkg:npm/dep2@0.0.2" + } + ] + } + ], + "relationships": [ + { + "spdxElementId": "SPDXRef-DOCUMENT", + "relatedSpdxElement": "SPDXRef-Package-root-1.0.0", + "relationshipType": "DESCRIBES" + }, + { + "spdxElementId": "SPDXRef-Package-dep1-0.0.1", + "relatedSpdxElement": "SPDXRef-Package-root-1.0.0", + "relationshipType": "DEPENDENCY_OF" + }, + { + "spdxElementId": "SPDXRef-Package-dep2-0.0.2", + "relatedSpdxElement": "SPDXRef-Package-root-1.0.0", + "relationshipType": "DEPENDENCY_OF" + } + ] +} +` + exports[`test/lib/utils/sbom-spdx.js TAP single node - application package type > must match snapshot 1`] = ` { "spdxVersion": "SPDX-2.3", diff --git a/test/lib/commands/sbom.js b/test/lib/commands/sbom.js index 25f6135ef8a14..c08756414d25e 100644 --- a/test/lib/commands/sbom.js +++ b/test/lib/commands/sbom.js @@ -205,6 +205,97 @@ t.test('sbom', async t => { t.matchSnapshot(result()) }) + const dupDepsNmFixture = { + node_modules: { + foo: { + 'package.json': JSON.stringify({ + name: 'foo', + version: '1.0.0', + dependencies: { + chai: '^1.0.0', + }, + }), + node_modules: { + chai: { + 'package.json': JSON.stringify({ + name: 'chai', + version: '1.0.0', + }), + }, + }, + }, + bar: { + 'package.json': JSON.stringify({ + name: 'bar', + version: '1.0.0', + dependencies: { + chai: '^1.0.0', + }, + }), + node_modules: { + chai: { + 'package.json': JSON.stringify({ + name: 'chai', + version: '1.0.0', + }), + }, + }, + }, + chai: { + 'package.json': JSON.stringify({ + name: 'chai', + version: '2.0.0', + }), + }, + }, + } + + t.test('duplicate deps - spdx', async t => { + const config = { + 'sbom-format': 'spdx', + } + const { result, sbom } = await mockSbom(t, { + config, + prefixDir: { + 'package.json': JSON.stringify({ + name: 'test-npm-sbom', + version: '1.0.0', + dependencies: { + foo: '^1.0.0', + bar: '^1.0.0', + chai: '^2.0.0', + }, + }), + ...dupDepsNmFixture, + }, + }) + await sbom.exec([]) + t.matchSnapshot(result()) + }) + + t.test('duplicate deps - cyclonedx', async t => { + const config = { + 'sbom-format': 'cyclonedx', + } + const { result, sbom } = await mockSbom(t, { + config, + prefixDir: { + 'package.json': JSON.stringify({ + name: 'test-npm-sbom', + version: '1.0.0', + dependencies: { + foo: '^1.0.0', + bar: '^1.0.0', + chai: '^2.0.0', + }, + }), + ...dupDepsNmFixture, + }, + }) + await sbom.exec([]) + t.matchSnapshot(result()) + }) + t.test('missing format', async t => { const config = {} const { result, sbom } = await mockSbom(t, { diff --git a/test/lib/utils/sbom-cyclonedx.js b/test/lib/utils/sbom-cyclonedx.js index da9b3f757988b..42819b8a77431 100644 --- a/test/lib/utils/sbom-cyclonedx.js +++ b/test/lib/utils/sbom-cyclonedx.js @@ -233,6 +233,18 @@ t.test('node - with deps', t => { t.end() }) +t.test('node - with duplicate deps', t => { + const node = { + ...root, + edgesOut: [ + { to: dep1 }, + ], + } + const res = cyclonedxOutput({ npm, nodes: [node, dep1, dep1] }) + t.matchSnapshot(JSON.stringify(res)) + t.end() +}) + // Check that all of the generated test snapshots validate against the CycloneDX schema t.test('schema validation', t => { // Load schemas diff --git a/test/lib/utils/sbom-spdx.js b/test/lib/utils/sbom-spdx.js index d69e85667dc85..ffa92f0e3a30f 100644 --- a/test/lib/utils/sbom-spdx.js +++ b/test/lib/utils/sbom-spdx.js @@ -199,6 +199,17 @@ t.test('node - with deps', t => { t.end() }) +t.test('node - with duplicate deps', t => { + const node = { ...root, + edgesOut: [ + { to: dep1 }, + { to: dep2 }, + ] } + const res = spdxOutput({ npm, nodes: [node, dep1, dep2, dep1, dep2] }) + t.matchSnapshot(JSON.stringify(res)) + t.end() +}) + // Check that all of the generated test snapshots validate against the SPDX schema t.test('schema validation', t => { const ajv = new Ajv() From 1764a37f1913b6a0811a85d89e029fc1dc79da54 Mon Sep 17 00:00:00 2001 From: Gar Date: Fri, 3 Jan 2025 10:05:44 -0800 Subject: [PATCH 03/24] feat: add npm undeprecate command --- docs/lib/check-nav.js | 6 +- docs/lib/content/commands/npm-undeprecate.md | 24 +++++++ docs/lib/content/nav.yml | 3 + lib/commands/undeprecate.js | 13 ++++ lib/utils/cmd-list.js | 1 + .../tap-snapshots/test/index.js.test.cjs | 3 +- .../test/lib/commands/completion.js.test.cjs | 1 + .../test/lib/commands/publish.js.test.cjs | 1 + tap-snapshots/test/lib/docs.js.test.cjs | 26 ++++++- tap-snapshots/test/lib/npm.js.test.cjs | 52 ++++++++------ test/lib/commands/undeprecate.js | 72 +++++++++++++++++++ 11 files changed, 175 insertions(+), 27 deletions(-) create mode 100644 docs/lib/content/commands/npm-undeprecate.md create mode 100644 lib/commands/undeprecate.js create mode 100644 test/lib/commands/undeprecate.js diff --git a/docs/lib/check-nav.js b/docs/lib/check-nav.js index ac2c01038f438..0f9b3529c7546 100644 --- a/docs/lib/check-nav.js +++ b/docs/lib/check-nav.js @@ -29,17 +29,17 @@ function ensureNavigationComplete (nav, fsPaths, ext) { const errors = [] if (missingNav.length) { - errors.push('The following path(s) exist on disk but are not present in nav.yml:') + errors.push('The following path(s) exist on disk but are not present in /lib/content/nav.yml:') errors.push(...missingNav.map(n => ` ${n}`)) } if (missingFs.length) { - errors.push('The following path(s) exist in nav.yml but are not present on disk:') + errors.push('The following path(s) exist in lib/content/nav.yml but are not present on disk:') errors.push(...missingFs.map(n => ` ${n}`)) } if (errors.length) { - errors.unshift('Documentation navigation (nav.yml) does not match filesystem.') + errors.unshift('Documentation navigation (lib/content/nav.yml) does not match filesystem.') errors.push('Update nav.yml to ensure that all files are listed in the appropriate place.') throw new Error(errors.join('\n')) } diff --git a/docs/lib/content/commands/npm-undeprecate.md b/docs/lib/content/commands/npm-undeprecate.md new file mode 100644 index 0000000000000..076ac9eff2d0a --- /dev/null +++ b/docs/lib/content/commands/npm-undeprecate.md @@ -0,0 +1,24 @@ +--- +title: npm-undeprecate +section: 1 +description: Undeprecate a version of a package +--- + +### Synopsis + + + +### Description + +This command will update the npm registry entry for a package, removing any +deprecation warnings that currently exist. + +It works in the same way as [npm deprecate](/commands/npm-deprecate), except +that this command removes deprecation warnings instead of adding them. + +### Configuration + + +### See Also + +* [npm deprecate](/commands/npm-deprecate) diff --git a/docs/lib/content/nav.yml b/docs/lib/content/nav.yml index 96c89e5cc1b71..4148c4533efcb 100644 --- a/docs/lib/content/nav.yml +++ b/docs/lib/content/nav.yml @@ -177,6 +177,9 @@ - title: npm token url: /commands/npm-token description: Manage your authentication tokens + - title: npm undeprecate + url: /commands/npm-undeprecate + description: Undeprecate a version of a package - title: npm uninstall url: /commands/npm-uninstall description: Remove a package diff --git a/lib/commands/undeprecate.js b/lib/commands/undeprecate.js new file mode 100644 index 0000000000000..79ce66bbe5600 --- /dev/null +++ b/lib/commands/undeprecate.js @@ -0,0 +1,13 @@ +const Deprecate = require('./deprecate.js') + +class Undeprecate extends Deprecate { + static description = 'Undeprecate a version of a package' + static name = 'undeprecate' + static usage = [''] + + async exec ([pkg]) { + return super.exec([pkg, '']) + } +} + +module.exports = Undeprecate diff --git a/lib/utils/cmd-list.js b/lib/utils/cmd-list.js index 039d6ffddeb16..96eb0974a2ed3 100644 --- a/lib/utils/cmd-list.js +++ b/lib/utils/cmd-list.js @@ -62,6 +62,7 @@ const commands = [ 'team', 'test', 'token', + 'undeprecate', 'uninstall', 'unpublish', 'unstar', diff --git a/smoke-tests/tap-snapshots/test/index.js.test.cjs b/smoke-tests/tap-snapshots/test/index.js.test.cjs index 1de04263b4942..c04e01166f7cb 100644 --- a/smoke-tests/tap-snapshots/test/index.js.test.cjs +++ b/smoke-tests/tap-snapshots/test/index.js.test.cjs @@ -29,7 +29,8 @@ All commands: ping, pkg, prefix, profile, prune, publish, query, rebuild, repo, restart, root, run-script, sbom, search, set, shrinkwrap, star, stars, start, stop, team, test, token, - uninstall, unpublish, unstar, update, version, view, whoami + undeprecate, uninstall, unpublish, unstar, update, version, + view, whoami Specify configs in the ini-formatted file: {NPM}/{TESTDIR}/home/.npmrc diff --git a/tap-snapshots/test/lib/commands/completion.js.test.cjs b/tap-snapshots/test/lib/commands/completion.js.test.cjs index 9b6f1ba51c787..a281883539f61 100644 --- a/tap-snapshots/test/lib/commands/completion.js.test.cjs +++ b/tap-snapshots/test/lib/commands/completion.js.test.cjs @@ -100,6 +100,7 @@ Array [ team test token + undeprecate uninstall unpublish unstar diff --git a/tap-snapshots/test/lib/commands/publish.js.test.cjs b/tap-snapshots/test/lib/commands/publish.js.test.cjs index c0dc06b568180..1599f1dd5c394 100644 --- a/tap-snapshots/test/lib/commands/publish.js.test.cjs +++ b/tap-snapshots/test/lib/commands/publish.js.test.cjs @@ -208,6 +208,7 @@ Object { "man/man1/npm-team.1", "man/man1/npm-test.1", "man/man1/npm-token.1", + "man/man1/npm-undeprecate.1", "man/man1/npm-uninstall.1", "man/man1/npm-unpublish.1", "man/man1/npm-unstar.1", diff --git a/tap-snapshots/test/lib/docs.js.test.cjs b/tap-snapshots/test/lib/docs.js.test.cjs index 0ebee0d7ae896..baceb5dcd3e3c 100644 --- a/tap-snapshots/test/lib/docs.js.test.cjs +++ b/tap-snapshots/test/lib/docs.js.test.cjs @@ -155,6 +155,7 @@ Array [ "team", "test", "token", + "undeprecate", "uninstall", "unpublish", "unstar", @@ -2850,7 +2851,7 @@ Usage: npm deprecate Options: -[--registry ] [--otp ] +[--registry ] [--otp ] [--dry-run] Run "npm help deprecate" for more info @@ -2862,6 +2863,7 @@ Note: This command is unaware of workspaces. #### \`registry\` #### \`otp\` +#### \`dry-run\` ` exports[`test/lib/docs.js TAP usage diff > must match snapshot 1`] = ` @@ -4274,6 +4276,28 @@ Note: This command is unaware of workspaces. #### \`otp\` ` +exports[`test/lib/docs.js TAP usage undeprecate > must match snapshot 1`] = ` +Undeprecate a version of a package + +Usage: +npm undeprecate + +Options: +[--registry ] [--otp ] [--dry-run] + +Run "npm help undeprecate" for more info + +\`\`\`bash +npm undeprecate +\`\`\` + +Note: This command is unaware of workspaces. + +#### \`registry\` +#### \`otp\` +#### \`dry-run\` +` + exports[`test/lib/docs.js TAP usage uninstall > must match snapshot 1`] = ` Remove a package diff --git a/tap-snapshots/test/lib/npm.js.test.cjs b/tap-snapshots/test/lib/npm.js.test.cjs index 0864ffe37d297..88597c2fd15f6 100644 --- a/tap-snapshots/test/lib/npm.js.test.cjs +++ b/tap-snapshots/test/lib/npm.js.test.cjs @@ -39,7 +39,8 @@ All commands: ping, pkg, prefix, profile, prune, publish, query, rebuild, repo, restart, root, run-script, sbom, search, set, shrinkwrap, star, stars, start, stop, team, test, token, - uninstall, unpublish, unstar, update, version, view, whoami + undeprecate, uninstall, unpublish, unstar, update, version, + view, whoami Specify configs in the ini-formatted file: {USERCONFIG} @@ -89,9 +90,10 @@ All commands: search, set, shrinkwrap, star, stars, start, stop, team, test, token, - uninstall, unpublish, - unstar, update, version, - view, whoami + undeprecate, uninstall, + unpublish, unstar, + update, version, view, + whoami Specify configs in the ini-formatted file: {USERCONFIG} @@ -141,9 +143,10 @@ All commands: search, set, shrinkwrap, star, stars, start, stop, team, test, token, - uninstall, unpublish, - unstar, update, version, - view, whoami + undeprecate, uninstall, + unpublish, unstar, + update, version, view, + whoami Specify configs in the ini-formatted file: {USERCONFIG} @@ -179,7 +182,8 @@ All commands: ping, pkg, prefix, profile, prune, publish, query, rebuild, repo, restart, root, run-script, sbom, search, set, shrinkwrap, star, stars, start, stop, team, test, token, - uninstall, unpublish, unstar, update, version, view, whoami + undeprecate, uninstall, unpublish, unstar, update, version, + view, whoami Specify configs in the ini-formatted file: {USERCONFIG} @@ -229,9 +233,10 @@ All commands: search, set, shrinkwrap, star, stars, start, stop, team, test, token, - uninstall, unpublish, - unstar, update, version, - view, whoami + undeprecate, uninstall, + unpublish, unstar, + update, version, view, + whoami Specify configs in the ini-formatted file: {USERCONFIG} @@ -281,9 +286,10 @@ All commands: search, set, shrinkwrap, star, stars, start, stop, team, test, token, - uninstall, unpublish, - unstar, update, version, - view, whoami + undeprecate, uninstall, + unpublish, unstar, + update, version, view, + whoami Specify configs in the ini-formatted file: {USERCONFIG} @@ -331,10 +337,10 @@ All commands: run-script, sbom, search, set, shrinkwrap, star, stars, start, stop, team, - test, token, uninstall, - unpublish, unstar, - update, version, view, - whoami + test, token, undeprecate, + uninstall, unpublish, + unstar, update, version, + view, whoami Specify configs in the ini-formatted file: {USERCONFIG} @@ -370,8 +376,8 @@ All commands: ping, pkg, prefix, profile, prune, publish, query, rebuild, repo, restart, root, run-script, sbom, search, set, shrinkwrap, star, stars, start, stop, team, test, token, - uninstall, unpublish, unstar, update, version, view, - whoami + undeprecate, uninstall, unpublish, unstar, update, version, + view, whoami Specify configs in the ini-formatted file: {USERCONFIG} @@ -407,7 +413,8 @@ All commands: ping, pkg, prefix, profile, prune, publish, query, rebuild, repo, restart, root, run-script, sbom, search, set, shrinkwrap, star, stars, start, stop, team, test, token, - uninstall, unpublish, unstar, update, version, view, whoami + undeprecate, uninstall, unpublish, unstar, update, version, + view, whoami Specify configs in the ini-formatted file: {USERCONFIG} @@ -443,7 +450,8 @@ All commands: ping, pkg, prefix, profile, prune, publish, query, rebuild, repo, restart, root, run-script, sbom, search, set, shrinkwrap, star, stars, start, stop, team, test, token, - uninstall, unpublish, unstar, update, version, view, whoami + undeprecate, uninstall, unpublish, unstar, update, version, + view, whoami Specify configs in the ini-formatted file: {USERCONFIG} diff --git a/test/lib/commands/undeprecate.js b/test/lib/commands/undeprecate.js new file mode 100644 index 0000000000000..775a2183a1299 --- /dev/null +++ b/test/lib/commands/undeprecate.js @@ -0,0 +1,72 @@ +const t = require('tap') +const { load: loadMockNpm } = require('../../fixtures/mock-npm') + +const MockRegistry = require('@npmcli/mock-registry') + +const token = 'test-auth-token' +const auth = { '//registry.npmjs.org/:_authToken': token } +const versions = ['1.0.0', '1.0.1', '1.0.1-pre'] + +t.test('no args', async t => { + const { npm } = await loadMockNpm(t) + await t.rejects( + npm.exec('undeprecate', []), + { code: 'EUSAGE' }, + 'logs usage' + ) +}) + +t.test('undeprecate', async t => { + const { npm, logs, joinedOutput } = await loadMockNpm(t, { config: { ...auth } }) + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: token, + }) + const manifest = registry.manifest({ + name: 'foo', + versions, + }) + await registry.package({ manifest, query: { write: true } }) + registry.nock.put('/foo', body => { + for (const version of versions) { + if (body.versions[version].deprecated !== '') { + return false + } + } + return true + }).reply(200, {}) + + await npm.exec('undeprecate', ['foo']) + t.match(logs.notice, [ + 'undeprecating foo@1.0.0', + 'undeprecating foo@1.0.1', + 'undeprecating foo@1.0.1-pre', + ]) + t.match(joinedOutput(), '') +}) + +t.test('dry-run', async t => { + const { npm, logs, joinedOutput } = await loadMockNpm(t, { config: { + 'dry-run': true, + ...auth, + } }) + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: token, + }) + const manifest = registry.manifest({ + name: 'foo', + versions, + }) + await registry.package({ manifest, query: { write: true } }) + + await npm.exec('undeprecate', ['foo']) + t.match(logs.notice, [ + 'undeprecating foo@1.0.0', + 'undeprecating foo@1.0.1', + 'undeprecating foo@1.0.1-pre', + ]) + t.match(joinedOutput(), '') +}) From 7f6c9973dc9a4dfebd76e52e060a9d8496b8bd98 Mon Sep 17 00:00:00 2001 From: Gar Date: Fri, 3 Jan 2025 10:06:05 -0800 Subject: [PATCH 04/24] feat: add dry-run to deprecate/undeprecate commands --- lib/commands/deprecate.js | 24 +++++++++++++++++------- test/lib/commands/deprecate.js | 33 ++++++++++++++++++++++++++++++++- 2 files changed, 49 insertions(+), 8 deletions(-) diff --git a/lib/commands/deprecate.js b/lib/commands/deprecate.js index 95eaf429120fa..d8d33ad9b9d03 100644 --- a/lib/commands/deprecate.js +++ b/lib/commands/deprecate.js @@ -14,6 +14,7 @@ class Deprecate extends BaseCommand { static params = [ 'registry', 'otp', + 'dry-run', ] static ignoreImplicitWorkspace = true @@ -56,17 +57,26 @@ class Deprecate extends BaseCommand { const versions = Object.keys(packument.versions) .filter(v => semver.satisfies(v, spec, { includePrerelease: true })) + const dryRun = this.npm.config.get('dry-run') + if (versions.length) { for (const v of versions) { packument.versions[v].deprecated = msg + if (msg) { + log.notice(`deprecating ${packument.name}@${v} with message "${msg}"`) + } else { + log.notice(`undeprecating ${packument.name}@${v}`) + } + } + if (!dryRun) { + return otplease(this.npm, this.npm.flatOptions, opts => npmFetch(uri, { + ...opts, + spec: p, + method: 'PUT', + body: packument, + ignoreBody: true, + })) } - return otplease(this.npm, this.npm.flatOptions, opts => npmFetch(uri, { - ...opts, - spec: p, - method: 'PUT', - body: packument, - ignoreBody: true, - })) } else { log.warn('deprecate', 'No version found for', p.rawSpec) } diff --git a/test/lib/commands/deprecate.js b/test/lib/commands/deprecate.js index 09aaeacfe8563..eda51bfef2895 100644 --- a/test/lib/commands/deprecate.js +++ b/test/lib/commands/deprecate.js @@ -129,7 +129,7 @@ t.test('deprecates given range', async t => { }) t.test('deprecates all versions when no range is specified', async t => { - const { npm, joinedOutput } = await loadMockNpm(t, { config: { ...auth } }) + const { npm, logs, joinedOutput } = await loadMockNpm(t, { config: { ...auth } }) const registry = new MockRegistry({ tap: t, registry: npm.config.get('registry'), @@ -151,6 +151,37 @@ t.test('deprecates all versions when no range is specified', async t => { }).reply(200, {}) await npm.exec('deprecate', ['foo', message]) + t.match(logs.notice, [ + `deprecating foo@1.0.0 with message "${message}"`, + `deprecating foo@1.0.1 with message "${message}"`, + `deprecating foo@1.0.1-pre with message "${message}"`, + ]) + t.match(joinedOutput(), '') +}) + +t.test('dry-run', async t => { + const { npm, logs, joinedOutput } = await loadMockNpm(t, { config: { + 'dry-run': true, + ...auth, + } }) + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: token, + }) + const manifest = registry.manifest({ + name: 'foo', + versions, + }) + await registry.package({ manifest, query: { write: true } }) + const message = 'test deprecation message' + + await npm.exec('deprecate', ['foo', message]) + t.match(logs.notice, [ + `deprecating foo@1.0.0 with message "${message}"`, + `deprecating foo@1.0.1 with message "${message}"`, + `deprecating foo@1.0.1-pre with message "${message}"`, + ]) t.match(joinedOutput(), '') }) From 866b5ee3ae5ed508ecbe832d01f5ebd6b00f6789 Mon Sep 17 00:00:00 2001 From: Reggi Date: Tue, 14 Jan 2025 12:26:50 -0500 Subject: [PATCH 05/24] docs: safer documentation urls, repos, packages (#8030) Noticed some of the resources pointed to external sites not controlled by npm or github and wanted to clean them up so they can't be squatted on. --- .../content/configuring-npm/package-json.md | 106 +++++++++--------- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/docs/lib/content/configuring-npm/package-json.md b/docs/lib/content/configuring-npm/package-json.md index e09d50f02b635..06af27f9b2f3e 100644 --- a/docs/lib/content/configuring-npm/package-json.md +++ b/docs/lib/content/configuring-npm/package-json.md @@ -47,7 +47,7 @@ Some tips: that name already, before you get too attached to it. -A name can be optionally prefixed by a scope, e.g. `@myorg/mypackage`. See +A name can be optionally prefixed by a scope, e.g. `@npm/example`. See [`scope`](/using-npm/scope) for more detail. ### version @@ -80,7 +80,7 @@ The URL to the project homepage. Example: ```json -"homepage": "https://github.com/owner/project#readme" +"homepage": "https://github.com/npm/example#readme" ``` ### bugs @@ -94,8 +94,8 @@ It should look like this: ```json { "bugs": { - "url": "https://github.com/owner/project/issues", - "email": "project@hostname.com" + "url": "https://github.com/npm/example/issues", + "email": "example@npmjs.com" } } ``` @@ -204,8 +204,8 @@ like this: ```json { "name" : "Barney Rubble", - "email" : "b@rubble.com", - "url" : "http://barnyrubble.tumblr.com/" + "email" : "barney@npmjs.com", + "url" : "http://barnyrubble.npmjs.com/" } ``` @@ -214,7 +214,7 @@ you: ```json { - "author": "Barney Rubble (http://barnyrubble.tumblr.com/)" + "author": "Barney Rubble (http://barnyrubble.npmjs.com/)" } ``` @@ -232,7 +232,7 @@ string URL, or an array of objects and string URLs: { "funding": { "type" : "individual", - "url" : "http://example.com/donate" + "url" : "http://npmjs.com/donate" } } ``` @@ -241,14 +241,14 @@ string URL, or an array of objects and string URLs: { "funding": { "type" : "patreon", - "url" : "https://www.patreon.com/my-account" + "url" : "https://www.patreon.com/user" } } ``` ```json { - "funding": "http://example.com/donate" + "funding": "http://npmjs.com/donate" } ``` @@ -257,12 +257,12 @@ string URL, or an array of objects and string URLs: "funding": [ { "type" : "individual", - "url" : "http://example.com/donate" + "url" : "http://npmjs.com/donate" }, - "http://example.com/donateAlso", + "http://npmjs.com/donate-also", { "type" : "patreon", - "url" : "https://www.patreon.com/my-account" + "url" : "https://www.patreon.com/user" } ] } @@ -539,9 +539,9 @@ same shortcut syntax you use for `npm install`: ```json { - "repository": "npm/npm", + "repository": "npm/example", - "repository": "github:user/repo", + "repository": "github:npm/example", "repository": "gist:11081aaa281", @@ -635,7 +635,7 @@ For example, these are all valid: "baz": ">1.0.2 <=2.3.4", "boo": "2.0.1", "qux": "<1.0.0 || >=2.3.1 <2.4.5 || >=2.5.2 <3.0.0", - "asd": "http://asdf.com/asdf.tar.gz", + "asd": "http://npmjs.com/example.tar.gz", "til": "~1.2", "elf": "~1.2.3", "two": "2.x", @@ -714,7 +714,7 @@ included. For example: "dependencies": { "express": "expressjs/express", "mocha": "mochajs/mocha#4727d357ea", - "module": "user/repo#feature\/branch" + "module": "npm/example-github-repo#feature\/branch" } } ``` @@ -773,7 +773,7 @@ For example: ```json { - "name": "ethopia-waza", + "name": "@npm/ethopia-waza", "description": "a delightfully fruity coffee varietal", "version": "1.2.3", "devDependencies": { @@ -803,21 +803,21 @@ For example: ```json { - "name": "tea-latte", + "name": "@npm/tea-latte", "version": "1.3.5", "peerDependencies": { - "tea": "2.x" + "@npm/tea": "2.x" } } ``` -This ensures your package `tea-latte` can be installed *along* with the -second major version of the host package `tea` only. `npm install +This ensures your package `@npm/tea-latte` can be installed *along* with the +second major version of the host package `@npm/tea` only. `npm install tea-latte` could possibly yield the following dependency graph: ```bash -├── tea-latte@1.3.5 -└── tea@2.2.0 +├── @npm/tea-latte@1.3.5 +└── @npm/tea@2.2.0 ``` In npm versions 3 through 6, `peerDependencies` were not automatically @@ -849,14 +849,14 @@ For example: ```json { - "name": "tea-latte", + "name": "@npm/tea-latte", "version": "1.3.5", "peerDependencies": { - "tea": "2.x", - "soy-milk": "1.2" + "@npm/tea": "2.x", + "@npm/soy-milk": "1.2" }, "peerDependenciesMeta": { - "soy-milk": { + "@npm/soy-milk": { "optional": true } } @@ -879,17 +879,17 @@ If we define a package.json like this: ```json { - "name": "awesome-web-framework", + "name": "@npm/awesome-web-framework", "version": "1.0.0", "bundleDependencies": [ - "renderized", - "super-streams" + "@npm/renderized", + "@npm/super-streams" ] } ``` -we can obtain `awesome-web-framework-1.0.0.tgz` file by running `npm pack`. -This file contains the dependencies `renderized` and `super-streams` which +we can obtain `@npm/awesome-web-framework-1.0.0.tgz` file by running `npm pack`. +This file contains the dependencies `@npm/renderized` and `@npm/super-streams` which can be installed in a new project by executing `npm install awesome-web-framework-1.0.0.tgz`. Note that the package names do not include any versions, as that information is specified in `dependencies`. @@ -914,8 +914,8 @@ dependency. For example, something like this: ```js try { - var foo = require('foo') - var fooVersion = require('foo/package.json').version + var foo = require('@npm/foo') + var fooVersion = require('@npm/foo/package.json').version } catch (er) { foo = null } @@ -957,49 +957,49 @@ what version your dependencies rely on: ```json { "overrides": { - "foo": "1.0.0" + "@npm/foo": "1.0.0" } } ``` The above is a short hand notation, the full object form can be used to allow overriding a package itself as well as a child of the package. This will cause -`foo` to always be `1.0.0` while also making `bar` at any depth beyond `foo` +`@npm/foo` to always be `1.0.0` while also making `@npm/bar` at any depth beyond `@npm/foo` also `1.0.0`: ```json { "overrides": { - "foo": { + "@npm/foo": { ".": "1.0.0", - "bar": "1.0.0" + "@npm/bar": "1.0.0" } } } ``` -To only override `foo` to be `1.0.0` when it's a child (or grandchild, or great +To only override `@npm/foo` to be `1.0.0` when it's a child (or grandchild, or great grandchild, etc) of the package `bar`: ```json { "overrides": { - "bar": { - "foo": "1.0.0" + "@npm/bar": { + "@npm/foo": "1.0.0" } } } ``` -Keys can be nested to any arbitrary length. To override `foo` only when it's a -child of `bar` and only when `bar` is a child of `baz`: +Keys can be nested to any arbitrary length. To override `@npm/foo` only when it's a +child of `@npm/bar` and only when `@npm/bar` is a child of `@npm/baz`: ```json { "overrides": { - "baz": { - "bar": { - "foo": "1.0.0" + "@npm/baz": { + "@npm/bar": { + "@npm/foo": "1.0.0" } } } @@ -1007,13 +1007,13 @@ child of `bar` and only when `bar` is a child of `baz`: ``` The key of an override can also include a version, or range of versions. -To override `foo` to `1.0.0`, but only when it's a child of `bar@2.0.0`: +To override `@npm/foo` to `1.0.0`, but only when it's a child of `@npm/bar@2.0.0`: ```json { "overrides": { - "bar@2.0.0": { - "foo": "1.0.0" + "@npm/bar@2.0.0": { + "@npm/foo": "1.0.0" } } } @@ -1028,7 +1028,7 @@ package you wish the version to match with a `$`. ```json { "dependencies": { - "foo": "^1.0.0" + "@npm/foo": "^1.0.0" }, "overrides": { // BAD, will throw an EOVERRIDE error @@ -1036,9 +1036,9 @@ package you wish the version to match with a `$`. // GOOD, specs match so override is allowed // "foo": "^1.0.0" // BEST, the override is defined as a reference to the dependency - "foo": "$foo", + "@npm/foo": "$foo", // the referenced package does not need to match the overridden one - "bar": "$foo" + "@npm/bar": "$foo" } } ``` From 7e7961d8936e277f3dbc8e44f9e7b07daaeb36ca Mon Sep 17 00:00:00 2001 From: Gar Date: Thu, 16 Jan 2025 10:11:42 -0800 Subject: [PATCH 06/24] chore: bump @npmcli/eslint-config to 5.1.0 --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 146bfb0285321..be2599616fcdc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -157,7 +157,7 @@ }, "devDependencies": { "@npmcli/docs": "^1.0.0", - "@npmcli/eslint-config": "^5.0.1", + "@npmcli/eslint-config": "^5.1.0", "@npmcli/git": "^6.0.1", "@npmcli/mock-globals": "^1.0.0", "@npmcli/mock-registry": "^1.0.0", @@ -3411,9 +3411,9 @@ "link": true }, "node_modules/@npmcli/eslint-config": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@npmcli/eslint-config/-/eslint-config-5.0.1.tgz", - "integrity": "sha512-S/YyfSAyiQWGzXBeX8D/Fe363628zXwraLVbRe080VdWn9FdT9ILVk55ATRpAXefa5JJwgsbMM5vA1V9tDrjqw==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/eslint-config/-/eslint-config-5.1.0.tgz", + "integrity": "sha512-L4FAYndvARxkbTBNbsbDDkArIf8A8WmTFGVKdevJ3jd9nPzDKWiuC9TW0QtEnRsFHr5IX7G6qkRLK+drLIGoEA==", "dev": true, "license": "ISC", "dependencies": { diff --git a/package.json b/package.json index 82c5a193b88c0..13a79db3f9a9d 100644 --- a/package.json +++ b/package.json @@ -188,7 +188,7 @@ ], "devDependencies": { "@npmcli/docs": "^1.0.0", - "@npmcli/eslint-config": "^5.0.1", + "@npmcli/eslint-config": "^5.1.0", "@npmcli/git": "^6.0.1", "@npmcli/mock-globals": "^1.0.0", "@npmcli/mock-registry": "^1.0.0", From 7f72944e43f009cf4d55ff4fe24c459e07f588fd Mon Sep 17 00:00:00 2001 From: Gar Date: Thu, 16 Jan 2025 12:08:07 -0800 Subject: [PATCH 07/24] fix(publish): accept publishConfig.tag to override highes semver check Setting `tag` in `publishConfig` constitutes a "non default" scenario. --- lib/commands/publish.js | 6 +-- .../test/lib/commands/publish.js.test.cjs | 28 ++++++------ test/lib/commands/publish.js | 45 ++++++++++++------- 3 files changed, 45 insertions(+), 34 deletions(-) diff --git a/lib/commands/publish.js b/lib/commands/publish.js index c59588fefb241..510e351a931dc 100644 --- a/lib/commands/publish.js +++ b/lib/commands/publish.js @@ -117,7 +117,7 @@ class Publish extends BaseCommand { manifest = await this.#getManifest(spec, opts, true) const isPreRelease = Boolean(semver.parse(manifest.version).prerelease.length) - const isDefaultTag = this.npm.config.isDefault('tag') + const isDefaultTag = this.npm.config.isDefault('tag') && !manifest.publishConfig?.tag if (isPreRelease && isDefaultTag) { throw new Error('You must specify a tag using --tag when publishing a prerelease version.') @@ -157,7 +157,7 @@ class Publish extends BaseCommand { } } - const latestVersion = await this.#latestPublishedVersion(resolved, registry) + const latestVersion = await this.#highestPublishedVersion(resolved, registry) const latestSemverIsGreater = !!latestVersion && semver.gte(latestVersion, manifest.version) if (latestSemverIsGreater && isDefaultTag) { @@ -204,7 +204,7 @@ class Publish extends BaseCommand { } } - async #latestPublishedVersion (spec, registry) { + async #highestPublishedVersion (spec, registry) { try { const packument = await pacote.packument(spec, { ...this.npm.flatOptions, diff --git a/tap-snapshots/test/lib/commands/publish.js.test.cjs b/tap-snapshots/test/lib/commands/publish.js.test.cjs index 1599f1dd5c394..81c7dbe908d24 100644 --- a/tap-snapshots/test/lib/commands/publish.js.test.cjs +++ b/tap-snapshots/test/lib/commands/publish.js.test.cjs @@ -6,7 +6,7 @@ */ 'use strict' exports[`test/lib/commands/publish.js TAP _auth config default registry > new package version 1`] = ` -+ test-package@1.0.0 ++ @npmcli/test-package@1.0.0 ` exports[`test/lib/commands/publish.js TAP bare _auth and registry config > new package version 1`] = ` @@ -15,15 +15,15 @@ exports[`test/lib/commands/publish.js TAP bare _auth and registry config > new p exports[`test/lib/commands/publish.js TAP dry-run > must match snapshot 1`] = ` Array [ - "package: test-package@1.0.0", + "package: @npmcli/test-package@1.0.0", "Tarball Contents", - "87B package.json", + "95B package.json", "Tarball Details", - "name: test-package", + "name: @npmcli/test-package", "version: 1.0.0", - "filename: test-package-1.0.0.tgz", + "filename: npmcli-test-package-1.0.0.tgz", "package size: {size}", - "unpacked size: 87 B", + "unpacked size: 95 B", "shasum: {sha}", "integrity: {integrity} "total files: 1", @@ -76,7 +76,7 @@ exports[`test/lib/commands/publish.js TAP has token auth for scope configured re ` exports[`test/lib/commands/publish.js TAP ignore-scripts > new package version 1`] = ` -+ test-package@1.0.0 ++ @npmcli/test-package@1.0.0 ` exports[`test/lib/commands/publish.js TAP json > must match snapshot 1`] = ` @@ -87,14 +87,14 @@ Array [ exports[`test/lib/commands/publish.js TAP json > new package json 1`] = ` { - "id": "test-package@1.0.0", - "name": "test-package", + "id": "@npmcli/test-package@1.0.0", + "name": "@npmcli/test-package", "version": "1.0.0", "size": "{size}", - "unpackedSize": 87, + "unpackedSize": 95, "shasum": "{sha}", "integrity": "{integrity}", - "filename": "test-package-1.0.0.tgz", + "filename": "npmcli-test-package-1.0.0.tgz", "files": [ { "path": "package.json", @@ -249,7 +249,7 @@ Object { ` exports[`test/lib/commands/publish.js TAP no auth dry-run > must match snapshot 1`] = ` -+ test-package@1.0.0 ++ @npmcli/test-package@1.0.0 ` exports[`test/lib/commands/publish.js TAP no auth dry-run > warns about auth being needed 1`] = ` @@ -259,7 +259,7 @@ Array [ ` exports[`test/lib/commands/publish.js TAP prioritize CLI flags over publishConfig > new package version 1`] = ` -+ test-package@1.0.0 ++ @npmcli/test-package@1.0.0 ` exports[`test/lib/commands/publish.js TAP public access > must match snapshot 1`] = ` @@ -285,7 +285,7 @@ exports[`test/lib/commands/publish.js TAP public access > new package version 1` ` exports[`test/lib/commands/publish.js TAP re-loads publishConfig.registry if added during script process > new package version 1`] = ` -+ test-package@1.0.0 ++ @npmcli/test-package@1.0.0 ` exports[`test/lib/commands/publish.js TAP respects publishConfig.registry, runs appropriate scripts > new package version 1`] = ` diff --git a/test/lib/commands/publish.js b/test/lib/commands/publish.js index 10dc9b33deda4..0ede4ffc20c83 100644 --- a/test/lib/commands/publish.js +++ b/test/lib/commands/publish.js @@ -6,7 +6,7 @@ const Arborist = require('@npmcli/arborist') const path = require('node:path') const fs = require('node:fs') -const pkg = 'test-package' +const pkg = '@npmcli/test-package' const token = 'test-auth-token' const auth = { '//registry.npmjs.org/:_authToken': token } const alternateRegistry = 'https://other.registry.npmjs.org' @@ -238,8 +238,7 @@ t.test('throws when invalid tag when not url encodable', async t => { await t.rejects( npm.exec('publish', []), { - /* eslint-disable-next-line max-len */ - message: 'Invalid tag name "@test" of package "test-package@@test": Tags may not have any characters that encodeURIComponent encodes.', + message: `Invalid tag name "@test" of package "${pkg}@@test": Tags may not have any characters that encodeURIComponent encodes.`, } ) }) @@ -857,8 +856,8 @@ t.test('prerelease dist tag', (t) => { t.end() }) -t.test('latest dist tag', (t) => { - const init = (version) => ({ +t.test('semver highest dist tag', async t => { + const init = ({ version, pkgExtra = {} }) => ({ config: { loglevel: 'silent', ...auth, @@ -866,6 +865,7 @@ t.test('latest dist tag', (t) => { prefixDir: { 'package.json': JSON.stringify({ ...pkgJson, + ...pkgExtra, version, }, null, 2), }, @@ -879,46 +879,57 @@ t.test('latest dist tag', (t) => { { version: '105.0.0-pre' }, ] - t.test('PREVENTS publish when latest version is HIGHER than publishing version', async t => { + await t.test('PREVENTS publish when highest version is HIGHER than publishing version', async t => { const version = '99.0.0' - const { npm, registry } = await loadNpmWithRegistry(t, init(version)) + const { npm, registry } = await loadNpmWithRegistry(t, init({ version })) registry.publish(pkg, { noPut: true, packuments }) await t.rejects(async () => { await npm.exec('publish', []) - /* eslint-disable-next-line max-len */ }, new Error('Cannot implicitly apply the "latest" tag because published version 100.0.0 is higher than the new version 99.0.0. You must specify a tag using --tag.')) }) - t.test('ALLOWS publish when latest is HIGHER than publishing version and flag', async t => { + await t.test('ALLOWS publish when highest is HIGHER than publishing version and flag', async t => { const version = '99.0.0' const { npm, registry } = await loadNpmWithRegistry(t, { - ...init(version), + ...init({ version }), argv: ['--tag', 'latest'], }) registry.publish(pkg, { packuments }) await npm.exec('publish', []) }) - t.test('ALLOWS publish when latest versions are LOWER than publishing version', async t => { + await t.test('ALLOWS publish when highest versions are LOWER than publishing version', async t => { const version = '101.0.0' - const { npm, registry } = await loadNpmWithRegistry(t, init(version)) + const { npm, registry } = await loadNpmWithRegistry(t, init({ version })) registry.publish(pkg, { packuments }) await npm.exec('publish', []) }) - t.test('ALLOWS publish when packument has empty versions (for coverage)', async t => { + await t.test('ALLOWS publish when packument has empty versions (for coverage)', async t => { const version = '1.0.0' - const { npm, registry } = await loadNpmWithRegistry(t, init(version)) + const { npm, registry } = await loadNpmWithRegistry(t, init({ version })) registry.publish(pkg, { manifest: { versions: { } } }) await npm.exec('publish', []) }) - t.test('ALLOWS publish when packument has empty manifest (for coverage)', async t => { + await t.test('ALLOWS publish when packument has empty manifest (for coverage)', async t => { const version = '1.0.0' - const { npm, registry } = await loadNpmWithRegistry(t, init(version)) + const { npm, registry } = await loadNpmWithRegistry(t, init({ version })) registry.publish(pkg, { manifest: {} }) await npm.exec('publish', []) }) - t.end() + await t.test('ALLOWS publish when highest version is HIGHER than publishing version with publishConfig', async t => { + const version = '99.0.0' + const { npm, registry } = await loadNpmWithRegistry(t, init({ + version, + pkgExtra: { + publishConfig: { + tag: 'next', + }, + }, + })) + registry.publish(pkg, { packuments }) + await npm.exec('publish', []) + }) }) From 8a911ff895967678aa786595db3418fc28e6966a Mon Sep 17 00:00:00 2001 From: Gar Date: Thu, 16 Jan 2025 12:34:59 -0800 Subject: [PATCH 08/24] fix(publish): disregard deprecated versions when calculating highest version --- lib/commands/publish.js | 5 ++++- test/lib/commands/publish.js | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/commands/publish.js b/lib/commands/publish.js index 510e351a931dc..661533a4a2333 100644 --- a/lib/commands/publish.js +++ b/lib/commands/publish.js @@ -217,7 +217,10 @@ class Publish extends BaseCommand { const ordered = Object.keys(packument?.versions) .flatMap(v => { const s = new semver.SemVer(v) - return s.prerelease.length > 0 ? [] : s + if ((s.prerelease.length > 0) || packument.versions[v].deprecated) { + return [] + } + return s }) .sort((a, b) => b.compare(a)) return ordered.length >= 1 ? ordered[0].version : null diff --git a/test/lib/commands/publish.js b/test/lib/commands/publish.js index 0ede4ffc20c83..cd5c1bdad6aa3 100644 --- a/test/lib/commands/publish.js +++ b/test/lib/commands/publish.js @@ -876,6 +876,7 @@ t.test('semver highest dist tag', async t => { // this needs more than one item in it to cover the sort logic { version: '50.0.0' }, { version: '100.0.0' }, + { version: '102.0.0', deprecated: 'oops' }, { version: '105.0.0-pre' }, ] From dc31c1bdc6658ab69554adcf2988ee99a615c409 Mon Sep 17 00:00:00 2001 From: Gar Date: Thu, 16 Jan 2025 12:43:07 -0800 Subject: [PATCH 09/24] fix: remove max-len linting bypasses --- lib/base-cmd.js | 1 - lib/cli/entry.js | 2 - lib/cli/validate-engines.js | 2 - lib/commands/cache.js | 2 - lib/commands/doctor.js | 1 - lib/commands/install.js | 1 - lib/commands/org.js | 1 - lib/commands/publish.js | 3 -- lib/commands/sbom.js | 2 - lib/commands/token.js | 2 - lib/commands/version.js | 1 - lib/utils/did-you-mean.js | 1 - lib/utils/format-search-stream.js | 6 ++- lib/utils/reify-output.js | 2 - lib/utils/tar.js | 1 - lib/utils/verify-signatures.js | 10 ----- .../test/lib/commands/install.js.test.cjs | 6 +-- test/lib/cli/exit-handler.js | 1 - test/lib/cli/validate-engines.js | 1 - test/lib/commands/audit.js | 6 --- test/lib/commands/cache.js | 14 ------- test/lib/commands/help-search.js | 2 - test/lib/commands/ls.js | 40 ------------------- test/lib/utils/sbom-cyclonedx.js | 1 - test/lib/utils/sbom-spdx.js | 1 - 25 files changed, 7 insertions(+), 103 deletions(-) diff --git a/lib/base-cmd.js b/lib/base-cmd.js index 941ffefad2ef4..dcbad88a8b35e 100644 --- a/lib/base-cmd.js +++ b/lib/base-cmd.js @@ -124,7 +124,6 @@ class BaseCommand { } else if (!this.npm.config.isDefault('expect-result-count')) { const expected = this.npm.config.get('expect-result-count') if (expected !== entries) { - /* eslint-disable-next-line max-len */ log.warn(this.name, `Expected ${expected} result${expected === 1 ? '' : 's'}, got ${entries}`) process.exitCode = 1 } diff --git a/lib/cli/entry.js b/lib/cli/entry.js index f36bc59feaec9..dd9b39973f8a1 100644 --- a/lib/cli/entry.js +++ b/lib/cli/entry.js @@ -1,5 +1,3 @@ -/* eslint-disable max-len */ - // Separated out for easier unit testing module.exports = async (process, validateEngines) => { // set it here so that regardless of what happens later, we don't diff --git a/lib/cli/validate-engines.js b/lib/cli/validate-engines.js index cf5315a25dce0..971cc6bb51867 100644 --- a/lib/cli/validate-engines.js +++ b/lib/cli/validate-engines.js @@ -11,10 +11,8 @@ const npm = `v${version}` module.exports = (process, getCli) => { const node = process.version - /* eslint-disable-next-line max-len */ const unsupportedMessage = `npm ${npm} does not support Node.js ${node}. This version of npm supports the following node versions: \`${engines}\`. You can find the latest version at https://nodejs.org/.` - /* eslint-disable-next-line max-len */ const brokenMessage = `ERROR: npm ${npm} is known not to run on Node.js ${node}. This version of npm supports the following node versions: \`${engines}\`. You can find the latest version at https://nodejs.org/.` // coverage ignored because this is only hit in very unsupported node versions diff --git a/lib/commands/cache.js b/lib/commands/cache.js index 45d308a57d0c2..ddfeeb818a817 100644 --- a/lib/commands/cache.js +++ b/lib/commands/cache.js @@ -10,7 +10,6 @@ const localeCompare = require('@isaacs/string-locale-compare')('en') const { log, output } = require('proc-log') const searchCachePackage = async (path, parsed, cacheKeys) => { - /* eslint-disable-next-line max-len */ const searchMFH = new RegExp(`^make-fetch-happen:request-cache:.*(? x === role)) { throw new Error( - /* eslint-disable-next-line max-len */ 'Third argument `role` must be one of `owner`, `admin`, or `developer`, with `developer` being the default value if omitted.' ) } diff --git a/lib/commands/publish.js b/lib/commands/publish.js index 661533a4a2333..764a3c15c9999 100644 --- a/lib/commands/publish.js +++ b/lib/commands/publish.js @@ -61,7 +61,6 @@ class Publish extends BaseCommand { if (err.code !== 'EPRIVATE') { throw err } - // eslint-disable-next-line max-len log.warn('publish', `Skipping workspace ${this.npm.chalk.cyan(name)}, marked as ${this.npm.chalk.bold('private')}`) } } @@ -161,7 +160,6 @@ class Publish extends BaseCommand { const latestSemverIsGreater = !!latestVersion && semver.gte(latestVersion, manifest.version) if (latestSemverIsGreater && isDefaultTag) { - /* eslint-disable-next-line max-len */ throw new Error(`Cannot implicitly apply the "latest" tag because published version ${latestVersion} is higher than the new version ${manifest.version}. You must specify a tag using --tag.`) } @@ -238,7 +236,6 @@ class Publish extends BaseCommand { const changes = [] const pkg = await pkgJson.fix(spec.fetchSpec, { changes }) if (changes.length && logWarnings) { - /* eslint-disable-next-line max-len */ log.warn('publish', 'npm auto-corrected some errors in your package.json when publishing. Please run "npm pkg fix" to address these errors.') log.warn('publish', `errors corrected:\n${changes.join('\n')}`) } diff --git a/lib/commands/sbom.js b/lib/commands/sbom.js index 278c6d506b42a..9b06af4e0d3fc 100644 --- a/lib/commands/sbom.js +++ b/lib/commands/sbom.js @@ -27,7 +27,6 @@ class SBOM extends BaseCommand { const packageLockOnly = this.npm.config.get('package-lock-only') if (!sbomFormat) { - /* eslint-disable-next-line max-len */ throw this.usageError(`Must specify --sbom-format flag with one of: ${SBOM_FORMATS.join(', ')}.`) } @@ -40,7 +39,6 @@ class SBOM extends BaseCommand { const arb = new Arborist(opts) const tree = packageLockOnly ? await arb.loadVirtual(opts).catch(() => { - /* eslint-disable-next-line max-len */ throw this.usageError('A package lock or shrinkwrap file is required in package-lock-only mode') }) : await arb.loadActual(opts) diff --git a/lib/commands/token.js b/lib/commands/token.js index d2e85ffe5a549..fac55d46e0c3b 100644 --- a/lib/commands/token.js +++ b/lib/commands/token.js @@ -73,7 +73,6 @@ class Token extends BaseCommand { for (const token of tokens) { const level = token.readonly ? 'Read only token' : 'Publish token' const created = String(token.created).slice(0, 10) - /* eslint-disable-next-line max-len */ output.standard(`${chalk.blue(level)} ${token.token}… with id ${chalk.cyan(token.id)} created ${created}`) if (token.cidr_whitelist) { output.standard(`with IP whitelist: ${chalk.green(token.cidr_whitelist.join(','))}`) @@ -99,7 +98,6 @@ class Token extends BaseCommand { toRemove.push(matches[0].key) } else if (matches.length > 1) { throw new Error( - /* eslint-disable-next-line max-len */ `Token ID "${id}" was ambiguous, a new token may have been created since you last ran \`npm token list\`.` ) } else { diff --git a/lib/commands/version.js b/lib/commands/version.js index d6c2dd4caed75..1d1a6753c70de 100644 --- a/lib/commands/version.js +++ b/lib/commands/version.js @@ -22,7 +22,6 @@ class Version extends BaseCommand { static workspaces = true static ignoreImplicitWorkspace = false - /* eslint-disable-next-line max-len */ static usage = ['[ | major | minor | patch | premajor | preminor | prepatch | prerelease | from-git]'] static async completion (opts) { diff --git a/lib/utils/did-you-mean.js b/lib/utils/did-you-mean.js index 7428ed5df85e9..deec803c9b710 100644 --- a/lib/utils/did-you-mean.js +++ b/lib/utils/did-you-mean.js @@ -19,7 +19,6 @@ const didYouMean = (pkg, scmd) => { .map(str => [`run ${str}`, `run the "${str}" package script`]), ...Object.keys(bin) .filter(cmd => isClose(scmd, cmd)) - /* eslint-disable-next-line max-len */ .map(str => [`exec ${str}`, `run the "${str}" command from either this or a remote npm package`]), ] diff --git a/lib/utils/format-search-stream.js b/lib/utils/format-search-stream.js index 9b144ceae1984..6d4e20a2d6340 100644 --- a/lib/utils/format-search-stream.js +++ b/lib/utils/format-search-stream.js @@ -1,4 +1,3 @@ -/* eslint-disable max-len */ const { stripVTControlCharacters: strip } = require('node:util') const { Minipass } = require('minipass') @@ -83,7 +82,10 @@ class TextOutputStream extends Minipass { constructor (opts) { super() // Consider a search for "cowboys" and "boy". If we highlight "boys" first the "cowboys" string will no longer string match because of the ansi highlighting added to "boys". If we highlight "boy" second then the ansi reset at the end will make the highlighting only on "cowboy" with a normal "s". Neither is perfect but at least the first option doesn't do partial highlighting. So, we sort strings smaller to larger - this.#args = opts.args.map(s => s.toLowerCase()).filter(Boolean).sort((a, b) => a.length - b.length) + this.#args = opts.args + .map(s => s.toLowerCase()) + .filter(Boolean) + .sort((a, b) => a.length - b.length) this.#chalk = opts.npm.chalk this.#exclude = opts.exclude this.#parseable = opts.parseable diff --git a/lib/utils/reify-output.js b/lib/utils/reify-output.js index 025479f0c8e60..109196d4c0692 100644 --- a/lib/utils/reify-output.js +++ b/lib/utils/reify-output.js @@ -50,7 +50,6 @@ const reifyOutput = (npm, arb) => { switch (d.action) { case 'REMOVE': if (showDiff) { - /* eslint-disable-next-line max-len */ output.standard(`${chalk.blue('remove')} ${d.actual.name} ${d.actual.package.version}`) } summary.removed++ @@ -63,7 +62,6 @@ const reifyOutput = (npm, arb) => { break case 'CHANGE': if (showDiff) { - /* eslint-disable-next-line max-len */ output.standard(`${chalk.cyan('change')} ${d.actual.name} ${d.actual.package.version} => ${d.ideal.package.version}`) } summary.changed++ diff --git a/lib/utils/tar.js b/lib/utils/tar.js index 63ef6067acb90..a744dca313257 100644 --- a/lib/utils/tar.js +++ b/lib/utils/tar.js @@ -36,7 +36,6 @@ const logTar = (tarball, { unicode = false, json, key } = {}) => { log.notice('', `package size: ${formatBytes(tarball.size)}`) log.notice('', `unpacked size: ${formatBytes(tarball.unpackedSize)}`) log.notice('', `shasum: ${tarball.shasum}`) - /* eslint-disable-next-line max-len */ log.notice('', `integrity: ${tarball.integrity.toString().slice(0, 20)}[...]${tarball.integrity.toString().slice(80)}`) if (tarball.bundled.length) { log.notice('', `bundled deps: ${tarball.bundled.length}`) diff --git a/lib/utils/verify-signatures.js b/lib/utils/verify-signatures.js index 0a32742b5ee2a..73a96cfe16488 100644 --- a/lib/utils/verify-signatures.js +++ b/lib/utils/verify-signatures.js @@ -75,10 +75,8 @@ class VerifySignatures { const verifiedBold = this.npm.chalk.bold('verified') if (this.verifiedSignatureCount) { if (this.verifiedSignatureCount === 1) { - /* eslint-disable-next-line max-len */ output.standard(`${this.verifiedSignatureCount} package has a ${verifiedBold} registry signature`) } else { - /* eslint-disable-next-line max-len */ output.standard(`${this.verifiedSignatureCount} packages have ${verifiedBold} registry signatures`) } output.standard('') @@ -86,10 +84,8 @@ class VerifySignatures { if (this.verifiedAttestationCount) { if (this.verifiedAttestationCount === 1) { - /* eslint-disable-next-line max-len */ output.standard(`${this.verifiedAttestationCount} package has a ${verifiedBold} attestation`) } else { - /* eslint-disable-next-line max-len */ output.standard(`${this.verifiedAttestationCount} packages have ${verifiedBold} attestations`) } output.standard('') @@ -98,10 +94,8 @@ class VerifySignatures { if (missing.length) { const missingClr = this.npm.chalk.redBright('missing') if (missing.length === 1) { - /* eslint-disable-next-line max-len */ output.standard(`1 package has a ${missingClr} registry signature but the registry is providing signing keys:`) } else { - /* eslint-disable-next-line max-len */ output.standard(`${missing.length} packages have ${missingClr} registry signatures but the registry is providing signing keys:`) } output.standard('') @@ -121,7 +115,6 @@ class VerifySignatures { if (invalidSignatures.length === 1) { output.standard(`1 package has an ${invalidClr} registry signature:`) } else { - /* eslint-disable-next-line max-len */ output.standard(`${invalidSignatures.length} packages have ${invalidClr} registry signatures:`) } output.standard('') @@ -136,7 +129,6 @@ class VerifySignatures { if (invalidAttestations.length === 1) { output.standard(`1 package has an ${invalidClr} attestation:`) } else { - /* eslint-disable-next-line max-len */ output.standard(`${invalidAttestations.length} packages have ${invalidClr} attestations:`) } output.standard('') @@ -147,10 +139,8 @@ class VerifySignatures { } if (invalid.length === 1) { - /* eslint-disable-next-line max-len */ output.standard(`Someone might have tampered with this package since it was published on the registry!`) } else { - /* eslint-disable-next-line max-len */ output.standard(`Someone might have tampered with these packages since they were published on the registry!`) } output.standard('') diff --git a/tap-snapshots/test/lib/commands/install.js.test.cjs b/tap-snapshots/test/lib/commands/install.js.test.cjs index 8f426ec3103ae..c36e9c190483e 100644 --- a/tap-snapshots/test/lib/commands/install.js.test.cjs +++ b/tap-snapshots/test/lib/commands/install.js.test.cjs @@ -134,7 +134,7 @@ silly logfile done cleaning log files verbose stack Error: The developer of this package has specified the following through devEngines verbose stack Invalid engine "runtime" verbose stack Invalid name "nondescript" does not match "node" for "runtime" -verbose stack at Install.checkDevEngines ({CWD}/lib/base-cmd.js:182:27) +verbose stack at Install.checkDevEngines ({CWD}/lib/base-cmd.js:181:27) verbose stack at MockNpm.#exec ({CWD}/lib/npm.js:251:7) verbose stack at MockNpm.exec ({CWD}/lib/npm.js:207:9) error code EBADDEVENGINES @@ -199,7 +199,7 @@ warn EBADDEVENGINES } verbose stack Error: The developer of this package has specified the following through devEngines verbose stack Invalid engine "runtime" verbose stack Invalid name "nondescript" does not match "node" for "runtime" -verbose stack at Install.checkDevEngines ({CWD}/lib/base-cmd.js:182:27) +verbose stack at Install.checkDevEngines ({CWD}/lib/base-cmd.js:181:27) verbose stack at MockNpm.#exec ({CWD}/lib/npm.js:251:7) verbose stack at MockNpm.exec ({CWD}/lib/npm.js:207:9) error code EBADDEVENGINES @@ -225,7 +225,7 @@ silly logfile done cleaning log files verbose stack Error: The developer of this package has specified the following through devEngines verbose stack Invalid engine "runtime" verbose stack Invalid name "nondescript" does not match "node" for "runtime" -verbose stack at Install.checkDevEngines ({CWD}/lib/base-cmd.js:182:27) +verbose stack at Install.checkDevEngines ({CWD}/lib/base-cmd.js:181:27) verbose stack at MockNpm.#exec ({CWD}/lib/npm.js:251:7) verbose stack at MockNpm.exec ({CWD}/lib/npm.js:207:9) error code EBADDEVENGINES diff --git a/test/lib/cli/exit-handler.js b/test/lib/cli/exit-handler.js index 939c9617aff56..484704c735279 100644 --- a/test/lib/cli/exit-handler.js +++ b/test/lib/cli/exit-handler.js @@ -46,7 +46,6 @@ t.cleanSnapshot = (path) => cleanDate(cleanCwd(path)) mockGlobals(t, { process: Object.assign(new EventEmitter(), { // these are process properties that are needed in the running code and tests - // eslint-disable-next-line max-len ...pick(process, 'version', 'execPath', 'stdout', 'stderr', 'stdin', 'cwd', 'chdir', 'env', 'umask'), pid: 123456, argv: ['/node', ...process.argv.slice(1)], diff --git a/test/lib/cli/validate-engines.js b/test/lib/cli/validate-engines.js index 1c0b59700a773..980b508f02d97 100644 --- a/test/lib/cli/validate-engines.js +++ b/test/lib/cli/validate-engines.js @@ -23,7 +23,6 @@ t.test('validate engines', async t => { node: 'v4.5.6', npm: 'v1.2.3', engines: '>=0', - /* eslint-disable-next-line max-len */ unsupportedMessage: 'npm v1.2.3 does not support Node.js v4.5.6. This version of npm supports the following node versions: `>=0`. You can find the latest version at https://nodejs.org/.', }) diff --git a/test/lib/commands/audit.js b/test/lib/commands/audit.js index e3bf40ee61373..bf0a055d13c71 100644 --- a/test/lib/commands/audit.js +++ b/test/lib/commands/audit.js @@ -825,12 +825,9 @@ t.test('audit signatures', async t => { packuments: [{ version: '1.0.0', dist: { - // eslint-disable-next-line max-len integrity: 'sha512-e+qfbn/zf1+rCza/BhIA//Awmf0v1pa5HQS8Xk8iXrn9bgytytVLqYD0P7NSqZ6IELTgq+tcDvLPkQjNHyWLNg==', tarball: 'https://registry.npmjs.org/sigstore/-/sigstore-1.0.0.tgz', - // eslint-disable-next-line max-len attestations: { url: 'https://registry.npmjs.org/-/npm/v1/attestations/sigstore@1.0.0', provenance: { predicateType: 'https://slsa.dev/provenance/v0.2' } }, - // eslint-disable-next-line max-len signatures: [{ keyid: 'SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA', sig: 'MEQCIBlpcHT68iWOpx8pJr3WUzD1EqQ7tb0CmY36ebbceR6IAiAVGRaxrFoyh0/5B7H1o4VFhfsHw9F8G+AxOZQq87q+lg==' }], }, }], @@ -844,12 +841,9 @@ t.test('audit signatures', async t => { packuments: [{ version: '1.0.0', dist: { - // eslint-disable-next-line max-len integrity: 'sha512-1dxsQwESDzACJjTdYHQ4wJ1f/of7jALWKfJEHSBWUQB/5UTJUx9SW6GHXp4mZ1KvdBRJCpGjssoPFGi4hvw8/A==', tarball: 'https://registry.npmjs.org/tuf-js/-/tuf-js-1.0.0.tgz', - // eslint-disable-next-line max-len attestations: { url: 'https://registry.npmjs.org/-/npm/v1/attestations/tuf-js@1.0.0', provenance: { predicateType: 'https://slsa.dev/provenance/v0.2' } }, - // eslint-disable-next-line max-len signatures: [{ keyid: 'SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA', sig: 'MEYCIQDgGQeY2QLkLuoO9YxOqFZ+a6zYuaZpXhc77kUfdCUXDQIhAJp/vV+9Xg1bfM5YlTvKIH9agUEOu5T76+tQaHY2vZyO' }], }, }], diff --git a/test/lib/commands/cache.js b/test/lib/commands/cache.js index 538a8c761a2d1..a1f2a8fbfda02 100644 --- a/test/lib/commands/cache.js +++ b/test/lib/commands/cache.js @@ -78,9 +78,7 @@ t.test('cache add single pkg', async t => { }) await npm.exec('cache', ['add', pkg]) t.equal(joinedOutput(), '') - // eslint-disable-next-line max-len t.resolves(cacache.get(cache, 'make-fetch-happen:request-cache:https://registry.npmjs.org/test-package/-/test-package-1.0.0.tgz')) - // eslint-disable-next-line max-len t.resolves(cacache.get(cache, 'make-fetch-happen:request-cache:https://registry.npmjs.org/test-package')) }) @@ -113,20 +111,15 @@ t.test('cache add multiple pkgs', async t => { }) await npm.exec('cache', ['add', pkg, pkg2]) t.equal(joinedOutput(), '') - // eslint-disable-next-line max-len t.resolves(cacache.get(cache, 'make-fetch-happen:request-cache:https://registry.npmjs.org/test-package/-/test-package-1.0.0.tgz')) - // eslint-disable-next-line max-len t.resolves(cacache.get(cache, 'make-fetch-happen:request-cache:https://registry.npmjs.org/test-package')) - // eslint-disable-next-line max-len t.resolves(cacache.get(cache, 'make-fetch-happen:request-cache:https://registry.npmjs.org/test-package-two/-/test-package-two-1.0.0.tgz')) - // eslint-disable-next-line max-len t.resolves(cacache.get(cache, 'make-fetch-happen:request-cache:https://registry.npmjs.org/test-package-two')) }) t.test('cache ls', async t => { const keys = [ 'make-fetch-happen:request-cache:https://registry.npmjs.org/test-package', - // eslint-disable-next-line max-len 'make-fetch-happen:request-cache:https://registry.npmjs.org/test-package/-/test-package-1.0.0.tgz', ] const { npm, joinedOutput } = await loadMockNpm(t) @@ -204,10 +197,8 @@ t.test('cache ls tagged', async t => { t.test('cache ls scoped and scoped slash', async t => { const keys = [ - // eslint-disable-next-line max-len 'make-fetch-happen:request-cache:https://registry.npmjs.org/@fritzy/staydown/-/@fritzy/staydown-3.1.1.tgz', 'make-fetch-happen:request-cache:https://registry.npmjs.org/@fritzy%2fstaydown', - // eslint-disable-next-line max-len 'make-fetch-happen:request-cache:https://registry.npmjs.org/@gar/npm-expansion/-/@gar/npm-expansion-2.1.0.tgz', 'make-fetch-happen:request-cache:https://registry.npmjs.org/@gar%2fnpm-expansion', ] @@ -248,16 +239,11 @@ t.test('cache ls missing packument version not an object', async t => { t.test('cache rm', async t => { const { npm, joinedOutput } = await loadMockNpm(t) const cache = path.join(npm.cache, '_cacache') - // eslint-disable-next-line max-len await cacache.put(cache, 'make-fetch-happen:request-cache:https://registry.npmjs.org/test-package', '{}') - // eslint-disable-next-line max-len await cacache.put(cache, 'make-fetch-happen:request-cache:https://registry.npmjs.org/test-package/-/test-package-1.0.0.tgz', 'test data') - // eslint-disable-next-line max-len await npm.exec('cache', ['rm', 'make-fetch-happen:request-cache:https://registry.npmjs.org/test-package/-/test-package-1.0.0.tgz']) t.matchSnapshot(joinedOutput(), 'logs deleting single entry') - // eslint-disable-next-line max-len t.resolves(cacache.get(cache, 'make-fetch-happen:request-cache:https://registry.npmjs.org/test-package')) - // eslint-disable-next-line max-len t.rejects(cacache.get(cache, 'make-fetch-happen:request-cache:https://registry.npmjs.org/test-package/-/test-package-1.0.0.tgz')) }) diff --git a/test/lib/commands/help-search.js b/test/lib/commands/help-search.js index 354fb0291eb2f..d7f85355a7191 100644 --- a/test/lib/commands/help-search.js +++ b/test/lib/commands/help-search.js @@ -1,7 +1,6 @@ const t = require('tap') const { load: loadMockNpm } = require('../../fixtures/mock-npm.js') -/* eslint-disable max-len */ const docsFixtures = { dir1: { 'npm-exec.md': 'the exec command\nhelp has multiple lines of exec help\none of them references exec', @@ -19,7 +18,6 @@ const docsFixtures = { 'npm-extra-useless.md': 'exec\nexec\nexec', }, } -/* eslint-enable max-len */ const execHelpSearch = async (t, exec = [], opts) => { const { npm, ...rest } = await loadMockNpm(t, { diff --git a/test/lib/commands/ls.js b/test/lib/commands/ls.js index 2147b3f036d72..cf96452d6cb5d 100644 --- a/test/lib/commands/ls.js +++ b/test/lib/commands/ls.js @@ -408,7 +408,6 @@ t.test('ls', async t => { await ls.exec(['dog@*', 'chai@1.0.0']) t.matchSnapshot( cleanCwd(result()), - /* eslint-disable-next-line max-len */ 'should output tree contaning only occurrences of multiple filtered packages and their ancestors' ) }) @@ -1314,7 +1313,6 @@ t.test('ls', async t => { name: 'abbrev', version: '1.1.1', from: 'git+https://github.com/isaacs/abbrev-js.git', - /* eslint-disable-next-line max-len */ resolved: 'git+https://github.com/isaacs/abbrev-js.git#b8f3a2fc0c3bb8ffd8b0d0072cc6b5a3667e963c', }, }, @@ -1325,7 +1323,6 @@ t.test('ls', async t => { version: '1.1.1', _id: 'abbrev@1.1.1', _from: 'git+https://github.com/isaacs/abbrev-js.git', - /* eslint-disable-next-line max-len */ _resolved: 'git+https://github.com/isaacs/abbrev-js.git#b8f3a2fc0c3bb8ffd8b0d0072cc6b5a3667e963c', _requested: { type: 'git', @@ -1372,7 +1369,6 @@ t.test('ls', async t => { a: { version: '1.0.1', resolved: 'foo@dog://b8f3a2fc0c3bb8ffd8b0d0072cc6b5a3667e963c', - /* eslint-disable-next-line max-len */ integrity: 'sha512-8AN9lNCcBt5Xeje7fMEEpp5K3rgcAzIpTtAjYb/YMUYu8SbIVF6wz0WqACDVKvpQOUcSfNHZQNLNmue0QSwXOQ==', }, }, @@ -1901,7 +1897,6 @@ t.test('ls --parseable', async t => { await ls.exec(['dog@*', 'chai@1.0.0']) t.matchSnapshot( cleanCwd(result()), - /* eslint-disable-next-line max-len */ 'should output parseable contaning only occurrences of multiple filtered packages and their ancestors' ) }) @@ -2465,7 +2460,6 @@ t.test('ls --parseable', async t => { 'node_modules/abbrev': { name: 'abbrev', version: '1.1.1', - /* eslint-disable-next-line max-len */ resolved: 'git+https://github.com/isaacs/abbrev-js.git#b8f3a2fc0c3bb8ffd8b0d0072cc6b5a3667e963c', }, }, @@ -2476,7 +2470,6 @@ t.test('ls --parseable', async t => { version: '1.1.1', _id: 'abbrev@1.1.1', _from: 'git+https://github.com/isaacs/abbrev-js.git', - /* eslint-disable-next-line max-len */ _resolved: 'git+https://github.com/isaacs/abbrev-js.git#b8f3a2fc0c3bb8ffd8b0d0072cc6b5a3667e963c', _requested: { type: 'git', @@ -3043,7 +3036,6 @@ t.test('ls --json', async t => { }, }, }, - /* eslint-disable-next-line max-len */ 'should output json contaning only occurrences of multiple filtered packages and their ancestors' ) }) @@ -3489,9 +3481,7 @@ t.test('ls --json', async t => { 'node_modules/@isaacs/dedupe-tests-a': { name: '@isaacs/dedupe-tests-a', version: '1.0.1', - /* eslint-disable-next-line max-len */ resolved: 'https://registry.npmjs.org/@isaacs/dedupe-tests-a/-/dedupe-tests-a-1.0.1.tgz', - /* eslint-disable-next-line max-len */ integrity: 'sha512-8AN9lNCcBt5Xeje7fMEEpp5K3rgcAzIpTtAjYb/YMUYu8SbIVF6wz0WqACDVKvpQOUcSfNHZQNLNmue0QSwXOQ==', dependencies: { '@isaacs/dedupe-tests-b': '1', @@ -3500,26 +3490,20 @@ t.test('ls --json', async t => { 'node_modules/@isaacs/dedupe-tests-a/node_modules/@isaacs/dedupe-tests-b': { name: '@isaacs/dedupe-tests-b', version: '1.0.0', - /* eslint-disable-next-line max-len */ resolved: 'https://registry.npmjs.org/@isaacs/dedupe-tests-b/-/dedupe-tests-b-1.0.0.tgz', - /* eslint-disable-next-line max-len */ integrity: 'sha512-3nmvzIb8QL8OXODzipwoV3U8h9OQD9g9RwOPuSBQqjqSg9JZR1CCFOWNsDUtOfmwY8HFUJV9EAZ124uhqVxq+w==', }, 'node_modules/@isaacs/dedupe-tests-b': { name: '@isaacs/dedupe-tests-b', version: '2.0.0', - /* eslint-disable-next-line max-len */ resolved: 'https://registry.npmjs.org/@isaacs/dedupe-tests-b/-/dedupe-tests-b-2.0.0.tgz', - /* eslint-disable-next-line max-len */ integrity: 'sha512-KTYkpRv9EzlmCg4Gsm/jpclWmRYFCXow8GZKJXjK08sIZBlElTZEa5Bw/UQxIvEfcKmWXczSqItD49Kr8Ax4UA==', }, }, dependencies: { '@isaacs/dedupe-tests-a': { version: '1.0.1', - /* eslint-disable-next-line max-len */ resolved: 'https://registry.npmjs.org/@isaacs/dedupe-tests-a/-/dedupe-tests-a-1.0.1.tgz', - /* eslint-disable-next-line max-len */ integrity: 'sha512-8AN9lNCcBt5Xeje7fMEEpp5K3rgcAzIpTtAjYb/YMUYu8SbIVF6wz0WqACDVKvpQOUcSfNHZQNLNmue0QSwXOQ==', requires: { '@isaacs/dedupe-tests-b': '1', @@ -3527,18 +3511,14 @@ t.test('ls --json', async t => { dependencies: { '@isaacs/dedupe-tests-b': { version: '1.0.0', - /* eslint-disable-next-line max-len */ resolved: 'https://registry.npmjs.org/@isaacs/dedupe-tests-b/-/dedupe-tests-b-1.0.0.tgz', - /* eslint-disable-next-line max-len */ integrity: 'sha512-3nmvzIb8QL8OXODzipwoV3U8h9OQD9g9RwOPuSBQqjqSg9JZR1CCFOWNsDUtOfmwY8HFUJV9EAZ124uhqVxq+w==', }, }, }, '@isaacs/dedupe-tests-b': { version: '2.0.0', - /* eslint-disable-next-line max-len */ resolved: 'https://registry.npmjs.org/@isaacs/dedupe-tests-b/-/dedupe-tests-b-2.0.0.tgz', - /* eslint-disable-next-line max-len */ integrity: 'sha512-KTYkpRv9EzlmCg4Gsm/jpclWmRYFCXow8GZKJXjK08sIZBlElTZEa5Bw/UQxIvEfcKmWXczSqItD49Kr8Ax4UA==', }, }, @@ -3572,7 +3552,6 @@ t.test('ls --json', async t => { extraneous: true, overridden: false, problems: [ - /* eslint-disable-next-line max-len */ 'extraneous: @isaacs/dedupe-tests-b@ {CWD}/prefix/node_modules/@isaacs/dedupe-tests-a/node_modules/@isaacs/dedupe-tests-b', ], }, @@ -3586,7 +3565,6 @@ t.test('ls --json', async t => { }, }, problems: [ - /* eslint-disable-next-line max-len */ 'extraneous: @isaacs/dedupe-tests-b@ {CWD}/prefix/node_modules/@isaacs/dedupe-tests-a/node_modules/@isaacs/dedupe-tests-b', ], }, @@ -4212,7 +4190,6 @@ t.test('ls --json', async t => { version: '1.1.1', id: 'abbrev@1.1.1', from: 'git+https://github.com/isaacs/abbrev-js.git', - /* eslint-disable-next-line max-len */ resolved: 'git+https://github.com/isaacs/abbrev-js.git#b8f3a2fc0c3bb8ffd8b0d0072cc6b5a3667e963c', }, }, @@ -4223,7 +4200,6 @@ t.test('ls --json', async t => { version: '1.1.1', _id: 'abbrev@1.1.1', _from: 'git+https://github.com/isaacs/abbrev-js.git', - /* eslint-disable-next-line max-len */ _resolved: 'git+https://github.com/isaacs/abbrev-js.git#b8f3a2fc0c3bb8ffd8b0d0072cc6b5a3667e963c', _requested: { type: 'git', @@ -4249,7 +4225,6 @@ t.test('ls --json', async t => { abbrev: { version: '1.1.1', overridden: false, - /* eslint-disable-next-line max-len */ resolved: 'git+ssh://git@github.com/isaacs/abbrev-js.git#b8f3a2fc0c3bb8ffd8b0d0072cc6b5a3667e963c', }, }, @@ -4813,7 +4788,6 @@ t.test('ls --package-lock-only', async t => { }, }, }, - /* eslint-disable-next-line max-len */ 'should output json contaning only occurrences of multiple filtered packages and their ancestors' ) }) @@ -5137,9 +5111,7 @@ t.test('ls --package-lock-only', async t => { 'node_modules/@isaacs/dedupe-tests-a': { name: '@isaacs/dedupe-tests-a', version: '1.0.1', - /* eslint-disable-next-line max-len */ resolved: 'https://registry.npmjs.org/@isaacs/dedupe-tests-a/-/dedupe-tests-a-1.0.1.tgz', - /* eslint-disable-next-line max-len */ integrity: 'sha512-8AN9lNCcBt5Xeje7fMEEpp5K3rgcAzIpTtAjYb/YMUYu8SbIVF6wz0WqACDVKvpQOUcSfNHZQNLNmue0QSwXOQ==', dependencies: { '@isaacs/dedupe-tests-b': '1', @@ -5148,26 +5120,20 @@ t.test('ls --package-lock-only', async t => { 'node_modules/@isaacs/dedupe-tests-a/node_modules/@isaacs/dedupe-tests-b': { name: '@isaacs/dedupe-tests-b', version: '1.0.0', - /* eslint-disable-next-line max-len */ resolved: 'https://registry.npmjs.org/@isaacs/dedupe-tests-b/-/dedupe-tests-b-1.0.0.tgz', - /* eslint-disable-next-line max-len */ integrity: 'sha512-3nmvzIb8QL8OXODzipwoV3U8h9OQD9g9RwOPuSBQqjqSg9JZR1CCFOWNsDUtOfmwY8HFUJV9EAZ124uhqVxq+w==', }, 'node_modules/@isaacs/dedupe-tests-b': { name: '@isaacs/dedupe-tests-b', version: '2.0.0', - /* eslint-disable-next-line max-len */ resolved: 'https://registry.npmjs.org/@isaacs/dedupe-tests-b/-/dedupe-tests-b-2.0.0.tgz', - /* eslint-disable-next-line max-len */ integrity: 'sha512-KTYkpRv9EzlmCg4Gsm/jpclWmRYFCXow8GZKJXjK08sIZBlElTZEa5Bw/UQxIvEfcKmWXczSqItD49Kr8Ax4UA==', }, }, dependencies: { '@isaacs/dedupe-tests-a': { version: '1.0.1', - /* eslint-disable-next-line max-len */ resolved: 'https://registry.npmjs.org/@isaacs/dedupe-tests-a/-/dedupe-tests-a-1.0.1.tgz', - /* eslint-disable-next-line max-len */ integrity: 'sha512-8AN9lNCcBt5Xeje7fMEEpp5K3rgcAzIpTtAjYb/YMUYu8SbIVF6wz0WqACDVKvpQOUcSfNHZQNLNmue0QSwXOQ==', requires: { '@isaacs/dedupe-tests-b': '1', @@ -5175,18 +5141,14 @@ t.test('ls --package-lock-only', async t => { dependencies: { '@isaacs/dedupe-tests-b': { version: '1.0.0', - /* eslint-disable-next-line max-len */ resolved: 'https://registry.npmjs.org/@isaacs/dedupe-tests-b/-/dedupe-tests-b-1.0.0.tgz', - /* eslint-disable-next-line max-len */ integrity: 'sha512-3nmvzIb8QL8OXODzipwoV3U8h9OQD9g9RwOPuSBQqjqSg9JZR1CCFOWNsDUtOfmwY8HFUJV9EAZ124uhqVxq+w==', }, }, }, '@isaacs/dedupe-tests-b': { version: '2.0.0', - /* eslint-disable-next-line max-len */ resolved: 'https://registry.npmjs.org/@isaacs/dedupe-tests-b/-/dedupe-tests-b-2.0.0.tgz', - /* eslint-disable-next-line max-len */ integrity: 'sha512-KTYkpRv9EzlmCg4Gsm/jpclWmRYFCXow8GZKJXjK08sIZBlElTZEa5Bw/UQxIvEfcKmWXczSqItD49Kr8Ax4UA==', }, }, @@ -5298,7 +5260,6 @@ t.test('ls --package-lock-only', async t => { requires: true, dependencies: { abbrev: { - /* eslint-disable-next-line max-len */ version: 'git+ssh://git@github.com/isaacs/abbrev-js.git#b8f3a2fc0c3bb8ffd8b0d0072cc6b5a3667e963c', from: 'abbrev@git+https://github.com/isaacs/abbrev-js.git', }, @@ -5314,7 +5275,6 @@ t.test('ls --package-lock-only', async t => { version: '1.0.0', dependencies: { abbrev: { - /* eslint-disable-next-line max-len */ resolved: 'git+ssh://git@github.com/isaacs/abbrev-js.git#b8f3a2fc0c3bb8ffd8b0d0072cc6b5a3667e963c', overridden: false, }, diff --git a/test/lib/utils/sbom-cyclonedx.js b/test/lib/utils/sbom-cyclonedx.js index 42819b8a77431..a40831c9fa05a 100644 --- a/test/lib/utils/sbom-cyclonedx.js +++ b/test/lib/utils/sbom-cyclonedx.js @@ -107,7 +107,6 @@ t.test('single node - with author object', t => { }) t.test('single node - with integrity', t => { - /* eslint-disable-next-line max-len */ const node = { ...root, integrity: 'sha512-1RkbFGUKex4lvsB9yhIfWltJM5cZKUftB2eNajaDv3dCMEp49iBG0K14uH8NnX9IPux2+mK7JGEOB0jn48/J6w==' } const res = cyclonedxOutput({ npm, nodes: [node] }) t.matchSnapshot(JSON.stringify(res)) diff --git a/test/lib/utils/sbom-spdx.js b/test/lib/utils/sbom-spdx.js index ffa92f0e3a30f..68b102854315e 100644 --- a/test/lib/utils/sbom-spdx.js +++ b/test/lib/utils/sbom-spdx.js @@ -163,7 +163,6 @@ t.test('single node - with homepage', t => { }) t.test('single node - with integrity', t => { - /* eslint-disable-next-line max-len */ const node = { ...root, integrity: 'sha512-1RkbFGUKex4lvsB9yhIfWltJM5cZKUftB2eNajaDv3dCMEp49iBG0K14uH8NnX9IPux2+mK7JGEOB0jn48/J6w==' } const res = spdxOutput({ npm, nodes: [node] }) t.matchSnapshot(JSON.stringify(res)) From e90c6feeacdf9ad010d4d73b65d7dd7d3b86efe2 Mon Sep 17 00:00:00 2001 From: milaninfy <111582375+milaninfy@users.noreply.github.com> Date: Tue, 21 Jan 2025 10:48:11 -0500 Subject: [PATCH 10/24] docs: depth flag default value (#8051) documentation of `ls` command specifies that `depth` flag if not set defaults to `1` but as per code it uses 0 as default value. https://github.com/npm/cli/blob/dc31c1bdc6658ab69554adcf2988ee99a615c409/lib/commands/ls.js#L113-L116 fixes: https://github.com/npm/cli/issues/7979 --- tap-snapshots/test/lib/docs.js.test.cjs | 2 +- workspaces/config/lib/definitions/definitions.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tap-snapshots/test/lib/docs.js.test.cjs b/tap-snapshots/test/lib/docs.js.test.cjs index baceb5dcd3e3c..ba84dda4fe399 100644 --- a/tap-snapshots/test/lib/docs.js.test.cjs +++ b/tap-snapshots/test/lib/docs.js.test.cjs @@ -405,7 +405,7 @@ are same as \`cpu\` field of package.json, which comes from \`process.arch\`. #### \`depth\` -* Default: \`Infinity\` if \`--all\` is set, otherwise \`1\` +* Default: \`Infinity\` if \`--all\` is set, otherwise \`0\` * Type: null or Number The depth to go when recursing packages for \`npm ls\`. diff --git a/workspaces/config/lib/definitions/definitions.js b/workspaces/config/lib/definitions/definitions.js index cbad7c7354cb0..4c404524fd7dc 100644 --- a/workspaces/config/lib/definitions/definitions.js +++ b/workspaces/config/lib/definitions/definitions.js @@ -461,7 +461,7 @@ const definitions = { depth: new Definition('depth', { default: null, defaultDescription: ` - \`Infinity\` if \`--all\` is set, otherwise \`1\` + \`Infinity\` if \`--all\` is set, otherwise \`0\` `, type: [null, Number], description: ` From 859a71c59ea5f91f21a8410db46585a2fc0a8126 Mon Sep 17 00:00:00 2001 From: Gar Date: Tue, 21 Jan 2025 08:55:27 -0800 Subject: [PATCH 11/24] chore: update node versions for release integration tests (#8052) Closes https://github.com/npm/statusboard/issues/931 --- .github/workflows/node-integration.yml | 2 +- .github/workflows/release-integration.yml | 4 ++-- scripts/template-oss/_job-release-integration-yml.hbs | 4 ++-- scripts/template-oss/node-integration-yml.hbs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/node-integration.yml b/.github/workflows/node-integration.yml index 9a6a43125c894..054b7f1b657a7 100644 --- a/.github/workflows/node-integration.yml +++ b/.github/workflows/node-integration.yml @@ -80,7 +80,7 @@ jobs: echo "::group::extracting source from $nodeUrl" mkdir -p "$sourceDir" - curl -sSL "$nodeUrl" | tar xz -C "$sourceDir" --strip=1 + curl -sSL "$nodeUrl" | tar xz -C "$sourceDir" --strip=1 echo "::endgroup::" echo "::group::cloning npm" diff --git a/.github/workflows/release-integration.yml b/.github/workflows/release-integration.yml index cfb18e6abc8ba..ddbcbf7be74ee 100644 --- a/.github/workflows/release-integration.yml +++ b/.github/workflows/release-integration.yml @@ -22,8 +22,8 @@ jobs: fail-fast: false matrix: nodeVersion: - - 18 - - 20 + - 22 + - 24 - nightly uses: ./.github/workflows/node-integration.yml with: diff --git a/scripts/template-oss/_job-release-integration-yml.hbs b/scripts/template-oss/_job-release-integration-yml.hbs index 4898733c57e4c..35c1e5ca1c40e 100644 --- a/scripts/template-oss/_job-release-integration-yml.hbs +++ b/scripts/template-oss/_job-release-integration-yml.hbs @@ -2,8 +2,8 @@ strategy: fail-fast: false matrix: nodeVersion: - - 18 - - 20 + - 22 + - 24 - nightly uses: ./.github/workflows/node-integration.yml with: diff --git a/scripts/template-oss/node-integration-yml.hbs b/scripts/template-oss/node-integration-yml.hbs index 4ee4e1d30451a..9b4391d3991f2 100644 --- a/scripts/template-oss/node-integration-yml.hbs +++ b/scripts/template-oss/node-integration-yml.hbs @@ -78,7 +78,7 @@ jobs: echo "::group::extracting source from $nodeUrl" mkdir -p "$sourceDir" - curl -sSL "$nodeUrl" | tar xz -C "$sourceDir" --strip=1 + curl -sSL "$nodeUrl" | tar xz -C "$sourceDir" --strip=1 echo "::endgroup::" echo "::group::cloning npm" From f1af61f917e58a0a45d2b15d1e5600988b2c824f Mon Sep 17 00:00:00 2001 From: Maksim Koryukov Date: Tue, 21 Jan 2025 14:24:40 -0400 Subject: [PATCH 12/24] docs: fix typos in "package-json" (#8041) This PR fixes small typos in the documentation for "configuring npm/package-json" --- docs/lib/content/configuring-npm/package-json.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/lib/content/configuring-npm/package-json.md b/docs/lib/content/configuring-npm/package-json.md index 06af27f9b2f3e..a92e5a2183b4c 100644 --- a/docs/lib/content/configuring-npm/package-json.md +++ b/docs/lib/content/configuring-npm/package-json.md @@ -121,7 +121,7 @@ SPDX license identifier for the license you're using, like this: ``` You can check [the full list of SPDX license -IDs](https://spdx.org/licenses/). Ideally you should pick one that is +IDs](https://spdx.org/licenses/). Ideally, you should pick one that is [OSI](https://opensource.org/licenses/) approved. If your package is licensed under multiple common licenses, use an [SPDX @@ -623,7 +623,7 @@ See [semver](https://github.com/npm/node-semver#versions) for more details about * `tag` A specific version tagged and published as `tag` See [`npm dist-tag`](/commands/npm-dist-tag) * `path/path/path` See [Local Paths](#local-paths) below -* `npm:@scope/pkg@version` Custom alias for a pacakge See [`package-spec`](/using-npm/package-spec#aliases) +* `npm:@scope/pkg@version` Custom alias for a package See [`package-spec`](/using-npm/package-spec#aliases) For example, these are all valid: From 215ebe4d8f6c7f30d4b6a68fa11a3372c132929e Mon Sep 17 00:00:00 2001 From: Gar Date: Tue, 21 Jan 2025 08:57:50 -0800 Subject: [PATCH 13/24] deps: chalk@5.4.1 --- node_modules/chalk/package.json | 6 +++--- .../chalk/source/vendor/supports-color/browser.js | 8 ++++++-- node_modules/chalk/source/vendor/supports-color/index.js | 4 ++-- package-lock.json | 8 ++++---- package.json | 2 +- 5 files changed, 16 insertions(+), 12 deletions(-) diff --git a/node_modules/chalk/package.json b/node_modules/chalk/package.json index 3c500105bcbf2..23b4ce33dc667 100644 --- a/node_modules/chalk/package.json +++ b/node_modules/chalk/package.json @@ -1,6 +1,6 @@ { "name": "chalk", - "version": "5.3.0", + "version": "5.4.1", "description": "Terminal string styling done right", "license": "MIT", "repository": "chalk/chalk", @@ -16,6 +16,7 @@ } }, "types": "./source/index.d.ts", + "sideEffects": false, "engines": { "node": "^12.17.0 || ^14.13 || >=16.0.0" }, @@ -58,10 +59,9 @@ "log-update": "^5.0.0", "matcha": "^0.7.0", "tsd": "^0.19.0", - "xo": "^0.53.0", + "xo": "^0.57.0", "yoctodelay": "^2.0.0" }, - "sideEffects": false, "xo": { "rules": { "unicorn/prefer-string-slice": "off", diff --git a/node_modules/chalk/source/vendor/supports-color/browser.js b/node_modules/chalk/source/vendor/supports-color/browser.js index 9fa6888f10288..fbb6ce0fc9ab9 100644 --- a/node_modules/chalk/source/vendor/supports-color/browser.js +++ b/node_modules/chalk/source/vendor/supports-color/browser.js @@ -1,14 +1,18 @@ /* eslint-env browser */ const level = (() => { - if (navigator.userAgentData) { + if (!('navigator' in globalThis)) { + return 0; + } + + if (globalThis.navigator.userAgentData) { const brand = navigator.userAgentData.brands.find(({brand}) => brand === 'Chromium'); if (brand && brand.version > 93) { return 3; } } - if (/\b(Chrome|Chromium)\//.test(navigator.userAgent)) { + if (/\b(Chrome|Chromium)\//.test(globalThis.navigator.userAgent)) { return 1; } diff --git a/node_modules/chalk/source/vendor/supports-color/index.js b/node_modules/chalk/source/vendor/supports-color/index.js index 4ce0a2da8d224..1388372674d49 100644 --- a/node_modules/chalk/source/vendor/supports-color/index.js +++ b/node_modules/chalk/source/vendor/supports-color/index.js @@ -112,11 +112,11 @@ function _supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) { } if ('CI' in env) { - if ('GITHUB_ACTIONS' in env || 'GITEA_ACTIONS' in env) { + if (['GITHUB_ACTIONS', 'GITEA_ACTIONS', 'CIRCLECI'].some(key => key in env)) { return 3; } - if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'BUILDKITE', 'DRONE'].some(sign => sign in env) || env.CI_NAME === 'codeship') { + if (['TRAVIS', 'APPVEYOR', 'GITLAB_CI', 'BUILDKITE', 'DRONE'].some(sign => sign in env) || env.CI_NAME === 'codeship') { return 1; } diff --git a/package-lock.json b/package-lock.json index be2599616fcdc..84095a12dea59 100644 --- a/package-lock.json +++ b/package-lock.json @@ -97,7 +97,7 @@ "abbrev": "^3.0.0", "archy": "~1.0.0", "cacache": "^19.0.1", - "chalk": "^5.3.0", + "chalk": "^5.4.1", "ci-info": "^4.1.0", "cli-columns": "^4.0.0", "fastest-levenshtein": "^1.0.16", @@ -5887,9 +5887,9 @@ } }, "node_modules/chalk": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", - "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz", + "integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==", "inBundle": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index 13a79db3f9a9d..82bff2ca7baeb 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "abbrev": "^3.0.0", "archy": "~1.0.0", "cacache": "^19.0.1", - "chalk": "^5.3.0", + "chalk": "^5.4.1", "ci-info": "^4.1.0", "cli-columns": "^4.0.0", "fastest-levenshtein": "^1.0.16", From a65e5ceb15c4aad6bde1ffdbee7da6f685caf81e Mon Sep 17 00:00:00 2001 From: Gar Date: Tue, 21 Jan 2025 08:59:34 -0800 Subject: [PATCH 14/24] deps: @sigstore/protobuf-specs@0.3.3 --- .../dist/__generated__/events.js | 4 +- .../google/api/field_behavior.js | 8 ++-- .../google/protobuf/descriptor.js | 38 +++++++++---------- .../dist/__generated__/sigstore_common.js | 24 ++++++------ .../dist/__generated__/sigstore_trustroot.js | 4 +- .../__generated__/sigstore_verification.js | 6 ++- .../@sigstore/protobuf-specs/package.json | 8 ++-- package-lock.json | 8 ++-- 8 files changed, 53 insertions(+), 47 deletions(-) diff --git a/node_modules/@sigstore/protobuf-specs/dist/__generated__/events.js b/node_modules/@sigstore/protobuf-specs/dist/__generated__/events.js index 073093b8371a8..b93ff74471bd6 100644 --- a/node_modules/@sigstore/protobuf-specs/dist/__generated__/events.js +++ b/node_modules/@sigstore/protobuf-specs/dist/__generated__/events.js @@ -162,8 +162,8 @@ function base64FromBytes(arr) { } } function fromTimestamp(t) { - let millis = Number(t.seconds) * 1000; - millis += t.nanos / 1000000; + let millis = Number(t.seconds) * 1_000; + millis += t.nanos / 1_000_000; return new Date(millis); } function fromJsonTimestamp(o) { diff --git a/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/api/field_behavior.js b/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/api/field_behavior.js index da627499ad765..a7008ddb9da89 100644 --- a/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/api/field_behavior.js +++ b/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/api/field_behavior.js @@ -1,7 +1,9 @@ "use strict"; /* eslint-disable */ Object.defineProperty(exports, "__esModule", { value: true }); -exports.fieldBehaviorToJSON = exports.fieldBehaviorFromJSON = exports.FieldBehavior = void 0; +exports.FieldBehavior = void 0; +exports.fieldBehaviorFromJSON = fieldBehaviorFromJSON; +exports.fieldBehaviorToJSON = fieldBehaviorToJSON; /** * An indicator of the behavior of a given field (for example, that a field * is required in requests, or given as output but ignored as input). @@ -52,7 +54,7 @@ var FieldBehavior; * provided. Additionally, the list's order may or may not be stable. */ FieldBehavior[FieldBehavior["UNORDERED_LIST"] = 6] = "UNORDERED_LIST"; -})(FieldBehavior = exports.FieldBehavior || (exports.FieldBehavior = {})); +})(FieldBehavior || (exports.FieldBehavior = FieldBehavior = {})); function fieldBehaviorFromJSON(object) { switch (object) { case 0: @@ -80,7 +82,6 @@ function fieldBehaviorFromJSON(object) { throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FieldBehavior"); } } -exports.fieldBehaviorFromJSON = fieldBehaviorFromJSON; function fieldBehaviorToJSON(object) { switch (object) { case FieldBehavior.FIELD_BEHAVIOR_UNSPECIFIED: @@ -101,7 +102,6 @@ function fieldBehaviorToJSON(object) { throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FieldBehavior"); } } -exports.fieldBehaviorToJSON = fieldBehaviorToJSON; var tsProtoGlobalThis = (() => { if (typeof globalThis !== "undefined") { return globalThis; diff --git a/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/descriptor.js b/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/descriptor.js index d429aac846043..24074b87d5d99 100644 --- a/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/descriptor.js +++ b/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/descriptor.js @@ -1,7 +1,19 @@ "use strict"; /* eslint-disable */ Object.defineProperty(exports, "__esModule", { value: true }); -exports.GeneratedCodeInfo_Annotation = exports.GeneratedCodeInfo = exports.SourceCodeInfo_Location = exports.SourceCodeInfo = exports.UninterpretedOption_NamePart = exports.UninterpretedOption = exports.MethodOptions = exports.ServiceOptions = exports.EnumValueOptions = exports.EnumOptions = exports.OneofOptions = exports.FieldOptions = exports.MessageOptions = exports.FileOptions = exports.MethodDescriptorProto = exports.ServiceDescriptorProto = exports.EnumValueDescriptorProto = exports.EnumDescriptorProto_EnumReservedRange = exports.EnumDescriptorProto = exports.OneofDescriptorProto = exports.FieldDescriptorProto = exports.ExtensionRangeOptions = exports.DescriptorProto_ReservedRange = exports.DescriptorProto_ExtensionRange = exports.DescriptorProto = exports.FileDescriptorProto = exports.FileDescriptorSet = exports.methodOptions_IdempotencyLevelToJSON = exports.methodOptions_IdempotencyLevelFromJSON = exports.MethodOptions_IdempotencyLevel = exports.fieldOptions_JSTypeToJSON = exports.fieldOptions_JSTypeFromJSON = exports.FieldOptions_JSType = exports.fieldOptions_CTypeToJSON = exports.fieldOptions_CTypeFromJSON = exports.FieldOptions_CType = exports.fileOptions_OptimizeModeToJSON = exports.fileOptions_OptimizeModeFromJSON = exports.FileOptions_OptimizeMode = exports.fieldDescriptorProto_LabelToJSON = exports.fieldDescriptorProto_LabelFromJSON = exports.FieldDescriptorProto_Label = exports.fieldDescriptorProto_TypeToJSON = exports.fieldDescriptorProto_TypeFromJSON = exports.FieldDescriptorProto_Type = void 0; +exports.GeneratedCodeInfo_Annotation = exports.GeneratedCodeInfo = exports.SourceCodeInfo_Location = exports.SourceCodeInfo = exports.UninterpretedOption_NamePart = exports.UninterpretedOption = exports.MethodOptions = exports.ServiceOptions = exports.EnumValueOptions = exports.EnumOptions = exports.OneofOptions = exports.FieldOptions = exports.MessageOptions = exports.FileOptions = exports.MethodDescriptorProto = exports.ServiceDescriptorProto = exports.EnumValueDescriptorProto = exports.EnumDescriptorProto_EnumReservedRange = exports.EnumDescriptorProto = exports.OneofDescriptorProto = exports.FieldDescriptorProto = exports.ExtensionRangeOptions = exports.DescriptorProto_ReservedRange = exports.DescriptorProto_ExtensionRange = exports.DescriptorProto = exports.FileDescriptorProto = exports.FileDescriptorSet = exports.MethodOptions_IdempotencyLevel = exports.FieldOptions_JSType = exports.FieldOptions_CType = exports.FileOptions_OptimizeMode = exports.FieldDescriptorProto_Label = exports.FieldDescriptorProto_Type = void 0; +exports.fieldDescriptorProto_TypeFromJSON = fieldDescriptorProto_TypeFromJSON; +exports.fieldDescriptorProto_TypeToJSON = fieldDescriptorProto_TypeToJSON; +exports.fieldDescriptorProto_LabelFromJSON = fieldDescriptorProto_LabelFromJSON; +exports.fieldDescriptorProto_LabelToJSON = fieldDescriptorProto_LabelToJSON; +exports.fileOptions_OptimizeModeFromJSON = fileOptions_OptimizeModeFromJSON; +exports.fileOptions_OptimizeModeToJSON = fileOptions_OptimizeModeToJSON; +exports.fieldOptions_CTypeFromJSON = fieldOptions_CTypeFromJSON; +exports.fieldOptions_CTypeToJSON = fieldOptions_CTypeToJSON; +exports.fieldOptions_JSTypeFromJSON = fieldOptions_JSTypeFromJSON; +exports.fieldOptions_JSTypeToJSON = fieldOptions_JSTypeToJSON; +exports.methodOptions_IdempotencyLevelFromJSON = methodOptions_IdempotencyLevelFromJSON; +exports.methodOptions_IdempotencyLevelToJSON = methodOptions_IdempotencyLevelToJSON; var FieldDescriptorProto_Type; (function (FieldDescriptorProto_Type) { /** @@ -44,7 +56,7 @@ var FieldDescriptorProto_Type; FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT32"] = 17] = "TYPE_SINT32"; /** TYPE_SINT64 - Uses ZigZag encoding. */ FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT64"] = 18] = "TYPE_SINT64"; -})(FieldDescriptorProto_Type = exports.FieldDescriptorProto_Type || (exports.FieldDescriptorProto_Type = {})); +})(FieldDescriptorProto_Type || (exports.FieldDescriptorProto_Type = FieldDescriptorProto_Type = {})); function fieldDescriptorProto_TypeFromJSON(object) { switch (object) { case 1: @@ -105,7 +117,6 @@ function fieldDescriptorProto_TypeFromJSON(object) { throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FieldDescriptorProto_Type"); } } -exports.fieldDescriptorProto_TypeFromJSON = fieldDescriptorProto_TypeFromJSON; function fieldDescriptorProto_TypeToJSON(object) { switch (object) { case FieldDescriptorProto_Type.TYPE_DOUBLE: @@ -148,14 +159,13 @@ function fieldDescriptorProto_TypeToJSON(object) { throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FieldDescriptorProto_Type"); } } -exports.fieldDescriptorProto_TypeToJSON = fieldDescriptorProto_TypeToJSON; var FieldDescriptorProto_Label; (function (FieldDescriptorProto_Label) { /** LABEL_OPTIONAL - 0 is reserved for errors */ FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_OPTIONAL"] = 1] = "LABEL_OPTIONAL"; FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REQUIRED"] = 2] = "LABEL_REQUIRED"; FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REPEATED"] = 3] = "LABEL_REPEATED"; -})(FieldDescriptorProto_Label = exports.FieldDescriptorProto_Label || (exports.FieldDescriptorProto_Label = {})); +})(FieldDescriptorProto_Label || (exports.FieldDescriptorProto_Label = FieldDescriptorProto_Label = {})); function fieldDescriptorProto_LabelFromJSON(object) { switch (object) { case 1: @@ -171,7 +181,6 @@ function fieldDescriptorProto_LabelFromJSON(object) { throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FieldDescriptorProto_Label"); } } -exports.fieldDescriptorProto_LabelFromJSON = fieldDescriptorProto_LabelFromJSON; function fieldDescriptorProto_LabelToJSON(object) { switch (object) { case FieldDescriptorProto_Label.LABEL_OPTIONAL: @@ -184,7 +193,6 @@ function fieldDescriptorProto_LabelToJSON(object) { throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FieldDescriptorProto_Label"); } } -exports.fieldDescriptorProto_LabelToJSON = fieldDescriptorProto_LabelToJSON; /** Generated classes can be optimized for speed or code size. */ var FileOptions_OptimizeMode; (function (FileOptions_OptimizeMode) { @@ -194,7 +202,7 @@ var FileOptions_OptimizeMode; FileOptions_OptimizeMode[FileOptions_OptimizeMode["CODE_SIZE"] = 2] = "CODE_SIZE"; /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ FileOptions_OptimizeMode[FileOptions_OptimizeMode["LITE_RUNTIME"] = 3] = "LITE_RUNTIME"; -})(FileOptions_OptimizeMode = exports.FileOptions_OptimizeMode || (exports.FileOptions_OptimizeMode = {})); +})(FileOptions_OptimizeMode || (exports.FileOptions_OptimizeMode = FileOptions_OptimizeMode = {})); function fileOptions_OptimizeModeFromJSON(object) { switch (object) { case 1: @@ -210,7 +218,6 @@ function fileOptions_OptimizeModeFromJSON(object) { throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FileOptions_OptimizeMode"); } } -exports.fileOptions_OptimizeModeFromJSON = fileOptions_OptimizeModeFromJSON; function fileOptions_OptimizeModeToJSON(object) { switch (object) { case FileOptions_OptimizeMode.SPEED: @@ -223,14 +230,13 @@ function fileOptions_OptimizeModeToJSON(object) { throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FileOptions_OptimizeMode"); } } -exports.fileOptions_OptimizeModeToJSON = fileOptions_OptimizeModeToJSON; var FieldOptions_CType; (function (FieldOptions_CType) { /** STRING - Default mode. */ FieldOptions_CType[FieldOptions_CType["STRING"] = 0] = "STRING"; FieldOptions_CType[FieldOptions_CType["CORD"] = 1] = "CORD"; FieldOptions_CType[FieldOptions_CType["STRING_PIECE"] = 2] = "STRING_PIECE"; -})(FieldOptions_CType = exports.FieldOptions_CType || (exports.FieldOptions_CType = {})); +})(FieldOptions_CType || (exports.FieldOptions_CType = FieldOptions_CType = {})); function fieldOptions_CTypeFromJSON(object) { switch (object) { case 0: @@ -246,7 +252,6 @@ function fieldOptions_CTypeFromJSON(object) { throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FieldOptions_CType"); } } -exports.fieldOptions_CTypeFromJSON = fieldOptions_CTypeFromJSON; function fieldOptions_CTypeToJSON(object) { switch (object) { case FieldOptions_CType.STRING: @@ -259,7 +264,6 @@ function fieldOptions_CTypeToJSON(object) { throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FieldOptions_CType"); } } -exports.fieldOptions_CTypeToJSON = fieldOptions_CTypeToJSON; var FieldOptions_JSType; (function (FieldOptions_JSType) { /** JS_NORMAL - Use the default type. */ @@ -268,7 +272,7 @@ var FieldOptions_JSType; FieldOptions_JSType[FieldOptions_JSType["JS_STRING"] = 1] = "JS_STRING"; /** JS_NUMBER - Use JavaScript numbers. */ FieldOptions_JSType[FieldOptions_JSType["JS_NUMBER"] = 2] = "JS_NUMBER"; -})(FieldOptions_JSType = exports.FieldOptions_JSType || (exports.FieldOptions_JSType = {})); +})(FieldOptions_JSType || (exports.FieldOptions_JSType = FieldOptions_JSType = {})); function fieldOptions_JSTypeFromJSON(object) { switch (object) { case 0: @@ -284,7 +288,6 @@ function fieldOptions_JSTypeFromJSON(object) { throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FieldOptions_JSType"); } } -exports.fieldOptions_JSTypeFromJSON = fieldOptions_JSTypeFromJSON; function fieldOptions_JSTypeToJSON(object) { switch (object) { case FieldOptions_JSType.JS_NORMAL: @@ -297,7 +300,6 @@ function fieldOptions_JSTypeToJSON(object) { throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FieldOptions_JSType"); } } -exports.fieldOptions_JSTypeToJSON = fieldOptions_JSTypeToJSON; /** * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, * or neither? HTTP based RPC implementation may choose GET verb for safe @@ -310,7 +312,7 @@ var MethodOptions_IdempotencyLevel; MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["NO_SIDE_EFFECTS"] = 1] = "NO_SIDE_EFFECTS"; /** IDEMPOTENT - idempotent, but may have side effects */ MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENT"] = 2] = "IDEMPOTENT"; -})(MethodOptions_IdempotencyLevel = exports.MethodOptions_IdempotencyLevel || (exports.MethodOptions_IdempotencyLevel = {})); +})(MethodOptions_IdempotencyLevel || (exports.MethodOptions_IdempotencyLevel = MethodOptions_IdempotencyLevel = {})); function methodOptions_IdempotencyLevelFromJSON(object) { switch (object) { case 0: @@ -326,7 +328,6 @@ function methodOptions_IdempotencyLevelFromJSON(object) { throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum MethodOptions_IdempotencyLevel"); } } -exports.methodOptions_IdempotencyLevelFromJSON = methodOptions_IdempotencyLevelFromJSON; function methodOptions_IdempotencyLevelToJSON(object) { switch (object) { case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: @@ -339,7 +340,6 @@ function methodOptions_IdempotencyLevelToJSON(object) { throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum MethodOptions_IdempotencyLevel"); } } -exports.methodOptions_IdempotencyLevelToJSON = methodOptions_IdempotencyLevelToJSON; function createBaseFileDescriptorSet() { return { file: [] }; } diff --git a/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_common.js b/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_common.js index c6f9baa91fff2..05697541c1196 100644 --- a/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_common.js +++ b/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_common.js @@ -1,6 +1,12 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.TimeRange = exports.X509CertificateChain = exports.SubjectAlternativeName = exports.X509Certificate = exports.DistinguishedName = exports.ObjectIdentifierValuePair = exports.ObjectIdentifier = exports.PublicKeyIdentifier = exports.PublicKey = exports.RFC3161SignedTimestamp = exports.LogId = exports.MessageSignature = exports.HashOutput = exports.subjectAlternativeNameTypeToJSON = exports.subjectAlternativeNameTypeFromJSON = exports.SubjectAlternativeNameType = exports.publicKeyDetailsToJSON = exports.publicKeyDetailsFromJSON = exports.PublicKeyDetails = exports.hashAlgorithmToJSON = exports.hashAlgorithmFromJSON = exports.HashAlgorithm = void 0; +exports.TimeRange = exports.X509CertificateChain = exports.SubjectAlternativeName = exports.X509Certificate = exports.DistinguishedName = exports.ObjectIdentifierValuePair = exports.ObjectIdentifier = exports.PublicKeyIdentifier = exports.PublicKey = exports.RFC3161SignedTimestamp = exports.LogId = exports.MessageSignature = exports.HashOutput = exports.SubjectAlternativeNameType = exports.PublicKeyDetails = exports.HashAlgorithm = void 0; +exports.hashAlgorithmFromJSON = hashAlgorithmFromJSON; +exports.hashAlgorithmToJSON = hashAlgorithmToJSON; +exports.publicKeyDetailsFromJSON = publicKeyDetailsFromJSON; +exports.publicKeyDetailsToJSON = publicKeyDetailsToJSON; +exports.subjectAlternativeNameTypeFromJSON = subjectAlternativeNameTypeFromJSON; +exports.subjectAlternativeNameTypeToJSON = subjectAlternativeNameTypeToJSON; /* eslint-disable */ const timestamp_1 = require("./google/protobuf/timestamp"); /** @@ -20,7 +26,7 @@ var HashAlgorithm; HashAlgorithm[HashAlgorithm["SHA2_512"] = 3] = "SHA2_512"; HashAlgorithm[HashAlgorithm["SHA3_256"] = 4] = "SHA3_256"; HashAlgorithm[HashAlgorithm["SHA3_384"] = 5] = "SHA3_384"; -})(HashAlgorithm = exports.HashAlgorithm || (exports.HashAlgorithm = {})); +})(HashAlgorithm || (exports.HashAlgorithm = HashAlgorithm = {})); function hashAlgorithmFromJSON(object) { switch (object) { case 0: @@ -45,7 +51,6 @@ function hashAlgorithmFromJSON(object) { throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum HashAlgorithm"); } } -exports.hashAlgorithmFromJSON = hashAlgorithmFromJSON; function hashAlgorithmToJSON(object) { switch (object) { case HashAlgorithm.HASH_ALGORITHM_UNSPECIFIED: @@ -64,7 +69,6 @@ function hashAlgorithmToJSON(object) { throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum HashAlgorithm"); } } -exports.hashAlgorithmToJSON = hashAlgorithmToJSON; /** * Details of a specific public key, capturing the the key encoding method, * and signature algorithm. @@ -140,7 +144,7 @@ var PublicKeyDetails; */ PublicKeyDetails[PublicKeyDetails["LMS_SHA256"] = 14] = "LMS_SHA256"; PublicKeyDetails[PublicKeyDetails["LMOTS_SHA256"] = 15] = "LMOTS_SHA256"; -})(PublicKeyDetails = exports.PublicKeyDetails || (exports.PublicKeyDetails = {})); +})(PublicKeyDetails || (exports.PublicKeyDetails = PublicKeyDetails = {})); function publicKeyDetailsFromJSON(object) { switch (object) { case 0: @@ -204,7 +208,6 @@ function publicKeyDetailsFromJSON(object) { throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum PublicKeyDetails"); } } -exports.publicKeyDetailsFromJSON = publicKeyDetailsFromJSON; function publicKeyDetailsToJSON(object) { switch (object) { case PublicKeyDetails.PUBLIC_KEY_DETAILS_UNSPECIFIED: @@ -249,7 +252,6 @@ function publicKeyDetailsToJSON(object) { throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum PublicKeyDetails"); } } -exports.publicKeyDetailsToJSON = publicKeyDetailsToJSON; var SubjectAlternativeNameType; (function (SubjectAlternativeNameType) { SubjectAlternativeNameType[SubjectAlternativeNameType["SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED"] = 0] = "SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED"; @@ -261,7 +263,7 @@ var SubjectAlternativeNameType; * for more details. */ SubjectAlternativeNameType[SubjectAlternativeNameType["OTHER_NAME"] = 3] = "OTHER_NAME"; -})(SubjectAlternativeNameType = exports.SubjectAlternativeNameType || (exports.SubjectAlternativeNameType = {})); +})(SubjectAlternativeNameType || (exports.SubjectAlternativeNameType = SubjectAlternativeNameType = {})); function subjectAlternativeNameTypeFromJSON(object) { switch (object) { case 0: @@ -280,7 +282,6 @@ function subjectAlternativeNameTypeFromJSON(object) { throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum SubjectAlternativeNameType"); } } -exports.subjectAlternativeNameTypeFromJSON = subjectAlternativeNameTypeFromJSON; function subjectAlternativeNameTypeToJSON(object) { switch (object) { case SubjectAlternativeNameType.SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED: @@ -295,7 +296,6 @@ function subjectAlternativeNameTypeToJSON(object) { throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum SubjectAlternativeNameType"); } } -exports.subjectAlternativeNameTypeToJSON = subjectAlternativeNameTypeToJSON; function createBaseHashOutput() { return { algorithm: 0, digest: Buffer.alloc(0) }; } @@ -568,8 +568,8 @@ function base64FromBytes(arr) { } } function fromTimestamp(t) { - let millis = Number(t.seconds) * 1000; - millis += t.nanos / 1000000; + let millis = Number(t.seconds) * 1_000; + millis += t.nanos / 1_000_000; return new Date(millis); } function fromJsonTimestamp(o) { diff --git a/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_trustroot.js b/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_trustroot.js index 8791aba27044b..a507d4dba590d 100644 --- a/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_trustroot.js +++ b/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_trustroot.js @@ -102,11 +102,12 @@ exports.TrustedRoot = { }, }; function createBaseSigningConfig() { - return { caUrl: "", oidcUrl: "", tlogUrls: [], tsaUrls: [] }; + return { mediaType: "", caUrl: "", oidcUrl: "", tlogUrls: [], tsaUrls: [] }; } exports.SigningConfig = { fromJSON(object) { return { + mediaType: isSet(object.mediaType) ? String(object.mediaType) : "", caUrl: isSet(object.caUrl) ? String(object.caUrl) : "", oidcUrl: isSet(object.oidcUrl) ? String(object.oidcUrl) : "", tlogUrls: Array.isArray(object?.tlogUrls) ? object.tlogUrls.map((e) => String(e)) : [], @@ -115,6 +116,7 @@ exports.SigningConfig = { }, toJSON(message) { const obj = {}; + message.mediaType !== undefined && (obj.mediaType = message.mediaType); message.caUrl !== undefined && (obj.caUrl = message.caUrl); message.oidcUrl !== undefined && (obj.oidcUrl = message.oidcUrl); if (message.tlogUrls) { diff --git a/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_verification.js b/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_verification.js index 4af83c5a54660..222686bbf3044 100644 --- a/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_verification.js +++ b/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_verification.js @@ -236,7 +236,9 @@ exports.Artifact = { ? { $case: "artifactUri", artifactUri: String(object.artifactUri) } : isSet(object.artifact) ? { $case: "artifact", artifact: Buffer.from(bytesFromBase64(object.artifact)) } - : undefined, + : isSet(object.artifactDigest) + ? { $case: "artifactDigest", artifactDigest: sigstore_common_1.HashOutput.fromJSON(object.artifactDigest) } + : undefined, }; }, toJSON(message) { @@ -244,6 +246,8 @@ exports.Artifact = { message.data?.$case === "artifactUri" && (obj.artifactUri = message.data?.artifactUri); message.data?.$case === "artifact" && (obj.artifact = message.data?.artifact !== undefined ? base64FromBytes(message.data?.artifact) : undefined); + message.data?.$case === "artifactDigest" && + (obj.artifactDigest = message.data?.artifactDigest ? sigstore_common_1.HashOutput.toJSON(message.data?.artifactDigest) : undefined); return obj; }, }; diff --git a/node_modules/@sigstore/protobuf-specs/package.json b/node_modules/@sigstore/protobuf-specs/package.json index 92ae4acbd00ec..c81cfc681f14b 100644 --- a/node_modules/@sigstore/protobuf-specs/package.json +++ b/node_modules/@sigstore/protobuf-specs/package.json @@ -1,6 +1,6 @@ { "name": "@sigstore/protobuf-specs", - "version": "0.3.2", + "version": "0.3.3", "description": "code-signing for npm packages", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -21,11 +21,11 @@ }, "homepage": "https://github.com/sigstore/protobuf-specs#readme", "devDependencies": { - "@tsconfig/node16": "^16.1.1", + "@tsconfig/node18": "^18.2.4", "@types/node": "^18.14.0", - "typescript": "^4.9.5" + "typescript": "^5.7.2" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } } diff --git a/package-lock.json b/package-lock.json index 84095a12dea59..00f9d46a92f5a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4765,13 +4765,13 @@ } }, "node_modules/@sigstore/protobuf-specs": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@sigstore/protobuf-specs/-/protobuf-specs-0.3.2.tgz", - "integrity": "sha512-c6B0ehIWxMI8wiS/bj6rHMPqeFvngFV7cDU/MY+B16P9Z3Mp9k8L93eYZ7BYzSickzuqAQqAq0V956b3Ju6mLw==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@sigstore/protobuf-specs/-/protobuf-specs-0.3.3.tgz", + "integrity": "sha512-RpacQhBlwpBWd7KEJsRKcBQalbV28fvkxwTOJIqhIuDysMMaJW47V4OqW30iJB9uRpqOSxxEAQFdr8tTattReQ==", "inBundle": true, "license": "Apache-2.0", "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/@sigstore/sign": { From 9473a8638257297c420136009de567c131d2f299 Mon Sep 17 00:00:00 2001 From: Gar Date: Tue, 21 Jan 2025 09:00:48 -0800 Subject: [PATCH 15/24] deps: spdx-license-ids@3.0.21 --- node_modules/spdx-license-ids/index.json | 14 ++++++++++++++ node_modules/spdx-license-ids/package.json | 16 +++------------- package-lock.json | 6 +++--- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/node_modules/spdx-license-ids/index.json b/node_modules/spdx-license-ids/index.json index f43d5016bd95a..c1ae5520b18ad 100644 --- a/node_modules/spdx-license-ids/index.json +++ b/node_modules/spdx-license-ids/index.json @@ -89,6 +89,7 @@ "Bitstream-Vera", "BlueOak-1.0.0", "Boehm-GC", + "Boehm-GC-without-fee", "Borceux", "Brian-Gladman-2-Clause", "Brian-Gladman-3-Clause", @@ -148,6 +149,8 @@ "CC-BY-SA-3.0-IGO", "CC-BY-SA-4.0", "CC-PDDC", + "CC-PDM-1.0", + "CC-SA-1.0", "CC0-1.0", "CDDL-1.0", "CDDL-1.1", @@ -198,6 +201,7 @@ "DRL-1.1", "DSDP", "DocBook-Schema", + "DocBook-Stylesheet", "DocBook-XML", "Dotseqn", "ECL-1.0", @@ -305,6 +309,7 @@ "Imlib2", "Info-ZIP", "Inner-Net-2.0", + "InnoSetup", "Intel", "Intel-ACPI", "Interbase-1.0", @@ -349,9 +354,11 @@ "Linux-man-pages-copyleft-2-para", "Linux-man-pages-copyleft-var", "Lucida-Bitmap-Fonts", + "MIPS", "MIT", "MIT-0", "MIT-CMU", + "MIT-Click", "MIT-Festival", "MIT-Khronos-old", "MIT-Modern-Variant", @@ -502,6 +509,7 @@ "SISSL", "SISSL-1.2", "SL", + "SMAIL-GPL", "SMLNJ", "SMPPL", "SNIA", @@ -515,6 +523,7 @@ "SchemeReport", "Sendmail", "Sendmail-8.23", + "Sendmail-Open-Source-1.1", "SimPL-2.0", "Sleepycat", "Soundex", @@ -540,6 +549,8 @@ "TU-Berlin-1.0", "TU-Berlin-2.0", "TermReadKey", + "ThirdEye", + "TrustedQSL", "UCAR", "UCL-1.0", "UMich-Merit", @@ -583,6 +594,7 @@ "Zimbra-1.4", "Zlib", "any-OSI", + "any-OSI-perl-modules", "bcrypt-Solar-Designer", "blessing", "bzip2-1.0.6", @@ -599,6 +611,7 @@ "etalab-2.0", "fwlw", "gSOAP-1.3b", + "generic-xts", "gnuplot", "gtkbook", "hdparm", @@ -627,6 +640,7 @@ "threeparttable", "ulem", "w3m", + "wwl", "xinetd", "xkeyboard-config-Zinoviev", "xlock", diff --git a/node_modules/spdx-license-ids/package.json b/node_modules/spdx-license-ids/package.json index 7ab34aab6b8b1..9b02c26760459 100644 --- a/node_modules/spdx-license-ids/package.json +++ b/node_modules/spdx-license-ids/package.json @@ -1,14 +1,14 @@ { "name": "spdx-license-ids", - "version": "3.0.20", + "version": "3.0.21", "description": "A list of SPDX license identifiers", "repository": "jslicense/spdx-license-ids", "author": "Shinnosuke Watanabe (https://github.com/shinnn)", "license": "CC0-1.0", "scripts": { "build": "node build.js", - "pretest": "eslint .", "latest": "node latest.js", + "pretest": "npm run build", "test": "node test.js" }, "files": [ @@ -25,15 +25,5 @@ "json", "array", "oss" - ], - "devDependencies": { - "@shinnn/eslint-config": "^7.0.0", - "eslint": "^8.49.0", - "eslint-formatter-codeframe": "^7.32.1", - "rmfr": "^2.0.0", - "tape": "^5.6.6" - }, - "eslintConfig": { - "extends": "@shinnn" - } + ] } diff --git a/package-lock.json b/package-lock.json index 00f9d46a92f5a..2e0f3fa2a7737 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14634,9 +14634,9 @@ } }, "node_modules/spdx-license-ids": { - "version": "3.0.20", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.20.tgz", - "integrity": "sha512-jg25NiDV/1fLtSgEgyvVyDunvaNHbuwF9lfNV17gSmPFAlYzdfNBlLtLzXTevwkPj7DhGbmN9VnmJIgLnhvaBw==", + "version": "3.0.21", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.21.tgz", + "integrity": "sha512-Bvg/8F5XephndSK3JffaRqdT+gyhfqIPwDHpX80tJrF8QQRYMo8sNMeaZ2Dp5+jhwKnUmIOyFFQfHRkjJm5nXg==", "inBundle": true, "license": "CC0-1.0" }, From 18e0449ae41703a7980cee73bae69521db6fa53e Mon Sep 17 00:00:00 2001 From: Gar Date: Tue, 21 Jan 2025 09:15:08 -0800 Subject: [PATCH 16/24] chore: dev dependency updates --- package-lock.json | 1033 ++++++++++++++++++++++++++++----------------- 1 file changed, 635 insertions(+), 398 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2e0f3fa2a7737..08a4ce19fae21 100644 --- a/package-lock.json +++ b/package-lock.json @@ -433,9 +433,9 @@ } }, "docs/node_modules/mdast-util-find-and-replace": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/mdast-util-find-and-replace/-/mdast-util-find-and-replace-3.0.1.tgz", - "integrity": "sha512-SG21kZHGC3XRTSUhtofZkBzZTJNM5ecCi0SK2IMKmSXR8vO3peL+kb1O0z7Zl83jKtutG4k5Wv/W7V3/YHvzPA==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/mdast-util-find-and-replace/-/mdast-util-find-and-replace-3.0.2.tgz", + "integrity": "sha512-Tmd1Vg/m3Xz43afeNxDIhWRtFZgM2VLyaf4vSTYwudTyeuTneoL3qtWMA5jeLyz/O1vDJmmV4QuScFCA2tBPwg==", "dev": true, "license": "MIT", "dependencies": { @@ -959,9 +959,9 @@ } }, "docs/node_modules/micromark-extension-gfm-table": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/micromark-extension-gfm-table/-/micromark-extension-gfm-table-2.1.0.tgz", - "integrity": "sha512-Ub2ncQv+fwD70/l4ou27b4YzfNaCJOvyX4HxXU15m7mpYY+rjuWzsLIPZHJL253Z643RpbcP1oeIJlQ/SKW67g==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-table/-/micromark-extension-gfm-table-2.1.1.tgz", + "integrity": "sha512-t2OU/dXXioARrC6yWfJ4hqB7rct14e8f7m0cbI5hUmDyyIlwv5vEtooptH8INkbLzOatzKuVbQmAYcbWoyz6Dg==", "dev": true, "license": "MIT", "dependencies": { @@ -2204,9 +2204,9 @@ } }, "node_modules/@actions/http-client/node_modules/undici": { - "version": "5.28.4", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz", - "integrity": "sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==", + "version": "5.28.5", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.5.tgz", + "integrity": "sha512-zICwjrDrcrUE0pyyJc1I2QzBkLM8FINsgOrt6WjA+BgajVq9Nxu2PbFFXUrAggLfDXlZGZBVZYw7WNV5KiBiBA==", "dev": true, "license": "MIT", "dependencies": { @@ -2237,6 +2237,20 @@ "node": ">=6.0.0" } }, + "node_modules/@asamuzakjp/css-color": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/@asamuzakjp/css-color/-/css-color-2.8.3.tgz", + "integrity": "sha512-GIc76d9UI1hCvOATjZPyHFmE5qhRccp3/zGfMPapK3jBi+yocEzp6BBB0UnfRYP9NP4FANqUZYb0hnfs3TM3hw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@csstools/css-calc": "^2.1.1", + "@csstools/css-color-parser": "^3.0.7", + "@csstools/css-parser-algorithms": "^3.0.4", + "@csstools/css-tokenizer": "^3.0.3", + "lru-cache": "^10.4.3" + } + }, "node_modules/@babel/code-frame": { "version": "7.26.2", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", @@ -2253,9 +2267,9 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.26.3", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.3.tgz", - "integrity": "sha512-nHIxvKPniQXpmQLb0vhY3VaFb3S0YrTAwpOWJZh1wn3oJPjJk9Asva204PsBdmAE8vpzfHudT8DB0scYvy9q0g==", + "version": "7.26.5", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.5.tgz", + "integrity": "sha512-XvcZi1KWf88RVbF9wn8MN6tYFloU5qX8KjuF3E1PVBmJ9eypXfs4GRiJwLuTZL0iSnJUKn1BFPa5BPZZJyFzPg==", "dev": true, "license": "MIT", "engines": { @@ -2311,14 +2325,14 @@ } }, "node_modules/@babel/generator": { - "version": "7.26.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.3.tgz", - "integrity": "sha512-6FF/urZvD0sTeO7k6/B15pMLC4CHUv1426lzr3N01aHJTl046uCAh9LXW/fzeXXjPNCJ6iABW5XaWOsIZB93aQ==", + "version": "7.26.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.5.tgz", + "integrity": "sha512-2caSP6fN9I7HOe6nqhtft7V4g7/V/gfDsC3Ag4W7kEzzvRGKqiv0pu0HogPiZ3KaVSoNDhUws6IJjDjpfmYIXw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.26.3", - "@babel/types": "^7.26.3", + "@babel/parser": "^7.26.5", + "@babel/types": "^7.26.5", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^3.0.2" @@ -2328,13 +2342,13 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.9.tgz", - "integrity": "sha512-j9Db8Suy6yV/VHa4qzrj9yZfZxhLWQdVnRlXxmKLYlhWUVB1sB2G5sxuWYXk/whHD9iW76PmNzxZ4UCnTQTVEQ==", + "version": "7.26.5", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.26.5.tgz", + "integrity": "sha512-IXuyn5EkouFJscIDuFF5EsiSolseme1s0CZB+QxVugqJLYmKdxI1VfIBOst0SUu4rnk2Z7kqTwmoO1lp3HIfnA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.25.9", + "@babel/compat-data": "^7.26.5", "@babel/helper-validator-option": "^7.25.9", "browserslist": "^4.24.0", "lru-cache": "^5.1.1", @@ -2448,13 +2462,13 @@ } }, "node_modules/@babel/parser": { - "version": "7.26.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.3.tgz", - "integrity": "sha512-WJ/CvmY8Mea8iDXo6a7RK2wbmJITT5fN3BEkRuFlxVyNx8jOKIIhmC4fSkTcPcf8JyavbBwIe6OpiCOBXt/IcA==", + "version": "7.26.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.5.tgz", + "integrity": "sha512-SRJ4jYmXRqV1/Xc+TIVG84WjHBXKlxO9sHQnA2Pf12QQEAp1LOh6kDzNHXcUnbH1QI0FDoPPVOt+vyUDucxpaw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.26.3" + "@babel/types": "^7.26.5" }, "bin": { "parser": "bin/babel-parser.js" @@ -2479,17 +2493,17 @@ } }, "node_modules/@babel/traverse": { - "version": "7.26.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.26.4.tgz", - "integrity": "sha512-fH+b7Y4p3yqvApJALCPJcwb0/XaOSgtK4pzV6WVjPR5GLFQBRI7pfoX2V2iM48NXvX07NUxxm1Vw98YjqTcU5w==", + "version": "7.26.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.26.5.tgz", + "integrity": "sha512-rkOSPOw+AXbgtwUga3U4u8RpoK9FEFWBNAlTpcnkLFjL5CT+oyHNuUUC/xx6XefEJ16r38r8Bc/lfp6rYuHeJQ==", "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.26.2", - "@babel/generator": "^7.26.3", - "@babel/parser": "^7.26.3", + "@babel/generator": "^7.26.5", + "@babel/parser": "^7.26.5", "@babel/template": "^7.25.9", - "@babel/types": "^7.26.3", + "@babel/types": "^7.26.5", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -2508,9 +2522,9 @@ } }, "node_modules/@babel/types": { - "version": "7.26.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.3.tgz", - "integrity": "sha512-vN5p+1kl59GVKMvTHt55NzzmYVxprfJD+ql7U9NFIfKCBkYE55LYtS+WtPlaYOyzydrKI8Nezd+aZextrd+FMA==", + "version": "7.26.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.5.tgz", + "integrity": "sha512-L6mZmwFDK6Cjh1nRCLXpa6no13ZIioJDz7mdkzHv399pThrTa/k0nUlNaenOeh2kWu/iaOQYElEpKPUswUa9Vg==", "dev": true, "license": "MIT", "dependencies": { @@ -2533,15 +2547,15 @@ } }, "node_modules/@commitlint/cli": { - "version": "19.6.0", - "resolved": "https://registry.npmjs.org/@commitlint/cli/-/cli-19.6.0.tgz", - "integrity": "sha512-v17BgGD9w5KnthaKxXnEg6KLq6DYiAxyiN44TpiRtqyW8NSq+Kx99mkEG8Qo6uu6cI5eMzMojW2muJxjmPnF8w==", + "version": "19.6.1", + "resolved": "https://registry.npmjs.org/@commitlint/cli/-/cli-19.6.1.tgz", + "integrity": "sha512-8hcyA6ZoHwWXC76BoC8qVOSr8xHy00LZhZpauiD0iO0VYbVhMnED0da85lTfIULxl7Lj4c6vZgF0Wu/ed1+jlQ==", "dev": true, "license": "MIT", "dependencies": { "@commitlint/format": "^19.5.0", "@commitlint/lint": "^19.6.0", - "@commitlint/load": "^19.5.0", + "@commitlint/load": "^19.6.1", "@commitlint/read": "^19.5.0", "@commitlint/types": "^19.5.0", "tinyexec": "^0.3.0", @@ -2655,9 +2669,9 @@ } }, "node_modules/@commitlint/load": { - "version": "19.5.0", - "resolved": "https://registry.npmjs.org/@commitlint/load/-/load-19.5.0.tgz", - "integrity": "sha512-INOUhkL/qaKqwcTUvCE8iIUf5XHsEPCLY9looJ/ipzi7jtGhgmtH7OOFiNvwYgH7mA8osUWOUDV8t4E2HAi4xA==", + "version": "19.6.1", + "resolved": "https://registry.npmjs.org/@commitlint/load/-/load-19.6.1.tgz", + "integrity": "sha512-kE4mRKWWNju2QpsCWt428XBvUH55OET2N4QKQ0bF85qS/XbsRGG1MiTByDNlEVpEPceMkDr46LNH95DtRwcsfA==", "dev": true, "license": "MIT", "dependencies": { @@ -2667,7 +2681,7 @@ "@commitlint/types": "^19.5.0", "chalk": "^5.3.0", "cosmiconfig": "^9.0.0", - "cosmiconfig-typescript-loader": "^5.0.0", + "cosmiconfig-typescript-loader": "^6.1.0", "lodash.isplainobject": "^4.0.6", "lodash.merge": "^4.6.2", "lodash.uniq": "^4.5.0" @@ -2800,6 +2814,121 @@ "unist-util-visit-parents": "^3.1.1" } }, + "node_modules/@csstools/color-helpers": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@csstools/color-helpers/-/color-helpers-5.0.1.tgz", + "integrity": "sha512-MKtmkA0BX87PKaO1NFRTFH+UnkgnmySQOvNxJubsadusqPEC2aJ9MOQiMceZJJ6oitUl/i0L6u0M1IrmAOmgBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "engines": { + "node": ">=18" + } + }, + "node_modules/@csstools/css-calc": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@csstools/css-calc/-/css-calc-2.1.1.tgz", + "integrity": "sha512-rL7kaUnTkL9K+Cvo2pnCieqNpTKgQzy5f+N+5Iuko9HAoasP+xgprVh7KN/MaJVvVL1l0EzQq2MoqBHKSrDrag==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@csstools/css-parser-algorithms": "^3.0.4", + "@csstools/css-tokenizer": "^3.0.3" + } + }, + "node_modules/@csstools/css-color-parser": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@csstools/css-color-parser/-/css-color-parser-3.0.7.tgz", + "integrity": "sha512-nkMp2mTICw32uE5NN+EsJ4f5N+IGFeCFu4bGpiKgb2Pq/7J/MpyLBeQ5ry4KKtRFZaYs6sTmcMYrSRIyj5DFKA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "dependencies": { + "@csstools/color-helpers": "^5.0.1", + "@csstools/css-calc": "^2.1.1" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@csstools/css-parser-algorithms": "^3.0.4", + "@csstools/css-tokenizer": "^3.0.3" + } + }, + "node_modules/@csstools/css-parser-algorithms": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-3.0.4.tgz", + "integrity": "sha512-Up7rBoV77rv29d3uKHUIVubz1BTcgyUK72IvCQAbfbMv584xHcGKCKbWh7i8hPrRJ7qU4Y8IO3IY9m+iTB7P3A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@csstools/css-tokenizer": "^3.0.3" + } + }, + "node_modules/@csstools/css-tokenizer": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-3.0.3.tgz", + "integrity": "sha512-UJnjoFsmxfKUdNYdWgOB0mWUypuLvAfQPH1+pyvRJs6euowbFkFC6P13w1l8mJyi3vxYMxc9kld5jZEGRQs6bw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "engines": { + "node": ">=18" + } + }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz", @@ -4903,16 +5032,16 @@ "license": "MIT" }, "node_modules/@types/ms": { - "version": "0.7.34", - "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.34.tgz", - "integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-2.1.0.tgz", + "integrity": "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==", "dev": true, "license": "MIT" }, "node_modules/@types/node": { - "version": "22.10.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.2.tgz", - "integrity": "sha512-Xxr6BBRCAOQixvonOye19wnzyDiUtTeqldOOmj3CkeblonbccA12PFwlufvRdrpjXxqnmUaeiU5EOA+7s5diUQ==", + "version": "22.10.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.7.tgz", + "integrity": "sha512-V09KvXxFiutGp6B7XkpaDXlNadZxrzajcY50EuoLIpQ6WWYCSvf19lVIazzfIzQvhUN2HjX12spLojTnhuKlGg==", "dev": true, "license": "MIT", "dependencies": { @@ -5267,15 +5396,15 @@ } }, "node_modules/array-buffer-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", - "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz", + "integrity": "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "call-bind": "^1.0.5", - "is-array-buffer": "^3.0.4" + "call-bound": "^1.0.3", + "is-array-buffer": "^3.0.5" }, "engines": { "node": ">= 0.4" @@ -5336,17 +5465,17 @@ } }, "node_modules/array.prototype.flat": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", - "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.3.tgz", + "integrity": "sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-shim-unscopables": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -5356,17 +5485,17 @@ } }, "node_modules/array.prototype.flatmap": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz", - "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.3.tgz", + "integrity": "sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-shim-unscopables": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -5376,21 +5505,20 @@ } }, "node_modules/arraybuffer.prototype.slice": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", - "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz", + "integrity": "sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==", "dev": true, "license": "MIT", "peer": true, "dependencies": { "array-buffer-byte-length": "^1.0.1", - "call-bind": "^1.0.5", + "call-bind": "^1.0.8", "define-properties": "^1.2.1", - "es-abstract": "^1.22.3", - "es-errors": "^1.2.1", - "get-intrinsic": "^1.2.3", - "is-array-buffer": "^3.0.4", - "is-shared-array-buffer": "^1.0.2" + "es-abstract": "^1.23.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "is-array-buffer": "^3.0.4" }, "engines": { "node": ">= 0.4" @@ -5489,9 +5617,9 @@ "license": "MIT" }, "node_modules/bare-events": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.5.0.tgz", - "integrity": "sha512-/E8dDe9dsbLyh2qrZ64PEPadOQ0F4gbl1sUJOrmph7xOiIxfY8vwab/4bFLh4Y88/Hk/ujKcrQKc+ps0mv873A==", + "version": "2.5.4", + "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.5.4.tgz", + "integrity": "sha512-+gFfDkR8pj4/TrWCGUGWmJIkBwuxPS5F+a5yWjOHQt2hHvNZd5YLzadjmDUtFmMM4y429bnKLa8bYBMHcYdnQA==", "dev": true, "license": "Apache-2.0", "optional": true @@ -5589,9 +5717,9 @@ } }, "node_modules/browserslist": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.2.tgz", - "integrity": "sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==", + "version": "4.24.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz", + "integrity": "sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==", "dev": true, "funding": [ { @@ -5609,9 +5737,9 @@ ], "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001669", - "electron-to-chromium": "^1.5.41", - "node-releases": "^2.0.18", + "caniuse-lite": "^1.0.30001688", + "electron-to-chromium": "^1.5.73", + "node-releases": "^2.0.19", "update-browserslist-db": "^1.1.1" }, "bin": { @@ -5792,15 +5920,15 @@ } }, "node_modules/call-bound": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.2.tgz", - "integrity": "sha512-0lk0PHFe/uz0vl527fG9CgdE9WdafjDbCXvBbs+LUv000TVt2Jjhqbs4Jwm8gz070w8xXyEAxrPOMullsxXeGg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.3.tgz", + "integrity": "sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "call-bind": "^1.0.8", - "get-intrinsic": "^1.2.5" + "call-bind-apply-helpers": "^1.0.1", + "get-intrinsic": "^1.2.6" }, "engines": { "node": ">= 0.4" @@ -5855,9 +5983,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001687", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001687.tgz", - "integrity": "sha512-0S/FDhf4ZiqrTUiQ39dKeUjYRjkv7lOZU1Dgif2rIqrTzX/1wV2hfKu9TOm1IHkdSijfLswxTFzl/cvir+SLSQ==", + "version": "1.0.30001695", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001695.tgz", + "integrity": "sha512-vHyLade6wTgI2u1ec3WQBxv+2BrTERV28UXQu9LO6lZ9pYeMk34vjXFLOxo1A4UBA8XTL4njRQZdno/yYaSmWw==", "dev": true, "funding": [ { @@ -6559,21 +6687,21 @@ } }, "node_modules/cosmiconfig-typescript-loader": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-5.1.0.tgz", - "integrity": "sha512-7PtBB+6FdsOvZyJtlF3hEPpACq7RQX6BVGsgC7/lfVXnKMvNCu/XY3ykreqG5w/rBNdu2z8LCIKoF3kpHHdHlA==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-6.1.0.tgz", + "integrity": "sha512-tJ1w35ZRUiM5FeTzT7DtYWAFFv37ZLqSRkGi2oeCK1gPhvaWjkAtfXvLmvE1pRfxxp9aQo6ba/Pvg1dKj05D4g==", "dev": true, "license": "MIT", "dependencies": { - "jiti": "^1.21.6" + "jiti": "^2.4.1" }, "engines": { - "node": ">=v16" + "node": ">=v18" }, "peerDependencies": { "@types/node": "*", - "cosmiconfig": ">=8.2", - "typescript": ">=4" + "cosmiconfig": ">=9", + "typescript": ">=5" } }, "node_modules/cross-spawn": { @@ -6650,18 +6778,26 @@ } }, "node_modules/cssstyle": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-4.1.0.tgz", - "integrity": "sha512-h66W1URKpBS5YMI/V8PyXvTMFT8SupJ1IzoIV8IeBC/ji8WVmrO8dGlTi+2dh6whmdk6BiKJLD/ZBkhWbcg6nA==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-4.2.1.tgz", + "integrity": "sha512-9+vem03dMXG7gDmZ62uqmRiMRNtinIZ9ZyuF6BdxzfOD+FdN5hretzynkn0ReS2DO2GSw76RWHs0UmJPI2zUjw==", "dev": true, "license": "MIT", "dependencies": { - "rrweb-cssom": "^0.7.1" + "@asamuzakjp/css-color": "^2.8.2", + "rrweb-cssom": "^0.8.0" }, "engines": { "node": ">=18" } }, + "node_modules/cssstyle/node_modules/rrweb-cssom": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.8.0.tgz", + "integrity": "sha512-guoltQEx+9aMf2gDZ0s62EcV8lsXR+0w8915TC3ITdn2YueuNjdAYh/levpU9nFaoChh9RUS5ZdQMrKfVEN9tw==", + "dev": true, + "license": "MIT" + }, "node_modules/dargs": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/dargs/-/dargs-8.1.0.tgz", @@ -6727,16 +6863,16 @@ } }, "node_modules/data-view-buffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", - "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz", + "integrity": "sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "call-bind": "^1.0.6", + "call-bound": "^1.0.3", "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" + "is-data-view": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -6746,33 +6882,33 @@ } }, "node_modules/data-view-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", - "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz", + "integrity": "sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "call-bind": "^1.0.7", + "call-bound": "^1.0.3", "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" + "is-data-view": "^1.0.2" }, "engines": { "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/inspect-js" } }, "node_modules/data-view-byte-offset": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", - "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz", + "integrity": "sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "call-bind": "^1.0.6", + "call-bound": "^1.0.2", "es-errors": "^1.3.0", "is-data-view": "^1.0.1" }, @@ -7072,9 +7208,9 @@ } }, "node_modules/domutils": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz", - "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.2.2.tgz", + "integrity": "sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -7100,14 +7236,14 @@ } }, "node_modules/dunder-proto": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.0.tgz", - "integrity": "sha512-9+Sj30DIu+4KvHqMfLUGLFYL2PkURSYMVXJyXe92nFRvlYq5hBjLEhblKB+vkd/WVlUYMWigiY07T91Fkk0+4A==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "call-bind-apply-helpers": "^1.0.0", + "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", "gopd": "^1.2.0" }, @@ -7123,9 +7259,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.73", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.73.tgz", - "integrity": "sha512-8wGNxG9tAG5KhGd3eeA0o6ixhiNdgr0DcHWm85XPCphwZgD1lIEoi6t3VERayWao7SF7AAZTw6oARGJeVjH8Kg==", + "version": "1.5.84", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.84.tgz", + "integrity": "sha512-I+DQ8xgafao9Ha6y0qjHHvpZ9OfyA1qKlkHkjywxzniORU2awxyz7f/iVJcULmrF2yrM3nHQf+iDjJtbbexd/g==", "dev": true, "license": "ISC" }, @@ -7188,59 +7324,64 @@ } }, "node_modules/es-abstract": { - "version": "1.23.5", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.5.tgz", - "integrity": "sha512-vlmniQ0WNPwXqA0BnmwV3Ng7HxiGlh6r5U6JcTMNx8OilcAGqVJBHJcPjqOMaczU9fRuRK5Px2BdVyPRnKMMVQ==", + "version": "1.23.9", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.9.tgz", + "integrity": "sha512-py07lI0wjxAC/DcfK1S6G7iANonniZwTISvdPzk9hzeH0IZIshbuuFxLIU96OyF89Yb9hiqWn8M/bY83KY5vzA==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "array-buffer-byte-length": "^1.0.1", - "arraybuffer.prototype.slice": "^1.0.3", + "array-buffer-byte-length": "^1.0.2", + "arraybuffer.prototype.slice": "^1.0.4", "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", - "data-view-buffer": "^1.0.1", - "data-view-byte-length": "^1.0.1", - "data-view-byte-offset": "^1.0.0", - "es-define-property": "^1.0.0", + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "data-view-buffer": "^1.0.2", + "data-view-byte-length": "^1.0.2", + "data-view-byte-offset": "^1.0.1", + "es-define-property": "^1.0.1", "es-errors": "^1.3.0", "es-object-atoms": "^1.0.0", - "es-set-tostringtag": "^2.0.3", - "es-to-primitive": "^1.2.1", - "function.prototype.name": "^1.1.6", - "get-intrinsic": "^1.2.4", - "get-symbol-description": "^1.0.2", + "es-set-tostringtag": "^2.1.0", + "es-to-primitive": "^1.3.0", + "function.prototype.name": "^1.1.8", + "get-intrinsic": "^1.2.7", + "get-proto": "^1.0.0", + "get-symbol-description": "^1.1.0", "globalthis": "^1.0.4", - "gopd": "^1.0.1", + "gopd": "^1.2.0", "has-property-descriptors": "^1.0.2", - "has-proto": "^1.0.3", - "has-symbols": "^1.0.3", + "has-proto": "^1.2.0", + "has-symbols": "^1.1.0", "hasown": "^2.0.2", - "internal-slot": "^1.0.7", - "is-array-buffer": "^3.0.4", + "internal-slot": "^1.1.0", + "is-array-buffer": "^3.0.5", "is-callable": "^1.2.7", - "is-data-view": "^1.0.1", - "is-negative-zero": "^2.0.3", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.3", - "is-string": "^1.0.7", - "is-typed-array": "^1.1.13", - "is-weakref": "^1.0.2", + "is-data-view": "^1.0.2", + "is-regex": "^1.2.1", + "is-shared-array-buffer": "^1.0.4", + "is-string": "^1.1.1", + "is-typed-array": "^1.1.15", + "is-weakref": "^1.1.0", + "math-intrinsics": "^1.1.0", "object-inspect": "^1.13.3", "object-keys": "^1.1.1", - "object.assign": "^4.1.5", + "object.assign": "^4.1.7", + "own-keys": "^1.0.1", "regexp.prototype.flags": "^1.5.3", - "safe-array-concat": "^1.1.2", - "safe-regex-test": "^1.0.3", - "string.prototype.trim": "^1.2.9", - "string.prototype.trimend": "^1.0.8", + "safe-array-concat": "^1.1.3", + "safe-push-apply": "^1.0.0", + "safe-regex-test": "^1.1.0", + "set-proto": "^1.0.0", + "string.prototype.trim": "^1.2.10", + "string.prototype.trimend": "^1.0.9", "string.prototype.trimstart": "^1.0.8", - "typed-array-buffer": "^1.0.2", - "typed-array-byte-length": "^1.0.1", - "typed-array-byte-offset": "^1.0.2", - "typed-array-length": "^1.0.6", - "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.15" + "typed-array-buffer": "^1.0.3", + "typed-array-byte-length": "^1.0.3", + "typed-array-byte-offset": "^1.0.4", + "typed-array-length": "^1.0.7", + "unbox-primitive": "^1.1.0", + "which-typed-array": "^1.1.18" }, "engines": { "node": ">= 0.4" @@ -7272,9 +7413,9 @@ } }, "node_modules/es-object-atoms": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", - "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", "dev": true, "license": "MIT", "peer": true, @@ -7286,16 +7427,17 @@ } }, "node_modules/es-set-tostringtag": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", - "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "get-intrinsic": "^1.2.4", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", "has-tostringtag": "^1.0.2", - "hasown": "^2.0.1" + "hasown": "^2.0.2" }, "engines": { "node": ">= 0.4" @@ -8055,10 +8197,20 @@ "peer": true }, "node_modules/fast-uri": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.3.tgz", - "integrity": "sha512-aLrHthzCjH5He4Z2H9YZ+v6Ujb9ocRuW6ZzkJQOrTxleEijANq4v1TsaPaVG1PZcuurEzrLcWRyYBYXD5cEiaw==", + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.6.tgz", + "integrity": "sha512-Atfo14OibSv5wAp4VWNsFYE1AchQRTv9cBGWET4pZWHzYshFSS9NQI6I57rdKn9croWVMbYFbLhJ+yJvmZIIHw==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], "license": "BSD-3-Clause" }, "node_modules/fastest-levenshtein": { @@ -8072,9 +8224,9 @@ } }, "node_modules/fastq": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", - "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.18.0.tgz", + "integrity": "sha512-QKHXPW0hD8g4UET03SdOdunzSouc9N4AuHdsX8XNcTsuz+yYFILVNIX4l9yHABMhiEI9Db0JTTIpu0wB+Y1QQw==", "dev": true, "license": "ISC", "peer": true, @@ -8448,17 +8600,19 @@ "license": "ISC" }, "node_modules/function.prototype.name": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", - "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.8.tgz", + "integrity": "sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "functions-have-names": "^1.2.3" + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "functions-have-names": "^1.2.3", + "hasown": "^2.0.2", + "is-callable": "^1.2.7" }, "engines": { "node": ">= 0.4" @@ -8499,23 +8653,23 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.6.tgz", - "integrity": "sha512-qxsEs+9A+u85HhllWJJFicJfPDhRmjzoYdl64aMWW9yRIJmSyxdn8IEkuIM530/7T+lv0TIHd8L6Q/ra0tEoeA==", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.7.tgz", + "integrity": "sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==", "dev": true, "license": "MIT", "peer": true, "dependencies": { "call-bind-apply-helpers": "^1.0.1", - "dunder-proto": "^1.0.0", "es-define-property": "^1.0.1", "es-errors": "^1.3.0", "es-object-atoms": "^1.0.0", "function-bind": "^1.1.2", + "get-proto": "^1.0.0", "gopd": "^1.2.0", "has-symbols": "^1.1.0", "hasown": "^2.0.2", - "math-intrinsics": "^1.0.0" + "math-intrinsics": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -8534,17 +8688,32 @@ "node": ">=8.0.0" } }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/get-symbol-description": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", - "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz", + "integrity": "sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "call-bind": "^1.0.5", + "call-bound": "^1.0.3", "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4" + "get-intrinsic": "^1.2.6" }, "engines": { "node": ">= 0.4" @@ -8740,12 +8909,15 @@ } }, "node_modules/has-bigints": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz", + "integrity": "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==", "dev": true, "license": "MIT", "peer": true, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -9306,16 +9478,16 @@ } }, "node_modules/internal-slot": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", - "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", + "integrity": "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==", "dev": true, "license": "MIT", "peer": true, "dependencies": { "es-errors": "^1.3.0", - "hasown": "^2.0.0", - "side-channel": "^1.0.4" + "hasown": "^2.0.2", + "side-channel": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -9349,15 +9521,16 @@ } }, "node_modules/is-array-buffer": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", - "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz", + "integrity": "sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1" + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "get-intrinsic": "^1.2.6" }, "engines": { "node": ">= 0.4" @@ -9374,14 +9547,17 @@ "license": "MIT" }, "node_modules/is-async-function": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.0.0.tgz", - "integrity": "sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.1.0.tgz", + "integrity": "sha512-GExz9MtyhlZyXYLxzlJRj5WUCE661zhDa1Yna52CN57AJsymh+DvXXjyveSioqSRdxvUrdKdvqB1b5cVKsNpWQ==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.3", + "get-proto": "^1.0.1", + "has-tostringtag": "^1.0.2", + "safe-regex-test": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -9434,14 +9610,14 @@ } }, "node_modules/is-boolean-object": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.0.tgz", - "integrity": "sha512-kR5g0+dXf/+kXnqI+lu0URKYPKgICtHGGNCDSB10AaUFj3o/HkB3u7WfpRBJGFopxxY0oH3ux7ZsDjLtK7xqvw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.1.tgz", + "integrity": "sha512-l9qO6eFlUETHtuihLcYOaLKByJ1f+N4kthcU9YjHy3N+B3hWv0y/2Nd0mu/7lTFnRQHTrSdXF50HQ3bl5fEnng==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "call-bind": "^1.0.7", + "call-bound": "^1.0.2", "has-tostringtag": "^1.0.2" }, "engines": { @@ -9503,9 +9679,9 @@ } }, "node_modules/is-core-module": { - "version": "2.15.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", - "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", + "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", "dev": true, "license": "MIT", "dependencies": { @@ -9519,13 +9695,15 @@ } }, "node_modules/is-data-view": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", - "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.2.tgz", + "integrity": "sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==", "dev": true, "license": "MIT", "peer": true, "dependencies": { + "call-bound": "^1.0.2", + "get-intrinsic": "^1.2.6", "is-typed-array": "^1.1.13" }, "engines": { @@ -9536,14 +9714,15 @@ } }, "node_modules/is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.1.0.tgz", + "integrity": "sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.2", + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -9563,14 +9742,14 @@ } }, "node_modules/is-finalizationregistry": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.1.0.tgz", - "integrity": "sha512-qfMdqbAQEwBw78ZyReKnlA8ezmPdb9BemzIIip/JkjaZUhitfXDkkr+3QTboW0JrSXT1QWyYShpvnNHGZ4c4yA==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz", + "integrity": "sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "call-bind": "^1.0.7" + "call-bound": "^1.0.3" }, "engines": { "node": ">= 0.4" @@ -9590,14 +9769,17 @@ } }, "node_modules/is-generator-function": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", - "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.0.tgz", + "integrity": "sha512-nPUB5km40q9e8UfN/Zc24eLlzdSf9OfKByBw9CIdw4H1giPMeA0OIJvbchsCu4npfI2QcMVBsGEBHKZ7wLTWmQ==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.3", + "get-proto": "^1.0.0", + "has-tostringtag": "^1.0.2", + "safe-regex-test": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -9640,20 +9822,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-negative-zero": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", - "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -9665,14 +9833,14 @@ } }, "node_modules/is-number-object": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.0.tgz", - "integrity": "sha512-KVSZV0Dunv9DTPkhXwcZ3Q+tUc9TsaE1ZwX5J2WMvsSGS6Md8TFPun5uwh0yRdrNerI6vf/tbJxqSx4c1ZI1Lw==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz", + "integrity": "sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "call-bind": "^1.0.7", + "call-bound": "^1.0.3", "has-tostringtag": "^1.0.2" }, "engines": { @@ -9734,15 +9902,15 @@ "license": "MIT" }, "node_modules/is-regex": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.0.tgz", - "integrity": "sha512-B6ohK4ZmoftlUe+uvenXSbPJFo6U37BH7oO1B3nQH8f/7h27N56s85MhUtbFJAziz5dcmuR3i8ovUl35zp8pFA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", + "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "call-bind": "^1.0.7", - "gopd": "^1.1.0", + "call-bound": "^1.0.2", + "gopd": "^1.2.0", "has-tostringtag": "^1.0.2", "hasown": "^2.0.2" }, @@ -9768,14 +9936,14 @@ } }, "node_modules/is-shared-array-buffer": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", - "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz", + "integrity": "sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "call-bind": "^1.0.7" + "call-bound": "^1.0.3" }, "engines": { "node": ">= 0.4" @@ -9785,14 +9953,14 @@ } }, "node_modules/is-string": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.0.tgz", - "integrity": "sha512-PlfzajuF9vSo5wErv3MJAKD/nqf9ngAs1NFQYm16nUYFO2IzxJ2hcm+IOCg+EEopdykNNUhVq5cz35cAUxU8+g==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz", + "integrity": "sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "call-bind": "^1.0.7", + "call-bound": "^1.0.3", "has-tostringtag": "^1.0.2" }, "engines": { @@ -9803,16 +9971,16 @@ } }, "node_modules/is-symbol": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.1.0.tgz", - "integrity": "sha512-qS8KkNNXUZ/I+nX6QT8ZS1/Yx0A444yhzdTKxCzKkNjQ9sHErBxJnJAgh+f5YhusYECEcjo4XcyH87hn6+ks0A==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.1.1.tgz", + "integrity": "sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "call-bind": "^1.0.7", - "has-symbols": "^1.0.3", - "safe-regex-test": "^1.0.3" + "call-bound": "^1.0.2", + "has-symbols": "^1.1.0", + "safe-regex-test": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -9835,14 +10003,14 @@ } }, "node_modules/is-typed-array": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", - "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", + "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "which-typed-array": "^1.1.14" + "which-typed-array": "^1.1.16" }, "engines": { "node": ">= 0.4" @@ -9873,29 +10041,32 @@ } }, "node_modules/is-weakref": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", - "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.1.0.tgz", + "integrity": "sha512-SXM8Nwyys6nT5WP6pltOwKytLV7FqQ4UiibxVmW+EIosHcmCqkkjViTb5SNssDlkCiEYRP1/pdWUKVvZBmsR2Q==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "call-bind": "^1.0.2" + "call-bound": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-weakset": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.3.tgz", - "integrity": "sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.4.tgz", + "integrity": "sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "call-bind": "^1.0.7", - "get-intrinsic": "^1.2.4" + "call-bound": "^1.0.3", + "get-intrinsic": "^1.2.6" }, "engines": { "node": ">= 0.4" @@ -10172,13 +10343,13 @@ } }, "node_modules/jiti": { - "version": "1.21.6", - "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.6.tgz", - "integrity": "sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.4.2.tgz", + "integrity": "sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==", "dev": true, "license": "MIT", "bin": { - "jiti": "bin/jiti.js" + "jiti": "lib/jiti-cli.mjs" } }, "node_modules/js-tokens": { @@ -10744,9 +10915,9 @@ } }, "node_modules/math-intrinsics": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.0.0.tgz", - "integrity": "sha512-4MqMiKP90ybymYvsut0CH2g4XWbfLtmlCkXmtmdcDCxNB+mQcu1w/1+L/VD7vi/PSv7X2JYV7SCcR+jiPXnQtA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", "dev": true, "license": "MIT", "peer": true, @@ -12676,16 +12847,18 @@ } }, "node_modules/object.assign": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", - "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.7.tgz", + "integrity": "sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "call-bind": "^1.0.5", + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", "define-properties": "^1.2.1", - "has-symbols": "^1.0.3", + "es-object-atoms": "^1.0.0", + "has-symbols": "^1.1.0", "object-keys": "^1.1.1" }, "engines": { @@ -12732,14 +12905,15 @@ } }, "node_modules/object.values": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.0.tgz", - "integrity": "sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.1.tgz", + "integrity": "sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", "define-properties": "^1.2.1", "es-object-atoms": "^1.0.0" }, @@ -12789,6 +12963,25 @@ "node": ">= 0.8.0" } }, + "node_modules/own-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/own-keys/-/own-keys-1.0.1.tgz", + "integrity": "sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "get-intrinsic": "^1.2.6", + "object-keys": "^1.1.1", + "safe-push-apply": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/own-or": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/own-or/-/own-or-1.0.0.tgz", @@ -13627,21 +13820,21 @@ } }, "node_modules/reflect.getprototypeof": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.8.tgz", - "integrity": "sha512-B5dj6usc5dkk8uFliwjwDHM8To5/QwdKz9JcBZ8Ic4G1f0YmeeJTtE/ZTdgRFPAfxZFiUaPhZ1Jcs4qeagItGQ==", + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz", + "integrity": "sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==", "dev": true, "license": "MIT", "peer": true, "dependencies": { "call-bind": "^1.0.8", "define-properties": "^1.2.1", - "dunder-proto": "^1.0.0", - "es-abstract": "^1.23.5", + "es-abstract": "^1.23.9", "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "gopd": "^1.2.0", - "which-builtin-type": "^1.2.0" + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.7", + "get-proto": "^1.0.1", + "which-builtin-type": "^1.2.1" }, "engines": { "node": ">= 0.4" @@ -13651,16 +13844,18 @@ } }, "node_modules/regexp.prototype.flags": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.3.tgz", - "integrity": "sha512-vqlC04+RQoFalODCbCumG2xIOvapzVMHwsyIGM/SIE8fRhFFsXeH8/QQ+s0T0kDAhKc4k30s73/0ydkHQz6HlQ==", + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz", + "integrity": "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", "define-properties": "^1.2.1", "es-errors": "^1.3.0", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", "set-function-name": "^2.0.2" }, "engines": { @@ -13999,19 +14194,22 @@ "license": "MIT" }, "node_modules/resolve": { - "version": "1.22.8", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", - "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "version": "1.22.10", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz", + "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==", "dev": true, "license": "MIT", "dependencies": { - "is-core-module": "^2.13.0", + "is-core-module": "^2.16.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, "bin": { "resolve": "bin/resolve" }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -14120,16 +14318,17 @@ } }, "node_modules/safe-array-concat": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", - "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.3.tgz", + "integrity": "sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "call-bind": "^1.0.7", - "get-intrinsic": "^1.2.4", - "has-symbols": "^1.0.3", + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "get-intrinsic": "^1.2.6", + "has-symbols": "^1.1.0", "isarray": "^2.0.5" }, "engines": { @@ -14139,17 +14338,35 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/safe-push-apply": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-push-apply/-/safe-push-apply-1.0.0.tgz", + "integrity": "sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "es-errors": "^1.3.0", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/safe-regex-test": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", - "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", + "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "call-bind": "^1.0.6", + "call-bound": "^1.0.2", "es-errors": "^1.3.0", - "is-regex": "^1.1.4" + "is-regex": "^1.2.1" }, "engines": { "node": ">= 0.4" @@ -14245,6 +14462,22 @@ "node": ">= 0.4" } }, + "node_modules/set-proto": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/set-proto/-/set-proto-1.0.0.tgz", + "integrity": "sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "dunder-proto": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -14707,9 +14940,9 @@ } }, "node_modules/streamx": { - "version": "2.21.0", - "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.21.0.tgz", - "integrity": "sha512-Qz6MsDZXJ6ur9u+b+4xCG18TluU7PGlRfXVAAjNiGsFrBUt/ioyLkxbFaKJygoPs+/kW4VyBj0bSj89Qu0IGyg==", + "version": "2.21.1", + "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.21.1.tgz", + "integrity": "sha512-PhP9wUnFLa+91CPy3N6tiQsK+gnYyUNuk15S3YG/zjYE7RuPeCjJngqnzpC31ow0lzBHQ+QGO4cNJnd0djYUsw==", "dev": true, "license": "MIT", "dependencies": { @@ -17297,9 +17530,9 @@ } }, "node_modules/text-decoder": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.2.tgz", - "integrity": "sha512-/MDslo7ZyWTA2vnk1j7XoDVfXsGk3tp+zFEJHJGm0UjIlQifonVFwlVbQDFh8KJzTBnT8ie115TYqir6bclddA==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.3.tgz", + "integrity": "sha512-3/o9z3X0X0fTupwsYvR03pJ/DjWuqqrfwBgTQzdWDiQSm9KitAyz/9WqsT2JQW7KV2m+bC2ol/zqpW37NHxLaA==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -17341,9 +17574,9 @@ "license": "MIT" }, "node_modules/tinyexec": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.1.tgz", - "integrity": "sha512-WiCJLEECkO18gwqIp6+hJg0//p23HXp4S+gGtAKu3mI2F2/sXC4FvHvXvB0zJVVaTPhx1/tOwdbRsa1sOBIKqQ==", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz", + "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==", "dev": true, "license": "MIT" }, @@ -17511,34 +17744,34 @@ } }, "node_modules/typed-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", - "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", + "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "call-bind": "^1.0.7", + "call-bound": "^1.0.3", "es-errors": "^1.3.0", - "is-typed-array": "^1.1.13" + "is-typed-array": "^1.1.14" }, "engines": { "node": ">= 0.4" } }, "node_modules/typed-array-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", - "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz", + "integrity": "sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-proto": "^1.0.3", - "is-typed-array": "^1.1.13" + "gopd": "^1.2.0", + "has-proto": "^1.2.0", + "is-typed-array": "^1.1.14" }, "engines": { "node": ">= 0.4" @@ -17548,20 +17781,20 @@ } }, "node_modules/typed-array-byte-offset": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.3.tgz", - "integrity": "sha512-GsvTyUHTriq6o/bHcTd0vM7OQ9JEdlvluu9YISaA7+KzDzPaIzEeDFNkTfhdE3MYcNhNi0vq/LlegYgIs5yPAw==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz", + "integrity": "sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ==", "dev": true, "license": "MIT", "peer": true, "dependencies": { "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-proto": "^1.0.3", - "is-typed-array": "^1.1.13", - "reflect.getprototypeof": "^1.0.6" + "gopd": "^1.2.0", + "has-proto": "^1.2.0", + "is-typed-array": "^1.1.15", + "reflect.getprototypeof": "^1.0.9" }, "engines": { "node": ">= 0.4" @@ -17603,9 +17836,9 @@ } }, "node_modules/typescript": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", - "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz", + "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==", "dev": true, "license": "Apache-2.0", "peer": true, @@ -17632,26 +17865,29 @@ } }, "node_modules/unbox-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", - "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz", + "integrity": "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "call-bind": "^1.0.2", + "call-bound": "^1.0.3", "has-bigints": "^1.0.2", - "has-symbols": "^1.0.3", - "which-boxed-primitive": "^1.0.2" + "has-symbols": "^1.1.0", + "which-boxed-primitive": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/undici": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-6.21.0.tgz", - "integrity": "sha512-BUgJXc752Kou3oOIuU1i+yZZypyZRqNPW0vqoMPl8VaoalSfeR0D8/t4iAS3yirs79SSMTxTag+ZC86uswv+Cw==", + "version": "6.21.1", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.21.1.tgz", + "integrity": "sha512-q/1rj5D0/zayJB2FraXdaWxbhWiNKDvu8naDT2dl1yTlvJp4BLtOcp2a5BvgGNQpYYJzau7tf1WgKv3b+7mqpQ==", "dev": true, "license": "MIT", "engines": { @@ -17844,9 +18080,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", - "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.2.tgz", + "integrity": "sha512-PPypAm5qvlD7XMZC3BujecnaOxwhrtoFR+Dqkk5Aa/6DssiH0ibKoketaj9w8LP7Bont1rYeoV5plxD7RTEPRg==", "dev": true, "funding": [ { @@ -17865,7 +18101,7 @@ "license": "MIT", "dependencies": { "escalade": "^3.2.0", - "picocolors": "^1.1.0" + "picocolors": "^1.1.1" }, "bin": { "update-browserslist-db": "cli.js" @@ -18110,18 +18346,18 @@ } }, "node_modules/which-boxed-primitive": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.0.tgz", - "integrity": "sha512-Ei7Miu/AXe2JJ4iNF5j/UphAgRoma4trE6PtisM09bPygb3egMH3YLW/befsWb1A1AxvNSFidOFTB18XtnIIng==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz", + "integrity": "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==", "dev": true, "license": "MIT", "peer": true, "dependencies": { "is-bigint": "^1.1.0", - "is-boolean-object": "^1.2.0", - "is-number-object": "^1.1.0", - "is-string": "^1.1.0", - "is-symbol": "^1.1.0" + "is-boolean-object": "^1.2.1", + "is-number-object": "^1.1.1", + "is-string": "^1.1.1", + "is-symbol": "^1.1.1" }, "engines": { "node": ">= 0.4" @@ -18131,26 +18367,26 @@ } }, "node_modules/which-builtin-type": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.2.0.tgz", - "integrity": "sha512-I+qLGQ/vucCby4tf5HsLmGueEla4ZhwTBSqaooS+Y0BuxN4Cp+okmGuV+8mXZ84KDI9BA+oklo+RzKg0ONdSUA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.2.1.tgz", + "integrity": "sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "call-bind": "^1.0.7", + "call-bound": "^1.0.2", "function.prototype.name": "^1.1.6", "has-tostringtag": "^1.0.2", "is-async-function": "^2.0.0", - "is-date-object": "^1.0.5", + "is-date-object": "^1.1.0", "is-finalizationregistry": "^1.1.0", "is-generator-function": "^1.0.10", - "is-regex": "^1.1.4", + "is-regex": "^1.2.1", "is-weakref": "^1.0.2", "isarray": "^2.0.5", - "which-boxed-primitive": "^1.0.2", + "which-boxed-primitive": "^1.1.0", "which-collection": "^1.0.2", - "which-typed-array": "^1.1.15" + "which-typed-array": "^1.1.16" }, "engines": { "node": ">= 0.4" @@ -18187,17 +18423,18 @@ "license": "ISC" }, "node_modules/which-typed-array": { - "version": "1.1.16", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.16.tgz", - "integrity": "sha512-g+N+GAWiRj66DngFwHvISJd+ITsyphZvD1vChfVg6cEdnzy53GzB3oy0fUNlvhz7H7+MiqhYr26qxQShCpKTTQ==", + "version": "1.1.18", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.18.tgz", + "integrity": "sha512-qEcY+KJYlWyLH9vNbsr6/5j59AXk5ni5aakf8ldzBvGde6Iz4sxZGkJyWSAueTG7QhOvNRYb1lDdFmL5Td0QKA==", "dev": true, "license": "MIT", "peer": true, "dependencies": { "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", "for-each": "^0.3.3", - "gopd": "^1.0.1", + "gopd": "^1.2.0", "has-tostringtag": "^1.0.2" }, "engines": { @@ -18429,9 +18666,9 @@ "license": "ISC" }, "node_modules/yaml": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.6.1.tgz", - "integrity": "sha512-7r0XPzioN/Q9kXBro/XPnA6kznR73DHq+GXh5ON7ZozRO6aMjbmiBuKste2wslTFkC5d1dw0GooOCepZXJ2SAg==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.0.tgz", + "integrity": "sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==", "dev": true, "license": "ISC", "bin": { From 7ddfbadd1d51d07e68afbe1b91a36106d98c7bea Mon Sep 17 00:00:00 2001 From: Gar Date: Tue, 21 Jan 2025 09:27:35 -0800 Subject: [PATCH 17/24] deps: @npmcli/package-json@6.1.1 --- DEPENDENCIES.json | 4 +- DEPENDENCIES.md | 5 +- .../@npmcli/package-json/lib/index.js | 4 +- .../package-json/lib/normalize-data.js | 257 ++++++++++++++++++ .../@npmcli/package-json/lib/normalize.js | 28 +- .../@npmcli/package-json/package.json | 12 +- package-lock.json | 12 +- package.json | 2 +- .../tap-snapshots/test/index.js.test.cjs | 6 +- 9 files changed, 283 insertions(+), 47 deletions(-) create mode 100644 node_modules/@npmcli/package-json/lib/normalize-data.js diff --git a/DEPENDENCIES.json b/DEPENDENCIES.json index 791f226fe4bf4..4b4fad53428c2 100644 --- a/DEPENDENCIES.json +++ b/DEPENDENCIES.json @@ -52,7 +52,6 @@ "@npmcli/promise-spawn", "npm-install-checks", "npm-bundled", - "normalize-package-data", "@npmcli/fs", "unique-filename", "npm-packlist", @@ -61,7 +60,8 @@ "nopt", "parse-conflict-json", "read-package-json-fast", - "read" + "read", + "normalize-package-data" ], [ "@npmcli/eslint-config", diff --git a/DEPENDENCIES.md b/DEPENDENCIES.md index 0af343d1ba707..cface3ffd4eb9 100644 --- a/DEPENDENCIES.md +++ b/DEPENDENCIES.md @@ -218,7 +218,6 @@ graph LR; npmcli-mock-registry-->pacote; npmcli-package-json-->hosted-git-info; npmcli-package-json-->json-parse-even-better-errors; - npmcli-package-json-->normalize-package-data; npmcli-package-json-->npmcli-git["@npmcli/git"]; npmcli-package-json-->proc-log; npmcli-package-json-->semver; @@ -660,10 +659,10 @@ graph LR; npmcli-package-json-->glob; npmcli-package-json-->hosted-git-info; npmcli-package-json-->json-parse-even-better-errors; - npmcli-package-json-->normalize-package-data; npmcli-package-json-->npmcli-git["@npmcli/git"]; npmcli-package-json-->proc-log; npmcli-package-json-->semver; + npmcli-package-json-->validate-npm-package-license; npmcli-promise-spawn-->which; npmcli-query-->postcss-selector-parser; npmcli-run-script-->node-gyp; @@ -783,5 +782,5 @@ packages higher up the chain. - @npmcli/package-json, npm-registry-fetch - @npmcli/git, make-fetch-happen - @npmcli/smoke-tests, npm-pick-manifest, @npmcli/installed-package-contents, cacache, promzard - - @npmcli/docs, npm-package-arg, @npmcli/promise-spawn, npm-install-checks, npm-bundled, normalize-package-data, @npmcli/fs, unique-filename, npm-packlist, @npmcli/mock-globals, bin-links, nopt, parse-conflict-json, read-package-json-fast, read + - @npmcli/docs, npm-package-arg, @npmcli/promise-spawn, npm-install-checks, npm-bundled, @npmcli/fs, unique-filename, npm-packlist, @npmcli/mock-globals, bin-links, nopt, parse-conflict-json, read-package-json-fast, read, normalize-package-data - @npmcli/eslint-config, @npmcli/template-oss, ignore-walk, semver, hosted-git-info, proc-log, validate-npm-package-name, which, ini, npm-normalize-package-bin, json-parse-even-better-errors, @npmcli/node-gyp, ssri, unique-slug, @npmcli/redact, @npmcli/agent, minipass-fetch, @npmcli/name-from-folder, @npmcli/query, cmd-shim, read-cmd-shim, write-file-atomic, abbrev, proggy, minify-registry-metadata, mute-stream, npm-audit-report, npm-user-validate diff --git a/node_modules/@npmcli/package-json/lib/index.js b/node_modules/@npmcli/package-json/lib/index.js index 23f326dd59359..828b8991bb7c0 100644 --- a/node_modules/@npmcli/package-json/lib/index.js +++ b/node_modules/@npmcli/package-json/lib/index.js @@ -252,7 +252,9 @@ class PackageJson { .replace(/\n/g, eol) if (fileContent.trim() !== this.#readFileContent.trim()) { - return await writeFile(this.filename, fileContent) + const written = await writeFile(this.filename, fileContent) + this.#readFileContent = fileContent + return written } } diff --git a/node_modules/@npmcli/package-json/lib/normalize-data.js b/node_modules/@npmcli/package-json/lib/normalize-data.js new file mode 100644 index 0000000000000..79b0bafbcd3a4 --- /dev/null +++ b/node_modules/@npmcli/package-json/lib/normalize-data.js @@ -0,0 +1,257 @@ +// Originally normalize-package-data + +const url = require('node:url') +const hostedGitInfo = require('hosted-git-info') +const validateLicense = require('validate-npm-package-license') + +const typos = { + dependancies: 'dependencies', + dependecies: 'dependencies', + depdenencies: 'dependencies', + devEependencies: 'devDependencies', + depends: 'dependencies', + 'dev-dependencies': 'devDependencies', + devDependences: 'devDependencies', + devDepenencies: 'devDependencies', + devdependencies: 'devDependencies', + repostitory: 'repository', + repo: 'repository', + prefereGlobal: 'preferGlobal', + hompage: 'homepage', + hampage: 'homepage', + autohr: 'author', + autor: 'author', + contributers: 'contributors', + publicationConfig: 'publishConfig', + script: 'scripts', +} + +const isEmail = str => str.includes('@') && (str.indexOf('@') < str.lastIndexOf('.')) + +// Extracts description from contents of a readme file in markdown format +function extractDescription (description) { + // the first block of text before the first heading that isn't the first line heading + const lines = description.trim().split('\n') + let start = 0 + // skip initial empty lines and lines that start with # + while (lines[start]?.trim().match(/^(#|$)/)) { + start++ + } + let end = start + 1 + // keep going till we get to the end or an empty line + while (end < lines.length && lines[end].trim()) { + end++ + } + return lines.slice(start, end).join(' ').trim() +} + +function stringifyPerson (person) { + if (typeof person !== 'string') { + const name = person.name || '' + const u = person.url || person.web + const wrappedUrl = u ? (' (' + u + ')') : '' + const e = person.email || person.mail + const wrappedEmail = e ? (' <' + e + '>') : '' + person = name + wrappedEmail + wrappedUrl + } + const matchedName = person.match(/^([^(<]+)/) + const matchedUrl = person.match(/\(([^()]+)\)/) + const matchedEmail = person.match(/<([^<>]+)>/) + const parsed = {} + if (matchedName?.[0].trim()) { + parsed.name = matchedName[0].trim() + } + if (matchedEmail) { + parsed.email = matchedEmail[1] + } + if (matchedUrl) { + parsed.url = matchedUrl[1] + } + return parsed +} + +function normalizeData (data, changes) { + // fixDescriptionField + if (data.description && typeof data.description !== 'string') { + changes?.push(`'description' field should be a string`) + delete data.description + } + if (data.readme && !data.description && data.readme !== 'ERROR: No README data found!') { + data.description = extractDescription(data.readme) + } + if (data.description === undefined) { + delete data.description + } + if (!data.description) { + changes?.push('No description') + } + + // fixModulesField + if (data.modules) { + changes?.push(`modules field is deprecated`) + delete data.modules + } + + // fixFilesField + const files = data.files + if (files && !Array.isArray(files)) { + changes?.push(`Invalid 'files' member`) + delete data.files + } else if (data.files) { + data.files = data.files.filter(function (file) { + if (!file || typeof file !== 'string') { + changes?.push(`Invalid filename in 'files' list: ${file}`) + return false + } else { + return true + } + }) + } + + // fixManField + if (data.man && typeof data.man === 'string') { + data.man = [data.man] + } + + // fixBugsField + if (!data.bugs && data.repository?.url) { + const hosted = hostedGitInfo.fromUrl(data.repository.url) + if (hosted && hosted.bugs()) { + data.bugs = { url: hosted.bugs() } + } + } else if (data.bugs) { + if (typeof data.bugs === 'string') { + if (isEmail(data.bugs)) { + data.bugs = { email: data.bugs } + /* eslint-disable-next-line node/no-deprecated-api */ + } else if (url.parse(data.bugs).protocol) { + data.bugs = { url: data.bugs } + } else { + changes?.push(`Bug string field must be url, email, or {email,url}`) + } + } else { + for (const k in data.bugs) { + if (['web', 'name'].includes(k)) { + changes?.push(`bugs['${k}'] should probably be bugs['url'].`) + data.bugs.url = data.bugs[k] + delete data.bugs[k] + } + } + const oldBugs = data.bugs + data.bugs = {} + if (oldBugs.url) { + /* eslint-disable-next-line node/no-deprecated-api */ + if (typeof (oldBugs.url) === 'string' && url.parse(oldBugs.url).protocol) { + data.bugs.url = oldBugs.url + } else { + changes?.push('bugs.url field must be a string url. Deleted.') + } + } + if (oldBugs.email) { + if (typeof (oldBugs.email) === 'string' && isEmail(oldBugs.email)) { + data.bugs.email = oldBugs.email + } else { + changes?.push('bugs.email field must be a string email. Deleted.') + } + } + } + if (!data.bugs.email && !data.bugs.url) { + delete data.bugs + changes?.push('Normalized value of bugs field is an empty object. Deleted.') + } + } + // fixKeywordsField + if (typeof data.keywords === 'string') { + data.keywords = data.keywords.split(/,\s+/) + } + if (data.keywords && !Array.isArray(data.keywords)) { + delete data.keywords + changes?.push(`keywords should be an array of strings`) + } else if (data.keywords) { + data.keywords = data.keywords.filter(function (kw) { + if (typeof kw !== 'string' || !kw) { + changes?.push(`keywords should be an array of strings`) + return false + } else { + return true + } + }) + } + // fixBundleDependenciesField + const bdd = 'bundledDependencies' + const bd = 'bundleDependencies' + if (data[bdd] && !data[bd]) { + data[bd] = data[bdd] + delete data[bdd] + } + if (data[bd] && !Array.isArray(data[bd])) { + changes?.push(`Invalid 'bundleDependencies' list. Must be array of package names`) + delete data[bd] + } else if (data[bd]) { + data[bd] = data[bd].filter(function (filtered) { + if (!filtered || typeof filtered !== 'string') { + changes?.push(`Invalid bundleDependencies member: ${filtered}`) + return false + } else { + if (!data.dependencies) { + data.dependencies = {} + } + if (!Object.prototype.hasOwnProperty.call(data.dependencies, filtered)) { + changes?.push(`Non-dependency in bundleDependencies: ${filtered}`) + data.dependencies[filtered] = '*' + } + return true + } + }) + } + // fixHomepageField + if (!data.homepage && data.repository && data.repository.url) { + const hosted = hostedGitInfo.fromUrl(data.repository.url) + if (hosted) { + data.homepage = hosted.docs() + } + } + if (data.homepage) { + if (typeof data.homepage !== 'string') { + changes?.push('homepage field must be a string url. Deleted.') + delete data.homepage + } else { + /* eslint-disable-next-line node/no-deprecated-api */ + if (!url.parse(data.homepage).protocol) { + data.homepage = 'http://' + data.homepage + } + } + } + // fixReadmeField + if (!data.readme) { + changes?.push('No README data') + data.readme = 'ERROR: No README data found!' + } + // fixLicenseField + const license = data.license || data.licence + if (!license) { + changes?.push('No license field.') + } else if (typeof (license) !== 'string' || license.length < 1 || license.trim() === '') { + changes?.push('license should be a valid SPDX license expression') + } else if (!validateLicense(license).validForNewPackages) { + changes?.push('license should be a valid SPDX license expression') + } + // fixPeople + if (data.author) { + data.author = stringifyPerson(data.author) + } + ['maintainers', 'contributors'].forEach(function (set) { + if (!Array.isArray(data[set])) { + return + } + data[set] = data[set].map(stringifyPerson) + }) + // fixTypos + for (const d in typos) { + if (Object.prototype.hasOwnProperty.call(data, d)) { + changes?.push(`${d} should probably be ${typos[d]}.`) + } + } +} + +module.exports = { normalizeData } diff --git a/node_modules/@npmcli/package-json/lib/normalize.js b/node_modules/@npmcli/package-json/lib/normalize.js index 3adec0143f445..711539010b8ef 100644 --- a/node_modules/@npmcli/package-json/lib/normalize.js +++ b/node_modules/@npmcli/package-json/lib/normalize.js @@ -348,7 +348,6 @@ const normalize = async (pkg, { strict, steps, root, changes, allowLegacyCase }) changes?.push(`"readmeFilename" was set to ${readmeFile}`) } if (!data.readme) { - // this.warn('missingReadme') data.readme = 'ERROR: No README data found!' } } @@ -488,7 +487,6 @@ const normalize = async (pkg, { strict, steps, root, changes, allowLegacyCase }) // Some steps are isolated so we can do a limited subset of these in `fix` if (steps.includes('fixRepositoryField') || steps.includes('normalizeData')) { if (data.repositories) { - /* eslint-disable-next-line max-len */ changes?.push(`"repository" was set to the first entry in "repositories" (${data.repository})`) data.repository = data.repositories[0] } @@ -572,30 +570,10 @@ const normalize = async (pkg, { strict, steps, root, changes, allowLegacyCase }) } } + // TODO some of this is duplicated in other steps here, a future breaking change may be able to remove the duplicates involved in this step if (steps.includes('normalizeData')) { - const legacyFixer = require('normalize-package-data/lib/fixer.js') - const legacyMakeWarning = require('normalize-package-data/lib/make_warning.js') - legacyFixer.warn = function () { - changes?.push(legacyMakeWarning.apply(null, arguments)) - } - - const legacySteps = [ - 'fixDescriptionField', - 'fixModulesField', - 'fixFilesField', - 'fixManField', - 'fixBugsField', - 'fixKeywordsField', - 'fixBundleDependenciesField', - 'fixHomepageField', - 'fixReadmeField', - 'fixLicenseField', - 'fixPeople', - 'fixTypos', - ] - for (const legacyStep of legacySteps) { - legacyFixer[legacyStep](data) - } + const { normalizeData } = require('./normalize-data.js') + normalizeData(data, changes) } // Warn if the bin references don't point to anything. This might be better diff --git a/node_modules/@npmcli/package-json/package.json b/node_modules/@npmcli/package-json/package.json index 97070e27d0d22..542187829c957 100644 --- a/node_modules/@npmcli/package-json/package.json +++ b/node_modules/@npmcli/package-json/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/package-json", - "version": "6.1.0", + "version": "6.1.1", "description": "Programmatic API to update package.json", "keywords": [ "npm", @@ -33,13 +33,13 @@ "glob": "^10.2.2", "hosted-git-info": "^8.0.0", "json-parse-even-better-errors": "^4.0.0", - "normalize-package-data": "^7.0.0", "proc-log": "^5.0.0", - "semver": "^7.5.3" + "semver": "^7.5.3", + "validate-npm-package-license": "^3.0.4" }, "devDependencies": { - "@npmcli/eslint-config": "^5.0.0", - "@npmcli/template-oss": "4.23.5", + "@npmcli/eslint-config": "^5.1.0", + "@npmcli/template-oss": "4.23.6", "read-package-json": "^7.0.0", "read-package-json-fast": "^4.0.0", "tap": "^16.0.1" @@ -49,7 +49,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.23.5", + "version": "4.23.6", "publish": "true" }, "tap": { diff --git a/package-lock.json b/package-lock.json index 08a4ce19fae21..4d73307305e2d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -89,7 +89,7 @@ "@npmcli/config": "^10.0.0", "@npmcli/fs": "^4.0.0", "@npmcli/map-workspaces": "^4.0.2", - "@npmcli/package-json": "^6.1.0", + "@npmcli/package-json": "^6.1.1", "@npmcli/promise-spawn": "^8.0.2", "@npmcli/redact": "^3.0.0", "@npmcli/run-script": "^9.0.1", @@ -3673,9 +3673,9 @@ } }, "node_modules/@npmcli/package-json": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@npmcli/package-json/-/package-json-6.1.0.tgz", - "integrity": "sha512-t6G+6ZInT4X+tqj2i+wlLIeCKnKOTuz9/VFYDtj+TGTur5q7sp/OYrQA19LdBbWfXDOi0Y4jtedV6xtB8zQ9ug==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/@npmcli/package-json/-/package-json-6.1.1.tgz", + "integrity": "sha512-d5qimadRAUCO4A/Txw71VM7UrRZzV+NPclxz/dc+M6B2oYwjWTjqh8HA/sGQgs9VZuJ6I/P7XIAlJvgrl27ZOw==", "inBundle": true, "license": "ISC", "dependencies": { @@ -3683,9 +3683,9 @@ "glob": "^10.2.2", "hosted-git-info": "^8.0.0", "json-parse-even-better-errors": "^4.0.0", - "normalize-package-data": "^7.0.0", "proc-log": "^5.0.0", - "semver": "^7.5.3" + "semver": "^7.5.3", + "validate-npm-package-license": "^3.0.4" }, "engines": { "node": "^18.17.0 || >=20.5.0" diff --git a/package.json b/package.json index 82bff2ca7baeb..8b5e9744ab765 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "@npmcli/config": "^10.0.0", "@npmcli/fs": "^4.0.0", "@npmcli/map-workspaces": "^4.0.2", - "@npmcli/package-json": "^6.1.0", + "@npmcli/package-json": "^6.1.1", "@npmcli/promise-spawn": "^8.0.2", "@npmcli/redact": "^3.0.0", "@npmcli/run-script": "^9.0.1", diff --git a/smoke-tests/tap-snapshots/test/index.js.test.cjs b/smoke-tests/tap-snapshots/test/index.js.test.cjs index c04e01166f7cb..7d43488c0dc41 100644 --- a/smoke-tests/tap-snapshots/test/index.js.test.cjs +++ b/smoke-tests/tap-snapshots/test/index.js.test.cjs @@ -110,6 +110,7 @@ Wrote to {NPM}/{TESTDIR}/project/package.json: { "name": "project", "version": "1.0.0", + "description": "", "main": "index.js", "scripts": { "test": "echo /"Error: no test specified/" && exit 1" @@ -117,8 +118,7 @@ Wrote to {NPM}/{TESTDIR}/project/package.json: "keywords": [], "author": "", "license": "ISC", - "type": "commonjs", - "description": "" + "type": "commonjs" } ` @@ -303,6 +303,7 @@ exports[`test/index.js TAP basic npm pkg > should print package.json contents 1` { "name": "project", "version": "1.0.0", + "description": "", "main": "index.js", "scripts": { "test": "echo /"Error: no test specified/" && exit 1", @@ -312,7 +313,6 @@ exports[`test/index.js TAP basic npm pkg > should print package.json contents 1` "author": "", "license": "ISC", "type": "commonjs", - "description": "", "dependencies": { "abbrev": "^1.0.4" }, From 31455b2e177b721292f3382726e3f5f3f2963b1d Mon Sep 17 00:00:00 2001 From: Reggi Date: Wed, 22 Jan 2025 11:20:50 -0500 Subject: [PATCH 18/24] fix(publish): honor force for no dist tag and registry version check (#8054) Merges https://github.com/npm/cli/pull/7993 / https://github.com/npm/cli/pull/7994 / https://github.com/npm/cli/pull/7995 - [x] adds ability to --force publish without latest check - [x] adds ability to --force publish of prerelease without tag - [x] consider equality in publish dist tag check error message --- lib/commands/publish.js | 35 +++++++++++++++--------- mock-registry/lib/index.js | 20 +++++++------- test/lib/commands/publish.js | 52 +++++++++++++++++++++++++++++++++++- 3 files changed, 85 insertions(+), 22 deletions(-) diff --git a/lib/commands/publish.js b/lib/commands/publish.js index 764a3c15c9999..1967e05a23534 100644 --- a/lib/commands/publish.js +++ b/lib/commands/publish.js @@ -114,12 +114,14 @@ class Publish extends BaseCommand { // so that we send the latest and greatest thing to the registry // note that publishConfig might have changed as well! manifest = await this.#getManifest(spec, opts, true) - - const isPreRelease = Boolean(semver.parse(manifest.version).prerelease.length) + const force = this.npm.config.get('force') const isDefaultTag = this.npm.config.isDefault('tag') && !manifest.publishConfig?.tag - if (isPreRelease && isDefaultTag) { - throw new Error('You must specify a tag using --tag when publishing a prerelease version.') + if (!force) { + const isPreRelease = Boolean(semver.parse(manifest.version).prerelease.length) + if (isPreRelease && isDefaultTag) { + throw new Error('You must specify a tag using --tag when publishing a prerelease version.') + } } // If we are not in JSON mode then we show the user the contents of the tarball @@ -156,11 +158,18 @@ class Publish extends BaseCommand { } } - const latestVersion = await this.#highestPublishedVersion(resolved, registry) - const latestSemverIsGreater = !!latestVersion && semver.gte(latestVersion, manifest.version) + if (!force) { + const { highestVersion, versions } = await this.#registryVersions(resolved, registry) + /* eslint-disable-next-line max-len */ + const highestVersionIsGreater = !!highestVersion && semver.gte(highestVersion, manifest.version) - if (latestSemverIsGreater && isDefaultTag) { - throw new Error(`Cannot implicitly apply the "latest" tag because published version ${latestVersion} is higher than the new version ${manifest.version}. You must specify a tag using --tag.`) + if (versions.includes(manifest.version)) { + throw new Error(`You cannot publish over the previously published versions: ${manifest.version}.`) + } + + if (highestVersionIsGreater && isDefaultTag) { + throw new Error(`Cannot implicitly apply the "latest" tag because previously published version ${highestVersion} is higher than the new version ${manifest.version}. You must specify a tag using --tag.`) + } } const access = opts.access === null ? 'default' : opts.access @@ -202,7 +211,7 @@ class Publish extends BaseCommand { } } - async #highestPublishedVersion (spec, registry) { + async #registryVersions (spec, registry) { try { const packument = await pacote.packument(spec, { ...this.npm.flatOptions, @@ -210,7 +219,7 @@ class Publish extends BaseCommand { registry, }) if (typeof packument?.versions === 'undefined') { - return null + return { versions: [], highestVersion: null } } const ordered = Object.keys(packument?.versions) .flatMap(v => { @@ -221,9 +230,11 @@ class Publish extends BaseCommand { return s }) .sort((a, b) => b.compare(a)) - return ordered.length >= 1 ? ordered[0].version : null + const highestVersion = ordered.length >= 1 ? ordered[0].version : null + const versions = ordered.map(v => v.version) + return { versions, highestVersion } } catch (e) { - return null + return { versions: [], highestVersion: null } } } diff --git a/mock-registry/lib/index.js b/mock-registry/lib/index.js index 3b06681b7ed31..8248631519054 100644 --- a/mock-registry/lib/index.js +++ b/mock-registry/lib/index.js @@ -359,16 +359,18 @@ class MockRegistry { } publish (name, { - packageJson, access, noPut, putCode, manifest, packuments, + packageJson, access, noGet, noPut, putCode, manifest, packuments, } = {}) { - // this getPackage call is used to get the latest semver version before publish - if (manifest) { - this.getPackage(name, { code: 200, resp: manifest }) - } else if (packuments) { - this.getPackage(name, { code: 200, resp: this.manifest({ name, packuments }) }) - } else { - // assumes the package does not exist yet and will 404 x2 from pacote.manifest - this.getPackage(name, { times: 2, code: 404 }) + if (!noGet) { + // this getPackage call is used to get the latest semver version before publish + if (manifest) { + this.getPackage(name, { code: 200, resp: manifest }) + } else if (packuments) { + this.getPackage(name, { code: 200, resp: this.manifest({ name, packuments }) }) + } else { + // assumes the package does not exist yet and will 404 x2 from pacote.manifest + this.getPackage(name, { times: 2, code: 404 }) + } } if (!noPut) { this.putPackage(name, { code: putCode, packageJson, access }) diff --git a/test/lib/commands/publish.js b/test/lib/commands/publish.js index cd5c1bdad6aa3..f310587418b1f 100644 --- a/test/lib/commands/publish.js +++ b/test/lib/commands/publish.js @@ -853,6 +853,28 @@ t.test('prerelease dist tag', (t) => { await npm.exec('publish', []) }) + t.test('does not abort when prerelease and force', async t => { + const packageJson = { + ...pkgJson, + version: '1.0.0-0', + publishConfig: { registry: alternateRegistry }, + } + const { npm, registry } = await loadNpmWithRegistry(t, { + config: { + loglevel: 'silent', + force: true, + [`${alternateRegistry.slice(6)}/:_authToken`]: 'test-other-token', + }, + prefixDir: { + 'package.json': JSON.stringify(packageJson, null, 2), + }, + registry: alternateRegistry, + authorization: 'test-other-token', + }) + registry.publish(pkg, { noGet: true, packageJson }) + await npm.exec('publish', []) + }) + t.end() }) @@ -886,7 +908,7 @@ t.test('semver highest dist tag', async t => { registry.publish(pkg, { noPut: true, packuments }) await t.rejects(async () => { await npm.exec('publish', []) - }, new Error('Cannot implicitly apply the "latest" tag because published version 100.0.0 is higher than the new version 99.0.0. You must specify a tag using --tag.')) + }, new Error('Cannot implicitly apply the "latest" tag because previously published version 100.0.0 is higher than the new version 99.0.0. You must specify a tag using --tag.')) }) await t.test('ALLOWS publish when highest is HIGHER than publishing version and flag', async t => { @@ -933,4 +955,32 @@ t.test('semver highest dist tag', async t => { registry.publish(pkg, { packuments }) await npm.exec('publish', []) }) + + await t.test('PREVENTS publish when latest version is SAME AS publishing version', async t => { + const version = '100.0.0' + const { npm, registry } = await loadNpmWithRegistry(t, init({ version })) + registry.publish(pkg, { noPut: true, packuments }) + await t.rejects(async () => { + await npm.exec('publish', []) + }, new Error('You cannot publish over the previously published versions: 100.0.0.')) + }) + + await t.test('PREVENTS publish when publishing version EXISTS ALREADY in the registry', async t => { + const version = '50.0.0' + const { npm, registry } = await loadNpmWithRegistry(t, init({ version })) + registry.publish(pkg, { noPut: true, packuments }) + await t.rejects(async () => { + await npm.exec('publish', []) + }, new Error('You cannot publish over the previously published versions: 50.0.0.')) + }) + + await t.test('ALLOWS publish when latest is HIGHER than publishing version and flag --force', async t => { + const version = '99.0.0' + const { npm, registry } = await loadNpmWithRegistry(t, { + ...init({ version }), + argv: ['--force'], + }) + registry.publish(pkg, { noGet: true, packuments }) + await npm.exec('publish', []) + }) }) From 3644e79a73e511bc54d857bc2026b071fe18a6fe Mon Sep 17 00:00:00 2001 From: Gar Date: Wed, 22 Jan 2025 09:27:24 -0800 Subject: [PATCH 19/24] docs: update readme for Node.js versions, remove badges (#8055) Update the copy for "requirements" to specify that it is the Node.js support lifecycle that is key, not a specific version. Also removed the badges from the readme. Most of that info is already on the page as parsed by GitHub. --- README.md | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/README.md b/README.md index 3dc35a3842554..6271d5d33c0f0 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,8 @@ # npm - a JavaScript package manager -[![npm version](https://img.shields.io/npm/v/npm.svg)](https://npm.im/npm) -[![license](https://img.shields.io/npm/l/npm.svg)](https://npm.im/npm) -[![CI - cli](https://github.com/npm/cli/actions/workflows/ci.yml/badge.svg)](https://github.com/npm/cli/actions/workflows/ci.yml) -[![Benchmark Suite](https://github.com/npm/cli/actions/workflows/benchmark.yml/badge.svg)](https://github.com/npm/cli/actions/workflows/benchmark.yml) - ### Requirements -One of the following versions of [Node.js](https://nodejs.org/en/download/) must be installed to run **`npm`**: - -* `18.x.x` >= `18.17.0` -* `20.5.0` or higher +You should be running a currently supported version of [Node.js](https://nodejs.org/en/download/) to run **`npm`**. For a list of which versions of Node.js are currently supported, please see the [Node.js releases](https://nodejs.org/en/about/previous-releases) page. ### Installation From aa202e9dac2f927bedcaaed4db0eef7b3415fc68 Mon Sep 17 00:00:00 2001 From: Reggi Date: Wed, 22 Jan 2025 13:17:23 -0500 Subject: [PATCH 20/24] chore: smoke tests using a preid (#8056) https://github.com/npm/cli/pull/8054 broke the smoke test because were publishing the current version in a test --- scripts/publish.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/publish.js b/scripts/publish.js index a28bfd849120c..cb4e4e769d851 100644 --- a/scripts/publish.js +++ b/scripts/publish.js @@ -126,6 +126,8 @@ const main = async (opts) => { for (const publish of publishes) { const workspace = publish.workspace && `--workspace=${publish.name}` const publishPkg = (...args) => npm('publish', workspace, `--tag=${publish.tag}`, ...args) + + await npm('version prerelease', workspace, '--preid=smoke') if (isPack) { await npm( 'pack', From 9281ebf8e428d40450ad75ba61bc6f040b3bf896 Mon Sep 17 00:00:00 2001 From: Reggi Date: Wed, 22 Jan 2025 13:59:47 -0500 Subject: [PATCH 21/24] chore: fix smoke tests prerelease needs separate string args (#8057) --- scripts/publish.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/publish.js b/scripts/publish.js index cb4e4e769d851..0a6ac1340a130 100644 --- a/scripts/publish.js +++ b/scripts/publish.js @@ -127,7 +127,7 @@ const main = async (opts) => { const workspace = publish.workspace && `--workspace=${publish.name}` const publishPkg = (...args) => npm('publish', workspace, `--tag=${publish.tag}`, ...args) - await npm('version prerelease', workspace, '--preid=smoke') + await npm('version', 'prerelease', workspace, '--preid=smoke') if (isPack) { await npm( 'pack', From 6d0f46e67e9673e8a2dc6edb92144a73f853950c Mon Sep 17 00:00:00 2001 From: Reggi Date: Mon, 27 Jan 2025 10:59:04 -0500 Subject: [PATCH 22/24] chore: stop publish smoke from check git clean (#8058) Im a big proponent of scripts working the same way in ci as they would locally. and that we should be able to run anything the ci does locally. The publish script is used to publish npm and ws packages, but also within a series of smoke tests. Making the flags clear it's either one of the two paths was my goal. --- scripts/publish.js | 40 +++++++++++++++++++++-------------- scripts/smoke-publish-test.sh | 2 +- 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/scripts/publish.js b/scripts/publish.js index 0a6ac1340a130..5b5a38579a42d 100644 --- a/scripts/publish.js +++ b/scripts/publish.js @@ -72,9 +72,10 @@ const getPublishes = async ({ force }) => { } const main = async (opts) => { - const { isLocal, smokePublish, packDestination } = opts - const isPack = !!packDestination - const publishes = await getPublishes({ force: isPack }) + const { test, otp, dryRun, smokePublish, packDestination } = opts + + const hasPackDest = !!packDestination + const publishes = await getPublishes({ force: smokePublish }) if (!publishes.length) { throw new Error( @@ -88,13 +89,15 @@ const main = async (opts) => { table.push([publish.name, publish.version, publish.tag]) } + const preformOperations = hasPackDest ? ['publish', 'pack'] : ['publish'] + const confirmMessage = [ - `Ready to ${isPack ? 'pack' : 'publish'} the following packages:`, + `Ready to ${preformOperations.join(',')} the following packages:`, table.toString(), - isPack ? null : 'Ok to proceed? ', + smokePublish ? null : 'Ok to proceed? ', ].filter(Boolean).join('\n') - if (isPack) { + if (smokePublish) { log.info(confirmMessage) } else { const confirm = await read({ prompt: confirmMessage, default: 'y' }) @@ -109,7 +112,7 @@ const main = async (opts) => { await npm('rm', '--global', '--force', 'npm') await npm('link', '--force', '--ignore-scripts') - if (opts.test) { + if (test) { await npm('run', 'lint-all', '--ignore-scripts') await npm('run', 'postlint', '--ignore-scripts') await npm('run', 'test-all', '--ignore-scripts') @@ -117,30 +120,35 @@ const main = async (opts) => { await npm('prune', '--omit=dev', '--no-save', '--no-audit', '--no-fund') await npm('install', '-w', 'docs', '--ignore-scripts', '--no-audit', '--no-fund') - if (isLocal && smokePublish) { + + if (smokePublish) { log.info(`Skipping git dirty check due to local smoke publish test being run`) } else { await git.dirty() } + let count = -1 for (const publish of publishes) { + log.info(`Publishing ${publish.name}@${publish.version} to ${publish.tag} ${count++}/${publishes.length}`) const workspace = publish.workspace && `--workspace=${publish.name}` const publishPkg = (...args) => npm('publish', workspace, `--tag=${publish.tag}`, ...args) - await npm('version', 'prerelease', workspace, '--preid=smoke') - if (isPack) { + if (hasPackDest) { await npm( 'pack', workspace, - opts.packDestination && `--pack-destination=${opts.packDestination}` + packDestination && `--pack-destination=${packDestination}` ) - if (smokePublish) { - await publishPkg('--dry-run') - } + } + + if (smokePublish) { + // when we have a smoke test run we'd want to bump the version or else npm will throw an error even with dry-run + await npm('version', 'prerelease', workspace, '--preid=smoke', '--ignore-scripts', '--no-git-tag-version') + await publishPkg('--dry-run', '--ignore-scripts') } else { await publishPkg( - opts.dryRun && '--dry-run', - opts.otp && `--otp=${opts.otp === 'op' ? await op() : opts.otp}` + dryRun && '--dry-run', + otp && `--otp=${otp === 'op' ? await op() : otp}` ) } } diff --git a/scripts/smoke-publish-test.sh b/scripts/smoke-publish-test.sh index 1d08a0adf2bc8..5de4f32931cf7 100755 --- a/scripts/smoke-publish-test.sh +++ b/scripts/smoke-publish-test.sh @@ -66,7 +66,7 @@ fi # were publishing it to the registry. The only difference is in the # publish.js script which will only pack and not publish node . version $NPM_VERSION --ignore-scripts --git-tag-version="$IS_CI" -node scripts/publish.js --pack-destination=$RUNNER_TEMP --smoke-publish=true --is-local="$IS_LOCAL" +node scripts/publish.js --pack-destination=$RUNNER_TEMP --smoke-publish=true NPM_TARBALL="$RUNNER_TEMP/npm-$NPM_VERSION.tgz" node . install --global $NPM_TARBALL From 61f00e3c23211d37c7980ebd6d1cf8d1dac49f18 Mon Sep 17 00:00:00 2001 From: Reggi Date: Wed, 29 Jan 2025 11:18:49 -0500 Subject: [PATCH 23/24] chore: splits out smoke-tests from publish-dryrun tests (#8069) This removes the `publish.sh --smoke-publish` like from the current `smoke-publish-test.sh` (renaming it to `smoke-test.sh`) and runs both operations as seperete jobs within the `ci.yml` (on pr) and `ci-release.yml` (on merge) workflow. Why? To avoid changed files / git dirty issues from one operation to the next. With this PR we should have the same checks that merge has, on pr as well, preventing scenarios where a PR breaks a `smoke test` or `publish --smoke-publish` test. The only difference between merge / pr is that merge has more tested node versions, if PRs start to pass but fail in these version lets add the full matrix. ```sh npm i npm@latest -g && node scripts/git-dirty.js && node scripts/resetdeps.js && ./scripts/smoke-tests.sh ``` ```sh npm i npm@latest -g && node scripts/git-dirty.js && node scripts/resetdeps.js && node ./scripts/publish.js --pack-destination=${pwd} --smoke-publish=true ``` --- .github/workflows/ci-release.yml | 79 ++++++++++++++++--- .github/workflows/ci.yml | 72 ++++++++++++++++- scripts/smoke-tests.js | 0 .../{smoke-publish-test.sh => smoke-tests.sh} | 2 +- scripts/template-oss/ci-release-yml.hbs | 66 ++++++++++------ scripts/template-oss/ci-yml.hbs | 49 ++++++++++-- 6 files changed, 228 insertions(+), 40 deletions(-) create mode 100644 scripts/smoke-tests.js rename scripts/{smoke-publish-test.sh => smoke-tests.sh} (97%) diff --git a/.github/workflows/ci-release.yml b/.github/workflows/ci-release.yml index 087ce1b56c90f..edc25fcb4bd67 100644 --- a/.github/workflows/ci-release.yml +++ b/.github/workflows/ci-release.yml @@ -145,12 +145,12 @@ jobs: conclusion: ${{ job.status }} check_id: ${{ steps.create-check.outputs.check-id }} - smoke-publish: - # This cant be tested on Windows because our node_modules directory - # checks in symlinks which are not supported there. This should be - # fixed somehow, because this means some forms of local development - # are likely broken on Windows as well. - name: Smoke Publish - ${{ matrix.platform.name }} - ${{ matrix.node-version }} + smoke-tests: + # This cant be tested on Windows because our node_modules directory + # checks in symlinks which are not supported there. This should be + # fixed somehow, because this means some forms of local development + # are likely broken on Windows as well. + name: Smoke Tests - ${{ matrix.platform.name }} - ${{ matrix.node-version }} if: github.repository_owner == 'npm' strategy: fail-fast: false @@ -182,7 +182,7 @@ jobs: if: ${{ inputs.check-sha }} uses: ./.github/actions/create-check with: - name: "Smoke Publish - ${{ matrix.platform.name }} - ${{ matrix.node-version }}" + name: "Smoke Tests - ${{ matrix.platform.name }} - ${{ matrix.node-version }}" token: ${{ secrets.GITHUB_TOKEN }} sha: ${{ inputs.check-sha }} - name: Setup Node @@ -196,8 +196,69 @@ jobs: run: node scripts/git-dirty.js - name: Reset Deps run: node scripts/resetdeps.js - - name: Smoke Publish - run: ./scripts/smoke-publish-test.sh + - name: Smoke Tests + run: ./scripts/smoke-tests.sh + - name: Conclude Check + uses: LouisBrunner/checks-action@v1.6.0 + if: steps.create-check.outputs.check-id && always() + with: + token: ${{ secrets.GITHUB_TOKEN }} + conclusion: ${{ job.status }} + check_id: ${{ steps.create-check.outputs.check-id }} + + publish-dryrun: + # This cant be tested on Windows because our node_modules directory + # checks in symlinks which are not supported there. This should be + # fixed somehow, because this means some forms of local development + # are likely broken on Windows as well. + name: Publish Dry-Run - ${{ matrix.platform.name }} - ${{ matrix.node-version }} + if: github.repository_owner == 'npm' + strategy: + fail-fast: false + matrix: + platform: + - name: Linux + os: ubuntu-latest + shell: bash + node-version: + - 20.17.0 + - 20.x + - 22.9.0 + - 22.x + runs-on: ${{ matrix.platform.os }} + defaults: + run: + shell: ${{ matrix.platform.shell }} + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref }} + - name: Setup Git User + run: | + git config --global user.email "npm-cli+bot@github.com" + git config --global user.name "npm CLI robot" + - name: Create Check + id: create-check + if: ${{ inputs.check-sha }} + uses: ./.github/actions/create-check + with: + name: "Publish Dry-Run - ${{ matrix.platform.name }} - ${{ matrix.node-version }}" + token: ${{ secrets.GITHUB_TOKEN }} + sha: ${{ inputs.check-sha }} + - name: Setup Node + uses: actions/setup-node@v4 + id: node + with: + node-version: ${{ matrix.node-version }} + check-latest: contains(matrix.node-version, '.x') + cache: npm + - name: Check Git Status + run: node scripts/git-dirty.js + - name: Reset Deps + run: node scripts/resetdeps.js + - name: Publish Dry-Run + run: node ./scripts/publish.js --pack-destination=$RUNNER_TEMP --smoke-publish=true - name: Conclude Check uses: LouisBrunner/checks-action@v1.6.0 if: steps.create-check.outputs.check-id && always() diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bb754da8e6111..e53689d0ebedd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -147,6 +147,10 @@ jobs: run: node . run licenses smoke-tests: + # This cant be tested on Windows because our node_modules directory + # checks in symlinks which are not supported there. This should be + # fixed somehow, because this means some forms of local development + # are likely broken on Windows as well. name: Smoke Tests if: github.repository_owner == 'npm' runs-on: ubuntu-latest @@ -156,10 +160,20 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref }} - name: Setup Git User run: | git config --global user.email "npm-cli+bot@github.com" git config --global user.name "npm CLI robot" + - name: Create Check + id: create-check + if: ${{ inputs.check-sha }} + uses: ./.github/actions/create-check + with: + name: "Smoke Tests" + token: ${{ secrets.GITHUB_TOKEN }} + sha: ${{ inputs.check-sha }} - name: Setup Node uses: actions/setup-node@v4 id: node @@ -171,10 +185,64 @@ jobs: run: node scripts/git-dirty.js - name: Reset Deps run: node scripts/resetdeps.js - - name: Run Smoke Tests - run: node . test -w smoke-tests --ignore-scripts + - name: Smoke Tests + run: ./scripts/smoke-tests.sh + - name: Conclude Check + uses: LouisBrunner/checks-action@v1.6.0 + if: steps.create-check.outputs.check-id && always() + with: + token: ${{ secrets.GITHUB_TOKEN }} + conclusion: ${{ job.status }} + check_id: ${{ steps.create-check.outputs.check-id }} + + publish-dryrun: + # This cant be tested on Windows because our node_modules directory + # checks in symlinks which are not supported there. This should be + # fixed somehow, because this means some forms of local development + # are likely broken on Windows as well. + name: Publish Dry-Run + if: github.repository_owner == 'npm' + runs-on: ubuntu-latest + defaults: + run: + shell: bash + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref }} + - name: Setup Git User + run: | + git config --global user.email "npm-cli+bot@github.com" + git config --global user.name "npm CLI robot" + - name: Create Check + id: create-check + if: ${{ inputs.check-sha }} + uses: ./.github/actions/create-check + with: + name: "Publish Dry-Run" + token: ${{ secrets.GITHUB_TOKEN }} + sha: ${{ inputs.check-sha }} + - name: Setup Node + uses: actions/setup-node@v4 + id: node + with: + node-version: 22.x + check-latest: contains('22.x', '.x') + cache: npm - name: Check Git Status run: node scripts/git-dirty.js + - name: Reset Deps + run: node scripts/resetdeps.js + - name: Publish Dry-Run + run: node ./scripts/publish.js --pack-destination=$RUNNER_TEMP --smoke-publish=true + - name: Conclude Check + uses: LouisBrunner/checks-action@v1.6.0 + if: steps.create-check.outputs.check-id && always() + with: + token: ${{ secrets.GITHUB_TOKEN }} + conclusion: ${{ job.status }} + check_id: ${{ steps.create-check.outputs.check-id }} windows-shims: name: Windows Shims Tests diff --git a/scripts/smoke-tests.js b/scripts/smoke-tests.js new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/scripts/smoke-publish-test.sh b/scripts/smoke-tests.sh similarity index 97% rename from scripts/smoke-publish-test.sh rename to scripts/smoke-tests.sh index 5de4f32931cf7..0acda09c26b38 100755 --- a/scripts/smoke-publish-test.sh +++ b/scripts/smoke-tests.sh @@ -66,7 +66,7 @@ fi # were publishing it to the registry. The only difference is in the # publish.js script which will only pack and not publish node . version $NPM_VERSION --ignore-scripts --git-tag-version="$IS_CI" -node scripts/publish.js --pack-destination=$RUNNER_TEMP --smoke-publish=true +node . pack . --pack-destination "$RUNNER_TEMP" NPM_TARBALL="$RUNNER_TEMP/npm-$NPM_VERSION.tgz" node . install --global $NPM_TARBALL diff --git a/scripts/template-oss/ci-release-yml.hbs b/scripts/template-oss/ci-release-yml.hbs index 8ff869812a331..6ec27f1b2e9d2 100644 --- a/scripts/template-oss/ci-release-yml.hbs +++ b/scripts/template-oss/ci-release-yml.hbs @@ -1,23 +1,45 @@ -{{> ciReleaseYml }} +{{> ciReleaseYml }} - smoke-publish: - # This cant be tested on Windows because our node_modules directory - # checks in symlinks which are not supported there. This should be - # fixed somehow, because this means some forms of local development - # are likely broken on Windows as well. - {{> jobMatrixYml - jobName="Smoke Publish" - jobCheckout=(obj ref="${{ inputs.ref }}") - jobCreateCheck=(obj sha="${{ inputs.check-sha }}") - windowsCI=false - macCI=false - }} - - name: Smoke Publish - run: ./scripts/smoke-publish-test.sh - - name: Conclude Check - uses: LouisBrunner/checks-action@v1.6.0 - if: steps.create-check.outputs.check-id && always() - with: - token: $\{{ secrets.GITHUB_TOKEN }} - conclusion: $\{{ job.status }} - check_id: $\{{ steps.create-check.outputs.check-id }} + smoke-tests: + # This cant be tested on Windows because our node_modules directory + # checks in symlinks which are not supported there. This should be + # fixed somehow, because this means some forms of local development + # are likely broken on Windows as well. + {{> jobMatrixYml + jobName="Smoke Tests" + jobCheckout=(obj ref="${{ inputs.ref }}") + jobCreateCheck=(obj sha="${{ inputs.check-sha }}") + windowsCI=false + macCI=false + }} + - name: Smoke Tests + run: ./scripts/smoke-tests.sh + - name: Conclude Check + uses: LouisBrunner/checks-action@v1.6.0 + if: steps.create-check.outputs.check-id && always() + with: + token: $\{{ secrets.GITHUB_TOKEN }} + conclusion: $\{{ job.status }} + check_id: $\{{ steps.create-check.outputs.check-id }} + + publish-dryrun: + # This cant be tested on Windows because our node_modules directory + # checks in symlinks which are not supported there. This should be + # fixed somehow, because this means some forms of local development + # are likely broken on Windows as well. + {{> jobMatrixYml + jobName="Publish Dry-Run" + jobCheckout=(obj ref="${{ inputs.ref }}") + jobCreateCheck=(obj sha="${{ inputs.check-sha }}") + windowsCI=false + macCI=false + }} + - name: Publish Dry-Run + run: node ./scripts/publish.js --pack-destination=$RUNNER_TEMP --smoke-publish=true + - name: Conclude Check + uses: LouisBrunner/checks-action@v1.6.0 + if: steps.create-check.outputs.check-id && always() + with: + token: $\{{ secrets.GITHUB_TOKEN }} + conclusion: $\{{ job.status }} + check_id: $\{{ steps.create-check.outputs.check-id }} \ No newline at end of file diff --git a/scripts/template-oss/ci-yml.hbs b/scripts/template-oss/ci-yml.hbs index bdd4e3b5ccab5..386a3716deadd 100644 --- a/scripts/template-oss/ci-yml.hbs +++ b/scripts/template-oss/ci-yml.hbs @@ -5,12 +5,49 @@ - name: Check Licenses run: {{rootNpmPath}} run licenses - smoke-tests: - {{> jobYml jobName="Smoke Tests" }} - - name: Run Smoke Tests - run: {{rootNpmPath}} test -w smoke-tests --ignore-scripts - - name: Check Git Status - run: node scripts/git-dirty.js + smoke-tests: + # This cant be tested on Windows because our node_modules directory + # checks in symlinks which are not supported there. This should be + # fixed somehow, because this means some forms of local development + # are likely broken on Windows as well. + {{> jobYml + jobName="Smoke Tests" + jobCheckout=(obj ref="${{ inputs.ref }}") + jobCreateCheck=(obj sha="${{ inputs.check-sha }}") + windowsCI=false + macCI=false + }} + - name: Smoke Tests + run: ./scripts/smoke-tests.sh + - name: Conclude Check + uses: LouisBrunner/checks-action@v1.6.0 + if: steps.create-check.outputs.check-id && always() + with: + token: $\{{ secrets.GITHUB_TOKEN }} + conclusion: $\{{ job.status }} + check_id: $\{{ steps.create-check.outputs.check-id }} + + publish-dryrun: + # This cant be tested on Windows because our node_modules directory + # checks in symlinks which are not supported there. This should be + # fixed somehow, because this means some forms of local development + # are likely broken on Windows as well. + {{> jobYml + jobName="Publish Dry-Run" + jobCheckout=(obj ref="${{ inputs.ref }}") + jobCreateCheck=(obj sha="${{ inputs.check-sha }}") + windowsCI=false + macCI=false + }} + - name: Publish Dry-Run + run: node ./scripts/publish.js --pack-destination=$RUNNER_TEMP --smoke-publish=true + - name: Conclude Check + uses: LouisBrunner/checks-action@v1.6.0 + if: steps.create-check.outputs.check-id && always() + with: + token: $\{{ secrets.GITHUB_TOKEN }} + conclusion: $\{{ job.status }} + check_id: $\{{ steps.create-check.outputs.check-id }} windows-shims: name: Windows Shims Tests From cab74ff7c25149d172cf5d612eb0a651eda531e3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 29 Jan 2025 16:19:42 +0000 Subject: [PATCH 24/24] chore: release 11.1.0 --- .release-please-manifest.json | 4 ++-- AUTHORS | 1 + CHANGELOG.md | 31 +++++++++++++++++++++++++++++++ package-lock.json | 8 ++++---- package.json | 4 ++-- workspaces/config/CHANGELOG.md | 4 ++++ workspaces/config/package.json | 2 +- 7 files changed, 45 insertions(+), 9 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index fb5b2de7bda86..b7789c53b8ca5 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,5 +1,5 @@ { - ".": "11.0.0", + ".": "11.1.0", "workspaces/arborist": "9.0.0", "workspaces/libnpmaccess": "10.0.0", "workspaces/libnpmdiff": "8.0.0", @@ -11,5 +11,5 @@ "workspaces/libnpmsearch": "9.0.0", "workspaces/libnpmteam": "8.0.0", "workspaces/libnpmversion": "8.0.0", - "workspaces/config": "10.0.0" + "workspaces/config": "10.0.1" } diff --git a/AUTHORS b/AUTHORS index c4b00e7246c4a..9201c127b8775 100644 --- a/AUTHORS +++ b/AUTHORS @@ -952,3 +952,4 @@ reggi btea <2356281422@qq.com> Sander Aalbers <31731300+Sanderovich@users.noreply.github.com> Chris Sidi +Maksim Koryukov diff --git a/CHANGELOG.md b/CHANGELOG.md index 8de4100fb268f..e08b0862b09d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,36 @@ # Changelog +## [11.1.0](https://github.com/npm/cli/compare/v11.0.0...v11.1.0) (2025-01-29) +### Features +* [`7f6c997`](https://github.com/npm/cli/commit/7f6c9973dc9a4dfebd76e52e060a9d8496b8bd98) [#8009](https://github.com/npm/cli/pull/8009) add dry-run to deprecate/undeprecate commands (@wraithgar) +* [`1764a37`](https://github.com/npm/cli/commit/1764a37f1913b6a0811a85d89e029fc1dc79da54) [#8009](https://github.com/npm/cli/pull/8009) add npm undeprecate command (@wraithgar) +### Bug Fixes +* [`31455b2`](https://github.com/npm/cli/commit/31455b2e177b721292f3382726e3f5f3f2963b1d) [#8054](https://github.com/npm/cli/pull/8054) publish: honor force for no dist tag and registry version check (#8054) (@reggi) +* [`dc31c1b`](https://github.com/npm/cli/commit/dc31c1bdc6658ab69554adcf2988ee99a615c409) [#8038](https://github.com/npm/cli/pull/8038) remove max-len linting bypasses (@wraithgar) +* [`8a911ff`](https://github.com/npm/cli/commit/8a911ff895967678aa786595db3418fc28e6966a) [#8038](https://github.com/npm/cli/pull/8038) publish: disregard deprecated versions when calculating highest version (@wraithgar) +* [`7f72944`](https://github.com/npm/cli/commit/7f72944e43f009cf4d55ff4fe24c459e07f588fd) [#8038](https://github.com/npm/cli/pull/8038) publish: accept publishConfig.tag to override highes semver check (@wraithgar) +* [`ab9ddc0`](https://github.com/npm/cli/commit/ab9ddc0413374fbf4879da535f82e03bc4e62cf3) [#7992](https://github.com/npm/cli/pull/7992) sbom: deduplicate sbom dependencies (#7992) (@bdehamer) +* [`f7da341`](https://github.com/npm/cli/commit/f7da341322c2f860156e8144b208583596504479) [#7980](https://github.com/npm/cli/pull/7980) search: properly display multiple search terms (#7980) (@wraithgar) +### Documentation +* [`3644e79`](https://github.com/npm/cli/commit/3644e79a73e511bc54d857bc2026b071fe18a6fe) [#8055](https://github.com/npm/cli/pull/8055) update readme for Node.js versions, remove badges (#8055) (@wraithgar) +* [`f1af61f`](https://github.com/npm/cli/commit/f1af61f917e58a0a45d2b15d1e5600988b2c824f) [#8041](https://github.com/npm/cli/pull/8041) fix typos in "package-json" (#8041) (@maxkoryukov) +* [`e90c6fe`](https://github.com/npm/cli/commit/e90c6feeacdf9ad010d4d73b65d7dd7d3b86efe2) [#8051](https://github.com/npm/cli/pull/8051) depth flag default value (#8051) (@milaninfy) +* [`866b5ee`](https://github.com/npm/cli/commit/866b5ee3ae5ed508ecbe832d01f5ebd6b00f6789) [#8030](https://github.com/npm/cli/pull/8030) safer documentation urls, repos, packages (#8030) (@reggi) +### Dependencies +* [`7ddfbad`](https://github.com/npm/cli/commit/7ddfbadd1d51d07e68afbe1b91a36106d98c7bea) [#8053](https://github.com/npm/cli/pull/8053) `@npmcli/package-json@6.1.1` +* [`9473a86`](https://github.com/npm/cli/commit/9473a8638257297c420136009de567c131d2f299) [#8053](https://github.com/npm/cli/pull/8053) `spdx-license-ids@3.0.21` +* [`a65e5ce`](https://github.com/npm/cli/commit/a65e5ceb15c4aad6bde1ffdbee7da6f685caf81e) [#8053](https://github.com/npm/cli/pull/8053) `@sigstore/protobuf-specs@0.3.3` +* [`215ebe4`](https://github.com/npm/cli/commit/215ebe4d8f6c7f30d4b6a68fa11a3372c132929e) [#8053](https://github.com/npm/cli/pull/8053) `chalk@5.4.1` +### Chores +* [`61f00e3`](https://github.com/npm/cli/commit/61f00e3c23211d37c7980ebd6d1cf8d1dac49f18) [#8069](https://github.com/npm/cli/pull/8069) splits out smoke-tests from publish-dryrun tests (#8069) (@reggi) +* [`6d0f46e`](https://github.com/npm/cli/commit/6d0f46e67e9673e8a2dc6edb92144a73f853950c) [#8058](https://github.com/npm/cli/pull/8058) stop publish smoke from check git clean (#8058) (@reggi) +* [`9281ebf`](https://github.com/npm/cli/commit/9281ebf8e428d40450ad75ba61bc6f040b3bf896) [#8057](https://github.com/npm/cli/pull/8057) fix smoke tests prerelease needs separate string args (#8057) (@reggi) +* [`aa202e9`](https://github.com/npm/cli/commit/aa202e9dac2f927bedcaaed4db0eef7b3415fc68) [#8056](https://github.com/npm/cli/pull/8056) smoke tests using a preid (#8056) (@reggi) +* [`18e0449`](https://github.com/npm/cli/commit/18e0449ae41703a7980cee73bae69521db6fa53e) [#8053](https://github.com/npm/cli/pull/8053) dev dependency updates (@wraithgar) +* [`859a71c`](https://github.com/npm/cli/commit/859a71c59ea5f91f21a8410db46585a2fc0a8126) [#8052](https://github.com/npm/cli/pull/8052) update node versions for release integration tests (#8052) (@wraithgar) +* [`7e7961d`](https://github.com/npm/cli/commit/7e7961d8936e277f3dbc8e44f9e7b07daaeb36ca) [#8038](https://github.com/npm/cli/pull/8038) bump @npmcli/eslint-config to 5.1.0 (@wraithgar) +* [workspace](https://github.com/npm/cli/releases/tag/config-v10.0.1): `@npmcli/config@10.0.1` + ## [11.0.0](https://github.com/npm/cli/compare/v11.0.0-pre.1...v11.0.0) (2024-12-16) ### Documentation * [`8a911da`](https://github.com/npm/cli/commit/8a911da452b9785bcd051778570beeb2d8b27421) [#7963](https://github.com/npm/cli/pull/7963) ls: removed design change pending section note (#7963) (@milaninfy) diff --git a/package-lock.json b/package-lock.json index 4d73307305e2d..e68c55854afd1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "npm", - "version": "11.0.0", + "version": "11.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "npm", - "version": "11.0.0", + "version": "11.1.0", "bundleDependencies": [ "@isaacs/string-locale-compare", "@npmcli/arborist", @@ -86,7 +86,7 @@ "dependencies": { "@isaacs/string-locale-compare": "^1.1.0", "@npmcli/arborist": "^9.0.0", - "@npmcli/config": "^10.0.0", + "@npmcli/config": "^10.0.1", "@npmcli/fs": "^4.0.0", "@npmcli/map-workspaces": "^4.0.2", "@npmcli/package-json": "^6.1.1", @@ -18808,7 +18808,7 @@ }, "workspaces/config": { "name": "@npmcli/config", - "version": "10.0.0", + "version": "10.0.1", "license": "ISC", "dependencies": { "@npmcli/map-workspaces": "^4.0.1", diff --git a/package.json b/package.json index 8b5e9744ab765..2494292ec55c9 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "11.0.0", + "version": "11.1.0", "name": "npm", "description": "a package manager for JavaScript", "workspaces": [ @@ -53,7 +53,7 @@ "dependencies": { "@isaacs/string-locale-compare": "^1.1.0", "@npmcli/arborist": "^9.0.0", - "@npmcli/config": "^10.0.0", + "@npmcli/config": "^10.0.1", "@npmcli/fs": "^4.0.0", "@npmcli/map-workspaces": "^4.0.2", "@npmcli/package-json": "^6.1.1", diff --git a/workspaces/config/CHANGELOG.md b/workspaces/config/CHANGELOG.md index 1b6e7b7f4e599..c238dcbc56df5 100644 --- a/workspaces/config/CHANGELOG.md +++ b/workspaces/config/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [10.0.1](https://github.com/npm/cli/compare/config-v10.0.0...config-v10.0.1) (2025-01-29) +### Documentation +* [`e90c6fe`](https://github.com/npm/cli/commit/e90c6feeacdf9ad010d4d73b65d7dd7d3b86efe2) [#8051](https://github.com/npm/cli/pull/8051) depth flag default value (#8051) (@milaninfy) + ## [10.0.0](https://github.com/npm/cli/compare/config-v10.0.0-pre.1...config-v10.0.0) (2024-12-16) ### Features * [`a7bfc6d`](https://github.com/npm/cli/commit/a7bfc6df76882996ebb834dbca785fdf33b8c50d) [#7972](https://github.com/npm/cli/pull/7972) trigger release process (#7972) (@wraithgar) diff --git a/workspaces/config/package.json b/workspaces/config/package.json index eb89879ffe52f..e8c5dc135ecc6 100644 --- a/workspaces/config/package.json +++ b/workspaces/config/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/config", - "version": "10.0.0", + "version": "10.0.1", "files": [ "bin/", "lib/" pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy