From a449678149c32be6a5257a99898664442916af81 Mon Sep 17 00:00:00 2001 From: reggi Date: Wed, 2 Oct 2024 13:53:55 -0400 Subject: [PATCH] deps: hoist npm-normalize-package-bin --- DEPENDENCIES.md | 4 +- node_modules/.gitignore | 16 +---- .../npm-normalize-package-bin/LICENSE | 15 ---- .../npm-normalize-package-bin/lib/index.js | 64 ----------------- .../npm-normalize-package-bin/package.json | 45 ------------ .../npm-normalize-package-bin/LICENSE | 15 ---- .../npm-normalize-package-bin/lib/index.js | 64 ----------------- .../npm-normalize-package-bin/package.json | 45 ------------ .../npm-normalize-package-bin/LICENSE | 0 .../npm-normalize-package-bin/lib/index.js | 0 .../npm-normalize-package-bin/package.json | 0 .../npm-normalize-package-bin/LICENSE | 15 ---- .../npm-normalize-package-bin/lib/index.js | 64 ----------------- .../npm-normalize-package-bin/package.json | 45 ------------ .../npm-normalize-package-bin/LICENSE | 15 ---- .../npm-normalize-package-bin/lib/index.js | 64 ----------------- .../npm-normalize-package-bin/package.json | 45 ------------ package-lock.json | 68 ++++--------------- 18 files changed, 18 insertions(+), 566 deletions(-) delete mode 100644 node_modules/bin-links/node_modules/npm-normalize-package-bin/LICENSE delete mode 100644 node_modules/bin-links/node_modules/npm-normalize-package-bin/lib/index.js delete mode 100644 node_modules/bin-links/node_modules/npm-normalize-package-bin/package.json delete mode 100644 node_modules/npm-bundled/node_modules/npm-normalize-package-bin/LICENSE delete mode 100644 node_modules/npm-bundled/node_modules/npm-normalize-package-bin/lib/index.js delete mode 100644 node_modules/npm-bundled/node_modules/npm-normalize-package-bin/package.json rename node_modules/{@npmcli/installed-package-contents/node_modules => }/npm-normalize-package-bin/LICENSE (100%) rename node_modules/{@npmcli/installed-package-contents/node_modules => }/npm-normalize-package-bin/lib/index.js (100%) rename node_modules/{@npmcli/installed-package-contents/node_modules => }/npm-normalize-package-bin/package.json (100%) delete mode 100644 node_modules/npm-pick-manifest/node_modules/npm-normalize-package-bin/LICENSE delete mode 100644 node_modules/npm-pick-manifest/node_modules/npm-normalize-package-bin/lib/index.js delete mode 100644 node_modules/npm-pick-manifest/node_modules/npm-normalize-package-bin/package.json delete mode 100644 node_modules/read-package-json-fast/node_modules/npm-normalize-package-bin/LICENSE delete mode 100644 node_modules/read-package-json-fast/node_modules/npm-normalize-package-bin/lib/index.js delete mode 100644 node_modules/read-package-json-fast/node_modules/npm-normalize-package-bin/package.json diff --git a/DEPENDENCIES.md b/DEPENDENCIES.md index 50779e933ec62..6b6550b7c27fb 100644 --- a/DEPENDENCIES.md +++ b/DEPENDENCIES.md @@ -106,11 +106,11 @@ graph LR; npm-->libnpmteam; npm-->libnpmversion; npm-->make-fetch-happen; - npm-->minipass-fetch; npm-->nopt; npm-->normalize-package-data; npm-->npm-audit-report; npm-->npm-install-checks; + npm-->npm-normalize-package-bin; npm-->npm-package-arg; npm-->npm-packlist; npm-->npm-pick-manifest; @@ -494,7 +494,6 @@ graph LR; npm-->libnpmversion; npm-->make-fetch-happen; npm-->minimatch; - npm-->minipass-fetch; npm-->minipass-pipeline; npm-->minipass; npm-->ms; @@ -504,6 +503,7 @@ graph LR; npm-->normalize-package-data; npm-->npm-audit-report; npm-->npm-install-checks; + npm-->npm-normalize-package-bin; npm-->npm-package-arg; npm-->npm-packlist; npm-->npm-pick-manifest; diff --git a/node_modules/.gitignore b/node_modules/.gitignore index ec02c383067c3..2f1ad728a5e71 100644 --- a/node_modules/.gitignore +++ b/node_modules/.gitignore @@ -20,9 +20,6 @@ !/@npmcli/fs !/@npmcli/git !/@npmcli/installed-package-contents -!/@npmcli/installed-package-contents/node_modules/ -/@npmcli/installed-package-contents/node_modules/* -!/@npmcli/installed-package-contents/node_modules/npm-normalize-package-bin !/@npmcli/map-workspaces !/@npmcli/metavuln-calculator !/@npmcli/name-from-folder @@ -69,9 +66,6 @@ !/archy !/balanced-match !/bin-links -!/bin-links/node_modules/ -/bin-links/node_modules/* -!/bin-links/node_modules/npm-normalize-package-bin !/binary-extensions !/brace-expansion !/cacache @@ -191,16 +185,11 @@ !/normalize-package-data !/npm-audit-report !/npm-bundled -!/npm-bundled/node_modules/ -/npm-bundled/node_modules/* -!/npm-bundled/node_modules/npm-normalize-package-bin !/npm-install-checks +!/npm-normalize-package-bin !/npm-package-arg !/npm-packlist !/npm-pick-manifest -!/npm-pick-manifest/node_modules/ -/npm-pick-manifest/node_modules/* -!/npm-pick-manifest/node_modules/npm-normalize-package-bin !/npm-profile !/npm-registry-fetch !/npm-registry-fetch/node_modules/ @@ -224,9 +213,6 @@ !/qrcode-terminal !/read-cmd-shim !/read-package-json-fast -!/read-package-json-fast/node_modules/ -/read-package-json-fast/node_modules/* -!/read-package-json-fast/node_modules/npm-normalize-package-bin !/read !/retry !/rimraf diff --git a/node_modules/bin-links/node_modules/npm-normalize-package-bin/LICENSE b/node_modules/bin-links/node_modules/npm-normalize-package-bin/LICENSE deleted file mode 100644 index 19cec97b18468..0000000000000 --- a/node_modules/bin-links/node_modules/npm-normalize-package-bin/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) npm, Inc. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/bin-links/node_modules/npm-normalize-package-bin/lib/index.js b/node_modules/bin-links/node_modules/npm-normalize-package-bin/lib/index.js deleted file mode 100644 index 3cb8478cf6e2f..0000000000000 --- a/node_modules/bin-links/node_modules/npm-normalize-package-bin/lib/index.js +++ /dev/null @@ -1,64 +0,0 @@ -// pass in a manifest with a 'bin' field here, and it'll turn it -// into a properly santized bin object -const { join, basename } = require('path') - -const normalize = pkg => - !pkg.bin ? removeBin(pkg) - : typeof pkg.bin === 'string' ? normalizeString(pkg) - : Array.isArray(pkg.bin) ? normalizeArray(pkg) - : typeof pkg.bin === 'object' ? normalizeObject(pkg) - : removeBin(pkg) - -const normalizeString = pkg => { - if (!pkg.name) { - return removeBin(pkg) - } - pkg.bin = { [pkg.name]: pkg.bin } - return normalizeObject(pkg) -} - -const normalizeArray = pkg => { - pkg.bin = pkg.bin.reduce((acc, k) => { - acc[basename(k)] = k - return acc - }, {}) - return normalizeObject(pkg) -} - -const removeBin = pkg => { - delete pkg.bin - return pkg -} - -const normalizeObject = pkg => { - const orig = pkg.bin - const clean = {} - let hasBins = false - Object.keys(orig).forEach(binKey => { - const base = join('/', basename(binKey.replace(/\\|:/g, '/'))).slice(1) - - if (typeof orig[binKey] !== 'string' || !base) { - return - } - - const binTarget = join('/', orig[binKey].replace(/\\/g, '/')) - .replace(/\\/g, '/').slice(1) - - if (!binTarget) { - return - } - - clean[base] = binTarget - hasBins = true - }) - - if (hasBins) { - pkg.bin = clean - } else { - delete pkg.bin - } - - return pkg -} - -module.exports = normalize diff --git a/node_modules/bin-links/node_modules/npm-normalize-package-bin/package.json b/node_modules/bin-links/node_modules/npm-normalize-package-bin/package.json deleted file mode 100644 index a1aeef0e1e751..0000000000000 --- a/node_modules/bin-links/node_modules/npm-normalize-package-bin/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "npm-normalize-package-bin", - "version": "4.0.0", - "description": "Turn any flavor of allowable package.json bin into a normalized object", - "main": "lib/index.js", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/npm-normalize-package-bin.git" - }, - "author": "GitHub Inc.", - "license": "ISC", - "scripts": { - "test": "tap", - "snap": "tap", - "lint": "npm run eslint", - "postlint": "template-oss-check", - "template-oss-apply": "template-oss-apply --force", - "lintfix": "npm run eslint -- --fix", - "posttest": "npm run lint", - "eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"" - }, - "devDependencies": { - "@npmcli/eslint-config": "^5.0.0", - "@npmcli/template-oss": "4.23.3", - "tap": "^16.3.0" - }, - "files": [ - "bin/", - "lib/" - ], - "engines": { - "node": "^18.17.0 || >=20.5.0" - }, - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.23.3", - "publish": "true" - }, - "tap": { - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - } -} diff --git a/node_modules/npm-bundled/node_modules/npm-normalize-package-bin/LICENSE b/node_modules/npm-bundled/node_modules/npm-normalize-package-bin/LICENSE deleted file mode 100644 index 19cec97b18468..0000000000000 --- a/node_modules/npm-bundled/node_modules/npm-normalize-package-bin/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) npm, Inc. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm-bundled/node_modules/npm-normalize-package-bin/lib/index.js b/node_modules/npm-bundled/node_modules/npm-normalize-package-bin/lib/index.js deleted file mode 100644 index 3cb8478cf6e2f..0000000000000 --- a/node_modules/npm-bundled/node_modules/npm-normalize-package-bin/lib/index.js +++ /dev/null @@ -1,64 +0,0 @@ -// pass in a manifest with a 'bin' field here, and it'll turn it -// into a properly santized bin object -const { join, basename } = require('path') - -const normalize = pkg => - !pkg.bin ? removeBin(pkg) - : typeof pkg.bin === 'string' ? normalizeString(pkg) - : Array.isArray(pkg.bin) ? normalizeArray(pkg) - : typeof pkg.bin === 'object' ? normalizeObject(pkg) - : removeBin(pkg) - -const normalizeString = pkg => { - if (!pkg.name) { - return removeBin(pkg) - } - pkg.bin = { [pkg.name]: pkg.bin } - return normalizeObject(pkg) -} - -const normalizeArray = pkg => { - pkg.bin = pkg.bin.reduce((acc, k) => { - acc[basename(k)] = k - return acc - }, {}) - return normalizeObject(pkg) -} - -const removeBin = pkg => { - delete pkg.bin - return pkg -} - -const normalizeObject = pkg => { - const orig = pkg.bin - const clean = {} - let hasBins = false - Object.keys(orig).forEach(binKey => { - const base = join('/', basename(binKey.replace(/\\|:/g, '/'))).slice(1) - - if (typeof orig[binKey] !== 'string' || !base) { - return - } - - const binTarget = join('/', orig[binKey].replace(/\\/g, '/')) - .replace(/\\/g, '/').slice(1) - - if (!binTarget) { - return - } - - clean[base] = binTarget - hasBins = true - }) - - if (hasBins) { - pkg.bin = clean - } else { - delete pkg.bin - } - - return pkg -} - -module.exports = normalize diff --git a/node_modules/npm-bundled/node_modules/npm-normalize-package-bin/package.json b/node_modules/npm-bundled/node_modules/npm-normalize-package-bin/package.json deleted file mode 100644 index a1aeef0e1e751..0000000000000 --- a/node_modules/npm-bundled/node_modules/npm-normalize-package-bin/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "npm-normalize-package-bin", - "version": "4.0.0", - "description": "Turn any flavor of allowable package.json bin into a normalized object", - "main": "lib/index.js", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/npm-normalize-package-bin.git" - }, - "author": "GitHub Inc.", - "license": "ISC", - "scripts": { - "test": "tap", - "snap": "tap", - "lint": "npm run eslint", - "postlint": "template-oss-check", - "template-oss-apply": "template-oss-apply --force", - "lintfix": "npm run eslint -- --fix", - "posttest": "npm run lint", - "eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"" - }, - "devDependencies": { - "@npmcli/eslint-config": "^5.0.0", - "@npmcli/template-oss": "4.23.3", - "tap": "^16.3.0" - }, - "files": [ - "bin/", - "lib/" - ], - "engines": { - "node": "^18.17.0 || >=20.5.0" - }, - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.23.3", - "publish": "true" - }, - "tap": { - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - } -} diff --git a/node_modules/@npmcli/installed-package-contents/node_modules/npm-normalize-package-bin/LICENSE b/node_modules/npm-normalize-package-bin/LICENSE similarity index 100% rename from node_modules/@npmcli/installed-package-contents/node_modules/npm-normalize-package-bin/LICENSE rename to node_modules/npm-normalize-package-bin/LICENSE diff --git a/node_modules/@npmcli/installed-package-contents/node_modules/npm-normalize-package-bin/lib/index.js b/node_modules/npm-normalize-package-bin/lib/index.js similarity index 100% rename from node_modules/@npmcli/installed-package-contents/node_modules/npm-normalize-package-bin/lib/index.js rename to node_modules/npm-normalize-package-bin/lib/index.js diff --git a/node_modules/@npmcli/installed-package-contents/node_modules/npm-normalize-package-bin/package.json b/node_modules/npm-normalize-package-bin/package.json similarity index 100% rename from node_modules/@npmcli/installed-package-contents/node_modules/npm-normalize-package-bin/package.json rename to node_modules/npm-normalize-package-bin/package.json diff --git a/node_modules/npm-pick-manifest/node_modules/npm-normalize-package-bin/LICENSE b/node_modules/npm-pick-manifest/node_modules/npm-normalize-package-bin/LICENSE deleted file mode 100644 index 19cec97b18468..0000000000000 --- a/node_modules/npm-pick-manifest/node_modules/npm-normalize-package-bin/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) npm, Inc. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm-pick-manifest/node_modules/npm-normalize-package-bin/lib/index.js b/node_modules/npm-pick-manifest/node_modules/npm-normalize-package-bin/lib/index.js deleted file mode 100644 index 3cb8478cf6e2f..0000000000000 --- a/node_modules/npm-pick-manifest/node_modules/npm-normalize-package-bin/lib/index.js +++ /dev/null @@ -1,64 +0,0 @@ -// pass in a manifest with a 'bin' field here, and it'll turn it -// into a properly santized bin object -const { join, basename } = require('path') - -const normalize = pkg => - !pkg.bin ? removeBin(pkg) - : typeof pkg.bin === 'string' ? normalizeString(pkg) - : Array.isArray(pkg.bin) ? normalizeArray(pkg) - : typeof pkg.bin === 'object' ? normalizeObject(pkg) - : removeBin(pkg) - -const normalizeString = pkg => { - if (!pkg.name) { - return removeBin(pkg) - } - pkg.bin = { [pkg.name]: pkg.bin } - return normalizeObject(pkg) -} - -const normalizeArray = pkg => { - pkg.bin = pkg.bin.reduce((acc, k) => { - acc[basename(k)] = k - return acc - }, {}) - return normalizeObject(pkg) -} - -const removeBin = pkg => { - delete pkg.bin - return pkg -} - -const normalizeObject = pkg => { - const orig = pkg.bin - const clean = {} - let hasBins = false - Object.keys(orig).forEach(binKey => { - const base = join('/', basename(binKey.replace(/\\|:/g, '/'))).slice(1) - - if (typeof orig[binKey] !== 'string' || !base) { - return - } - - const binTarget = join('/', orig[binKey].replace(/\\/g, '/')) - .replace(/\\/g, '/').slice(1) - - if (!binTarget) { - return - } - - clean[base] = binTarget - hasBins = true - }) - - if (hasBins) { - pkg.bin = clean - } else { - delete pkg.bin - } - - return pkg -} - -module.exports = normalize diff --git a/node_modules/npm-pick-manifest/node_modules/npm-normalize-package-bin/package.json b/node_modules/npm-pick-manifest/node_modules/npm-normalize-package-bin/package.json deleted file mode 100644 index a1aeef0e1e751..0000000000000 --- a/node_modules/npm-pick-manifest/node_modules/npm-normalize-package-bin/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "npm-normalize-package-bin", - "version": "4.0.0", - "description": "Turn any flavor of allowable package.json bin into a normalized object", - "main": "lib/index.js", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/npm-normalize-package-bin.git" - }, - "author": "GitHub Inc.", - "license": "ISC", - "scripts": { - "test": "tap", - "snap": "tap", - "lint": "npm run eslint", - "postlint": "template-oss-check", - "template-oss-apply": "template-oss-apply --force", - "lintfix": "npm run eslint -- --fix", - "posttest": "npm run lint", - "eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"" - }, - "devDependencies": { - "@npmcli/eslint-config": "^5.0.0", - "@npmcli/template-oss": "4.23.3", - "tap": "^16.3.0" - }, - "files": [ - "bin/", - "lib/" - ], - "engines": { - "node": "^18.17.0 || >=20.5.0" - }, - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.23.3", - "publish": "true" - }, - "tap": { - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - } -} diff --git a/node_modules/read-package-json-fast/node_modules/npm-normalize-package-bin/LICENSE b/node_modules/read-package-json-fast/node_modules/npm-normalize-package-bin/LICENSE deleted file mode 100644 index 19cec97b18468..0000000000000 --- a/node_modules/read-package-json-fast/node_modules/npm-normalize-package-bin/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) npm, Inc. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/read-package-json-fast/node_modules/npm-normalize-package-bin/lib/index.js b/node_modules/read-package-json-fast/node_modules/npm-normalize-package-bin/lib/index.js deleted file mode 100644 index 3cb8478cf6e2f..0000000000000 --- a/node_modules/read-package-json-fast/node_modules/npm-normalize-package-bin/lib/index.js +++ /dev/null @@ -1,64 +0,0 @@ -// pass in a manifest with a 'bin' field here, and it'll turn it -// into a properly santized bin object -const { join, basename } = require('path') - -const normalize = pkg => - !pkg.bin ? removeBin(pkg) - : typeof pkg.bin === 'string' ? normalizeString(pkg) - : Array.isArray(pkg.bin) ? normalizeArray(pkg) - : typeof pkg.bin === 'object' ? normalizeObject(pkg) - : removeBin(pkg) - -const normalizeString = pkg => { - if (!pkg.name) { - return removeBin(pkg) - } - pkg.bin = { [pkg.name]: pkg.bin } - return normalizeObject(pkg) -} - -const normalizeArray = pkg => { - pkg.bin = pkg.bin.reduce((acc, k) => { - acc[basename(k)] = k - return acc - }, {}) - return normalizeObject(pkg) -} - -const removeBin = pkg => { - delete pkg.bin - return pkg -} - -const normalizeObject = pkg => { - const orig = pkg.bin - const clean = {} - let hasBins = false - Object.keys(orig).forEach(binKey => { - const base = join('/', basename(binKey.replace(/\\|:/g, '/'))).slice(1) - - if (typeof orig[binKey] !== 'string' || !base) { - return - } - - const binTarget = join('/', orig[binKey].replace(/\\/g, '/')) - .replace(/\\/g, '/').slice(1) - - if (!binTarget) { - return - } - - clean[base] = binTarget - hasBins = true - }) - - if (hasBins) { - pkg.bin = clean - } else { - delete pkg.bin - } - - return pkg -} - -module.exports = normalize diff --git a/node_modules/read-package-json-fast/node_modules/npm-normalize-package-bin/package.json b/node_modules/read-package-json-fast/node_modules/npm-normalize-package-bin/package.json deleted file mode 100644 index a1aeef0e1e751..0000000000000 --- a/node_modules/read-package-json-fast/node_modules/npm-normalize-package-bin/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "npm-normalize-package-bin", - "version": "4.0.0", - "description": "Turn any flavor of allowable package.json bin into a normalized object", - "main": "lib/index.js", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/npm-normalize-package-bin.git" - }, - "author": "GitHub Inc.", - "license": "ISC", - "scripts": { - "test": "tap", - "snap": "tap", - "lint": "npm run eslint", - "postlint": "template-oss-check", - "template-oss-apply": "template-oss-apply --force", - "lintfix": "npm run eslint -- --fix", - "posttest": "npm run lint", - "eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"" - }, - "devDependencies": { - "@npmcli/eslint-config": "^5.0.0", - "@npmcli/template-oss": "4.23.3", - "tap": "^16.3.0" - }, - "files": [ - "bin/", - "lib/" - ], - "engines": { - "node": "^18.17.0 || >=20.5.0" - }, - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.23.3", - "publish": "true" - }, - "tap": { - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - } -} diff --git a/package-lock.json b/package-lock.json index 3ff10f7ec358b..e277bb5c56d36 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1606,16 +1606,6 @@ "node": "^18.17.0 || >=20.5.0" } }, - "node_modules/@npmcli/installed-package-contents/node_modules/npm-normalize-package-bin": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-4.0.0.tgz", - "integrity": "sha512-TZKxPvItzai9kN9H/TkmCtx/ZN/hvr3vUycjlfmH0ootY9yFBzNOpiXAdIn1Iteqsvk4lQn6B5PTrt+n6h8k/w==", - "inBundle": true, - "license": "ISC", - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, "node_modules/@npmcli/map-workspaces": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@npmcli/map-workspaces/-/map-workspaces-4.0.1.tgz", @@ -1951,6 +1941,16 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "node_modules/@npmcli/template-oss/node_modules/npm-normalize-package-bin": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.1.tgz", + "integrity": "sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, "node_modules/@npmcli/template-oss/node_modules/npm-package-arg": { "version": "11.0.3", "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-11.0.3.tgz", @@ -3184,15 +3184,6 @@ "node": "^18.17.0 || >=20.5.0" } }, - "node_modules/bin-links/node_modules/npm-normalize-package-bin": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-4.0.0.tgz", - "integrity": "sha512-TZKxPvItzai9kN9H/TkmCtx/ZN/hvr3vUycjlfmH0ootY9yFBzNOpiXAdIn1Iteqsvk4lQn6B5PTrt+n6h8k/w==", - "license": "ISC", - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, "node_modules/binary-extensions": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", @@ -10124,16 +10115,6 @@ "node": "^18.17.0 || >=20.5.0" } }, - "node_modules/npm-bundled/node_modules/npm-normalize-package-bin": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-4.0.0.tgz", - "integrity": "sha512-TZKxPvItzai9kN9H/TkmCtx/ZN/hvr3vUycjlfmH0ootY9yFBzNOpiXAdIn1Iteqsvk4lQn6B5PTrt+n6h8k/w==", - "inBundle": true, - "license": "ISC", - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, "node_modules/npm-install-checks": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-7.1.0.tgz", @@ -10148,13 +10129,13 @@ } }, "node_modules/npm-normalize-package-bin": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.1.tgz", - "integrity": "sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ==", - "dev": true, + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-4.0.0.tgz", + "integrity": "sha512-TZKxPvItzai9kN9H/TkmCtx/ZN/hvr3vUycjlfmH0ootY9yFBzNOpiXAdIn1Iteqsvk4lQn6B5PTrt+n6h8k/w==", + "inBundle": true, "license": "ISC", "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm-package-arg": { @@ -10202,16 +10183,6 @@ "node": "^18.17.0 || >=20.5.0" } }, - "node_modules/npm-pick-manifest/node_modules/npm-normalize-package-bin": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-4.0.0.tgz", - "integrity": "sha512-TZKxPvItzai9kN9H/TkmCtx/ZN/hvr3vUycjlfmH0ootY9yFBzNOpiXAdIn1Iteqsvk4lQn6B5PTrt+n6h8k/w==", - "inBundle": true, - "license": "ISC", - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, "node_modules/npm-profile": { "version": "11.0.1", "resolved": "https://registry.npmjs.org/npm-profile/-/npm-profile-11.0.1.tgz", @@ -11423,15 +11394,6 @@ "node": "^18.17.0 || >=20.5.0" } }, - "node_modules/read-package-json-fast/node_modules/npm-normalize-package-bin": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-4.0.0.tgz", - "integrity": "sha512-TZKxPvItzai9kN9H/TkmCtx/ZN/hvr3vUycjlfmH0ootY9yFBzNOpiXAdIn1Iteqsvk4lQn6B5PTrt+n6h8k/w==", - "license": "ISC", - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, "node_modules/read-pkg": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz",