diff --git a/node_modules/.gitignore b/node_modules/.gitignore index f6a7e6ce8160f..9a13a79df4cf9 100644 --- a/node_modules/.gitignore +++ b/node_modules/.gitignore @@ -26,11 +26,13 @@ !/@npmcli/git/node_modules/@npmcli/promise-spawn !/@npmcli/git/node_modules/hosted-git-info !/@npmcli/git/node_modules/ini +!/@npmcli/git/node_modules/isexe !/@npmcli/git/node_modules/npm-install-checks !/@npmcli/git/node_modules/npm-package-arg !/@npmcli/git/node_modules/npm-pick-manifest !/@npmcli/git/node_modules/proc-log !/@npmcli/git/node_modules/validate-npm-package-name +!/@npmcli/git/node_modules/which !/@npmcli/installed-package-contents !/@npmcli/map-workspaces !/@npmcli/map-workspaces/node_modules/ @@ -51,6 +53,7 @@ !/@npmcli/metavuln-calculator/node_modules/@npmcli/run-script !/@npmcli/metavuln-calculator/node_modules/cacache !/@npmcli/metavuln-calculator/node_modules/hosted-git-info +!/@npmcli/metavuln-calculator/node_modules/isexe !/@npmcli/metavuln-calculator/node_modules/json-parse-even-better-errors !/@npmcli/metavuln-calculator/node_modules/make-fetch-happen !/@npmcli/metavuln-calculator/node_modules/normalize-package-data @@ -64,6 +67,7 @@ !/@npmcli/metavuln-calculator/node_modules/unique-filename !/@npmcli/metavuln-calculator/node_modules/unique-slug !/@npmcli/metavuln-calculator/node_modules/validate-npm-package-name +!/@npmcli/metavuln-calculator/node_modules/which !/@npmcli/name-from-folder !/@npmcli/node-gyp !/@npmcli/package-json @@ -72,13 +76,7 @@ !/@npmcli/package-json/node_modules/@npmcli/ /@npmcli/package-json/node_modules/@npmcli/* !/@npmcli/package-json/node_modules/@npmcli/git -!/@npmcli/package-json/node_modules/isexe -!/@npmcli/package-json/node_modules/which !/@npmcli/promise-spawn -!/@npmcli/promise-spawn/node_modules/ -/@npmcli/promise-spawn/node_modules/* -!/@npmcli/promise-spawn/node_modules/isexe -!/@npmcli/promise-spawn/node_modules/which !/@npmcli/query !/@npmcli/redact !/@npmcli/run-script @@ -87,8 +85,6 @@ !/@npmcli/run-script/node_modules/@npmcli/ /@npmcli/run-script/node_modules/@npmcli/* !/@npmcli/run-script/node_modules/@npmcli/node-gyp -!/@npmcli/run-script/node_modules/isexe -!/@npmcli/run-script/node_modules/which !/@pkgjs/ /@pkgjs/* !/@pkgjs/parseargs @@ -229,12 +225,14 @@ !/node-gyp/node_modules/@npmcli/fs !/node-gyp/node_modules/abbrev !/node-gyp/node_modules/cacache +!/node-gyp/node_modules/isexe !/node-gyp/node_modules/make-fetch-happen !/node-gyp/node_modules/nopt !/node-gyp/node_modules/proc-log !/node-gyp/node_modules/ssri !/node-gyp/node_modules/unique-filename !/node-gyp/node_modules/unique-slug +!/node-gyp/node_modules/which !/nopt !/nopt/node_modules/ /nopt/node_modules/* @@ -267,11 +265,9 @@ !/pacote/node_modules/@npmcli/git !/pacote/node_modules/@npmcli/installed-package-contents !/pacote/node_modules/ignore-walk -!/pacote/node_modules/isexe !/pacote/node_modules/npm-bundled !/pacote/node_modules/npm-normalize-package-bin !/pacote/node_modules/npm-packlist -!/pacote/node_modules/which !/parse-conflict-json !/path-key !/path-scurry diff --git a/node_modules/@npmcli/package-json/node_modules/isexe/LICENSE b/node_modules/@npmcli/git/node_modules/isexe/LICENSE similarity index 100% rename from node_modules/@npmcli/package-json/node_modules/isexe/LICENSE rename to node_modules/@npmcli/git/node_modules/isexe/LICENSE diff --git a/node_modules/@npmcli/package-json/node_modules/isexe/dist/cjs/index.js b/node_modules/@npmcli/git/node_modules/isexe/dist/cjs/index.js similarity index 100% rename from node_modules/@npmcli/package-json/node_modules/isexe/dist/cjs/index.js rename to node_modules/@npmcli/git/node_modules/isexe/dist/cjs/index.js diff --git a/node_modules/@npmcli/package-json/node_modules/isexe/dist/cjs/options.js b/node_modules/@npmcli/git/node_modules/isexe/dist/cjs/options.js similarity index 100% rename from node_modules/@npmcli/package-json/node_modules/isexe/dist/cjs/options.js rename to node_modules/@npmcli/git/node_modules/isexe/dist/cjs/options.js diff --git a/node_modules/@npmcli/package-json/node_modules/isexe/dist/cjs/package.json b/node_modules/@npmcli/git/node_modules/isexe/dist/cjs/package.json similarity index 100% rename from node_modules/@npmcli/package-json/node_modules/isexe/dist/cjs/package.json rename to node_modules/@npmcli/git/node_modules/isexe/dist/cjs/package.json diff --git a/node_modules/@npmcli/package-json/node_modules/isexe/dist/cjs/posix.js b/node_modules/@npmcli/git/node_modules/isexe/dist/cjs/posix.js similarity index 100% rename from node_modules/@npmcli/package-json/node_modules/isexe/dist/cjs/posix.js rename to node_modules/@npmcli/git/node_modules/isexe/dist/cjs/posix.js diff --git a/node_modules/@npmcli/package-json/node_modules/isexe/dist/cjs/win32.js b/node_modules/@npmcli/git/node_modules/isexe/dist/cjs/win32.js similarity index 100% rename from node_modules/@npmcli/package-json/node_modules/isexe/dist/cjs/win32.js rename to node_modules/@npmcli/git/node_modules/isexe/dist/cjs/win32.js diff --git a/node_modules/@npmcli/package-json/node_modules/isexe/dist/mjs/index.js b/node_modules/@npmcli/git/node_modules/isexe/dist/mjs/index.js similarity index 100% rename from node_modules/@npmcli/package-json/node_modules/isexe/dist/mjs/index.js rename to node_modules/@npmcli/git/node_modules/isexe/dist/mjs/index.js diff --git a/node_modules/@npmcli/package-json/node_modules/isexe/dist/mjs/options.js b/node_modules/@npmcli/git/node_modules/isexe/dist/mjs/options.js similarity index 100% rename from node_modules/@npmcli/package-json/node_modules/isexe/dist/mjs/options.js rename to node_modules/@npmcli/git/node_modules/isexe/dist/mjs/options.js diff --git a/node_modules/@npmcli/package-json/node_modules/isexe/dist/mjs/package.json b/node_modules/@npmcli/git/node_modules/isexe/dist/mjs/package.json similarity index 100% rename from node_modules/@npmcli/package-json/node_modules/isexe/dist/mjs/package.json rename to node_modules/@npmcli/git/node_modules/isexe/dist/mjs/package.json diff --git a/node_modules/@npmcli/package-json/node_modules/isexe/dist/mjs/posix.js b/node_modules/@npmcli/git/node_modules/isexe/dist/mjs/posix.js similarity index 100% rename from node_modules/@npmcli/package-json/node_modules/isexe/dist/mjs/posix.js rename to node_modules/@npmcli/git/node_modules/isexe/dist/mjs/posix.js diff --git a/node_modules/@npmcli/package-json/node_modules/isexe/dist/mjs/win32.js b/node_modules/@npmcli/git/node_modules/isexe/dist/mjs/win32.js similarity index 100% rename from node_modules/@npmcli/package-json/node_modules/isexe/dist/mjs/win32.js rename to node_modules/@npmcli/git/node_modules/isexe/dist/mjs/win32.js diff --git a/node_modules/@npmcli/package-json/node_modules/isexe/package.json b/node_modules/@npmcli/git/node_modules/isexe/package.json similarity index 100% rename from node_modules/@npmcli/package-json/node_modules/isexe/package.json rename to node_modules/@npmcli/git/node_modules/isexe/package.json diff --git a/node_modules/@npmcli/package-json/node_modules/which/LICENSE b/node_modules/@npmcli/git/node_modules/which/LICENSE similarity index 100% rename from node_modules/@npmcli/package-json/node_modules/which/LICENSE rename to node_modules/@npmcli/git/node_modules/which/LICENSE diff --git a/node_modules/@npmcli/package-json/node_modules/which/bin/which.js b/node_modules/@npmcli/git/node_modules/which/bin/which.js similarity index 100% rename from node_modules/@npmcli/package-json/node_modules/which/bin/which.js rename to node_modules/@npmcli/git/node_modules/which/bin/which.js diff --git a/node_modules/@npmcli/package-json/node_modules/which/lib/index.js b/node_modules/@npmcli/git/node_modules/which/lib/index.js similarity index 100% rename from node_modules/@npmcli/package-json/node_modules/which/lib/index.js rename to node_modules/@npmcli/git/node_modules/which/lib/index.js diff --git a/node_modules/@npmcli/package-json/node_modules/which/package.json b/node_modules/@npmcli/git/node_modules/which/package.json similarity index 68% rename from node_modules/@npmcli/package-json/node_modules/which/package.json rename to node_modules/@npmcli/git/node_modules/which/package.json index 94184233c61c4..515bfb22ca0e1 100644 --- a/node_modules/@npmcli/package-json/node_modules/which/package.json +++ b/node_modules/@npmcli/git/node_modules/which/package.json @@ -2,10 +2,10 @@ "author": "GitHub Inc.", "name": "which", "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.", - "version": "5.0.0", + "version": "4.0.0", "repository": { "type": "git", - "url": "git+https://github.com/npm/node-which.git" + "url": "https://github.com/npm/node-which.git" }, "main": "lib/index.js", "bin": { @@ -16,19 +16,18 @@ "isexe": "^3.1.1" }, "devDependencies": { - "@npmcli/eslint-config": "^5.0.0", - "@npmcli/template-oss": "4.23.3", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.18.0", "tap": "^16.3.0" }, "scripts": { "test": "tap", - "lint": "npm run eslint", + "lint": "eslint \"**/*.js\"", "postlint": "template-oss-check", "template-oss-apply": "template-oss-apply --force", - "lintfix": "npm run eslint -- --fix", + "lintfix": "npm run lint -- --fix", "snap": "tap", - "posttest": "npm run lint", - "eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"" + "posttest": "npm run lint" }, "files": [ "bin/", @@ -42,11 +41,17 @@ ] }, "engines": { - "node": "^18.17.0 || >=20.5.0" + "node": "^16.13.0 || >=18.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.23.3", + "ciVersions": [ + "16.13.0", + "16.x", + "18.0.0", + "18.x" + ], + "version": "4.18.0", "publish": "true" } } diff --git a/node_modules/@npmcli/promise-spawn/node_modules/isexe/LICENSE b/node_modules/@npmcli/metavuln-calculator/node_modules/isexe/LICENSE similarity index 100% rename from node_modules/@npmcli/promise-spawn/node_modules/isexe/LICENSE rename to node_modules/@npmcli/metavuln-calculator/node_modules/isexe/LICENSE diff --git a/node_modules/@npmcli/promise-spawn/node_modules/isexe/dist/cjs/index.js b/node_modules/@npmcli/metavuln-calculator/node_modules/isexe/dist/cjs/index.js similarity index 100% rename from node_modules/@npmcli/promise-spawn/node_modules/isexe/dist/cjs/index.js rename to node_modules/@npmcli/metavuln-calculator/node_modules/isexe/dist/cjs/index.js diff --git a/node_modules/@npmcli/promise-spawn/node_modules/isexe/dist/cjs/options.js b/node_modules/@npmcli/metavuln-calculator/node_modules/isexe/dist/cjs/options.js similarity index 100% rename from node_modules/@npmcli/promise-spawn/node_modules/isexe/dist/cjs/options.js rename to node_modules/@npmcli/metavuln-calculator/node_modules/isexe/dist/cjs/options.js diff --git a/node_modules/@npmcli/promise-spawn/node_modules/isexe/dist/cjs/package.json b/node_modules/@npmcli/metavuln-calculator/node_modules/isexe/dist/cjs/package.json similarity index 100% rename from node_modules/@npmcli/promise-spawn/node_modules/isexe/dist/cjs/package.json rename to node_modules/@npmcli/metavuln-calculator/node_modules/isexe/dist/cjs/package.json diff --git a/node_modules/@npmcli/promise-spawn/node_modules/isexe/dist/cjs/posix.js b/node_modules/@npmcli/metavuln-calculator/node_modules/isexe/dist/cjs/posix.js similarity index 100% rename from node_modules/@npmcli/promise-spawn/node_modules/isexe/dist/cjs/posix.js rename to node_modules/@npmcli/metavuln-calculator/node_modules/isexe/dist/cjs/posix.js diff --git a/node_modules/@npmcli/promise-spawn/node_modules/isexe/dist/cjs/win32.js b/node_modules/@npmcli/metavuln-calculator/node_modules/isexe/dist/cjs/win32.js similarity index 100% rename from node_modules/@npmcli/promise-spawn/node_modules/isexe/dist/cjs/win32.js rename to node_modules/@npmcli/metavuln-calculator/node_modules/isexe/dist/cjs/win32.js diff --git a/node_modules/@npmcli/promise-spawn/node_modules/isexe/dist/mjs/index.js b/node_modules/@npmcli/metavuln-calculator/node_modules/isexe/dist/mjs/index.js similarity index 100% rename from node_modules/@npmcli/promise-spawn/node_modules/isexe/dist/mjs/index.js rename to node_modules/@npmcli/metavuln-calculator/node_modules/isexe/dist/mjs/index.js diff --git a/node_modules/@npmcli/promise-spawn/node_modules/isexe/dist/mjs/options.js b/node_modules/@npmcli/metavuln-calculator/node_modules/isexe/dist/mjs/options.js similarity index 100% rename from node_modules/@npmcli/promise-spawn/node_modules/isexe/dist/mjs/options.js rename to node_modules/@npmcli/metavuln-calculator/node_modules/isexe/dist/mjs/options.js diff --git a/node_modules/@npmcli/promise-spawn/node_modules/isexe/dist/mjs/package.json b/node_modules/@npmcli/metavuln-calculator/node_modules/isexe/dist/mjs/package.json similarity index 100% rename from node_modules/@npmcli/promise-spawn/node_modules/isexe/dist/mjs/package.json rename to node_modules/@npmcli/metavuln-calculator/node_modules/isexe/dist/mjs/package.json diff --git a/node_modules/@npmcli/promise-spawn/node_modules/isexe/dist/mjs/posix.js b/node_modules/@npmcli/metavuln-calculator/node_modules/isexe/dist/mjs/posix.js similarity index 100% rename from node_modules/@npmcli/promise-spawn/node_modules/isexe/dist/mjs/posix.js rename to node_modules/@npmcli/metavuln-calculator/node_modules/isexe/dist/mjs/posix.js diff --git a/node_modules/@npmcli/promise-spawn/node_modules/isexe/dist/mjs/win32.js b/node_modules/@npmcli/metavuln-calculator/node_modules/isexe/dist/mjs/win32.js similarity index 100% rename from node_modules/@npmcli/promise-spawn/node_modules/isexe/dist/mjs/win32.js rename to node_modules/@npmcli/metavuln-calculator/node_modules/isexe/dist/mjs/win32.js diff --git a/node_modules/@npmcli/promise-spawn/node_modules/isexe/package.json b/node_modules/@npmcli/metavuln-calculator/node_modules/isexe/package.json similarity index 100% rename from node_modules/@npmcli/promise-spawn/node_modules/isexe/package.json rename to node_modules/@npmcli/metavuln-calculator/node_modules/isexe/package.json diff --git a/node_modules/@npmcli/promise-spawn/node_modules/which/LICENSE b/node_modules/@npmcli/metavuln-calculator/node_modules/which/LICENSE similarity index 100% rename from node_modules/@npmcli/promise-spawn/node_modules/which/LICENSE rename to node_modules/@npmcli/metavuln-calculator/node_modules/which/LICENSE diff --git a/node_modules/@npmcli/promise-spawn/node_modules/which/bin/which.js b/node_modules/@npmcli/metavuln-calculator/node_modules/which/bin/which.js similarity index 100% rename from node_modules/@npmcli/promise-spawn/node_modules/which/bin/which.js rename to node_modules/@npmcli/metavuln-calculator/node_modules/which/bin/which.js diff --git a/node_modules/@npmcli/promise-spawn/node_modules/which/lib/index.js b/node_modules/@npmcli/metavuln-calculator/node_modules/which/lib/index.js similarity index 100% rename from node_modules/@npmcli/promise-spawn/node_modules/which/lib/index.js rename to node_modules/@npmcli/metavuln-calculator/node_modules/which/lib/index.js diff --git a/node_modules/@npmcli/promise-spawn/node_modules/which/package.json b/node_modules/@npmcli/metavuln-calculator/node_modules/which/package.json similarity index 68% rename from node_modules/@npmcli/promise-spawn/node_modules/which/package.json rename to node_modules/@npmcli/metavuln-calculator/node_modules/which/package.json index 94184233c61c4..515bfb22ca0e1 100644 --- a/node_modules/@npmcli/promise-spawn/node_modules/which/package.json +++ b/node_modules/@npmcli/metavuln-calculator/node_modules/which/package.json @@ -2,10 +2,10 @@ "author": "GitHub Inc.", "name": "which", "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.", - "version": "5.0.0", + "version": "4.0.0", "repository": { "type": "git", - "url": "git+https://github.com/npm/node-which.git" + "url": "https://github.com/npm/node-which.git" }, "main": "lib/index.js", "bin": { @@ -16,19 +16,18 @@ "isexe": "^3.1.1" }, "devDependencies": { - "@npmcli/eslint-config": "^5.0.0", - "@npmcli/template-oss": "4.23.3", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.18.0", "tap": "^16.3.0" }, "scripts": { "test": "tap", - "lint": "npm run eslint", + "lint": "eslint \"**/*.js\"", "postlint": "template-oss-check", "template-oss-apply": "template-oss-apply --force", - "lintfix": "npm run eslint -- --fix", + "lintfix": "npm run lint -- --fix", "snap": "tap", - "posttest": "npm run lint", - "eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"" + "posttest": "npm run lint" }, "files": [ "bin/", @@ -42,11 +41,17 @@ ] }, "engines": { - "node": "^18.17.0 || >=20.5.0" + "node": "^16.13.0 || >=18.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.23.3", + "ciVersions": [ + "16.13.0", + "16.x", + "18.0.0", + "18.x" + ], + "version": "4.18.0", "publish": "true" } } diff --git a/node_modules/@npmcli/run-script/node_modules/isexe/LICENSE b/node_modules/node-gyp/node_modules/isexe/LICENSE similarity index 100% rename from node_modules/@npmcli/run-script/node_modules/isexe/LICENSE rename to node_modules/node-gyp/node_modules/isexe/LICENSE diff --git a/node_modules/@npmcli/run-script/node_modules/isexe/dist/cjs/index.js b/node_modules/node-gyp/node_modules/isexe/dist/cjs/index.js similarity index 100% rename from node_modules/@npmcli/run-script/node_modules/isexe/dist/cjs/index.js rename to node_modules/node-gyp/node_modules/isexe/dist/cjs/index.js diff --git a/node_modules/@npmcli/run-script/node_modules/isexe/dist/cjs/options.js b/node_modules/node-gyp/node_modules/isexe/dist/cjs/options.js similarity index 100% rename from node_modules/@npmcli/run-script/node_modules/isexe/dist/cjs/options.js rename to node_modules/node-gyp/node_modules/isexe/dist/cjs/options.js diff --git a/node_modules/@npmcli/run-script/node_modules/isexe/dist/cjs/package.json b/node_modules/node-gyp/node_modules/isexe/dist/cjs/package.json similarity index 100% rename from node_modules/@npmcli/run-script/node_modules/isexe/dist/cjs/package.json rename to node_modules/node-gyp/node_modules/isexe/dist/cjs/package.json diff --git a/node_modules/@npmcli/run-script/node_modules/isexe/dist/cjs/posix.js b/node_modules/node-gyp/node_modules/isexe/dist/cjs/posix.js similarity index 100% rename from node_modules/@npmcli/run-script/node_modules/isexe/dist/cjs/posix.js rename to node_modules/node-gyp/node_modules/isexe/dist/cjs/posix.js diff --git a/node_modules/@npmcli/run-script/node_modules/isexe/dist/cjs/win32.js b/node_modules/node-gyp/node_modules/isexe/dist/cjs/win32.js similarity index 100% rename from node_modules/@npmcli/run-script/node_modules/isexe/dist/cjs/win32.js rename to node_modules/node-gyp/node_modules/isexe/dist/cjs/win32.js diff --git a/node_modules/@npmcli/run-script/node_modules/isexe/dist/mjs/index.js b/node_modules/node-gyp/node_modules/isexe/dist/mjs/index.js similarity index 100% rename from node_modules/@npmcli/run-script/node_modules/isexe/dist/mjs/index.js rename to node_modules/node-gyp/node_modules/isexe/dist/mjs/index.js diff --git a/node_modules/@npmcli/run-script/node_modules/isexe/dist/mjs/options.js b/node_modules/node-gyp/node_modules/isexe/dist/mjs/options.js similarity index 100% rename from node_modules/@npmcli/run-script/node_modules/isexe/dist/mjs/options.js rename to node_modules/node-gyp/node_modules/isexe/dist/mjs/options.js diff --git a/node_modules/@npmcli/run-script/node_modules/isexe/dist/mjs/package.json b/node_modules/node-gyp/node_modules/isexe/dist/mjs/package.json similarity index 100% rename from node_modules/@npmcli/run-script/node_modules/isexe/dist/mjs/package.json rename to node_modules/node-gyp/node_modules/isexe/dist/mjs/package.json diff --git a/node_modules/@npmcli/run-script/node_modules/isexe/dist/mjs/posix.js b/node_modules/node-gyp/node_modules/isexe/dist/mjs/posix.js similarity index 100% rename from node_modules/@npmcli/run-script/node_modules/isexe/dist/mjs/posix.js rename to node_modules/node-gyp/node_modules/isexe/dist/mjs/posix.js diff --git a/node_modules/@npmcli/run-script/node_modules/isexe/dist/mjs/win32.js b/node_modules/node-gyp/node_modules/isexe/dist/mjs/win32.js similarity index 100% rename from node_modules/@npmcli/run-script/node_modules/isexe/dist/mjs/win32.js rename to node_modules/node-gyp/node_modules/isexe/dist/mjs/win32.js diff --git a/node_modules/@npmcli/run-script/node_modules/isexe/package.json b/node_modules/node-gyp/node_modules/isexe/package.json similarity index 100% rename from node_modules/@npmcli/run-script/node_modules/isexe/package.json rename to node_modules/node-gyp/node_modules/isexe/package.json diff --git a/node_modules/@npmcli/run-script/node_modules/which/LICENSE b/node_modules/node-gyp/node_modules/which/LICENSE similarity index 100% rename from node_modules/@npmcli/run-script/node_modules/which/LICENSE rename to node_modules/node-gyp/node_modules/which/LICENSE diff --git a/node_modules/@npmcli/run-script/node_modules/which/bin/which.js b/node_modules/node-gyp/node_modules/which/bin/which.js similarity index 100% rename from node_modules/@npmcli/run-script/node_modules/which/bin/which.js rename to node_modules/node-gyp/node_modules/which/bin/which.js diff --git a/node_modules/@npmcli/run-script/node_modules/which/lib/index.js b/node_modules/node-gyp/node_modules/which/lib/index.js similarity index 100% rename from node_modules/@npmcli/run-script/node_modules/which/lib/index.js rename to node_modules/node-gyp/node_modules/which/lib/index.js diff --git a/node_modules/@npmcli/run-script/node_modules/which/package.json b/node_modules/node-gyp/node_modules/which/package.json similarity index 68% rename from node_modules/@npmcli/run-script/node_modules/which/package.json rename to node_modules/node-gyp/node_modules/which/package.json index 94184233c61c4..515bfb22ca0e1 100644 --- a/node_modules/@npmcli/run-script/node_modules/which/package.json +++ b/node_modules/node-gyp/node_modules/which/package.json @@ -2,10 +2,10 @@ "author": "GitHub Inc.", "name": "which", "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.", - "version": "5.0.0", + "version": "4.0.0", "repository": { "type": "git", - "url": "git+https://github.com/npm/node-which.git" + "url": "https://github.com/npm/node-which.git" }, "main": "lib/index.js", "bin": { @@ -16,19 +16,18 @@ "isexe": "^3.1.1" }, "devDependencies": { - "@npmcli/eslint-config": "^5.0.0", - "@npmcli/template-oss": "4.23.3", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.18.0", "tap": "^16.3.0" }, "scripts": { "test": "tap", - "lint": "npm run eslint", + "lint": "eslint \"**/*.js\"", "postlint": "template-oss-check", "template-oss-apply": "template-oss-apply --force", - "lintfix": "npm run eslint -- --fix", + "lintfix": "npm run lint -- --fix", "snap": "tap", - "posttest": "npm run lint", - "eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"" + "posttest": "npm run lint" }, "files": [ "bin/", @@ -42,11 +41,17 @@ ] }, "engines": { - "node": "^18.17.0 || >=20.5.0" + "node": "^16.13.0 || >=18.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.23.3", + "ciVersions": [ + "16.13.0", + "16.x", + "18.0.0", + "18.x" + ], + "version": "4.18.0", "publish": "true" } } diff --git a/node_modules/pacote/node_modules/isexe/LICENSE b/node_modules/pacote/node_modules/isexe/LICENSE deleted file mode 100644 index c925dbe826b67..0000000000000 --- a/node_modules/pacote/node_modules/isexe/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) 2016-2022 Isaac Z. Schlueter and Contributors - -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/pacote/node_modules/isexe/dist/cjs/index.js b/node_modules/pacote/node_modules/isexe/dist/cjs/index.js deleted file mode 100644 index cefcb66b5c543..0000000000000 --- a/node_modules/pacote/node_modules/isexe/dist/cjs/index.js +++ /dev/null @@ -1,46 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.sync = exports.isexe = exports.posix = exports.win32 = void 0; -const posix = __importStar(require("./posix.js")); -exports.posix = posix; -const win32 = __importStar(require("./win32.js")); -exports.win32 = win32; -__exportStar(require("./options.js"), exports); -const platform = process.env._ISEXE_TEST_PLATFORM_ || process.platform; -const impl = platform === 'win32' ? win32 : posix; -/** - * Determine whether a path is executable on the current platform. - */ -exports.isexe = impl.isexe; -/** - * Synchronously determine whether a path is executable on the - * current platform. - */ -exports.sync = impl.sync; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/pacote/node_modules/isexe/dist/cjs/options.js b/node_modules/pacote/node_modules/isexe/dist/cjs/options.js deleted file mode 100644 index 0dfad0762cc32..0000000000000 --- a/node_modules/pacote/node_modules/isexe/dist/cjs/options.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=options.js.map \ No newline at end of file diff --git a/node_modules/pacote/node_modules/isexe/dist/cjs/package.json b/node_modules/pacote/node_modules/isexe/dist/cjs/package.json deleted file mode 100644 index 5bbefffbabee3..0000000000000 --- a/node_modules/pacote/node_modules/isexe/dist/cjs/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "commonjs" -} diff --git a/node_modules/pacote/node_modules/isexe/dist/cjs/posix.js b/node_modules/pacote/node_modules/isexe/dist/cjs/posix.js deleted file mode 100644 index 3bc5e79d7007e..0000000000000 --- a/node_modules/pacote/node_modules/isexe/dist/cjs/posix.js +++ /dev/null @@ -1,67 +0,0 @@ -"use strict"; -/** - * This is the Posix implementation of isexe, which uses the file - * mode and uid/gid values. - * - * @module - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.sync = exports.isexe = void 0; -const fs_1 = require("fs"); -const promises_1 = require("fs/promises"); -/** - * Determine whether a path is executable according to the mode and - * current (or specified) user and group IDs. - */ -const isexe = async (path, options = {}) => { - const { ignoreErrors = false } = options; - try { - return checkStat(await (0, promises_1.stat)(path), options); - } - catch (e) { - const er = e; - if (ignoreErrors || er.code === 'EACCES') - return false; - throw er; - } -}; -exports.isexe = isexe; -/** - * Synchronously determine whether a path is executable according to - * the mode and current (or specified) user and group IDs. - */ -const sync = (path, options = {}) => { - const { ignoreErrors = false } = options; - try { - return checkStat((0, fs_1.statSync)(path), options); - } - catch (e) { - const er = e; - if (ignoreErrors || er.code === 'EACCES') - return false; - throw er; - } -}; -exports.sync = sync; -const checkStat = (stat, options) => stat.isFile() && checkMode(stat, options); -const checkMode = (stat, options) => { - const myUid = options.uid ?? process.getuid?.(); - const myGroups = options.groups ?? process.getgroups?.() ?? []; - const myGid = options.gid ?? process.getgid?.() ?? myGroups[0]; - if (myUid === undefined || myGid === undefined) { - throw new Error('cannot get uid or gid'); - } - const groups = new Set([myGid, ...myGroups]); - const mod = stat.mode; - const uid = stat.uid; - const gid = stat.gid; - const u = parseInt('100', 8); - const g = parseInt('010', 8); - const o = parseInt('001', 8); - const ug = u | g; - return !!(mod & o || - (mod & g && groups.has(gid)) || - (mod & u && uid === myUid) || - (mod & ug && myUid === 0)); -}; -//# sourceMappingURL=posix.js.map \ No newline at end of file diff --git a/node_modules/pacote/node_modules/isexe/dist/cjs/win32.js b/node_modules/pacote/node_modules/isexe/dist/cjs/win32.js deleted file mode 100644 index fa7a4d2f7d240..0000000000000 --- a/node_modules/pacote/node_modules/isexe/dist/cjs/win32.js +++ /dev/null @@ -1,62 +0,0 @@ -"use strict"; -/** - * This is the Windows implementation of isexe, which uses the file - * extension and PATHEXT setting. - * - * @module - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.sync = exports.isexe = void 0; -const fs_1 = require("fs"); -const promises_1 = require("fs/promises"); -/** - * Determine whether a path is executable based on the file extension - * and PATHEXT environment variable (or specified pathExt option) - */ -const isexe = async (path, options = {}) => { - const { ignoreErrors = false } = options; - try { - return checkStat(await (0, promises_1.stat)(path), path, options); - } - catch (e) { - const er = e; - if (ignoreErrors || er.code === 'EACCES') - return false; - throw er; - } -}; -exports.isexe = isexe; -/** - * Synchronously determine whether a path is executable based on the file - * extension and PATHEXT environment variable (or specified pathExt option) - */ -const sync = (path, options = {}) => { - const { ignoreErrors = false } = options; - try { - return checkStat((0, fs_1.statSync)(path), path, options); - } - catch (e) { - const er = e; - if (ignoreErrors || er.code === 'EACCES') - return false; - throw er; - } -}; -exports.sync = sync; -const checkPathExt = (path, options) => { - const { pathExt = process.env.PATHEXT || '' } = options; - const peSplit = pathExt.split(';'); - if (peSplit.indexOf('') !== -1) { - return true; - } - for (let i = 0; i < peSplit.length; i++) { - const p = peSplit[i].toLowerCase(); - const ext = path.substring(path.length - p.length).toLowerCase(); - if (p && ext === p) { - return true; - } - } - return false; -}; -const checkStat = (stat, path, options) => stat.isFile() && checkPathExt(path, options); -//# sourceMappingURL=win32.js.map \ No newline at end of file diff --git a/node_modules/pacote/node_modules/isexe/dist/mjs/index.js b/node_modules/pacote/node_modules/isexe/dist/mjs/index.js deleted file mode 100644 index 1e309acd7355e..0000000000000 --- a/node_modules/pacote/node_modules/isexe/dist/mjs/index.js +++ /dev/null @@ -1,16 +0,0 @@ -import * as posix from './posix.js'; -import * as win32 from './win32.js'; -export * from './options.js'; -export { win32, posix }; -const platform = process.env._ISEXE_TEST_PLATFORM_ || process.platform; -const impl = platform === 'win32' ? win32 : posix; -/** - * Determine whether a path is executable on the current platform. - */ -export const isexe = impl.isexe; -/** - * Synchronously determine whether a path is executable on the - * current platform. - */ -export const sync = impl.sync; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/pacote/node_modules/isexe/dist/mjs/options.js b/node_modules/pacote/node_modules/isexe/dist/mjs/options.js deleted file mode 100644 index e9ded40bd5b2c..0000000000000 --- a/node_modules/pacote/node_modules/isexe/dist/mjs/options.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=options.js.map \ No newline at end of file diff --git a/node_modules/pacote/node_modules/isexe/dist/mjs/package.json b/node_modules/pacote/node_modules/isexe/dist/mjs/package.json deleted file mode 100644 index 3dbc1ca591c05..0000000000000 --- a/node_modules/pacote/node_modules/isexe/dist/mjs/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "module" -} diff --git a/node_modules/pacote/node_modules/isexe/dist/mjs/posix.js b/node_modules/pacote/node_modules/isexe/dist/mjs/posix.js deleted file mode 100644 index c453776c0452f..0000000000000 --- a/node_modules/pacote/node_modules/isexe/dist/mjs/posix.js +++ /dev/null @@ -1,62 +0,0 @@ -/** - * This is the Posix implementation of isexe, which uses the file - * mode and uid/gid values. - * - * @module - */ -import { statSync } from 'fs'; -import { stat } from 'fs/promises'; -/** - * Determine whether a path is executable according to the mode and - * current (or specified) user and group IDs. - */ -export const isexe = async (path, options = {}) => { - const { ignoreErrors = false } = options; - try { - return checkStat(await stat(path), options); - } - catch (e) { - const er = e; - if (ignoreErrors || er.code === 'EACCES') - return false; - throw er; - } -}; -/** - * Synchronously determine whether a path is executable according to - * the mode and current (or specified) user and group IDs. - */ -export const sync = (path, options = {}) => { - const { ignoreErrors = false } = options; - try { - return checkStat(statSync(path), options); - } - catch (e) { - const er = e; - if (ignoreErrors || er.code === 'EACCES') - return false; - throw er; - } -}; -const checkStat = (stat, options) => stat.isFile() && checkMode(stat, options); -const checkMode = (stat, options) => { - const myUid = options.uid ?? process.getuid?.(); - const myGroups = options.groups ?? process.getgroups?.() ?? []; - const myGid = options.gid ?? process.getgid?.() ?? myGroups[0]; - if (myUid === undefined || myGid === undefined) { - throw new Error('cannot get uid or gid'); - } - const groups = new Set([myGid, ...myGroups]); - const mod = stat.mode; - const uid = stat.uid; - const gid = stat.gid; - const u = parseInt('100', 8); - const g = parseInt('010', 8); - const o = parseInt('001', 8); - const ug = u | g; - return !!(mod & o || - (mod & g && groups.has(gid)) || - (mod & u && uid === myUid) || - (mod & ug && myUid === 0)); -}; -//# sourceMappingURL=posix.js.map \ No newline at end of file diff --git a/node_modules/pacote/node_modules/isexe/dist/mjs/win32.js b/node_modules/pacote/node_modules/isexe/dist/mjs/win32.js deleted file mode 100644 index a354ee2a5115c..0000000000000 --- a/node_modules/pacote/node_modules/isexe/dist/mjs/win32.js +++ /dev/null @@ -1,57 +0,0 @@ -/** - * This is the Windows implementation of isexe, which uses the file - * extension and PATHEXT setting. - * - * @module - */ -import { statSync } from 'fs'; -import { stat } from 'fs/promises'; -/** - * Determine whether a path is executable based on the file extension - * and PATHEXT environment variable (or specified pathExt option) - */ -export const isexe = async (path, options = {}) => { - const { ignoreErrors = false } = options; - try { - return checkStat(await stat(path), path, options); - } - catch (e) { - const er = e; - if (ignoreErrors || er.code === 'EACCES') - return false; - throw er; - } -}; -/** - * Synchronously determine whether a path is executable based on the file - * extension and PATHEXT environment variable (or specified pathExt option) - */ -export const sync = (path, options = {}) => { - const { ignoreErrors = false } = options; - try { - return checkStat(statSync(path), path, options); - } - catch (e) { - const er = e; - if (ignoreErrors || er.code === 'EACCES') - return false; - throw er; - } -}; -const checkPathExt = (path, options) => { - const { pathExt = process.env.PATHEXT || '' } = options; - const peSplit = pathExt.split(';'); - if (peSplit.indexOf('') !== -1) { - return true; - } - for (let i = 0; i < peSplit.length; i++) { - const p = peSplit[i].toLowerCase(); - const ext = path.substring(path.length - p.length).toLowerCase(); - if (p && ext === p) { - return true; - } - } - return false; -}; -const checkStat = (stat, path, options) => stat.isFile() && checkPathExt(path, options); -//# sourceMappingURL=win32.js.map \ No newline at end of file diff --git a/node_modules/pacote/node_modules/isexe/package.json b/node_modules/pacote/node_modules/isexe/package.json deleted file mode 100644 index a0e2cd04bfdbf..0000000000000 --- a/node_modules/pacote/node_modules/isexe/package.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "name": "isexe", - "version": "3.1.1", - "description": "Minimal module to check if a file is executable.", - "main": "./dist/cjs/index.js", - "module": "./dist/mjs/index.js", - "types": "./dist/cjs/index.js", - "files": [ - "dist" - ], - "exports": { - ".": { - "import": { - "types": "./dist/mjs/index.d.ts", - "default": "./dist/mjs/index.js" - }, - "require": { - "types": "./dist/cjs/index.d.ts", - "default": "./dist/cjs/index.js" - } - }, - "./posix": { - "import": { - "types": "./dist/mjs/posix.d.ts", - "default": "./dist/mjs/posix.js" - }, - "require": { - "types": "./dist/cjs/posix.d.ts", - "default": "./dist/cjs/posix.js" - } - }, - "./win32": { - "import": { - "types": "./dist/mjs/win32.d.ts", - "default": "./dist/mjs/win32.js" - }, - "require": { - "types": "./dist/cjs/win32.d.ts", - "default": "./dist/cjs/win32.js" - } - }, - "./package.json": "./package.json" - }, - "devDependencies": { - "@types/node": "^20.4.5", - "@types/tap": "^15.0.8", - "c8": "^8.0.1", - "mkdirp": "^0.5.1", - "prettier": "^2.8.8", - "rimraf": "^2.5.0", - "sync-content": "^1.0.2", - "tap": "^16.3.8", - "ts-node": "^10.9.1", - "typedoc": "^0.24.8", - "typescript": "^5.1.6" - }, - "scripts": { - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", - "prepare": "tsc -p tsconfig/cjs.json && tsc -p tsconfig/esm.json && bash ./scripts/fixup.sh", - "pretest": "npm run prepare", - "presnap": "npm run prepare", - "test": "c8 tap", - "snap": "c8 tap", - "format": "prettier --write . --loglevel warn --ignore-path ../../.prettierignore --cache", - "typedoc": "typedoc --tsconfig tsconfig/esm.json ./src/*.ts" - }, - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "license": "ISC", - "tap": { - "coverage": false, - "node-arg": [ - "--enable-source-maps", - "--no-warnings", - "--loader", - "ts-node/esm" - ], - "ts": false - }, - "prettier": { - "semi": false, - "printWidth": 75, - "tabWidth": 2, - "useTabs": false, - "singleQuote": true, - "jsxSingleQuote": false, - "bracketSameLine": true, - "arrowParens": "avoid", - "endOfLine": "lf" - }, - "repository": "https://github.com/isaacs/isexe", - "engines": { - "node": ">=16" - } -} diff --git a/node_modules/pacote/node_modules/which/LICENSE b/node_modules/pacote/node_modules/which/LICENSE deleted file mode 100644 index 19129e315fe59..0000000000000 --- a/node_modules/pacote/node_modules/which/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -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/pacote/node_modules/which/bin/which.js b/node_modules/pacote/node_modules/which/bin/which.js deleted file mode 100755 index 6df16f21acf93..0000000000000 --- a/node_modules/pacote/node_modules/which/bin/which.js +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env node - -const which = require('../lib') -const argv = process.argv.slice(2) - -const usage = (err) => { - if (err) { - console.error(`which: ${err}`) - } - console.error('usage: which [-as] program ...') - process.exit(1) -} - -if (!argv.length) { - return usage() -} - -let dashdash = false -const [commands, flags] = argv.reduce((acc, arg) => { - if (dashdash || arg === '--') { - dashdash = true - return acc - } - - if (!/^-/.test(arg)) { - acc[0].push(arg) - return acc - } - - for (const flag of arg.slice(1).split('')) { - if (flag === 's') { - acc[1].silent = true - } else if (flag === 'a') { - acc[1].all = true - } else { - usage(`illegal option -- ${flag}`) - } - } - - return acc -}, [[], {}]) - -for (const command of commands) { - try { - const res = which.sync(command, { all: flags.all }) - if (!flags.silent) { - console.log([].concat(res).join('\n')) - } - } catch (err) { - process.exitCode = 1 - } -} diff --git a/node_modules/pacote/node_modules/which/lib/index.js b/node_modules/pacote/node_modules/which/lib/index.js deleted file mode 100644 index 2fd358baf888f..0000000000000 --- a/node_modules/pacote/node_modules/which/lib/index.js +++ /dev/null @@ -1,111 +0,0 @@ -const { isexe, sync: isexeSync } = require('isexe') -const { join, delimiter, sep, posix } = require('path') - -const isWindows = process.platform === 'win32' - -// used to check for slashed in commands passed in. always checks for the posix -// seperator on all platforms, and checks for the current separator when not on -// a posix platform. don't use the isWindows check for this since that is mocked -// in tests but we still need the code to actually work when called. that is also -// why it is ignored from coverage. -/* istanbul ignore next */ -const rSlash = new RegExp(`[${posix.sep}${sep === posix.sep ? '' : sep}]`.replace(/(\\)/g, '\\$1')) -const rRel = new RegExp(`^\\.${rSlash.source}`) - -const getNotFoundError = (cmd) => - Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' }) - -const getPathInfo = (cmd, { - path: optPath = process.env.PATH, - pathExt: optPathExt = process.env.PATHEXT, - delimiter: optDelimiter = delimiter, -}) => { - // If it has a slash, then we don't bother searching the pathenv. - // just check the file itself, and that's it. - const pathEnv = cmd.match(rSlash) ? [''] : [ - // windows always checks the cwd first - ...(isWindows ? [process.cwd()] : []), - ...(optPath || /* istanbul ignore next: very unusual */ '').split(optDelimiter), - ] - - if (isWindows) { - const pathExtExe = optPathExt || - ['.EXE', '.CMD', '.BAT', '.COM'].join(optDelimiter) - const pathExt = pathExtExe.split(optDelimiter).flatMap((item) => [item, item.toLowerCase()]) - if (cmd.includes('.') && pathExt[0] !== '') { - pathExt.unshift('') - } - return { pathEnv, pathExt, pathExtExe } - } - - return { pathEnv, pathExt: [''] } -} - -const getPathPart = (raw, cmd) => { - const pathPart = /^".*"$/.test(raw) ? raw.slice(1, -1) : raw - const prefix = !pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : '' - return prefix + join(pathPart, cmd) -} - -const which = async (cmd, opt = {}) => { - const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt) - const found = [] - - for (const envPart of pathEnv) { - const p = getPathPart(envPart, cmd) - - for (const ext of pathExt) { - const withExt = p + ext - const is = await isexe(withExt, { pathExt: pathExtExe, ignoreErrors: true }) - if (is) { - if (!opt.all) { - return withExt - } - found.push(withExt) - } - } - } - - if (opt.all && found.length) { - return found - } - - if (opt.nothrow) { - return null - } - - throw getNotFoundError(cmd) -} - -const whichSync = (cmd, opt = {}) => { - const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt) - const found = [] - - for (const pathEnvPart of pathEnv) { - const p = getPathPart(pathEnvPart, cmd) - - for (const ext of pathExt) { - const withExt = p + ext - const is = isexeSync(withExt, { pathExt: pathExtExe, ignoreErrors: true }) - if (is) { - if (!opt.all) { - return withExt - } - found.push(withExt) - } - } - } - - if (opt.all && found.length) { - return found - } - - if (opt.nothrow) { - return null - } - - throw getNotFoundError(cmd) -} - -module.exports = which -which.sync = whichSync diff --git a/node_modules/pacote/node_modules/which/package.json b/node_modules/pacote/node_modules/which/package.json deleted file mode 100644 index 94184233c61c4..0000000000000 --- a/node_modules/pacote/node_modules/which/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "author": "GitHub Inc.", - "name": "which", - "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.", - "version": "5.0.0", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/node-which.git" - }, - "main": "lib/index.js", - "bin": { - "node-which": "./bin/which.js" - }, - "license": "ISC", - "dependencies": { - "isexe": "^3.1.1" - }, - "devDependencies": { - "@npmcli/eslint-config": "^5.0.0", - "@npmcli/template-oss": "4.23.3", - "tap": "^16.3.0" - }, - "scripts": { - "test": "tap", - "lint": "npm run eslint", - "postlint": "template-oss-check", - "template-oss-apply": "template-oss-apply --force", - "lintfix": "npm run eslint -- --fix", - "snap": "tap", - "posttest": "npm run lint", - "eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"" - }, - "files": [ - "bin/", - "lib/" - ], - "tap": { - "check-coverage": true, - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - }, - "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" - } -} diff --git a/node_modules/which/package.json b/node_modules/which/package.json index 515bfb22ca0e1..94184233c61c4 100644 --- a/node_modules/which/package.json +++ b/node_modules/which/package.json @@ -2,10 +2,10 @@ "author": "GitHub Inc.", "name": "which", "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.", - "version": "4.0.0", + "version": "5.0.0", "repository": { "type": "git", - "url": "https://github.com/npm/node-which.git" + "url": "git+https://github.com/npm/node-which.git" }, "main": "lib/index.js", "bin": { @@ -16,18 +16,19 @@ "isexe": "^3.1.1" }, "devDependencies": { - "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.18.0", + "@npmcli/eslint-config": "^5.0.0", + "@npmcli/template-oss": "4.23.3", "tap": "^16.3.0" }, "scripts": { "test": "tap", - "lint": "eslint \"**/*.js\"", + "lint": "npm run eslint", "postlint": "template-oss-check", "template-oss-apply": "template-oss-apply --force", - "lintfix": "npm run lint -- --fix", + "lintfix": "npm run eslint -- --fix", "snap": "tap", - "posttest": "npm run lint" + "posttest": "npm run lint", + "eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"" }, "files": [ "bin/", @@ -41,17 +42,11 @@ ] }, "engines": { - "node": "^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "ciVersions": [ - "16.13.0", - "16.x", - "18.0.0", - "18.x" - ], - "version": "4.18.0", + "version": "4.23.3", "publish": "true" } } diff --git a/package-lock.json b/package-lock.json index 4ad964c9ad5ea..ffad94db93795 100644 --- a/package-lock.json +++ b/package-lock.json @@ -152,7 +152,7 @@ "tiny-relative-date": "^1.3.0", "treeverse": "^3.0.0", "validate-npm-package-name": "^6.0.0", - "which": "^4.0.0", + "which": "^5.0.0", "write-file-atomic": "^5.0.1" }, "bin": { @@ -1637,6 +1637,15 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "node_modules/@npmcli/git/node_modules/isexe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "license": "ISC", + "engines": { + "node": ">=16" + } + }, "node_modules/@npmcli/git/node_modules/npm-install-checks": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-6.3.0.tgz", @@ -1697,6 +1706,21 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "node_modules/@npmcli/git/node_modules/which": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", + "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", + "license": "ISC", + "dependencies": { + "isexe": "^3.1.1" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^16.13.0 || >=18.0.0" + } + }, "node_modules/@npmcli/installed-package-contents": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-2.1.0.tgz", @@ -1874,6 +1898,15 @@ "node": "^16.14.0 || >=18.0.0" } }, + "node_modules/@npmcli/metavuln-calculator/node_modules/isexe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "license": "ISC", + "engines": { + "node": ">=16" + } + }, "node_modules/@npmcli/metavuln-calculator/node_modules/json-parse-even-better-errors": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.2.tgz", @@ -2066,6 +2099,21 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "node_modules/@npmcli/metavuln-calculator/node_modules/which": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", + "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", + "license": "ISC", + "dependencies": { + "isexe": "^3.1.1" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^16.13.0 || >=18.0.0" + } + }, "node_modules/@npmcli/mock-globals": { "resolved": "mock-globals", "link": true @@ -2132,32 +2180,6 @@ "node": "^18.17.0 || >=20.5.0" } }, - "node_modules/@npmcli/package-json/node_modules/isexe": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", - "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", - "inBundle": true, - "license": "ISC", - "engines": { - "node": ">=16" - } - }, - "node_modules/@npmcli/package-json/node_modules/which": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/which/-/which-5.0.0.tgz", - "integrity": "sha512-JEdGzHwwkrbWoGOlIHqQ5gtprKGOenpDHpxE9zVR1bWbOtYRyPPHMe9FaP6x61CmNaTThSkb0DAJte5jD+DmzQ==", - "inBundle": true, - "license": "ISC", - "dependencies": { - "isexe": "^3.1.1" - }, - "bin": { - "node-which": "bin/which.js" - }, - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, "node_modules/@npmcli/promise-spawn": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-8.0.1.tgz", @@ -2171,32 +2193,6 @@ "node": "^18.17.0 || >=20.5.0" } }, - "node_modules/@npmcli/promise-spawn/node_modules/isexe": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", - "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", - "inBundle": true, - "license": "ISC", - "engines": { - "node": ">=16" - } - }, - "node_modules/@npmcli/promise-spawn/node_modules/which": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/which/-/which-5.0.0.tgz", - "integrity": "sha512-JEdGzHwwkrbWoGOlIHqQ5gtprKGOenpDHpxE9zVR1bWbOtYRyPPHMe9FaP6x61CmNaTThSkb0DAJte5jD+DmzQ==", - "inBundle": true, - "license": "ISC", - "dependencies": { - "isexe": "^3.1.1" - }, - "bin": { - "node-which": "bin/which.js" - }, - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, "node_modules/@npmcli/query": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@npmcli/query/-/query-3.1.0.tgz", @@ -2247,32 +2243,6 @@ "node": "^18.17.0 || >=20.5.0" } }, - "node_modules/@npmcli/run-script/node_modules/isexe": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", - "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", - "inBundle": true, - "license": "ISC", - "engines": { - "node": ">=16" - } - }, - "node_modules/@npmcli/run-script/node_modules/which": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/which/-/which-5.0.0.tgz", - "integrity": "sha512-JEdGzHwwkrbWoGOlIHqQ5gtprKGOenpDHpxE9zVR1bWbOtYRyPPHMe9FaP6x61CmNaTThSkb0DAJte5jD+DmzQ==", - "inBundle": true, - "license": "ISC", - "dependencies": { - "isexe": "^3.1.1" - }, - "bin": { - "node-which": "bin/which.js" - }, - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, "node_modules/@npmcli/smoke-tests": { "resolved": "smoke-tests", "link": true @@ -10287,6 +10257,16 @@ "node": "^16.14.0 || >=18.0.0" } }, + "node_modules/node-gyp/node_modules/isexe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "inBundle": true, + "license": "ISC", + "engines": { + "node": ">=16" + } + }, "node_modules/node-gyp/node_modules/make-fetch-happen": { "version": "13.0.1", "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-13.0.1.tgz", @@ -10376,6 +10356,22 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "node_modules/node-gyp/node_modules/which": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", + "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", + "inBundle": true, + "license": "ISC", + "dependencies": { + "isexe": "^3.1.1" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^16.13.0 || >=18.0.0" + } + }, "node_modules/node-html-parser": { "version": "6.1.13", "resolved": "https://registry.npmjs.org/node-html-parser/-/node-html-parser-6.1.13.tgz", @@ -11309,16 +11305,6 @@ "node": "^18.17.0 || >=20.5.0" } }, - "node_modules/pacote/node_modules/isexe": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", - "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", - "inBundle": true, - "license": "ISC", - "engines": { - "node": ">=16" - } - }, "node_modules/pacote/node_modules/npm-bundled": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-4.0.0.tgz", @@ -11355,22 +11341,6 @@ "node": "^18.17.0 || >=20.5.0" } }, - "node_modules/pacote/node_modules/which": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/which/-/which-5.0.0.tgz", - "integrity": "sha512-JEdGzHwwkrbWoGOlIHqQ5gtprKGOenpDHpxE9zVR1bWbOtYRyPPHMe9FaP6x61CmNaTThSkb0DAJte5jD+DmzQ==", - "inBundle": true, - "license": "ISC", - "dependencies": { - "isexe": "^3.1.1" - }, - "bin": { - "node-which": "bin/which.js" - }, - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -16725,9 +16695,9 @@ } }, "node_modules/which": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", - "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-5.0.0.tgz", + "integrity": "sha512-JEdGzHwwkrbWoGOlIHqQ5gtprKGOenpDHpxE9zVR1bWbOtYRyPPHMe9FaP6x61CmNaTThSkb0DAJte5jD+DmzQ==", "inBundle": true, "license": "ISC", "dependencies": { @@ -16737,7 +16707,7 @@ "node-which": "bin/which.js" }, "engines": { - "node": "^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/which-boxed-primitive": { @@ -17085,7 +17055,7 @@ "proxy": "^2.1.1", "semver": "^7.5.4", "tap": "^16.3.8", - "which": "^4.0.0" + "which": "^5.0.0" }, "engines": { "node": "^18.17.0 || >=20.5.0" diff --git a/package.json b/package.json index 8bf438fe6b253..8c35f9cd84146 100644 --- a/package.json +++ b/package.json @@ -117,7 +117,7 @@ "tiny-relative-date": "^1.3.0", "treeverse": "^3.0.0", "validate-npm-package-name": "^6.0.0", - "which": "^4.0.0", + "which": "^5.0.0", "write-file-atomic": "^5.0.1" }, "bundleDependencies": [ diff --git a/smoke-tests/package.json b/smoke-tests/package.json index b8ba89bc26d4a..d8ab10e5bfd66 100644 --- a/smoke-tests/package.json +++ b/smoke-tests/package.json @@ -26,7 +26,7 @@ "proxy": "^2.1.1", "semver": "^7.5.4", "tap": "^16.3.8", - "which": "^4.0.0" + "which": "^5.0.0" }, "author": "GitHub Inc.", "license": "ISC",