diff -Nru npm-9.1.2~ds1/AUTHORS npm-9.2.0~ds1/AUTHORS --- npm-9.1.2~ds1/AUTHORS 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/AUTHORS 2022-12-07 23:13:18.000000000 +0000 @@ -864,3 +864,6 @@ Albert 理斯特 Gennadiy Gashev <63790536+gennadiygashev@users.noreply.github.com> Andrew Dawes +sosoba +Aron +HenryNguyen5 <6404866+HenryNguyen5@users.noreply.github.com> diff -Nru npm-9.1.2~ds1/CHANGELOG.md npm-9.2.0~ds1/CHANGELOG.md --- npm-9.1.2~ds1/CHANGELOG.md 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/CHANGELOG.md 2022-12-07 23:13:18.000000000 +0000 @@ -1,5 +1,63 @@ # Changelog +## [9.2.0](https://github.com/npm/cli/compare/v9.1.3...v9.2.0) (2022-12-07) + +### Features + +* [`cf57ffa`](https://github.com/npm/cli/commit/cf57ffa90088fcf5b028cc02938baae6228b5a40) [#5888](https://github.com/npm/cli/pull/5888) discrete npm doctor commands (#5888) (@wraithgar) + +### Bug Fixes + +* [`dfd5d46`](https://github.com/npm/cli/commit/dfd5d461e0ee2163e210cc136d2bb7873dfeb363) [#5932](https://github.com/npm/cli/pull/5932) ignore implicit workspaces for completion (#5932) (@wraithgar) + +### Dependencies + +* [`2f2b146`](https://github.com/npm/cli/commit/2f2b1469565894ec777e6eb77fea7b607b797adb) [#5936](https://github.com/npm/cli/pull/5936) `npm-packlist@7.0.4` (#5936) +* [`372d158`](https://github.com/npm/cli/commit/372d158d2637120600a95abee64355ed1cb6f990) [#5935](https://github.com/npm/cli/pull/5935) `minimatch@5.1.1` (#5935) +* [`0e6c28b`](https://github.com/npm/cli/commit/0e6c28ba093f8c5d35df98afca28e842b247004b) [#5934](https://github.com/npm/cli/pull/5934) `ci-info@3.7.0` (#5934) +* [`0a3fe00`](https://github.com/npm/cli/commit/0a3fe000e2723ae6fdb8b1d3154fd3835057c992) [#5933](https://github.com/npm/cli/pull/5933) `minipass@4.0.0` +* [`6b77340`](https://github.com/npm/cli/commit/6b7734009ecd939fbb3d382cb92eb0cdbec7dcd3) `tar@6.1.13` +* [`cf0a174`](https://github.com/npm/cli/commit/cf0a17407abc577c27420a1c8a4a0c08c7cefce9) `ssri@10.0.1` +* [`3da9a1a`](https://github.com/npm/cli/commit/3da9a1a4ebcf1779035b5f9ae985c087f617efe3) `pacote@15.0.7` +* [`fee9b66`](https://github.com/npm/cli/commit/fee9b6686892a1c7f976c36ddd5d89b70c416817) `npm-registry-fetch@14.0.3` +* [`e940917`](https://github.com/npm/cli/commit/e940917befcdaf44ee7e24d31b540f4de8507734) `cacache@17.0.3` +* [`875bd56`](https://github.com/npm/cli/commit/875bd56c33ca5eef80c2a50a11808445f2a39a2a) `npm-package-arg@10.1.0` +* [`280b7a4`](https://github.com/npm/cli/commit/280b7a445e4a83d70980cf3c436745a1faa50c67) [#5927](https://github.com/npm/cli/pull/5927) `npm-packlist@7.0.3` +* [Workspace](https://github.com/npm/cli/releases/tag/arborist-v6.1.5): `@npmcli/arborist@6.1.5` +* [Workspace](https://github.com/npm/cli/releases/tag/libnpmaccess-v7.0.1): `libnpmaccess@7.0.1` +* [Workspace](https://github.com/npm/cli/releases/tag/libnpmdiff-v5.0.6): `libnpmdiff@5.0.6` +* [Workspace](https://github.com/npm/cli/releases/tag/libnpmexec-v5.0.6): `libnpmexec@5.0.6` +* [Workspace](https://github.com/npm/cli/releases/tag/libnpmfund-v4.0.6): `libnpmfund@4.0.6` +* [Workspace](https://github.com/npm/cli/releases/tag/libnpmhook-v9.0.1): `libnpmhook@9.0.1` +* [Workspace](https://github.com/npm/cli/releases/tag/libnpmorg-v5.0.1): `libnpmorg@5.0.1` +* [Workspace](https://github.com/npm/cli/releases/tag/libnpmpack-v5.0.6): `libnpmpack@5.0.6` +* [Workspace](https://github.com/npm/cli/releases/tag/libnpmpublish-v7.0.6): `libnpmpublish@7.0.6` +* [Workspace](https://github.com/npm/cli/releases/tag/libnpmsearch-v6.0.1): `libnpmsearch@6.0.1` +* [Workspace](https://github.com/npm/cli/releases/tag/libnpmteam-v5.0.1): `libnpmteam@5.0.1` + +## [9.1.3](https://github.com/npm/cli/compare/v9.1.2...v9.1.3) (2022-11-30) + +### Bug Fixes + +* [`ffbdea2`](https://github.com/npm/cli/commit/ffbdea286a08eeaf40ab83eea5bfe0602dc6bbcd) [#5894](https://github.com/npm/cli/pull/5894) npm pack filename on scoped packages (#5894) (@HenryNguyen5) +* [`c26d708`](https://github.com/npm/cli/commit/c26d708428a96da530092759b5ff6d67c7282348) [#5884](https://github.com/npm/cli/pull/5884) validate username at get-identity (#5884) (@sosoba, @nlf) + +### Documentation + +* [`ea948dc`](https://github.com/npm/cli/commit/ea948dceac5cfeef437c97874ab26c3275e75766) [#5881](https://github.com/npm/cli/pull/5881) update description of npm exec (#5881) (@styfle, @wraithgar) +* [`40f2c21`](https://github.com/npm/cli/commit/40f2c213d75a252665311b4f8775d297390aeb70) [#5865](https://github.com/npm/cli/pull/5865) ci-info url (#5865) (@wraithgar) +* [`681a45b`](https://github.com/npm/cli/commit/681a45bb48acd57aa64cb3241ea4915f5a12e029) [#5875](https://github.com/npm/cli/pull/5875) run the comand for directory workspaces (#5875) (@1aron) +* [`681a45b`](https://github.com/npm/cli/commit/681a45bb48acd57aa64cb3241ea4915f5a12e029) [#5875](https://github.com/npm/cli/pull/5875) add workspace directory example (#5875) (@1aron) + +### Dependencies + +* [Workspace](https://github.com/npm/cli/compare/arborist-v6.1.3...arborist-v6.1.4): `@npmcli/arborist@6.1.4` +* [Workspace](https://github.com/npm/cli/compare/libnpmdiff-v5.0.4...libnpmdiff-v5.0.5): `libnpmdiff@5.0.5` +* [Workspace](https://github.com/npm/cli/compare/libnpmexec-v5.0.4...libnpmexec-v5.0.5): `libnpmexec@5.0.5` +* [Workspace](https://github.com/npm/cli/compare/libnpmfund-v4.0.4...libnpmfund-v4.0.5): `libnpmfund@4.0.5` +* [Workspace](https://github.com/npm/cli/compare/libnpmpack-v5.0.4...libnpmpack-v5.0.5): `libnpmpack@5.0.5` +* [Workspace](https://github.com/npm/cli/compare/libnpmpublish-v7.0.4...libnpmpublish-v7.0.5): `libnpmpublish@7.0.5` + ## [9.1.2](https://github.com/npm/cli/compare/v9.1.1...v9.1.2) (2022-11-16) ### Bug Fixes diff -Nru npm-9.1.2~ds1/debian/changelog npm-9.2.0~ds1/debian/changelog --- npm-9.1.2~ds1/debian/changelog 2022-11-18 10:04:41.000000000 +0000 +++ npm-9.2.0~ds1/debian/changelog 2022-12-11 14:07:55.000000000 +0000 @@ -1,3 +1,29 @@ +npm (9.2.0~ds1-1) unstable; urgency=medium + + * Team upload + * Enable more tests + * New upstream version 9.2.0~ds1 + * Dependencies: drop node-ansistyles, node-asap and node-dezalgo + + -- Yadd Sun, 11 Dec 2022 15:07:55 +0100 + +npm (9.1.3~ds1-1) unstable; urgency=medium + + * Team upload + * Exclude ci-info from import + * Re-exclude chalk from import + * New upstream version 9.1.3~ds1 + * Add fix for node-chalk 5 + + -- Yadd Fri, 02 Dec 2022 16:40:14 +0100 + +npm (9.1.2~ds1-3) unstable; urgency=medium + + * Team upload + * Fix audit report + + -- Yadd Tue, 29 Nov 2022 06:39:29 +0100 + npm (9.1.2~ds1-2) unstable; urgency=medium * Team upload diff -Nru npm-9.1.2~ds1/debian/control npm-9.2.0~ds1/debian/control --- npm-9.1.2~ds1/debian/control 2022-11-18 10:04:33.000000000 +0000 +++ npm-9.2.0~ds1/debian/control 2022-12-11 14:01:18.000000000 +0000 @@ -43,22 +43,20 @@ , ca-certificates , node-abbrev , node-agent-base - , node-ansistyles , node-aproba , node-archy - , node-asap , node-base64-js , node-binary-extensions , node-cacache (>= 17) - , node-chalk + , node-chalk (>= 5.1.2-2~) , node-chownr + , node-ci-info , node-cli-table3 , node-colors , node-columnify , node-cssesc , node-debug , node-depd - , node-dezalgo , node-diff , node-emoji-regex , node-encoding diff -Nru npm-9.1.2~ds1/debian/copyright npm-9.2.0~ds1/debian/copyright --- npm-9.1.2~ds1/debian/copyright 2022-11-18 10:04:33.000000000 +0000 +++ npm-9.2.0~ds1/debian/copyright 2022-12-02 14:38:56.000000000 +0000 @@ -27,7 +27,9 @@ node_modules/brace-expansion node_modules/builtins node_modules/cacache + node_modules/chalk node_modules/chownr + node_modules/ci-info node_modules/clean-stack node_modules/cli-columns/node_modules node_modules/cli-table3 @@ -196,7 +198,6 @@ License: Expat Files: node_modules/env-paths/* - node_modules/chalk/* Copyright: Sindre Sorhus License: Expat diff -Nru npm-9.1.2~ds1/debian/gbp.conf npm-9.2.0~ds1/debian/gbp.conf --- npm-9.1.2~ds1/debian/gbp.conf 2022-11-18 10:04:33.000000000 +0000 +++ npm-9.2.0~ds1/debian/gbp.conf 2022-11-29 08:23:46.000000000 +0000 @@ -1,5 +1,3 @@ [DEFAULT] pristine-tar = True sign-tags = True -debian-branch = master-9 -upstream-branch = upstream-9 diff -Nru npm-9.1.2~ds1/debian/patches/fix-for-chalk-5.patch npm-9.2.0~ds1/debian/patches/fix-for-chalk-5.patch --- npm-9.1.2~ds1/debian/patches/fix-for-chalk-5.patch 1970-01-01 00:00:00.000000000 +0000 +++ npm-9.2.0~ds1/debian/patches/fix-for-chalk-5.patch 2022-12-02 15:23:18.000000000 +0000 @@ -0,0 +1,16 @@ +Description: fix for chalk 5 +Author: Yadd +Forwarded: not-needed +Last-Update: 2022-12-02 + +--- a/lib/npm.js ++++ b/lib/npm.js +@@ -352,7 +352,7 @@ + if (!this.color) { + level = 0 + } +- this.#chalk = new chalk.Instance({ level }) ++ this.#chalk = new chalk.Chalk({ level }) + } + return this.#chalk + } diff -Nru npm-9.1.2~ds1/debian/patches/series npm-9.2.0~ds1/debian/patches/series --- npm-9.1.2~ds1/debian/patches/series 2022-11-18 10:03:14.000000000 +0000 +++ npm-9.2.0~ds1/debian/patches/series 2022-12-02 15:22:49.000000000 +0000 @@ -3,3 +3,4 @@ #2020_reproducible_documentation_build.patch dont-check-for-last-version.patch drop-__proto__-in-tests.patch +fix-for-chalk-5.patch diff -Nru npm-9.1.2~ds1/debian/tests/pkg-js/test npm-9.2.0~ds1/debian/tests/pkg-js/test --- npm-9.1.2~ds1/debian/tests/pkg-js/test 2022-11-18 10:03:14.000000000 +0000 +++ npm-9.2.0~ds1/debian/tests/pkg-js/test 2022-12-04 16:51:09.000000000 +0000 @@ -1,11 +1,7 @@ if test "$AUTOPKGTEST_TMP" != ""; then mkdir -p node_modules/@npmcli ln -s ../../docs node_modules/@npmcli/ || true - rm -f test/lib/utils/npm-usage.js \ - test/lib/docs.js \ - test/lib/commands/audit.js \ - test/lib/commands/config.js \ - test/lib/commands/doctor.js \ + rm -f test/lib/commands/config.js \ test/lib/utils/error-message.js \ test/lib/utils/update-notifier.js fi diff -Nru npm-9.1.2~ds1/DEPENDENCIES.md npm-9.2.0~ds1/DEPENDENCIES.md --- npm-9.1.2~ds1/DEPENDENCIES.md 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/DEPENDENCIES.md 2022-12-07 23:13:18.000000000 +0000 @@ -20,6 +20,7 @@ libnpmaccess-->npm-package-arg; libnpmaccess-->npm-registry-fetch; libnpmaccess-->npmcli-eslint-config["@npmcli/eslint-config"]; + libnpmaccess-->npmcli-mock-registry["@npmcli/mock-registry"]; libnpmaccess-->npmcli-template-oss["@npmcli/template-oss"]; libnpmdiff-->npm-package-arg; libnpmdiff-->npmcli-arborist["@npmcli/arborist"]; @@ -33,6 +34,7 @@ libnpmexec-->npm-package-arg; libnpmexec-->npmcli-arborist["@npmcli/arborist"]; libnpmexec-->npmcli-eslint-config["@npmcli/eslint-config"]; + libnpmexec-->npmcli-mock-registry["@npmcli/mock-registry"]; libnpmexec-->npmcli-run-script["@npmcli/run-script"]; libnpmexec-->npmcli-template-oss["@npmcli/template-oss"]; libnpmexec-->npmlog; @@ -335,6 +337,7 @@ libnpmaccess-->npm-package-arg; libnpmaccess-->npm-registry-fetch; libnpmaccess-->npmcli-eslint-config["@npmcli/eslint-config"]; + libnpmaccess-->npmcli-mock-registry["@npmcli/mock-registry"]; libnpmaccess-->npmcli-template-oss["@npmcli/template-oss"]; libnpmaccess-->tap; libnpmdiff-->binary-extensions; @@ -352,11 +355,14 @@ libnpmexec-->bin-links; libnpmexec-->chalk; libnpmexec-->ci-info; + libnpmexec-->just-extend; + libnpmexec-->just-safe-set; libnpmexec-->minify-registry-metadata; libnpmexec-->mkdirp; libnpmexec-->npm-package-arg; libnpmexec-->npmcli-arborist["@npmcli/arborist"]; libnpmexec-->npmcli-eslint-config["@npmcli/eslint-config"]; + libnpmexec-->npmcli-mock-registry["@npmcli/mock-registry"]; libnpmexec-->npmcli-run-script["@npmcli/run-script"]; libnpmexec-->npmcli-template-oss["@npmcli/template-oss"]; libnpmexec-->npmlog; @@ -772,11 +778,11 @@ packages higher up the chain. - npm - - @npmcli/smoke-tests, libnpmpublish - - @npmcli/mock-registry, libnpmdiff, libnpmexec, libnpmfund, libnpmpack + - @npmcli/smoke-tests, libnpmaccess, libnpmexec, libnpmpublish + - @npmcli/mock-registry, libnpmdiff, libnpmfund, libnpmpack - @npmcli/arborist - @npmcli/metavuln-calculator - - pacote, libnpmaccess, libnpmhook, libnpmorg, libnpmsearch, libnpmteam, npm-profile + - pacote, libnpmhook, libnpmorg, libnpmsearch, libnpmteam, npm-profile - npm-registry-fetch, libnpmversion - @npmcli/git, make-fetch-happen, @npmcli/config, init-package-json - @npmcli/installed-package-contents, @npmcli/map-workspaces, cacache, npm-pick-manifest, @npmcli/run-script, read-package-json, promzard diff -Nru npm-9.1.2~ds1/docs/lib/content/commands/npm-doctor.md npm-9.2.0~ds1/docs/lib/content/commands/npm-doctor.md --- npm-9.1.2~ds1/docs/lib/content/commands/npm-doctor.md 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/docs/lib/content/commands/npm-doctor.md 2022-12-07 23:13:18.000000000 +0000 @@ -31,8 +31,10 @@ using old versions of npm. Since npm is constantly improving, running `npm@latest` is better than an old version. -`npm doctor` verifies the following items in your environment, and if there -are any recommended changes, it will display them. +`npm doctor` verifies the following items in your environment, and if +there are any recommended changes, it will display them. By default npm +runs all of these checks. You can limit what checks are ran by +specifying them as extra arguments. #### `npm ping` diff -Nru npm-9.1.2~ds1/docs/lib/content/commands/npm-exec.md npm-9.2.0~ds1/docs/lib/content/commands/npm-exec.md --- npm-9.1.2~ds1/docs/lib/content/commands/npm-exec.md 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/docs/lib/content/commands/npm-exec.md 2022-12-07 23:13:18.000000000 +0000 @@ -26,10 +26,11 @@ where all specified packages are available. If any requested packages are not present in the local project -dependencies, then they are installed to a folder in the npm cache, which -is added to the `PATH` environment variable in the executed process. A -prompt is printed (which can be suppressed by providing either `--yes` or -`--no`). +dependencies, then a prompt is printed, which can be suppressed by +providing either `--yes` or `--no`. When standard input is not a TTY or a +CI environment is detected, `--yes` is assumed. The requested packages are +installed to a folder in the npm cache, which is added to the `PATH` +environment variable in the executed process. Package names provided without a specifier will be matched with whatever version exists in the local project. Package names with a specifier will diff -Nru npm-9.1.2~ds1/docs/lib/content/using-npm/workspaces.md npm-9.2.0~ds1/docs/lib/content/using-npm/workspaces.md --- npm-9.1.2~ds1/docs/lib/content/using-npm/workspaces.md 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/docs/lib/content/using-npm/workspaces.md 2022-12-07 23:13:18.000000000 +0000 @@ -176,6 +176,11 @@ npm run test --workspace=a --workspace=b ``` +Or run the command for each workspace within the 'packages' folder: +``` +npm run test --workspace=packages +``` + It's also possible to use the `workspaces` (plural) configuration option to enable the same behavior but running that command in the context of **all** configured workspaces. e.g: diff -Nru npm-9.1.2~ds1/docs/package.json npm-9.2.0~ds1/docs/package.json --- npm-9.1.2~ds1/docs/package.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/docs/package.json 2022-12-07 23:13:18.000000000 +0000 @@ -22,17 +22,17 @@ "devDependencies": { "@isaacs/string-locale-compare": "^1.1.0", "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", + "@npmcli/template-oss": "4.11.0", "front-matter": "^4.0.2", "ignore-walk": "^6.0.0", - "jsdom": "^20.0.1", + "jsdom": "^20.0.3", "mkdirp": "^1.0.4", "rehype-stringify": "^9.0.3", "remark-gfm": "^3.0.1", "remark-man": "^8.0.1", "remark-parse": "^10.0.1", "remark-rehype": "^10.1.0", - "tap": "^16.0.1", + "tap": "^16.3.2", "unified": "^10.1.2", "yaml": "^2.1.3" }, @@ -56,7 +56,7 @@ "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", "ciVersions": "latest", "engines": "^14.17.0 || ^16.13.0 || >=18.0.0", - "version": "4.10.0", + "version": "4.11.0", "content": "../scripts/template-oss/index.js", "workspaceRepo": { "add": { diff -Nru npm-9.1.2~ds1/lib/commands/completion.js npm-9.2.0~ds1/lib/commands/completion.js --- npm-9.1.2~ds1/lib/commands/completion.js 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/lib/commands/completion.js 2022-12-07 23:13:18.000000000 +0000 @@ -54,7 +54,7 @@ class Completion extends BaseCommand { static description = 'Tab Completion for npm' static name = 'completion' - static ignoreImplicitWorkspace = false + static ignoreImplicitWorkspace = true // completion for the completion command async completion (opts) { diff -Nru npm-9.1.2~ds1/lib/commands/doctor.js npm-9.2.0~ds1/lib/commands/doctor.js --- npm-9.1.2~ds1/lib/commands/doctor.js 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/lib/commands/doctor.js 2022-12-07 23:13:18.000000000 +0000 @@ -1,14 +1,13 @@ const cacache = require('cacache') const fs = require('fs') const fetch = require('make-fetch-happen') -const table = require('text-table') +const Table = require('cli-table3') const which = require('which') const pacote = require('pacote') const { resolve } = require('path') const semver = require('semver') const { promisify } = require('util') const log = require('../utils/log-shim.js') -const ansiTrim = require('../utils/ansi-trim.js') const ping = require('../utils/ping.js') const { registry: { default: defaultRegistry }, @@ -17,6 +16,7 @@ const readdir = promisify(fs.readdir) const access = promisify(fs.access) const { R_OK, W_OK, X_OK } = fs.constants + const maskLabel = mask => { const label = [] if (mask & R_OK) { @@ -34,76 +34,105 @@ return label.join(', ') } +const subcommands = [ + { + groups: ['ping', 'registry'], + title: 'npm ping', + cmd: 'checkPing', + }, { + groups: ['versions'], + title: 'npm -v', + cmd: 'getLatestNpmVersion', + }, { + groups: ['versions'], + title: 'node -v', + cmd: 'getLatestNodejsVersion', + }, { + groups: ['registry'], + title: 'npm config get registry', + cmd: 'checkNpmRegistry', + }, { + groups: ['environment'], + title: 'git executable in PATH', + cmd: 'getGitPath', + }, { + groups: ['environment'], + title: 'global bin folder in PATH', + cmd: 'getBinPath', + }, { + groups: ['permissions', 'cache'], + title: 'Perms check on cached files', + cmd: 'checkCachePermission', + windows: false, + }, { + groups: ['permissions'], + title: 'Perms check on local node_modules', + cmd: 'checkLocalModulesPermission', + windows: false, + }, { + groups: ['permissions'], + title: 'Perms check on global node_modules', + cmd: 'checkGlobalModulesPermission', + windows: false, + }, { + groups: ['permissions'], + title: 'Perms check on local bin folder', + cmd: 'checkLocalBinPermission', + windows: false, + }, { + groups: ['permissions'], + title: 'Perms check on global bin folder', + cmd: 'checkGlobalBinPermission', + windows: false, + }, { + groups: ['cache'], + title: 'Verify cache contents', + cmd: 'verifyCachedFiles', + windows: false, + }, + // TODO: + // group === 'dependencies'? + // - ensure arborist.loadActual() runs without errors and no invalid edges + // - ensure package-lock.json matches loadActual() + // - verify loadActual without hidden lock file matches hidden lockfile + // group === '???' + // - verify all local packages have bins linked + // What is the fix for these? +] const BaseCommand = require('../base-command.js') class Doctor extends BaseCommand { static description = 'Check your npm environment' static name = 'doctor' static params = ['registry'] static ignoreImplicitWorkspace = false + static usage = [`[${subcommands.flatMap(s => s.groups) + .filter((value, index, self) => self.indexOf(value) === index) + .join('] [')}]`] + + static subcommands = subcommands + + // minimum width of check column, enough for the word `Check` + #checkWidth = 5 async exec (args) { log.info('Running checkup') + let allOk = true - // each message is [title, ok, message] - const messages = [] - - const actions = [ - ['npm ping', 'checkPing', []], - ['npm -v', 'getLatestNpmVersion', []], - ['node -v', 'getLatestNodejsVersion', []], - ['npm config get registry', 'checkNpmRegistry', []], - ['which git', 'getGitPath', []], - ...(process.platform === 'win32' - ? [] - : [ - [ - 'Perms check on cached files', - 'checkFilesPermission', - [this.npm.cache, true, R_OK], - ], [ - 'Perms check on local node_modules', - 'checkFilesPermission', - [this.npm.localDir, true, R_OK | W_OK, true], - ], [ - 'Perms check on global node_modules', - 'checkFilesPermission', - [this.npm.globalDir, false, R_OK], - ], [ - 'Perms check on local bin folder', - 'checkFilesPermission', - [this.npm.localBin, false, R_OK | W_OK | X_OK, true], - ], [ - 'Perms check on global bin folder', - 'checkFilesPermission', - [this.npm.globalBin, false, X_OK], - ], - ]), - [ - 'Verify cache contents', - 'verifyCachedFiles', - [this.npm.flatOptions.cache], - ], - // TODO: - // - ensure arborist.loadActual() runs without errors and no invalid edges - // - ensure package-lock.json matches loadActual() - // - verify loadActual without hidden lock file matches hidden lockfile - // - verify all local packages have bins linked - ] + const actions = this.actions(args) + this.#checkWidth = actions.reduce((length, item) => + Math.max(item.title.length, length), this.#checkWidth) + if (!this.npm.silent) { + this.output(['Check', 'Value', 'Recommendation/Notes'].map(h => this.npm.chalk.underline(h))) + } // Do the actual work - for (const [msg, fn, args] of actions) { - const line = [msg] + for (const { title, cmd } of actions) { + const item = [title] try { - line.push(true, await this[fn](...args)) - } catch (er) { - line.push(false, er) + item.push(true, await this[cmd]()) + } catch (err) { + item.push(false, err) } - messages.push(line) - } - - const outHead = ['Check', 'Value', 'Recommendation/Notes'].map(h => this.npm.chalk.underline(h)) - let allOk = true - const outBody = messages.map(item => { if (!item[1]) { allOk = false item[0] = this.npm.chalk.red(item[0]) @@ -112,18 +141,18 @@ } else { item[1] = this.npm.chalk.green('ok') } - return item - }) - const outTable = [outHead, ...outBody] - const tableOpts = { - stringLength: s => ansiTrim(s).length, + if (!this.npm.silent) { + this.output(item) + } } - if (!this.npm.silent) { - this.npm.output(table(outTable, tableOpts)) - } if (!allOk) { - throw new Error('Some problems found. See above for recommendations.') + if (this.npm.silent) { + /* eslint-disable-next-line max-len */ + throw new Error('Some problems found. Check logs or disable silent mode for recommendations.') + } else { + throw new Error('Some problems found. See above for recommendations.') + } } } @@ -191,6 +220,35 @@ } } + async getBinPath (dir) { + const tracker = log.newItem('getBinPath', 1) + tracker.info('getBinPath', 'Finding npm global bin in your PATH') + if (!process.env.PATH.includes(this.npm.globalBin)) { + throw new Error(`Add ${this.npm.globalBin} to your $PATH`) + } + return this.npm.globalBin + } + + async checkCachePermission () { + return this.checkFilesPermission(this.npm.cache, true, R_OK) + } + + async checkLocalModulesPermission () { + return this.checkFilesPermission(this.npm.localDir, true, R_OK | W_OK, true) + } + + async checkGlobalModulesPermission () { + return this.checkFilesPermission(this.npm.globalDir, false, R_OK) + } + + async checkLocalBinPermission () { + return this.checkFilesPermission(this.npm.localBin, false, R_OK | W_OK | X_OK, true) + } + + async checkGlobalBinPermission () { + return this.checkFilesPermission(this.npm.globalBin, false, X_OK) + } + async checkFilesPermission (root, shouldOwn, mask, missingOk) { let ok = true @@ -264,7 +322,7 @@ try { return await which('git').catch(er => { tracker.warn(er) - throw "Install git and ensure it's in your PATH." + throw new Error("Install git and ensure it's in your PATH.") }) } finally { tracker.finish() @@ -312,6 +370,42 @@ return `using default registry (${defaultRegistry})` } } + + output (row) { + const t = new Table({ + chars: { top: '', + 'top-mid': '', + 'top-left': '', + 'top-right': '', + bottom: '', + 'bottom-mid': '', + 'bottom-left': '', + 'bottom-right': '', + left: '', + 'left-mid': '', + mid: '', + 'mid-mid': '', + right: '', + 'right-mid': '', + middle: ' ' }, + style: { 'padding-left': 0, 'padding-right': 0 }, + colWidths: [this.#checkWidth, 6], + }) + t.push(row) + this.npm.output(t.toString()) + } + + actions (params) { + return this.constructor.subcommands.filter(subcmd => { + if (process.platform === 'win32' && subcmd.windows === false) { + return false + } + if (params.length) { + return params.some(param => subcmd.groups.includes(param)) + } + return true + }) + } } module.exports = Doctor diff -Nru npm-9.1.2~ds1/lib/utils/config/definitions.js npm-9.2.0~ds1/lib/utils/config/definitions.js --- npm-9.1.2~ds1/lib/utils/config/definitions.js 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/lib/utils/config/definitions.js 2022-12-07 23:13:18.000000000 +0000 @@ -441,7 +441,7 @@ description: ` The name of a continuous integration system. If not set explicitly, npm will detect the current CI environment using the - [\`ci-info\`](http://npm.im/@npmcli/ci-info) module. + [\`ci-info\`](http://npm.im/ci-info) module. `, flatten, }) diff -Nru npm-9.1.2~ds1/lib/utils/get-identity.js npm-9.2.0~ds1/lib/utils/get-identity.js --- npm-9.1.2~ds1/lib/utils/get-identity.js 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/lib/utils/get-identity.js 2022-12-07 23:13:18.000000000 +0000 @@ -12,7 +12,9 @@ // No username, but we have other credentials; fetch the username from registry if (creds.token || creds.certfile && creds.keyfile) { const registryData = await npmFetch.json('/-/whoami', { ...opts }) - return registryData.username + if (typeof registryData?.username === 'string') { + return registryData.username + } } // At this point, even if they have a credentials object, it doesn't have a diff -Nru npm-9.1.2~ds1/lib/utils/tar.js npm-9.2.0~ds1/lib/utils/tar.js --- npm-9.1.2~ds1/lib/utils/tar.js 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/lib/utils/tar.js 2022-12-07 23:13:18.000000000 +0000 @@ -120,7 +120,9 @@ unpackedSize: totalEntrySize, shasum, integrity: ssri.parse(integrity.sha512[0]), - filename: `${manifest.name}-${manifest.version}.tgz`, + // @scope/packagename.tgz => scope-packagename.tgz + // we can safely use these global replace rules due to npm package naming rules + filename: `${manifest.name.replace('@', '').replace('/', '-')}-${manifest.version}.tgz`, files: uppers.concat(others), entryCount: totalEntries, bundled: Array.from(bundled), diff -Nru npm-9.1.2~ds1/mock-registry/lib/index.js npm-9.2.0~ds1/mock-registry/lib/index.js --- npm-9.1.2~ds1/mock-registry/lib/index.js 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/mock-registry/lib/index.js 2022-12-07 23:13:18.000000000 +0000 @@ -10,6 +10,7 @@ #authorization #basic #debug + #strict constructor (opts) { if (!opts.registry) { @@ -19,20 +20,48 @@ this.#authorization = opts.authorization this.#basic = opts.basic this.#debug = opts.debug + this.#strict = opts.strict // Required for this.package this.#tap = opts.tap + if (this.#tap) { + this.startNock() + } } - static tnock (t, host, opts, { debug = false } = {}) { - if (debug) { - Nock.emitter.on('no match', req => console.error('NO MATCH', req.options)) + static tnock (t, host, opts, { debug = false, strict = false } = {}) { + const noMatch = (req) => { + if (strict) { + // There are network requests that get caught regardless of error code. + // Turning on strict mode requires that those requests get explicitly + // mocked with a 404, 500, etc. + // XXX: this is opt-in currently because it breaks some existing CLI + // tests. We should work towards making this the default for all tests. + t.fail(`Unmatched request: ${JSON.stringify(req.options, null, 2)}`) + } + if (debug) { + console.error('NO MATCH', t.name, req.options) + } } + + Nock.emitter.on('no match', noMatch) Nock.disableNetConnect() const server = Nock(host, opts) + + if (strict) { + // this requires that mocks not be shared between sub tests but it helps + // find mistakes quicker instead of waiting for the entire test to end + t.afterEach((t) => { + t.strictSame(server.pendingMocks(), [], 'no pending mocks after each') + t.strictSame(server.activeMocks(), [], 'no active mocks after each') + }) + } + t.teardown(() => { Nock.enableNetConnect() server.done() + Nock.emitter.off('no match', noMatch) }) + return server } @@ -41,24 +70,6 @@ } get nock () { - if (!this.#nock) { - if (!this.#tap) { - throw new Error('cannot mock packages without a tap fixture') - } - const reqheaders = {} - if (this.#authorization) { - reqheaders.authorization = `Bearer ${this.#authorization}` - } - if (this.#basic) { - reqheaders.authorization = `Basic ${this.#basic}` - } - this.#nock = MockRegistry.tnock( - this.#tap, - this.#registry, - { reqheaders }, - { debug: this.#debug } - ) - } return this.#nock } @@ -66,6 +77,31 @@ this.#nock = nock } + startNock () { + if (this.nock) { + return + } + + if (!this.#tap) { + throw new Error('cannot mock packages without a tap fixture') + } + + const reqheaders = {} + if (this.#authorization) { + reqheaders.authorization = `Bearer ${this.#authorization}` + } + if (this.#basic) { + reqheaders.authorization = `Basic ${this.#basic}` + } + + this.nock = MockRegistry.tnock( + this.#tap, + this.#registry, + { reqheaders }, + { debug: this.#debug, strict: this.#strict } + ) + } + search ({ responseCode = 200, results = [], error }) { // the flags, score, and searchScore parts of the response are never used // by npm, only package is used @@ -200,18 +236,22 @@ } // team can be a team or a username - getPackages ({ team, packages = {}, times = 1 }) { - if (team.startsWith('@')) { - team = team.slice(1) - } - const [scope, teamName] = team.split(':').map(encodeURIComponent) + getPackages ({ user, team, packages = {}, times = 1, responseCode = 200 }) { let uri - if (teamName) { - uri = `/-/team/${scope}/${teamName}/package` + if (user) { + uri = `/-/user/${user}/package` } else { - uri = `/-/org/${scope}/package` + if (team.startsWith('@')) { + team = team.slice(1) + } + const [scope, teamName] = team.split(':').map(encodeURIComponent) + if (teamName) { + uri = `/-/team/${scope}/${teamName}/package` + } else { + uri = `/-/org/${scope}/package` + } } - this.nock = this.nock.get(uri).times(times).reply(200, packages) + this.nock = this.nock.get(uri).times(times).reply(responseCode, packages) } getCollaborators ({ spec, collaborators = {} }) { @@ -296,13 +336,14 @@ manifest.users = users } for (const packument of packuments) { + const unscoped = name.includes('/') ? name.split('/')[1] : name manifest.versions[packument.version] = { _id: `${name}@${packument.version}`, name, description: 'test package mock manifest', dependencies: {}, dist: { - tarball: `${this.#registry}/${name}/-/${name}-${packument.version}.tgz`, + tarball: `${this.#registry}/${name}/-/${unscoped}-${packument.version}.tgz`, }, maintainers: [], ...packument, diff -Nru npm-9.1.2~ds1/mock-registry/package.json npm-9.2.0~ds1/mock-registry/package.json --- npm-9.1.2~ds1/mock-registry/package.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/mock-registry/package.json 2022-12-07 23:13:18.000000000 +0000 @@ -34,7 +34,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.10.0" + "version": "4.11.0" }, "tap": { "no-coverage": true, @@ -46,10 +46,10 @@ "devDependencies": { "@npmcli/arborist": "^6.1.1", "@npmcli/eslint-config": "^4.0.1", - "@npmcli/template-oss": "4.10.0", + "@npmcli/template-oss": "4.11.0", "nock": "^13.2.9", - "npm-package-arg": "^10.0.0", - "pacote": "^15.0.6", - "tap": "^16.3.0" + "npm-package-arg": "^10.1.0", + "pacote": "^15.0.7", + "tap": "^16.3.2" } } diff -Nru npm-9.1.2~ds1/node_modules/chalk/index.d.ts npm-9.2.0~ds1/node_modules/chalk/index.d.ts --- npm-9.1.2~ds1/node_modules/chalk/index.d.ts 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/chalk/index.d.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1,415 +0,0 @@ -/** -Basic foreground colors. - -[More colors here.](https://github.com/chalk/chalk/blob/master/readme.md#256-and-truecolor-color-support) -*/ -declare type ForegroundColor = - | 'black' - | 'red' - | 'green' - | 'yellow' - | 'blue' - | 'magenta' - | 'cyan' - | 'white' - | 'gray' - | 'grey' - | 'blackBright' - | 'redBright' - | 'greenBright' - | 'yellowBright' - | 'blueBright' - | 'magentaBright' - | 'cyanBright' - | 'whiteBright'; - -/** -Basic background colors. - -[More colors here.](https://github.com/chalk/chalk/blob/master/readme.md#256-and-truecolor-color-support) -*/ -declare type BackgroundColor = - | 'bgBlack' - | 'bgRed' - | 'bgGreen' - | 'bgYellow' - | 'bgBlue' - | 'bgMagenta' - | 'bgCyan' - | 'bgWhite' - | 'bgGray' - | 'bgGrey' - | 'bgBlackBright' - | 'bgRedBright' - | 'bgGreenBright' - | 'bgYellowBright' - | 'bgBlueBright' - | 'bgMagentaBright' - | 'bgCyanBright' - | 'bgWhiteBright'; - -/** -Basic colors. - -[More colors here.](https://github.com/chalk/chalk/blob/master/readme.md#256-and-truecolor-color-support) -*/ -declare type Color = ForegroundColor | BackgroundColor; - -declare type Modifiers = - | 'reset' - | 'bold' - | 'dim' - | 'italic' - | 'underline' - | 'inverse' - | 'hidden' - | 'strikethrough' - | 'visible'; - -declare namespace chalk { - /** - Levels: - - `0` - All colors disabled. - - `1` - Basic 16 colors support. - - `2` - ANSI 256 colors support. - - `3` - Truecolor 16 million colors support. - */ - type Level = 0 | 1 | 2 | 3; - - interface Options { - /** - Specify the color support for Chalk. - - By default, color support is automatically detected based on the environment. - - Levels: - - `0` - All colors disabled. - - `1` - Basic 16 colors support. - - `2` - ANSI 256 colors support. - - `3` - Truecolor 16 million colors support. - */ - level?: Level; - } - - /** - Return a new Chalk instance. - */ - type Instance = new (options?: Options) => Chalk; - - /** - Detect whether the terminal supports color. - */ - interface ColorSupport { - /** - The color level used by Chalk. - */ - level: Level; - - /** - Return whether Chalk supports basic 16 colors. - */ - hasBasic: boolean; - - /** - Return whether Chalk supports ANSI 256 colors. - */ - has256: boolean; - - /** - Return whether Chalk supports Truecolor 16 million colors. - */ - has16m: boolean; - } - - interface ChalkFunction { - /** - Use a template string. - - @remarks Template literals are unsupported for nested calls (see [issue #341](https://github.com/chalk/chalk/issues/341)) - - @example - ``` - import chalk = require('chalk'); - - log(chalk` - CPU: {red ${cpu.totalPercent}%} - RAM: {green ${ram.used / ram.total * 100}%} - DISK: {rgb(255,131,0) ${disk.used / disk.total * 100}%} - `); - ``` - - @example - ``` - import chalk = require('chalk'); - - log(chalk.red.bgBlack`2 + 3 = {bold ${2 + 3}}`) - ``` - */ - (text: TemplateStringsArray, ...placeholders: unknown[]): string; - - (...text: unknown[]): string; - } - - interface Chalk extends ChalkFunction { - /** - Return a new Chalk instance. - */ - Instance: Instance; - - /** - The color support for Chalk. - - By default, color support is automatically detected based on the environment. - - Levels: - - `0` - All colors disabled. - - `1` - Basic 16 colors support. - - `2` - ANSI 256 colors support. - - `3` - Truecolor 16 million colors support. - */ - level: Level; - - /** - Use HEX value to set text color. - - @param color - Hexadecimal value representing the desired color. - - @example - ``` - import chalk = require('chalk'); - - chalk.hex('#DEADED'); - ``` - */ - hex(color: string): Chalk; - - /** - Use keyword color value to set text color. - - @param color - Keyword value representing the desired color. - - @example - ``` - import chalk = require('chalk'); - - chalk.keyword('orange'); - ``` - */ - keyword(color: string): Chalk; - - /** - Use RGB values to set text color. - */ - rgb(red: number, green: number, blue: number): Chalk; - - /** - Use HSL values to set text color. - */ - hsl(hue: number, saturation: number, lightness: number): Chalk; - - /** - Use HSV values to set text color. - */ - hsv(hue: number, saturation: number, value: number): Chalk; - - /** - Use HWB values to set text color. - */ - hwb(hue: number, whiteness: number, blackness: number): Chalk; - - /** - Use a [Select/Set Graphic Rendition](https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters) (SGR) [color code number](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4_bit) to set text color. - - 30 <= code && code < 38 || 90 <= code && code < 98 - For example, 31 for red, 91 for redBright. - */ - ansi(code: number): Chalk; - - /** - Use a [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set text color. - */ - ansi256(index: number): Chalk; - - /** - Use HEX value to set background color. - - @param color - Hexadecimal value representing the desired color. - - @example - ``` - import chalk = require('chalk'); - - chalk.bgHex('#DEADED'); - ``` - */ - bgHex(color: string): Chalk; - - /** - Use keyword color value to set background color. - - @param color - Keyword value representing the desired color. - - @example - ``` - import chalk = require('chalk'); - - chalk.bgKeyword('orange'); - ``` - */ - bgKeyword(color: string): Chalk; - - /** - Use RGB values to set background color. - */ - bgRgb(red: number, green: number, blue: number): Chalk; - - /** - Use HSL values to set background color. - */ - bgHsl(hue: number, saturation: number, lightness: number): Chalk; - - /** - Use HSV values to set background color. - */ - bgHsv(hue: number, saturation: number, value: number): Chalk; - - /** - Use HWB values to set background color. - */ - bgHwb(hue: number, whiteness: number, blackness: number): Chalk; - - /** - Use a [Select/Set Graphic Rendition](https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters) (SGR) [color code number](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4_bit) to set background color. - - 30 <= code && code < 38 || 90 <= code && code < 98 - For example, 31 for red, 91 for redBright. - Use the foreground code, not the background code (for example, not 41, nor 101). - */ - bgAnsi(code: number): Chalk; - - /** - Use a [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set background color. - */ - bgAnsi256(index: number): Chalk; - - /** - Modifier: Resets the current color chain. - */ - readonly reset: Chalk; - - /** - Modifier: Make text bold. - */ - readonly bold: Chalk; - - /** - Modifier: Emitting only a small amount of light. - */ - readonly dim: Chalk; - - /** - Modifier: Make text italic. (Not widely supported) - */ - readonly italic: Chalk; - - /** - Modifier: Make text underline. (Not widely supported) - */ - readonly underline: Chalk; - - /** - Modifier: Inverse background and foreground colors. - */ - readonly inverse: Chalk; - - /** - Modifier: Prints the text, but makes it invisible. - */ - readonly hidden: Chalk; - - /** - Modifier: Puts a horizontal line through the center of the text. (Not widely supported) - */ - readonly strikethrough: Chalk; - - /** - Modifier: Prints the text only when Chalk has a color support level > 0. - Can be useful for things that are purely cosmetic. - */ - readonly visible: Chalk; - - readonly black: Chalk; - readonly red: Chalk; - readonly green: Chalk; - readonly yellow: Chalk; - readonly blue: Chalk; - readonly magenta: Chalk; - readonly cyan: Chalk; - readonly white: Chalk; - - /* - Alias for `blackBright`. - */ - readonly gray: Chalk; - - /* - Alias for `blackBright`. - */ - readonly grey: Chalk; - - readonly blackBright: Chalk; - readonly redBright: Chalk; - readonly greenBright: Chalk; - readonly yellowBright: Chalk; - readonly blueBright: Chalk; - readonly magentaBright: Chalk; - readonly cyanBright: Chalk; - readonly whiteBright: Chalk; - - readonly bgBlack: Chalk; - readonly bgRed: Chalk; - readonly bgGreen: Chalk; - readonly bgYellow: Chalk; - readonly bgBlue: Chalk; - readonly bgMagenta: Chalk; - readonly bgCyan: Chalk; - readonly bgWhite: Chalk; - - /* - Alias for `bgBlackBright`. - */ - readonly bgGray: Chalk; - - /* - Alias for `bgBlackBright`. - */ - readonly bgGrey: Chalk; - - readonly bgBlackBright: Chalk; - readonly bgRedBright: Chalk; - readonly bgGreenBright: Chalk; - readonly bgYellowBright: Chalk; - readonly bgBlueBright: Chalk; - readonly bgMagentaBright: Chalk; - readonly bgCyanBright: Chalk; - readonly bgWhiteBright: Chalk; - } -} - -/** -Main Chalk object that allows to chain styles together. -Call the last one as a method with a string argument. -Order doesn't matter, and later styles take precedent in case of a conflict. -This simply means that `chalk.red.yellow.green` is equivalent to `chalk.green`. -*/ -declare const chalk: chalk.Chalk & chalk.ChalkFunction & { - supportsColor: chalk.ColorSupport | false; - Level: chalk.Level; - Color: Color; - ForegroundColor: ForegroundColor; - BackgroundColor: BackgroundColor; - Modifiers: Modifiers; - stderr: chalk.Chalk & {supportsColor: chalk.ColorSupport | false}; -}; - -export = chalk; diff -Nru npm-9.1.2~ds1/node_modules/chalk/license npm-9.2.0~ds1/node_modules/chalk/license --- npm-9.1.2~ds1/node_modules/chalk/license 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/chalk/license 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff -Nru npm-9.1.2~ds1/node_modules/chalk/package.json npm-9.2.0~ds1/node_modules/chalk/package.json --- npm-9.1.2~ds1/node_modules/chalk/package.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/chalk/package.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,68 +0,0 @@ -{ - "name": "chalk", - "version": "4.1.2", - "description": "Terminal string styling done right", - "license": "MIT", - "repository": "chalk/chalk", - "funding": "https://github.com/chalk/chalk?sponsor=1", - "main": "source", - "engines": { - "node": ">=10" - }, - "scripts": { - "test": "xo && nyc ava && tsd", - "bench": "matcha benchmark.js" - }, - "files": [ - "source", - "index.d.ts" - ], - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "str", - "ansi", - "style", - "styles", - "tty", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "devDependencies": { - "ava": "^2.4.0", - "coveralls": "^3.0.7", - "execa": "^4.0.0", - "import-fresh": "^3.1.0", - "matcha": "^0.7.0", - "nyc": "^15.0.0", - "resolve-from": "^5.0.0", - "tsd": "^0.7.4", - "xo": "^0.28.2" - }, - "xo": { - "rules": { - "unicorn/prefer-string-slice": "off", - "unicorn/prefer-includes": "off", - "@typescript-eslint/member-ordering": "off", - "no-redeclare": "off", - "unicorn/string-content": "off", - "unicorn/better-regex": "off" - } - } -} diff -Nru npm-9.1.2~ds1/node_modules/chalk/source/index.js npm-9.2.0~ds1/node_modules/chalk/source/index.js --- npm-9.1.2~ds1/node_modules/chalk/source/index.js 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/chalk/source/index.js 1970-01-01 00:00:00.000000000 +0000 @@ -1,229 +0,0 @@ -'use strict'; -const ansiStyles = require('ansi-styles'); -const {stdout: stdoutColor, stderr: stderrColor} = require('supports-color'); -const { - stringReplaceAll, - stringEncaseCRLFWithFirstIndex -} = require('./util'); - -const {isArray} = Array; - -// `supportsColor.level` → `ansiStyles.color[name]` mapping -const levelMapping = [ - 'ansi', - 'ansi', - 'ansi256', - 'ansi16m' -]; - -const styles = Object.create(null); - -const applyOptions = (object, options = {}) => { - if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) { - throw new Error('The `level` option should be an integer from 0 to 3'); - } - - // Detect level if not set manually - const colorLevel = stdoutColor ? stdoutColor.level : 0; - object.level = options.level === undefined ? colorLevel : options.level; -}; - -class ChalkClass { - constructor(options) { - // eslint-disable-next-line no-constructor-return - return chalkFactory(options); - } -} - -const chalkFactory = options => { - const chalk = {}; - applyOptions(chalk, options); - - chalk.template = (...arguments_) => chalkTag(chalk.template, ...arguments_); - - Object.setPrototypeOf(chalk, Chalk.prototype); - Object.setPrototypeOf(chalk.template, chalk); - - chalk.template.constructor = () => { - throw new Error('`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.'); - }; - - chalk.template.Instance = ChalkClass; - - return chalk.template; -}; - -function Chalk(options) { - return chalkFactory(options); -} - -for (const [styleName, style] of Object.entries(ansiStyles)) { - styles[styleName] = { - get() { - const builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty); - Object.defineProperty(this, styleName, {value: builder}); - return builder; - } - }; -} - -styles.visible = { - get() { - const builder = createBuilder(this, this._styler, true); - Object.defineProperty(this, 'visible', {value: builder}); - return builder; - } -}; - -const usedModels = ['rgb', 'hex', 'keyword', 'hsl', 'hsv', 'hwb', 'ansi', 'ansi256']; - -for (const model of usedModels) { - styles[model] = { - get() { - const {level} = this; - return function (...arguments_) { - const styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler); - return createBuilder(this, styler, this._isEmpty); - }; - } - }; -} - -for (const model of usedModels) { - const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); - styles[bgModel] = { - get() { - const {level} = this; - return function (...arguments_) { - const styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler); - return createBuilder(this, styler, this._isEmpty); - }; - } - }; -} - -const proto = Object.defineProperties(() => {}, { - ...styles, - level: { - enumerable: true, - get() { - return this._generator.level; - }, - set(level) { - this._generator.level = level; - } - } -}); - -const createStyler = (open, close, parent) => { - let openAll; - let closeAll; - if (parent === undefined) { - openAll = open; - closeAll = close; - } else { - openAll = parent.openAll + open; - closeAll = close + parent.closeAll; - } - - return { - open, - close, - openAll, - closeAll, - parent - }; -}; - -const createBuilder = (self, _styler, _isEmpty) => { - const builder = (...arguments_) => { - if (isArray(arguments_[0]) && isArray(arguments_[0].raw)) { - // Called as a template literal, for example: chalk.red`2 + 3 = {bold ${2+3}}` - return applyStyle(builder, chalkTag(builder, ...arguments_)); - } - - // Single argument is hot path, implicit coercion is faster than anything - // eslint-disable-next-line no-implicit-coercion - return applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' ')); - }; - - // We alter the prototype because we must return a function, but there is - // no way to create a function with a different prototype - Object.setPrototypeOf(builder, proto); - - builder._generator = self; - builder._styler = _styler; - builder._isEmpty = _isEmpty; - - return builder; -}; - -const applyStyle = (self, string) => { - if (self.level <= 0 || !string) { - return self._isEmpty ? '' : string; - } - - let styler = self._styler; - - if (styler === undefined) { - return string; - } - - const {openAll, closeAll} = styler; - if (string.indexOf('\u001B') !== -1) { - while (styler !== undefined) { - // Replace any instances already present with a re-opening code - // otherwise only the part of the string until said closing code - // will be colored, and the rest will simply be 'plain'. - string = stringReplaceAll(string, styler.close, styler.open); - - styler = styler.parent; - } - } - - // We can move both next actions out of loop, because remaining actions in loop won't have - // any/visible effect on parts we add here. Close the styling before a linebreak and reopen - // after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92 - const lfIndex = string.indexOf('\n'); - if (lfIndex !== -1) { - string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex); - } - - return openAll + string + closeAll; -}; - -let template; -const chalkTag = (chalk, ...strings) => { - const [firstString] = strings; - - if (!isArray(firstString) || !isArray(firstString.raw)) { - // If chalk() was called by itself or with a string, - // return the string itself as a string. - return strings.join(' '); - } - - const arguments_ = strings.slice(1); - const parts = [firstString.raw[0]]; - - for (let i = 1; i < firstString.length; i++) { - parts.push( - String(arguments_[i - 1]).replace(/[{}\\]/g, '\\$&'), - String(firstString.raw[i]) - ); - } - - if (template === undefined) { - template = require('./templates'); - } - - return template(chalk, parts.join('')); -}; - -Object.defineProperties(Chalk.prototype, styles); - -const chalk = Chalk(); // eslint-disable-line new-cap -chalk.supportsColor = stdoutColor; -chalk.stderr = Chalk({level: stderrColor ? stderrColor.level : 0}); // eslint-disable-line new-cap -chalk.stderr.supportsColor = stderrColor; - -module.exports = chalk; diff -Nru npm-9.1.2~ds1/node_modules/chalk/source/templates.js npm-9.2.0~ds1/node_modules/chalk/source/templates.js --- npm-9.1.2~ds1/node_modules/chalk/source/templates.js 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/chalk/source/templates.js 1970-01-01 00:00:00.000000000 +0000 @@ -1,134 +0,0 @@ -'use strict'; -const TEMPLATE_REGEX = /(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi; -const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g; -const STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/; -const ESCAPE_REGEX = /\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi; - -const ESCAPES = new Map([ - ['n', '\n'], - ['r', '\r'], - ['t', '\t'], - ['b', '\b'], - ['f', '\f'], - ['v', '\v'], - ['0', '\0'], - ['\\', '\\'], - ['e', '\u001B'], - ['a', '\u0007'] -]); - -function unescape(c) { - const u = c[0] === 'u'; - const bracket = c[1] === '{'; - - if ((u && !bracket && c.length === 5) || (c[0] === 'x' && c.length === 3)) { - return String.fromCharCode(parseInt(c.slice(1), 16)); - } - - if (u && bracket) { - return String.fromCodePoint(parseInt(c.slice(2, -1), 16)); - } - - return ESCAPES.get(c) || c; -} - -function parseArguments(name, arguments_) { - const results = []; - const chunks = arguments_.trim().split(/\s*,\s*/g); - let matches; - - for (const chunk of chunks) { - const number = Number(chunk); - if (!Number.isNaN(number)) { - results.push(number); - } else if ((matches = chunk.match(STRING_REGEX))) { - results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, character) => escape ? unescape(escape) : character)); - } else { - throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`); - } - } - - return results; -} - -function parseStyle(style) { - STYLE_REGEX.lastIndex = 0; - - const results = []; - let matches; - - while ((matches = STYLE_REGEX.exec(style)) !== null) { - const name = matches[1]; - - if (matches[2]) { - const args = parseArguments(name, matches[2]); - results.push([name].concat(args)); - } else { - results.push([name]); - } - } - - return results; -} - -function buildStyle(chalk, styles) { - const enabled = {}; - - for (const layer of styles) { - for (const style of layer.styles) { - enabled[style[0]] = layer.inverse ? null : style.slice(1); - } - } - - let current = chalk; - for (const [styleName, styles] of Object.entries(enabled)) { - if (!Array.isArray(styles)) { - continue; - } - - if (!(styleName in current)) { - throw new Error(`Unknown Chalk style: ${styleName}`); - } - - current = styles.length > 0 ? current[styleName](...styles) : current[styleName]; - } - - return current; -} - -module.exports = (chalk, temporary) => { - const styles = []; - const chunks = []; - let chunk = []; - - // eslint-disable-next-line max-params - temporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => { - if (escapeCharacter) { - chunk.push(unescape(escapeCharacter)); - } else if (style) { - const string = chunk.join(''); - chunk = []; - chunks.push(styles.length === 0 ? string : buildStyle(chalk, styles)(string)); - styles.push({inverse, styles: parseStyle(style)}); - } else if (close) { - if (styles.length === 0) { - throw new Error('Found extraneous } in Chalk template literal'); - } - - chunks.push(buildStyle(chalk, styles)(chunk.join(''))); - chunk = []; - styles.pop(); - } else { - chunk.push(character); - } - }); - - chunks.push(chunk.join('')); - - if (styles.length > 0) { - const errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\`}\`)`; - throw new Error(errMessage); - } - - return chunks.join(''); -}; diff -Nru npm-9.1.2~ds1/node_modules/chalk/source/util.js npm-9.2.0~ds1/node_modules/chalk/source/util.js --- npm-9.1.2~ds1/node_modules/chalk/source/util.js 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/chalk/source/util.js 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -'use strict'; - -const stringReplaceAll = (string, substring, replacer) => { - let index = string.indexOf(substring); - if (index === -1) { - return string; - } - - const substringLength = substring.length; - let endIndex = 0; - let returnValue = ''; - do { - returnValue += string.substr(endIndex, index - endIndex) + substring + replacer; - endIndex = index + substringLength; - index = string.indexOf(substring, endIndex); - } while (index !== -1); - - returnValue += string.substr(endIndex); - return returnValue; -}; - -const stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => { - let endIndex = 0; - let returnValue = ''; - do { - const gotCR = string[index - 1] === '\r'; - returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? '\r\n' : '\n') + postfix; - endIndex = index + 1; - index = string.indexOf('\n', endIndex); - } while (index !== -1); - - returnValue += string.substr(endIndex); - return returnValue; -}; - -module.exports = { - stringReplaceAll, - stringEncaseCRLFWithFirstIndex -}; diff -Nru npm-9.1.2~ds1/node_modules/ci-info/index.d.ts npm-9.2.0~ds1/node_modules/ci-info/index.d.ts --- npm-9.1.2~ds1/node_modules/ci-info/index.d.ts 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/ci-info/index.d.ts 1970-01-01 00:00:00.000000000 +0000 @@ -1,70 +0,0 @@ -/** - * Returns a boolean. Will be `true` if the code is running on a CI server, - * otherwise `false`. - * - * Some CI servers not listed here might still trigger the `ci.isCI` - * boolean to be set to `true` if they use certain vendor neutral environment - * variables. In those cases `ci.name` will be `null` and no vendor specific - * boolean will be set to `true`. - */ -export const isCI: boolean; -/** - * Returns a boolean if PR detection is supported for the current CI server. - * Will be `true` if a PR is being tested, otherwise `false`. If PR detection is - * not supported for the current CI server, the value will be `null`. - */ -export const isPR: boolean | null; -/** - * Returns a string containing name of the CI server the code is running on. If - * CI server is not detected, it returns `null`. - * - * Don't depend on the value of this string not to change for a specific vendor. - * If you find your self writing `ci.name === 'Travis CI'`, you most likely want - * to use `ci.TRAVIS` instead. - */ -export const name: string | null; - -export const APPVEYOR: boolean; -export const AZURE_PIPELINES: boolean; -export const APPCIRCLE: boolean; -export const BAMBOO: boolean; -export const BITBUCKET: boolean; -export const BITRISE: boolean; -export const BUDDY: boolean; -export const BUILDKITE: boolean; -export const CIRCLE: boolean; -export const CIRRUS: boolean; -export const CODEBUILD: boolean; -export const CODEMAGIC: boolean; -export const CODEFRESH: boolean; -export const CODESHIP: boolean; -export const DRONE: boolean; -export const DSARI: boolean; -export const EAS: boolean; -export const GERRIT: boolean; -export const GITHUB_ACTIONS: boolean; -export const GITLAB: boolean; -export const GOCD: boolean; -export const GOOGLE_CLOUD_BUILD: boolean; -export const HEROKU: boolean; -export const HUDSON: boolean; -export const JENKINS: boolean; -export const LAYERCI: boolean; -export const MAGNUM: boolean; -export const NETLIFY: boolean; -export const NEVERCODE: boolean; -export const RENDER: boolean; -export const SAIL: boolean; -export const SEMAPHORE: boolean; -export const SCREWDRIVER: boolean; -export const SHIPPABLE: boolean; -export const SOLANO: boolean; -export const STRIDER: boolean; -export const TASKCLUSTER: boolean; -export const TEAMCITY: boolean; -export const TRAVIS: boolean; -export const VERCEL: boolean; -export const APPCENTER: boolean; -export const XCODE_CLOUD: boolean; -export const XCODE_SERVER: boolean; -export const WOODPECKER: boolean; diff -Nru npm-9.1.2~ds1/node_modules/ci-info/index.js npm-9.2.0~ds1/node_modules/ci-info/index.js --- npm-9.1.2~ds1/node_modules/ci-info/index.js 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/ci-info/index.js 1970-01-01 00:00:00.000000000 +0000 @@ -1,89 +0,0 @@ -'use strict' - -const vendors = require('./vendors.json') - -const env = process.env - -// Used for testing only -Object.defineProperty(exports, '_vendors', { - value: vendors.map(function (v) { - return v.constant - }) -}) - -exports.name = null -exports.isPR = null - -vendors.forEach(function (vendor) { - const envs = Array.isArray(vendor.env) ? vendor.env : [vendor.env] - const isCI = envs.every(function (obj) { - return checkEnv(obj) - }) - - exports[vendor.constant] = isCI - - if (!isCI) { - return - } - - exports.name = vendor.name - - switch (typeof vendor.pr) { - case 'string': - // "pr": "CIRRUS_PR" - exports.isPR = !!env[vendor.pr] - break - case 'object': - if ('env' in vendor.pr) { - // "pr": { "env": "BUILDKITE_PULL_REQUEST", "ne": "false" } - exports.isPR = vendor.pr.env in env && env[vendor.pr.env] !== vendor.pr.ne - } else if ('any' in vendor.pr) { - // "pr": { "any": ["ghprbPullId", "CHANGE_ID"] } - exports.isPR = vendor.pr.any.some(function (key) { - return !!env[key] - }) - } else { - // "pr": { "DRONE_BUILD_EVENT": "pull_request" } - exports.isPR = checkEnv(vendor.pr) - } - break - default: - // PR detection not supported for this vendor - exports.isPR = null - } -}) - -exports.isCI = !!( - env.BUILD_ID || // Jenkins, Cloudbees - env.BUILD_NUMBER || // Jenkins, TeamCity - env.CI || // Travis CI, CircleCI, Cirrus CI, Gitlab CI, Appveyor, CodeShip, dsari - env.CI_APP_ID || // Appflow - env.CI_BUILD_ID || // Appflow - env.CI_BUILD_NUMBER || // Appflow - env.CI_NAME || // Codeship and others - env.CONTINUOUS_INTEGRATION || // Travis CI, Cirrus CI - env.RUN_ID || // TaskCluster, dsari - exports.name || - false -) - -function checkEnv (obj) { - // "env": "CIRRUS" - if (typeof obj === 'string') return !!env[obj] - - // "env": { "env": "NODE", "includes": "/app/.heroku/node/bin/node" } - if ('env' in obj) { - // Currently there are no other types, uncomment when there are - // if ('includes' in obj) { - return env[obj.env] && env[obj.env].includes(obj.includes) - // } - } - if ('any' in obj) { - return obj.any.some(function (k) { - return !!env[k] - }) - } - return Object.keys(obj).every(function (k) { - return env[k] === obj[k] - }) -} diff -Nru npm-9.1.2~ds1/node_modules/ci-info/LICENSE npm-9.2.0~ds1/node_modules/ci-info/LICENSE --- npm-9.1.2~ds1/node_modules/ci-info/LICENSE 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/ci-info/LICENSE 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016-2021 Thomas Watson Steen - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff -Nru npm-9.1.2~ds1/node_modules/ci-info/package.json npm-9.2.0~ds1/node_modules/ci-info/package.json --- npm-9.1.2~ds1/node_modules/ci-info/package.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/ci-info/package.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -{ - "name": "ci-info", - "version": "3.6.1", - "description": "Get details about the current Continuous Integration environment", - "main": "index.js", - "typings": "index.d.ts", - "author": "Thomas Watson Steen (https://twitter.com/wa7son)", - "license": "MIT", - "repository": "https://github.com/watson/ci-info.git", - "bugs": "https://github.com/watson/ci-info/issues", - "homepage": "https://github.com/watson/ci-info", - "keywords": [ - "ci", - "continuous", - "integration", - "test", - "detect" - ], - "files": [ - "vendors.json", - "index.js", - "index.d.ts", - "CHANGELOG.md" - ], - "scripts": { - "lint:fix": "standard --fix", - "test": "standard && node test.js" - }, - "devDependencies": { - "clear-module": "^4.1.2", - "standard": "^17.0.0", - "tape": "^5.6.1" - }, - "engines": { - "node": ">=8" - } -} diff -Nru npm-9.1.2~ds1/node_modules/ci-info/vendors.json npm-9.2.0~ds1/node_modules/ci-info/vendors.json --- npm-9.1.2~ds1/node_modules/ci-info/vendors.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/ci-info/vendors.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,248 +0,0 @@ -[ - { - "name": "Appcircle", - "constant": "APPCIRCLE", - "env": "AC_APPCIRCLE" - }, - { - "name": "AppVeyor", - "constant": "APPVEYOR", - "env": "APPVEYOR", - "pr": "APPVEYOR_PULL_REQUEST_NUMBER" - }, - { - "name": "AWS CodeBuild", - "constant": "CODEBUILD", - "env": "CODEBUILD_BUILD_ARN" - }, - { - "name": "Azure Pipelines", - "constant": "AZURE_PIPELINES", - "env": "SYSTEM_TEAMFOUNDATIONCOLLECTIONURI", - "pr": "SYSTEM_PULLREQUEST_PULLREQUESTID" - }, - { - "name": "Bamboo", - "constant": "BAMBOO", - "env": "bamboo_planKey" - }, - { - "name": "Bitbucket Pipelines", - "constant": "BITBUCKET", - "env": "BITBUCKET_COMMIT", - "pr": "BITBUCKET_PR_ID" - }, - { - "name": "Bitrise", - "constant": "BITRISE", - "env": "BITRISE_IO", - "pr": "BITRISE_PULL_REQUEST" - }, - { - "name": "Buddy", - "constant": "BUDDY", - "env": "BUDDY_WORKSPACE_ID", - "pr": "BUDDY_EXECUTION_PULL_REQUEST_ID" - }, - { - "name": "Buildkite", - "constant": "BUILDKITE", - "env": "BUILDKITE", - "pr": { "env": "BUILDKITE_PULL_REQUEST", "ne": "false" } - }, - { - "name": "CircleCI", - "constant": "CIRCLE", - "env": "CIRCLECI", - "pr": "CIRCLE_PULL_REQUEST" - }, - { - "name": "Cirrus CI", - "constant": "CIRRUS", - "env": "CIRRUS_CI", - "pr": "CIRRUS_PR" - }, - { - "name": "Codefresh", - "constant": "CODEFRESH", - "env": "CF_BUILD_ID", - "pr": { "any": ["CF_PULL_REQUEST_NUMBER", "CF_PULL_REQUEST_ID"] } - }, - { - "name": "Codemagic", - "constant": "CODEMAGIC", - "env": "CM_BUILD_ID", - "pr": "CM_PULL_REQUEST" - }, - { - "name": "Codeship", - "constant": "CODESHIP", - "env": { "CI_NAME": "codeship" } - }, - { - "name": "Drone", - "constant": "DRONE", - "env": "DRONE", - "pr": { "DRONE_BUILD_EVENT": "pull_request" } - }, - { - "name": "dsari", - "constant": "DSARI", - "env": "DSARI" - }, - { - "name": "Expo Application Services", - "constant": "EAS", - "env": "EAS_BUILD" - }, - { - "name": "GitHub Actions", - "constant": "GITHUB_ACTIONS", - "env": "GITHUB_ACTIONS", - "pr": { "GITHUB_EVENT_NAME": "pull_request" } - }, - { - "name": "GitLab CI", - "constant": "GITLAB", - "env": "GITLAB_CI", - "pr": "CI_MERGE_REQUEST_ID" - }, - { - "name": "GoCD", - "constant": "GOCD", - "env": "GO_PIPELINE_LABEL" - }, - { - "name": "Google Cloud Build", - "constant": "GOOGLE_CLOUD_BUILD", - "env": "BUILDER_OUTPUT" - }, - { - "name": "LayerCI", - "constant": "LAYERCI", - "env": "LAYERCI", - "pr": "LAYERCI_PULL_REQUEST" - }, - { - "name": "Gerrit", - "constant": "GERRIT", - "env": "GERRIT_PROJECT" - }, - { - "name": "Heroku", - "constant": "HEROKU", - "env": { "env": "NODE", "includes": "/app/.heroku/node/bin/node" } - }, - { - "name": "Hudson", - "constant": "HUDSON", - "env": "HUDSON_URL" - }, - { - "name": "Jenkins", - "constant": "JENKINS", - "env": ["JENKINS_URL", "BUILD_ID"], - "pr": { "any": ["ghprbPullId", "CHANGE_ID"] } - }, - { - "name": "Magnum CI", - "constant": "MAGNUM", - "env": "MAGNUM" - }, - { - "name": "Netlify CI", - "constant": "NETLIFY", - "env": "NETLIFY", - "pr": { "env": "PULL_REQUEST", "ne": "false" } - }, - { - "name": "Nevercode", - "constant": "NEVERCODE", - "env": "NEVERCODE", - "pr": { "env": "NEVERCODE_PULL_REQUEST", "ne": "false" } - }, - { - "name": "Render", - "constant": "RENDER", - "env": "RENDER", - "pr": { "IS_PULL_REQUEST": "true" } - }, - { - "name": "Sail CI", - "constant": "SAIL", - "env": "SAILCI", - "pr": "SAIL_PULL_REQUEST_NUMBER" - }, - { - "name": "Screwdriver", - "constant": "SCREWDRIVER", - "env": "SCREWDRIVER", - "pr": { "env": "SD_PULL_REQUEST", "ne": "false" } - }, - { - "name": "Semaphore", - "constant": "SEMAPHORE", - "env": "SEMAPHORE", - "pr": "PULL_REQUEST_NUMBER" - }, - { - "name": "Shippable", - "constant": "SHIPPABLE", - "env": "SHIPPABLE", - "pr": { "IS_PULL_REQUEST": "true" } - }, - { - "name": "Solano CI", - "constant": "SOLANO", - "env": "TDDIUM", - "pr": "TDDIUM_PR_ID" - }, - { - "name": "Strider CD", - "constant": "STRIDER", - "env": "STRIDER" - }, - { - "name": "TaskCluster", - "constant": "TASKCLUSTER", - "env": ["TASK_ID", "RUN_ID"] - }, - { - "name": "TeamCity", - "constant": "TEAMCITY", - "env": "TEAMCITY_VERSION" - }, - { - "name": "Travis CI", - "constant": "TRAVIS", - "env": "TRAVIS", - "pr": { "env": "TRAVIS_PULL_REQUEST", "ne": "false" } - }, - { - "name": "Vercel", - "constant": "VERCEL", - "env": { "any": ["NOW_BUILDER", "VERCEL_URL"] } - }, - { - "name": "Visual Studio App Center", - "constant": "APPCENTER", - "env": "APPCENTER_BUILD_ID" - }, - { - "name": "Woodpecker", - "constant": "WOODPECKER", - "env": { "CI": "woodpecker" }, - "pr": { "CI_BUILD_EVENT": "pull_request" } - }, - { - "name": "Xcode Cloud", - "constant": "XCODE_CLOUD", - "env": "CI_XCODE_PROJECT", - "pr": "CI_PULL_REQUEST_NUMBER" - }, - { - "name": "Xcode Server", - "constant": "XCODE_SERVER", - "env": "XCS" - } -] diff -Nru npm-9.1.2~ds1/node_modules/fs-minipass/node_modules/minipass/index.d.ts npm-9.2.0~ds1/node_modules/fs-minipass/node_modules/minipass/index.d.ts --- npm-9.1.2~ds1/node_modules/fs-minipass/node_modules/minipass/index.d.ts 1970-01-01 00:00:00.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/fs-minipass/node_modules/minipass/index.d.ts 2022-12-07 23:13:18.000000000 +0000 @@ -0,0 +1,155 @@ +/// +import { EventEmitter } from 'events' +import { Stream } from 'stream' + +declare namespace Minipass { + type Encoding = BufferEncoding | 'buffer' | null + + interface Writable extends EventEmitter { + end(): any + write(chunk: any, ...args: any[]): any + } + + interface Readable extends EventEmitter { + pause(): any + resume(): any + pipe(): any + } + + interface Pipe { + src: Minipass + dest: Writable + opts: PipeOptions + } + + type DualIterable = Iterable & AsyncIterable + + type ContiguousData = Buffer | ArrayBufferLike | ArrayBufferView | string + + type BufferOrString = Buffer | string + + interface StringOptions { + encoding: BufferEncoding + objectMode?: boolean + async?: boolean + } + + interface BufferOptions { + encoding?: null | 'buffer' + objectMode?: boolean + async?: boolean + } + + interface ObjectModeOptions { + objectMode: true + async?: boolean + } + + interface PipeOptions { + end?: boolean + proxyErrors?: boolean + } + + type Options = T extends string + ? StringOptions + : T extends Buffer + ? BufferOptions + : ObjectModeOptions +} + +declare class Minipass< + RType extends any = Buffer, + WType extends any = RType extends Minipass.BufferOrString + ? Minipass.ContiguousData + : RType + > + extends Stream + implements Minipass.DualIterable +{ + static isStream(stream: any): stream is Minipass.Readable | Minipass.Writable + + readonly bufferLength: number + readonly flowing: boolean + readonly writable: boolean + readonly readable: boolean + readonly paused: boolean + readonly emittedEnd: boolean + readonly destroyed: boolean + + /** + * Not technically private or readonly, but not safe to mutate. + */ + private readonly buffer: RType[] + private readonly pipes: Minipass.Pipe[] + + /** + * Technically writable, but mutating it can change the type, + * so is not safe to do in TypeScript. + */ + readonly objectMode: boolean + async: boolean + + /** + * Note: encoding is not actually read-only, and setEncoding(enc) + * exists. However, this type definition will insist that TypeScript + * programs declare the type of a Minipass stream up front, and if + * that type is string, then an encoding MUST be set in the ctor. If + * the type is Buffer, then the encoding must be missing, or set to + * 'buffer' or null. If the type is anything else, then objectMode + * must be set in the constructor options. So there is effectively + * no allowed way that a TS program can set the encoding after + * construction, as doing so will destroy any hope of type safety. + * TypeScript does not provide many options for changing the type of + * an object at run-time, which is what changing the encoding does. + */ + readonly encoding: Minipass.Encoding + // setEncoding(encoding: Encoding): void + + // Options required if not reading buffers + constructor( + ...args: RType extends Buffer + ? [] | [Minipass.Options] + : [Minipass.Options] + ) + + write(chunk: WType, cb?: () => void): boolean + write(chunk: WType, encoding?: Minipass.Encoding, cb?: () => void): boolean + read(size?: number): RType + end(cb?: () => void): this + end(chunk: any, cb?: () => void): this + end(chunk: any, encoding?: Minipass.Encoding, cb?: () => void): this + pause(): void + resume(): void + promise(): Promise + collect(): Promise + + concat(): RType extends Minipass.BufferOrString ? Promise : never + destroy(er?: any): void + pipe(dest: W, opts?: Minipass.PipeOptions): W + unpipe(dest: W): void + + /** + * alias for on() + */ + addEventHandler(event: string, listener: (...args: any[]) => any): this + + on(event: string, listener: (...args: any[]) => any): this + on(event: 'data', listener: (chunk: RType) => any): this + on(event: 'error', listener: (error: any) => any): this + on( + event: + | 'readable' + | 'drain' + | 'resume' + | 'end' + | 'prefinish' + | 'finish' + | 'close', + listener: () => any + ): this + + [Symbol.iterator](): Iterator + [Symbol.asyncIterator](): AsyncIterator +} + +export = Minipass diff -Nru npm-9.1.2~ds1/node_modules/fs-minipass/node_modules/minipass/index.js npm-9.2.0~ds1/node_modules/fs-minipass/node_modules/minipass/index.js --- npm-9.1.2~ds1/node_modules/fs-minipass/node_modules/minipass/index.js 1970-01-01 00:00:00.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/fs-minipass/node_modules/minipass/index.js 2022-12-07 23:13:18.000000000 +0000 @@ -0,0 +1,649 @@ +'use strict' +const proc = typeof process === 'object' && process ? process : { + stdout: null, + stderr: null, +} +const EE = require('events') +const Stream = require('stream') +const SD = require('string_decoder').StringDecoder + +const EOF = Symbol('EOF') +const MAYBE_EMIT_END = Symbol('maybeEmitEnd') +const EMITTED_END = Symbol('emittedEnd') +const EMITTING_END = Symbol('emittingEnd') +const EMITTED_ERROR = Symbol('emittedError') +const CLOSED = Symbol('closed') +const READ = Symbol('read') +const FLUSH = Symbol('flush') +const FLUSHCHUNK = Symbol('flushChunk') +const ENCODING = Symbol('encoding') +const DECODER = Symbol('decoder') +const FLOWING = Symbol('flowing') +const PAUSED = Symbol('paused') +const RESUME = Symbol('resume') +const BUFFERLENGTH = Symbol('bufferLength') +const BUFFERPUSH = Symbol('bufferPush') +const BUFFERSHIFT = Symbol('bufferShift') +const OBJECTMODE = Symbol('objectMode') +const DESTROYED = Symbol('destroyed') +const EMITDATA = Symbol('emitData') +const EMITEND = Symbol('emitEnd') +const EMITEND2 = Symbol('emitEnd2') +const ASYNC = Symbol('async') + +const defer = fn => Promise.resolve().then(fn) + +// TODO remove when Node v8 support drops +const doIter = global._MP_NO_ITERATOR_SYMBOLS_ !== '1' +const ASYNCITERATOR = doIter && Symbol.asyncIterator + || Symbol('asyncIterator not implemented') +const ITERATOR = doIter && Symbol.iterator + || Symbol('iterator not implemented') + +// events that mean 'the stream is over' +// these are treated specially, and re-emitted +// if they are listened for after emitting. +const isEndish = ev => + ev === 'end' || + ev === 'finish' || + ev === 'prefinish' + +const isArrayBuffer = b => b instanceof ArrayBuffer || + typeof b === 'object' && + b.constructor && + b.constructor.name === 'ArrayBuffer' && + b.byteLength >= 0 + +const isArrayBufferView = b => !Buffer.isBuffer(b) && ArrayBuffer.isView(b) + +class Pipe { + constructor (src, dest, opts) { + this.src = src + this.dest = dest + this.opts = opts + this.ondrain = () => src[RESUME]() + dest.on('drain', this.ondrain) + } + unpipe () { + this.dest.removeListener('drain', this.ondrain) + } + // istanbul ignore next - only here for the prototype + proxyErrors () {} + end () { + this.unpipe() + if (this.opts.end) + this.dest.end() + } +} + +class PipeProxyErrors extends Pipe { + unpipe () { + this.src.removeListener('error', this.proxyErrors) + super.unpipe() + } + constructor (src, dest, opts) { + super(src, dest, opts) + this.proxyErrors = er => dest.emit('error', er) + src.on('error', this.proxyErrors) + } +} + +module.exports = class Minipass extends Stream { + constructor (options) { + super() + this[FLOWING] = false + // whether we're explicitly paused + this[PAUSED] = false + this.pipes = [] + this.buffer = [] + this[OBJECTMODE] = options && options.objectMode || false + if (this[OBJECTMODE]) + this[ENCODING] = null + else + this[ENCODING] = options && options.encoding || null + if (this[ENCODING] === 'buffer') + this[ENCODING] = null + this[ASYNC] = options && !!options.async || false + this[DECODER] = this[ENCODING] ? new SD(this[ENCODING]) : null + this[EOF] = false + this[EMITTED_END] = false + this[EMITTING_END] = false + this[CLOSED] = false + this[EMITTED_ERROR] = null + this.writable = true + this.readable = true + this[BUFFERLENGTH] = 0 + this[DESTROYED] = false + } + + get bufferLength () { return this[BUFFERLENGTH] } + + get encoding () { return this[ENCODING] } + set encoding (enc) { + if (this[OBJECTMODE]) + throw new Error('cannot set encoding in objectMode') + + if (this[ENCODING] && enc !== this[ENCODING] && + (this[DECODER] && this[DECODER].lastNeed || this[BUFFERLENGTH])) + throw new Error('cannot change encoding') + + if (this[ENCODING] !== enc) { + this[DECODER] = enc ? new SD(enc) : null + if (this.buffer.length) + this.buffer = this.buffer.map(chunk => this[DECODER].write(chunk)) + } + + this[ENCODING] = enc + } + + setEncoding (enc) { + this.encoding = enc + } + + get objectMode () { return this[OBJECTMODE] } + set objectMode (om) { this[OBJECTMODE] = this[OBJECTMODE] || !!om } + + get ['async'] () { return this[ASYNC] } + set ['async'] (a) { this[ASYNC] = this[ASYNC] || !!a } + + write (chunk, encoding, cb) { + if (this[EOF]) + throw new Error('write after end') + + if (this[DESTROYED]) { + this.emit('error', Object.assign( + new Error('Cannot call write after a stream was destroyed'), + { code: 'ERR_STREAM_DESTROYED' } + )) + return true + } + + if (typeof encoding === 'function') + cb = encoding, encoding = 'utf8' + + if (!encoding) + encoding = 'utf8' + + const fn = this[ASYNC] ? defer : f => f() + + // convert array buffers and typed array views into buffers + // at some point in the future, we may want to do the opposite! + // leave strings and buffers as-is + // anything else switches us into object mode + if (!this[OBJECTMODE] && !Buffer.isBuffer(chunk)) { + if (isArrayBufferView(chunk)) + chunk = Buffer.from(chunk.buffer, chunk.byteOffset, chunk.byteLength) + else if (isArrayBuffer(chunk)) + chunk = Buffer.from(chunk) + else if (typeof chunk !== 'string') + // use the setter so we throw if we have encoding set + this.objectMode = true + } + + // handle object mode up front, since it's simpler + // this yields better performance, fewer checks later. + if (this[OBJECTMODE]) { + /* istanbul ignore if - maybe impossible? */ + if (this.flowing && this[BUFFERLENGTH] !== 0) + this[FLUSH](true) + + if (this.flowing) + this.emit('data', chunk) + else + this[BUFFERPUSH](chunk) + + if (this[BUFFERLENGTH] !== 0) + this.emit('readable') + + if (cb) + fn(cb) + + return this.flowing + } + + // at this point the chunk is a buffer or string + // don't buffer it up or send it to the decoder + if (!chunk.length) { + if (this[BUFFERLENGTH] !== 0) + this.emit('readable') + if (cb) + fn(cb) + return this.flowing + } + + // fast-path writing strings of same encoding to a stream with + // an empty buffer, skipping the buffer/decoder dance + if (typeof chunk === 'string' && + // unless it is a string already ready for us to use + !(encoding === this[ENCODING] && !this[DECODER].lastNeed)) { + chunk = Buffer.from(chunk, encoding) + } + + if (Buffer.isBuffer(chunk) && this[ENCODING]) + chunk = this[DECODER].write(chunk) + + // Note: flushing CAN potentially switch us into not-flowing mode + if (this.flowing && this[BUFFERLENGTH] !== 0) + this[FLUSH](true) + + if (this.flowing) + this.emit('data', chunk) + else + this[BUFFERPUSH](chunk) + + if (this[BUFFERLENGTH] !== 0) + this.emit('readable') + + if (cb) + fn(cb) + + return this.flowing + } + + read (n) { + if (this[DESTROYED]) + return null + + if (this[BUFFERLENGTH] === 0 || n === 0 || n > this[BUFFERLENGTH]) { + this[MAYBE_EMIT_END]() + return null + } + + if (this[OBJECTMODE]) + n = null + + if (this.buffer.length > 1 && !this[OBJECTMODE]) { + if (this.encoding) + this.buffer = [this.buffer.join('')] + else + this.buffer = [Buffer.concat(this.buffer, this[BUFFERLENGTH])] + } + + const ret = this[READ](n || null, this.buffer[0]) + this[MAYBE_EMIT_END]() + return ret + } + + [READ] (n, chunk) { + if (n === chunk.length || n === null) + this[BUFFERSHIFT]() + else { + this.buffer[0] = chunk.slice(n) + chunk = chunk.slice(0, n) + this[BUFFERLENGTH] -= n + } + + this.emit('data', chunk) + + if (!this.buffer.length && !this[EOF]) + this.emit('drain') + + return chunk + } + + end (chunk, encoding, cb) { + if (typeof chunk === 'function') + cb = chunk, chunk = null + if (typeof encoding === 'function') + cb = encoding, encoding = 'utf8' + if (chunk) + this.write(chunk, encoding) + if (cb) + this.once('end', cb) + this[EOF] = true + this.writable = false + + // if we haven't written anything, then go ahead and emit, + // even if we're not reading. + // we'll re-emit if a new 'end' listener is added anyway. + // This makes MP more suitable to write-only use cases. + if (this.flowing || !this[PAUSED]) + this[MAYBE_EMIT_END]() + return this + } + + // don't let the internal resume be overwritten + [RESUME] () { + if (this[DESTROYED]) + return + + this[PAUSED] = false + this[FLOWING] = true + this.emit('resume') + if (this.buffer.length) + this[FLUSH]() + else if (this[EOF]) + this[MAYBE_EMIT_END]() + else + this.emit('drain') + } + + resume () { + return this[RESUME]() + } + + pause () { + this[FLOWING] = false + this[PAUSED] = true + } + + get destroyed () { + return this[DESTROYED] + } + + get flowing () { + return this[FLOWING] + } + + get paused () { + return this[PAUSED] + } + + [BUFFERPUSH] (chunk) { + if (this[OBJECTMODE]) + this[BUFFERLENGTH] += 1 + else + this[BUFFERLENGTH] += chunk.length + this.buffer.push(chunk) + } + + [BUFFERSHIFT] () { + if (this.buffer.length) { + if (this[OBJECTMODE]) + this[BUFFERLENGTH] -= 1 + else + this[BUFFERLENGTH] -= this.buffer[0].length + } + return this.buffer.shift() + } + + [FLUSH] (noDrain) { + do {} while (this[FLUSHCHUNK](this[BUFFERSHIFT]())) + + if (!noDrain && !this.buffer.length && !this[EOF]) + this.emit('drain') + } + + [FLUSHCHUNK] (chunk) { + return chunk ? (this.emit('data', chunk), this.flowing) : false + } + + pipe (dest, opts) { + if (this[DESTROYED]) + return + + const ended = this[EMITTED_END] + opts = opts || {} + if (dest === proc.stdout || dest === proc.stderr) + opts.end = false + else + opts.end = opts.end !== false + opts.proxyErrors = !!opts.proxyErrors + + // piping an ended stream ends immediately + if (ended) { + if (opts.end) + dest.end() + } else { + this.pipes.push(!opts.proxyErrors ? new Pipe(this, dest, opts) + : new PipeProxyErrors(this, dest, opts)) + if (this[ASYNC]) + defer(() => this[RESUME]()) + else + this[RESUME]() + } + + return dest + } + + unpipe (dest) { + const p = this.pipes.find(p => p.dest === dest) + if (p) { + this.pipes.splice(this.pipes.indexOf(p), 1) + p.unpipe() + } + } + + addListener (ev, fn) { + return this.on(ev, fn) + } + + on (ev, fn) { + const ret = super.on(ev, fn) + if (ev === 'data' && !this.pipes.length && !this.flowing) + this[RESUME]() + else if (ev === 'readable' && this[BUFFERLENGTH] !== 0) + super.emit('readable') + else if (isEndish(ev) && this[EMITTED_END]) { + super.emit(ev) + this.removeAllListeners(ev) + } else if (ev === 'error' && this[EMITTED_ERROR]) { + if (this[ASYNC]) + defer(() => fn.call(this, this[EMITTED_ERROR])) + else + fn.call(this, this[EMITTED_ERROR]) + } + return ret + } + + get emittedEnd () { + return this[EMITTED_END] + } + + [MAYBE_EMIT_END] () { + if (!this[EMITTING_END] && + !this[EMITTED_END] && + !this[DESTROYED] && + this.buffer.length === 0 && + this[EOF]) { + this[EMITTING_END] = true + this.emit('end') + this.emit('prefinish') + this.emit('finish') + if (this[CLOSED]) + this.emit('close') + this[EMITTING_END] = false + } + } + + emit (ev, data, ...extra) { + // error and close are only events allowed after calling destroy() + if (ev !== 'error' && ev !== 'close' && ev !== DESTROYED && this[DESTROYED]) + return + else if (ev === 'data') { + return !data ? false + : this[ASYNC] ? defer(() => this[EMITDATA](data)) + : this[EMITDATA](data) + } else if (ev === 'end') { + return this[EMITEND]() + } else if (ev === 'close') { + this[CLOSED] = true + // don't emit close before 'end' and 'finish' + if (!this[EMITTED_END] && !this[DESTROYED]) + return + const ret = super.emit('close') + this.removeAllListeners('close') + return ret + } else if (ev === 'error') { + this[EMITTED_ERROR] = data + const ret = super.emit('error', data) + this[MAYBE_EMIT_END]() + return ret + } else if (ev === 'resume') { + const ret = super.emit('resume') + this[MAYBE_EMIT_END]() + return ret + } else if (ev === 'finish' || ev === 'prefinish') { + const ret = super.emit(ev) + this.removeAllListeners(ev) + return ret + } + + // Some other unknown event + const ret = super.emit(ev, data, ...extra) + this[MAYBE_EMIT_END]() + return ret + } + + [EMITDATA] (data) { + for (const p of this.pipes) { + if (p.dest.write(data) === false) + this.pause() + } + const ret = super.emit('data', data) + this[MAYBE_EMIT_END]() + return ret + } + + [EMITEND] () { + if (this[EMITTED_END]) + return + + this[EMITTED_END] = true + this.readable = false + if (this[ASYNC]) + defer(() => this[EMITEND2]()) + else + this[EMITEND2]() + } + + [EMITEND2] () { + if (this[DECODER]) { + const data = this[DECODER].end() + if (data) { + for (const p of this.pipes) { + p.dest.write(data) + } + super.emit('data', data) + } + } + + for (const p of this.pipes) { + p.end() + } + const ret = super.emit('end') + this.removeAllListeners('end') + return ret + } + + // const all = await stream.collect() + collect () { + const buf = [] + if (!this[OBJECTMODE]) + buf.dataLength = 0 + // set the promise first, in case an error is raised + // by triggering the flow here. + const p = this.promise() + this.on('data', c => { + buf.push(c) + if (!this[OBJECTMODE]) + buf.dataLength += c.length + }) + return p.then(() => buf) + } + + // const data = await stream.concat() + concat () { + return this[OBJECTMODE] + ? Promise.reject(new Error('cannot concat in objectMode')) + : this.collect().then(buf => + this[OBJECTMODE] + ? Promise.reject(new Error('cannot concat in objectMode')) + : this[ENCODING] ? buf.join('') : Buffer.concat(buf, buf.dataLength)) + } + + // stream.promise().then(() => done, er => emitted error) + promise () { + return new Promise((resolve, reject) => { + this.on(DESTROYED, () => reject(new Error('stream destroyed'))) + this.on('error', er => reject(er)) + this.on('end', () => resolve()) + }) + } + + // for await (let chunk of stream) + [ASYNCITERATOR] () { + const next = () => { + const res = this.read() + if (res !== null) + return Promise.resolve({ done: false, value: res }) + + if (this[EOF]) + return Promise.resolve({ done: true }) + + let resolve = null + let reject = null + const onerr = er => { + this.removeListener('data', ondata) + this.removeListener('end', onend) + reject(er) + } + const ondata = value => { + this.removeListener('error', onerr) + this.removeListener('end', onend) + this.pause() + resolve({ value: value, done: !!this[EOF] }) + } + const onend = () => { + this.removeListener('error', onerr) + this.removeListener('data', ondata) + resolve({ done: true }) + } + const ondestroy = () => onerr(new Error('stream destroyed')) + return new Promise((res, rej) => { + reject = rej + resolve = res + this.once(DESTROYED, ondestroy) + this.once('error', onerr) + this.once('end', onend) + this.once('data', ondata) + }) + } + + return { next } + } + + // for (let chunk of stream) + [ITERATOR] () { + const next = () => { + const value = this.read() + const done = value === null + return { value, done } + } + return { next } + } + + destroy (er) { + if (this[DESTROYED]) { + if (er) + this.emit('error', er) + else + this.emit(DESTROYED) + return this + } + + this[DESTROYED] = true + + // throw away all buffered data, it's never coming out + this.buffer.length = 0 + this[BUFFERLENGTH] = 0 + + if (typeof this.close === 'function' && !this[CLOSED]) + this.close() + + if (er) + this.emit('error', er) + else // if no error to emit, still reject pending promises + this.emit(DESTROYED) + + return this + } + + static isStream (s) { + return !!s && (s instanceof Minipass || s instanceof Stream || + s instanceof EE && ( + typeof s.pipe === 'function' || // readable + (typeof s.write === 'function' && typeof s.end === 'function') // writable + )) + } +} diff -Nru npm-9.1.2~ds1/node_modules/fs-minipass/node_modules/minipass/LICENSE npm-9.2.0~ds1/node_modules/fs-minipass/node_modules/minipass/LICENSE --- npm-9.1.2~ds1/node_modules/fs-minipass/node_modules/minipass/LICENSE 1970-01-01 00:00:00.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/fs-minipass/node_modules/minipass/LICENSE 2022-12-07 23:13:18.000000000 +0000 @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) 2017-2022 npm, Inc., 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 -Nru npm-9.1.2~ds1/node_modules/fs-minipass/node_modules/minipass/package.json npm-9.2.0~ds1/node_modules/fs-minipass/node_modules/minipass/package.json --- npm-9.1.2~ds1/node_modules/fs-minipass/node_modules/minipass/package.json 1970-01-01 00:00:00.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/fs-minipass/node_modules/minipass/package.json 2022-12-07 23:13:18.000000000 +0000 @@ -0,0 +1,56 @@ +{ + "name": "minipass", + "version": "3.3.6", + "description": "minimal implementation of a PassThrough stream", + "main": "index.js", + "types": "index.d.ts", + "dependencies": { + "yallist": "^4.0.0" + }, + "devDependencies": { + "@types/node": "^17.0.41", + "end-of-stream": "^1.4.0", + "prettier": "^2.6.2", + "tap": "^16.2.0", + "through2": "^2.0.3", + "ts-node": "^10.8.1", + "typescript": "^4.7.3" + }, + "scripts": { + "test": "tap", + "preversion": "npm test", + "postversion": "npm publish", + "postpublish": "git push origin --follow-tags" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/minipass.git" + }, + "keywords": [ + "passthrough", + "stream" + ], + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "license": "ISC", + "files": [ + "index.d.ts", + "index.js" + ], + "tap": { + "check-coverage": true + }, + "engines": { + "node": ">=8" + }, + "prettier": { + "semi": false, + "printWidth": 80, + "tabWidth": 2, + "useTabs": false, + "singleQuote": true, + "jsxSingleQuote": false, + "bracketSameLine": true, + "arrowParens": "avoid", + "endOfLine": "lf" + } +} diff -Nru npm-9.1.2~ds1/node_modules/.gitignore npm-9.2.0~ds1/node_modules/.gitignore --- npm-9.1.2~ds1/node_modules/.gitignore 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/.gitignore 2022-12-07 23:13:18.000000000 +0000 @@ -85,6 +85,9 @@ !/events !/fastest-levenshtein !/fs-minipass +!/fs-minipass/node_modules/ +/fs-minipass/node_modules/* +!/fs-minipass/node_modules/minipass !/fs.realpath !/function-bind !/gauge @@ -135,13 +138,34 @@ !/make-fetch-happen !/minimatch !/minipass-collect +!/minipass-collect/node_modules/ +/minipass-collect/node_modules/* +!/minipass-collect/node_modules/minipass !/minipass-fetch +!/minipass-fetch/node_modules/ +/minipass-fetch/node_modules/* +!/minipass-fetch/node_modules/minipass !/minipass-flush +!/minipass-flush/node_modules/ +/minipass-flush/node_modules/* +!/minipass-flush/node_modules/minipass !/minipass-json-stream +!/minipass-json-stream/node_modules/ +/minipass-json-stream/node_modules/* +!/minipass-json-stream/node_modules/minipass !/minipass-pipeline +!/minipass-pipeline/node_modules/ +/minipass-pipeline/node_modules/* +!/minipass-pipeline/node_modules/minipass !/minipass-sized +!/minipass-sized/node_modules/ +/minipass-sized/node_modules/* +!/minipass-sized/node_modules/minipass !/minipass !/minizlib +!/minizlib/node_modules/ +/minizlib/node_modules/* +!/minizlib/node_modules/minipass !/mkdirp !/ms !/mute-stream @@ -167,6 +191,7 @@ !/node-gyp/node_modules/make-fetch-happen !/node-gyp/node_modules/minimatch !/node-gyp/node_modules/minipass-fetch +!/node-gyp/node_modules/minipass !/node-gyp/node_modules/nopt !/node-gyp/node_modules/npmlog !/node-gyp/node_modules/ssri diff -Nru npm-9.1.2~ds1/node_modules/libnpmaccess/CHANGELOG.md npm-9.2.0~ds1/node_modules/libnpmaccess/CHANGELOG.md --- npm-9.1.2~ds1/node_modules/libnpmaccess/CHANGELOG.md 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/libnpmaccess/CHANGELOG.md 2022-12-07 23:13:18.000000000 +0000 @@ -1,5 +1,13 @@ # Changelog +## [7.0.1](https://github.com/npm/cli/compare/libnpmaccess-v7.0.0...libnpmaccess-v7.0.1) (2022-12-07) + +### Dependencies + +* [`0a3fe00`](https://github.com/npm/cli/commit/0a3fe000e2723ae6fdb8b1d3154fd3835057c992) [#5933](https://github.com/npm/cli/pull/5933) `minipass@4.0.0` +* [`fee9b66`](https://github.com/npm/cli/commit/fee9b6686892a1c7f976c36ddd5d89b70c416817) `npm-registry-fetch@14.0.3` +* [`875bd56`](https://github.com/npm/cli/commit/875bd56c33ca5eef80c2a50a11808445f2a39a2a) `npm-package-arg@10.1.0` + ## [7.0.0](https://github.com/npm/cli/compare/libnpmaccess-v7.0.0-pre.2...libnpmaccess-v7.0.0) (2022-10-19) ### Features diff -Nru npm-9.1.2~ds1/node_modules/libnpmaccess/package.json npm-9.2.0~ds1/node_modules/libnpmaccess/package.json --- npm-9.1.2~ds1/node_modules/libnpmaccess/package.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/libnpmaccess/package.json 2022-12-07 23:13:18.000000000 +0000 @@ -1,6 +1,6 @@ { "name": "libnpmaccess", - "version": "7.0.0", + "version": "7.0.1", "description": "programmatic library for `npm access` commands", "author": "GitHub Inc.", "license": "ISC", @@ -16,9 +16,10 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", + "@npmcli/mock-registry": "^1.0.0", + "@npmcli/template-oss": "4.11.0", "nock": "^13.2.4", - "tap": "^16.0.1" + "tap": "^16.3.2" }, "repository": { "type": "git", @@ -28,8 +29,8 @@ "bugs": "https://github.com/npm/libnpmaccess/issues", "homepage": "https://npmjs.com/package/libnpmaccess", "dependencies": { - "npm-package-arg": "^10.0.0", - "npm-registry-fetch": "^14.0.2" + "npm-package-arg": "^10.1.0", + "npm-registry-fetch": "^14.0.3" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" @@ -40,7 +41,7 @@ ], "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.10.0", + "version": "4.11.0", "content": "../../scripts/template-oss/index.js" }, "tap": { diff -Nru npm-9.1.2~ds1/node_modules/libnpmaccess/test/fixtures/tnock.js npm-9.2.0~ds1/node_modules/libnpmaccess/test/fixtures/tnock.js --- npm-9.1.2~ds1/node_modules/libnpmaccess/test/fixtures/tnock.js 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/libnpmaccess/test/fixtures/tnock.js 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -'use strict' - -const nock = require('nock') - -module.exports = tnock -function tnock (t, host) { - const server = nock(host) - t.teardown(function () { - server.done() - }) - return server -} diff -Nru npm-9.1.2~ds1/node_modules/libnpmaccess/test/index.js npm-9.2.0~ds1/node_modules/libnpmaccess/test/index.js --- npm-9.1.2~ds1/node_modules/libnpmaccess/test/index.js 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/libnpmaccess/test/index.js 2022-12-07 23:13:18.000000000 +0000 @@ -1,28 +1,42 @@ 'use strict' const t = require('tap') -const tnock = require('./fixtures/tnock.js') +const MockRegistry = require('@npmcli/mock-registry') const access = require('../lib/index.js') -const REG = 'http://localhost:1337' -const OPTS = { - registry: REG, +const opts = { + registry: 'http://localhost:1337', +} + +const pkg = '@npmcli/libnpmaccess-test' +const team = 'npm:test-team' +const orgUser = 'test-user' +const mockRegistry = (t) => { + return new MockRegistry({ + tap: t, + strict: true, + registry: 'http://localhost:1337', + }) } t.test('getCollaborators', t => { t.test('success', async t => { + const registry = mockRegistry(t) const collaborators = { 'npm:myteam': 'write', 'npm:anotherteam': 'read', 'npm:thirdteam': 'special-case', } - tnock(t, REG).get('/-/package/@npmcli%2ftest-package/collaborators').reply(200, collaborators) - const data = await access.getCollaborators('@npmcli/test-package', OPTS) - t.same(data, collaborators) + registry.getCollaborators({ spec: pkg, collaborators }) + await t.resolves( + access.getCollaborators(pkg, opts), + collaborators + ) }) + t.test('non registry package', async t => { - await t.rejects(access.getCollaborators('./local', OPTS), /package name only/) + await t.rejects(access.getCollaborators('./local', opts), /package name only/) }) t.end() }) @@ -34,125 +48,119 @@ '@npmcli/other': 'shrödinger', } t.test('team', async t => { - tnock(t, REG).get('/-/team/npm/myteam/package').reply(200, packages) - const data = await access.getPackages('npm:myteam', OPTS) - t.same(data, packages) + const registry = mockRegistry(t) + registry.getPackages({ team, packages }) + await t.resolves(access.getPackages(team, opts), packages) }) t.test('org', async t => { - tnock(t, REG).get('/-/org/npm/package').reply(200, packages) - const data = await access.getPackages('npm', OPTS) - t.same(data, packages) + const registry = mockRegistry(t) + registry.getPackages({ team: 'npm', packages }) + await t.resolves(access.getPackages('npm', opts), packages) }) t.test('user', async t => { - tnock(t, REG).get('/-/org/testuser/package').reply(404, {}) - tnock(t, REG).get('/-/user/testuser/package').reply(200, packages) - const data = await access.getPackages('testuser', OPTS) - t.same(data, packages) + const registry = mockRegistry(t) + registry.getPackages({ team: orgUser, responseCode: 404 }) + registry.getPackages({ user: orgUser, packages }) + await t.resolves(access.getPackages(orgUser, opts), packages) }) t.test('registry error', async t => { - tnock(t, REG).get('/-/org/npm/package').reply(500, {}) - await t.rejects(access.getPackages('npm', OPTS), { code: 'E500' }) + const registry = mockRegistry(t) + registry.getPackages({ team: orgUser, responseCode: 500 }) + await t.rejects(access.getPackages(orgUser, opts), { code: 'E500' }) }) t.end() }) t.test('getVisibility', t => { t.test('success', async t => { + const registry = mockRegistry(t) const visibility = { public: true } - tnock(t, REG).get('/-/package/@npmcli%2ftest-package/visibility').reply(200, visibility) - const data = await access.getVisibility('@npmcli/test-package', OPTS) - t.same(data, visibility) + registry.getVisibility({ spec: pkg, visibility }) + await t.resolves(access.getVisibility(pkg, opts), visibility) }) t.test('non registry package', async t => { - await t.rejects(access.getVisibility('./local', OPTS), /package name only/) + await t.rejects(access.getVisibility('./local', opts), /package name only/) }) t.end() }) t.test('removePermissions', t => { t.test('success', async t => { - tnock(t, REG).delete('/-/team/npm/myteam/package', { - package: '@npmcli/test-package', - }).reply(200) - await t.resolves(access.removePermissions('npm:myteam', '@npmcli/test-package', OPTS)) + const registry = mockRegistry(t) + registry.removePermissions({ spec: pkg, team }) + await t.resolves(access.removePermissions(team, pkg, opts)) }) t.test('non registry spec', async t => { - await t.rejects(access.removePermissions('npm:myteam', './local', OPTS), /package name only/) + await t.rejects(access.removePermissions(team, './local', opts), /package name only/) }) t.end() }) t.test('setAccess', t => { t.test('public', async t => { - tnock(t, REG).post( - '/-/package/@npmcli%2ftest-package/access', { access: 'public' } - ).reply(200) - await t.resolves(access.setAccess('@npmcli/test-package', 'public', OPTS)) + const body = { access: 'public' } + const registry = mockRegistry(t) + registry.setAccess({ spec: pkg, body }) + await t.resolves(access.setAccess(pkg, 'public', opts)) }) t.test('restricted', async t => { - tnock(t, REG).post( - '/-/package/@npmcli%2ftest-package/access', { access: 'restricted' } - ).reply(200) - await t.resolves(access.setAccess('@npmcli/test-package', 'restricted', OPTS)) + const body = { access: 'restricted' } + const registry = mockRegistry(t) + registry.setAccess({ spec: pkg, body }) + await t.resolves(access.setAccess(pkg, 'restricted', opts)) }) t.test('non registry package', async t => { - await t.rejects(access.setAccess('./local', 'public', OPTS), /package name only/) + await t.rejects(access.setAccess('./local', 'public', opts), /package name only/) }) t.end() }) t.test('setMfa', t => { t.test('none', async t => { - tnock(t, REG).post('/-/package/@npmcli%2ftest-package/access', { - publish_requires_tfa: false, - }).reply(200) - await t.resolves(access.setMfa('@npmcli/test-package', 'none', OPTS)) + const registry = mockRegistry(t) + const body = { publish_requires_tfa: false } + registry.setAccess({ spec: pkg, body }) + await t.resolves(access.setMfa(pkg, 'none', opts)) }) t.test('publish', async t => { - tnock(t, REG).post('/-/package/@npmcli%2ftest-package/access', { + const registry = mockRegistry(t) + const body = { publish_requires_tfa: true, automation_token_overrides_tfa: false, - }).reply(200) - await t.resolves(access.setMfa('@npmcli/test-package', 'publish', OPTS)) + } + registry.setAccess({ spec: pkg, body }) + await t.resolves(access.setMfa(pkg, 'publish', opts)) }) t.test('automation', async t => { - tnock(t, REG).post('/-/package/@npmcli%2ftest-package/access', { + const registry = mockRegistry(t) + const body = { publish_requires_tfa: true, automation_token_overrides_tfa: true, - }).reply(200) - await t.resolves(access.setMfa('@npmcli/test-package', 'automation', OPTS)) + } + registry.setAccess({ spec: pkg, body }) + await t.resolves(access.setMfa(pkg, 'automation', opts)) }) t.test('invalid', async t => { - await t.rejects(access.setMfa('@npmcli/test-package', 'invalid', OPTS), /Invalid mfa setting/) + await t.rejects(access.setMfa(pkg, 'invalid', opts), /Invalid mfa setting/) }) t.test('non registry spec', async t => { - await t.rejects(access.setMfa('./local', 'none', OPTS, /package name only/)) + await t.rejects(access.setMfa('./local', 'none', opts, /package name only/)) }) t.end() }) t.test('setPermissions', t => { t.test('scope:team read-only', async t => { - tnock(t, REG).put('/-/team/npmcli/myteam/package', { - package: '@npmcli/test-package', - permissions: 'read-only', - }).reply(201) - await t.resolves( - access.setPermissions('npmcli:myteam', '@npmcli/test-package', 'read-only', OPTS) - ) + const registry = mockRegistry(t) + registry.setPermissions({ spec: pkg, team, permissions: 'read-only' }) + await t.resolves(access.setPermissions(team, pkg, 'read-only', opts)) }) t.test('scope only', async t => { - await t.rejects( - access.setPermissions('npmcli', '@npmcli/test-package', 'read-only', OPTS), - /scope:team/ - ) + await t.rejects(access.setPermissions('npmcli', pkg, 'read-only', opts), /scope:team/) }) t.test('no scope or team', async t => { - await t.rejects( - access.setPermissions('@:myteam', '@npmcli/test-package', 'read-only', OPTS), - /scope:team/ - ) + await t.rejects(access.setPermissions('@:myteam', pkg, 'read-only', opts), /scope:team/) }) t.end() diff -Nru npm-9.1.2~ds1/node_modules/libnpmdiff/CHANGELOG.md npm-9.2.0~ds1/node_modules/libnpmdiff/CHANGELOG.md --- npm-9.1.2~ds1/node_modules/libnpmdiff/CHANGELOG.md 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/libnpmdiff/CHANGELOG.md 2022-12-07 23:13:18.000000000 +0000 @@ -1,5 +1,22 @@ # Changelog +## [5.0.6](https://github.com/npm/cli/compare/libnpmdiff-v5.0.5...libnpmdiff-v5.0.6) (2022-12-07) + +### Dependencies + +* [`372d158`](https://github.com/npm/cli/commit/372d158d2637120600a95abee64355ed1cb6f990) [#5935](https://github.com/npm/cli/pull/5935) `minimatch@5.1.1` (#5935) +* [`0a3fe00`](https://github.com/npm/cli/commit/0a3fe000e2723ae6fdb8b1d3154fd3835057c992) [#5933](https://github.com/npm/cli/pull/5933) `minipass@4.0.0` +* [`6b77340`](https://github.com/npm/cli/commit/6b7734009ecd939fbb3d382cb92eb0cdbec7dcd3) `tar@6.1.13` +* [`3da9a1a`](https://github.com/npm/cli/commit/3da9a1a4ebcf1779035b5f9ae985c087f617efe3) `pacote@15.0.7` +* [`875bd56`](https://github.com/npm/cli/commit/875bd56c33ca5eef80c2a50a11808445f2a39a2a) `npm-package-arg@10.1.0` +* [Workspace](https://github.com/npm/cli/releases/tag/arborist-v6.1.5): `@npmcli/arborist@6.1.5` + +## [5.0.5](https://github.com/npm/cli/compare/libnpmdiff-v5.0.4...libnpmdiff-v5.0.5) (2022-11-30) + +### Dependencies + +* [Workspace](https://github.com/npm/cli/compare/arborist-v6.1.3...arborist-v6.1.4): `@npmcli/arborist@6.1.4` + ## [5.0.4](https://github.com/npm/cli/compare/libnpmdiff-v5.0.3...libnpmdiff-v5.0.4) (2022-11-16) ### Dependencies diff -Nru npm-9.1.2~ds1/node_modules/libnpmdiff/package.json npm-9.2.0~ds1/node_modules/libnpmdiff/package.json --- npm-9.1.2~ds1/node_modules/libnpmdiff/package.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/libnpmdiff/package.json 2022-12-07 23:13:18.000000000 +0000 @@ -1,6 +1,6 @@ { "name": "libnpmdiff", - "version": "5.0.4", + "version": "5.0.6", "description": "The registry diff", "repository": { "type": "git", @@ -43,23 +43,23 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", - "tap": "^16.0.1" + "@npmcli/template-oss": "4.11.0", + "tap": "^16.3.2" }, "dependencies": { - "@npmcli/arborist": "^6.1.3", + "@npmcli/arborist": "^6.1.5", "@npmcli/disparity-colors": "^3.0.0", "@npmcli/installed-package-contents": "^2.0.0", "binary-extensions": "^2.2.0", "diff": "^5.1.0", - "minimatch": "^5.0.1", - "npm-package-arg": "^10.0.0", - "pacote": "^15.0.2", - "tar": "^6.1.0" + "minimatch": "^5.1.1", + "npm-package-arg": "^10.1.0", + "pacote": "^15.0.7", + "tar": "^6.1.13" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.10.0", + "version": "4.11.0", "content": "../../scripts/template-oss/index.js" }, "tap": { diff -Nru npm-9.1.2~ds1/node_modules/libnpmexec/CHANGELOG.md npm-9.2.0~ds1/node_modules/libnpmexec/CHANGELOG.md --- npm-9.1.2~ds1/node_modules/libnpmexec/CHANGELOG.md 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/libnpmexec/CHANGELOG.md 2022-12-07 23:13:18.000000000 +0000 @@ -1,5 +1,21 @@ # Changelog +## [5.0.6](https://github.com/npm/cli/compare/libnpmexec-v5.0.5...libnpmexec-v5.0.6) (2022-12-07) + +### Dependencies + +* [`0e6c28b`](https://github.com/npm/cli/commit/0e6c28ba093f8c5d35df98afca28e842b247004b) [#5934](https://github.com/npm/cli/pull/5934) `ci-info@3.7.0` (#5934) +* [`0a3fe00`](https://github.com/npm/cli/commit/0a3fe000e2723ae6fdb8b1d3154fd3835057c992) [#5933](https://github.com/npm/cli/pull/5933) `minipass@4.0.0` +* [`3da9a1a`](https://github.com/npm/cli/commit/3da9a1a4ebcf1779035b5f9ae985c087f617efe3) `pacote@15.0.7` +* [`875bd56`](https://github.com/npm/cli/commit/875bd56c33ca5eef80c2a50a11808445f2a39a2a) `npm-package-arg@10.1.0` +* [Workspace](https://github.com/npm/cli/releases/tag/arborist-v6.1.5): `@npmcli/arborist@6.1.5` + +## [5.0.5](https://github.com/npm/cli/compare/libnpmexec-v5.0.4...libnpmexec-v5.0.5) (2022-11-30) + +### Dependencies + +* [Workspace](https://github.com/npm/cli/compare/arborist-v6.1.3...arborist-v6.1.4): `@npmcli/arborist@6.1.4` + ## [5.0.4](https://github.com/npm/cli/compare/libnpmexec-v5.0.3...libnpmexec-v5.0.4) (2022-11-16) ### Bug Fixes diff -Nru npm-9.1.2~ds1/node_modules/libnpmexec/package.json npm-9.2.0~ds1/node_modules/libnpmexec/package.json --- npm-9.1.2~ds1/node_modules/libnpmexec/package.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/libnpmexec/package.json 2022-12-07 23:13:18.000000000 +0000 @@ -1,6 +1,6 @@ { "name": "libnpmexec", - "version": "5.0.4", + "version": "5.0.6", "files": [ "bin/", "lib/" @@ -51,20 +51,23 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", + "@npmcli/mock-registry": "^1.0.0", + "@npmcli/template-oss": "4.11.0", "bin-links": "^4.0.1", - "minify-registry-metadata": "^2.2.0", + "just-extend": "^6.1.1", + "just-safe-set": "^4.1.1", + "minify-registry-metadata": "^3.0.0", "mkdirp": "^1.0.4", - "tap": "^16.0.1" + "tap": "^16.3.2" }, "dependencies": { - "@npmcli/arborist": "^6.1.3", + "@npmcli/arborist": "^6.1.5", "@npmcli/run-script": "^6.0.0", "chalk": "^4.1.0", - "ci-info": "^3.6.1", - "npm-package-arg": "^10.0.0", + "ci-info": "^3.7.0", + "npm-package-arg": "^10.1.0", "npmlog": "^7.0.1", - "pacote": "^15.0.2", + "pacote": "^15.0.7", "proc-log": "^3.0.0", "read": "^1.0.7", "read-package-json-fast": "^3.0.1", @@ -73,7 +76,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.10.0", + "version": "4.11.0", "content": "../../scripts/template-oss/index.js" } } diff -Nru npm-9.1.2~ds1/node_modules/libnpmexec/test/fixtures/setup.js npm-9.2.0~ds1/node_modules/libnpmexec/test/fixtures/setup.js --- npm-9.1.2~ds1/node_modules/libnpmexec/test/fixtures/setup.js 1970-01-01 00:00:00.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/libnpmexec/test/fixtures/setup.js 2022-12-07 23:13:18.000000000 +0000 @@ -0,0 +1,256 @@ + +const fs = require('fs/promises') +const { existsSync } = require('fs') +const { resolve, extname, join } = require('path') +const binLinks = require('bin-links') +const MockRegistry = require('@npmcli/mock-registry') +const justExtend = require('just-extend') +const set = require('just-safe-set') + +const merge = (...args) => justExtend(true, ...args) + +const DEFAULT_BIN_FILE = 'bin-file.js' + +const createPkg = ({ + name = '@npmcli/create-index', + bin, + files, + versions = [], + version, + localVersion, +}) => { + if (localVersion && !versions.includes(localVersion)) { + versions = [...versions, localVersion] + } + if (version && !versions.includes(version)) { + versions = [...versions, version] + } + + const defaultBinName = name.includes('/') ? name.split('/')[1] : name + + if (!bin) { + bin = { + [defaultBinName]: `./${DEFAULT_BIN_FILE}`, + } + } + + const pkgsArr = versions.map((v) => ({ + name, + version: v, + bin, + })) + + const pkgs = {} + const tarballs = {} + const fixtures = {} + + for (const pkg of pkgsArr) { + pkgs[pkg.version] = pkg + } + + if (localVersion) { + set(fixtures, ['node_modules', ...name.split('/')], { + 'package.json': pkgs[localVersion], + ...files || { + [DEFAULT_BIN_FILE]: { key: name, value: `local-${localVersion}` }, + }, + }) + fixtures['package.json'] = { + name: 'pkg', + version: '9.9.9', + dependencies: { + [name]: `^${localVersion}`, + }, + } + } + + for (const pkg of pkgsArr) { + const fixturePath = `${pkg.name}-${pkg.version}`.replace('/', '-') + set(fixtures, ['packages', fixturePath], { + 'package.json': pkg, + ...files || { + [DEFAULT_BIN_FILE]: { key: pkg.name, value: `packages-${pkg.version}` }, + }, + }) + tarballs[pkg.version] = join('packages', fixturePath) + } + + return { + pkg: pkgsArr[0], + pkgs, + fixtures, + package: ({ registry, path, tarballs: tgz = versions, ...opts }) => registry.package({ + times: 2, + manifest: registry.manifest({ name: pkgsArr[0].name, packuments: pkgsArr }), + tarballs: tgz.reduce((acc, v) => { + acc[v] = resolve(path, tarballs[v]) + return acc + }, {}), + ...opts, + }), + } +} + +const createTestdir = (...objs) => { + const testdirHelper = (obj, ancestors = []) => { + for (const [key, value] of Object.entries(obj)) { + if (extname(key) === '.json') { + obj[key] = JSON.stringify(value, null, 2) + } else if (extname(key) === '.js' || ancestors.slice(-2).join('/') === 'node_modules/.bin') { + // a js or bin file is converted to a bin script that writes a file + obj[key] = `#!/usr/bin/env node\nrequire('fs').writeFileSync( + 'output-${value.key.replace('/', '-')}', + JSON.stringify({ + value: '${value.value}', + args: process.argv.slice(2), + created: '${[...ancestors, key].join('/')}', + }) + )` + } else if (value && typeof value === 'object') { + obj[key] = testdirHelper(value, [...ancestors, key]) + } else { + obj[key] = value + } + } + return obj + } + + return testdirHelper(merge(...objs)) +} + +const setup = (t, { + pkg, + testdir: _testdir = {}, + mocks, + global, + debug, + execPath, + defaults = true, +} = {}) => { + const registry = new MockRegistry({ + tap: t, + registry: 'http://smoke-test-registry.club/', + strict: true, + debug, + }) + + if (debug) { + process.on('log', console.error) + t.teardown(() => process.off('log', console.error)) + } + + const { node_modules: testdirNm, ...testdir } = _testdir + const fullTestdir = createTestdir({ + cache: {}, + npxCache: {}, + ...testdirNm ? + global ? { + global: { + node_modules: { + '.bin': {}, + ...testdirNm, + }, + }, + } : { + node_modules: { + '.bin': {}, + ...testdirNm, + }, + } + : {}, + }, testdir) + + // quick way to remove undefined and null values that we merged + // in to not write certain directories + const path = t.testdir(JSON.parse(JSON.stringify(fullTestdir, (_, v) => { + if (v === null) { + return + } + if (typeof v === 'string') { + return v.replace(/\{REGISTRY\}/g, registry.origin) + } + return v + })) + ) + + const cache = resolve(path, 'cache') + const npxCache = resolve(path, 'npxCache') + const nodeModules = resolve(path, global ? 'global/node_modules' : 'node_modules') + + const defaultOpts = { + call: '', + color: false, + localBin: '', + globalBin: '', + packages: [], + scriptShell: undefined, + yes: true, + path, + runPath: path, + } + + const baseOpts = { + audit: false, + registry: registry.origin + '/', + ...existsSync(cache) ? { cache } : {}, + ...existsSync(npxCache) ? { npxCache } : {}, + ...global ? { + globalBin: resolve(path, nodeModules, '.bin'), + globalPath: resolve(path, 'global'), + } : {}, + } + + return { + path, + registry, + chmod: async (chmodPath) => { + if (!chmodPath) { + for (const p of [].concat(pkg)) { + await fs.chmod(resolve(path, nodeModules, p.name, DEFAULT_BIN_FILE), 0o775) + } + return + } + return fs.chmod(resolve(path, chmodPath), 0o775) + }, + binLinks: async (binPkg) => { + if (!binPkg) { + for (const p of [].concat(pkg)) { + await binLinks({ + pkg: p, + path: resolve(path, nodeModules, p.name), + }) + } + return + } + await binLinks({ + pkg: binPkg, + path: resolve(path, nodeModules, binPkg.name), + }) + }, + readOutput: async (outputPath, { root = path } = {}) => { + if (!outputPath) { + outputPath = pkg.name.replace('/', '-') + } + return fs.readFile(resolve(root, `output-${outputPath}`), 'utf-8').then(r => JSON.parse(r)) + }, + rmOutput: (outputPath, { root = path } = {}) => { + if (!outputPath) { + outputPath = pkg.name.replace('/', '-') + } + return fs.rm(resolve(root, `output-${outputPath}`)) + }, + exec: (opts) => t.mock(execPath || '../../lib/index.js', mocks)({ + ...defaults ? { + ...defaultOpts, + path, + runPath: path, + } : {}, + ...baseOpts, + ...opts, + }), + } +} + +module.exports.setup = setup +module.exports.createPkg = createPkg +module.exports.merge = merge diff -Nru npm-9.1.2~ds1/node_modules/libnpmexec/test/index.js npm-9.2.0~ds1/node_modules/libnpmexec/test/index.js --- npm-9.1.2~ds1/node_modules/libnpmexec/test/index.js 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/libnpmexec/test/index.js 2022-12-07 23:13:18.000000000 +0000 @@ -1,1270 +1,16 @@ -const fs = require('fs') -const { resolve } = require('path') const t = require('tap') -const binLinks = require('bin-links') - -const libexec = require('../lib/index.js') - -// setup server -const registryServer = require('./registry/server.js') -const { registry } = registryServer -t.test('setup server', { bail: true, buffered: false }, registryServer) - -const baseOpts = { - audit: false, - call: '', - color: false, - localBin: '', - globalBin: '', - packages: [], - path: '', - registry, - runPath: '', - scriptShell: undefined, - yes: true, -} - -t.test('bin in local pkg', async t => { - const pkg = { - name: '@npmcli/local-pkg-bin-test', - bin: { - b: 'echo this is something else', - a: 'local-bin-test.js', - }, - } - const path = t.testdir({ - cache: {}, - npxCache: {}, - 'local-bin-test.js': `#!/usr/bin/env node -require('fs').writeFileSync(process.argv.slice(2)[0], 'LOCAL PKG')`, - 'package.json': JSON.stringify(pkg), - }) - const localBin = resolve(path, 'node_modules/.bin') - const runPath = path - const npxCache = resolve(path, 'npxCache') - - const executable = resolve(path, 'local-bin-test.js') - fs.chmodSync(executable, 0o775) - - await libexec({ - ...baseOpts, - args: ['a', 'resfile'], - npxCache, - localBin, - path, - runPath, - }) - - const res = fs.readFileSync(resolve(path, 'resfile')).toString() - t.equal(res, 'LOCAL PKG', 'should run local pkg bin script') -}) - -t.test('locally available pkg - by scoped name only', async t => { - const pkg = { - name: '@npmcli/npx-local-test', - version: '2.0.0', - bin: { - 'npx-local-test': './index.js', - }, - } - const path = t.testdir({ - cache: {}, - npxCache: {}, - node_modules: { - '.bin': {}, - '@npmcli': { - 'npx-local-test': { - 'package.json': JSON.stringify(pkg), - 'index.js': `#!/usr/bin/env node - require('fs').writeFileSync(process.argv.slice(2)[0], 'LOCAL PKG')`, - }, - }, - }, - 'package.json': JSON.stringify({ - name: 'pkg', - dependencies: { - '@npmcli/npx-local-test': '^2.0.0', - }, - }), - }) - const runPath = path - const cache = resolve(path, 'cache') - const npxCache = resolve(path, 'npxCache') - - const executable = - resolve(path, 'node_modules/@npmcli/npx-local-test/index.js') - fs.chmodSync(executable, 0o775) - - await binLinks({ - path: resolve(path, 'node_modules/@npmcli/npx-local-test'), - pkg, - }) - - await libexec({ - ...baseOpts, - cache, - npxCache, - args: ['@npmcli/npx-local-test', 'resfile'], - path, - runPath, - }) - - const res = fs.readFileSync(resolve(path, 'resfile')).toString() - t.equal(res, 'LOCAL PKG', 'should run local pkg bin script') -}) - -t.test('locally available pkg - by name', async t => { - const pkg = { - name: '@ruyadorno/create-index', - version: '2.0.0', - bin: { - 'create-index': './index.js', - }, - } - const path = t.testdir({ - cache: {}, - npxCache: {}, - node_modules: { - '.bin': {}, - '@ruyadorno': { - 'create-index': { - 'package.json': JSON.stringify(pkg), - 'index.js': `#!/usr/bin/env node - require('fs').writeFileSync(process.argv.slice(2)[0], 'LOCAL PKG')`, - }, - }, - }, - 'package.json': JSON.stringify({ - name: 'pkg', - dependencies: { - '@ruyadorno/create-index': '^2.0.0', - }, - }), - }) - const runPath = path - const cache = resolve(path, 'cache') - const npxCache = resolve(path, 'npxCache') - - const executable = - resolve(path, 'node_modules/@ruyadorno/create-index/index.js') - fs.chmodSync(executable, 0o775) - - await binLinks({ - path: resolve(path, 'node_modules/@ruyadorno/create-index'), - pkg, - }) - - await libexec({ - ...baseOpts, - cache, - npxCache, - packages: ['@ruyadorno/create-index'], - call: 'create-index resfile', - path, - runPath, - }) - - const res = fs.readFileSync(resolve(path, 'resfile')).toString() - t.equal(res, 'LOCAL PKG', 'should run local pkg bin script') -}) - -t.test('locally available pkg - by version', async t => { - const pkg = { - name: '@ruyadorno/create-index', - version: '1.0.0', - bin: { - 'create-index': './index.js', - }, - } - const path = t.testdir({ - cache: {}, - npxCache: {}, - node_modules: { - '.bin': {}, - '@ruyadorno': { - 'create-index': { - 'package.json': JSON.stringify(pkg), - 'index.js': `#!/usr/bin/env node - require('fs').writeFileSync('resfile', 'LOCAL PKG')`, - }, - }, - }, - 'package.json': JSON.stringify({ - name: 'pkg', - dependencies: { - '@ruyadorno/create-index': '^1.0.0', - }, - }), - }) - const runPath = path - const cache = resolve(path, 'cache') - const npxCache = resolve(path, 'npxCache') - - const executable = - resolve(path, 'node_modules/@ruyadorno/create-index/index.js') - fs.chmodSync(executable, 0o775) - - await binLinks({ - path: resolve(path, 'node_modules/@ruyadorno/create-index'), - pkg, - }) - - await libexec({ - ...baseOpts, - cache, - npxCache, - args: ['@ruyadorno/create-index@1.0.0'], - path, - runPath, - }) - - const res = fs.readFileSync(resolve(path, 'resfile')).toString() - t.equal(res, 'LOCAL PKG', 'should run local pkg bin script') -}) - -t.test('locally available pkg - by range', async t => { - const pkg = { - name: '@ruyadorno/create-index', - version: '2.0.0', - bin: { - 'create-index': './index.js', - }, - } - const path = t.testdir({ - cache: {}, - npxCache: {}, - node_modules: { - '.bin': {}, - '@ruyadorno': { - 'create-index': { - 'package.json': JSON.stringify(pkg), - 'index.js': `#!/usr/bin/env node - require('fs').writeFileSync(process.argv.slice(2)[0], 'LOCAL PKG')`, - }, - }, - }, - 'package.json': JSON.stringify({ - name: 'pkg', - dependencies: { - '@ruyadorno/create-index': '^2.0.0', - }, - }), - }) - const runPath = path - const cache = resolve(path, 'cache') - const npxCache = resolve(path, 'npxCache') - - const executable = - resolve(path, 'node_modules/@ruyadorno/create-index/index.js') - fs.chmodSync(executable, 0o775) - - await binLinks({ - path: resolve(path, 'node_modules/@ruyadorno/create-index'), - pkg, - }) - - await libexec({ - ...baseOpts, - cache, - npxCache, - packages: ['@ruyadorno/create-index@^2.0.0'], - call: 'create-index resfile', - path, - runPath, - }) - - const res = fs.readFileSync(resolve(path, 'resfile')).toString() - t.equal(res, 'LOCAL PKG', 'should run local pkg bin script') -}) - -t.test('locally available pkg - by tag', async t => { - const pkg = { - name: '@ruyadorno/create-index', - version: '1.0.0', - bin: { - 'create-index': './index.js', - }, - } - - const path = t.testdir({ - cache: {}, - npxCache: {}, - node_modules: { - '.bin': {}, - '@ruyadorno': { - 'create-index': { - 'package.json': JSON.stringify(pkg), - 'index.js': `#!/usr/bin/env node - require('fs').writeFileSync(process.argv.slice(2)[0], 'LOCAL PKG')`, - }, - }, - '.package-lock.json': JSON.stringify({ - name: 'lock', - lockfileVersion: 3, - requires: true, - packages: { - 'node_modules/@ruyadorno/create-index': { - version: '1.0.0', - resolved: 'https://registry.npmjs.org/@ruyadorno/create-index/-/create-index-1.0.0.tgz', - bin: { - 'create-index': 'create-index.js', - }, - }, - }, - - }), - }, - 'package.json': JSON.stringify({ - name: 'pkg', - dependencies: { - '@ruyadorno/create-index': '^1.0.0', - }, - }), - }) - const runPath = path - const cache = resolve(path, 'cache') - const npxCache = resolve(path, 'npxCache') - - const executable = - resolve(path, 'node_modules/@ruyadorno/create-index/index.js') - fs.chmodSync(executable, 0o775) - - await binLinks({ - path: resolve(path, 'node_modules/@ruyadorno/create-index'), - pkg, - }) - - await libexec({ - ...baseOpts, - cache, - npxCache, - packages: ['@ruyadorno/create-index@latest'], - call: 'create-index resfile', - path, - runPath, - }) - - const res = fs.readFileSync(resolve(path, 'resfile')).toString() - t.equal(res, 'LOCAL PKG', 'should run local pkg bin script') -}) - -t.test('multiple local pkgs', async t => { - const foo = { - name: '@ruyadorno/create-foo', - version: '2.0.0', - bin: { - 'create-foo': './index.js', - }, - } - const bar = { - name: '@ruyadorno/create-bar', - version: '2.0.0', - bin: { - 'create-bar': './index.js', - }, - } - const path = t.testdir({ - cache: {}, - npxCache: {}, - node_modules: { - '.bin': {}, - '@ruyadorno': { - 'create-foo': { - 'package.json': JSON.stringify(foo), - 'index.js': `#!/usr/bin/env node - require('fs').writeFileSync(process.argv.slice(2)[0], 'foo')`, - }, - 'create-bar': { - 'package.json': JSON.stringify(bar), - 'index.js': `#!/usr/bin/env node - require('fs').writeFileSync(process.argv.slice(2)[0], 'bar')`, - }, - }, - }, - 'package.json': JSON.stringify({ - name: 'pkg', - dependencies: { - '@ruyadorno/create-foo': '^2.0.0', - '@ruyadorno/create-bar': '^2.0.0', - }, - }), - }) - const runPath = path - const cache = resolve(path, 'cache') - const npxCache = resolve(path, 'npxCache') - - const setupBins = async (pkg) => { - const executable = - resolve(path, `node_modules/${pkg.name}/index.js`) - fs.chmodSync(executable, 0o775) - - await binLinks({ - path: resolve(path, `node_modules/${pkg.name}`), - pkg, - }) - } - - await Promise.all([foo, bar] - .map(setupBins)) - - await libexec({ - ...baseOpts, - localBin: resolve(path, 'node_modules/.bin'), - cache, - npxCache, - packages: ['@ruyadorno/create-foo', '@ruyadorno/create-bar'], - call: 'create-foo resfile && create-bar bar', - path, - runPath, - }) - - const resFoo = fs.readFileSync(resolve(path, 'resfile')).toString() - t.equal(resFoo, 'foo', 'should run local pkg bin script') - const resBar = fs.readFileSync(resolve(path, 'bar')).toString() - t.equal(resBar, 'bar', 'should run local pkg bin script') -}) - -t.test('no npxCache', async t => { - const path = t.testdir({ - cache: {}, - a: { - 'package.json': JSON.stringify({ - name: 'a', - bin: { - a: './index.js', - }, - }), - 'index.js': `#!/usr/bin/env node -require('fs').writeFileSync(process.argv.slice(2)[0], 'LOCAL PKG')`, - }, - }) - const runPath = path - const cache = resolve(path, 'cache') - - const executable = resolve(path, 'a/index.js') - fs.chmodSync(executable, 0o775) - - await t.rejects(libexec({ - ...baseOpts, - args: [`file:${resolve(path, 'a')}`, 'resfile'], - cache, - path, - runPath, - }), /Must provide a valid npxCache path/) -}) - -t.test('local file system path', async t => { - const path = t.testdir({ - cache: {}, - npxCache: {}, - a: { - 'package.json': JSON.stringify({ - name: 'a', - bin: { - a: './index.js', - }, - }), - 'index.js': `#!/usr/bin/env node -require('fs').writeFileSync(process.argv.slice(2)[0], 'LOCAL PKG')`, - }, - }) - const runPath = path - const cache = resolve(path, 'cache') - const npxCache = resolve(path, 'npxCache') - - const executable = resolve(path, 'a/index.js') - fs.chmodSync(executable, 0o775) - - const mockexec = t.mock('../lib/index.js', { - 'ci-info': { isCI: true }, - 'proc-log': { - warn (title, msg) { - t.fail('should not warn about local file package install') - }, - }, - }) - - await mockexec({ - ...baseOpts, - args: [`file:${resolve(path, 'a')}`, 'resfile'], - cache, - npxCache, - path, - runPath, - }) - - const res = fs.readFileSync(resolve(path, 'resfile')).toString() - t.equal(res, 'LOCAL PKG', 'should run local pkg bin script') -}) - -t.test('global space pkg', async t => { - const pkg = { - name: 'a', - bin: { - a: 'index.js', - }, - } - const path = t.testdir({ - cache: {}, - npxCache: {}, - global: { - node_modules: { - '.bin': {}, - a: { - 'index.js': `#!/usr/bin/env node - require('fs').writeFileSync(process.argv.slice(2)[0], 'GLOBAL PKG')`, - 'package.json': JSON.stringify(pkg), - }, - }, - }, - }) - const globalBin = resolve(path, 'global/node_modules/.bin') - const globalPath = resolve(path, 'global') - const runPath = path - - const executable = resolve(path, 'global/node_modules/a') - fs.chmodSync(executable, 0o775) - - await binLinks({ - path: resolve(path, 'global/node_modules/a'), - pkg, - }) - - await libexec({ - ...baseOpts, - args: ['a', 'resfile'], - globalBin, - globalPath, - path, - runPath, - }) - - const res = fs.readFileSync(resolve(path, 'resfile')).toString() - t.equal(res, 'GLOBAL PKG', 'should run local pkg bin script') -}) - -t.test('global scoped pkg', async t => { - const pkg = { - name: '@ruyadorno/create-test', - bin: { - 'create-test': 'index.js', - }, - } - const path = t.testdir({ - cache: {}, - npxCache: {}, - global: { - node_modules: { - '.bin': {}, - '@ruyadorno': { - 'create-test': { - 'index.js': `#!/usr/bin/env node - require('fs').writeFileSync(process.argv.slice(2)[0], 'GLOBAL PKG')`, - 'package.json': JSON.stringify(pkg), - }, - }, - }, - }, - }) - const globalBin = resolve(path, 'global/node_modules/.bin') - const globalPath = resolve(path, 'global') - const runPath = path - - await binLinks({ - path: resolve(path, 'global/node_modules/@ruyadorno/create-test'), - pkg, - }) - - await libexec({ - ...baseOpts, - args: ['@ruyadorno/create-test', 'resfile'], - globalBin, - globalPath, - path, - runPath, - }) - - const res = fs.readFileSync(resolve(path, 'resfile')).toString() - t.equal(res, 'GLOBAL PKG', 'should run global pkg bin script') -}) - -t.test('run from registry - no local packages', async t => { - const testdir = t.testdir({ - cache: {}, - npxCache: {}, - global: { - lib: {}, - bin: {}, - }, - work: {}, - }) - const path = resolve(testdir, 'work') - - t.throws( - () => fs.statSync(resolve(path, 'index.js')), - { code: 'ENOENT' }, - 'should not have template file' - ) - - await libexec({ - ...baseOpts, - args: ['@ruyadorno/create-index'], - cache: resolve(testdir, 'cache'), - globalPath: resolve(testdir, 'global'), - npxCache: resolve(testdir, 'npxCache'), - path, - runPath: path, - }) - - t.ok(fs.statSync(resolve(path, 'index.js')).isFile(), 'ran create pkg') -}) - -t.test('run from registry - local version mismatch', async t => { - const path = t.testdir({ - cache: {}, - npxCache: {}, - node_modules: { - '@ruyadorno': { - 'create-index': { - 'package.json': JSON.stringify({ - name: '@ruyadorno/create-index', - version: '2.0.0', - }), - }, - }, - }, - 'package.json': JSON.stringify({ - name: 'pkg', - dependencies: { - '@ruyadorno/create-index': '^2.0.0', - }, - }), - }) - const runPath = path - const cache = resolve(path, 'cache') - const npxCache = resolve(path, 'npxCache') - - await libexec({ - ...baseOpts, - args: ['@ruyadorno/create-index@1.0.0'], - cache, - npxCache, - path, - runPath, - }) - - t.ok(fs.statSync(resolve(path, 'index.js')).isFile(), 'ran create pkg from registry') -}) - -t.test('run from registry - local range mismatch', async t => { - const path = t.testdir({ - cache: {}, - npxCache: {}, - node_modules: { - '@ruyadorno': { - 'create-index': { - 'package.json': JSON.stringify({ - name: '@ruyadorno/create-index', - version: '2.0.0', - }), - }, - }, - }, - 'package.json': JSON.stringify({ - name: 'pkg', - dependencies: { - '@ruyadorno/create-index': '^2.0.0', - }, - }), - }) - const runPath = path - const cache = resolve(path, 'cache') - const npxCache = resolve(path, 'npxCache') - - await libexec({ - ...baseOpts, - args: ['@ruyadorno/create-index@^1.0.0'], - cache, - npxCache, - path, - runPath, - }) - - t.ok(fs.statSync(resolve(path, 'index.js')).isFile(), 'ran create pkg from registry') -}) - -t.test('run from registry - local tag mismatch', async t => { - const path = t.testdir({ - cache: {}, - npxCache: {}, - node_modules: { - '@ruyadorno': { - 'create-index': { - 'package.json': JSON.stringify({ - name: '@ruyadorno/create-index', - version: '2.0.0', - }), - }, - }, - '.package-lock.json': JSON.stringify({ - name: 'lock', - lockfileVersion: 3, - requires: true, - packages: { - 'node_modules/@ruyadorno/create-index': { - version: '2.0.0', - resolved: 'https://registry.npmjs.org/@ruyadorno/create-index/-/create-index-2.0.0.tgz', - bin: { - 'create-index': 'create-index.js', - }, - }, - }, - - }), - }, - 'package.json': JSON.stringify({ - name: 'pkg', - dependencies: { - '@ruyadorno/create-index': '^2.0.0', - }, - }), - }) - const runPath = path - const cache = resolve(path, 'cache') - const npxCache = resolve(path, 'npxCache') - - await libexec({ - ...baseOpts, - args: ['@ruyadorno/create-index@latest'], - cache, - npxCache, - path, - runPath, - }) - - t.ok(fs.statSync(resolve(path, 'index.js')).isFile(), 'ran create pkg from registry') -}) - -t.test('avoid install when exec from registry an available pkg', async t => { - const testdir = t.testdir({ - cache: {}, - npxCache: {}, - work: {}, - }) - const path = resolve(testdir, 'work') - const runPath = path - const cache = resolve(testdir, 'cache') - const npxCache = resolve(testdir, 'npxCache') - - t.throws( - () => fs.statSync(resolve(path, 'index.js')), - { code: 'ENOENT' }, - 'should not have template file' - ) - - await libexec({ - ...baseOpts, - args: ['@ruyadorno/create-index'], - cache, - npxCache, - path, - runPath, - }) - - t.ok(fs.statSync(resolve(path, 'index.js')).isFile(), 'ran create pkg') - fs.unlinkSync(resolve(path, 'index.js')) - - await libexec({ - ...baseOpts, - args: ['@ruyadorno/create-index'], - cache, - npxCache, - path, - runPath, - }) - - t.ok(fs.statSync(resolve(path, 'index.js')).isFile(), 'ran create pkg again') -}) - -t.test('run multiple from registry', async t => { - const testdir = t.testdir({ - cache: {}, - npxCache: {}, - work: {}, - }) - const path = resolve(testdir, 'work') - const runPath = path - const cache = resolve(testdir, 'cache') - const npxCache = resolve(testdir, 'npxCache') - - t.throws( - () => fs.statSync(resolve(path, 'index.js')), - { code: 'ENOENT' }, - 'should not have index template file' - ) - - t.throws( - () => fs.statSync(resolve(path, 'test.js')), - { code: 'ENOENT' }, - 'should not have test template file' - ) - - await libexec({ - ...baseOpts, - packages: ['@ruyadorno/create-test', '@ruyadorno/create-index'], - call: 'create-test && create-index', - cache, - npxCache, - path, - runPath, - }) - - t.ok(fs.statSync(resolve(path, 'index.js')).isFile(), 'ran index pkg') - t.ok(fs.statSync(resolve(path, 'test.js')).isFile(), 'ran test pkg') -}) +const { setup } = require('./fixtures/setup.js') t.test('no args', async t => { - const path = t.testdir({}) - const runPath = path - const mockexec = t.mock('../lib/index.js', { - '../lib/run-script': ({ args }) => { - t.ok(args.length === 0, 'should call run-script with no args') - }, - }) - - await mockexec({ - ...baseOpts, - path, - runPath, - }) -}) - -t.test('prompt, accepts', async t => { - const testdir = t.testdir({ - cache: {}, - npxCache: {}, - work: {}, - }) - const path = resolve(testdir, 'work') - const runPath = path - const cache = resolve(testdir, 'cache') - const npxCache = resolve(testdir, 'npxCache') - t.test('with clearProgress function', async t => { - const mockexec = t.mock('../lib/index.js', { - 'ci-info': { isCI: false }, - npmlog: { - clearProgress () { - t.ok(true, 'should call clearProgress function') - }, - disableProgress () {}, - enableProgress () {}, - }, - read (opts, cb) { - cb(null, 'y') - }, - '../lib/no-tty.js': () => false, - }) - - await mockexec({ - ...baseOpts, - args: ['@ruyadorno/create-index'], - cache, - npxCache, - path, - runPath, - yes: undefined, - }) - - const installedDir = resolve(npxCache, - '0e8e15840a234288/node_modules/@ruyadorno/create-index/package.json') - t.ok(fs.statSync(installedDir).isFile(), 'installed required packages') - }) - - t.test('without clearProgress function', async t => { - const mockexec = t.mock('../lib/index.js', { - 'ci-info': { isCI: false }, - read (opts, cb) { - cb(null, 'y') - }, - '../lib/no-tty.js': () => false, - }) - - await mockexec({ - ...baseOpts, - args: ['@ruyadorno/create-index'], - cache, - npxCache, - path, - runPath, - yes: undefined, - }) - - const installedDir = resolve(npxCache, - '0e8e15840a234288/node_modules/@ruyadorno/create-index/package.json') - t.ok(fs.statSync(installedDir).isFile(), 'installed required packages') - }) -}) - -t.test('prompt, refuses', async t => { - const testdir = t.testdir({ - cache: {}, - npxCache: {}, - work: {}, - }) - const path = resolve(testdir, 'work') - const runPath = path - const cache = resolve(testdir, 'cache') - const npxCache = resolve(testdir, 'npxCache') - t.test('with clearProgress function', async t => { - const mockexec = t.mock('../lib/index.js', { - 'ci-info': { isCI: false }, - npmlog: { - clearProgress () { - t.ok(true, 'should call clearProgress function') - }, - disableProgess () {}, - }, - read (opts, cb) { - cb(null, 'n') - }, - '../lib/no-tty.js': () => false, - }) - - await t.rejects( - mockexec({ - ...baseOpts, - args: ['@ruyadorno/create-index'], - cache, - npxCache, - path, - runPath, - yes: undefined, - }), - /canceled/, - 'should throw with canceled error' - ) - - const installedDir = resolve(npxCache, - '0e8e15840a234288/node_modules/@ruyadorno/create-index/package.json') - - t.throws( - () => fs.statSync(installedDir), - { code: 'ENOENT' }, - 'should not have installed required packages' - ) - }) + t.plan(1) - t.test('without clearProgress function', async t => { - const mockexec = t.mock('../lib/index.js', { - 'ci-info': { isCI: false }, - read (opts, cb) { - cb(null, 'n') - }, - '../lib/no-tty.js': () => false, - }) - - await t.rejects( - mockexec({ - ...baseOpts, - args: ['@ruyadorno/create-index'], - cache, - npxCache, - path, - runPath, - yes: undefined, - }), - /canceled/, - 'should throw with canceled error' - ) - - const installedDir = resolve(npxCache, - '0e8e15840a234288/node_modules/@ruyadorno/create-index/package.json') - - t.throws( - () => fs.statSync(installedDir), - { code: 'ENOENT' }, - 'should not have installed required packages' - ) - }) -}) - -t.test('prompt, -n', async t => { - const testdir = t.testdir({ - cache: {}, - npxCache: {}, - work: {}, - }) - const path = resolve(testdir, 'work') - const runPath = path - const cache = resolve(testdir, 'cache') - const npxCache = resolve(testdir, 'npxCache') - - await t.rejects( - libexec({ - ...baseOpts, - args: ['@ruyadorno/create-index'], - cache, - npxCache, - path, - runPath, - yes: false, - }), - /canceled/, - 'should throw with canceled error' - ) - - const installedDir = resolve(npxCache, - '0e8e15840a234288/node_modules/@ruyadorno/create-index/package.json') - - t.throws( - () => fs.statSync(installedDir), - { code: 'ENOENT' }, - 'should not have installed required packages' - ) -}) - -t.test('no prompt if no tty', async t => { - const testdir = t.testdir({ - cache: {}, - npxCache: {}, - work: {}, - }) - const path = resolve(testdir, 'work') - const runPath = path - const cache = resolve(testdir, 'cache') - const npxCache = resolve(testdir, 'npxCache') - const mockexec = t.mock('../lib/index.js', { - '../lib/no-tty.js': () => true, - }) - - await mockexec({ - ...baseOpts, - args: ['@ruyadorno/create-index'], - cache, - npxCache, - path, - runPath, - yes: undefined, - }) - - const installedDir = resolve(npxCache, - '0e8e15840a234288/node_modules/@ruyadorno/create-index/package.json') - t.ok(fs.statSync(installedDir).isFile(), 'installed required packages') -}) - -t.test('no prompt if CI', async t => { - const testdir = t.testdir({ - cache: {}, - npxCache: {}, - work: {}, - }) - const path = resolve(testdir, 'work') - const runPath = path - const cache = resolve(testdir, 'cache') - const npxCache = resolve(testdir, 'npxCache') - const mockexec = t.mock('../lib/index.js', { - 'ci-info': { isCI: true }, - }) - - await mockexec({ - ...baseOpts, - args: ['@ruyadorno/create-index'], - cache, - npxCache, - path, - runPath, - yes: undefined, - }) - - const installedDir = resolve(npxCache, - '0e8e15840a234288/node_modules/@ruyadorno/create-index/package.json') - t.ok(fs.statSync(installedDir).isFile(), 'installed required packages') -}) - -t.test('no prompt if CI, multiple packages', async t => { - const testdir = t.testdir({ - cache: {}, - npxCache: {}, - work: {}, - }) - const path = resolve(testdir, 'work') - const runPath = path - const cache = resolve(testdir, 'cache') - const npxCache = resolve(testdir, 'npxCache') - const mockexec = t.mock('../lib/index.js', { - 'ci-info': { isCI: true }, - 'proc-log': { - warn (title, msg) { - t.equal(title, 'exec', 'should warn exec title') - // this message is nondeterministic as it queries manifests so we just - // test the constituent parts - t.match( - msg, - 'The following packages were not found and will be installed:', - 'should warn installing packages' - ) - t.match(msg, '@ruyadorno/create-index@1.0.0', 'includes package being installed') - t.match(msg, '@ruyadorno/create-test@1.0.0', 'includes package being installed') + const { exec } = setup(t, { + mocks: { + '../../lib/run-script': ({ args }) => { + t.ok(args.length === 0, 'should call run-script with no args') }, }, }) - await mockexec({ - ...baseOpts, - call: 'create-index', - packages: ['@ruyadorno/create-index', '@ruyadorno/create-test'], - cache, - npxCache, - path, - runPath, - yes: undefined, - }) -}) - -t.test('defaults', async t => { - const testdir = t.testdir({ - cache: {}, - npxCache: {}, - work: {}, - }) - const cache = resolve(testdir, 'cache') - const npxCache = resolve(testdir, 'npxCache') - const workdir = resolve(testdir, 'work') - - const cwd = process.cwd() - process.chdir(workdir) - t.teardown(() => { - process.chdir(cwd) - }) - - await libexec({ - args: ['@ruyadorno/create-index'], - cache, - npxCache, - yes: true, - }) - - t.ok(fs.statSync(resolve(workdir, 'index.js')).isFile(), - 'ran create-index pkg') -}) - -t.test('scriptShell default value', t => { - t.test('/bin/sh platforms', t => { - t.plan(1) - const mockexec = t.mock('../lib/index.js', { - '../lib/is-windows.js': false, - '../lib/run-script.js': (opt) => { - t.equal(opt.scriptShell, 'sh', 'should use expected shell value') - }, - }) - mockexec({ args: [], runPath: t.testDirName }) - }) - - t.test('win32 defined ComSpec env var', t => { - t.plan(1) - const comspec = process.env.ComSpec - process.env.ComSpec = 'CMD' - const mockexec = t.mock('../lib/index.js', { - '../lib/is-windows.js': true, - '../lib/run-script.js': ({ scriptShell }) => { - t.equal(scriptShell, 'CMD', 'should use expected ComSpec value') - process.env.ComSpec = comspec - }, - }) - mockexec({ args: [], runPath: t.testDirName }) - }) - - t.test('win32 cmd', t => { - t.plan(1) - const comspec = process.env.ComSpec - process.env.ComSpec = '' - const mockexec = t.mock('../lib/index.js', { - '../lib/is-windows.js': true, - '../lib/run-script.js': ({ scriptShell }) => { - t.equal(scriptShell, 'cmd', 'should use expected cmd default value') - process.env.ComSpec = comspec - }, - }) - mockexec({ args: [], runPath: t.testDirName }) - }) - - t.end() -}) - -t.test('workspaces', async t => { - const pkg = { - name: '@ruyadorno/create-index', - version: '2.0.0', - bin: { - 'create-index': './index.js', - }, - } - const path = t.testdir({ - cache: {}, - npxCache: {}, - node_modules: { - '.bin': {}, - '@ruyadorno': { - 'create-index': { - 'package.json': JSON.stringify(pkg), - 'index.js': `#!/usr/bin/env node - require('fs').writeFileSync('resfile', 'LOCAL PKG')`, - }, - }, - a: t.fixture('symlink', '../a'), - }, - 'package.json': JSON.stringify({ - name: 'project', - workspaces: ['a'], - }), - a: { - 'package.json': JSON.stringify({ - name: 'a', - version: '1.0.0', - dependencies: { - '@ruyadorno/create-index': '^2.0.0', - }, - }), - }, - }) - const runPath = path - const cache = resolve(path, 'cache') - const npxCache = resolve(path, 'npxCache') - - const executable = - resolve(path, 'node_modules/@ruyadorno/create-index/index.js') - fs.chmodSync(executable, 0o775) - - await binLinks({ - path: resolve(path, 'node_modules/@ruyadorno/create-index'), - pkg, - }) - - // runs at the project level - await libexec({ - ...baseOpts, - args: ['create-index'], - localBin: resolve(path, 'node_modules/.bin'), - cache, - npxCache, - path, - runPath, - }) - - const res = fs.readFileSync(resolve(path, 'resfile')).toString() - t.equal(res, 'LOCAL PKG', 'should run existing bin from project level') - - // runs at the child workspace level - await libexec({ - ...baseOpts, - args: ['create-index'], - cache, - npxCache, - localBin: resolve(path, 'a/node_modules/.bin'), - path: resolve(path, 'a'), - runPath: resolve(path, 'a'), - }) - - const wRes = fs.readFileSync(resolve(path, 'a/resfile')).toString() - t.equal(wRes, 'LOCAL PKG', 'should run existing bin from workspace level') + await exec() }) diff -Nru npm-9.1.2~ds1/node_modules/libnpmexec/test/local.js npm-9.2.0~ds1/node_modules/libnpmexec/test/local.js --- npm-9.1.2~ds1/node_modules/libnpmexec/test/local.js 1970-01-01 00:00:00.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/libnpmexec/test/local.js 2022-12-07 23:13:18.000000000 +0000 @@ -0,0 +1,370 @@ +const log = require('proc-log') +const { resolve } = require('path') +const t = require('tap') +const fs = require('fs/promises') +const { resetSeen: resetSeenLinks } = require('bin-links') +const { setup, createPkg, merge } = require('./fixtures/setup.js') + +t.test('bin in local pkg', async t => { + const { pkg, fixtures } = createPkg({ + version: '1.0.0', + name: '@npmcli/local-pkg-bin-test', + bin: { + b: 'does-not-exist.js', + a: 'local-bin-test.js', + 'a-nested': 'bin-dir/nested-bin-test.js', + 'conflicting-bin': 'conflicting-bin-test.js', + }, + files: { + 'local-bin-test.js': { key: 'local-bin', value: 'LOCAL PKG' }, + 'conflicting-bin-test.js': { key: 'conflicting-bin', value: 'LOCAL PKG' }, + 'bin-dir': { + 'nested-bin-test.js': { key: 'nested-bin', value: 'LOCAL PKG' }, + }, + }, + }) + + const existingPkg = createPkg({ + name: 'pkg-with-conflicting-bin', + localVersion: '1.0.0', + bin: { + 'conflicting-bin': 'index.js', + }, + files: { + 'index.js': { key: 'existing-bin', value: 'NODE_MODULES PKG' }, + }, + }) + + const { exec: _exec, chmod, readOutput, binLinks, path } = setup(t, { + pkg, + testdir: merge( + existingPkg.fixtures, + fixtures.packages[`@npmcli-local-pkg-bin-test-1.0.0`], + { + node_modules: { + '@npmcli': { + 'some-other-pkg-with-same-scope': {}, + }, + }, + } + ), + }) + + const localBin = resolve(path, 'node_modules', '.bin') + + await chmod('local-bin-test.js') + await chmod('conflicting-bin-test.js') + await chmod('bin-dir/nested-bin-test.js') + await chmod('node_modules/pkg-with-conflicting-bin/index.js') + + // Note that we have to resetSeenLinks after each exec since otherwise + // our non-existent file will fail when it gets attempted to get chmod'ed + // in a real world situation these would happen during different + // processes where these is no shared cache + const exec = async (...args) => { + await _exec(...args) + resetSeenLinks() + } + + await exec({ localBin, args: ['a', 'argument-a'] }) + t.match(await readOutput('local-bin'), { + value: 'LOCAL PKG', + args: ['argument-a'], + }) + t.strictSame(await fs.readdir(resolve(path, 'node_modules', '.bin')), []) + + await exec({ localBin, args: ['a-nested', 'argument-a-nested'] }) + t.strictSame(await fs.readdir(resolve(path, 'node_modules', '.bin')), []) + t.match(await readOutput('nested-bin'), { + value: 'LOCAL PKG', + args: ['argument-a-nested'], + }) + + // now link a bin which will conflict with the one we try to run next + await binLinks(existingPkg.pkg) + + t.match(await fs.readdir(resolve(path, 'node_modules', '.bin')), ['conflicting-bin']) + await exec({ localBin, args: ['conflicting-bin'] }) + // local bin was called for conflicting-bin + t.match(await readOutput('conflicting-bin'), { + value: 'LOCAL PKG', + }) + + await t.rejects(() => exec({ localBin, args: ['b'] }), /command failed/) +}) + +t.test('locally available pkg - by scoped name only', async t => { + const { pkg, fixtures } = createPkg({ + name: '@npmcli/npx-local-test', + localVersion: '2.0.0', + }) + + const { exec, chmod, binLinks, readOutput } = setup(t, { + pkg, + testdir: fixtures, + }) + + await chmod() + await binLinks() + await exec({ args: ['@npmcli/npx-local-test', 'arg'] }) + + t.match(await readOutput(), { + value: 'local-2.0.0', + args: ['arg'], + }) +}) + +t.test('locally available pkg - by name', async t => { + const { pkg, fixtures } = createPkg({ + name: '@npmcli/create-index', + localVersion: '2.0.0', + }) + + const { chmod, binLinks, exec, readOutput } = setup(t, { + pkg, + testdir: fixtures, + }) + + await chmod() + await binLinks() + await exec({ + packages: ['@npmcli/create-index'], + call: 'create-index arg', + }) + + t.match(await readOutput(), { + value: 'local-2.0.0', + args: ['arg'], + }) +}) + +t.test('locally available pkg - by version', async t => { + const { pkg, fixtures } = createPkg({ + name: '@npmcli/create-index', + localVersion: '1.0.0', + }) + const { chmod, binLinks, exec, readOutput } = setup(t, { + pkg, + testdir: fixtures, + }) + + await chmod() + await binLinks() + await exec({ args: ['@npmcli/create-index@1.0.0'] }) + + t.match(await readOutput(), { + value: 'local-1.0.0', + args: [], + }) +}) + +t.test('locally available pkg - by range', async t => { + const { pkg, fixtures } = createPkg({ + name: '@npmcli/create-index', + localVersion: '2.0.0', + }) + const { chmod, binLinks, exec, readOutput } = setup(t, { + pkg, + testdir: fixtures, + }) + + await chmod() + await binLinks() + await exec({ + packages: ['@npmcli/create-index@^2.0.0'], + call: 'create-index resfile', + }) + + t.match(await readOutput(), { + value: 'local-2.0.0', + args: ['resfile'], + }) +}) + +t.test('locally available pkg - by latest tag', async t => { + const { pkg, fixtures, package } = createPkg({ + name: '@npmcli/create-index', + localVersion: '1.0.0', + }) + const { chmod, binLinks, exec, readOutput, registry, path } = setup(t, { + pkg, + testdir: merge(fixtures, { + node_modules: { + '.package-lock.json': { + name: 'lock', + lockfileVersion: 3, + requires: true, + packages: { + [`node_modules/${pkg.name}`]: { + ...pkg, + resolved: `{REGISTRY}/${pkg.name}/-/create-index-${pkg.version}.tgz`, + }, + }, + }, + }, + }), + }) + + // latest forces the manifest to be fetched + await package({ registry, path, times: 1, tarballs: [] }) + + await chmod() + await binLinks() + await exec({ + packages: ['@npmcli/create-index@latest'], + call: 'create-index resfile', + }) + + t.match(await readOutput(), { + value: 'local-1.0.0', + args: ['resfile'], + }) +}) + +t.test('multiple local pkgs', async t => { + const pkgFoo = createPkg({ + name: '@npmcli/create-foo', + localVersion: '2.0.0', + }) + + const pkgBar = createPkg({ + name: '@npmcli/create-bar', + localVersion: '1.0.0', + }) + + const { readOutput, chmod, exec, binLinks } = setup(t, { + pkg: [pkgFoo.pkg, pkgBar.pkg], + testdir: merge(pkgFoo.fixtures, pkgBar.fixtures), + }) + + await chmod() + await binLinks() + + await exec({ + packages: ['@npmcli/create-foo', '@npmcli/create-bar'], + call: 'create-foo resfile && create-bar bar', + }) + + t.match(await readOutput('@npmcli-create-foo'), { + value: 'local-2.0.0', + args: ['resfile'], + }) + t.match(await readOutput('@npmcli-create-bar'), { + value: 'local-1.0.0', + args: ['bar'], + }) +}) + +t.test('no npxCache', async t => { + const { chmod, exec, path } = setup(t, { + testdir: { + npxCache: null, + a: { + 'package.json': { + name: 'a', + bin: { + a: './index.js', + }, + }, + 'index.js': { key: 'a', value: 'LOCAL PKG' }, + }, + }, + }) + + await chmod('a/index.js') + + await t.rejects(() => exec({ + args: [`file:${resolve(path, 'a')}`, 'resfile'], + }), /Must provide a valid npxCache path/) +}) + +t.test('local file system path', async t => { + const { exec, chmod, readOutput, path } = setup(t, { + mocks: { + 'ci-info': { isCI: true }, + 'proc-log': { + ...log, + warn () { + t.fail('should not warn about local file package install') + }, + }, + }, + testdir: { + a: { + 'package.json': { + name: 'a', + bin: { + a: './index.js', + }, + }, + 'index.js': { key: 'a', value: 'LOCAL PKG' }, + }, + }, + }) + + await chmod('a/index.js') + + await exec({ + args: [`file:${resolve(path, 'a')}`, 'resfile'], + + }) + + t.match(await readOutput('a'), { + value: 'LOCAL PKG', + args: ['resfile'], + }) +}) + +t.test('global space pkg', async t => { + const { pkg, fixtures } = createPkg({ + name: 'a', + localVersion: '1.0.0', + }) + + const { exec, chmod, readOutput, binLinks } = setup(t, { + pkg, + global: true, + testdir: fixtures, + }) + + await chmod() + await binLinks() + + await exec({ + args: ['a', 'resfile'], + }) + + t.match(await readOutput(), { + value: 'local-1.0.0', + args: [], + created: 'global/node_modules/a/bin-file.js', + }) +}) + +t.test('global scoped pkg', async t => { + const { pkg, fixtures, package } = createPkg({ + localVersion: '1.0.0', + name: '@npmcli/create-test', + }) + + const { chmod, exec, readOutput, binLinks, registry, path } = setup(t, { + pkg, + global: true, + testdir: fixtures, + }) + + await chmod() + await binLinks() + + await package({ registry, path, times: 1, tarballs: [] }) + + await exec({ + args: ['@npmcli/create-test', 'resfile'], + }) + + t.match(await readOutput(), { + value: 'local-1.0.0', + args: ['resfile'], + created: 'global/node_modules/@npmcli/create-test/bin-file.js', + }) +}) diff -Nru npm-9.1.2~ds1/node_modules/libnpmexec/test/prompt.js npm-9.2.0~ds1/node_modules/libnpmexec/test/prompt.js --- npm-9.1.2~ds1/node_modules/libnpmexec/test/prompt.js 1970-01-01 00:00:00.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/libnpmexec/test/prompt.js 2022-12-07 23:13:18.000000000 +0000 @@ -0,0 +1,384 @@ +const log = require('proc-log') +const { resolve } = require('path') +const t = require('tap') +const fs = require('fs/promises') +const { setup, createPkg, merge } = require('./fixtures/setup.js') + +t.test('prompt, accepts', async t => { + t.test('with clearProgress function', async t => { + const { pkg, package, fixtures } = createPkg({ + name: '@npmcli/create-index', + version: '1.0.0', + }) + const { exec, path, registry } = setup(t, { + testdir: fixtures, + mocks: { + 'ci-info': { isCI: false }, + '../../lib/no-tty.js': () => false, + npmlog: { + clearProgress () { + t.ok(true, 'should call clearProgress function') + }, + disableProgress () {}, + enableProgress () {}, + }, + read (_, cb) { + cb(null, 'y') + }, + }, + }) + + await package({ registry, path }) + + await exec({ + args: ['@npmcli/create-index'], + yes: undefined, + }) + + const installedDir = `npxCache/e7ce50d8d2d8ec11/node_modules/${pkg.name}/package.json` + t.ok(await fs.stat(resolve(path, installedDir)).then(f => f.isFile())) + }) + + t.test('without clearProgress function', async t => { + const { pkg, package, fixtures } = createPkg({ + name: '@npmcli/create-index', + version: '1.0.0', + }) + const { exec, path, registry } = setup(t, { + testdir: fixtures, + mocks: { + 'ci-info': { isCI: false }, + '../../lib/no-tty.js': () => false, + read (_, cb) { + cb(null, 'y') + }, + }, + }) + + await package({ registry, path }) + + await exec({ + args: ['@npmcli/create-index'], + yes: undefined, + }) + + const installedDir = `npxCache/e7ce50d8d2d8ec11/node_modules/${pkg.name}/package.json` + t.ok(await fs.stat(resolve(path, installedDir)).then(f => f.isFile())) + }) +}) + +t.test('prompt, refuses', async t => { + t.test('with clearProgress function', async t => { + t.plan(3) + + const { pkg, package, fixtures } = createPkg({ + name: '@npmcli/create-index', + version: '1.0.0', + }) + const { exec, path, registry } = setup(t, { + testdir: fixtures, + mocks: { + 'ci-info': { isCI: false }, + npmlog: { + clearProgress () { + t.ok(true, 'should call clearProgress function') + }, + disableProgess () {}, + }, + read (_, cb) { + cb(null, 'n') + }, + '../../lib/no-tty.js': () => false, + }, + }) + + await package({ registry, path, times: 1, tarballs: [] }) + + await t.rejects( + exec({ + args: ['@npmcli/create-index'], + yes: undefined, + }), + /canceled/, + 'should throw with canceled error' + ) + + const installedDir = `npxCache/e7ce50d8d2d8ec11/node_modules/${pkg.name}/package.json` + t.rejects( + () => fs.stat(resolve(path, installedDir)), + { code: 'ENOENT' } + ) + }) + + t.test('without clearProgress function', async t => { + const { pkg, package, fixtures } = createPkg({ + name: '@npmcli/create-index', + version: '1.0.0', + }) + const { exec, path, registry } = setup(t, { + testdir: fixtures, + mocks: { + 'ci-info': { isCI: false }, + read (_, cb) { + cb(null, 'n') + }, + '../../lib/no-tty.js': () => false, + }, + }) + + await package({ registry, path, times: 1, tarballs: [] }) + + await t.rejects( + exec({ + args: ['@npmcli/create-index'], + yes: undefined, + }), + /canceled/, + 'should throw with canceled error' + ) + + const installedDir = `npxCache/e7ce50d8d2d8ec11/node_modules/${pkg.name}/package.json` + t.rejects( + () => fs.stat(resolve(path, installedDir)), + { code: 'ENOENT' } + ) + }) +}) + +t.test('prompt, -n', async t => { + const { pkg, package, fixtures } = createPkg({ + name: '@npmcli/create-index', + version: '1.0.0', + }) + const { exec, path, registry } = setup(t, { + testdir: fixtures, + }) + + await package({ registry, path, times: 1, tarballs: [] }) + + await t.rejects( + exec({ + args: ['@npmcli/create-index'], + yes: false, + }), + /canceled/, + 'should throw with canceled error' + ) + + const installedDir = `npxCache/e7ce50d8d2d8ec11/node_modules/${pkg.name}/package.json` + t.rejects( + () => fs.stat(resolve(path, installedDir)), + { code: 'ENOENT' } + ) +}) + +t.test('no prompt if no tty', async t => { + const { pkg, package, fixtures } = createPkg({ + name: '@npmcli/create-index', + version: '1.0.0', + }) + const { exec, path, registry } = setup(t, { + testdir: fixtures, + mocks: { '../../lib/no-tty.js': () => true }, + }) + + await package({ registry, path }) + + await exec({ + args: ['@npmcli/create-index'], + yes: undefined, + }) + + const installedDir = `npxCache/e7ce50d8d2d8ec11/node_modules/${pkg.name}/package.json` + t.ok(await fs.stat(resolve(path, installedDir)).then(f => f.isFile())) +}) + +t.test('no prompt if CI', async t => { + const { pkg, package, fixtures } = createPkg({ + name: '@npmcli/create-index', + version: '1.0.0', + }) + const { exec, path, registry } = setup(t, { + testdir: fixtures, + mocks: { 'ci-info': { isCI: true } }, + }) + + await package({ registry, path }) + + await exec({ + args: ['@npmcli/create-index'], + yes: undefined, + }) + + const installedDir = `npxCache/e7ce50d8d2d8ec11/node_modules/${pkg.name}/package.json` + t.ok(await fs.stat(resolve(path, installedDir)).then(f => f.isFile())) +}) + +t.test('no prompt if CI, multiple packages', async t => { + t.plan(4) + + const pkgIndex = createPkg({ + name: '@npmcli/create-index', + version: '1.0.0', + }) + const pkgTest = createPkg({ + name: '@npmcli/create-test', + version: '1.0.0', + }) + const { exec, path, registry } = setup(t, { + testdir: merge(pkgIndex.fixtures, pkgTest.fixtures), + mocks: { + 'ci-info': { isCI: true }, + 'proc-log': { + ...log, + warn (title, msg) { + t.equal(title, 'exec', 'should warn exec title') + // this message is nondeterministic as it queries manifests so we just + // test the constituent parts + t.match( + msg, + 'The following packages were not found and will be installed:', + 'should warn installing packages' + ) + t.match(msg, '@npmcli/create-index@1.0.0', 'includes package being installed') + t.match(msg, '@npmcli/create-test@1.0.0', 'includes package being installed') + }, + }, + }, + }) + + await pkgIndex.package({ path, registry }) + await pkgTest.package({ path, registry }) + + await exec({ + call: 'create-index', + packages: ['@npmcli/create-index', '@npmcli/create-test'], + yes: undefined, + }) +}) + +t.test('defaults', async t => { + const { pkg, fixtures, package } = createPkg({ + name: '@npmcli/create-index', + version: '1.0.0', + }) + const { exec, path, registry, readOutput } = setup(t, { + pkg, + defaults: false, + execPath: '../../../lib/index.js', + testdir: { + ...fixtures, + work: {}, + }, + }) + + const workDir = resolve(path, 'work') + const cwd = process.cwd() + process.chdir(workDir) + t.teardown(() => process.chdir(cwd)) + + await package({ registry, path }) + + await exec({ + args: ['@npmcli/create-index'], + yes: true, + }) + + t.match(await readOutput('', { root: workDir }), { + value: 'packages-1.0.0', + args: [], + }) +}) + +t.test('scriptShell default value', async t => { + await t.test('/bin/sh platforms', async t => { + t.plan(1) + const mockexec = t.mock('../lib/index.js', { + '../lib/is-windows.js': false, + '../lib/run-script.js': (opt) => { + t.equal(opt.scriptShell, 'sh', 'should use expected shell value') + }, + }) + await mockexec({ args: [], runPath: t.testDirName }) + }) + + await t.test('win32 defined ComSpec env var', async t => { + t.plan(1) + const comspec = process.env.ComSpec + process.env.ComSpec = 'CMD' + const mockexec = t.mock('../lib/index.js', { + '../lib/is-windows.js': true, + '../lib/run-script.js': ({ scriptShell }) => { + t.equal(scriptShell, 'CMD', 'should use expected ComSpec value') + process.env.ComSpec = comspec + }, + }) + await mockexec({ args: [], runPath: t.testDirName }) + }) + + await t.test('win32 cmd', async t => { + t.plan(1) + const comspec = process.env.ComSpec + process.env.ComSpec = '' + const mockexec = t.mock('../lib/index.js', { + '../lib/is-windows.js': true, + '../lib/run-script.js': ({ scriptShell }) => { + t.equal(scriptShell, 'cmd', 'should use expected cmd default value') + process.env.ComSpec = comspec + }, + }) + await mockexec({ args: [], runPath: t.testDirName }) + }) +}) + +t.test('workspaces', async t => { + const { pkg, fixtures } = createPkg({ + name: '@npmcli/create-index', + localVersion: '2.0.0', + }) + + const { path, exec, chmod, binLinks, readOutput } = setup(t, { + pkg, + testdir: merge(fixtures, { + 'package.json': { + workspaces: ['a'], + dependencies: null, + }, + a: { + 'package.json': { + name: 'a', + version: '1.0.0', + dependencies: fixtures['package.json'].dependencies, + }, + }, + node_modules: { + a: t.fixture('symlink', '../a'), + }, + }), + }) + + await chmod() + await binLinks() + + // runs at the project level + await exec({ + args: ['create-index'], + localBin: resolve(path, 'node_modules/.bin'), + }) + + t.match(await readOutput(), { + value: 'local-2.0.0', + }) + + // runs at the child workspace level + await exec({ + args: ['create-index'], + localBin: resolve(path, 'a/node_modules/.bin'), + path: resolve(path, 'a'), + runPath: resolve(path, 'a'), + }) + + t.match(await readOutput('', { root: resolve(path, 'a') }), { + value: 'local-2.0.0', + }) +}) Binary files /tmp/tmp43gm7mng/vBAia6DgzR/npm-9.1.2~ds1/node_modules/libnpmexec/test/registry/content/ruyadorno/create-index/-/create-index-1.0.0.tgz and /tmp/tmp43gm7mng/ShmCSY3pG3/npm-9.2.0~ds1/node_modules/libnpmexec/test/registry/content/ruyadorno/create-index/-/create-index-1.0.0.tgz differ diff -Nru npm-9.1.2~ds1/node_modules/libnpmexec/test/registry/content/ruyadorno/create-index.json npm-9.2.0~ds1/node_modules/libnpmexec/test/registry/content/ruyadorno/create-index.json --- npm-9.1.2~ds1/node_modules/libnpmexec/test/registry/content/ruyadorno/create-index.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/libnpmexec/test/registry/content/ruyadorno/create-index.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,81 +0,0 @@ -{ - "_id": "@ruyadorno/create-index", - "name": "@ruyadorno/create-index", - "dist-tags": { - "latest": "1.0.0" - }, - "versions": { - "1.0.0": { - "name": "@ruyadorno/create-index", - "version": "1.0.0", - "description": "Create an empty index.js file", - "bin": { - "create-index": "create-index.js" - }, - "keywords": [ - "init", - "create", - "index" - ], - "author": { - "name": "Ruy Adorno", - "url": "https://ruyadorno.com" - }, - "license": "MIT", - "gitHead": "0c1b6a4c503d8565439b2b194b4691824a1bc902", - "_id": "@ruyadorno/create-index@1.0.0", - "_nodeVersion": "15.13.0", - "_npmVersion": "7.9.0", - "dist": { - "integrity": "sha512-2T2JRYWtB9/wN8Vr/SRDcjIbKD5IjR5joO8iCCCYjXfDRZ2lYBSnZQ2kGp34F+T8OEavzJfj9sxNt9Y7QT7Oaw==", - "shasum": "a7d15d2ca78c496685b7b2bc24599d4e0983783c", - "tarball": "https://registry.npmjs.org/@ruyadorno/create-index/-/create-index-1.0.0.tgz", - "fileCount": 3, - "unpackedSize": 565, - "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgd0fRCRA9TVsSAnZWagAA9ysP/i22HySX0+RYcHUldWcv\neDgd24/wQqNEsQiTrGpIRSSorqbrC5+xoZfFzbvbUA24JaFChgQE1rRtYDab\ntjo5asfUqCspru1X05D3T3lmy3NyBCShqzwsZo88stj8L1w8DcnmU83als4h\n6DqxmwQbPMn+hd5gKtr6ZsUwHZRc/9dXWjn6GI3ztAla73RKXQ4D9Gs/ULyo\nNwS6a/CqThqu4atlA6ZGXum72XsFYSRB712N3Q1l0+8T9L3lAWuitGx/K8L/\n95gxU0e6ME+Wiin62SxH6QYWuVIKD04UNkz14dzfI2RIjT2NDbX6l308uSza\nbWz6aro4w9kUJviDX/hk/o469d+EQ87L+vpFrLDbSfZg8RtvSptHCDdM6mNw\n05xNFji33ujMX54HyGxplioAgnE5X2ZTQuBymsiINHq5gxCn8MSaUxiX45yB\n7Bhf1rWbp5KgiUa0kGXV4eoAutP6HWs1avzkHi9q2xS61wMBdPPHX5GsTTqe\nI+4mdgpNOdQLQjLyCp+ydvSqTHtVHkHDrBJzgkOjDWC7YzDcbzFQt6Fn6uc/\nA4kTlU1yTD2lPz9ICNI6BwqM7aOa9qCVkBL7vWaUUpxblRpzfbKmCtEi704h\nIJ6YZ3z6xwTl59aMXiInOLFsb7upEwtTXTAWqDlsJmTYS7hsVi3gY7wqYp1p\nMwwm\r\n=rrJ8\r\n-----END PGP SIGNATURE-----\r\n" - }, - "_npmUser": { - "name": "ruyadorno", - "email": "ruyadorno@hotmail.com" - }, - "directories": {}, - "maintainers": [ - { - "name": "ruyadorno", - "email": "ruyadorno@hotmail.com" - } - ], - "_npmOperationalInternal": { - "host": "s3://npm-registry-packages", - "tmp": "tmp/create-index_1.0.0_1618429905498_0.11104270815832784" - }, - "_hasShrinkwrap": false - } - }, - "time": { - "created": "2021-04-14T19:51:45.442Z", - "1.0.0": "2021-04-14T19:51:45.650Z", - "modified": "2021-04-14T19:51:47.833Z" - }, - "maintainers": [ - { - "name": "ruyadorno", - "email": "ruyadorno@hotmail.com" - } - ], - "description": "Create an empty index.js file", - "keywords": [ - "init", - "create", - "index" - ], - "author": { - "name": "Ruy Adorno", - "url": "https://ruyadorno.com" - }, - "license": "MIT", - "readme": "# create-index\n\nPuts an empty `index.js` into current working dir. Meant for testing only.\n\n## Usage\n\n`npm exec @ruyadorno/create-index`\n\n", - "readmeFilename": "README.md", - "_cached": false, - "_contentLength": 0 -} diff -Nru npm-9.1.2~ds1/node_modules/libnpmexec/test/registry/content/ruyadorno/create-index.min.json npm-9.2.0~ds1/node_modules/libnpmexec/test/registry/content/ruyadorno/create-index.min.json --- npm-9.1.2~ds1/node_modules/libnpmexec/test/registry/content/ruyadorno/create-index.min.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/libnpmexec/test/registry/content/ruyadorno/create-index.min.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ -{ - "name": "@ruyadorno/create-index", - "dist-tags": { - "latest": "1.0.0" - }, - "versions": { - "1.0.0": { - "name": "@ruyadorno/create-index", - "version": "1.0.0", - "bin": { - "create-index": "create-index.js" - }, - "dist": { - "integrity": "sha512-2T2JRYWtB9/wN8Vr/SRDcjIbKD5IjR5joO8iCCCYjXfDRZ2lYBSnZQ2kGp34F+T8OEavzJfj9sxNt9Y7QT7Oaw==", - "shasum": "a7d15d2ca78c496685b7b2bc24599d4e0983783c", - "tarball": "https://registry.npmjs.org/@ruyadorno/create-index/-/create-index-1.0.0.tgz", - "fileCount": 3, - "unpackedSize": 565, - "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgd0fRCRA9TVsSAnZWagAA9ysP/i22HySX0+RYcHUldWcv\neDgd24/wQqNEsQiTrGpIRSSorqbrC5+xoZfFzbvbUA24JaFChgQE1rRtYDab\ntjo5asfUqCspru1X05D3T3lmy3NyBCShqzwsZo88stj8L1w8DcnmU83als4h\n6DqxmwQbPMn+hd5gKtr6ZsUwHZRc/9dXWjn6GI3ztAla73RKXQ4D9Gs/ULyo\nNwS6a/CqThqu4atlA6ZGXum72XsFYSRB712N3Q1l0+8T9L3lAWuitGx/K8L/\n95gxU0e6ME+Wiin62SxH6QYWuVIKD04UNkz14dzfI2RIjT2NDbX6l308uSza\nbWz6aro4w9kUJviDX/hk/o469d+EQ87L+vpFrLDbSfZg8RtvSptHCDdM6mNw\n05xNFji33ujMX54HyGxplioAgnE5X2ZTQuBymsiINHq5gxCn8MSaUxiX45yB\n7Bhf1rWbp5KgiUa0kGXV4eoAutP6HWs1avzkHi9q2xS61wMBdPPHX5GsTTqe\nI+4mdgpNOdQLQjLyCp+ydvSqTHtVHkHDrBJzgkOjDWC7YzDcbzFQt6Fn6uc/\nA4kTlU1yTD2lPz9ICNI6BwqM7aOa9qCVkBL7vWaUUpxblRpzfbKmCtEi704h\nIJ6YZ3z6xwTl59aMXiInOLFsb7upEwtTXTAWqDlsJmTYS7hsVi3gY7wqYp1p\nMwwm\r\n=rrJ8\r\n-----END PGP SIGNATURE-----\r\n" - } - } - }, - "modified": "2021-04-14T19:51:47.833Z", - "_cached": false, - "_contentLength": 1423 -} \ No newline at end of file Binary files /tmp/tmp43gm7mng/vBAia6DgzR/npm-9.1.2~ds1/node_modules/libnpmexec/test/registry/content/ruyadorno/create-test/-/create-test-1.0.0.tgz and /tmp/tmp43gm7mng/ShmCSY3pG3/npm-9.2.0~ds1/node_modules/libnpmexec/test/registry/content/ruyadorno/create-test/-/create-test-1.0.0.tgz differ diff -Nru npm-9.1.2~ds1/node_modules/libnpmexec/test/registry/content/ruyadorno/create-test.json npm-9.2.0~ds1/node_modules/libnpmexec/test/registry/content/ruyadorno/create-test.json --- npm-9.1.2~ds1/node_modules/libnpmexec/test/registry/content/ruyadorno/create-test.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/libnpmexec/test/registry/content/ruyadorno/create-test.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,81 +0,0 @@ -{ - "_id": "@ruyadorno/create-test", - "name": "@ruyadorno/create-test", - "dist-tags": { - "latest": "1.0.0" - }, - "versions": { - "1.0.0": { - "name": "@ruyadorno/create-test", - "version": "1.0.0", - "description": "Creates an empty test.js file", - "bin": { - "create-test": "create-test.js" - }, - "keywords": [ - "init", - "create", - "test" - ], - "author": { - "name": "Ruy Adorno", - "url": "https://ruyadorno.com" - }, - "license": "MIT", - "gitHead": "707aa293e34f48dcf9cb6b4b452cb1fc8e484c8b", - "_id": "@ruyadorno/create-test@1.0.0", - "_nodeVersion": "15.13.0", - "_npmVersion": "7.9.0", - "dist": { - "integrity": "sha512-WOifELHCU8nmg0yHsPbSETPaNO1orDPhTSflJsomqGFNwVS44qvkWwMPbDE3L2aAglXLf5AxUznyFkxsXgDF2w==", - "shasum": "f0f393449fe5205c54a4ca2181d8355d2372da93", - "tarball": "https://registry.npmjs.org/@ruyadorno/create-test/-/create-test-1.0.0.tgz", - "fileCount": 3, - "unpackedSize": 557, - "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgd1SICRA9TVsSAnZWagAAOa4P/jknjgmFaBWz6PCng8qV\nsdfa23GbE4MdmvpB72v6DvNjGQ+51Vgd7PBAJRo+d3LmQ0c2DE/e6PZEgam/\nOtuVbgimxPy85V1MTA66bgML4nFtEOKS/R/Z5s7wMMCrhYqKdMp6ELMUEO07\n7cDIzAmc7WeSLyzhTBC661T0nKPPAf2nKKYXLI+6RisQoXnEgZmgNyNlIt6D\nNDNTRZjaR6s1QvHgWN9h/hLAgKvgaAnSy+JOzcB+SGaClLow3svbvW+klQpA\n8afOTLV4D/pgPDGXvvwDDInH6yccYSOSNiAZgd45hsmo82xIR3n+Cod2qk9Y\njCye36nXzdQTz9A7a3SgH++DV7fA5n87GoahkpGEnKu8gjgMuE6ncDEypbTi\nM4R8JikZrScR2wWXtO+jK4f/5XHVh19ZpqdOrlxzXutkUy0/bMoHFNxcGrXB\n5D1Qk/lOpNO4rd0NoURk6OkpueHOlBHlBNxqrEsltzY2IWs+JICcFaz385H0\nKYyNQrmltEqWVgW+LeFvm3B1sLL5wySqplX/396lC6kCHZyofeeqZFcC1G+m\ntkp0iho63tlm6WjIzw6ddHWu8olNohCk4xFpvNkkZ0u9GR4BaDBRXS60AcoD\nNIYwMuUlqmXAc7ey+xNZCqXokgbtjD7aI2uIDLNUMHELxrRzBccHe76sIQit\nBeBy\r\n=u7P4\r\n-----END PGP SIGNATURE-----\r\n" - }, - "_npmUser": { - "name": "ruyadorno", - "email": "ruyadorno@hotmail.com" - }, - "directories": {}, - "maintainers": [ - { - "name": "ruyadorno", - "email": "ruyadorno@hotmail.com" - } - ], - "_npmOperationalInternal": { - "host": "s3://npm-registry-packages", - "tmp": "tmp/create-test_1.0.0_1618433159830_0.5969279363908722" - }, - "_hasShrinkwrap": false - } - }, - "time": { - "created": "2021-04-14T20:45:59.789Z", - "1.0.0": "2021-04-14T20:45:59.974Z", - "modified": "2021-04-14T20:46:02.139Z" - }, - "maintainers": [ - { - "name": "ruyadorno", - "email": "ruyadorno@hotmail.com" - } - ], - "description": "Creates an empty test.js file", - "keywords": [ - "init", - "create", - "test" - ], - "author": { - "name": "Ruy Adorno", - "url": "https://ruyadorno.com" - }, - "license": "MIT", - "readme": "# create-test\n\nPuts an empty `test.js` into current working dir. Meant for testing only.\n\n## Usage\n\n`npm exec @ruyadorno/create-test`\n\n", - "readmeFilename": "README.md", - "_cached": false, - "_contentLength": 0 -} \ No newline at end of file diff -Nru npm-9.1.2~ds1/node_modules/libnpmexec/test/registry/content/ruyadorno/create-test.min.json npm-9.2.0~ds1/node_modules/libnpmexec/test/registry/content/ruyadorno/create-test.min.json --- npm-9.1.2~ds1/node_modules/libnpmexec/test/registry/content/ruyadorno/create-test.min.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/libnpmexec/test/registry/content/ruyadorno/create-test.min.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ -{ - "name": "@ruyadorno/create-test", - "dist-tags": { - "latest": "1.0.0" - }, - "versions": { - "1.0.0": { - "name": "@ruyadorno/create-test", - "version": "1.0.0", - "bin": { - "create-test": "create-test.js" - }, - "dist": { - "integrity": "sha512-WOifELHCU8nmg0yHsPbSETPaNO1orDPhTSflJsomqGFNwVS44qvkWwMPbDE3L2aAglXLf5AxUznyFkxsXgDF2w==", - "shasum": "f0f393449fe5205c54a4ca2181d8355d2372da93", - "tarball": "https://registry.npmjs.org/@ruyadorno/create-test/-/create-test-1.0.0.tgz", - "fileCount": 3, - "unpackedSize": 557, - "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgd1SICRA9TVsSAnZWagAAOa4P/jknjgmFaBWz6PCng8qV\nsdfa23GbE4MdmvpB72v6DvNjGQ+51Vgd7PBAJRo+d3LmQ0c2DE/e6PZEgam/\nOtuVbgimxPy85V1MTA66bgML4nFtEOKS/R/Z5s7wMMCrhYqKdMp6ELMUEO07\n7cDIzAmc7WeSLyzhTBC661T0nKPPAf2nKKYXLI+6RisQoXnEgZmgNyNlIt6D\nNDNTRZjaR6s1QvHgWN9h/hLAgKvgaAnSy+JOzcB+SGaClLow3svbvW+klQpA\n8afOTLV4D/pgPDGXvvwDDInH6yccYSOSNiAZgd45hsmo82xIR3n+Cod2qk9Y\njCye36nXzdQTz9A7a3SgH++DV7fA5n87GoahkpGEnKu8gjgMuE6ncDEypbTi\nM4R8JikZrScR2wWXtO+jK4f/5XHVh19ZpqdOrlxzXutkUy0/bMoHFNxcGrXB\n5D1Qk/lOpNO4rd0NoURk6OkpueHOlBHlBNxqrEsltzY2IWs+JICcFaz385H0\nKYyNQrmltEqWVgW+LeFvm3B1sLL5wySqplX/396lC6kCHZyofeeqZFcC1G+m\ntkp0iho63tlm6WjIzw6ddHWu8olNohCk4xFpvNkkZ0u9GR4BaDBRXS60AcoD\nNIYwMuUlqmXAc7ey+xNZCqXokgbtjD7aI2uIDLNUMHELxrRzBccHe76sIQit\nBeBy\r\n=u7P4\r\n-----END PGP SIGNATURE-----\r\n" - } - } - }, - "modified": "2021-04-14T20:46:02.139Z", - "_cached": false, - "_contentLength": 1417 -} \ No newline at end of file diff -Nru npm-9.1.2~ds1/node_modules/libnpmexec/test/registry/server.js npm-9.2.0~ds1/node_modules/libnpmexec/test/registry/server.js --- npm-9.1.2~ds1/node_modules/libnpmexec/test/registry/server.js 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/libnpmexec/test/registry/server.js 1970-01-01 00:00:00.000000000 +0000 @@ -1,280 +0,0 @@ -const { join, dirname } = require('path') -const { existsSync, readFileSync, writeFileSync } = require('fs') -const PORT = 12345 + (+process.env.TAP_CHILD_ID || 0) -const http = require('http') -const https = require('https') - -const mkdirp = require('mkdirp') -const doProxy = process.env.ARBORIST_TEST_PROXY -const missing = /\/@isaacs(\/|%2[fF])(this-does-not-exist-at-all|testing-missing-tgz\/-\/)/ -const corgiDoc = 'application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*' -const { gzipSync, unzipSync } = require('zlib') - -let advisoryBulkResponse = null -let failAdvisoryBulk = false -let auditResponse = null -let failAudit = false -const startServer = cb => { - const server = module.exports.server = http.createServer((req, res) => { - res.setHeader('connection', 'close') - - if (req.url === '/-/npm/v1/security/advisories/bulk') { - const body = [] - req.on('data', c => body.push(c)) - req.on('end', () => { - res.setHeader('connection', 'close') - if (failAdvisoryBulk) { - res.statusCode = 503 - return res.end('no advisory bulk for you') - } - if (!advisoryBulkResponse) { - if (auditResponse && !failAudit) { - // simulate what the registry does when quick audits are allowed, - // but advisory bulk requests are not - res.statusCode = 405 - return res.end(JSON.stringify({ - code: 'MethodNotAllowedError', - message: 'POST is not allowed', - })) - } else { - res.statusCode = 404 - return res.end('not found') - } - } - if (doProxy && !existsSync(advisoryBulkResponse)) { - // hit the main registry, then fall back to staging for now - // XXX: remove this when bulk advisory endpoint pushed to production! - const opts = { - host: 'registry.npmjs.org', - method: req.method, - path: req.url, - headers: { - ...req.headers, - accept: '*', - host: 'registry.npmjs.org', - connection: 'close', - 'if-none-match': '', - }, - } - const handleUpstream = upstream => { - res.statusCode = upstream.statusCode - if (upstream.statusCode >= 300 || upstream.statusCode < 200) { - console.error('UPSTREAM ERROR', upstream.statusCode) - return upstream.pipe(res) - } - res.setHeader('content-encoding', upstream.headers['content-encoding']) - const file = advisoryBulkResponse - console.error('PROXY', `${req.url} -> ${file} ${upstream.statusCode}`) - mkdirp.sync(dirname(file)) - const data = [] - upstream.on('end', () => { - const out = Buffer.concat(data) - const obj = JSON.parse(unzipSync(out).toString()) - writeFileSync(file, JSON.stringify(obj, 0, 2) + '\n') - res.end(out) - }) - upstream.on('data', c => data.push(c)) - } - return https.request(opts).on('response', upstream => { - if (upstream.statusCode !== 200) { - console.error('ATTEMPTING TO PROXY FROM STAGING') - console.error('NOTE: THIS WILL FAIL WHEN NOT ON VPN!') - opts.host = 'security-microservice-3-west.npm.red' - opts.headers.host = opts.host - opts.path = '/v1/advisories/bulk' - https.request(opts) - .on('response', r => handleUpstream(r)) - .end(Buffer.concat(body)) - } else { - handleUpstream(upstream) - } - }).end(Buffer.concat(body)) - } else { - res.setHeader('content-encoding', 'gzip') - res.end(gzipSync(readFileSync(advisoryBulkResponse))) - } - }) - return - } else if (req.url === '/-/npm/v1/security/audits/quick') { - const body = [] - req.on('data', c => body.push(c)) - req.on('end', () => { - res.setHeader('connection', 'close') - if (failAudit) { - res.statusCode = 503 - return res.end('no audit for you') - } - if (!auditResponse) { - res.statusCode = 404 - return res.end('not found') - } - if (doProxy && !existsSync(auditResponse)) { - return https.request({ - host: 'registry.npmjs.org', - method: req.method, - path: req.url, - headers: { - ...req.headers, - accept: '*', - host: 'registry.npmjs.org', - connection: 'close', - 'if-none-match': '', - }, - }).on('response', upstream => { - res.statusCode = upstream.statusCode - if (upstream.statusCode >= 300 || upstream.statusCode < 200) { - console.error('UPSTREAM ERROR', upstream.statusCode) - // don't save if it's not a valid response - return upstream.pipe(res) - } - res.setHeader('content-encoding', upstream.headers['content-encoding']) - const file = auditResponse - console.error('PROXY', `${req.url} -> ${file} ${upstream.statusCode}`) - mkdirp.sync(dirname(file)) - const data = [] - upstream.on('end', () => { - const out = Buffer.concat(data) - // make it a bit prettier to read later - const obj = JSON.parse(unzipSync(out).toString()) - writeFileSync(file, JSON.stringify(obj, 0, 2) + '\n') - res.end(out) - }) - upstream.on('data', c => data.push(c)) - }).end(Buffer.concat(body)) - } else { - res.setHeader('content-encoding', 'gzip') - res.end(gzipSync(readFileSync(auditResponse))) - } - }) - return - } - - const f = join(__dirname, 'content', join('/', req.url.replace(/@/, '').replace(/%2f/i, '/'))) - const isCorgi = req.headers.accept.includes('application/vnd.npm.install-v1+json') - const file = f + ( - isCorgi && existsSync(`${f}.min.json`) ? '.min.json' - : existsSync(`${f}.json`) ? '.json' - : existsSync(`${f}/index.json`) ? 'index.json' - : '' - ) - - try { - const body = readFileSync(file) - res.setHeader('content-length', body.length) - res.setHeader('content-type', /\.min\.json$/.test(file) ? corgiDoc - : /\.json$/.test(file) ? 'application/json' - : 'application/octet-stream') - res.end(body) - } catch (er) { - // testing things going missing from the registry somehow - if (missing.test(req.url)) { - res.statusCode = 404 - res.end('{"error": "not found"}') - return - } - - if (doProxy) { - return https.get({ - host: 'registry.npmjs.org', - path: req.url, - headers: { - ...req.headers, - accept: '*', - 'accept-encoding': 'identity', - host: 'registry.npmjs.org', - connection: 'close', - 'if-none-match': '', - }, - }).on('response', upstream => { - const errorStatus = - upstream.statusCode >= 300 || upstream.statusCode < 200 - - if (errorStatus) { - console.error('UPSTREAM ERROR', upstream.statusCode) - } - - const ct = upstream.headers['content-type'] - const isJson = ct.includes('application/json') - const proxyFile = isJson ? f + '.json' : f - console.error('PROXY', `${req.url} -> ${proxyFile} ${ct}`) - mkdirp.sync(dirname(proxyFile)) - const data = [] - res.statusCode = upstream.statusCode - res.setHeader('content-type', ct) - upstream.on('end', () => { - console.error('ENDING', req.url) - const out = Buffer.concat(data) - if (!errorStatus) { - if (isJson) { - const obj = JSON.parse(out.toString()) - writeFileSync(proxyFile, JSON.stringify(obj, 0, 2) + '\n') - const mrm = require('minify-registry-metadata') - const minFile = proxyFile.replace(/\.json$/, '.min.json') - writeFileSync(minFile, JSON.stringify(mrm(obj), 0, 2) + '\n') - console.error('WROTE JSONS', [proxyFile, minFile]) - } else { - writeFileSync(proxyFile, out) - } - } - res.end(out) - }) - upstream.on('data', c => data.push(c)) - }).end() - } - - res.statusCode = er.code === 'ENOENT' ? 404 : 500 - if (res.method === 'GET') { - console.error(er) - } - res.setHeader('content-type', 'text/plain') - res.end(er.stack) - } - }) - server.listen(PORT, cb) -} - -module.exports = t => startServer(() => { - t.parent.teardown(() => module.exports.server.close()) - t.end() -}) - -module.exports.auditResponse = value => { - if (auditResponse && auditResponse !== value) { - throw new Error('setting audit response, but already set\n' + - '(did you forget to call the returned function on teardown?)') - } - auditResponse = value - return () => auditResponse = null -} -module.exports.failAudit = () => { - failAudit = true - return () => failAudit = false -} - -module.exports.advisoryBulkResponse = value => { - if (advisoryBulkResponse && advisoryBulkResponse !== value) { - throw new Error('setting advisory bulk response, but already set\n' + - '(did you forget to call the returned function on teardown?)') - } - advisoryBulkResponse = value - return () => advisoryBulkResponse = null -} -module.exports.failAdvisoryBulk = () => { - failAdvisoryBulk = true - return () => failAdvisoryBulk = false -} - -module.exports.registry = `http://localhost:${PORT}/` - -module.exports.start = startServer -module.exports.stop = () => module.exports.server.close() - -if (require.main === module) { - startServer(() => { - console.log(`Mock registry live at: - ${module.exports.registry} -Press ^D to close gracefully.`) - }) - process.openStdin() - process.stdin.on('end', () => module.exports.server.close()) -} diff -Nru npm-9.1.2~ds1/node_modules/libnpmexec/test/registry.js npm-9.2.0~ds1/node_modules/libnpmexec/test/registry.js --- npm-9.1.2~ds1/node_modules/libnpmexec/test/registry.js 1970-01-01 00:00:00.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/libnpmexec/test/registry.js 2022-12-07 23:13:18.000000000 +0000 @@ -0,0 +1,166 @@ +const { resolve } = require('path') +const t = require('tap') +const { setup, createPkg, merge } = require('./fixtures/setup.js') + +t.test('run from registry - no local packages', async t => { + const { fixtures, package } = createPkg({ versions: ['2.0.0'] }) + + const { exec, path, registry, readOutput } = setup(t, { + testdir: merge(fixtures, { + global: {}, + }), + }) + + await package({ registry, path }) + + await exec({ + args: ['@npmcli/create-index'], + globalPath: resolve(path, 'global'), + }) + + t.match(await readOutput('@npmcli-create-index'), { + value: 'packages-2.0.0', + }) +}) + +t.test('run from registry - local version mismatch', async t => { + const { fixtures, package } = createPkg({ + localVersion: '2.0.0', + versions: ['2.0.0', '1.0.0'], + }) + + const { exec, path, registry, readOutput } = setup(t, { + testdir: { + ...fixtures, + }, + }) + + await package({ registry, path, tarballs: ['1.0.0'] }) + + await exec({ args: ['@npmcli/create-index@1.0.0'] }) + + t.match(await readOutput('@npmcli-create-index'), { + value: 'packages-1.0.0', + }) +}) + +t.test('run from registry - local range mismatch', async t => { + const { fixtures, package } = createPkg({ + localVersion: '2.0.0', + versions: ['2.0.0', '1.0.0'], + }) + + const { exec, path, registry, readOutput } = setup(t, { + testdir: { + ...fixtures, + }, + }) + + await package({ registry, path, tarballs: ['1.0.0'] }) + + await exec({ + args: ['@npmcli/create-index@^1.0.0'], + }) + + t.match(await readOutput('@npmcli-create-index'), { + value: 'packages-1.0.0', + }) +}) + +t.test('run from registry - local tag mismatch', async t => { + const { fixtures, package } = createPkg({ + localVersion: '2.0.0', + versions: ['2.0.0'], + }) + + const { exec, path, registry, readOutput } = setup(t, { + testdir: { + ...fixtures, + }, + }) + + await package({ registry, path }) + + await exec({ + args: ['@npmcli/create-index@latest'], + }) + + t.match(await readOutput('@npmcli-create-index'), { + value: 'packages-2.0.0', + }) +}) + +t.test('avoid install when exec from registry an available pkg', async t => { + const { fixtures, package } = createPkg({ + versions: ['2.0.0'], + }) + + const { exec, path, registry, readOutput, rmOutput } = setup(t, { + testdir: { + ...fixtures, + }, + }) + + await package({ registry, path }) + + // no file + t.rejects(() => readOutput('@npmcli-create-index'), { code: 'ENOENT' }) + + // file is created + await exec({ args: ['@npmcli/create-index'] }) + t.match(await readOutput('@npmcli-create-index'), { + value: 'packages-2.0.0', + }) + + // remove file + await rmOutput('@npmcli-create-index') + t.rejects(() => readOutput('@npmcli-create-index'), { code: 'ENOENT' }) + + // create file again but mock manifest only once + await package({ registry, path, tarballs: [], times: 1 }) + await exec({ args: ['@npmcli/create-index'] }) + t.match(await readOutput('@npmcli-create-index'), { + value: 'packages-2.0.0', + }) +}) + +t.test('run multiple from registry', async t => { + const indexPkg = createPkg({ + versions: ['2.0.0'], + name: '@npmcli/create-index', + }) + const testPkg = createPkg({ + versions: ['2.0.0'], + name: '@npmcli/create-test', + }) + + const { exec, path, registry, readOutput } = setup(t, { + testdir: { + ...merge(indexPkg.fixtures, testPkg.fixtures), + }, + }) + + await indexPkg.package({ registry, path }) + await testPkg.package({ registry, path }) + + t.rejects( + () => readOutput(resolve('@npmcli-create-index')), + { code: 'ENOENT' } + ) + t.rejects( + () => readOutput(resolve('@npmcli-create-test')), + { code: 'ENOENT' } + ) + + await exec({ + packages: ['@npmcli/create-test', '@npmcli/create-index'], + call: 'create-test && create-index', + }) + + t.match(await readOutput('@npmcli-create-index'), { + value: 'packages-2.0.0', + }) + t.match(await readOutput('@npmcli-create-test'), { + value: 'packages-2.0.0', + }) +}) diff -Nru npm-9.1.2~ds1/node_modules/libnpmfund/CHANGELOG.md npm-9.2.0~ds1/node_modules/libnpmfund/CHANGELOG.md --- npm-9.1.2~ds1/node_modules/libnpmfund/CHANGELOG.md 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/libnpmfund/CHANGELOG.md 2022-12-07 23:13:18.000000000 +0000 @@ -1,5 +1,17 @@ # Changelog +## [4.0.6](https://github.com/npm/cli/compare/libnpmfund-v4.0.5...libnpmfund-v4.0.6) (2022-12-07) + +### Dependencies + +* [Workspace](https://github.com/npm/cli/releases/tag/arborist-v6.1.5): `@npmcli/arborist@6.1.5` + +## [4.0.5](https://github.com/npm/cli/compare/libnpmfund-v4.0.4...libnpmfund-v4.0.5) (2022-11-30) + +### Dependencies + +* [Workspace](https://github.com/npm/cli/compare/arborist-v6.1.3...arborist-v6.1.4): `@npmcli/arborist@6.1.4` + ## [4.0.4](https://github.com/npm/cli/compare/libnpmfund-v4.0.3...libnpmfund-v4.0.4) (2022-11-16) ### Dependencies diff -Nru npm-9.1.2~ds1/node_modules/libnpmfund/package.json npm-9.2.0~ds1/node_modules/libnpmfund/package.json --- npm-9.1.2~ds1/node_modules/libnpmfund/package.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/libnpmfund/package.json 2022-12-07 23:13:18.000000000 +0000 @@ -1,6 +1,6 @@ { "name": "libnpmfund", - "version": "4.0.4", + "version": "4.0.6", "main": "lib/index.js", "files": [ "bin/", @@ -42,18 +42,18 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", - "tap": "^16.0.1" + "@npmcli/template-oss": "4.11.0", + "tap": "^16.3.2" }, "dependencies": { - "@npmcli/arborist": "^6.1.3" + "@npmcli/arborist": "^6.1.5" }, "engines": { "node": "^14.17.0 || ^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.10.0", + "version": "4.11.0", "content": "../../scripts/template-oss/index.js" }, "tap": { diff -Nru npm-9.1.2~ds1/node_modules/libnpmhook/CHANGELOG.md npm-9.2.0~ds1/node_modules/libnpmhook/CHANGELOG.md --- npm-9.1.2~ds1/node_modules/libnpmhook/CHANGELOG.md 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/libnpmhook/CHANGELOG.md 2022-12-07 23:13:18.000000000 +0000 @@ -1,5 +1,12 @@ # Changelog +## [9.0.1](https://github.com/npm/cli/compare/libnpmhook-v9.0.0...libnpmhook-v9.0.1) (2022-12-07) + +### Dependencies + +* [`0a3fe00`](https://github.com/npm/cli/commit/0a3fe000e2723ae6fdb8b1d3154fd3835057c992) [#5933](https://github.com/npm/cli/pull/5933) `minipass@4.0.0` +* [`fee9b66`](https://github.com/npm/cli/commit/fee9b6686892a1c7f976c36ddd5d89b70c416817) `npm-registry-fetch@14.0.3` + ## [9.0.0](https://github.com/npm/cli/compare/libnpmhook-v9.0.0-pre.1...libnpmhook-v9.0.0) (2022-10-19) ### Features diff -Nru npm-9.1.2~ds1/node_modules/libnpmhook/package.json npm-9.2.0~ds1/node_modules/libnpmhook/package.json --- npm-9.1.2~ds1/node_modules/libnpmhook/package.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/libnpmhook/package.json 2022-12-07 23:13:18.000000000 +0000 @@ -1,6 +1,6 @@ { "name": "libnpmhook", - "version": "9.0.0", + "version": "9.0.1", "description": "programmatic API for managing npm registry hooks", "main": "lib/index.js", "files": [ @@ -33,20 +33,20 @@ "license": "ISC", "dependencies": { "aproba": "^2.0.0", - "npm-registry-fetch": "^14.0.2" + "npm-registry-fetch": "^14.0.3" }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", + "@npmcli/template-oss": "4.11.0", "nock": "^13.2.4", - "tap": "^16.0.1" + "tap": "^16.3.2" }, "engines": { "node": "^14.17.0 || ^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.10.0", + "version": "4.11.0", "content": "../../scripts/template-oss/index.js" }, "tap": { diff -Nru npm-9.1.2~ds1/node_modules/libnpmorg/CHANGELOG.md npm-9.2.0~ds1/node_modules/libnpmorg/CHANGELOG.md --- npm-9.1.2~ds1/node_modules/libnpmorg/CHANGELOG.md 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/libnpmorg/CHANGELOG.md 2022-12-07 23:13:18.000000000 +0000 @@ -1,5 +1,12 @@ # Changelog +## [5.0.1](https://github.com/npm/cli/compare/libnpmorg-v5.0.0...libnpmorg-v5.0.1) (2022-12-07) + +### Dependencies + +* [`0a3fe00`](https://github.com/npm/cli/commit/0a3fe000e2723ae6fdb8b1d3154fd3835057c992) [#5933](https://github.com/npm/cli/pull/5933) `minipass@4.0.0` +* [`fee9b66`](https://github.com/npm/cli/commit/fee9b6686892a1c7f976c36ddd5d89b70c416817) `npm-registry-fetch@14.0.3` + ## [5.0.0](https://github.com/npm/cli/compare/libnpmorg-v5.0.0-pre.1...libnpmorg-v5.0.0) (2022-10-19) ### Features diff -Nru npm-9.1.2~ds1/node_modules/libnpmorg/package.json npm-9.2.0~ds1/node_modules/libnpmorg/package.json --- npm-9.1.2~ds1/node_modules/libnpmorg/package.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/libnpmorg/package.json 2022-12-07 23:13:18.000000000 +0000 @@ -1,6 +1,6 @@ { "name": "libnpmorg", - "version": "5.0.0", + "version": "5.0.1", "description": "Programmatic api for `npm org` commands", "author": "GitHub Inc.", "main": "lib/index.js", @@ -28,10 +28,10 @@ ], "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", - "minipass": "^3.1.1", + "@npmcli/template-oss": "4.11.0", + "minipass": "^4.0.0", "nock": "^13.2.4", - "tap": "^16.0.1" + "tap": "^16.3.2" }, "repository": { "type": "git", @@ -42,14 +42,14 @@ "homepage": "https://npmjs.com/package/libnpmorg", "dependencies": { "aproba": "^2.0.0", - "npm-registry-fetch": "^14.0.2" + "npm-registry-fetch": "^14.0.3" }, "engines": { "node": "^14.17.0 || ^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.10.0", + "version": "4.11.0", "content": "../../scripts/template-oss/index.js" }, "tap": { diff -Nru npm-9.1.2~ds1/node_modules/libnpmpack/CHANGELOG.md npm-9.2.0~ds1/node_modules/libnpmpack/CHANGELOG.md --- npm-9.1.2~ds1/node_modules/libnpmpack/CHANGELOG.md 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/libnpmpack/CHANGELOG.md 2022-12-07 23:13:18.000000000 +0000 @@ -1,5 +1,20 @@ # Changelog +## [5.0.6](https://github.com/npm/cli/compare/libnpmpack-v5.0.5...libnpmpack-v5.0.6) (2022-12-07) + +### Dependencies + +* [`0a3fe00`](https://github.com/npm/cli/commit/0a3fe000e2723ae6fdb8b1d3154fd3835057c992) [#5933](https://github.com/npm/cli/pull/5933) `minipass@4.0.0` +* [`3da9a1a`](https://github.com/npm/cli/commit/3da9a1a4ebcf1779035b5f9ae985c087f617efe3) `pacote@15.0.7` +* [`875bd56`](https://github.com/npm/cli/commit/875bd56c33ca5eef80c2a50a11808445f2a39a2a) `npm-package-arg@10.1.0` +* [Workspace](https://github.com/npm/cli/releases/tag/arborist-v6.1.5): `@npmcli/arborist@6.1.5` + +## [5.0.5](https://github.com/npm/cli/compare/libnpmpack-v5.0.4...libnpmpack-v5.0.5) (2022-11-30) + +### Dependencies + +* [Workspace](https://github.com/npm/cli/compare/arborist-v6.1.3...arborist-v6.1.4): `@npmcli/arborist@6.1.4` + ## [5.0.4](https://github.com/npm/cli/compare/libnpmpack-v5.0.3...libnpmpack-v5.0.4) (2022-11-16) ### Dependencies diff -Nru npm-9.1.2~ds1/node_modules/libnpmpack/package.json npm-9.2.0~ds1/node_modules/libnpmpack/package.json --- npm-9.1.2~ds1/node_modules/libnpmpack/package.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/libnpmpack/package.json 2022-12-07 23:13:18.000000000 +0000 @@ -1,6 +1,6 @@ { "name": "libnpmpack", - "version": "5.0.4", + "version": "5.0.6", "description": "Programmatic API for the bits behind npm pack", "author": "GitHub Inc.", "main": "lib/index.js", @@ -23,10 +23,10 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", + "@npmcli/template-oss": "4.11.0", "nock": "^13.0.7", "spawk": "^1.7.1", - "tap": "^16.0.1" + "tap": "^16.3.2" }, "repository": { "type": "git", @@ -36,17 +36,17 @@ "bugs": "https://github.com/npm/libnpmpack/issues", "homepage": "https://npmjs.com/package/libnpmpack", "dependencies": { - "@npmcli/arborist": "^6.1.3", + "@npmcli/arborist": "^6.1.5", "@npmcli/run-script": "^6.0.0", - "npm-package-arg": "^10.0.0", - "pacote": "^15.0.2" + "npm-package-arg": "^10.1.0", + "pacote": "^15.0.7" }, "engines": { "node": "^14.17.0 || ^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.10.0", + "version": "4.11.0", "content": "../../scripts/template-oss/index.js" }, "tap": { diff -Nru npm-9.1.2~ds1/node_modules/libnpmpublish/CHANGELOG.md npm-9.2.0~ds1/node_modules/libnpmpublish/CHANGELOG.md --- npm-9.1.2~ds1/node_modules/libnpmpublish/CHANGELOG.md 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/libnpmpublish/CHANGELOG.md 2022-12-07 23:13:18.000000000 +0000 @@ -1,5 +1,21 @@ # Changelog +## [7.0.6](https://github.com/npm/cli/compare/libnpmpublish-v7.0.5...libnpmpublish-v7.0.6) (2022-12-07) + +### Dependencies + +* [`0a3fe00`](https://github.com/npm/cli/commit/0a3fe000e2723ae6fdb8b1d3154fd3835057c992) [#5933](https://github.com/npm/cli/pull/5933) `minipass@4.0.0` +* [`cf0a174`](https://github.com/npm/cli/commit/cf0a17407abc577c27420a1c8a4a0c08c7cefce9) `ssri@10.0.1` +* [`fee9b66`](https://github.com/npm/cli/commit/fee9b6686892a1c7f976c36ddd5d89b70c416817) `npm-registry-fetch@14.0.3` +* [`875bd56`](https://github.com/npm/cli/commit/875bd56c33ca5eef80c2a50a11808445f2a39a2a) `npm-package-arg@10.1.0` +* [Workspace](https://github.com/npm/cli/releases/tag/libnpmpack-v5.0.6): `libnpmpack@5.0.6` + +## [7.0.5](https://github.com/npm/cli/compare/libnpmpublish-v7.0.4...libnpmpublish-v7.0.5) (2022-11-30) + +### Dependencies + +* [Workspace](https://github.com/npm/cli/compare/libnpmpack-v5.0.4...libnpmpack-v5.0.5): `libnpmpack@5.0.5` + ## [7.0.4](https://github.com/npm/cli/compare/libnpmpublish-v7.0.3...libnpmpublish-v7.0.4) (2022-11-16) ### Dependencies diff -Nru npm-9.1.2~ds1/node_modules/libnpmpublish/package.json npm-9.2.0~ds1/node_modules/libnpmpublish/package.json --- npm-9.1.2~ds1/node_modules/libnpmpublish/package.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/libnpmpublish/package.json 2022-12-07 23:13:18.000000000 +0000 @@ -1,6 +1,6 @@ { "name": "libnpmpublish", - "version": "7.0.4", + "version": "7.0.6", "description": "Programmatic API for the bits behind npm publish and unpublish", "author": "GitHub Inc.", "main": "lib/index.js", @@ -25,11 +25,11 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", - "libnpmpack": "^5.0.4", + "@npmcli/template-oss": "4.11.0", + "libnpmpack": "^5.0.6", "lodash.clonedeep": "^4.5.0", "nock": "^13.2.4", - "tap": "^16.0.1" + "tap": "^16.3.2" }, "repository": { "type": "git", @@ -40,17 +40,17 @@ "homepage": "https://npmjs.com/package/libnpmpublish", "dependencies": { "normalize-package-data": "^5.0.0", - "npm-package-arg": "^10.0.0", - "npm-registry-fetch": "^14.0.2", + "npm-package-arg": "^10.1.0", + "npm-registry-fetch": "^14.0.3", "semver": "^7.3.7", - "ssri": "^10.0.0" + "ssri": "^10.0.1" }, "engines": { "node": "^14.17.0 || ^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.10.0", + "version": "4.11.0", "content": "../../scripts/template-oss/index.js" }, "tap": { diff -Nru npm-9.1.2~ds1/node_modules/libnpmsearch/CHANGELOG.md npm-9.2.0~ds1/node_modules/libnpmsearch/CHANGELOG.md --- npm-9.1.2~ds1/node_modules/libnpmsearch/CHANGELOG.md 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/libnpmsearch/CHANGELOG.md 2022-12-07 23:13:18.000000000 +0000 @@ -1,5 +1,12 @@ # Changelog +## [6.0.1](https://github.com/npm/cli/compare/libnpmsearch-v6.0.0...libnpmsearch-v6.0.1) (2022-12-07) + +### Dependencies + +* [`0a3fe00`](https://github.com/npm/cli/commit/0a3fe000e2723ae6fdb8b1d3154fd3835057c992) [#5933](https://github.com/npm/cli/pull/5933) `minipass@4.0.0` +* [`fee9b66`](https://github.com/npm/cli/commit/fee9b6686892a1c7f976c36ddd5d89b70c416817) `npm-registry-fetch@14.0.3` + ## [6.0.0](https://github.com/npm/cli/compare/libnpmsearch-v6.0.0-pre.1...libnpmsearch-v6.0.0) (2022-10-19) ### Features diff -Nru npm-9.1.2~ds1/node_modules/libnpmsearch/package.json npm-9.2.0~ds1/node_modules/libnpmsearch/package.json --- npm-9.1.2~ds1/node_modules/libnpmsearch/package.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/libnpmsearch/package.json 2022-12-07 23:13:18.000000000 +0000 @@ -1,6 +1,6 @@ { "name": "libnpmsearch", - "version": "6.0.0", + "version": "6.0.1", "description": "Programmatic API for searching in npm and compatible registries.", "author": "GitHub Inc.", "main": "lib/index.js", @@ -26,9 +26,9 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", + "@npmcli/template-oss": "4.11.0", "nock": "^13.2.4", - "tap": "^16.0.1" + "tap": "^16.3.2" }, "repository": { "type": "git", @@ -38,14 +38,14 @@ "bugs": "https://github.com/npm/libnpmsearch/issues", "homepage": "https://npmjs.com/package/libnpmsearch", "dependencies": { - "npm-registry-fetch": "^14.0.2" + "npm-registry-fetch": "^14.0.3" }, "engines": { "node": "^14.17.0 || ^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.10.0", + "version": "4.11.0", "content": "../../scripts/template-oss/index.js" }, "tap": { diff -Nru npm-9.1.2~ds1/node_modules/libnpmteam/CHANGELOG.md npm-9.2.0~ds1/node_modules/libnpmteam/CHANGELOG.md --- npm-9.1.2~ds1/node_modules/libnpmteam/CHANGELOG.md 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/libnpmteam/CHANGELOG.md 2022-12-07 23:13:18.000000000 +0000 @@ -1,5 +1,12 @@ # Changelog +## [5.0.1](https://github.com/npm/cli/compare/libnpmteam-v5.0.0...libnpmteam-v5.0.1) (2022-12-07) + +### Dependencies + +* [`0a3fe00`](https://github.com/npm/cli/commit/0a3fe000e2723ae6fdb8b1d3154fd3835057c992) [#5933](https://github.com/npm/cli/pull/5933) `minipass@4.0.0` +* [`fee9b66`](https://github.com/npm/cli/commit/fee9b6686892a1c7f976c36ddd5d89b70c416817) `npm-registry-fetch@14.0.3` + ## [5.0.0](https://github.com/npm/cli/compare/libnpmteam-v5.0.0-pre.1...libnpmteam-v5.0.0) (2022-10-19) ### Features diff -Nru npm-9.1.2~ds1/node_modules/libnpmteam/package.json npm-9.2.0~ds1/node_modules/libnpmteam/package.json --- npm-9.1.2~ds1/node_modules/libnpmteam/package.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/libnpmteam/package.json 2022-12-07 23:13:18.000000000 +0000 @@ -1,7 +1,7 @@ { "name": "libnpmteam", "description": "npm Team management APIs", - "version": "5.0.0", + "version": "5.0.1", "author": "GitHub Inc.", "license": "ISC", "main": "lib/index.js", @@ -16,9 +16,9 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", + "@npmcli/template-oss": "4.11.0", "nock": "^13.2.4", - "tap": "^16.0.1" + "tap": "^16.3.2" }, "repository": { "type": "git", @@ -32,14 +32,14 @@ "homepage": "https://npmjs.com/package/libnpmteam", "dependencies": { "aproba": "^2.0.0", - "npm-registry-fetch": "^14.0.2" + "npm-registry-fetch": "^14.0.3" }, "engines": { "node": "^14.17.0 || ^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.10.0", + "version": "4.11.0", "content": "../../scripts/template-oss/index.js" }, "tap": { diff -Nru npm-9.1.2~ds1/node_modules/libnpmversion/package.json npm-9.2.0~ds1/node_modules/libnpmversion/package.json --- npm-9.1.2~ds1/node_modules/libnpmversion/package.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/libnpmversion/package.json 2022-12-07 23:13:18.000000000 +0000 @@ -32,9 +32,9 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", + "@npmcli/template-oss": "4.11.0", "require-inject": "^1.4.4", - "tap": "^16.0.1" + "tap": "^16.3.2" }, "dependencies": { "@npmcli/git": "^4.0.1", @@ -48,7 +48,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.10.0", + "version": "4.11.0", "content": "../../scripts/template-oss/index.js" } } diff -Nru npm-9.1.2~ds1/node_modules/make-fetch-happen/package.json npm-9.2.0~ds1/node_modules/make-fetch-happen/package.json --- npm-9.1.2~ds1/node_modules/make-fetch-happen/package.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/make-fetch-happen/package.json 2022-12-07 23:13:18.000000000 +0000 @@ -1,6 +1,6 @@ { "name": "make-fetch-happen", - "version": "11.0.1", + "version": "11.0.2", "description": "Opinionated, caching, retrying fetch client", "main": "lib/index.js", "files": [ @@ -40,7 +40,7 @@ "https-proxy-agent": "^5.0.0", "is-lambda": "^1.0.1", "lru-cache": "^7.7.1", - "minipass": "^3.1.6", + "minipass": "^4.0.0", "minipass-collect": "^1.0.2", "minipass-fetch": "^3.0.0", "minipass-flush": "^1.0.5", @@ -52,7 +52,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.5.1", + "@npmcli/template-oss": "4.10.0", "mkdirp": "^1.0.4", "nock": "^13.2.4", "rimraf": "^3.0.2", @@ -75,6 +75,6 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.5.1" + "version": "4.10.0" } } diff -Nru npm-9.1.2~ds1/node_modules/@npmcli/arborist/CHANGELOG.md npm-9.2.0~ds1/node_modules/@npmcli/arborist/CHANGELOG.md --- npm-9.1.2~ds1/node_modules/@npmcli/arborist/CHANGELOG.md 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/@npmcli/arborist/CHANGELOG.md 2022-12-07 23:13:18.000000000 +0000 @@ -1,5 +1,27 @@ # Changelog +## [6.1.5](https://github.com/npm/cli/compare/arborist-v6.1.4...arborist-v6.1.5) (2022-12-07) + +### Bug Fixes + +* [`83fb125`](https://github.com/npm/cli/commit/83fb125446a9fb217eedf53ca98c203d7d48527b) [#5923](https://github.com/npm/cli/pull/5923) audit package mismatch in special case (@fritzy) + +### Dependencies + +* [`372d158`](https://github.com/npm/cli/commit/372d158d2637120600a95abee64355ed1cb6f990) [#5935](https://github.com/npm/cli/pull/5935) `minimatch@5.1.1` (#5935) +* [`0a3fe00`](https://github.com/npm/cli/commit/0a3fe000e2723ae6fdb8b1d3154fd3835057c992) [#5933](https://github.com/npm/cli/pull/5933) `minipass@4.0.0` +* [`cf0a174`](https://github.com/npm/cli/commit/cf0a17407abc577c27420a1c8a4a0c08c7cefce9) `ssri@10.0.1` +* [`3da9a1a`](https://github.com/npm/cli/commit/3da9a1a4ebcf1779035b5f9ae985c087f617efe3) `pacote@15.0.7` +* [`fee9b66`](https://github.com/npm/cli/commit/fee9b6686892a1c7f976c36ddd5d89b70c416817) `npm-registry-fetch@14.0.3` +* [`e940917`](https://github.com/npm/cli/commit/e940917befcdaf44ee7e24d31b540f4de8507734) `cacache@17.0.3` +* [`875bd56`](https://github.com/npm/cli/commit/875bd56c33ca5eef80c2a50a11808445f2a39a2a) `npm-package-arg@10.1.0` + +## [6.1.4](https://github.com/npm/cli/compare/arborist-v6.1.3...arborist-v6.1.4) (2022-11-30) + +### Bug Fixes + +* [`80c6c4a`](https://github.com/npm/cli/commit/80c6c4a5111ab1779256a779a2cba41eb2c8675f) [#5907](https://github.com/npm/cli/pull/5907) do not reset hidden lockfile data before saving (#5907) (@nlf) + ## [6.1.3](https://github.com/npm/cli/compare/arborist-v6.1.2...arborist-v6.1.3) (2022-11-16) ### Bug Fixes diff -Nru npm-9.1.2~ds1/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js npm-9.2.0~ds1/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js --- npm-9.1.2~ds1/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js 2022-12-07 23:13:18.000000000 +0000 @@ -619,14 +619,16 @@ continue } - const { isSemVerMajor, version } = fixAvailable + // name may be different if parent fixes the dep + // see Vuln fixAvailable setter + const { isSemVerMajor, version, name: fixName } = fixAvailable const breakingMessage = isSemVerMajor ? 'a SemVer major change' : 'outside your stated dependency range' - log.warn('audit', `Updating ${name} to ${version}, ` + + log.warn('audit', `Updating ${fixName} to ${version}, ` + `which is ${breakingMessage}.`) - await this[_add](node, { add: [`${name}@${version}`] }) + await this[_add](node, { add: [`${fixName}@${version}`] }) nodesTouched.add(node) } } diff -Nru npm-9.1.2~ds1/node_modules/@npmcli/arborist/lib/arborist/reify.js npm-9.2.0~ds1/node_modules/@npmcli/arborist/lib/arborist/reify.js --- npm-9.1.2~ds1/node_modules/@npmcli/arborist/lib/arborist/reify.js 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/@npmcli/arborist/lib/arborist/reify.js 2022-12-07 23:13:18.000000000 +0000 @@ -1531,16 +1531,12 @@ this.idealTree.meta.filename = this.idealTree.realpath + '/node_modules/.package-lock.json' this.idealTree.meta.hiddenLockfile = true - const resetMeta = this.idealTree.meta && this.idealTree.meta.lockfileVersion !== defaultLockfileVersion this.idealTree.meta.lockfileVersion = defaultLockfileVersion this.actualTree = this.idealTree this.idealTree = null if (!this[_global]) { - if (resetMeta) { - await this.actualTree.meta.reset() - } await this.actualTree.meta.save() const ignoreScripts = !!this.options.ignoreScripts // if we aren't doing a dry run or ignoring scripts and we actually made changes to the dep diff -Nru npm-9.1.2~ds1/node_modules/@npmcli/arborist/lib/vuln.js npm-9.2.0~ds1/node_modules/@npmcli/arborist/lib/vuln.js --- npm-9.1.2~ds1/node_modules/@npmcli/arborist/lib/vuln.js 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/@npmcli/arborist/lib/vuln.js 2022-12-07 23:13:18.000000000 +0000 @@ -65,6 +65,9 @@ // - {name, version, isSemVerMajor} fix requires -f, is semver major // - {name, version} fix requires -f, not semver major // - true: fix does not require -f + // TODO: duped entries may require different fixes but the current + // structure does not support this, so the case were a top level fix + // corrects a duped entry may mean you have to run fix more than once for (const v of this.via) { // don't blow up on loops if (v.fixAvailable === f) { diff -Nru npm-9.1.2~ds1/node_modules/@npmcli/arborist/package.json npm-9.2.0~ds1/node_modules/@npmcli/arborist/package.json --- npm-9.1.2~ds1/node_modules/@npmcli/arborist/package.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/@npmcli/arborist/package.json 2022-12-07 23:13:18.000000000 +0000 @@ -1,6 +1,6 @@ { "name": "@npmcli/arborist", - "version": "6.1.3", + "version": "6.1.5", "description": "Manage node_modules trees", "dependencies": { "@isaacs/string-locale-compare": "^1.1.0", @@ -14,37 +14,37 @@ "@npmcli/query": "^3.0.0", "@npmcli/run-script": "^6.0.0", "bin-links": "^4.0.1", - "cacache": "^17.0.2", + "cacache": "^17.0.3", "common-ancestor-path": "^1.0.1", "hosted-git-info": "^6.1.1", "json-parse-even-better-errors": "^3.0.0", "json-stringify-nice": "^1.1.4", - "minimatch": "^5.1.0", + "minimatch": "^5.1.1", "nopt": "^7.0.0", "npm-install-checks": "^6.0.0", - "npm-package-arg": "^10.0.0", + "npm-package-arg": "^10.1.0", "npm-pick-manifest": "^8.0.1", - "npm-registry-fetch": "^14.0.2", + "npm-registry-fetch": "^14.0.3", "npmlog": "^7.0.1", - "pacote": "^15.0.2", + "pacote": "^15.0.7", "parse-conflict-json": "^3.0.0", "proc-log": "^3.0.0", "promise-all-reject-late": "^1.0.0", "promise-call-limit": "^1.0.1", "read-package-json-fast": "^3.0.1", "semver": "^7.3.7", - "ssri": "^10.0.0", + "ssri": "^10.0.1", "treeverse": "^3.0.0", "walk-up-path": "^1.0.0" }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", + "@npmcli/template-oss": "4.11.0", "benchmark": "^2.1.4", "chalk": "^4.1.0", - "minify-registry-metadata": "^2.1.0", + "minify-registry-metadata": "^3.0.0", "nock": "^13.2.0", - "tap": "^16.0.1", + "tap": "^16.3.2", "tcompare": "^5.0.6" }, "scripts": { @@ -101,7 +101,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.10.0", + "version": "4.11.0", "content": "../../scripts/template-oss/index.js" } } diff -Nru npm-9.1.2~ds1/node_modules/@npmcli/config/package.json npm-9.2.0~ds1/node_modules/@npmcli/config/package.json --- npm-9.1.2~ds1/node_modules/@npmcli/config/package.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/@npmcli/config/package.json 2022-12-07 23:13:18.000000000 +0000 @@ -33,8 +33,8 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", - "tap": "^16.0.1" + "@npmcli/template-oss": "4.11.0", + "tap": "^16.3.2" }, "dependencies": { "@npmcli/map-workspaces": "^3.0.0", @@ -50,6 +50,6 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.10.0" + "version": "4.11.0" } } diff -Nru npm-9.1.2~ds1/node_modules/npm-packlist/lib/index.js npm-9.2.0~ds1/node_modules/npm-packlist/lib/index.js --- npm-9.1.2~ds1/node_modules/npm-packlist/lib/index.js 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/npm-packlist/lib/index.js 2022-12-07 23:13:18.000000000 +0000 @@ -300,6 +300,8 @@ file = file.slice(1) } else if (file.startsWith('./')) { file = file.slice(2) + } else if (file.endsWith('/*')) { + file = file.slice(0, -2) } const inverse = `!${file}` try { @@ -382,6 +384,11 @@ // get a reference to the node we're bundling const node = this.tree.edgesOut.get(dep).to + // if there's no node, this is most likely an optional dependency that hasn't been + // installed. just skip it. + if (!node) { + continue + } // we use node.path for the path because we want the location the node was linked to, // not where it actually lives on disk const path = node.path diff -Nru npm-9.1.2~ds1/node_modules/npm-packlist/package.json npm-9.2.0~ds1/node_modules/npm-packlist/package.json --- npm-9.1.2~ds1/node_modules/npm-packlist/package.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/npm-packlist/package.json 2022-12-07 23:13:18.000000000 +0000 @@ -1,6 +1,6 @@ { "name": "npm-packlist", - "version": "7.0.2", + "version": "7.0.4", "description": "Get a list of the files to add from a folder into an npm package", "directories": { "test": "test" @@ -18,7 +18,7 @@ "devDependencies": { "@npmcli/arborist": "^6.0.0 || ^6.0.0-pre.0", "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.7.1", + "@npmcli/template-oss": "4.10.0", "mutate-fs": "^2.1.1", "tap": "^16.0.1" }, @@ -55,6 +55,6 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.7.1" + "version": "4.10.0" } } diff -Nru npm-9.1.2~ds1/node_modules/npm-registry-fetch/package.json npm-9.2.0~ds1/node_modules/npm-registry-fetch/package.json --- npm-9.1.2~ds1/node_modules/npm-registry-fetch/package.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/npm-registry-fetch/package.json 2022-12-07 23:13:18.000000000 +0000 @@ -1,6 +1,6 @@ { "name": "npm-registry-fetch", - "version": "14.0.2", + "version": "14.0.3", "description": "Fetch-based http client for use with npm registry APIs", "main": "lib", "files": [ @@ -32,7 +32,7 @@ "license": "ISC", "dependencies": { "make-fetch-happen": "^11.0.0", - "minipass": "^3.1.6", + "minipass": "^4.0.0", "minipass-fetch": "^3.0.0", "minipass-json-stream": "^1.0.1", "minizlib": "^2.1.2", @@ -41,7 +41,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.6.1", + "@npmcli/template-oss": "4.10.0", "cacache": "^17.0.0", "mkdirp": "^1.0.4", "nock": "^13.2.4", @@ -63,6 +63,6 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.6.1" + "version": "4.10.0" } } diff -Nru npm-9.1.2~ds1/node_modules/pacote/package.json npm-9.2.0~ds1/node_modules/pacote/package.json --- npm-9.1.2~ds1/node_modules/pacote/package.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/node_modules/pacote/package.json 2022-12-07 23:13:18.000000000 +0000 @@ -1,6 +1,6 @@ { "name": "pacote", - "version": "15.0.6", + "version": "15.0.7", "description": "JavaScript package downloader", "author": "GitHub Inc.", "bin": { @@ -27,7 +27,7 @@ "devDependencies": { "@npmcli/arborist": "^6.0.0 || ^6.0.0-pre.0", "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.8.0", + "@npmcli/template-oss": "4.10.0", "hosted-git-info": "^6.0.0", "mutate-fs": "^2.1.1", "nock": "^13.2.4", @@ -50,7 +50,7 @@ "@npmcli/run-script": "^6.0.0", "cacache": "^17.0.0", "fs-minipass": "^2.1.0", - "minipass": "^3.1.6", + "minipass": "^4.0.0", "npm-package-arg": "^10.0.0", "npm-packlist": "^7.0.0", "npm-pick-manifest": "^8.0.0", @@ -71,7 +71,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.8.0", + "version": "4.10.0", "windowsCI": false } } diff -Nru npm-9.1.2~ds1/package.json npm-9.2.0~ds1/package.json --- npm-9.1.2~ds1/package.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/package.json 2022-12-07 23:13:18.000000000 +0000 @@ -1,5 +1,5 @@ { - "version": "9.1.2", + "version": "9.2.0", "name": "npm", "description": "a package manager for JavaScript", "workspaces": [ @@ -53,16 +53,16 @@ }, "dependencies": { "@isaacs/string-locale-compare": "^1.1.0", - "@npmcli/arborist": "^6.1.3", + "@npmcli/arborist": "^6.1.5", "@npmcli/config": "^6.1.0", "@npmcli/map-workspaces": "^3.0.0", "@npmcli/package-json": "^3.0.0", "@npmcli/run-script": "^6.0.0", "abbrev": "^2.0.0", "archy": "~1.0.0", - "cacache": "^17.0.2", + "cacache": "^17.0.3", "chalk": "^4.1.2", - "ci-info": "^3.6.1", + "ci-info": "^3.7.0", "cli-columns": "^4.0.0", "cli-table3": "^0.6.3", "columnify": "^1.6.0", @@ -75,20 +75,20 @@ "init-package-json": "^4.0.1", "is-cidr": "^4.0.2", "json-parse-even-better-errors": "^3.0.0", - "libnpmaccess": "^7.0.0", - "libnpmdiff": "^5.0.4", - "libnpmexec": "^5.0.4", - "libnpmfund": "^4.0.4", - "libnpmhook": "^9.0.0", - "libnpmorg": "^5.0.0", - "libnpmpack": "^5.0.4", - "libnpmpublish": "^7.0.4", - "libnpmsearch": "^6.0.0", - "libnpmteam": "^5.0.0", + "libnpmaccess": "^7.0.1", + "libnpmdiff": "^5.0.6", + "libnpmexec": "^5.0.6", + "libnpmfund": "^4.0.6", + "libnpmhook": "^9.0.1", + "libnpmorg": "^5.0.1", + "libnpmpack": "^5.0.6", + "libnpmpublish": "^7.0.6", + "libnpmsearch": "^6.0.1", + "libnpmteam": "^5.0.1", "libnpmversion": "^4.0.1", - "make-fetch-happen": "^11.0.1", - "minimatch": "^5.1.0", - "minipass": "^3.1.6", + "make-fetch-happen": "^11.0.2", + "minimatch": "^5.1.1", + "minipass": "^4.0.0", "minipass-pipeline": "^1.2.4", "mkdirp": "^1.0.4", "ms": "^2.1.2", @@ -96,14 +96,14 @@ "nopt": "^7.0.0", "npm-audit-report": "^4.0.0", "npm-install-checks": "^6.0.0", - "npm-package-arg": "^10.0.0", + "npm-package-arg": "^10.1.0", "npm-pick-manifest": "^8.0.1", "npm-profile": "^7.0.1", - "npm-registry-fetch": "^14.0.2", + "npm-registry-fetch": "^14.0.3", "npm-user-validate": "^1.0.1", "npmlog": "^7.0.1", "p-map": "^4.0.0", - "pacote": "^15.0.6", + "pacote": "^15.0.7", "parse-conflict-json": "^3.0.0", "proc-log": "^3.0.0", "qrcode-terminal": "^0.12.0", @@ -112,8 +112,8 @@ "read-package-json-fast": "^3.0.1", "rimraf": "^3.0.2", "semver": "^7.3.8", - "ssri": "^10.0.0", - "tar": "^6.1.12", + "ssri": "^10.0.1", + "tar": "^6.1.13", "text-table": "~0.2.0", "tiny-relative-date": "^1.3.0", "treeverse": "^3.0.0", @@ -198,15 +198,15 @@ "@npmcli/git": "^4.0.1", "@npmcli/mock-registry": "^1.0.0", "@npmcli/promise-spawn": "^6.0.1", - "@npmcli/template-oss": "4.10.0", - "licensee": "^9.0.0", + "@npmcli/template-oss": "4.11.0", + "licensee": "^10.0.0", "nock": "^13.2.4", - "npm-packlist": "^7.0.1", + "npm-packlist": "^7.0.4", "remark": "^14.0.2", "remark-gfm": "^3.0.1", "remark-github": "^11.2.4", "spawk": "^1.7.1", - "tap": "^16.0.1" + "tap": "^16.3.2" }, "scripts": { "dependencies": "node scripts/bundle-and-gitignore-deps.js && node scripts/dependency-graph.js", @@ -252,7 +252,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.10.0", + "version": "4.11.0", "content": "./scripts/template-oss/root.js" }, "license": "Artistic-2.0", diff -Nru npm-9.1.2~ds1/package-lock.json npm-9.2.0~ds1/package-lock.json --- npm-9.1.2~ds1/package-lock.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/package-lock.json 2022-12-07 23:13:18.000000000 +0000 @@ -1,12 +1,12 @@ { "name": "npm", - "version": "9.1.2", + "version": "9.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "npm", - "version": "9.1.2", + "version": "9.2.0", "bundleDependencies": [ "@isaacs/string-locale-compare", "@npmcli/arborist", @@ -86,16 +86,16 @@ ], "dependencies": { "@isaacs/string-locale-compare": "^1.1.0", - "@npmcli/arborist": "^6.1.3", + "@npmcli/arborist": "^6.1.5", "@npmcli/config": "^6.1.0", "@npmcli/map-workspaces": "^3.0.0", "@npmcli/package-json": "^3.0.0", "@npmcli/run-script": "^6.0.0", "abbrev": "^2.0.0", "archy": "~1.0.0", - "cacache": "^17.0.2", + "cacache": "^17.0.3", "chalk": "^4.1.2", - "ci-info": "^3.6.1", + "ci-info": "^3.7.0", "cli-columns": "^4.0.0", "cli-table3": "^0.6.3", "columnify": "^1.6.0", @@ -108,20 +108,20 @@ "init-package-json": "^4.0.1", "is-cidr": "^4.0.2", "json-parse-even-better-errors": "^3.0.0", - "libnpmaccess": "^7.0.0", - "libnpmdiff": "^5.0.4", - "libnpmexec": "^5.0.4", - "libnpmfund": "^4.0.4", - "libnpmhook": "^9.0.0", - "libnpmorg": "^5.0.0", - "libnpmpack": "^5.0.4", - "libnpmpublish": "^7.0.4", - "libnpmsearch": "^6.0.0", - "libnpmteam": "^5.0.0", + "libnpmaccess": "^7.0.1", + "libnpmdiff": "^5.0.6", + "libnpmexec": "^5.0.6", + "libnpmfund": "^4.0.6", + "libnpmhook": "^9.0.1", + "libnpmorg": "^5.0.1", + "libnpmpack": "^5.0.6", + "libnpmpublish": "^7.0.6", + "libnpmsearch": "^6.0.1", + "libnpmteam": "^5.0.1", "libnpmversion": "^4.0.1", - "make-fetch-happen": "^11.0.1", - "minimatch": "^5.1.0", - "minipass": "^3.1.6", + "make-fetch-happen": "^11.0.2", + "minimatch": "^5.1.1", + "minipass": "^4.0.0", "minipass-pipeline": "^1.2.4", "mkdirp": "^1.0.4", "ms": "^2.1.2", @@ -129,14 +129,14 @@ "nopt": "^7.0.0", "npm-audit-report": "^4.0.0", "npm-install-checks": "^6.0.0", - "npm-package-arg": "^10.0.0", + "npm-package-arg": "^10.1.0", "npm-pick-manifest": "^8.0.1", "npm-profile": "^7.0.1", - "npm-registry-fetch": "^14.0.2", + "npm-registry-fetch": "^14.0.3", "npm-user-validate": "^1.0.1", "npmlog": "^7.0.1", "p-map": "^4.0.0", - "pacote": "^15.0.6", + "pacote": "^15.0.7", "parse-conflict-json": "^3.0.0", "proc-log": "^3.0.0", "qrcode-terminal": "^0.12.0", @@ -145,8 +145,8 @@ "read-package-json-fast": "^3.0.1", "rimraf": "^3.0.2", "semver": "^7.3.8", - "ssri": "^10.0.0", - "tar": "^6.1.12", + "ssri": "^10.0.1", + "tar": "^6.1.13", "text-table": "~0.2.0", "tiny-relative-date": "^1.3.0", "treeverse": "^3.0.0", @@ -165,15 +165,15 @@ "@npmcli/git": "^4.0.1", "@npmcli/mock-registry": "^1.0.0", "@npmcli/promise-spawn": "^6.0.1", - "@npmcli/template-oss": "4.10.0", - "licensee": "^9.0.0", + "@npmcli/template-oss": "4.11.0", + "licensee": "^10.0.0", "nock": "^13.2.4", - "npm-packlist": "^7.0.1", + "npm-packlist": "^7.0.4", "remark": "^14.0.2", "remark-gfm": "^3.0.1", "remark-github": "^11.2.4", "spawk": "^1.7.1", - "tap": "^16.0.1" + "tap": "^16.3.2" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" @@ -186,17 +186,17 @@ "devDependencies": { "@isaacs/string-locale-compare": "^1.1.0", "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", + "@npmcli/template-oss": "4.11.0", "front-matter": "^4.0.2", "ignore-walk": "^6.0.0", - "jsdom": "^20.0.1", + "jsdom": "^20.0.3", "mkdirp": "^1.0.4", "rehype-stringify": "^9.0.3", "remark-gfm": "^3.0.1", "remark-man": "^8.0.1", "remark-parse": "^10.0.1", "remark-rehype": "^10.1.0", - "tap": "^16.0.1", + "tap": "^16.3.2", "unified": "^10.1.2", "yaml": "^2.1.3" }, @@ -211,11 +211,11 @@ "devDependencies": { "@npmcli/arborist": "^6.1.1", "@npmcli/eslint-config": "^4.0.1", - "@npmcli/template-oss": "4.10.0", + "@npmcli/template-oss": "4.11.0", "nock": "^13.2.9", - "npm-package-arg": "^10.0.0", - "pacote": "^15.0.6", - "tap": "^16.3.0" + "npm-package-arg": "^10.1.0", + "pacote": "^15.0.7", + "tap": "^16.3.2" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" @@ -2260,9 +2260,9 @@ "link": true }, "node_modules/@npmcli/template-oss": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/@npmcli/template-oss/-/template-oss-4.10.0.tgz", - "integrity": "sha512-KeC93o3umyr3FpJots5paojysrU/RL/oNVhDEYKr3O+Replidr3EgU96VmnCJwfHcMs64lz9oIYA/94A5fAC9w==", + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/@npmcli/template-oss/-/template-oss-4.11.0.tgz", + "integrity": "sha512-nvZqRxT9AFf56Fj07v1yG9AQVOTNn82ysMVI67IzpktunKFHmZ5Tp8P/al5pPik/nYQ4AieEyh7XC2dMro4moA==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -2890,11 +2890,6 @@ "node": ">=0.10.0" } }, - "node_modules/asap": { - "version": "2.0.6", - "dev": true, - "license": "MIT" - }, "node_modules/async-hook-domain": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/async-hook-domain/-/async-hook-domain-2.0.4.tgz", @@ -3076,16 +3071,16 @@ } }, "node_modules/cacache": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-17.0.2.tgz", - "integrity": "sha512-rYUs2x4OjSgCQND7nTrh21AHIBFgd7s/ctAYvU3a8u+nK+R5YaX/SFPDYz4Azz7SGL6+6L9ZZWI4Kawpb7grzQ==", + "version": "17.0.3", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-17.0.3.tgz", + "integrity": "sha512-pwsIK/grdM0cHpfVaNFxMdzElBtLJGsVPE+JnxqXP1l40O01Z1mfDE8MbRTuwomGq/UwEtGisOylutOEVJxEqg==", "inBundle": true, "dependencies": { "@npmcli/fs": "^3.1.0", "fs-minipass": "^2.1.0", "glob": "^8.0.1", "lru-cache": "^7.7.1", - "minipass": "^3.1.6", + "minipass": "^4.0.0", "minipass-collect": "^1.0.2", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", @@ -3300,9 +3295,9 @@ } }, "node_modules/ci-info": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.6.1.tgz", - "integrity": "sha512-up5ggbaDqOqJ4UqLKZ2naVkyqSJQgJi5lwD6b6mM748ysrghDBX0bx/qJTUHzw7zu6Mq4gycviSF5hJnwceD8w==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.7.0.tgz", + "integrity": "sha512-2CpRNYmImPx+RXKLq6jko/L07phmS9I02TyqkcNU20GCF/GgaWvc58hPtjxDX8lPpkdwc9sNh72V9k00S7ezog==", "inBundle": true, "engines": { "node": ">=8" @@ -3895,14 +3890,6 @@ "inBundle": true, "license": "MIT" }, - "node_modules/debuglog": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": "*" - } - }, "node_modules/decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", @@ -4048,15 +4035,6 @@ "node": ">=8" } }, - "node_modules/dezalgo": { - "version": "1.0.4", - "dev": true, - "license": "ISC", - "dependencies": { - "asap": "^2.0.0", - "wrappy": "1" - } - }, "node_modules/diff": { "version": "5.1.0", "license": "BSD-3-Clause", @@ -5239,19 +5217,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/fs-access": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fs-access/-/fs-access-2.0.0.tgz", - "integrity": "sha512-Vt45hBKJrYDQeAD9ja43liw8JfK75uB7XexIXWEtDKwFLQNmzmvuulh28hRxexxuFm0zsGGq7nISGQSK6KnGrA==", - "deprecated": "This package is no longer relevant as Node.js 0.12 is unmaintained.", - "dev": true, - "dependencies": { - "null-check": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/fs-exists-cached": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs-exists-cached/-/fs-exists-cached-1.0.0.tgz", @@ -5283,6 +5248,18 @@ "node": ">= 8" } }, + "node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "inBundle": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/fs.realpath": { "version": "1.0.0", "inBundle": true, @@ -6472,9 +6449,9 @@ } }, "node_modules/jackspeak": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-1.4.1.tgz", - "integrity": "sha512-npN8f+M4+IQ8xD3CcWi3U62VQwKlT3Tj4GxbdT/fYTmeogD9eBF9OFdpoFG/VPNoshRjPUijdkp/p2XrzUHaVg==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-1.4.2.tgz", + "integrity": "sha512-GHeGTmnuaHnvS+ZctRB01bfxARuu9wW83ENbuiweu07SFcVlZrJpcshSre/keGT7YGBhLHg/+rXCNSrsEHKU4Q==", "dev": true, "dependencies": { "cliui": "^7.0.4" @@ -6509,18 +6486,18 @@ } }, "node_modules/jsdom": { - "version": "20.0.2", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-20.0.2.tgz", - "integrity": "sha512-AHWa+QO/cgRg4N+DsmHg1Y7xnz+8KU3EflM0LVDTdmrYOc1WWTSkOjtpUveQH+1Bqd5rtcVnb/DuxV/UjDO4rA==", + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-20.0.3.tgz", + "integrity": "sha512-SYhBvTh89tTfCD/CRdSOm13mOBa42iTaTyfyEWBdKcGdPxPtLFBXuHR8XHb33YNYaP+lLbmSvBTsnoesCNJEsQ==", "dev": true, "dependencies": { "abab": "^2.0.6", - "acorn": "^8.8.0", + "acorn": "^8.8.1", "acorn-globals": "^7.0.0", "cssom": "^0.5.0", "cssstyle": "^2.3.0", "data-urls": "^3.0.2", - "decimal.js": "^10.4.1", + "decimal.js": "^10.4.2", "domexception": "^4.0.0", "escodegen": "^2.0.0", "form-data": "^4.0.0", @@ -6533,12 +6510,12 @@ "saxes": "^6.0.0", "symbol-tree": "^3.2.4", "tough-cookie": "^4.1.2", - "w3c-xmlserializer": "^3.0.0", + "w3c-xmlserializer": "^4.0.0", "webidl-conversions": "^7.0.0", "whatwg-encoding": "^2.0.0", "whatwg-mimetype": "^3.0.0", "whatwg-url": "^11.0.0", - "ws": "^8.9.0", + "ws": "^8.11.0", "xml-name-validator": "^4.0.0" }, "engines": { @@ -6872,816 +6849,87 @@ }, "node_modules/libnpmsearch": { "resolved": "workspaces/libnpmsearch", - "link": true - }, - "node_modules/libnpmteam": { - "resolved": "workspaces/libnpmteam", - "link": true - }, - "node_modules/libnpmversion": { - "resolved": "workspaces/libnpmversion", - "link": true - }, - "node_modules/libtap": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/libtap/-/libtap-1.4.0.tgz", - "integrity": "sha512-STLFynswQ2A6W14JkabgGetBNk6INL1REgJ9UeNKw5llXroC2cGLgKTqavv0sl8OLVztLLipVKMcQ7yeUcqpmg==", - "dev": true, - "dependencies": { - "async-hook-domain": "^2.0.4", - "bind-obj-methods": "^3.0.0", - "diff": "^4.0.2", - "function-loop": "^2.0.1", - "minipass": "^3.1.5", - "own-or": "^1.0.0", - "own-or-env": "^1.0.2", - "signal-exit": "^3.0.4", - "stack-utils": "^2.0.4", - "tap-parser": "^11.0.0", - "tap-yaml": "^1.0.0", - "tcompare": "^5.0.6", - "trivial-deferred": "^1.0.1" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/libtap/node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/licensee": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/licensee/-/licensee-9.0.0.tgz", - "integrity": "sha512-uxGxNAFvX3H4Mdfmm1klrpgKiXyoGhmZagWFusXUEJyY4g01r/e2czOSpu4QJ8G+f4UShCmgYRSv1viiE64Kng==", - "dev": true, - "dependencies": { - "@blueoak/list": "^9.0.0", - "@npmcli/arborist": "^5.6.0", - "correct-license-metadata": "^1.0.1", - "docopt": "^0.6.2", - "fs-access": "^2.0.0", - "has": "^1.0.3", - "npm-license-corrections": "^1.0.0", - "semver": "^7.3.7", - "spdx-expression-parse": "^3.0.0", - "spdx-expression-validate": "^2.0.0", - "spdx-osi": "^3.0.0", - "spdx-whitelisted": "^1.0.0" - }, - "bin": { - "licensee": "licensee" - } - }, - "node_modules/licensee/node_modules/@npmcli/arborist": { - "version": "5.6.3", - "resolved": "https://registry.npmjs.org/@npmcli/arborist/-/arborist-5.6.3.tgz", - "integrity": "sha512-/7hbqEM6YuRjwTcQXkK1+xKslEblY5kFQe0tZ7jKyMlIR6x4iOmhLErIkBBGtTKvYxRKdpcxnFXjCobg3UqmsA==", - "dev": true, - "dependencies": { - "@isaacs/string-locale-compare": "^1.1.0", - "@npmcli/installed-package-contents": "^1.0.7", - "@npmcli/map-workspaces": "^2.0.3", - "@npmcli/metavuln-calculator": "^3.0.1", - "@npmcli/move-file": "^2.0.0", - "@npmcli/name-from-folder": "^1.0.1", - "@npmcli/node-gyp": "^2.0.0", - "@npmcli/package-json": "^2.0.0", - "@npmcli/query": "^1.2.0", - "@npmcli/run-script": "^4.1.3", - "bin-links": "^3.0.3", - "cacache": "^16.1.3", - "common-ancestor-path": "^1.0.1", - "hosted-git-info": "^5.2.1", - "json-parse-even-better-errors": "^2.3.1", - "json-stringify-nice": "^1.1.4", - "minimatch": "^5.1.0", - "mkdirp": "^1.0.4", - "mkdirp-infer-owner": "^2.0.0", - "nopt": "^6.0.0", - "npm-install-checks": "^5.0.0", - "npm-package-arg": "^9.0.0", - "npm-pick-manifest": "^7.0.2", - "npm-registry-fetch": "^13.0.0", - "npmlog": "^6.0.2", - "pacote": "^13.6.1", - "parse-conflict-json": "^2.0.1", - "proc-log": "^2.0.0", - "promise-all-reject-late": "^1.0.0", - "promise-call-limit": "^1.0.1", - "read-package-json-fast": "^2.0.2", - "readdir-scoped-modules": "^1.1.0", - "rimraf": "^3.0.2", - "semver": "^7.3.7", - "ssri": "^9.0.0", - "treeverse": "^2.0.0", - "walk-up-path": "^1.0.0" - }, - "bin": { - "arborist": "bin/index.js" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/licensee/node_modules/@npmcli/fs": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.2.tgz", - "integrity": "sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ==", - "dev": true, - "dependencies": { - "@gar/promisify": "^1.1.3", - "semver": "^7.3.5" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/licensee/node_modules/@npmcli/git": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-3.0.2.tgz", - "integrity": "sha512-CAcd08y3DWBJqJDpfuVL0uijlq5oaXaOJEKHKc4wqrjd00gkvTZB+nFuLn+doOOKddaQS9JfqtNoFCO2LCvA3w==", - "dev": true, - "dependencies": { - "@npmcli/promise-spawn": "^3.0.0", - "lru-cache": "^7.4.4", - "mkdirp": "^1.0.4", - "npm-pick-manifest": "^7.0.0", - "proc-log": "^2.0.0", - "promise-inflight": "^1.0.1", - "promise-retry": "^2.0.1", - "semver": "^7.3.5", - "which": "^2.0.2" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/licensee/node_modules/@npmcli/installed-package-contents": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-1.0.7.tgz", - "integrity": "sha512-9rufe0wnJusCQoLpV9ZPKIVP55itrM5BxOXs10DmdbRfgWtHy1LDyskbwRnBghuB0PrF7pNPOqREVtpz4HqzKw==", - "dev": true, - "dependencies": { - "npm-bundled": "^1.1.1", - "npm-normalize-package-bin": "^1.0.1" - }, - "bin": { - "installed-package-contents": "index.js" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/licensee/node_modules/@npmcli/map-workspaces": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@npmcli/map-workspaces/-/map-workspaces-2.0.4.tgz", - "integrity": "sha512-bMo0aAfwhVwqoVM5UzX1DJnlvVvzDCHae821jv48L1EsrYwfOZChlqWYXEtto/+BkBXetPbEWgau++/brh4oVg==", - "dev": true, - "dependencies": { - "@npmcli/name-from-folder": "^1.0.1", - "glob": "^8.0.1", - "minimatch": "^5.0.1", - "read-package-json-fast": "^2.0.3" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/licensee/node_modules/@npmcli/metavuln-calculator": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@npmcli/metavuln-calculator/-/metavuln-calculator-3.1.1.tgz", - "integrity": "sha512-n69ygIaqAedecLeVH3KnO39M6ZHiJ2dEv5A7DGvcqCB8q17BGUgW8QaanIkbWUo2aYGZqJaOORTLAlIvKjNDKA==", - "dev": true, - "dependencies": { - "cacache": "^16.0.0", - "json-parse-even-better-errors": "^2.3.1", - "pacote": "^13.0.3", - "semver": "^7.3.5" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/licensee/node_modules/@npmcli/move-file": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-2.0.1.tgz", - "integrity": "sha512-mJd2Z5TjYWq/ttPLLGqArdtnC74J6bOzg4rMDnN+p1xTacZ2yPRCk2y0oSWQtygLR9YVQXgOcONrwtnk3JupxQ==", - "deprecated": "This functionality has been moved to @npmcli/fs", - "dev": true, - "dependencies": { - "mkdirp": "^1.0.4", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/licensee/node_modules/@npmcli/node-gyp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-2.0.0.tgz", - "integrity": "sha512-doNI35wIe3bBaEgrlPfdJPaCpUR89pJWep4Hq3aRdh6gKazIVWfs0jHttvSSoq47ZXgC7h73kDsUl8AoIQUB+A==", - "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/licensee/node_modules/@npmcli/package-json": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/package-json/-/package-json-2.0.0.tgz", - "integrity": "sha512-42jnZ6yl16GzjWSH7vtrmWyJDGVa/LXPdpN2rcUWolFjc9ON2N3uz0qdBbQACfmhuJZ2lbKYtmK5qx68ZPLHMA==", - "dev": true, - "dependencies": { - "json-parse-even-better-errors": "^2.3.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/licensee/node_modules/@npmcli/promise-spawn": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-3.0.0.tgz", - "integrity": "sha512-s9SgS+p3a9Eohe68cSI3fi+hpcZUmXq5P7w0kMlAsWVtR7XbK3ptkZqKT2cK1zLDObJ3sR+8P59sJE0w/KTL1g==", - "dev": true, - "dependencies": { - "infer-owner": "^1.0.4" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/licensee/node_modules/@npmcli/query": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@npmcli/query/-/query-1.2.0.tgz", - "integrity": "sha512-uWglsUM3PjBLgTSmZ3/vygeGdvWEIZ3wTUnzGFbprC/RtvQSaT+GAXu1DXmSFj2bD3oOZdcRm1xdzsV2z1YWdw==", - "dev": true, - "dependencies": { - "npm-package-arg": "^9.1.0", - "postcss-selector-parser": "^6.0.10", - "semver": "^7.3.7" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/licensee/node_modules/@npmcli/run-script": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-4.2.1.tgz", - "integrity": "sha512-7dqywvVudPSrRCW5nTHpHgeWnbBtz8cFkOuKrecm6ih+oO9ciydhWt6OF7HlqupRRmB8Q/gECVdB9LMfToJbRg==", - "dev": true, - "dependencies": { - "@npmcli/node-gyp": "^2.0.0", - "@npmcli/promise-spawn": "^3.0.0", - "node-gyp": "^9.0.0", - "read-package-json-fast": "^2.0.3", - "which": "^2.0.2" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/licensee/node_modules/abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "dev": true - }, - "node_modules/licensee/node_modules/are-we-there-yet": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz", - "integrity": "sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==", - "dev": true, - "dependencies": { - "delegates": "^1.0.0", - "readable-stream": "^3.6.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/licensee/node_modules/bin-links": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/bin-links/-/bin-links-3.0.3.tgz", - "integrity": "sha512-zKdnMPWEdh4F5INR07/eBrodC7QrF5JKvqskjz/ZZRXg5YSAZIbn8zGhbhUrElzHBZ2fvEQdOU59RHcTG3GiwA==", - "dev": true, - "dependencies": { - "cmd-shim": "^5.0.0", - "mkdirp-infer-owner": "^2.0.0", - "npm-normalize-package-bin": "^2.0.0", - "read-cmd-shim": "^3.0.0", - "rimraf": "^3.0.0", - "write-file-atomic": "^4.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/licensee/node_modules/bin-links/node_modules/npm-normalize-package-bin": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-2.0.0.tgz", - "integrity": "sha512-awzfKUO7v0FscrSpRoogyNm0sajikhBWpU0QMrW09AMi9n1PoKU6WaIqUzuJSQnpciZZmJ/jMZ2Egfmb/9LiWQ==", - "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/licensee/node_modules/cacache": { - "version": "16.1.3", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.3.tgz", - "integrity": "sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ==", - "dev": true, - "dependencies": { - "@npmcli/fs": "^2.1.0", - "@npmcli/move-file": "^2.0.0", - "chownr": "^2.0.0", - "fs-minipass": "^2.1.0", - "glob": "^8.0.1", - "infer-owner": "^1.0.4", - "lru-cache": "^7.7.1", - "minipass": "^3.1.6", - "minipass-collect": "^1.0.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "mkdirp": "^1.0.4", - "p-map": "^4.0.0", - "promise-inflight": "^1.0.1", - "rimraf": "^3.0.2", - "ssri": "^9.0.0", - "tar": "^6.1.11", - "unique-filename": "^2.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/licensee/node_modules/cmd-shim": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-5.0.0.tgz", - "integrity": "sha512-qkCtZ59BidfEwHltnJwkyVZn+XQojdAySM1D1gSeh11Z4pW1Kpolkyo53L5noc0nrxmIvyFwTmJRo4xs7FFLPw==", - "dev": true, - "dependencies": { - "mkdirp-infer-owner": "^2.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/licensee/node_modules/gauge": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz", - "integrity": "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==", - "dev": true, - "dependencies": { - "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.3", - "console-control-strings": "^1.1.0", - "has-unicode": "^2.0.1", - "signal-exit": "^3.0.7", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wide-align": "^1.1.5" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/licensee/node_modules/hosted-git-info": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-5.2.1.tgz", - "integrity": "sha512-xIcQYMnhcx2Nr4JTjsFmwwnr9vldugPy9uVm0o87bjqqWMv9GaqsTeT+i99wTl0mk1uLxJtHxLb8kymqTENQsw==", - "dev": true, - "dependencies": { - "lru-cache": "^7.5.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/licensee/node_modules/ignore-walk": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-5.0.1.tgz", - "integrity": "sha512-yemi4pMf51WKT7khInJqAvsIGzoqYXblnsz0ql8tM+yi1EKYTY1evX4NAbJrLL/Aanr2HyZeluqU+Oi7MGHokw==", - "dev": true, - "dependencies": { - "minimatch": "^5.0.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/licensee/node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true - }, - "node_modules/licensee/node_modules/make-fetch-happen": { - "version": "10.2.1", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.2.1.tgz", - "integrity": "sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w==", - "dev": true, - "dependencies": { - "agentkeepalive": "^4.2.1", - "cacache": "^16.1.0", - "http-cache-semantics": "^4.1.0", - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.0", - "is-lambda": "^1.0.1", - "lru-cache": "^7.7.1", - "minipass": "^3.1.6", - "minipass-collect": "^1.0.2", - "minipass-fetch": "^2.0.3", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "negotiator": "^0.6.3", - "promise-retry": "^2.0.1", - "socks-proxy-agent": "^7.0.0", - "ssri": "^9.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/licensee/node_modules/minipass-fetch": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.1.2.tgz", - "integrity": "sha512-LT49Zi2/WMROHYoqGgdlQIZh8mLPZmOrN2NdJjMXxYe4nkN6FUyuPuOAOedNJDrx0IRGg9+4guZewtp8hE6TxA==", - "dev": true, - "dependencies": { - "minipass": "^3.1.6", - "minipass-sized": "^1.0.3", - "minizlib": "^2.1.2" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - }, - "optionalDependencies": { - "encoding": "^0.1.13" - } - }, - "node_modules/licensee/node_modules/nopt": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz", - "integrity": "sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==", - "dev": true, - "dependencies": { - "abbrev": "^1.0.0" - }, - "bin": { - "nopt": "bin/nopt.js" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/licensee/node_modules/normalize-package-data": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-4.0.1.tgz", - "integrity": "sha512-EBk5QKKuocMJhB3BILuKhmaPjI8vNRSpIfO9woLC6NyHVkKKdVEdAO1mrT0ZfxNR1lKwCcTkuZfmGIFdizZ8Pg==", - "dev": true, - "dependencies": { - "hosted-git-info": "^5.0.0", - "is-core-module": "^2.8.1", - "semver": "^7.3.5", - "validate-npm-package-license": "^3.0.4" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/licensee/node_modules/npm-bundled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.2.tgz", - "integrity": "sha512-x5DHup0SuyQcmL3s7Rx/YQ8sbw/Hzg0rj48eN0dV7hf5cmQq5PXIeioroH3raV1QC1yh3uTYuMThvEQF3iKgGQ==", - "dev": true, - "dependencies": { - "npm-normalize-package-bin": "^1.0.1" - } - }, - "node_modules/licensee/node_modules/npm-install-checks": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-5.0.0.tgz", - "integrity": "sha512-65lUsMI8ztHCxFz5ckCEC44DRvEGdZX5usQFriauxHEwt7upv1FKaQEmAtU0YnOAdwuNWCmk64xYiQABNrEyLA==", - "dev": true, - "dependencies": { - "semver": "^7.1.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/licensee/node_modules/npm-normalize-package-bin": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", - "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==", - "dev": true - }, - "node_modules/licensee/node_modules/npm-package-arg": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-9.1.2.tgz", - "integrity": "sha512-pzd9rLEx4TfNJkovvlBSLGhq31gGu2QDexFPWT19yCDh0JgnRhlBLNo5759N0AJmBk+kQ9Y/hXoLnlgFD+ukmg==", - "dev": true, - "dependencies": { - "hosted-git-info": "^5.0.0", - "proc-log": "^2.0.1", - "semver": "^7.3.5", - "validate-npm-package-name": "^4.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/licensee/node_modules/npm-packlist": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-5.1.3.tgz", - "integrity": "sha512-263/0NGrn32YFYi4J533qzrQ/krmmrWwhKkzwTuM4f/07ug51odoaNjUexxO4vxlzURHcmYMH1QjvHjsNDKLVg==", - "dev": true, - "dependencies": { - "glob": "^8.0.1", - "ignore-walk": "^5.0.1", - "npm-bundled": "^2.0.0", - "npm-normalize-package-bin": "^2.0.0" - }, - "bin": { - "npm-packlist": "bin/index.js" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/licensee/node_modules/npm-packlist/node_modules/npm-bundled": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-2.0.1.tgz", - "integrity": "sha512-gZLxXdjEzE/+mOstGDqR6b0EkhJ+kM6fxM6vUuckuctuVPh80Q6pw/rSZj9s4Gex9GxWtIicO1pc8DB9KZWudw==", - "dev": true, - "dependencies": { - "npm-normalize-package-bin": "^2.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/licensee/node_modules/npm-packlist/node_modules/npm-normalize-package-bin": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-2.0.0.tgz", - "integrity": "sha512-awzfKUO7v0FscrSpRoogyNm0sajikhBWpU0QMrW09AMi9n1PoKU6WaIqUzuJSQnpciZZmJ/jMZ2Egfmb/9LiWQ==", - "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/licensee/node_modules/npm-pick-manifest": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-7.0.2.tgz", - "integrity": "sha512-gk37SyRmlIjvTfcYl6RzDbSmS9Y4TOBXfsPnoYqTHARNgWbyDiCSMLUpmALDj4jjcTZpURiEfsSHJj9k7EV4Rw==", - "dev": true, - "dependencies": { - "npm-install-checks": "^5.0.0", - "npm-normalize-package-bin": "^2.0.0", - "npm-package-arg": "^9.0.0", - "semver": "^7.3.5" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/licensee/node_modules/npm-pick-manifest/node_modules/npm-normalize-package-bin": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-2.0.0.tgz", - "integrity": "sha512-awzfKUO7v0FscrSpRoogyNm0sajikhBWpU0QMrW09AMi9n1PoKU6WaIqUzuJSQnpciZZmJ/jMZ2Egfmb/9LiWQ==", - "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/licensee/node_modules/npm-registry-fetch": { - "version": "13.3.1", - "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-13.3.1.tgz", - "integrity": "sha512-eukJPi++DKRTjSBRcDZSDDsGqRK3ehbxfFUcgaRd0Yp6kRwOwh2WVn0r+8rMB4nnuzvAk6rQVzl6K5CkYOmnvw==", - "dev": true, - "dependencies": { - "make-fetch-happen": "^10.0.6", - "minipass": "^3.1.6", - "minipass-fetch": "^2.0.3", - "minipass-json-stream": "^1.0.1", - "minizlib": "^2.1.2", - "npm-package-arg": "^9.0.1", - "proc-log": "^2.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/licensee/node_modules/npmlog": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz", - "integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==", - "dev": true, - "dependencies": { - "are-we-there-yet": "^3.0.0", - "console-control-strings": "^1.1.0", - "gauge": "^4.0.3", - "set-blocking": "^2.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/licensee/node_modules/pacote": { - "version": "13.6.2", - "resolved": "https://registry.npmjs.org/pacote/-/pacote-13.6.2.tgz", - "integrity": "sha512-Gu8fU3GsvOPkak2CkbojR7vjs3k3P9cA6uazKTHdsdV0gpCEQq2opelnEv30KRQWgVzP5Vd/5umjcedma3MKtg==", - "dev": true, - "dependencies": { - "@npmcli/git": "^3.0.0", - "@npmcli/installed-package-contents": "^1.0.7", - "@npmcli/promise-spawn": "^3.0.0", - "@npmcli/run-script": "^4.1.0", - "cacache": "^16.0.0", - "chownr": "^2.0.0", - "fs-minipass": "^2.1.0", - "infer-owner": "^1.0.4", - "minipass": "^3.1.6", - "mkdirp": "^1.0.4", - "npm-package-arg": "^9.0.0", - "npm-packlist": "^5.1.0", - "npm-pick-manifest": "^7.0.0", - "npm-registry-fetch": "^13.0.1", - "proc-log": "^2.0.0", - "promise-retry": "^2.0.1", - "read-package-json": "^5.0.0", - "read-package-json-fast": "^2.0.3", - "rimraf": "^3.0.2", - "ssri": "^9.0.0", - "tar": "^6.1.11" - }, - "bin": { - "pacote": "lib/bin.js" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/licensee/node_modules/parse-conflict-json": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/parse-conflict-json/-/parse-conflict-json-2.0.2.tgz", - "integrity": "sha512-jDbRGb00TAPFsKWCpZZOT93SxVP9nONOSgES3AevqRq/CHvavEBvKAjxX9p5Y5F0RZLxH9Ufd9+RwtCsa+lFDA==", - "dev": true, - "dependencies": { - "json-parse-even-better-errors": "^2.3.1", - "just-diff": "^5.0.1", - "just-diff-apply": "^5.2.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/licensee/node_modules/proc-log": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-2.0.1.tgz", - "integrity": "sha512-Kcmo2FhfDTXdcbfDH76N7uBYHINxc/8GW7UAVuVP9I+Va3uHSerrnKV6dLooga/gh7GlgzuCCr/eoldnL1muGw==", - "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/licensee/node_modules/read-cmd-shim": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-3.0.1.tgz", - "integrity": "sha512-kEmDUoYf/CDy8yZbLTmhB1X9kkjf9Q80PCNsDMb7ufrGd6zZSQA1+UyjrO+pZm5K/S4OXCWJeiIt1JA8kAsa6g==", - "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/licensee/node_modules/read-package-json": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-5.0.2.tgz", - "integrity": "sha512-BSzugrt4kQ/Z0krro8zhTwV1Kd79ue25IhNN/VtHFy1mG/6Tluyi+msc0UpwaoQzxSHa28mntAjIZY6kEgfR9Q==", - "dev": true, - "dependencies": { - "glob": "^8.0.1", - "json-parse-even-better-errors": "^2.3.1", - "normalize-package-data": "^4.0.0", - "npm-normalize-package-bin": "^2.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/licensee/node_modules/read-package-json-fast": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-2.0.3.tgz", - "integrity": "sha512-W/BKtbL+dUjTuRL2vziuYhp76s5HZ9qQhd/dKfWIZveD0O40453QNyZhC0e63lqZrAQ4jiOapVoeJ7JrszenQQ==", - "dev": true, - "dependencies": { - "json-parse-even-better-errors": "^2.3.0", - "npm-normalize-package-bin": "^1.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/licensee/node_modules/read-package-json/node_modules/npm-normalize-package-bin": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-2.0.0.tgz", - "integrity": "sha512-awzfKUO7v0FscrSpRoogyNm0sajikhBWpU0QMrW09AMi9n1PoKU6WaIqUzuJSQnpciZZmJ/jMZ2Egfmb/9LiWQ==", - "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } + "link": true }, - "node_modules/licensee/node_modules/ssri": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-9.0.1.tgz", - "integrity": "sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==", - "dev": true, - "dependencies": { - "minipass": "^3.1.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } + "node_modules/libnpmteam": { + "resolved": "workspaces/libnpmteam", + "link": true }, - "node_modules/licensee/node_modules/treeverse": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/treeverse/-/treeverse-2.0.0.tgz", - "integrity": "sha512-N5gJCkLu1aXccpOTtqV6ddSEi6ZmGkh3hjmbu1IjcavJK4qyOVQmi0myQKM7z5jVGmD68SJoliaVrMmVObhj6A==", - "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } + "node_modules/libnpmversion": { + "resolved": "workspaces/libnpmversion", + "link": true }, - "node_modules/licensee/node_modules/unique-filename": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-2.0.1.tgz", - "integrity": "sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A==", + "node_modules/libtap": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/libtap/-/libtap-1.4.0.tgz", + "integrity": "sha512-STLFynswQ2A6W14JkabgGetBNk6INL1REgJ9UeNKw5llXroC2cGLgKTqavv0sl8OLVztLLipVKMcQ7yeUcqpmg==", "dev": true, "dependencies": { - "unique-slug": "^3.0.0" + "async-hook-domain": "^2.0.4", + "bind-obj-methods": "^3.0.0", + "diff": "^4.0.2", + "function-loop": "^2.0.1", + "minipass": "^3.1.5", + "own-or": "^1.0.0", + "own-or-env": "^1.0.2", + "signal-exit": "^3.0.4", + "stack-utils": "^2.0.4", + "tap-parser": "^11.0.0", + "tap-yaml": "^1.0.0", + "tcompare": "^5.0.6", + "trivial-deferred": "^1.0.1" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/licensee/node_modules/unique-slug": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-3.0.0.tgz", - "integrity": "sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w==", + "node_modules/libtap/node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", "dev": true, - "dependencies": { - "imurmurhash": "^0.1.4" - }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": ">=0.3.1" } }, - "node_modules/licensee/node_modules/validate-npm-package-name": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-4.0.0.tgz", - "integrity": "sha512-mzR0L8ZDktZjpX4OB46KT+56MAhl4EIazWP/+G/HPGuvfdaqg4YsCdtOm6U9+LOFyYDoh4dpnpxZRB9MQQns5Q==", + "node_modules/libtap/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", "dev": true, "dependencies": { - "builtins": "^5.0.0" + "yallist": "^4.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": ">=8" } }, - "node_modules/licensee/node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "node_modules/licensee": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/licensee/-/licensee-10.0.0.tgz", + "integrity": "sha512-gvn5JHCNuchGGjjIm6FsK4qSOTtHkbUfo8YKW61hhEIk3osEf3fKlCH9ma0j+HaVESrOt0YUOmsi/wusKSnneQ==", "dev": true, "dependencies": { - "isexe": "^2.0.0" + "@blueoak/list": "^9.0.0", + "@npmcli/arborist": "^6.1.2", + "correct-license-metadata": "^1.4.0", + "docopt": "^0.6.2", + "has": "^1.0.3", + "npm-license-corrections": "^1.6.2", + "semver": "^7.3.8", + "spdx-expression-parse": "^3.0.1", + "spdx-expression-validate": "^2.0.0", + "spdx-osi": "^3.0.0", + "spdx-whitelisted": "^1.0.0" }, "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/licensee/node_modules/write-file-atomic": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", - "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", - "dev": true, - "dependencies": { - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.7" + "licensee": "licensee" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": ">= 14.17" } }, "node_modules/lines-and-columns": { @@ -7809,9 +7057,10 @@ "dev": true }, "node_modules/make-fetch-happen": { - "version": "11.0.1", + "version": "11.0.2", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-11.0.2.tgz", + "integrity": "sha512-5n/Pq41w/uZghpdlXAY5kIM85RgJThtTH/NYBRAZ9VUOBWV90USaQjwGrw76fZP3Lj5hl/VZjpVvOaRBMoL/2w==", "inBundle": true, - "license": "ISC", "dependencies": { "agentkeepalive": "^4.2.1", "cacache": "^17.0.0", @@ -7820,7 +7069,7 @@ "https-proxy-agent": "^5.0.0", "is-lambda": "^1.0.1", "lru-cache": "^7.7.1", - "minipass": "^3.1.6", + "minipass": "^4.0.0", "minipass-collect": "^1.0.2", "minipass-fetch": "^3.0.0", "minipass-flush": "^1.0.5", @@ -8854,15 +8103,19 @@ } }, "node_modules/minify-registry-metadata": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/minify-registry-metadata/-/minify-registry-metadata-2.2.0.tgz", - "integrity": "sha512-kBVcTfDnYx9nL1U+6l6drCrZHPlkEoniLLud//nXxXvJAx0D7P4IHU2vkcCrLozoAPomiIX/CzaEXFm1CmT/8A==", - "dev": true + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/minify-registry-metadata/-/minify-registry-metadata-3.0.0.tgz", + "integrity": "sha512-EvM09tT0saeVP2Tlu9WEUDUgTYi684LsBbC+nbU3XEENgnzz+aEskigZR+OYG8LJPat1FdSIKMkJLMojg0FIiQ==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } }, "node_modules/minimatch": { - "version": "5.1.0", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.1.tgz", + "integrity": "sha512-362NP+zlprccbEt/SkxKfRMHnNY85V74mVnpUpNyr3F35covl09Kec7/sEFLt3RA4oXmewtoaanoIf67SE5Y5g==", "inBundle": true, - "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -8894,9 +8147,10 @@ } }, "node_modules/minipass": { - "version": "3.3.4", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.0.0.tgz", + "integrity": "sha512-g2Uuh2jEKoht+zvO6vJqXmYpflPqzRBT+Th2h01DKh5z7wbY/AZ2gCQ78cP70YoHPyFdY30YBV5WxgLOEwOykw==", "inBundle": true, - "license": "ISC", "dependencies": { "yallist": "^4.0.0" }, @@ -8915,6 +8169,18 @@ "node": ">= 8" } }, + "node_modules/minipass-collect/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "inBundle": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/minipass-fetch": { "version": "3.0.0", "inBundle": true, @@ -8931,6 +8197,18 @@ "encoding": "^0.1.13" } }, + "node_modules/minipass-fetch/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "inBundle": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/minipass-flush": { "version": "1.0.5", "inBundle": true, @@ -8942,6 +8220,18 @@ "node": ">= 8" } }, + "node_modules/minipass-flush/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "inBundle": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/minipass-json-stream": { "version": "1.0.1", "inBundle": true, @@ -8951,6 +8241,18 @@ "minipass": "^3.0.0" } }, + "node_modules/minipass-json-stream/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "inBundle": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/minipass-pipeline": { "version": "1.2.4", "inBundle": true, @@ -8962,6 +8264,18 @@ "node": ">=8" } }, + "node_modules/minipass-pipeline/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "inBundle": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/minipass-sized": { "version": "1.0.3", "inBundle": true, @@ -8973,6 +8287,18 @@ "node": ">=8" } }, + "node_modules/minipass-sized/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "inBundle": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/minizlib": { "version": "2.1.2", "inBundle": true, @@ -8985,6 +8311,18 @@ "node": ">= 8" } }, + "node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "inBundle": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/mkdirp": { "version": "1.0.4", "inBundle": true, @@ -8996,20 +8334,6 @@ "node": ">=10" } }, - "node_modules/mkdirp-infer-owner": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mkdirp-infer-owner/-/mkdirp-infer-owner-2.0.0.tgz", - "integrity": "sha512-sdqtiFt3lkOaYvTXSRIUjkIdPTcxgv5+fgqYE/5qgwdw12cOrAuzzgzvVExIkH/ul1oeHN3bCLOWSG3XOqbKKw==", - "dev": true, - "dependencies": { - "chownr": "^2.0.0", - "infer-owner": "^1.0.4", - "mkdirp": "^1.0.3" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/modify-values": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/modify-values/-/modify-values-1.0.1.tgz", @@ -9315,6 +8639,18 @@ "node": "*" } }, + "node_modules/node-gyp/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "inBundle": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/node-gyp/node_modules/minipass-fetch": { "version": "2.1.2", "inBundle": true, @@ -9519,9 +8855,9 @@ } }, "node_modules/npm-package-arg": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-10.0.0.tgz", - "integrity": "sha512-7dkh8mRp7s0KwVHKIVJnFCJQ2B34gOGnzgBjDGyprycmARq/82SX/lhilQ95ZuacP/G/1gsS345iAkKmxWBQ2Q==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-10.1.0.tgz", + "integrity": "sha512-uFyyCEmgBfZTtrKk/5xDfHp6+MdrqGotX/VoOyEEl3mBwiEE5FlBaePanazJSVMPT7vKepcjYBY2ztg9A3yPIA==", "inBundle": true, "dependencies": { "hosted-git-info": "^6.0.0", @@ -9534,9 +8870,10 @@ } }, "node_modules/npm-packlist": { - "version": "7.0.2", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-7.0.4.tgz", + "integrity": "sha512-d6RGEuRrNS5/N84iglPivjaJPxhDbZmlbTwTDX2IbcRHG5bZCdtysYMhwiPvcF4GisXHGn7xsxv+GQ7T/02M5Q==", "inBundle": true, - "license": "ISC", "dependencies": { "ignore-walk": "^6.0.0" }, @@ -9571,12 +8908,13 @@ } }, "node_modules/npm-registry-fetch": { - "version": "14.0.2", + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-14.0.3.tgz", + "integrity": "sha512-YaeRbVNpnWvsGOjX2wk5s85XJ7l1qQBGAp724h8e2CZFFhMSuw9enom7K1mWVUtvXO1uUSFIAPofQK0pPN0ZcA==", "inBundle": true, - "license": "ISC", "dependencies": { "make-fetch-happen": "^11.0.0", - "minipass": "^3.1.6", + "minipass": "^4.0.0", "minipass-fetch": "^3.0.0", "minipass-json-stream": "^1.0.1", "minizlib": "^2.1.2", @@ -9630,15 +8968,6 @@ "url": "https://github.com/fb55/nth-check?sponsor=1" } }, - "node_modules/null-check": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/null-check/-/null-check-1.0.0.tgz", - "integrity": "sha512-j8ZNHg19TyIQOWCGeeQJBuu6xZYIEurf8M1Qsfd8mFrGEfIZytbw18YjKWg+LcO25NowXGZXZpKAx+Ui3TFfDw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/number-is-nan": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", @@ -10104,9 +9433,9 @@ } }, "node_modules/pacote": { - "version": "15.0.6", - "resolved": "https://registry.npmjs.org/pacote/-/pacote-15.0.6.tgz", - "integrity": "sha512-dQwcz/sME7QIL+cdrw/jftQfMMXxSo17i2kJ/gnhBhUvvBAsxoBu1lw9B5IzCH/Ce8CvEkG/QYZ6txzKfn0bTw==", + "version": "15.0.7", + "resolved": "https://registry.npmjs.org/pacote/-/pacote-15.0.7.tgz", + "integrity": "sha512-OFf4dl3SM1PpsZvi1zk4vvMA0EplnyO0Ajbrtoyx6E3dXOWBoPnMapnLgQdInEfqPkNT8mrd2bY6c5t8JZ69sQ==", "inBundle": true, "dependencies": { "@npmcli/git": "^4.0.0", @@ -10115,7 +9444,7 @@ "@npmcli/run-script": "^6.0.0", "cacache": "^17.0.0", "fs-minipass": "^2.1.0", - "minipass": "^3.1.6", + "minipass": "^4.0.0", "npm-package-arg": "^10.0.0", "npm-packlist": "^7.0.0", "npm-pick-manifest": "^8.0.0", @@ -10724,17 +10053,6 @@ "node": ">= 6" } }, - "node_modules/readdir-scoped-modules": { - "version": "1.1.0", - "dev": true, - "license": "ISC", - "dependencies": { - "debuglog": "^1.0.1", - "dezalgo": "^1.0.0", - "graceful-fs": "^4.1.2", - "once": "^1.3.0" - } - }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -11584,11 +10902,12 @@ "dev": true }, "node_modules/ssri": { - "version": "10.0.0", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.1.tgz", + "integrity": "sha512-WVy6di9DlPOeBWEjMScpNipeSX2jIZBGEn5Uuo8Q7aIuFEuDX0pw8RxcOjlD1TWP4obi24ki7m/13+nFpcbXrw==", "inBundle": true, - "license": "ISC", "dependencies": { - "minipass": "^3.1.1" + "minipass": "^4.0.0" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" @@ -11790,9 +11109,9 @@ "dev": true }, "node_modules/tap": { - "version": "16.3.0", - "resolved": "https://registry.npmjs.org/tap/-/tap-16.3.0.tgz", - "integrity": "sha512-J9GffPUAbX6FnWbQ/jj7ktzd9nnDFP1fH44OzidqOmxUfZ1hPLMOvpS99LnDiP0H2mO8GY3kGN5XoY0xIKbNFA==", + "version": "16.3.2", + "resolved": "https://registry.npmjs.org/tap/-/tap-16.3.2.tgz", + "integrity": "sha512-4MWMObR8unbv5gAHHVW9F0MNk3opQMnLusSWvt4KBAnKmkwpBRKIfNF64fimQbcR4y9a7U9ISV7pCldlV3J8Pw==", "bundleDependencies": [ "ink", "treport", @@ -11803,18 +11122,18 @@ "dev": true, "dependencies": { "@isaacs/import-jsx": "^4.0.1", - "@types/react": "^17", + "@types/react": "^17.0.52", "chokidar": "^3.3.0", "findit": "^2.0.0", "foreground-child": "^2.0.0", "fs-exists-cached": "^1.0.0", - "glob": "^7.1.6", + "glob": "^7.2.3", "ink": "^3.2.0", "isexe": "^2.0.0", - "istanbul-lib-processinfo": "^2.0.2", - "jackspeak": "^1.4.1", + "istanbul-lib-processinfo": "^2.0.3", + "jackspeak": "^1.4.2", "libtap": "^1.4.0", - "minipass": "^3.1.1", + "minipass": "^3.3.4", "mkdirp": "^1.0.4", "nyc": "^15.1.0", "opener": "^1.5.1", @@ -11823,10 +11142,10 @@ "signal-exit": "^3.0.6", "source-map-support": "^0.5.16", "tap-mocha-reporter": "^5.0.3", - "tap-parser": "^11.0.1", - "tap-yaml": "^1.0.0", + "tap-parser": "^11.0.2", + "tap-yaml": "^1.0.2", "tcompare": "^5.0.7", - "treport": "^3.0.3", + "treport": "^3.0.4", "which": "^2.0.2" }, "bin": { @@ -11942,9 +11261,9 @@ } }, "node_modules/tap-parser": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/tap-parser/-/tap-parser-11.0.1.tgz", - "integrity": "sha512-5ow0oyFOnXVSALYdidMX94u0GEjIlgc/BPFYLx0yRh9hb8+cFGNJqJzDJlUqbLOwx8+NBrIbxCWkIQi7555c0w==", + "version": "11.0.2", + "resolved": "https://registry.npmjs.org/tap-parser/-/tap-parser-11.0.2.tgz", + "integrity": "sha512-6qGlC956rcORw+fg7Fv1iCRAY8/bU9UabUAhs3mXRH6eRmVZcNPLheSXCYaVaYeSwx5xa/1HXZb1537YSvwDZg==", "dev": true, "dependencies": { "events-to-array": "^1.0.1", @@ -11958,13 +11277,25 @@ "node": ">= 8" } }, + "node_modules/tap-parser/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/tap-yaml": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/tap-yaml/-/tap-yaml-1.0.0.tgz", - "integrity": "sha512-Rxbx4EnrWkYk0/ztcm5u3/VznbyFJpyXO12dDBHKWiDVxy7O2Qw6MRrwO5H6Ww0U5YhRY/4C/VzWmFPhBQc4qQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/tap-yaml/-/tap-yaml-1.0.2.tgz", + "integrity": "sha512-GegASpuqBnRNdT1U+yuUPZ8rEU64pL35WPBpCISWwff4dErS2/438barz7WFJl4Nzh3Y05tfPidZnH+GaV1wMg==", "dev": true, "dependencies": { - "yaml": "^1.5.0" + "yaml": "^1.10.2" } }, "node_modules/tap-yaml/node_modules/yaml": { @@ -12450,7 +11781,7 @@ "license": "MIT" }, "node_modules/tap/node_modules/@types/react": { - "version": "17.0.41", + "version": "17.0.52", "dev": true, "inBundle": true, "license": "MIT", @@ -12889,7 +12220,7 @@ } }, "node_modules/tap/node_modules/glob": { - "version": "7.2.0", + "version": "7.2.3", "dev": true, "inBundle": true, "license": "ISC", @@ -12897,7 +12228,7 @@ "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" }, @@ -13182,7 +12513,7 @@ } }, "node_modules/tap/node_modules/minipass": { - "version": "3.1.6", + "version": "3.3.4", "dev": true, "inBundle": true, "license": "ISC", @@ -13567,7 +12898,7 @@ } }, "node_modules/tap/node_modules/tap-parser": { - "version": "11.0.1", + "version": "11.0.2", "dev": true, "inBundle": true, "license": "MIT", @@ -13584,12 +12915,12 @@ } }, "node_modules/tap/node_modules/tap-yaml": { - "version": "1.0.0", + "version": "1.0.2", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "yaml": "^1.5.0" + "yaml": "^1.10.2" } }, "node_modules/tap/node_modules/to-fast-properties": { @@ -13602,7 +12933,7 @@ } }, "node_modules/tap/node_modules/treport": { - "version": "3.0.3", + "version": "3.0.4", "dev": true, "inBundle": true, "license": "ISC", @@ -13613,6 +12944,7 @@ "ink": "^3.2.0", "ms": "^2.1.2", "tap-parser": "^11.0.0", + "tap-yaml": "^1.0.0", "unicode-length": "^2.0.2" }, "peerDependencies": { @@ -13858,13 +13190,14 @@ } }, "node_modules/tar": { - "version": "6.1.12", + "version": "6.1.13", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.13.tgz", + "integrity": "sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==", "inBundle": true, - "license": "ISC", "dependencies": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", - "minipass": "^3.0.0", + "minipass": "^4.0.0", "minizlib": "^2.1.1", "mkdirp": "^1.0.3", "yallist": "^4.0.0" @@ -14577,15 +13910,15 @@ } }, "node_modules/w3c-xmlserializer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-3.0.0.tgz", - "integrity": "sha512-3WFqGEgSXIyGhOmAFtlicJNMjEps8b1MG31NCA0/vOF9+nKMUW1ckhi9cnNHmf88Rzw5V+dwIwsm2C7X8k9aQg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz", + "integrity": "sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==", "dev": true, "dependencies": { "xml-name-validator": "^4.0.0" }, "engines": { - "node": ">=12" + "node": ">=14" } }, "node_modules/walk-up-path": { @@ -14970,11 +14303,11 @@ "@npmcli/eslint-config": "^4.0.0", "@npmcli/mock-registry": "^1.0.0", "@npmcli/promise-spawn": "^6.0.1", - "@npmcli/template-oss": "4.10.0", + "@npmcli/template-oss": "4.11.0", "http-proxy": "^1.18.1", "just-extend": "^6.1.1", "just-safe-set": "^4.1.1", - "tap": "^16.0.1", + "tap": "^16.3.2", "which": "^3.0.0" }, "engines": { @@ -14983,7 +14316,7 @@ }, "workspaces/arborist": { "name": "@npmcli/arborist", - "version": "6.1.3", + "version": "6.1.5", "license": "ISC", "dependencies": { "@isaacs/string-locale-compare": "^1.1.0", @@ -14997,26 +14330,26 @@ "@npmcli/query": "^3.0.0", "@npmcli/run-script": "^6.0.0", "bin-links": "^4.0.1", - "cacache": "^17.0.2", + "cacache": "^17.0.3", "common-ancestor-path": "^1.0.1", "hosted-git-info": "^6.1.1", "json-parse-even-better-errors": "^3.0.0", "json-stringify-nice": "^1.1.4", - "minimatch": "^5.1.0", + "minimatch": "^5.1.1", "nopt": "^7.0.0", "npm-install-checks": "^6.0.0", - "npm-package-arg": "^10.0.0", + "npm-package-arg": "^10.1.0", "npm-pick-manifest": "^8.0.1", - "npm-registry-fetch": "^14.0.2", + "npm-registry-fetch": "^14.0.3", "npmlog": "^7.0.1", - "pacote": "^15.0.2", + "pacote": "^15.0.7", "parse-conflict-json": "^3.0.0", "proc-log": "^3.0.0", "promise-all-reject-late": "^1.0.0", "promise-call-limit": "^1.0.1", "read-package-json-fast": "^3.0.1", "semver": "^7.3.7", - "ssri": "^10.0.0", + "ssri": "^10.0.1", "treeverse": "^3.0.0", "walk-up-path": "^1.0.0" }, @@ -15025,12 +14358,12 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", + "@npmcli/template-oss": "4.11.0", "benchmark": "^2.1.4", "chalk": "^4.1.0", - "minify-registry-metadata": "^2.1.0", + "minify-registry-metadata": "^3.0.0", "nock": "^13.2.0", - "tap": "^16.0.1", + "tap": "^16.3.2", "tcompare": "^5.0.6" }, "engines": { @@ -15052,64 +14385,65 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", - "tap": "^16.0.1" + "@npmcli/template-oss": "4.11.0", + "tap": "^16.3.2" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "workspaces/libnpmaccess": { - "version": "7.0.0", + "version": "7.0.1", "license": "ISC", "dependencies": { - "npm-package-arg": "^10.0.0", - "npm-registry-fetch": "^14.0.2" + "npm-package-arg": "^10.1.0", + "npm-registry-fetch": "^14.0.3" }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", + "@npmcli/mock-registry": "^1.0.0", + "@npmcli/template-oss": "4.11.0", "nock": "^13.2.4", - "tap": "^16.0.1" + "tap": "^16.3.2" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "workspaces/libnpmdiff": { - "version": "5.0.4", + "version": "5.0.6", "license": "ISC", "dependencies": { - "@npmcli/arborist": "^6.1.3", + "@npmcli/arborist": "^6.1.5", "@npmcli/disparity-colors": "^3.0.0", "@npmcli/installed-package-contents": "^2.0.0", "binary-extensions": "^2.2.0", "diff": "^5.1.0", - "minimatch": "^5.0.1", - "npm-package-arg": "^10.0.0", - "pacote": "^15.0.2", - "tar": "^6.1.0" + "minimatch": "^5.1.1", + "npm-package-arg": "^10.1.0", + "pacote": "^15.0.7", + "tar": "^6.1.13" }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", - "tap": "^16.0.1" + "@npmcli/template-oss": "4.11.0", + "tap": "^16.3.2" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "workspaces/libnpmexec": { - "version": "5.0.4", + "version": "5.0.6", "license": "ISC", "dependencies": { - "@npmcli/arborist": "^6.1.3", + "@npmcli/arborist": "^6.1.5", "@npmcli/run-script": "^6.0.0", "chalk": "^4.1.0", - "ci-info": "^3.6.1", - "npm-package-arg": "^10.0.0", + "ci-info": "^3.7.0", + "npm-package-arg": "^10.1.0", "npmlog": "^7.0.1", - "pacote": "^15.0.2", + "pacote": "^15.0.7", "proc-log": "^3.0.0", "read": "^1.0.7", "read-package-json-fast": "^3.0.1", @@ -15118,136 +14452,139 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", + "@npmcli/mock-registry": "^1.0.0", + "@npmcli/template-oss": "4.11.0", "bin-links": "^4.0.1", - "minify-registry-metadata": "^2.2.0", + "just-extend": "^6.1.1", + "just-safe-set": "^4.1.1", + "minify-registry-metadata": "^3.0.0", "mkdirp": "^1.0.4", - "tap": "^16.0.1" + "tap": "^16.3.2" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "workspaces/libnpmfund": { - "version": "4.0.4", + "version": "4.0.6", "license": "ISC", "dependencies": { - "@npmcli/arborist": "^6.1.3" + "@npmcli/arborist": "^6.1.5" }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", - "tap": "^16.0.1" + "@npmcli/template-oss": "4.11.0", + "tap": "^16.3.2" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "workspaces/libnpmhook": { - "version": "9.0.0", + "version": "9.0.1", "license": "ISC", "dependencies": { "aproba": "^2.0.0", - "npm-registry-fetch": "^14.0.2" + "npm-registry-fetch": "^14.0.3" }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", + "@npmcli/template-oss": "4.11.0", "nock": "^13.2.4", - "tap": "^16.0.1" + "tap": "^16.3.2" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "workspaces/libnpmorg": { - "version": "5.0.0", + "version": "5.0.1", "license": "ISC", "dependencies": { "aproba": "^2.0.0", - "npm-registry-fetch": "^14.0.2" + "npm-registry-fetch": "^14.0.3" }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", - "minipass": "^3.1.1", + "@npmcli/template-oss": "4.11.0", + "minipass": "^4.0.0", "nock": "^13.2.4", - "tap": "^16.0.1" + "tap": "^16.3.2" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "workspaces/libnpmpack": { - "version": "5.0.4", + "version": "5.0.6", "license": "ISC", "dependencies": { - "@npmcli/arborist": "^6.1.3", + "@npmcli/arborist": "^6.1.5", "@npmcli/run-script": "^6.0.0", - "npm-package-arg": "^10.0.0", - "pacote": "^15.0.2" + "npm-package-arg": "^10.1.0", + "pacote": "^15.0.7" }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", + "@npmcli/template-oss": "4.11.0", "nock": "^13.0.7", "spawk": "^1.7.1", - "tap": "^16.0.1" + "tap": "^16.3.2" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "workspaces/libnpmpublish": { - "version": "7.0.4", + "version": "7.0.6", "license": "ISC", "dependencies": { "normalize-package-data": "^5.0.0", - "npm-package-arg": "^10.0.0", - "npm-registry-fetch": "^14.0.2", + "npm-package-arg": "^10.1.0", + "npm-registry-fetch": "^14.0.3", "semver": "^7.3.7", - "ssri": "^10.0.0" + "ssri": "^10.0.1" }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", - "libnpmpack": "^5.0.4", + "@npmcli/template-oss": "4.11.0", + "libnpmpack": "^5.0.6", "lodash.clonedeep": "^4.5.0", "nock": "^13.2.4", - "tap": "^16.0.1" + "tap": "^16.3.2" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "workspaces/libnpmsearch": { - "version": "6.0.0", + "version": "6.0.1", "license": "ISC", "dependencies": { - "npm-registry-fetch": "^14.0.2" + "npm-registry-fetch": "^14.0.3" }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", + "@npmcli/template-oss": "4.11.0", "nock": "^13.2.4", - "tap": "^16.0.1" + "tap": "^16.3.2" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "workspaces/libnpmteam": { - "version": "5.0.0", + "version": "5.0.1", "license": "ISC", "dependencies": { "aproba": "^2.0.0", - "npm-registry-fetch": "^14.0.2" + "npm-registry-fetch": "^14.0.3" }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", + "@npmcli/template-oss": "4.11.0", "nock": "^13.2.4", - "tap": "^16.0.1" + "tap": "^16.3.2" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" @@ -15265,9 +14602,9 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", + "@npmcli/template-oss": "4.11.0", "require-inject": "^1.4.4", - "tap": "^16.0.1" + "tap": "^16.3.2" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" diff -Nru npm-9.1.2~ds1/.release-please-manifest.json npm-9.2.0~ds1/.release-please-manifest.json --- npm-9.1.2~ds1/.release-please-manifest.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/.release-please-manifest.json 2022-12-07 23:13:18.000000000 +0000 @@ -1,16 +1,16 @@ { - ".": "9.1.2", - "workspaces/arborist": "6.1.3", - "workspaces/libnpmaccess": "7.0.0", - "workspaces/libnpmdiff": "5.0.4", - "workspaces/libnpmexec": "5.0.4", - "workspaces/libnpmfund": "4.0.4", - "workspaces/libnpmhook": "9.0.0", - "workspaces/libnpmorg": "5.0.0", - "workspaces/libnpmpack": "5.0.4", - "workspaces/libnpmpublish": "7.0.4", - "workspaces/libnpmsearch": "6.0.0", - "workspaces/libnpmteam": "5.0.0", + ".": "9.2.0", + "workspaces/arborist": "6.1.5", + "workspaces/libnpmaccess": "7.0.1", + "workspaces/libnpmdiff": "5.0.6", + "workspaces/libnpmexec": "5.0.6", + "workspaces/libnpmfund": "4.0.6", + "workspaces/libnpmhook": "9.0.1", + "workspaces/libnpmorg": "5.0.1", + "workspaces/libnpmpack": "5.0.6", + "workspaces/libnpmpublish": "7.0.6", + "workspaces/libnpmsearch": "6.0.1", + "workspaces/libnpmteam": "5.0.1", "workspaces/libnpmversion": "4.0.1", "workspaces/config": "6.1.0" } diff -Nru npm-9.1.2~ds1/smoke-tests/package.json npm-9.2.0~ds1/smoke-tests/package.json --- npm-9.1.2~ds1/smoke-tests/package.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/smoke-tests/package.json 2022-12-07 23:13:18.000000000 +0000 @@ -21,18 +21,18 @@ "@npmcli/eslint-config": "^4.0.0", "@npmcli/mock-registry": "^1.0.0", "@npmcli/promise-spawn": "^6.0.1", - "@npmcli/template-oss": "4.10.0", + "@npmcli/template-oss": "4.11.0", "http-proxy": "^1.18.1", "just-extend": "^6.1.1", "just-safe-set": "^4.1.1", - "tap": "^16.0.1", + "tap": "^16.3.2", "which": "^3.0.0" }, "author": "GitHub Inc.", "license": "ISC", "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.10.0", + "version": "4.11.0", "content": "../scripts/template-oss/index.js" }, "tap": { diff -Nru npm-9.1.2~ds1/smoke-tests/test/fixtures/setup.js npm-9.2.0~ds1/smoke-tests/test/fixtures/setup.js --- npm-9.1.2~ds1/smoke-tests/test/fixtures/setup.js 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/smoke-tests/test/fixtures/setup.js 2022-12-07 23:13:18.000000000 +0000 @@ -84,6 +84,7 @@ tap: t, registry: 'http://smoke-test-registry.club/', debug, + strict: true, }) const httpProxyRegistry = `http://localhost:${PORT}` const proxy = httpProxy.createProxyServer({}) @@ -92,12 +93,8 @@ t.teardown(() => server.close()) // update notifier should never be written - t.afterEach(async (t) => { + t.afterEach((t) => { t.equal(existsSync(join(paths.cache, '_update-notifier-last-checked')), false) - // this requires that mocks not be shared between sub tests but it helps - // find mistakes quicker instead of waiting for the entire test to end - t.strictSame(registry.nock.pendingMocks(), [], 'no pending mocks after each') - t.strictSame(registry.nock.activeMocks(), [], 'no active mocks after each') }) const debugLog = debug || CI ? (...a) => console.error(...a) : () => {} @@ -128,7 +125,7 @@ .replace(/ \(in a browser\)/g, '') .replace(/^npm@.* /gm, 'npm ') .replace(/^.*debug-[0-9]+.log$/gm, '') - .replace(/in \d+ms$/gm, 'in {TIME}') + .replace(/in \d+[ms]+$/gm, 'in {TIME}') } const log = (...a) => debugLog(cleanOutput(a.join(' '))) t.cleanSnapshot = cleanOutput @@ -143,6 +140,7 @@ '--no-audit', '--no-update-notifier', '--loglevel=silly', + '--fetch-retries=0', ] const [positionals, flags] = args.reduce((acc, arg) => { if (arg.startsWith('-')) { diff -Nru npm-9.1.2~ds1/smoke-tests/test/index.js npm-9.2.0~ds1/smoke-tests/test/index.js --- npm-9.1.2~ds1/smoke-tests/test/index.js 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/smoke-tests/test/index.js 2022-12-07 23:13:18.000000000 +0000 @@ -267,9 +267,6 @@ const manifest = abbrevManifest() await registry.package({ manifest: manifest, - tarballs: { - '1.1.1': join(paths.root, 'packages', 'abbrev-1.1.1'), - }, }) await npm('update', '--no-save') diff -Nru npm-9.1.2~ds1/tap-snapshots/test/lib/commands/doctor.js.test.cjs npm-9.2.0~ds1/tap-snapshots/test/lib/commands/doctor.js.test.cjs --- npm-9.1.2~ds1/tap-snapshots/test/lib/commands/doctor.js.test.cjs 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/tap-snapshots/test/lib/commands/doctor.js.test.cjs 2022-12-07 23:13:18.000000000 +0000 @@ -29,6 +29,10 @@ "Finding git in your PATH", ], Array [ + "getBinPath", + "Finding npm global bin in your PATH", + ], + Array [ "verifyCachedFiles", "Verifying the npm cache", ], @@ -49,33 +53,35 @@ ` exports[`test/lib/commands/doctor.js TAP all clear > output 1`] = ` -Check Value Recommendation/Notes -npm ping ok -npm -v ok current: v1.0.0, latest: v1.0.0 -node -v ok current: v1.0.0, recommended: v1.0.0 -npm config get registry ok using default registry (https://registry.npmjs.org/) -which git ok /path/to/git -Perms check on cached files ok -Perms check on local node_modules ok -Perms check on global node_modules ok -Perms check on local bin folder ok -Perms check on global bin folder ok -Verify cache contents ok verified 0 tarballs +Check  Value  Recommendation/Notes +npm ping  ok   +npm -v  ok  current: v1.0.0, latest: v1.0.0 +node -v  ok  current: v1.0.0, recommended: v1.0.0 +npm config get registry  ok  using default registry (https://registry.npmjs.org/) +git executable in PATH  ok  /path/to/git +global bin folder in PATH  ok  {CWD}/test/lib/commands/tap-testdir-doctor-all-clear/global/bin +Perms check on cached files  ok   +Perms check on local node_modules  ok   +Perms check on global node_modules ok   +Perms check on local bin folder  ok   +Perms check on global bin folder  ok   +Verify cache contents  ok  verified 0 tarballs ` exports[`test/lib/commands/doctor.js TAP all clear in color > everything is ok in color 1`] = ` -Check Value Recommendation/Notes -npm ping ok -npm -v ok current: v1.0.0, latest: v1.0.0 -node -v ok current: v1.0.0, recommended: v1.0.0 -npm config get registry ok using default registry (https://registry.npmjs.org/) -which git ok /path/to/git -Perms check on cached files ok -Perms check on local node_modules ok -Perms check on global node_modules ok -Perms check on local bin folder ok -Perms check on global bin folder ok -Verify cache contents ok verified 0 tarballs +Check  Value  Recommendation/Notes +npm ping  ok   +npm -v  ok  current: v1.0.0, latest: v1.0.0 +node -v  ok  current: v1.0.0, recommended: v1.0.0 +npm config get registry  ok  using default registry (https://registry.npmjs.org/) +git executable in PATH  ok  /path/to/git +global bin folder in PATH  ok  {CWD}/test/lib/commands/tap-testdir-doctor-all-clear-in-color/global/bin +Perms check on cached files  ok   +Perms check on local node_modules  ok   +Perms check on global node_modules ok   +Perms check on local bin folder  ok   +Perms check on global bin folder  ok   +Verify cache contents  ok  verified 0 tarballs ` exports[`test/lib/commands/doctor.js TAP all clear in color > logs 1`] = ` @@ -102,6 +108,10 @@ "Finding git in your PATH", ], Array [ + "getBinPath", + "Finding npm global bin in your PATH", + ], + Array [ "verifyCachedFiles", "Verifying the npm cache", ], @@ -145,6 +155,10 @@ "Finding git in your PATH", ], Array [ + "getBinPath", + "Finding npm global bin in your PATH", + ], + Array [ "verifyCachedFiles", "Verifying the npm cache", ], @@ -165,33 +179,35 @@ ` exports[`test/lib/commands/doctor.js TAP bad proxy > output 1`] = ` -Check Value Recommendation/Notes -npm ping not ok unsupported proxy protocol: 'ssh:' -npm -v not ok Error: unsupported proxy protocol: 'ssh:' -node -v not ok Error: unsupported proxy protocol: 'ssh:' -npm config get registry ok using default registry (https://registry.npmjs.org/) -which git ok /path/to/git -Perms check on cached files ok -Perms check on local node_modules ok -Perms check on global node_modules ok -Perms check on local bin folder ok -Perms check on global bin folder ok -Verify cache contents ok verified 0 tarballs +Check  Value  Recommendation/Notes +npm ping  not ok unsupported proxy protocol: 'ssh:' +npm -v  not ok Error: unsupported proxy protocol: 'ssh:' +node -v  not ok Error: unsupported proxy protocol: 'ssh:' +npm config get registry  ok  using default registry (https://registry.npmjs.org/) +git executable in PATH  ok  /path/to/git +global bin folder in PATH  ok  {CWD}/test/lib/commands/tap-testdir-doctor-bad-proxy/global/bin +Perms check on cached files  ok   +Perms check on local node_modules  ok   +Perms check on global node_modules ok   +Perms check on local bin folder  ok   +Perms check on global bin folder  ok   +Verify cache contents  ok  verified 0 tarballs ` exports[`test/lib/commands/doctor.js TAP cacache badContent > corrupted cache content 1`] = ` -Check Value Recommendation/Notes -npm ping ok -npm -v ok current: v1.0.0, latest: v1.0.0 -node -v ok current: v1.0.0, recommended: v1.0.0 -npm config get registry ok using default registry (https://registry.npmjs.org/) -which git ok /path/to/git -Perms check on cached files ok -Perms check on local node_modules ok -Perms check on global node_modules ok -Perms check on local bin folder ok -Perms check on global bin folder ok -Verify cache contents ok verified 2 tarballs +Check  Value  Recommendation/Notes +npm ping  ok   +npm -v  ok  current: v1.0.0, latest: v1.0.0 +node -v  ok  current: v1.0.0, recommended: v1.0.0 +npm config get registry  ok  using default registry (https://registry.npmjs.org/) +git executable in PATH  ok  /path/to/git +global bin folder in PATH  ok  {CWD}/test/lib/commands/tap-testdir-doctor-cacache-badContent/global/bin +Perms check on cached files  ok   +Perms check on local node_modules  ok   +Perms check on global node_modules ok   +Perms check on local bin folder  ok   +Perms check on global bin folder  ok   +Verify cache contents  ok  verified 2 tarballs ` exports[`test/lib/commands/doctor.js TAP cacache badContent > logs 1`] = ` @@ -218,6 +234,10 @@ "Finding git in your PATH", ], Array [ + "getBinPath", + "Finding npm global bin in your PATH", + ], + Array [ "verifyCachedFiles", "Verifying the npm cache", ], @@ -270,6 +290,10 @@ "Finding git in your PATH", ], Array [ + "getBinPath", + "Finding npm global bin in your PATH", + ], + Array [ "verifyCachedFiles", "Verifying the npm cache", ], @@ -299,33 +323,35 @@ ` exports[`test/lib/commands/doctor.js TAP cacache missingContent > missing content 1`] = ` -Check Value Recommendation/Notes -npm ping ok -npm -v ok current: v1.0.0, latest: v1.0.0 -node -v ok current: v1.0.0, recommended: v1.0.0 -npm config get registry ok using default registry (https://registry.npmjs.org/) -which git ok /path/to/git -Perms check on cached files ok -Perms check on local node_modules ok -Perms check on global node_modules ok -Perms check on local bin folder ok -Perms check on global bin folder ok -Verify cache contents ok verified 2 tarballs +Check  Value  Recommendation/Notes +npm ping  ok   +npm -v  ok  current: v1.0.0, latest: v1.0.0 +node -v  ok  current: v1.0.0, recommended: v1.0.0 +npm config get registry  ok  using default registry (https://registry.npmjs.org/) +git executable in PATH  ok  /path/to/git +global bin folder in PATH  ok  {CWD}/test/lib/commands/tap-testdir-doctor-cacache-missingContent/global/bin +Perms check on cached files  ok   +Perms check on local node_modules  ok   +Perms check on global node_modules ok   +Perms check on local bin folder  ok   +Perms check on global bin folder  ok   +Verify cache contents  ok  verified 2 tarballs ` exports[`test/lib/commands/doctor.js TAP cacache reclaimedCount > content garbage collected 1`] = ` -Check Value Recommendation/Notes -npm ping ok -npm -v ok current: v1.0.0, latest: v1.0.0 -node -v ok current: v1.0.0, recommended: v1.0.0 -npm config get registry ok using default registry (https://registry.npmjs.org/) -which git ok /path/to/git -Perms check on cached files ok -Perms check on local node_modules ok -Perms check on global node_modules ok -Perms check on local bin folder ok -Perms check on global bin folder ok -Verify cache contents ok verified 2 tarballs +Check  Value  Recommendation/Notes +npm ping  ok   +npm -v  ok  current: v1.0.0, latest: v1.0.0 +node -v  ok  current: v1.0.0, recommended: v1.0.0 +npm config get registry  ok  using default registry (https://registry.npmjs.org/) +git executable in PATH  ok  /path/to/git +global bin folder in PATH  ok  {CWD}/test/lib/commands/tap-testdir-doctor-cacache-reclaimedCount/global/bin +Perms check on cached files  ok   +Perms check on local node_modules  ok   +Perms check on global node_modules ok   +Perms check on local bin folder  ok   +Perms check on global bin folder  ok   +Verify cache contents  ok  verified 2 tarballs ` exports[`test/lib/commands/doctor.js TAP cacache reclaimedCount > logs 1`] = ` @@ -352,6 +378,10 @@ "Finding git in your PATH", ], Array [ + "getBinPath", + "Finding npm global bin in your PATH", + ], + Array [ "verifyCachedFiles", "Verifying the npm cache", ], @@ -380,6 +410,187 @@ } ` +exports[`test/lib/commands/doctor.js TAP discrete checks cache > logs 1`] = ` +Object { + "error": Array [], + "info": Array [ + Array [ + "Running checkup", + ], + Array [ + "verifyCachedFiles", + "Verifying the npm cache", + ], + Array [ + "verifyCachedFiles", + String( + Verification complete. Stats: { + "badContentCount": 0, + "reclaimedCount": 0, + "missingContent": 0, + "verifiedContent": 0 + } + ), + ], + ], + "warn": Array [], +} +` + +exports[`test/lib/commands/doctor.js TAP discrete checks cache > output 1`] = ` +Check  Value  Recommendation/Notes +Perms check on cached files ok   +Verify cache contents  ok  verified 0 tarballs +` + +exports[`test/lib/commands/doctor.js TAP discrete checks git > logs 1`] = ` +Object { + "error": Array [], + "info": Array [ + Array [ + "Running checkup", + ], + ], + "warn": Array [], +} +` + +exports[`test/lib/commands/doctor.js TAP discrete checks git > output 1`] = ` +Check Value  Recommendation/Notes +` + +exports[`test/lib/commands/doctor.js TAP discrete checks invalid environment > logs 1`] = ` +Object { + "error": Array [], + "info": Array [ + Array [ + "Running checkup", + ], + Array [ + "getGitPath", + "Finding git in your PATH", + ], + Array [ + "getBinPath", + "Finding npm global bin in your PATH", + ], + ], + "warn": Array [], +} +` + +exports[`test/lib/commands/doctor.js TAP discrete checks invalid environment > output 1`] = ` +Check  Value  Recommendation/Notes +git executable in PATH  ok  /path/to/git +global bin folder in PATH not ok Error: Add {CWD}/test/lib/commands/tap-testdir-doctor-discrete-checks-invalid-environment/global/bin to your $PATH +` + +exports[`test/lib/commands/doctor.js TAP discrete checks permissions - not windows > logs 1`] = ` +Object { + "error": Array [], + "info": Array [ + Array [ + "Running checkup", + ], + ], + "warn": Array [], +} +` + +exports[`test/lib/commands/doctor.js TAP discrete checks permissions - not windows > output 1`] = ` +Check  Value  Recommendation/Notes +Perms check on cached files  ok   +Perms check on local node_modules  ok   +Perms check on global node_modules ok   +Perms check on local bin folder  ok   +Perms check on global bin folder  ok   +` + +exports[`test/lib/commands/doctor.js TAP discrete checks permissions - windows > logs 1`] = ` +Object { + "error": Array [], + "info": Array [ + Array [ + "Running checkup", + ], + ], + "warn": Array [], +} +` + +exports[`test/lib/commands/doctor.js TAP discrete checks permissions - windows > output 1`] = ` +Check Value  Recommendation/Notes +` + +exports[`test/lib/commands/doctor.js TAP discrete checks ping > logs 1`] = ` +Object { + "error": Array [], + "info": Array [ + Array [ + "Running checkup", + ], + Array [ + "checkPing", + "Pinging registry", + ], + ], + "warn": Array [], +} +` + +exports[`test/lib/commands/doctor.js TAP discrete checks ping > output 1`] = ` +Check  Value  Recommendation/Notes +npm ping ok   +` + +exports[`test/lib/commands/doctor.js TAP discrete checks registry > logs 1`] = ` +Object { + "error": Array [], + "info": Array [ + Array [ + "Running checkup", + ], + Array [ + "checkPing", + "Pinging registry", + ], + ], + "warn": Array [], +} +` + +exports[`test/lib/commands/doctor.js TAP discrete checks registry > output 1`] = ` +Check  Value  Recommendation/Notes +npm ping  ok   +npm config get registry ok  using default registry (https://registry.npmjs.org/) +` + +exports[`test/lib/commands/doctor.js TAP discrete checks versions > logs 1`] = ` +Object { + "error": Array [], + "info": Array [ + Array [ + "Running checkup", + ], + Array [ + "getLatestNpmVersion", + "Getting npm package information", + ], + Array [ + "getLatestNodejsVersion", + "Getting Node.js release information", + ], + ], + "warn": Array [], +} +` + +exports[`test/lib/commands/doctor.js TAP discrete checks versions > output 1`] = ` +Check  Value  Recommendation/Notes +npm -v  ok  current: v1.0.0, latest: v1.0.0 +node -v ok  current: v1.0.0, recommended: v1.0.0 +` + exports[`test/lib/commands/doctor.js TAP error reading directory > logs 1`] = ` Object { "error": Array [], @@ -404,6 +615,10 @@ "Finding git in your PATH", ], Array [ + "getBinPath", + "Finding npm global bin in your PATH", + ], + Array [ "verifyCachedFiles", "Verifying the npm cache", ], @@ -445,33 +660,35 @@ ` exports[`test/lib/commands/doctor.js TAP error reading directory > readdir error 1`] = ` -Check Value Recommendation/Notes -npm ping ok -npm -v ok current: v1.0.0, latest: v1.0.0 -node -v ok current: v1.0.0, recommended: v1.0.0 -npm config get registry ok using default registry (https://registry.npmjs.org/) -which git ok /path/to/git -Perms check on cached files not ok Check the permissions of files in {CWD}/test/lib/commands/tap-testdir-doctor-error-reading-directory/cache (should be owned by current user) -Perms check on local node_modules not ok Check the permissions of files in {CWD}/test/lib/commands/tap-testdir-doctor-error-reading-directory/prefix/node_modules (should be owned by current user) -Perms check on global node_modules not ok Check the permissions of files in {CWD}/test/lib/commands/tap-testdir-doctor-error-reading-directory/global/lib/node_modules -Perms check on local bin folder not ok Check the permissions of files in {CWD}/test/lib/commands/tap-testdir-doctor-error-reading-directory/prefix/node_modules/.bin -Perms check on global bin folder not ok Check the permissions of files in {CWD}/test/lib/commands/tap-testdir-doctor-error-reading-directory/global/bin -Verify cache contents ok verified 0 tarballs +Check  Value  Recommendation/Notes +npm ping  ok   +npm -v  ok  current: v1.0.0, latest: v1.0.0 +node -v  ok  current: v1.0.0, recommended: v1.0.0 +npm config get registry  ok  using default registry (https://registry.npmjs.org/) +git executable in PATH  ok  /path/to/git +global bin folder in PATH  ok  {CWD}/test/lib/commands/tap-testdir-doctor-error-reading-directory/global/bin +Perms check on cached files  not ok Check the permissions of files in {CWD}/test/lib/commands/tap-testdir-doctor-error-reading-directory/cache (should be owned by current user) +Perms check on local node_modules  not ok Check the permissions of files in {CWD}/test/lib/commands/tap-testdir-doctor-error-reading-directory/prefix/node_modules (should be owned by current user) +Perms check on global node_modules not ok Check the permissions of files in {CWD}/test/lib/commands/tap-testdir-doctor-error-reading-directory/global/lib/node_modules +Perms check on local bin folder  not ok Check the permissions of files in {CWD}/test/lib/commands/tap-testdir-doctor-error-reading-directory/prefix/node_modules/.bin +Perms check on global bin folder  not ok Check the permissions of files in {CWD}/test/lib/commands/tap-testdir-doctor-error-reading-directory/global/bin +Verify cache contents  ok  verified 0 tarballs ` exports[`test/lib/commands/doctor.js TAP incorrect owner > incorrect owner 1`] = ` -Check Value Recommendation/Notes -npm ping ok -npm -v ok current: v1.0.0, latest: v1.0.0 -node -v ok current: v1.0.0, recommended: v1.0.0 -npm config get registry ok using default registry (https://registry.npmjs.org/) -which git ok /path/to/git -Perms check on cached files not ok Check the permissions of files in {CWD}/test/lib/commands/tap-testdir-doctor-incorrect-owner/cache (should be owned by current user) -Perms check on local node_modules ok -Perms check on global node_modules ok -Perms check on local bin folder ok -Perms check on global bin folder ok -Verify cache contents ok verified 0 tarballs +Check  Value  Recommendation/Notes +npm ping  ok   +npm -v  ok  current: v1.0.0, latest: v1.0.0 +node -v  ok  current: v1.0.0, recommended: v1.0.0 +npm config get registry  ok  using default registry (https://registry.npmjs.org/) +git executable in PATH  ok  /path/to/git +global bin folder in PATH  ok  {CWD}/test/lib/commands/tap-testdir-doctor-incorrect-owner/global/bin +Perms check on cached files  not ok Check the permissions of files in {CWD}/test/lib/commands/tap-testdir-doctor-incorrect-owner/cache (should be owned by current user) +Perms check on local node_modules  ok   +Perms check on global node_modules ok   +Perms check on local bin folder  ok   +Perms check on global bin folder  ok   +Verify cache contents  ok  verified 0 tarballs ` exports[`test/lib/commands/doctor.js TAP incorrect owner > logs 1`] = ` @@ -498,6 +715,10 @@ "Finding git in your PATH", ], Array [ + "getBinPath", + "Finding npm global bin in your PATH", + ], + Array [ "verifyCachedFiles", "Verifying the npm cache", ], @@ -523,18 +744,19 @@ ` exports[`test/lib/commands/doctor.js TAP incorrect permissions > incorrect owner 1`] = ` -Check Value Recommendation/Notes -npm ping ok -npm -v ok current: v1.0.0, latest: v1.0.0 -node -v ok current: v1.0.0, recommended: v1.0.0 -npm config get registry ok using default registry (https://registry.npmjs.org/) -which git ok /path/to/git -Perms check on cached files not ok Check the permissions of files in {CWD}/test/lib/commands/tap-testdir-doctor-incorrect-permissions/cache (should be owned by current user) -Perms check on local node_modules not ok Check the permissions of files in {CWD}/test/lib/commands/tap-testdir-doctor-incorrect-permissions/prefix/node_modules (should be owned by current user) -Perms check on global node_modules not ok Check the permissions of files in {CWD}/test/lib/commands/tap-testdir-doctor-incorrect-permissions/global/lib/node_modules -Perms check on local bin folder not ok Check the permissions of files in {CWD}/test/lib/commands/tap-testdir-doctor-incorrect-permissions/prefix/node_modules/.bin -Perms check on global bin folder not ok Check the permissions of files in {CWD}/test/lib/commands/tap-testdir-doctor-incorrect-permissions/global/bin -Verify cache contents ok verified 0 tarballs +Check  Value  Recommendation/Notes +npm ping  ok   +npm -v  ok  current: v1.0.0, latest: v1.0.0 +node -v  ok  current: v1.0.0, recommended: v1.0.0 +npm config get registry  ok  using default registry (https://registry.npmjs.org/) +git executable in PATH  ok  /path/to/git +global bin folder in PATH  ok  {CWD}/test/lib/commands/tap-testdir-doctor-incorrect-permissions/global/bin +Perms check on cached files  not ok Check the permissions of files in {CWD}/test/lib/commands/tap-testdir-doctor-incorrect-permissions/cache (should be owned by current user) +Perms check on local node_modules  not ok Check the permissions of files in {CWD}/test/lib/commands/tap-testdir-doctor-incorrect-permissions/prefix/node_modules (should be owned by current user) +Perms check on global node_modules not ok Check the permissions of files in {CWD}/test/lib/commands/tap-testdir-doctor-incorrect-permissions/global/lib/node_modules +Perms check on local bin folder  not ok Check the permissions of files in {CWD}/test/lib/commands/tap-testdir-doctor-incorrect-permissions/prefix/node_modules/.bin +Perms check on global bin folder  not ok Check the permissions of files in {CWD}/test/lib/commands/tap-testdir-doctor-incorrect-permissions/global/bin +Verify cache contents  ok  verified 0 tarballs ` exports[`test/lib/commands/doctor.js TAP incorrect permissions > logs 1`] = ` @@ -582,6 +804,10 @@ "Finding git in your PATH", ], Array [ + "getBinPath", + "Finding npm global bin in your PATH", + ], + Array [ "verifyCachedFiles", "Verifying the npm cache", ], @@ -625,6 +851,10 @@ "Finding git in your PATH", ], Array [ + "getBinPath", + "Finding npm global bin in your PATH", + ], + Array [ "verifyCachedFiles", "Verifying the npm cache", ], @@ -649,18 +879,19 @@ ` exports[`test/lib/commands/doctor.js TAP missing git > missing git 1`] = ` -Check Value Recommendation/Notes -npm ping ok -npm -v ok current: v1.0.0, latest: v1.0.0 -node -v ok current: v1.0.0, recommended: v1.0.0 -npm config get registry ok using default registry (https://registry.npmjs.org/) -which git not ok Install git and ensure it's in your PATH. -Perms check on cached files ok -Perms check on local node_modules ok -Perms check on global node_modules ok -Perms check on local bin folder ok -Perms check on global bin folder ok -Verify cache contents ok verified 0 tarballs +Check  Value  Recommendation/Notes +npm ping  ok   +npm -v  ok  current: v1.0.0, latest: v1.0.0 +node -v  ok  current: v1.0.0, recommended: v1.0.0 +npm config get registry  ok  using default registry (https://registry.npmjs.org/) +git executable in PATH  not ok Error: Install git and ensure it's in your PATH. +global bin folder in PATH  ok  {CWD}/test/lib/commands/tap-testdir-doctor-missing-git/global/bin +Perms check on cached files  ok   +Perms check on local node_modules  ok   +Perms check on global node_modules ok   +Perms check on local bin folder  ok   +Perms check on global bin folder  ok   +Verify cache contents  ok  verified 0 tarballs ` exports[`test/lib/commands/doctor.js TAP missing global directories > logs 1`] = ` @@ -687,6 +918,10 @@ "Finding git in your PATH", ], Array [ + "getBinPath", + "Finding npm global bin in your PATH", + ], + Array [ "verifyCachedFiles", "Verifying the npm cache", ], @@ -716,18 +951,19 @@ ` exports[`test/lib/commands/doctor.js TAP missing global directories > missing global directories 1`] = ` -Check Value Recommendation/Notes -npm ping ok -npm -v ok current: v1.0.0, latest: v1.0.0 -node -v ok current: v1.0.0, recommended: v1.0.0 -npm config get registry ok using default registry (https://registry.npmjs.org/) -which git ok /path/to/git -Perms check on cached files ok -Perms check on local node_modules ok -Perms check on global node_modules not ok Check the permissions of files in {CWD}/test/lib/commands/tap-testdir-doctor-missing-global-directories/global/lib/node_modules -Perms check on local bin folder ok -Perms check on global bin folder not ok Check the permissions of files in {CWD}/test/lib/commands/tap-testdir-doctor-missing-global-directories/global/bin -Verify cache contents ok verified 0 tarballs +Check  Value  Recommendation/Notes +npm ping  ok   +npm -v  ok  current: v1.0.0, latest: v1.0.0 +node -v  ok  current: v1.0.0, recommended: v1.0.0 +npm config get registry  ok  using default registry (https://registry.npmjs.org/) +git executable in PATH  ok  /path/to/git +global bin folder in PATH  ok  {CWD}/test/lib/commands/tap-testdir-doctor-missing-global-directories/global/bin +Perms check on cached files  ok   +Perms check on local node_modules  ok   +Perms check on global node_modules not ok Check the permissions of files in {CWD}/test/lib/commands/tap-testdir-doctor-missing-global-directories/global/lib/node_modules +Perms check on local bin folder  ok   +Perms check on global bin folder  not ok Check the permissions of files in {CWD}/test/lib/commands/tap-testdir-doctor-missing-global-directories/global/bin +Verify cache contents  ok  verified 0 tarballs ` exports[`test/lib/commands/doctor.js TAP missing local node_modules > logs 1`] = ` @@ -754,6 +990,10 @@ "Finding git in your PATH", ], Array [ + "getBinPath", + "Finding npm global bin in your PATH", + ], + Array [ "verifyCachedFiles", "Verifying the npm cache", ], @@ -774,18 +1014,19 @@ ` exports[`test/lib/commands/doctor.js TAP missing local node_modules > missing local node_modules 1`] = ` -Check Value Recommendation/Notes -npm ping ok -npm -v ok current: v1.0.0, latest: v1.0.0 -node -v ok current: v1.0.0, recommended: v1.0.0 -npm config get registry ok using default registry (https://registry.npmjs.org/) -which git ok /path/to/git -Perms check on cached files ok -Perms check on local node_modules ok -Perms check on global node_modules ok -Perms check on local bin folder ok -Perms check on global bin folder ok -Verify cache contents ok verified 0 tarballs +Check  Value  Recommendation/Notes +npm ping  ok   +npm -v  ok  current: v1.0.0, latest: v1.0.0 +node -v  ok  current: v1.0.0, recommended: v1.0.0 +npm config get registry  ok  using default registry (https://registry.npmjs.org/) +git executable in PATH  ok  /path/to/git +global bin folder in PATH  ok  {CWD}/test/lib/commands/tap-testdir-doctor-missing-local-node_modules/global/bin +Perms check on cached files  ok   +Perms check on local node_modules  ok   +Perms check on global node_modules ok   +Perms check on local bin folder  ok   +Perms check on global bin folder  ok   +Verify cache contents  ok  verified 0 tarballs ` exports[`test/lib/commands/doctor.js TAP node out of date - current > logs 1`] = ` @@ -812,6 +1053,10 @@ "Finding git in your PATH", ], Array [ + "getBinPath", + "Finding npm global bin in your PATH", + ], + Array [ "verifyCachedFiles", "Verifying the npm cache", ], @@ -832,18 +1077,19 @@ ` exports[`test/lib/commands/doctor.js TAP node out of date - current > node is out of date 1`] = ` -Check Value Recommendation/Notes -npm ping ok -npm -v ok current: v1.0.0, latest: v1.0.0 -node -v not ok Use node v2.0.1 (current: v2.0.0) -npm config get registry ok using default registry (https://registry.npmjs.org/) -which git ok /path/to/git -Perms check on cached files ok -Perms check on local node_modules ok -Perms check on global node_modules ok -Perms check on local bin folder ok -Perms check on global bin folder ok -Verify cache contents ok verified 0 tarballs +Check  Value  Recommendation/Notes +npm ping  ok   +npm -v  ok  current: v1.0.0, latest: v1.0.0 +node -v  not ok Use node v2.0.1 (current: v2.0.0) +npm config get registry  ok  using default registry (https://registry.npmjs.org/) +git executable in PATH  ok  /path/to/git +global bin folder in PATH  ok  {CWD}/test/lib/commands/tap-testdir-doctor-node-out-of-date---current/global/bin +Perms check on cached files  ok   +Perms check on local node_modules  ok   +Perms check on global node_modules ok   +Perms check on local bin folder  ok   +Perms check on global bin folder  ok   +Verify cache contents  ok  verified 0 tarballs ` exports[`test/lib/commands/doctor.js TAP node out of date - lts > logs 1`] = ` @@ -870,6 +1116,10 @@ "Finding git in your PATH", ], Array [ + "getBinPath", + "Finding npm global bin in your PATH", + ], + Array [ "verifyCachedFiles", "Verifying the npm cache", ], @@ -890,18 +1140,19 @@ ` exports[`test/lib/commands/doctor.js TAP node out of date - lts > node is out of date 1`] = ` -Check Value Recommendation/Notes -npm ping ok -npm -v ok current: v1.0.0, latest: v1.0.0 -node -v not ok Use node v1.0.0 (current: v0.0.1) -npm config get registry ok using default registry (https://registry.npmjs.org/) -which git ok /path/to/git -Perms check on cached files ok -Perms check on local node_modules ok -Perms check on global node_modules ok -Perms check on local bin folder ok -Perms check on global bin folder ok -Verify cache contents ok verified 0 tarballs +Check  Value  Recommendation/Notes +npm ping  ok   +npm -v  ok  current: v1.0.0, latest: v1.0.0 +node -v  not ok Use node v1.0.0 (current: v0.0.1) +npm config get registry  ok  using default registry (https://registry.npmjs.org/) +git executable in PATH  ok  /path/to/git +global bin folder in PATH  ok  {CWD}/test/lib/commands/tap-testdir-doctor-node-out-of-date---lts/global/bin +Perms check on cached files  ok   +Perms check on local node_modules  ok   +Perms check on global node_modules ok   +Perms check on local bin folder  ok   +Perms check on global bin folder  ok   +Verify cache contents  ok  verified 0 tarballs ` exports[`test/lib/commands/doctor.js TAP non-default registry > logs 1`] = ` @@ -928,6 +1179,10 @@ "Finding git in your PATH", ], Array [ + "getBinPath", + "Finding npm global bin in your PATH", + ], + Array [ "verifyCachedFiles", "Verifying the npm cache", ], @@ -948,18 +1203,19 @@ ` exports[`test/lib/commands/doctor.js TAP non-default registry > non default registry 1`] = ` -Check Value Recommendation/Notes -npm ping ok -npm -v ok current: v1.0.0, latest: v1.0.0 -node -v ok current: v1.0.0, recommended: v1.0.0 -npm config get registry not ok Try \`npm config set registry=https://registry.npmjs.org/\` -which git ok /path/to/git -Perms check on cached files ok -Perms check on local node_modules ok -Perms check on global node_modules ok -Perms check on local bin folder ok -Perms check on global bin folder ok -Verify cache contents ok verified 0 tarballs +Check  Value  Recommendation/Notes +npm ping  ok   +npm -v  ok  current: v1.0.0, latest: v1.0.0 +node -v  ok  current: v1.0.0, recommended: v1.0.0 +npm config get registry  not ok Try \`npm config set registry=https://registry.npmjs.org/\` +git executable in PATH  ok  /path/to/git +global bin folder in PATH  ok  {CWD}/test/lib/commands/tap-testdir-doctor-non-default-registry/global/bin +Perms check on cached files  ok   +Perms check on local node_modules  ok   +Perms check on global node_modules ok   +Perms check on local bin folder  ok   +Perms check on global bin folder  ok   +Verify cache contents  ok  verified 0 tarballs ` exports[`test/lib/commands/doctor.js TAP npm out of date > logs 1`] = ` @@ -986,6 +1242,10 @@ "Finding git in your PATH", ], Array [ + "getBinPath", + "Finding npm global bin in your PATH", + ], + Array [ "verifyCachedFiles", "Verifying the npm cache", ], @@ -1006,18 +1266,19 @@ ` exports[`test/lib/commands/doctor.js TAP npm out of date > npm is out of date 1`] = ` -Check Value Recommendation/Notes -npm ping ok -npm -v not ok Use npm v2.0.0 -node -v ok current: v1.0.0, recommended: v1.0.0 -npm config get registry ok using default registry (https://registry.npmjs.org/) -which git ok /path/to/git -Perms check on cached files ok -Perms check on local node_modules ok -Perms check on global node_modules ok -Perms check on local bin folder ok -Perms check on global bin folder ok -Verify cache contents ok verified 0 tarballs +Check  Value  Recommendation/Notes +npm ping  ok   +npm -v  not ok Use npm v2.0.0 +node -v  ok  current: v1.0.0, recommended: v1.0.0 +npm config get registry  ok  using default registry (https://registry.npmjs.org/) +git executable in PATH  ok  /path/to/git +global bin folder in PATH  ok  {CWD}/test/lib/commands/tap-testdir-doctor-npm-out-of-date/global/bin +Perms check on cached files  ok   +Perms check on local node_modules  ok   +Perms check on global node_modules ok   +Perms check on local bin folder  ok   +Perms check on global bin folder  ok   +Verify cache contents  ok  verified 0 tarballs ` exports[`test/lib/commands/doctor.js TAP ping 404 > logs 1`] = ` @@ -1044,6 +1305,10 @@ "Finding git in your PATH", ], Array [ + "getBinPath", + "Finding npm global bin in your PATH", + ], + Array [ "verifyCachedFiles", "Verifying the npm cache", ], @@ -1064,18 +1329,19 @@ ` exports[`test/lib/commands/doctor.js TAP ping 404 > ping 404 1`] = ` -Check Value Recommendation/Notes -npm ping not ok 404 404 Not Found - GET https://registry.npmjs.org/-/ping?write=true -npm -v ok current: v1.0.0, latest: v1.0.0 -node -v ok current: v1.0.0, recommended: v1.0.0 -npm config get registry ok using default registry (https://registry.npmjs.org/) -which git ok /path/to/git -Perms check on cached files ok -Perms check on local node_modules ok -Perms check on global node_modules ok -Perms check on local bin folder ok -Perms check on global bin folder ok -Verify cache contents ok verified 0 tarballs +Check  Value  Recommendation/Notes +npm ping  not ok 404 404 Not Found - GET https://registry.npmjs.org/-/ping?write=true +npm -v  ok  current: v1.0.0, latest: v1.0.0 +node -v  ok  current: v1.0.0, recommended: v1.0.0 +npm config get registry  ok  using default registry (https://registry.npmjs.org/) +git executable in PATH  ok  /path/to/git +global bin folder in PATH  ok  {CWD}/test/lib/commands/tap-testdir-doctor-ping-404/global/bin +Perms check on cached files  ok   +Perms check on local node_modules  ok   +Perms check on global node_modules ok   +Perms check on local bin folder  ok   +Perms check on global bin folder  ok   +Verify cache contents  ok  verified 0 tarballs ` exports[`test/lib/commands/doctor.js TAP ping 404 in color > logs 1`] = ` @@ -1102,6 +1368,10 @@ "Finding git in your PATH", ], Array [ + "getBinPath", + "Finding npm global bin in your PATH", + ], + Array [ "verifyCachedFiles", "Verifying the npm cache", ], @@ -1122,18 +1392,19 @@ ` exports[`test/lib/commands/doctor.js TAP ping 404 in color > ping 404 in color 1`] = ` -Check Value Recommendation/Notes -npm ping not ok 404 404 Not Found - GET https://registry.npmjs.org/-/ping?write=true -npm -v ok current: v1.0.0, latest: v1.0.0 -node -v ok current: v1.0.0, recommended: v1.0.0 -npm config get registry ok using default registry (https://registry.npmjs.org/) -which git ok /path/to/git -Perms check on cached files ok -Perms check on local node_modules ok -Perms check on global node_modules ok -Perms check on local bin folder ok -Perms check on global bin folder ok -Verify cache contents ok verified 0 tarballs +Check  Value  Recommendation/Notes +npm ping  not ok 404 404 Not Found - GET https://registry.npmjs.org/-/ping?write=true +npm -v  ok  current: v1.0.0, latest: v1.0.0 +node -v  ok  current: v1.0.0, recommended: v1.0.0 +npm config get registry  ok  using default registry (https://registry.npmjs.org/) +git executable in PATH  ok  /path/to/git +global bin folder in PATH  ok  {CWD}/test/lib/commands/tap-testdir-doctor-ping-404-in-color/global/bin +Perms check on cached files  ok   +Perms check on local node_modules  ok   +Perms check on global node_modules ok   +Perms check on local bin folder  ok   +Perms check on global bin folder  ok   +Verify cache contents  ok  verified 0 tarballs ` exports[`test/lib/commands/doctor.js TAP ping exception with code > logs 1`] = ` @@ -1160,6 +1431,10 @@ "Finding git in your PATH", ], Array [ + "getBinPath", + "Finding npm global bin in your PATH", + ], + Array [ "verifyCachedFiles", "Verifying the npm cache", ], @@ -1180,18 +1455,19 @@ ` exports[`test/lib/commands/doctor.js TAP ping exception with code > ping failure 1`] = ` -Check Value Recommendation/Notes -npm ping not ok request to https://registry.npmjs.org/-/ping?write=true failed, reason: Test Error -npm -v ok current: v1.0.0, latest: v1.0.0 -node -v ok current: v1.0.0, recommended: v1.0.0 -npm config get registry ok using default registry (https://registry.npmjs.org/) -which git ok /path/to/git -Perms check on cached files ok -Perms check on local node_modules ok -Perms check on global node_modules ok -Perms check on local bin folder ok -Perms check on global bin folder ok -Verify cache contents ok verified 0 tarballs +Check  Value  Recommendation/Notes +npm ping  not ok request to https://registry.npmjs.org/-/ping?write=true failed, reason: Test Error +npm -v  ok  current: v1.0.0, latest: v1.0.0 +node -v  ok  current: v1.0.0, recommended: v1.0.0 +npm config get registry  ok  using default registry (https://registry.npmjs.org/) +git executable in PATH  ok  /path/to/git +global bin folder in PATH  ok  {CWD}/test/lib/commands/tap-testdir-doctor-ping-exception-with-code/global/bin +Perms check on cached files  ok   +Perms check on local node_modules  ok   +Perms check on global node_modules ok   +Perms check on local bin folder  ok   +Perms check on global bin folder  ok   +Verify cache contents  ok  verified 0 tarballs ` exports[`test/lib/commands/doctor.js TAP ping exception without code > logs 1`] = ` @@ -1218,6 +1494,10 @@ "Finding git in your PATH", ], Array [ + "getBinPath", + "Finding npm global bin in your PATH", + ], + Array [ "verifyCachedFiles", "Verifying the npm cache", ], @@ -1238,21 +1518,42 @@ ` exports[`test/lib/commands/doctor.js TAP ping exception without code > ping failure 1`] = ` -Check Value Recommendation/Notes -npm ping not ok request to https://registry.npmjs.org/-/ping?write=true failed, reason: Test Error -npm -v ok current: v1.0.0, latest: v1.0.0 -node -v ok current: v1.0.0, recommended: v1.0.0 -npm config get registry ok using default registry (https://registry.npmjs.org/) -which git ok /path/to/git -Perms check on cached files ok -Perms check on local node_modules ok -Perms check on global node_modules ok -Perms check on local bin folder ok -Perms check on global bin folder ok -Verify cache contents ok verified 0 tarballs +Check  Value  Recommendation/Notes +npm ping  not ok request to https://registry.npmjs.org/-/ping?write=true failed, reason: Test Error +npm -v  ok  current: v1.0.0, latest: v1.0.0 +node -v  ok  current: v1.0.0, recommended: v1.0.0 +npm config get registry  ok  using default registry (https://registry.npmjs.org/) +git executable in PATH  ok  /path/to/git +global bin folder in PATH  ok  {CWD}/test/lib/commands/tap-testdir-doctor-ping-exception-without-code/global/bin +Perms check on cached files  ok   +Perms check on local node_modules  ok   +Perms check on global node_modules ok   +Perms check on local bin folder  ok   +Perms check on global bin folder  ok   +Verify cache contents  ok  verified 0 tarballs ` -exports[`test/lib/commands/doctor.js TAP silent > logs 1`] = ` +exports[`test/lib/commands/doctor.js TAP silent errors > logs 1`] = ` +Object { + "error": Array [], + "info": Array [ + Array [ + "Running checkup", + ], + Array [ + "checkPing", + "Pinging registry", + ], + ], + "warn": Array [], +} +` + +exports[`test/lib/commands/doctor.js TAP silent errors > output 1`] = ` + +` + +exports[`test/lib/commands/doctor.js TAP silent success > logs 1`] = ` Object { "error": Array [], "info": Array [ @@ -1276,6 +1577,10 @@ "Finding git in your PATH", ], Array [ + "getBinPath", + "Finding npm global bin in your PATH", + ], + Array [ "verifyCachedFiles", "Verifying the npm cache", ], @@ -1295,7 +1600,7 @@ } ` -exports[`test/lib/commands/doctor.js TAP silent > output 1`] = ` +exports[`test/lib/commands/doctor.js TAP silent success > output 1`] = ` ` @@ -1323,19 +1628,8 @@ "Finding git in your PATH", ], Array [ - "verifyCachedFiles", - "Verifying the npm cache", - ], - Array [ - "verifyCachedFiles", - String( - Verification complete. Stats: { - "badContentCount": 0, - "reclaimedCount": 0, - "missingContent": 0, - "verifiedContent": 0 - } - ), + "getBinPath", + "Finding npm global bin in your PATH", ], ], "warn": Array [], @@ -1343,11 +1637,11 @@ ` exports[`test/lib/commands/doctor.js TAP windows skips permissions checks > no permissions checks 1`] = ` -Check Value Recommendation/Notes -npm ping ok -npm -v ok current: v1.0.0, latest: v1.0.0 -node -v ok current: v1.0.0, recommended: v1.0.0 -npm config get registry ok using default registry (https://registry.npmjs.org/) -which git ok /path/to/git -Verify cache contents ok verified 0 tarballs +Check  Value  Recommendation/Notes +npm ping  ok   +npm -v  ok  current: v1.0.0, latest: v1.0.0 +node -v  ok  current: v1.0.0, recommended: v1.0.0 +npm config get registry  ok  using default registry (https://registry.npmjs.org/) +git executable in PATH  ok  /path/to/git +global bin folder in PATH ok  {CWD}/test/lib/commands/tap-testdir-doctor-windows-skips-permissions-checks/global ` diff -Nru npm-9.1.2~ds1/tap-snapshots/test/lib/commands/pack.js.test.cjs npm-9.2.0~ds1/tap-snapshots/test/lib/commands/pack.js.test.cjs --- npm-9.1.2~ds1/tap-snapshots/test/lib/commands/pack.js.test.cjs 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/tap-snapshots/test/lib/commands/pack.js.test.cjs 2022-12-07 23:13:18.000000000 +0000 @@ -56,6 +56,36 @@ ] ` +exports[`test/lib/commands/pack.js TAP should log scoped package output as valid json > logs pack contents 1`] = ` +Array [] +` + +exports[`test/lib/commands/pack.js TAP should log scoped package output as valid json > outputs as json 1`] = ` +Array [ + Array [ + Object { + "bundled": Array [], + "entryCount": 1, + "filename": "myscope-test-package-1.0.0.tgz", + "files": Array [ + Object { + "mode": 420, + "path": "package.json", + "size": 50, + }, + ], + "id": "@myscope/test-package@1.0.0", + "integrity": "sha512-bUu8iTm2E5DZMrwKeyx963K6ViEmaFocXh75EujgI+FHSaJeqvObcdk1KFwdx8CbOgsfNHEvWNQw/bONAJsoNw==", + "name": "@myscope/test-package", + "shasum": "7e6eb2e1ca46bed6b8fa8e144e0fcd1b22fe2d98", + "size": 145, + "unpackedSize": 50, + "version": "1.0.0", + }, + ], +] +` + exports[`test/lib/commands/pack.js TAP should pack current directory with no arguments > logs pack contents 1`] = ` Array [ undefined, diff -Nru npm-9.1.2~ds1/tap-snapshots/test/lib/commands/publish.js.test.cjs npm-9.2.0~ds1/tap-snapshots/test/lib/commands/publish.js.test.cjs --- npm-9.1.2~ds1/tap-snapshots/test/lib/commands/publish.js.test.cjs 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/tap-snapshots/test/lib/commands/publish.js.test.cjs 2022-12-07 23:13:18.000000000 +0000 @@ -136,7 +136,7 @@ String( name: @npm/test-package version: 1.0.0 - filename: @npm/test-package-1.0.0.tgz + filename: npm-test-package-1.0.0.tgz package size: 147 B unpacked size: 55 B shasum:{sha} @@ -191,7 +191,7 @@ String( name: @npm/test-package version: 1.0.0 - filename: @npm/test-package-1.0.0.tgz + filename: npm-test-package-1.0.0.tgz package size: 147 B unpacked size: 55 B shasum:{sha} diff -Nru npm-9.1.2~ds1/tap-snapshots/test/lib/docs.js.test.cjs npm-9.2.0~ds1/tap-snapshots/test/lib/docs.js.test.cjs --- npm-9.1.2~ds1/tap-snapshots/test/lib/docs.js.test.cjs 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/tap-snapshots/test/lib/docs.js.test.cjs 2022-12-07 23:13:18.000000000 +0000 @@ -758,7 +758,7 @@ The name of a continuous integration system. If not set explicitly, npm will detect the current CI environment using the -[\`ci-info\`](http://npm.im/@npmcli/ci-info) module. +[\`ci-info\`](http://npm.im/ci-info) module. #### \`cidr\` @@ -2861,7 +2861,7 @@ Check your npm environment Usage: -npm doctor +npm doctor [ping] [registry] [versions] [environment] [permissions] [cache] Options: [--registry ] @@ -2869,7 +2869,7 @@ Run "npm help doctor" for more info \`\`\`bash -npm doctor +npm doctor [ping] [registry] [versions] [environment] [permissions] [cache] \`\`\` #### \`registry\` diff -Nru npm-9.1.2~ds1/tap-snapshots/test/lib/utils/tar.js.test.cjs npm-9.2.0~ds1/tap-snapshots/test/lib/utils/tar.js.test.cjs --- npm-9.1.2~ds1/tap-snapshots/test/lib/utils/tar.js.test.cjs 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/tap-snapshots/test/lib/utils/tar.js.test.cjs 2022-12-07 23:13:18.000000000 +0000 @@ -34,3 +34,33 @@ ` + +exports[`test/lib/utils/tar.js TAP should log tarball contents of a scoped package > must match snapshot 1`] = ` + + +package: @myscope/my-cool-pkg@1.0.0 +=== Tarball Contents === + +4B cat +4B chai +4B dog +123B package.json +=== Bundled Dependencies === + +bundle-dep +=== Tarball Details === + +name: @myscope/my-cool-pkg +version: 1.0.0 +filename: myscope-my-cool-pkg-1.0.0.tgz +package size: 280 B +unpacked size: 135 B +shasum: a4f63307f2211e8fde72cd39bc1176b4fe997b71 +integrity: sha512-b+RavF8JiErJt[...]YpwkJc8ycaabA== +bundled deps: 1 +bundled files: 0 +own files: 5 +total files: 5 + + +` diff -Nru npm-9.1.2~ds1/test/lib/cli.js npm-9.2.0~ds1/test/lib/cli.js --- npm-9.1.2~ds1/test/lib/cli.js 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/test/lib/cli.js 2022-12-07 23:13:18.000000000 +0000 @@ -30,7 +30,7 @@ } t.afterEach(() => { - delete process.exitCode + process.exitCode = undefined }) t.test('print the version, and treat npm_g as npm -g', async t => { diff -Nru npm-9.1.2~ds1/test/lib/commands/doctor.js npm-9.2.0~ds1/test/lib/commands/doctor.js --- npm-9.1.2~ds1/test/lib/commands/doctor.js 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/test/lib/commands/doctor.js 2022-12-07 23:13:18.000000000 +0000 @@ -1,5 +1,6 @@ const t = require('tap') const fs = require('fs') +const path = require('path') const { load: loadMockNpm } = require('../../fixtures/mock-npm') const tnock = require('../../fixtures/tnock.js') @@ -52,11 +53,14 @@ }, } -const globals = { - process: { - platform: 'test-not-windows', - version: 'v1.0.0', - }, +const globals = ({ globalPrefix }) => { + return { + process: { + 'env.PATH': `${globalPrefix}:${path.join(globalPrefix, 'bin')}`, + platform: 'test-not-windows', + version: 'v1.0.0', + }, + } } // getuid and getgid do not exist in windows, so we shim them @@ -114,7 +118,7 @@ t.matchSnapshot({ info: logs.info, warn: logs.warn, error: logs.error }, 'logs') }) -t.test('silent', async t => { +t.test('silent success', async t => { const { joinedOutput, logs, npm } = await loadMockNpm(t, { mocks, globals, @@ -133,6 +137,24 @@ t.matchSnapshot({ info: logs.info, warn: logs.warn, error: logs.error }, 'logs') }) +t.test('silent errors', async t => { + const { joinedOutput, logs, npm } = await loadMockNpm(t, { + mocks, + globals, + config: { + loglevel: 'silent', + }, + ...dirs, + }) + tnock(t, npm.config.get('registry')) + .get('/-/ping?write=true').reply(404, '{}') + await t.rejects(npm.exec('doctor', ['ping']), { + message: /Check logs/, + }) + t.matchSnapshot(joinedOutput(), 'output') + t.matchSnapshot({ info: logs.info, warn: logs.warn, error: logs.error }, 'logs') +}) + t.test('ping 404', async t => { const { joinedOutput, logs, npm } = await loadMockNpm(t, { mocks, @@ -144,7 +166,9 @@ .get('/npm').reply(200, npmManifest(npm.version)) tnock(t, 'https://nodejs.org') .get('/dist/index.json').reply(200, nodeVersions) - await t.rejects(npm.exec('doctor', [])) + await t.rejects(npm.exec('doctor', []), { + message: /See above/, + }) t.matchSnapshot(joinedOutput(), 'ping 404') t.matchSnapshot({ info: logs.info, warn: logs.warn, error: logs.error }, 'logs') }) @@ -217,12 +241,16 @@ t.test('node out of date - lts', async t => { const { joinedOutput, logs, npm } = await loadMockNpm(t, { mocks, - globals: { - ...globals, - process: { - platform: 'test-not-windows', - version: 'v0.0.1', - }, + globals: (context) => { + const g = globals(context) + return { + ...g, + process: { + ...g.process, + platform: 'test-not-windows', + version: 'v0.0.1', + }, + } }, ...dirs, }) @@ -239,12 +267,15 @@ t.test('node out of date - current', async t => { const { joinedOutput, logs, npm } = await loadMockNpm(t, { mocks, - globals: { - ...globals, - process: { - ...globals.process, - version: 'v2.0.0', - }, + globals: (context) => { + const g = globals(context) + return { + ...g, + process: { + ...g.process, + version: 'v2.0.0', + }, + } }, ...dirs, }) @@ -299,12 +330,15 @@ t.test('windows skips permissions checks', async t => { const { joinedOutput, logs, npm } = await loadMockNpm(t, { mocks, - globals: { - ...globals, - process: { - ...globals.process, - platform: 'win32', - }, + globals: (context) => { + const g = globals(context) + return { + ...g, + process: { + ...g.process, + platform: 'win32', + }, + } }, prefixDir: {}, globalPrefixDir: {}, @@ -510,3 +544,123 @@ t.matchSnapshot(joinedOutput(), 'output') t.matchSnapshot({ info: logs.info, warn: logs.warn, error: logs.error }, 'logs') }) + +t.test('discrete checks', t => { + t.test('ping', async t => { + const { joinedOutput, logs, npm } = await loadMockNpm(t, { + mocks, + globals, + ...dirs, + }) + tnock(t, npm.config.get('registry')) + .get('/-/ping?write=true').reply(200, '{}') + await npm.exec('doctor', ['ping']) + t.matchSnapshot(joinedOutput(), 'output') + t.matchSnapshot({ info: logs.info, warn: logs.warn, error: logs.error }, 'logs') + }) + + t.test('versions', async t => { + const { joinedOutput, logs, npm } = await loadMockNpm(t, { + mocks, + globals, + ...dirs, + }) + tnock(t, npm.config.get('registry')) + .get('/npm').reply(200, npmManifest(npm.version)) + tnock(t, 'https://nodejs.org') + .get('/dist/index.json').reply(200, nodeVersions) + await npm.exec('doctor', ['versions']) + t.matchSnapshot(joinedOutput(), 'output') + t.matchSnapshot({ info: logs.info, warn: logs.warn, error: logs.error }, 'logs') + }) + + t.test('registry', async t => { + const { joinedOutput, logs, npm } = await loadMockNpm(t, { + mocks, + globals, + ...dirs, + }) + tnock(t, npm.config.get('registry')) + .get('/-/ping?write=true').reply(200, '{}') + await npm.exec('doctor', ['registry']) + t.matchSnapshot(joinedOutput(), 'output') + t.matchSnapshot({ info: logs.info, warn: logs.warn, error: logs.error }, 'logs') + }) + + t.test('git', async t => { + const { joinedOutput, logs, npm } = await loadMockNpm(t, { + mocks, + globals, + ...dirs, + }) + await npm.exec('doctor', ['git']) + t.matchSnapshot(joinedOutput(), 'output') + t.matchSnapshot({ info: logs.info, warn: logs.warn, error: logs.error }, 'logs') + }) + + t.test('permissions - not windows', async t => { + const { joinedOutput, logs, npm } = await loadMockNpm(t, { + mocks, + globals, + ...dirs, + }) + await npm.exec('doctor', ['permissions']) + t.matchSnapshot(joinedOutput(), 'output') + t.matchSnapshot({ info: logs.info, warn: logs.warn, error: logs.error }, 'logs') + }) + + t.test('cache', async t => { + const { joinedOutput, logs, npm } = await loadMockNpm(t, { + mocks, + globals, + ...dirs, + }) + await npm.exec('doctor', ['cache']) + t.matchSnapshot(joinedOutput(), 'output') + t.matchSnapshot({ info: logs.info, warn: logs.warn, error: logs.error }, 'logs') + }) + + t.test('permissions - windows', async t => { + const { joinedOutput, logs, npm } = await loadMockNpm(t, { + mocks, + globals: (context) => { + const g = globals(context) + return { + ...g, + process: { + ...g.process, + platform: 'win32', + }, + } + }, + prefixDir: {}, + globalPrefixDir: {}, + }) + await npm.exec('doctor', ['permissions']) + t.matchSnapshot(joinedOutput(), 'output') + t.matchSnapshot({ info: logs.info, warn: logs.warn, error: logs.error }, 'logs') + }) + + t.test('invalid environment', async t => { + const { joinedOutput, logs, npm } = await loadMockNpm(t, { + mocks, + globals: (context) => { + const g = globals(context) + return { + ...g, + process: { + ...g.process, + 'env.PATH': '/nope', + }, + } + }, + prefixDir: {}, + globalPrefixDir: {}, + }) + await t.rejects(npm.exec('doctor', ['environment'])) + t.matchSnapshot(joinedOutput(), 'output') + t.matchSnapshot({ info: logs.info, warn: logs.warn, error: logs.error }, 'logs') + }) + + t.end() +}) diff -Nru npm-9.1.2~ds1/test/lib/commands/pack.js npm-9.2.0~ds1/test/lib/commands/pack.js --- npm-9.1.2~ds1/test/lib/commands/pack.js 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/test/lib/commands/pack.js 2022-12-07 23:13:18.000000000 +0000 @@ -77,6 +77,24 @@ t.ok(fs.statSync(path.resolve(npm.prefix, filename))) }) +t.test('should log scoped package output as valid json', async t => { + const { npm, outputs, logs } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: '@myscope/test-package', + version: '1.0.0', + }), + }, + }) + process.chdir(npm.prefix) + npm.config.set('json', true) + await npm.exec('pack', []) + const filename = 'myscope-test-package-1.0.0.tgz' + t.matchSnapshot(outputs.map(JSON.parse), 'outputs as json') + t.matchSnapshot(logs.notice.map(([, m]) => m), 'logs pack contents') + t.ok(fs.statSync(path.resolve(npm.prefix, filename))) +}) + t.test('dry run', async t => { const { npm, outputs, logs } = await loadMockNpm(t, { prefixDir: { diff -Nru npm-9.1.2~ds1/test/lib/commands/whoami.js npm-9.2.0~ds1/test/lib/commands/whoami.js --- npm-9.1.2~ds1/test/lib/commands/whoami.js 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/test/lib/commands/whoami.js 2022-12-07 23:13:18.000000000 +0000 @@ -1,6 +1,7 @@ const t = require('tap') const { load: loadMockNpm } = require('../../fixtures/mock-npm') const MockRegistry = require('@npmcli/mock-registry') +const nock = require('nock') const username = 'foo' const auth = { '//registry.npmjs.org/:_authToken': 'test-auth-token' } @@ -67,3 +68,27 @@ }) await t.rejects(npm.exec('whoami', []), { code: 'ENEEDAUTH' }) }) + +t.test('non-string username in response', async t => { + nock.disableNetConnect() + t.teardown(() => { + nock.enableNetConnect() + }) + + const server = nock('https://registry.npmjs.org', { + reqheaders: { + authorization: 'Bearer abcd1234', + }, + }) + .get('/-/whoami') + .reply(200, { username: null }) + + const { npm } = await loadMockNpm(t, { + config: { + '//registry.npmjs.org/:_authToken': 'abcd1234', + }, + }) + + await t.rejects(npm.exec('whoami', []), { code: 'ENEEDAUTH' }) + t.ok(server.isDone()) +}) diff -Nru npm-9.1.2~ds1/test/lib/utils/tar.js npm-9.2.0~ds1/test/lib/utils/tar.js --- npm-9.1.2~ds1/test/lib/utils/tar.js 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/test/lib/utils/tar.js 2022-12-07 23:13:18.000000000 +0000 @@ -51,6 +51,38 @@ t.matchSnapshot(printLogs(tarballContents)) }) +t.test('should log tarball contents of a scoped package', async (t) => { + const testDir = t.testdir({ + 'package.json': JSON.stringify({ + name: '@myscope/my-cool-pkg', + version: '1.0.0', + bundleDependencies: [ + 'bundle-dep', + ], + dependencies: { + 'bundle-dep': '1.0.0', + }, + }), + cat: 'meow', + chai: 'blub', + dog: 'woof', + node_modules: { + 'bundle-dep': { + 'package.json': '', + }, + }, + }) + + const tarball = await pack(testDir) + const tarballContents = await getContents({ + _id: '1', + name: '@myscope/my-cool-pkg', + version: '1.0.0', + }, tarball) + + t.matchSnapshot(printLogs(tarballContents)) +}) + t.test('should log tarball contents with unicode', async (t) => { const { logTar } = mockTar({ notice: (str) => { diff -Nru npm-9.1.2~ds1/workspaces/arborist/CHANGELOG.md npm-9.2.0~ds1/workspaces/arborist/CHANGELOG.md --- npm-9.1.2~ds1/workspaces/arborist/CHANGELOG.md 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/workspaces/arborist/CHANGELOG.md 2022-12-07 23:13:18.000000000 +0000 @@ -1,5 +1,27 @@ # Changelog +## [6.1.5](https://github.com/npm/cli/compare/arborist-v6.1.4...arborist-v6.1.5) (2022-12-07) + +### Bug Fixes + +* [`83fb125`](https://github.com/npm/cli/commit/83fb125446a9fb217eedf53ca98c203d7d48527b) [#5923](https://github.com/npm/cli/pull/5923) audit package mismatch in special case (@fritzy) + +### Dependencies + +* [`372d158`](https://github.com/npm/cli/commit/372d158d2637120600a95abee64355ed1cb6f990) [#5935](https://github.com/npm/cli/pull/5935) `minimatch@5.1.1` (#5935) +* [`0a3fe00`](https://github.com/npm/cli/commit/0a3fe000e2723ae6fdb8b1d3154fd3835057c992) [#5933](https://github.com/npm/cli/pull/5933) `minipass@4.0.0` +* [`cf0a174`](https://github.com/npm/cli/commit/cf0a17407abc577c27420a1c8a4a0c08c7cefce9) `ssri@10.0.1` +* [`3da9a1a`](https://github.com/npm/cli/commit/3da9a1a4ebcf1779035b5f9ae985c087f617efe3) `pacote@15.0.7` +* [`fee9b66`](https://github.com/npm/cli/commit/fee9b6686892a1c7f976c36ddd5d89b70c416817) `npm-registry-fetch@14.0.3` +* [`e940917`](https://github.com/npm/cli/commit/e940917befcdaf44ee7e24d31b540f4de8507734) `cacache@17.0.3` +* [`875bd56`](https://github.com/npm/cli/commit/875bd56c33ca5eef80c2a50a11808445f2a39a2a) `npm-package-arg@10.1.0` + +## [6.1.4](https://github.com/npm/cli/compare/arborist-v6.1.3...arborist-v6.1.4) (2022-11-30) + +### Bug Fixes + +* [`80c6c4a`](https://github.com/npm/cli/commit/80c6c4a5111ab1779256a779a2cba41eb2c8675f) [#5907](https://github.com/npm/cli/pull/5907) do not reset hidden lockfile data before saving (#5907) (@nlf) + ## [6.1.3](https://github.com/npm/cli/compare/arborist-v6.1.2...arborist-v6.1.3) (2022-11-16) ### Bug Fixes diff -Nru npm-9.1.2~ds1/workspaces/arborist/lib/arborist/build-ideal-tree.js npm-9.2.0~ds1/workspaces/arborist/lib/arborist/build-ideal-tree.js --- npm-9.1.2~ds1/workspaces/arborist/lib/arborist/build-ideal-tree.js 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/workspaces/arborist/lib/arborist/build-ideal-tree.js 2022-12-07 23:13:18.000000000 +0000 @@ -619,14 +619,16 @@ continue } - const { isSemVerMajor, version } = fixAvailable + // name may be different if parent fixes the dep + // see Vuln fixAvailable setter + const { isSemVerMajor, version, name: fixName } = fixAvailable const breakingMessage = isSemVerMajor ? 'a SemVer major change' : 'outside your stated dependency range' - log.warn('audit', `Updating ${name} to ${version}, ` + + log.warn('audit', `Updating ${fixName} to ${version}, ` + `which is ${breakingMessage}.`) - await this[_add](node, { add: [`${name}@${version}`] }) + await this[_add](node, { add: [`${fixName}@${version}`] }) nodesTouched.add(node) } } diff -Nru npm-9.1.2~ds1/workspaces/arborist/lib/arborist/reify.js npm-9.2.0~ds1/workspaces/arborist/lib/arborist/reify.js --- npm-9.1.2~ds1/workspaces/arborist/lib/arborist/reify.js 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/workspaces/arborist/lib/arborist/reify.js 2022-12-07 23:13:18.000000000 +0000 @@ -1531,16 +1531,12 @@ this.idealTree.meta.filename = this.idealTree.realpath + '/node_modules/.package-lock.json' this.idealTree.meta.hiddenLockfile = true - const resetMeta = this.idealTree.meta && this.idealTree.meta.lockfileVersion !== defaultLockfileVersion this.idealTree.meta.lockfileVersion = defaultLockfileVersion this.actualTree = this.idealTree this.idealTree = null if (!this[_global]) { - if (resetMeta) { - await this.actualTree.meta.reset() - } await this.actualTree.meta.save() const ignoreScripts = !!this.options.ignoreScripts // if we aren't doing a dry run or ignoring scripts and we actually made changes to the dep diff -Nru npm-9.1.2~ds1/workspaces/arborist/lib/vuln.js npm-9.2.0~ds1/workspaces/arborist/lib/vuln.js --- npm-9.1.2~ds1/workspaces/arborist/lib/vuln.js 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/workspaces/arborist/lib/vuln.js 2022-12-07 23:13:18.000000000 +0000 @@ -65,6 +65,9 @@ // - {name, version, isSemVerMajor} fix requires -f, is semver major // - {name, version} fix requires -f, not semver major // - true: fix does not require -f + // TODO: duped entries may require different fixes but the current + // structure does not support this, so the case were a top level fix + // corrects a duped entry may mean you have to run fix more than once for (const v of this.via) { // don't blow up on loops if (v.fixAvailable === f) { diff -Nru npm-9.1.2~ds1/workspaces/arborist/package.json npm-9.2.0~ds1/workspaces/arborist/package.json --- npm-9.1.2~ds1/workspaces/arborist/package.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/workspaces/arborist/package.json 2022-12-07 23:13:18.000000000 +0000 @@ -1,6 +1,6 @@ { "name": "@npmcli/arborist", - "version": "6.1.3", + "version": "6.1.5", "description": "Manage node_modules trees", "dependencies": { "@isaacs/string-locale-compare": "^1.1.0", @@ -14,37 +14,37 @@ "@npmcli/query": "^3.0.0", "@npmcli/run-script": "^6.0.0", "bin-links": "^4.0.1", - "cacache": "^17.0.2", + "cacache": "^17.0.3", "common-ancestor-path": "^1.0.1", "hosted-git-info": "^6.1.1", "json-parse-even-better-errors": "^3.0.0", "json-stringify-nice": "^1.1.4", - "minimatch": "^5.1.0", + "minimatch": "^5.1.1", "nopt": "^7.0.0", "npm-install-checks": "^6.0.0", - "npm-package-arg": "^10.0.0", + "npm-package-arg": "^10.1.0", "npm-pick-manifest": "^8.0.1", - "npm-registry-fetch": "^14.0.2", + "npm-registry-fetch": "^14.0.3", "npmlog": "^7.0.1", - "pacote": "^15.0.2", + "pacote": "^15.0.7", "parse-conflict-json": "^3.0.0", "proc-log": "^3.0.0", "promise-all-reject-late": "^1.0.0", "promise-call-limit": "^1.0.1", "read-package-json-fast": "^3.0.1", "semver": "^7.3.7", - "ssri": "^10.0.0", + "ssri": "^10.0.1", "treeverse": "^3.0.0", "walk-up-path": "^1.0.0" }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", + "@npmcli/template-oss": "4.11.0", "benchmark": "^2.1.4", "chalk": "^4.1.0", - "minify-registry-metadata": "^2.1.0", + "minify-registry-metadata": "^3.0.0", "nock": "^13.2.0", - "tap": "^16.0.1", + "tap": "^16.3.2", "tcompare": "^5.0.6" }, "scripts": { @@ -101,7 +101,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.10.0", + "version": "4.11.0", "content": "../../scripts/template-oss/index.js" } } diff -Nru npm-9.1.2~ds1/workspaces/config/package.json npm-9.2.0~ds1/workspaces/config/package.json --- npm-9.1.2~ds1/workspaces/config/package.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/workspaces/config/package.json 2022-12-07 23:13:18.000000000 +0000 @@ -33,8 +33,8 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", - "tap": "^16.0.1" + "@npmcli/template-oss": "4.11.0", + "tap": "^16.3.2" }, "dependencies": { "@npmcli/map-workspaces": "^3.0.0", @@ -50,6 +50,6 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.10.0" + "version": "4.11.0" } } diff -Nru npm-9.1.2~ds1/workspaces/libnpmaccess/CHANGELOG.md npm-9.2.0~ds1/workspaces/libnpmaccess/CHANGELOG.md --- npm-9.1.2~ds1/workspaces/libnpmaccess/CHANGELOG.md 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/workspaces/libnpmaccess/CHANGELOG.md 2022-12-07 23:13:18.000000000 +0000 @@ -1,5 +1,13 @@ # Changelog +## [7.0.1](https://github.com/npm/cli/compare/libnpmaccess-v7.0.0...libnpmaccess-v7.0.1) (2022-12-07) + +### Dependencies + +* [`0a3fe00`](https://github.com/npm/cli/commit/0a3fe000e2723ae6fdb8b1d3154fd3835057c992) [#5933](https://github.com/npm/cli/pull/5933) `minipass@4.0.0` +* [`fee9b66`](https://github.com/npm/cli/commit/fee9b6686892a1c7f976c36ddd5d89b70c416817) `npm-registry-fetch@14.0.3` +* [`875bd56`](https://github.com/npm/cli/commit/875bd56c33ca5eef80c2a50a11808445f2a39a2a) `npm-package-arg@10.1.0` + ## [7.0.0](https://github.com/npm/cli/compare/libnpmaccess-v7.0.0-pre.2...libnpmaccess-v7.0.0) (2022-10-19) ### Features diff -Nru npm-9.1.2~ds1/workspaces/libnpmaccess/package.json npm-9.2.0~ds1/workspaces/libnpmaccess/package.json --- npm-9.1.2~ds1/workspaces/libnpmaccess/package.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/workspaces/libnpmaccess/package.json 2022-12-07 23:13:18.000000000 +0000 @@ -1,6 +1,6 @@ { "name": "libnpmaccess", - "version": "7.0.0", + "version": "7.0.1", "description": "programmatic library for `npm access` commands", "author": "GitHub Inc.", "license": "ISC", @@ -16,9 +16,10 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", + "@npmcli/mock-registry": "^1.0.0", + "@npmcli/template-oss": "4.11.0", "nock": "^13.2.4", - "tap": "^16.0.1" + "tap": "^16.3.2" }, "repository": { "type": "git", @@ -28,8 +29,8 @@ "bugs": "https://github.com/npm/libnpmaccess/issues", "homepage": "https://npmjs.com/package/libnpmaccess", "dependencies": { - "npm-package-arg": "^10.0.0", - "npm-registry-fetch": "^14.0.2" + "npm-package-arg": "^10.1.0", + "npm-registry-fetch": "^14.0.3" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" @@ -40,7 +41,7 @@ ], "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.10.0", + "version": "4.11.0", "content": "../../scripts/template-oss/index.js" }, "tap": { diff -Nru npm-9.1.2~ds1/workspaces/libnpmaccess/test/fixtures/tnock.js npm-9.2.0~ds1/workspaces/libnpmaccess/test/fixtures/tnock.js --- npm-9.1.2~ds1/workspaces/libnpmaccess/test/fixtures/tnock.js 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/workspaces/libnpmaccess/test/fixtures/tnock.js 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -'use strict' - -const nock = require('nock') - -module.exports = tnock -function tnock (t, host) { - const server = nock(host) - t.teardown(function () { - server.done() - }) - return server -} diff -Nru npm-9.1.2~ds1/workspaces/libnpmaccess/test/index.js npm-9.2.0~ds1/workspaces/libnpmaccess/test/index.js --- npm-9.1.2~ds1/workspaces/libnpmaccess/test/index.js 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/workspaces/libnpmaccess/test/index.js 2022-12-07 23:13:18.000000000 +0000 @@ -1,28 +1,42 @@ 'use strict' const t = require('tap') -const tnock = require('./fixtures/tnock.js') +const MockRegistry = require('@npmcli/mock-registry') const access = require('../lib/index.js') -const REG = 'http://localhost:1337' -const OPTS = { - registry: REG, +const opts = { + registry: 'http://localhost:1337', +} + +const pkg = '@npmcli/libnpmaccess-test' +const team = 'npm:test-team' +const orgUser = 'test-user' +const mockRegistry = (t) => { + return new MockRegistry({ + tap: t, + strict: true, + registry: 'http://localhost:1337', + }) } t.test('getCollaborators', t => { t.test('success', async t => { + const registry = mockRegistry(t) const collaborators = { 'npm:myteam': 'write', 'npm:anotherteam': 'read', 'npm:thirdteam': 'special-case', } - tnock(t, REG).get('/-/package/@npmcli%2ftest-package/collaborators').reply(200, collaborators) - const data = await access.getCollaborators('@npmcli/test-package', OPTS) - t.same(data, collaborators) + registry.getCollaborators({ spec: pkg, collaborators }) + await t.resolves( + access.getCollaborators(pkg, opts), + collaborators + ) }) + t.test('non registry package', async t => { - await t.rejects(access.getCollaborators('./local', OPTS), /package name only/) + await t.rejects(access.getCollaborators('./local', opts), /package name only/) }) t.end() }) @@ -34,125 +48,119 @@ '@npmcli/other': 'shrödinger', } t.test('team', async t => { - tnock(t, REG).get('/-/team/npm/myteam/package').reply(200, packages) - const data = await access.getPackages('npm:myteam', OPTS) - t.same(data, packages) + const registry = mockRegistry(t) + registry.getPackages({ team, packages }) + await t.resolves(access.getPackages(team, opts), packages) }) t.test('org', async t => { - tnock(t, REG).get('/-/org/npm/package').reply(200, packages) - const data = await access.getPackages('npm', OPTS) - t.same(data, packages) + const registry = mockRegistry(t) + registry.getPackages({ team: 'npm', packages }) + await t.resolves(access.getPackages('npm', opts), packages) }) t.test('user', async t => { - tnock(t, REG).get('/-/org/testuser/package').reply(404, {}) - tnock(t, REG).get('/-/user/testuser/package').reply(200, packages) - const data = await access.getPackages('testuser', OPTS) - t.same(data, packages) + const registry = mockRegistry(t) + registry.getPackages({ team: orgUser, responseCode: 404 }) + registry.getPackages({ user: orgUser, packages }) + await t.resolves(access.getPackages(orgUser, opts), packages) }) t.test('registry error', async t => { - tnock(t, REG).get('/-/org/npm/package').reply(500, {}) - await t.rejects(access.getPackages('npm', OPTS), { code: 'E500' }) + const registry = mockRegistry(t) + registry.getPackages({ team: orgUser, responseCode: 500 }) + await t.rejects(access.getPackages(orgUser, opts), { code: 'E500' }) }) t.end() }) t.test('getVisibility', t => { t.test('success', async t => { + const registry = mockRegistry(t) const visibility = { public: true } - tnock(t, REG).get('/-/package/@npmcli%2ftest-package/visibility').reply(200, visibility) - const data = await access.getVisibility('@npmcli/test-package', OPTS) - t.same(data, visibility) + registry.getVisibility({ spec: pkg, visibility }) + await t.resolves(access.getVisibility(pkg, opts), visibility) }) t.test('non registry package', async t => { - await t.rejects(access.getVisibility('./local', OPTS), /package name only/) + await t.rejects(access.getVisibility('./local', opts), /package name only/) }) t.end() }) t.test('removePermissions', t => { t.test('success', async t => { - tnock(t, REG).delete('/-/team/npm/myteam/package', { - package: '@npmcli/test-package', - }).reply(200) - await t.resolves(access.removePermissions('npm:myteam', '@npmcli/test-package', OPTS)) + const registry = mockRegistry(t) + registry.removePermissions({ spec: pkg, team }) + await t.resolves(access.removePermissions(team, pkg, opts)) }) t.test('non registry spec', async t => { - await t.rejects(access.removePermissions('npm:myteam', './local', OPTS), /package name only/) + await t.rejects(access.removePermissions(team, './local', opts), /package name only/) }) t.end() }) t.test('setAccess', t => { t.test('public', async t => { - tnock(t, REG).post( - '/-/package/@npmcli%2ftest-package/access', { access: 'public' } - ).reply(200) - await t.resolves(access.setAccess('@npmcli/test-package', 'public', OPTS)) + const body = { access: 'public' } + const registry = mockRegistry(t) + registry.setAccess({ spec: pkg, body }) + await t.resolves(access.setAccess(pkg, 'public', opts)) }) t.test('restricted', async t => { - tnock(t, REG).post( - '/-/package/@npmcli%2ftest-package/access', { access: 'restricted' } - ).reply(200) - await t.resolves(access.setAccess('@npmcli/test-package', 'restricted', OPTS)) + const body = { access: 'restricted' } + const registry = mockRegistry(t) + registry.setAccess({ spec: pkg, body }) + await t.resolves(access.setAccess(pkg, 'restricted', opts)) }) t.test('non registry package', async t => { - await t.rejects(access.setAccess('./local', 'public', OPTS), /package name only/) + await t.rejects(access.setAccess('./local', 'public', opts), /package name only/) }) t.end() }) t.test('setMfa', t => { t.test('none', async t => { - tnock(t, REG).post('/-/package/@npmcli%2ftest-package/access', { - publish_requires_tfa: false, - }).reply(200) - await t.resolves(access.setMfa('@npmcli/test-package', 'none', OPTS)) + const registry = mockRegistry(t) + const body = { publish_requires_tfa: false } + registry.setAccess({ spec: pkg, body }) + await t.resolves(access.setMfa(pkg, 'none', opts)) }) t.test('publish', async t => { - tnock(t, REG).post('/-/package/@npmcli%2ftest-package/access', { + const registry = mockRegistry(t) + const body = { publish_requires_tfa: true, automation_token_overrides_tfa: false, - }).reply(200) - await t.resolves(access.setMfa('@npmcli/test-package', 'publish', OPTS)) + } + registry.setAccess({ spec: pkg, body }) + await t.resolves(access.setMfa(pkg, 'publish', opts)) }) t.test('automation', async t => { - tnock(t, REG).post('/-/package/@npmcli%2ftest-package/access', { + const registry = mockRegistry(t) + const body = { publish_requires_tfa: true, automation_token_overrides_tfa: true, - }).reply(200) - await t.resolves(access.setMfa('@npmcli/test-package', 'automation', OPTS)) + } + registry.setAccess({ spec: pkg, body }) + await t.resolves(access.setMfa(pkg, 'automation', opts)) }) t.test('invalid', async t => { - await t.rejects(access.setMfa('@npmcli/test-package', 'invalid', OPTS), /Invalid mfa setting/) + await t.rejects(access.setMfa(pkg, 'invalid', opts), /Invalid mfa setting/) }) t.test('non registry spec', async t => { - await t.rejects(access.setMfa('./local', 'none', OPTS, /package name only/)) + await t.rejects(access.setMfa('./local', 'none', opts, /package name only/)) }) t.end() }) t.test('setPermissions', t => { t.test('scope:team read-only', async t => { - tnock(t, REG).put('/-/team/npmcli/myteam/package', { - package: '@npmcli/test-package', - permissions: 'read-only', - }).reply(201) - await t.resolves( - access.setPermissions('npmcli:myteam', '@npmcli/test-package', 'read-only', OPTS) - ) + const registry = mockRegistry(t) + registry.setPermissions({ spec: pkg, team, permissions: 'read-only' }) + await t.resolves(access.setPermissions(team, pkg, 'read-only', opts)) }) t.test('scope only', async t => { - await t.rejects( - access.setPermissions('npmcli', '@npmcli/test-package', 'read-only', OPTS), - /scope:team/ - ) + await t.rejects(access.setPermissions('npmcli', pkg, 'read-only', opts), /scope:team/) }) t.test('no scope or team', async t => { - await t.rejects( - access.setPermissions('@:myteam', '@npmcli/test-package', 'read-only', OPTS), - /scope:team/ - ) + await t.rejects(access.setPermissions('@:myteam', pkg, 'read-only', opts), /scope:team/) }) t.end() diff -Nru npm-9.1.2~ds1/workspaces/libnpmdiff/CHANGELOG.md npm-9.2.0~ds1/workspaces/libnpmdiff/CHANGELOG.md --- npm-9.1.2~ds1/workspaces/libnpmdiff/CHANGELOG.md 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/workspaces/libnpmdiff/CHANGELOG.md 2022-12-07 23:13:18.000000000 +0000 @@ -1,5 +1,22 @@ # Changelog +## [5.0.6](https://github.com/npm/cli/compare/libnpmdiff-v5.0.5...libnpmdiff-v5.0.6) (2022-12-07) + +### Dependencies + +* [`372d158`](https://github.com/npm/cli/commit/372d158d2637120600a95abee64355ed1cb6f990) [#5935](https://github.com/npm/cli/pull/5935) `minimatch@5.1.1` (#5935) +* [`0a3fe00`](https://github.com/npm/cli/commit/0a3fe000e2723ae6fdb8b1d3154fd3835057c992) [#5933](https://github.com/npm/cli/pull/5933) `minipass@4.0.0` +* [`6b77340`](https://github.com/npm/cli/commit/6b7734009ecd939fbb3d382cb92eb0cdbec7dcd3) `tar@6.1.13` +* [`3da9a1a`](https://github.com/npm/cli/commit/3da9a1a4ebcf1779035b5f9ae985c087f617efe3) `pacote@15.0.7` +* [`875bd56`](https://github.com/npm/cli/commit/875bd56c33ca5eef80c2a50a11808445f2a39a2a) `npm-package-arg@10.1.0` +* [Workspace](https://github.com/npm/cli/releases/tag/arborist-v6.1.5): `@npmcli/arborist@6.1.5` + +## [5.0.5](https://github.com/npm/cli/compare/libnpmdiff-v5.0.4...libnpmdiff-v5.0.5) (2022-11-30) + +### Dependencies + +* [Workspace](https://github.com/npm/cli/compare/arborist-v6.1.3...arborist-v6.1.4): `@npmcli/arborist@6.1.4` + ## [5.0.4](https://github.com/npm/cli/compare/libnpmdiff-v5.0.3...libnpmdiff-v5.0.4) (2022-11-16) ### Dependencies diff -Nru npm-9.1.2~ds1/workspaces/libnpmdiff/package.json npm-9.2.0~ds1/workspaces/libnpmdiff/package.json --- npm-9.1.2~ds1/workspaces/libnpmdiff/package.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/workspaces/libnpmdiff/package.json 2022-12-07 23:13:18.000000000 +0000 @@ -1,6 +1,6 @@ { "name": "libnpmdiff", - "version": "5.0.4", + "version": "5.0.6", "description": "The registry diff", "repository": { "type": "git", @@ -43,23 +43,23 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", - "tap": "^16.0.1" + "@npmcli/template-oss": "4.11.0", + "tap": "^16.3.2" }, "dependencies": { - "@npmcli/arborist": "^6.1.3", + "@npmcli/arborist": "^6.1.5", "@npmcli/disparity-colors": "^3.0.0", "@npmcli/installed-package-contents": "^2.0.0", "binary-extensions": "^2.2.0", "diff": "^5.1.0", - "minimatch": "^5.0.1", - "npm-package-arg": "^10.0.0", - "pacote": "^15.0.2", - "tar": "^6.1.0" + "minimatch": "^5.1.1", + "npm-package-arg": "^10.1.0", + "pacote": "^15.0.7", + "tar": "^6.1.13" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.10.0", + "version": "4.11.0", "content": "../../scripts/template-oss/index.js" }, "tap": { diff -Nru npm-9.1.2~ds1/workspaces/libnpmexec/CHANGELOG.md npm-9.2.0~ds1/workspaces/libnpmexec/CHANGELOG.md --- npm-9.1.2~ds1/workspaces/libnpmexec/CHANGELOG.md 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/workspaces/libnpmexec/CHANGELOG.md 2022-12-07 23:13:18.000000000 +0000 @@ -1,5 +1,21 @@ # Changelog +## [5.0.6](https://github.com/npm/cli/compare/libnpmexec-v5.0.5...libnpmexec-v5.0.6) (2022-12-07) + +### Dependencies + +* [`0e6c28b`](https://github.com/npm/cli/commit/0e6c28ba093f8c5d35df98afca28e842b247004b) [#5934](https://github.com/npm/cli/pull/5934) `ci-info@3.7.0` (#5934) +* [`0a3fe00`](https://github.com/npm/cli/commit/0a3fe000e2723ae6fdb8b1d3154fd3835057c992) [#5933](https://github.com/npm/cli/pull/5933) `minipass@4.0.0` +* [`3da9a1a`](https://github.com/npm/cli/commit/3da9a1a4ebcf1779035b5f9ae985c087f617efe3) `pacote@15.0.7` +* [`875bd56`](https://github.com/npm/cli/commit/875bd56c33ca5eef80c2a50a11808445f2a39a2a) `npm-package-arg@10.1.0` +* [Workspace](https://github.com/npm/cli/releases/tag/arborist-v6.1.5): `@npmcli/arborist@6.1.5` + +## [5.0.5](https://github.com/npm/cli/compare/libnpmexec-v5.0.4...libnpmexec-v5.0.5) (2022-11-30) + +### Dependencies + +* [Workspace](https://github.com/npm/cli/compare/arborist-v6.1.3...arborist-v6.1.4): `@npmcli/arborist@6.1.4` + ## [5.0.4](https://github.com/npm/cli/compare/libnpmexec-v5.0.3...libnpmexec-v5.0.4) (2022-11-16) ### Bug Fixes diff -Nru npm-9.1.2~ds1/workspaces/libnpmexec/package.json npm-9.2.0~ds1/workspaces/libnpmexec/package.json --- npm-9.1.2~ds1/workspaces/libnpmexec/package.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/workspaces/libnpmexec/package.json 2022-12-07 23:13:18.000000000 +0000 @@ -1,6 +1,6 @@ { "name": "libnpmexec", - "version": "5.0.4", + "version": "5.0.6", "files": [ "bin/", "lib/" @@ -51,20 +51,23 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", + "@npmcli/mock-registry": "^1.0.0", + "@npmcli/template-oss": "4.11.0", "bin-links": "^4.0.1", - "minify-registry-metadata": "^2.2.0", + "just-extend": "^6.1.1", + "just-safe-set": "^4.1.1", + "minify-registry-metadata": "^3.0.0", "mkdirp": "^1.0.4", - "tap": "^16.0.1" + "tap": "^16.3.2" }, "dependencies": { - "@npmcli/arborist": "^6.1.3", + "@npmcli/arborist": "^6.1.5", "@npmcli/run-script": "^6.0.0", "chalk": "^4.1.0", - "ci-info": "^3.6.1", - "npm-package-arg": "^10.0.0", + "ci-info": "^3.7.0", + "npm-package-arg": "^10.1.0", "npmlog": "^7.0.1", - "pacote": "^15.0.2", + "pacote": "^15.0.7", "proc-log": "^3.0.0", "read": "^1.0.7", "read-package-json-fast": "^3.0.1", @@ -73,7 +76,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.10.0", + "version": "4.11.0", "content": "../../scripts/template-oss/index.js" } } diff -Nru npm-9.1.2~ds1/workspaces/libnpmexec/test/fixtures/setup.js npm-9.2.0~ds1/workspaces/libnpmexec/test/fixtures/setup.js --- npm-9.1.2~ds1/workspaces/libnpmexec/test/fixtures/setup.js 1970-01-01 00:00:00.000000000 +0000 +++ npm-9.2.0~ds1/workspaces/libnpmexec/test/fixtures/setup.js 2022-12-07 23:13:18.000000000 +0000 @@ -0,0 +1,256 @@ + +const fs = require('fs/promises') +const { existsSync } = require('fs') +const { resolve, extname, join } = require('path') +const binLinks = require('bin-links') +const MockRegistry = require('@npmcli/mock-registry') +const justExtend = require('just-extend') +const set = require('just-safe-set') + +const merge = (...args) => justExtend(true, ...args) + +const DEFAULT_BIN_FILE = 'bin-file.js' + +const createPkg = ({ + name = '@npmcli/create-index', + bin, + files, + versions = [], + version, + localVersion, +}) => { + if (localVersion && !versions.includes(localVersion)) { + versions = [...versions, localVersion] + } + if (version && !versions.includes(version)) { + versions = [...versions, version] + } + + const defaultBinName = name.includes('/') ? name.split('/')[1] : name + + if (!bin) { + bin = { + [defaultBinName]: `./${DEFAULT_BIN_FILE}`, + } + } + + const pkgsArr = versions.map((v) => ({ + name, + version: v, + bin, + })) + + const pkgs = {} + const tarballs = {} + const fixtures = {} + + for (const pkg of pkgsArr) { + pkgs[pkg.version] = pkg + } + + if (localVersion) { + set(fixtures, ['node_modules', ...name.split('/')], { + 'package.json': pkgs[localVersion], + ...files || { + [DEFAULT_BIN_FILE]: { key: name, value: `local-${localVersion}` }, + }, + }) + fixtures['package.json'] = { + name: 'pkg', + version: '9.9.9', + dependencies: { + [name]: `^${localVersion}`, + }, + } + } + + for (const pkg of pkgsArr) { + const fixturePath = `${pkg.name}-${pkg.version}`.replace('/', '-') + set(fixtures, ['packages', fixturePath], { + 'package.json': pkg, + ...files || { + [DEFAULT_BIN_FILE]: { key: pkg.name, value: `packages-${pkg.version}` }, + }, + }) + tarballs[pkg.version] = join('packages', fixturePath) + } + + return { + pkg: pkgsArr[0], + pkgs, + fixtures, + package: ({ registry, path, tarballs: tgz = versions, ...opts }) => registry.package({ + times: 2, + manifest: registry.manifest({ name: pkgsArr[0].name, packuments: pkgsArr }), + tarballs: tgz.reduce((acc, v) => { + acc[v] = resolve(path, tarballs[v]) + return acc + }, {}), + ...opts, + }), + } +} + +const createTestdir = (...objs) => { + const testdirHelper = (obj, ancestors = []) => { + for (const [key, value] of Object.entries(obj)) { + if (extname(key) === '.json') { + obj[key] = JSON.stringify(value, null, 2) + } else if (extname(key) === '.js' || ancestors.slice(-2).join('/') === 'node_modules/.bin') { + // a js or bin file is converted to a bin script that writes a file + obj[key] = `#!/usr/bin/env node\nrequire('fs').writeFileSync( + 'output-${value.key.replace('/', '-')}', + JSON.stringify({ + value: '${value.value}', + args: process.argv.slice(2), + created: '${[...ancestors, key].join('/')}', + }) + )` + } else if (value && typeof value === 'object') { + obj[key] = testdirHelper(value, [...ancestors, key]) + } else { + obj[key] = value + } + } + return obj + } + + return testdirHelper(merge(...objs)) +} + +const setup = (t, { + pkg, + testdir: _testdir = {}, + mocks, + global, + debug, + execPath, + defaults = true, +} = {}) => { + const registry = new MockRegistry({ + tap: t, + registry: 'http://smoke-test-registry.club/', + strict: true, + debug, + }) + + if (debug) { + process.on('log', console.error) + t.teardown(() => process.off('log', console.error)) + } + + const { node_modules: testdirNm, ...testdir } = _testdir + const fullTestdir = createTestdir({ + cache: {}, + npxCache: {}, + ...testdirNm ? + global ? { + global: { + node_modules: { + '.bin': {}, + ...testdirNm, + }, + }, + } : { + node_modules: { + '.bin': {}, + ...testdirNm, + }, + } + : {}, + }, testdir) + + // quick way to remove undefined and null values that we merged + // in to not write certain directories + const path = t.testdir(JSON.parse(JSON.stringify(fullTestdir, (_, v) => { + if (v === null) { + return + } + if (typeof v === 'string') { + return v.replace(/\{REGISTRY\}/g, registry.origin) + } + return v + })) + ) + + const cache = resolve(path, 'cache') + const npxCache = resolve(path, 'npxCache') + const nodeModules = resolve(path, global ? 'global/node_modules' : 'node_modules') + + const defaultOpts = { + call: '', + color: false, + localBin: '', + globalBin: '', + packages: [], + scriptShell: undefined, + yes: true, + path, + runPath: path, + } + + const baseOpts = { + audit: false, + registry: registry.origin + '/', + ...existsSync(cache) ? { cache } : {}, + ...existsSync(npxCache) ? { npxCache } : {}, + ...global ? { + globalBin: resolve(path, nodeModules, '.bin'), + globalPath: resolve(path, 'global'), + } : {}, + } + + return { + path, + registry, + chmod: async (chmodPath) => { + if (!chmodPath) { + for (const p of [].concat(pkg)) { + await fs.chmod(resolve(path, nodeModules, p.name, DEFAULT_BIN_FILE), 0o775) + } + return + } + return fs.chmod(resolve(path, chmodPath), 0o775) + }, + binLinks: async (binPkg) => { + if (!binPkg) { + for (const p of [].concat(pkg)) { + await binLinks({ + pkg: p, + path: resolve(path, nodeModules, p.name), + }) + } + return + } + await binLinks({ + pkg: binPkg, + path: resolve(path, nodeModules, binPkg.name), + }) + }, + readOutput: async (outputPath, { root = path } = {}) => { + if (!outputPath) { + outputPath = pkg.name.replace('/', '-') + } + return fs.readFile(resolve(root, `output-${outputPath}`), 'utf-8').then(r => JSON.parse(r)) + }, + rmOutput: (outputPath, { root = path } = {}) => { + if (!outputPath) { + outputPath = pkg.name.replace('/', '-') + } + return fs.rm(resolve(root, `output-${outputPath}`)) + }, + exec: (opts) => t.mock(execPath || '../../lib/index.js', mocks)({ + ...defaults ? { + ...defaultOpts, + path, + runPath: path, + } : {}, + ...baseOpts, + ...opts, + }), + } +} + +module.exports.setup = setup +module.exports.createPkg = createPkg +module.exports.merge = merge diff -Nru npm-9.1.2~ds1/workspaces/libnpmexec/test/index.js npm-9.2.0~ds1/workspaces/libnpmexec/test/index.js --- npm-9.1.2~ds1/workspaces/libnpmexec/test/index.js 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/workspaces/libnpmexec/test/index.js 2022-12-07 23:13:18.000000000 +0000 @@ -1,1270 +1,16 @@ -const fs = require('fs') -const { resolve } = require('path') const t = require('tap') -const binLinks = require('bin-links') - -const libexec = require('../lib/index.js') - -// setup server -const registryServer = require('./registry/server.js') -const { registry } = registryServer -t.test('setup server', { bail: true, buffered: false }, registryServer) - -const baseOpts = { - audit: false, - call: '', - color: false, - localBin: '', - globalBin: '', - packages: [], - path: '', - registry, - runPath: '', - scriptShell: undefined, - yes: true, -} - -t.test('bin in local pkg', async t => { - const pkg = { - name: '@npmcli/local-pkg-bin-test', - bin: { - b: 'echo this is something else', - a: 'local-bin-test.js', - }, - } - const path = t.testdir({ - cache: {}, - npxCache: {}, - 'local-bin-test.js': `#!/usr/bin/env node -require('fs').writeFileSync(process.argv.slice(2)[0], 'LOCAL PKG')`, - 'package.json': JSON.stringify(pkg), - }) - const localBin = resolve(path, 'node_modules/.bin') - const runPath = path - const npxCache = resolve(path, 'npxCache') - - const executable = resolve(path, 'local-bin-test.js') - fs.chmodSync(executable, 0o775) - - await libexec({ - ...baseOpts, - args: ['a', 'resfile'], - npxCache, - localBin, - path, - runPath, - }) - - const res = fs.readFileSync(resolve(path, 'resfile')).toString() - t.equal(res, 'LOCAL PKG', 'should run local pkg bin script') -}) - -t.test('locally available pkg - by scoped name only', async t => { - const pkg = { - name: '@npmcli/npx-local-test', - version: '2.0.0', - bin: { - 'npx-local-test': './index.js', - }, - } - const path = t.testdir({ - cache: {}, - npxCache: {}, - node_modules: { - '.bin': {}, - '@npmcli': { - 'npx-local-test': { - 'package.json': JSON.stringify(pkg), - 'index.js': `#!/usr/bin/env node - require('fs').writeFileSync(process.argv.slice(2)[0], 'LOCAL PKG')`, - }, - }, - }, - 'package.json': JSON.stringify({ - name: 'pkg', - dependencies: { - '@npmcli/npx-local-test': '^2.0.0', - }, - }), - }) - const runPath = path - const cache = resolve(path, 'cache') - const npxCache = resolve(path, 'npxCache') - - const executable = - resolve(path, 'node_modules/@npmcli/npx-local-test/index.js') - fs.chmodSync(executable, 0o775) - - await binLinks({ - path: resolve(path, 'node_modules/@npmcli/npx-local-test'), - pkg, - }) - - await libexec({ - ...baseOpts, - cache, - npxCache, - args: ['@npmcli/npx-local-test', 'resfile'], - path, - runPath, - }) - - const res = fs.readFileSync(resolve(path, 'resfile')).toString() - t.equal(res, 'LOCAL PKG', 'should run local pkg bin script') -}) - -t.test('locally available pkg - by name', async t => { - const pkg = { - name: '@ruyadorno/create-index', - version: '2.0.0', - bin: { - 'create-index': './index.js', - }, - } - const path = t.testdir({ - cache: {}, - npxCache: {}, - node_modules: { - '.bin': {}, - '@ruyadorno': { - 'create-index': { - 'package.json': JSON.stringify(pkg), - 'index.js': `#!/usr/bin/env node - require('fs').writeFileSync(process.argv.slice(2)[0], 'LOCAL PKG')`, - }, - }, - }, - 'package.json': JSON.stringify({ - name: 'pkg', - dependencies: { - '@ruyadorno/create-index': '^2.0.0', - }, - }), - }) - const runPath = path - const cache = resolve(path, 'cache') - const npxCache = resolve(path, 'npxCache') - - const executable = - resolve(path, 'node_modules/@ruyadorno/create-index/index.js') - fs.chmodSync(executable, 0o775) - - await binLinks({ - path: resolve(path, 'node_modules/@ruyadorno/create-index'), - pkg, - }) - - await libexec({ - ...baseOpts, - cache, - npxCache, - packages: ['@ruyadorno/create-index'], - call: 'create-index resfile', - path, - runPath, - }) - - const res = fs.readFileSync(resolve(path, 'resfile')).toString() - t.equal(res, 'LOCAL PKG', 'should run local pkg bin script') -}) - -t.test('locally available pkg - by version', async t => { - const pkg = { - name: '@ruyadorno/create-index', - version: '1.0.0', - bin: { - 'create-index': './index.js', - }, - } - const path = t.testdir({ - cache: {}, - npxCache: {}, - node_modules: { - '.bin': {}, - '@ruyadorno': { - 'create-index': { - 'package.json': JSON.stringify(pkg), - 'index.js': `#!/usr/bin/env node - require('fs').writeFileSync('resfile', 'LOCAL PKG')`, - }, - }, - }, - 'package.json': JSON.stringify({ - name: 'pkg', - dependencies: { - '@ruyadorno/create-index': '^1.0.0', - }, - }), - }) - const runPath = path - const cache = resolve(path, 'cache') - const npxCache = resolve(path, 'npxCache') - - const executable = - resolve(path, 'node_modules/@ruyadorno/create-index/index.js') - fs.chmodSync(executable, 0o775) - - await binLinks({ - path: resolve(path, 'node_modules/@ruyadorno/create-index'), - pkg, - }) - - await libexec({ - ...baseOpts, - cache, - npxCache, - args: ['@ruyadorno/create-index@1.0.0'], - path, - runPath, - }) - - const res = fs.readFileSync(resolve(path, 'resfile')).toString() - t.equal(res, 'LOCAL PKG', 'should run local pkg bin script') -}) - -t.test('locally available pkg - by range', async t => { - const pkg = { - name: '@ruyadorno/create-index', - version: '2.0.0', - bin: { - 'create-index': './index.js', - }, - } - const path = t.testdir({ - cache: {}, - npxCache: {}, - node_modules: { - '.bin': {}, - '@ruyadorno': { - 'create-index': { - 'package.json': JSON.stringify(pkg), - 'index.js': `#!/usr/bin/env node - require('fs').writeFileSync(process.argv.slice(2)[0], 'LOCAL PKG')`, - }, - }, - }, - 'package.json': JSON.stringify({ - name: 'pkg', - dependencies: { - '@ruyadorno/create-index': '^2.0.0', - }, - }), - }) - const runPath = path - const cache = resolve(path, 'cache') - const npxCache = resolve(path, 'npxCache') - - const executable = - resolve(path, 'node_modules/@ruyadorno/create-index/index.js') - fs.chmodSync(executable, 0o775) - - await binLinks({ - path: resolve(path, 'node_modules/@ruyadorno/create-index'), - pkg, - }) - - await libexec({ - ...baseOpts, - cache, - npxCache, - packages: ['@ruyadorno/create-index@^2.0.0'], - call: 'create-index resfile', - path, - runPath, - }) - - const res = fs.readFileSync(resolve(path, 'resfile')).toString() - t.equal(res, 'LOCAL PKG', 'should run local pkg bin script') -}) - -t.test('locally available pkg - by tag', async t => { - const pkg = { - name: '@ruyadorno/create-index', - version: '1.0.0', - bin: { - 'create-index': './index.js', - }, - } - - const path = t.testdir({ - cache: {}, - npxCache: {}, - node_modules: { - '.bin': {}, - '@ruyadorno': { - 'create-index': { - 'package.json': JSON.stringify(pkg), - 'index.js': `#!/usr/bin/env node - require('fs').writeFileSync(process.argv.slice(2)[0], 'LOCAL PKG')`, - }, - }, - '.package-lock.json': JSON.stringify({ - name: 'lock', - lockfileVersion: 3, - requires: true, - packages: { - 'node_modules/@ruyadorno/create-index': { - version: '1.0.0', - resolved: 'https://registry.npmjs.org/@ruyadorno/create-index/-/create-index-1.0.0.tgz', - bin: { - 'create-index': 'create-index.js', - }, - }, - }, - - }), - }, - 'package.json': JSON.stringify({ - name: 'pkg', - dependencies: { - '@ruyadorno/create-index': '^1.0.0', - }, - }), - }) - const runPath = path - const cache = resolve(path, 'cache') - const npxCache = resolve(path, 'npxCache') - - const executable = - resolve(path, 'node_modules/@ruyadorno/create-index/index.js') - fs.chmodSync(executable, 0o775) - - await binLinks({ - path: resolve(path, 'node_modules/@ruyadorno/create-index'), - pkg, - }) - - await libexec({ - ...baseOpts, - cache, - npxCache, - packages: ['@ruyadorno/create-index@latest'], - call: 'create-index resfile', - path, - runPath, - }) - - const res = fs.readFileSync(resolve(path, 'resfile')).toString() - t.equal(res, 'LOCAL PKG', 'should run local pkg bin script') -}) - -t.test('multiple local pkgs', async t => { - const foo = { - name: '@ruyadorno/create-foo', - version: '2.0.0', - bin: { - 'create-foo': './index.js', - }, - } - const bar = { - name: '@ruyadorno/create-bar', - version: '2.0.0', - bin: { - 'create-bar': './index.js', - }, - } - const path = t.testdir({ - cache: {}, - npxCache: {}, - node_modules: { - '.bin': {}, - '@ruyadorno': { - 'create-foo': { - 'package.json': JSON.stringify(foo), - 'index.js': `#!/usr/bin/env node - require('fs').writeFileSync(process.argv.slice(2)[0], 'foo')`, - }, - 'create-bar': { - 'package.json': JSON.stringify(bar), - 'index.js': `#!/usr/bin/env node - require('fs').writeFileSync(process.argv.slice(2)[0], 'bar')`, - }, - }, - }, - 'package.json': JSON.stringify({ - name: 'pkg', - dependencies: { - '@ruyadorno/create-foo': '^2.0.0', - '@ruyadorno/create-bar': '^2.0.0', - }, - }), - }) - const runPath = path - const cache = resolve(path, 'cache') - const npxCache = resolve(path, 'npxCache') - - const setupBins = async (pkg) => { - const executable = - resolve(path, `node_modules/${pkg.name}/index.js`) - fs.chmodSync(executable, 0o775) - - await binLinks({ - path: resolve(path, `node_modules/${pkg.name}`), - pkg, - }) - } - - await Promise.all([foo, bar] - .map(setupBins)) - - await libexec({ - ...baseOpts, - localBin: resolve(path, 'node_modules/.bin'), - cache, - npxCache, - packages: ['@ruyadorno/create-foo', '@ruyadorno/create-bar'], - call: 'create-foo resfile && create-bar bar', - path, - runPath, - }) - - const resFoo = fs.readFileSync(resolve(path, 'resfile')).toString() - t.equal(resFoo, 'foo', 'should run local pkg bin script') - const resBar = fs.readFileSync(resolve(path, 'bar')).toString() - t.equal(resBar, 'bar', 'should run local pkg bin script') -}) - -t.test('no npxCache', async t => { - const path = t.testdir({ - cache: {}, - a: { - 'package.json': JSON.stringify({ - name: 'a', - bin: { - a: './index.js', - }, - }), - 'index.js': `#!/usr/bin/env node -require('fs').writeFileSync(process.argv.slice(2)[0], 'LOCAL PKG')`, - }, - }) - const runPath = path - const cache = resolve(path, 'cache') - - const executable = resolve(path, 'a/index.js') - fs.chmodSync(executable, 0o775) - - await t.rejects(libexec({ - ...baseOpts, - args: [`file:${resolve(path, 'a')}`, 'resfile'], - cache, - path, - runPath, - }), /Must provide a valid npxCache path/) -}) - -t.test('local file system path', async t => { - const path = t.testdir({ - cache: {}, - npxCache: {}, - a: { - 'package.json': JSON.stringify({ - name: 'a', - bin: { - a: './index.js', - }, - }), - 'index.js': `#!/usr/bin/env node -require('fs').writeFileSync(process.argv.slice(2)[0], 'LOCAL PKG')`, - }, - }) - const runPath = path - const cache = resolve(path, 'cache') - const npxCache = resolve(path, 'npxCache') - - const executable = resolve(path, 'a/index.js') - fs.chmodSync(executable, 0o775) - - const mockexec = t.mock('../lib/index.js', { - 'ci-info': { isCI: true }, - 'proc-log': { - warn (title, msg) { - t.fail('should not warn about local file package install') - }, - }, - }) - - await mockexec({ - ...baseOpts, - args: [`file:${resolve(path, 'a')}`, 'resfile'], - cache, - npxCache, - path, - runPath, - }) - - const res = fs.readFileSync(resolve(path, 'resfile')).toString() - t.equal(res, 'LOCAL PKG', 'should run local pkg bin script') -}) - -t.test('global space pkg', async t => { - const pkg = { - name: 'a', - bin: { - a: 'index.js', - }, - } - const path = t.testdir({ - cache: {}, - npxCache: {}, - global: { - node_modules: { - '.bin': {}, - a: { - 'index.js': `#!/usr/bin/env node - require('fs').writeFileSync(process.argv.slice(2)[0], 'GLOBAL PKG')`, - 'package.json': JSON.stringify(pkg), - }, - }, - }, - }) - const globalBin = resolve(path, 'global/node_modules/.bin') - const globalPath = resolve(path, 'global') - const runPath = path - - const executable = resolve(path, 'global/node_modules/a') - fs.chmodSync(executable, 0o775) - - await binLinks({ - path: resolve(path, 'global/node_modules/a'), - pkg, - }) - - await libexec({ - ...baseOpts, - args: ['a', 'resfile'], - globalBin, - globalPath, - path, - runPath, - }) - - const res = fs.readFileSync(resolve(path, 'resfile')).toString() - t.equal(res, 'GLOBAL PKG', 'should run local pkg bin script') -}) - -t.test('global scoped pkg', async t => { - const pkg = { - name: '@ruyadorno/create-test', - bin: { - 'create-test': 'index.js', - }, - } - const path = t.testdir({ - cache: {}, - npxCache: {}, - global: { - node_modules: { - '.bin': {}, - '@ruyadorno': { - 'create-test': { - 'index.js': `#!/usr/bin/env node - require('fs').writeFileSync(process.argv.slice(2)[0], 'GLOBAL PKG')`, - 'package.json': JSON.stringify(pkg), - }, - }, - }, - }, - }) - const globalBin = resolve(path, 'global/node_modules/.bin') - const globalPath = resolve(path, 'global') - const runPath = path - - await binLinks({ - path: resolve(path, 'global/node_modules/@ruyadorno/create-test'), - pkg, - }) - - await libexec({ - ...baseOpts, - args: ['@ruyadorno/create-test', 'resfile'], - globalBin, - globalPath, - path, - runPath, - }) - - const res = fs.readFileSync(resolve(path, 'resfile')).toString() - t.equal(res, 'GLOBAL PKG', 'should run global pkg bin script') -}) - -t.test('run from registry - no local packages', async t => { - const testdir = t.testdir({ - cache: {}, - npxCache: {}, - global: { - lib: {}, - bin: {}, - }, - work: {}, - }) - const path = resolve(testdir, 'work') - - t.throws( - () => fs.statSync(resolve(path, 'index.js')), - { code: 'ENOENT' }, - 'should not have template file' - ) - - await libexec({ - ...baseOpts, - args: ['@ruyadorno/create-index'], - cache: resolve(testdir, 'cache'), - globalPath: resolve(testdir, 'global'), - npxCache: resolve(testdir, 'npxCache'), - path, - runPath: path, - }) - - t.ok(fs.statSync(resolve(path, 'index.js')).isFile(), 'ran create pkg') -}) - -t.test('run from registry - local version mismatch', async t => { - const path = t.testdir({ - cache: {}, - npxCache: {}, - node_modules: { - '@ruyadorno': { - 'create-index': { - 'package.json': JSON.stringify({ - name: '@ruyadorno/create-index', - version: '2.0.0', - }), - }, - }, - }, - 'package.json': JSON.stringify({ - name: 'pkg', - dependencies: { - '@ruyadorno/create-index': '^2.0.0', - }, - }), - }) - const runPath = path - const cache = resolve(path, 'cache') - const npxCache = resolve(path, 'npxCache') - - await libexec({ - ...baseOpts, - args: ['@ruyadorno/create-index@1.0.0'], - cache, - npxCache, - path, - runPath, - }) - - t.ok(fs.statSync(resolve(path, 'index.js')).isFile(), 'ran create pkg from registry') -}) - -t.test('run from registry - local range mismatch', async t => { - const path = t.testdir({ - cache: {}, - npxCache: {}, - node_modules: { - '@ruyadorno': { - 'create-index': { - 'package.json': JSON.stringify({ - name: '@ruyadorno/create-index', - version: '2.0.0', - }), - }, - }, - }, - 'package.json': JSON.stringify({ - name: 'pkg', - dependencies: { - '@ruyadorno/create-index': '^2.0.0', - }, - }), - }) - const runPath = path - const cache = resolve(path, 'cache') - const npxCache = resolve(path, 'npxCache') - - await libexec({ - ...baseOpts, - args: ['@ruyadorno/create-index@^1.0.0'], - cache, - npxCache, - path, - runPath, - }) - - t.ok(fs.statSync(resolve(path, 'index.js')).isFile(), 'ran create pkg from registry') -}) - -t.test('run from registry - local tag mismatch', async t => { - const path = t.testdir({ - cache: {}, - npxCache: {}, - node_modules: { - '@ruyadorno': { - 'create-index': { - 'package.json': JSON.stringify({ - name: '@ruyadorno/create-index', - version: '2.0.0', - }), - }, - }, - '.package-lock.json': JSON.stringify({ - name: 'lock', - lockfileVersion: 3, - requires: true, - packages: { - 'node_modules/@ruyadorno/create-index': { - version: '2.0.0', - resolved: 'https://registry.npmjs.org/@ruyadorno/create-index/-/create-index-2.0.0.tgz', - bin: { - 'create-index': 'create-index.js', - }, - }, - }, - - }), - }, - 'package.json': JSON.stringify({ - name: 'pkg', - dependencies: { - '@ruyadorno/create-index': '^2.0.0', - }, - }), - }) - const runPath = path - const cache = resolve(path, 'cache') - const npxCache = resolve(path, 'npxCache') - - await libexec({ - ...baseOpts, - args: ['@ruyadorno/create-index@latest'], - cache, - npxCache, - path, - runPath, - }) - - t.ok(fs.statSync(resolve(path, 'index.js')).isFile(), 'ran create pkg from registry') -}) - -t.test('avoid install when exec from registry an available pkg', async t => { - const testdir = t.testdir({ - cache: {}, - npxCache: {}, - work: {}, - }) - const path = resolve(testdir, 'work') - const runPath = path - const cache = resolve(testdir, 'cache') - const npxCache = resolve(testdir, 'npxCache') - - t.throws( - () => fs.statSync(resolve(path, 'index.js')), - { code: 'ENOENT' }, - 'should not have template file' - ) - - await libexec({ - ...baseOpts, - args: ['@ruyadorno/create-index'], - cache, - npxCache, - path, - runPath, - }) - - t.ok(fs.statSync(resolve(path, 'index.js')).isFile(), 'ran create pkg') - fs.unlinkSync(resolve(path, 'index.js')) - - await libexec({ - ...baseOpts, - args: ['@ruyadorno/create-index'], - cache, - npxCache, - path, - runPath, - }) - - t.ok(fs.statSync(resolve(path, 'index.js')).isFile(), 'ran create pkg again') -}) - -t.test('run multiple from registry', async t => { - const testdir = t.testdir({ - cache: {}, - npxCache: {}, - work: {}, - }) - const path = resolve(testdir, 'work') - const runPath = path - const cache = resolve(testdir, 'cache') - const npxCache = resolve(testdir, 'npxCache') - - t.throws( - () => fs.statSync(resolve(path, 'index.js')), - { code: 'ENOENT' }, - 'should not have index template file' - ) - - t.throws( - () => fs.statSync(resolve(path, 'test.js')), - { code: 'ENOENT' }, - 'should not have test template file' - ) - - await libexec({ - ...baseOpts, - packages: ['@ruyadorno/create-test', '@ruyadorno/create-index'], - call: 'create-test && create-index', - cache, - npxCache, - path, - runPath, - }) - - t.ok(fs.statSync(resolve(path, 'index.js')).isFile(), 'ran index pkg') - t.ok(fs.statSync(resolve(path, 'test.js')).isFile(), 'ran test pkg') -}) +const { setup } = require('./fixtures/setup.js') t.test('no args', async t => { - const path = t.testdir({}) - const runPath = path - const mockexec = t.mock('../lib/index.js', { - '../lib/run-script': ({ args }) => { - t.ok(args.length === 0, 'should call run-script with no args') - }, - }) - - await mockexec({ - ...baseOpts, - path, - runPath, - }) -}) - -t.test('prompt, accepts', async t => { - const testdir = t.testdir({ - cache: {}, - npxCache: {}, - work: {}, - }) - const path = resolve(testdir, 'work') - const runPath = path - const cache = resolve(testdir, 'cache') - const npxCache = resolve(testdir, 'npxCache') - t.test('with clearProgress function', async t => { - const mockexec = t.mock('../lib/index.js', { - 'ci-info': { isCI: false }, - npmlog: { - clearProgress () { - t.ok(true, 'should call clearProgress function') - }, - disableProgress () {}, - enableProgress () {}, - }, - read (opts, cb) { - cb(null, 'y') - }, - '../lib/no-tty.js': () => false, - }) - - await mockexec({ - ...baseOpts, - args: ['@ruyadorno/create-index'], - cache, - npxCache, - path, - runPath, - yes: undefined, - }) - - const installedDir = resolve(npxCache, - '0e8e15840a234288/node_modules/@ruyadorno/create-index/package.json') - t.ok(fs.statSync(installedDir).isFile(), 'installed required packages') - }) - - t.test('without clearProgress function', async t => { - const mockexec = t.mock('../lib/index.js', { - 'ci-info': { isCI: false }, - read (opts, cb) { - cb(null, 'y') - }, - '../lib/no-tty.js': () => false, - }) - - await mockexec({ - ...baseOpts, - args: ['@ruyadorno/create-index'], - cache, - npxCache, - path, - runPath, - yes: undefined, - }) - - const installedDir = resolve(npxCache, - '0e8e15840a234288/node_modules/@ruyadorno/create-index/package.json') - t.ok(fs.statSync(installedDir).isFile(), 'installed required packages') - }) -}) - -t.test('prompt, refuses', async t => { - const testdir = t.testdir({ - cache: {}, - npxCache: {}, - work: {}, - }) - const path = resolve(testdir, 'work') - const runPath = path - const cache = resolve(testdir, 'cache') - const npxCache = resolve(testdir, 'npxCache') - t.test('with clearProgress function', async t => { - const mockexec = t.mock('../lib/index.js', { - 'ci-info': { isCI: false }, - npmlog: { - clearProgress () { - t.ok(true, 'should call clearProgress function') - }, - disableProgess () {}, - }, - read (opts, cb) { - cb(null, 'n') - }, - '../lib/no-tty.js': () => false, - }) - - await t.rejects( - mockexec({ - ...baseOpts, - args: ['@ruyadorno/create-index'], - cache, - npxCache, - path, - runPath, - yes: undefined, - }), - /canceled/, - 'should throw with canceled error' - ) - - const installedDir = resolve(npxCache, - '0e8e15840a234288/node_modules/@ruyadorno/create-index/package.json') - - t.throws( - () => fs.statSync(installedDir), - { code: 'ENOENT' }, - 'should not have installed required packages' - ) - }) + t.plan(1) - t.test('without clearProgress function', async t => { - const mockexec = t.mock('../lib/index.js', { - 'ci-info': { isCI: false }, - read (opts, cb) { - cb(null, 'n') - }, - '../lib/no-tty.js': () => false, - }) - - await t.rejects( - mockexec({ - ...baseOpts, - args: ['@ruyadorno/create-index'], - cache, - npxCache, - path, - runPath, - yes: undefined, - }), - /canceled/, - 'should throw with canceled error' - ) - - const installedDir = resolve(npxCache, - '0e8e15840a234288/node_modules/@ruyadorno/create-index/package.json') - - t.throws( - () => fs.statSync(installedDir), - { code: 'ENOENT' }, - 'should not have installed required packages' - ) - }) -}) - -t.test('prompt, -n', async t => { - const testdir = t.testdir({ - cache: {}, - npxCache: {}, - work: {}, - }) - const path = resolve(testdir, 'work') - const runPath = path - const cache = resolve(testdir, 'cache') - const npxCache = resolve(testdir, 'npxCache') - - await t.rejects( - libexec({ - ...baseOpts, - args: ['@ruyadorno/create-index'], - cache, - npxCache, - path, - runPath, - yes: false, - }), - /canceled/, - 'should throw with canceled error' - ) - - const installedDir = resolve(npxCache, - '0e8e15840a234288/node_modules/@ruyadorno/create-index/package.json') - - t.throws( - () => fs.statSync(installedDir), - { code: 'ENOENT' }, - 'should not have installed required packages' - ) -}) - -t.test('no prompt if no tty', async t => { - const testdir = t.testdir({ - cache: {}, - npxCache: {}, - work: {}, - }) - const path = resolve(testdir, 'work') - const runPath = path - const cache = resolve(testdir, 'cache') - const npxCache = resolve(testdir, 'npxCache') - const mockexec = t.mock('../lib/index.js', { - '../lib/no-tty.js': () => true, - }) - - await mockexec({ - ...baseOpts, - args: ['@ruyadorno/create-index'], - cache, - npxCache, - path, - runPath, - yes: undefined, - }) - - const installedDir = resolve(npxCache, - '0e8e15840a234288/node_modules/@ruyadorno/create-index/package.json') - t.ok(fs.statSync(installedDir).isFile(), 'installed required packages') -}) - -t.test('no prompt if CI', async t => { - const testdir = t.testdir({ - cache: {}, - npxCache: {}, - work: {}, - }) - const path = resolve(testdir, 'work') - const runPath = path - const cache = resolve(testdir, 'cache') - const npxCache = resolve(testdir, 'npxCache') - const mockexec = t.mock('../lib/index.js', { - 'ci-info': { isCI: true }, - }) - - await mockexec({ - ...baseOpts, - args: ['@ruyadorno/create-index'], - cache, - npxCache, - path, - runPath, - yes: undefined, - }) - - const installedDir = resolve(npxCache, - '0e8e15840a234288/node_modules/@ruyadorno/create-index/package.json') - t.ok(fs.statSync(installedDir).isFile(), 'installed required packages') -}) - -t.test('no prompt if CI, multiple packages', async t => { - const testdir = t.testdir({ - cache: {}, - npxCache: {}, - work: {}, - }) - const path = resolve(testdir, 'work') - const runPath = path - const cache = resolve(testdir, 'cache') - const npxCache = resolve(testdir, 'npxCache') - const mockexec = t.mock('../lib/index.js', { - 'ci-info': { isCI: true }, - 'proc-log': { - warn (title, msg) { - t.equal(title, 'exec', 'should warn exec title') - // this message is nondeterministic as it queries manifests so we just - // test the constituent parts - t.match( - msg, - 'The following packages were not found and will be installed:', - 'should warn installing packages' - ) - t.match(msg, '@ruyadorno/create-index@1.0.0', 'includes package being installed') - t.match(msg, '@ruyadorno/create-test@1.0.0', 'includes package being installed') + const { exec } = setup(t, { + mocks: { + '../../lib/run-script': ({ args }) => { + t.ok(args.length === 0, 'should call run-script with no args') }, }, }) - await mockexec({ - ...baseOpts, - call: 'create-index', - packages: ['@ruyadorno/create-index', '@ruyadorno/create-test'], - cache, - npxCache, - path, - runPath, - yes: undefined, - }) -}) - -t.test('defaults', async t => { - const testdir = t.testdir({ - cache: {}, - npxCache: {}, - work: {}, - }) - const cache = resolve(testdir, 'cache') - const npxCache = resolve(testdir, 'npxCache') - const workdir = resolve(testdir, 'work') - - const cwd = process.cwd() - process.chdir(workdir) - t.teardown(() => { - process.chdir(cwd) - }) - - await libexec({ - args: ['@ruyadorno/create-index'], - cache, - npxCache, - yes: true, - }) - - t.ok(fs.statSync(resolve(workdir, 'index.js')).isFile(), - 'ran create-index pkg') -}) - -t.test('scriptShell default value', t => { - t.test('/bin/sh platforms', t => { - t.plan(1) - const mockexec = t.mock('../lib/index.js', { - '../lib/is-windows.js': false, - '../lib/run-script.js': (opt) => { - t.equal(opt.scriptShell, 'sh', 'should use expected shell value') - }, - }) - mockexec({ args: [], runPath: t.testDirName }) - }) - - t.test('win32 defined ComSpec env var', t => { - t.plan(1) - const comspec = process.env.ComSpec - process.env.ComSpec = 'CMD' - const mockexec = t.mock('../lib/index.js', { - '../lib/is-windows.js': true, - '../lib/run-script.js': ({ scriptShell }) => { - t.equal(scriptShell, 'CMD', 'should use expected ComSpec value') - process.env.ComSpec = comspec - }, - }) - mockexec({ args: [], runPath: t.testDirName }) - }) - - t.test('win32 cmd', t => { - t.plan(1) - const comspec = process.env.ComSpec - process.env.ComSpec = '' - const mockexec = t.mock('../lib/index.js', { - '../lib/is-windows.js': true, - '../lib/run-script.js': ({ scriptShell }) => { - t.equal(scriptShell, 'cmd', 'should use expected cmd default value') - process.env.ComSpec = comspec - }, - }) - mockexec({ args: [], runPath: t.testDirName }) - }) - - t.end() -}) - -t.test('workspaces', async t => { - const pkg = { - name: '@ruyadorno/create-index', - version: '2.0.0', - bin: { - 'create-index': './index.js', - }, - } - const path = t.testdir({ - cache: {}, - npxCache: {}, - node_modules: { - '.bin': {}, - '@ruyadorno': { - 'create-index': { - 'package.json': JSON.stringify(pkg), - 'index.js': `#!/usr/bin/env node - require('fs').writeFileSync('resfile', 'LOCAL PKG')`, - }, - }, - a: t.fixture('symlink', '../a'), - }, - 'package.json': JSON.stringify({ - name: 'project', - workspaces: ['a'], - }), - a: { - 'package.json': JSON.stringify({ - name: 'a', - version: '1.0.0', - dependencies: { - '@ruyadorno/create-index': '^2.0.0', - }, - }), - }, - }) - const runPath = path - const cache = resolve(path, 'cache') - const npxCache = resolve(path, 'npxCache') - - const executable = - resolve(path, 'node_modules/@ruyadorno/create-index/index.js') - fs.chmodSync(executable, 0o775) - - await binLinks({ - path: resolve(path, 'node_modules/@ruyadorno/create-index'), - pkg, - }) - - // runs at the project level - await libexec({ - ...baseOpts, - args: ['create-index'], - localBin: resolve(path, 'node_modules/.bin'), - cache, - npxCache, - path, - runPath, - }) - - const res = fs.readFileSync(resolve(path, 'resfile')).toString() - t.equal(res, 'LOCAL PKG', 'should run existing bin from project level') - - // runs at the child workspace level - await libexec({ - ...baseOpts, - args: ['create-index'], - cache, - npxCache, - localBin: resolve(path, 'a/node_modules/.bin'), - path: resolve(path, 'a'), - runPath: resolve(path, 'a'), - }) - - const wRes = fs.readFileSync(resolve(path, 'a/resfile')).toString() - t.equal(wRes, 'LOCAL PKG', 'should run existing bin from workspace level') + await exec() }) diff -Nru npm-9.1.2~ds1/workspaces/libnpmexec/test/local.js npm-9.2.0~ds1/workspaces/libnpmexec/test/local.js --- npm-9.1.2~ds1/workspaces/libnpmexec/test/local.js 1970-01-01 00:00:00.000000000 +0000 +++ npm-9.2.0~ds1/workspaces/libnpmexec/test/local.js 2022-12-07 23:13:18.000000000 +0000 @@ -0,0 +1,370 @@ +const log = require('proc-log') +const { resolve } = require('path') +const t = require('tap') +const fs = require('fs/promises') +const { resetSeen: resetSeenLinks } = require('bin-links') +const { setup, createPkg, merge } = require('./fixtures/setup.js') + +t.test('bin in local pkg', async t => { + const { pkg, fixtures } = createPkg({ + version: '1.0.0', + name: '@npmcli/local-pkg-bin-test', + bin: { + b: 'does-not-exist.js', + a: 'local-bin-test.js', + 'a-nested': 'bin-dir/nested-bin-test.js', + 'conflicting-bin': 'conflicting-bin-test.js', + }, + files: { + 'local-bin-test.js': { key: 'local-bin', value: 'LOCAL PKG' }, + 'conflicting-bin-test.js': { key: 'conflicting-bin', value: 'LOCAL PKG' }, + 'bin-dir': { + 'nested-bin-test.js': { key: 'nested-bin', value: 'LOCAL PKG' }, + }, + }, + }) + + const existingPkg = createPkg({ + name: 'pkg-with-conflicting-bin', + localVersion: '1.0.0', + bin: { + 'conflicting-bin': 'index.js', + }, + files: { + 'index.js': { key: 'existing-bin', value: 'NODE_MODULES PKG' }, + }, + }) + + const { exec: _exec, chmod, readOutput, binLinks, path } = setup(t, { + pkg, + testdir: merge( + existingPkg.fixtures, + fixtures.packages[`@npmcli-local-pkg-bin-test-1.0.0`], + { + node_modules: { + '@npmcli': { + 'some-other-pkg-with-same-scope': {}, + }, + }, + } + ), + }) + + const localBin = resolve(path, 'node_modules', '.bin') + + await chmod('local-bin-test.js') + await chmod('conflicting-bin-test.js') + await chmod('bin-dir/nested-bin-test.js') + await chmod('node_modules/pkg-with-conflicting-bin/index.js') + + // Note that we have to resetSeenLinks after each exec since otherwise + // our non-existent file will fail when it gets attempted to get chmod'ed + // in a real world situation these would happen during different + // processes where these is no shared cache + const exec = async (...args) => { + await _exec(...args) + resetSeenLinks() + } + + await exec({ localBin, args: ['a', 'argument-a'] }) + t.match(await readOutput('local-bin'), { + value: 'LOCAL PKG', + args: ['argument-a'], + }) + t.strictSame(await fs.readdir(resolve(path, 'node_modules', '.bin')), []) + + await exec({ localBin, args: ['a-nested', 'argument-a-nested'] }) + t.strictSame(await fs.readdir(resolve(path, 'node_modules', '.bin')), []) + t.match(await readOutput('nested-bin'), { + value: 'LOCAL PKG', + args: ['argument-a-nested'], + }) + + // now link a bin which will conflict with the one we try to run next + await binLinks(existingPkg.pkg) + + t.match(await fs.readdir(resolve(path, 'node_modules', '.bin')), ['conflicting-bin']) + await exec({ localBin, args: ['conflicting-bin'] }) + // local bin was called for conflicting-bin + t.match(await readOutput('conflicting-bin'), { + value: 'LOCAL PKG', + }) + + await t.rejects(() => exec({ localBin, args: ['b'] }), /command failed/) +}) + +t.test('locally available pkg - by scoped name only', async t => { + const { pkg, fixtures } = createPkg({ + name: '@npmcli/npx-local-test', + localVersion: '2.0.0', + }) + + const { exec, chmod, binLinks, readOutput } = setup(t, { + pkg, + testdir: fixtures, + }) + + await chmod() + await binLinks() + await exec({ args: ['@npmcli/npx-local-test', 'arg'] }) + + t.match(await readOutput(), { + value: 'local-2.0.0', + args: ['arg'], + }) +}) + +t.test('locally available pkg - by name', async t => { + const { pkg, fixtures } = createPkg({ + name: '@npmcli/create-index', + localVersion: '2.0.0', + }) + + const { chmod, binLinks, exec, readOutput } = setup(t, { + pkg, + testdir: fixtures, + }) + + await chmod() + await binLinks() + await exec({ + packages: ['@npmcli/create-index'], + call: 'create-index arg', + }) + + t.match(await readOutput(), { + value: 'local-2.0.0', + args: ['arg'], + }) +}) + +t.test('locally available pkg - by version', async t => { + const { pkg, fixtures } = createPkg({ + name: '@npmcli/create-index', + localVersion: '1.0.0', + }) + const { chmod, binLinks, exec, readOutput } = setup(t, { + pkg, + testdir: fixtures, + }) + + await chmod() + await binLinks() + await exec({ args: ['@npmcli/create-index@1.0.0'] }) + + t.match(await readOutput(), { + value: 'local-1.0.0', + args: [], + }) +}) + +t.test('locally available pkg - by range', async t => { + const { pkg, fixtures } = createPkg({ + name: '@npmcli/create-index', + localVersion: '2.0.0', + }) + const { chmod, binLinks, exec, readOutput } = setup(t, { + pkg, + testdir: fixtures, + }) + + await chmod() + await binLinks() + await exec({ + packages: ['@npmcli/create-index@^2.0.0'], + call: 'create-index resfile', + }) + + t.match(await readOutput(), { + value: 'local-2.0.0', + args: ['resfile'], + }) +}) + +t.test('locally available pkg - by latest tag', async t => { + const { pkg, fixtures, package } = createPkg({ + name: '@npmcli/create-index', + localVersion: '1.0.0', + }) + const { chmod, binLinks, exec, readOutput, registry, path } = setup(t, { + pkg, + testdir: merge(fixtures, { + node_modules: { + '.package-lock.json': { + name: 'lock', + lockfileVersion: 3, + requires: true, + packages: { + [`node_modules/${pkg.name}`]: { + ...pkg, + resolved: `{REGISTRY}/${pkg.name}/-/create-index-${pkg.version}.tgz`, + }, + }, + }, + }, + }), + }) + + // latest forces the manifest to be fetched + await package({ registry, path, times: 1, tarballs: [] }) + + await chmod() + await binLinks() + await exec({ + packages: ['@npmcli/create-index@latest'], + call: 'create-index resfile', + }) + + t.match(await readOutput(), { + value: 'local-1.0.0', + args: ['resfile'], + }) +}) + +t.test('multiple local pkgs', async t => { + const pkgFoo = createPkg({ + name: '@npmcli/create-foo', + localVersion: '2.0.0', + }) + + const pkgBar = createPkg({ + name: '@npmcli/create-bar', + localVersion: '1.0.0', + }) + + const { readOutput, chmod, exec, binLinks } = setup(t, { + pkg: [pkgFoo.pkg, pkgBar.pkg], + testdir: merge(pkgFoo.fixtures, pkgBar.fixtures), + }) + + await chmod() + await binLinks() + + await exec({ + packages: ['@npmcli/create-foo', '@npmcli/create-bar'], + call: 'create-foo resfile && create-bar bar', + }) + + t.match(await readOutput('@npmcli-create-foo'), { + value: 'local-2.0.0', + args: ['resfile'], + }) + t.match(await readOutput('@npmcli-create-bar'), { + value: 'local-1.0.0', + args: ['bar'], + }) +}) + +t.test('no npxCache', async t => { + const { chmod, exec, path } = setup(t, { + testdir: { + npxCache: null, + a: { + 'package.json': { + name: 'a', + bin: { + a: './index.js', + }, + }, + 'index.js': { key: 'a', value: 'LOCAL PKG' }, + }, + }, + }) + + await chmod('a/index.js') + + await t.rejects(() => exec({ + args: [`file:${resolve(path, 'a')}`, 'resfile'], + }), /Must provide a valid npxCache path/) +}) + +t.test('local file system path', async t => { + const { exec, chmod, readOutput, path } = setup(t, { + mocks: { + 'ci-info': { isCI: true }, + 'proc-log': { + ...log, + warn () { + t.fail('should not warn about local file package install') + }, + }, + }, + testdir: { + a: { + 'package.json': { + name: 'a', + bin: { + a: './index.js', + }, + }, + 'index.js': { key: 'a', value: 'LOCAL PKG' }, + }, + }, + }) + + await chmod('a/index.js') + + await exec({ + args: [`file:${resolve(path, 'a')}`, 'resfile'], + + }) + + t.match(await readOutput('a'), { + value: 'LOCAL PKG', + args: ['resfile'], + }) +}) + +t.test('global space pkg', async t => { + const { pkg, fixtures } = createPkg({ + name: 'a', + localVersion: '1.0.0', + }) + + const { exec, chmod, readOutput, binLinks } = setup(t, { + pkg, + global: true, + testdir: fixtures, + }) + + await chmod() + await binLinks() + + await exec({ + args: ['a', 'resfile'], + }) + + t.match(await readOutput(), { + value: 'local-1.0.0', + args: [], + created: 'global/node_modules/a/bin-file.js', + }) +}) + +t.test('global scoped pkg', async t => { + const { pkg, fixtures, package } = createPkg({ + localVersion: '1.0.0', + name: '@npmcli/create-test', + }) + + const { chmod, exec, readOutput, binLinks, registry, path } = setup(t, { + pkg, + global: true, + testdir: fixtures, + }) + + await chmod() + await binLinks() + + await package({ registry, path, times: 1, tarballs: [] }) + + await exec({ + args: ['@npmcli/create-test', 'resfile'], + }) + + t.match(await readOutput(), { + value: 'local-1.0.0', + args: ['resfile'], + created: 'global/node_modules/@npmcli/create-test/bin-file.js', + }) +}) diff -Nru npm-9.1.2~ds1/workspaces/libnpmexec/test/prompt.js npm-9.2.0~ds1/workspaces/libnpmexec/test/prompt.js --- npm-9.1.2~ds1/workspaces/libnpmexec/test/prompt.js 1970-01-01 00:00:00.000000000 +0000 +++ npm-9.2.0~ds1/workspaces/libnpmexec/test/prompt.js 2022-12-07 23:13:18.000000000 +0000 @@ -0,0 +1,384 @@ +const log = require('proc-log') +const { resolve } = require('path') +const t = require('tap') +const fs = require('fs/promises') +const { setup, createPkg, merge } = require('./fixtures/setup.js') + +t.test('prompt, accepts', async t => { + t.test('with clearProgress function', async t => { + const { pkg, package, fixtures } = createPkg({ + name: '@npmcli/create-index', + version: '1.0.0', + }) + const { exec, path, registry } = setup(t, { + testdir: fixtures, + mocks: { + 'ci-info': { isCI: false }, + '../../lib/no-tty.js': () => false, + npmlog: { + clearProgress () { + t.ok(true, 'should call clearProgress function') + }, + disableProgress () {}, + enableProgress () {}, + }, + read (_, cb) { + cb(null, 'y') + }, + }, + }) + + await package({ registry, path }) + + await exec({ + args: ['@npmcli/create-index'], + yes: undefined, + }) + + const installedDir = `npxCache/e7ce50d8d2d8ec11/node_modules/${pkg.name}/package.json` + t.ok(await fs.stat(resolve(path, installedDir)).then(f => f.isFile())) + }) + + t.test('without clearProgress function', async t => { + const { pkg, package, fixtures } = createPkg({ + name: '@npmcli/create-index', + version: '1.0.0', + }) + const { exec, path, registry } = setup(t, { + testdir: fixtures, + mocks: { + 'ci-info': { isCI: false }, + '../../lib/no-tty.js': () => false, + read (_, cb) { + cb(null, 'y') + }, + }, + }) + + await package({ registry, path }) + + await exec({ + args: ['@npmcli/create-index'], + yes: undefined, + }) + + const installedDir = `npxCache/e7ce50d8d2d8ec11/node_modules/${pkg.name}/package.json` + t.ok(await fs.stat(resolve(path, installedDir)).then(f => f.isFile())) + }) +}) + +t.test('prompt, refuses', async t => { + t.test('with clearProgress function', async t => { + t.plan(3) + + const { pkg, package, fixtures } = createPkg({ + name: '@npmcli/create-index', + version: '1.0.0', + }) + const { exec, path, registry } = setup(t, { + testdir: fixtures, + mocks: { + 'ci-info': { isCI: false }, + npmlog: { + clearProgress () { + t.ok(true, 'should call clearProgress function') + }, + disableProgess () {}, + }, + read (_, cb) { + cb(null, 'n') + }, + '../../lib/no-tty.js': () => false, + }, + }) + + await package({ registry, path, times: 1, tarballs: [] }) + + await t.rejects( + exec({ + args: ['@npmcli/create-index'], + yes: undefined, + }), + /canceled/, + 'should throw with canceled error' + ) + + const installedDir = `npxCache/e7ce50d8d2d8ec11/node_modules/${pkg.name}/package.json` + t.rejects( + () => fs.stat(resolve(path, installedDir)), + { code: 'ENOENT' } + ) + }) + + t.test('without clearProgress function', async t => { + const { pkg, package, fixtures } = createPkg({ + name: '@npmcli/create-index', + version: '1.0.0', + }) + const { exec, path, registry } = setup(t, { + testdir: fixtures, + mocks: { + 'ci-info': { isCI: false }, + read (_, cb) { + cb(null, 'n') + }, + '../../lib/no-tty.js': () => false, + }, + }) + + await package({ registry, path, times: 1, tarballs: [] }) + + await t.rejects( + exec({ + args: ['@npmcli/create-index'], + yes: undefined, + }), + /canceled/, + 'should throw with canceled error' + ) + + const installedDir = `npxCache/e7ce50d8d2d8ec11/node_modules/${pkg.name}/package.json` + t.rejects( + () => fs.stat(resolve(path, installedDir)), + { code: 'ENOENT' } + ) + }) +}) + +t.test('prompt, -n', async t => { + const { pkg, package, fixtures } = createPkg({ + name: '@npmcli/create-index', + version: '1.0.0', + }) + const { exec, path, registry } = setup(t, { + testdir: fixtures, + }) + + await package({ registry, path, times: 1, tarballs: [] }) + + await t.rejects( + exec({ + args: ['@npmcli/create-index'], + yes: false, + }), + /canceled/, + 'should throw with canceled error' + ) + + const installedDir = `npxCache/e7ce50d8d2d8ec11/node_modules/${pkg.name}/package.json` + t.rejects( + () => fs.stat(resolve(path, installedDir)), + { code: 'ENOENT' } + ) +}) + +t.test('no prompt if no tty', async t => { + const { pkg, package, fixtures } = createPkg({ + name: '@npmcli/create-index', + version: '1.0.0', + }) + const { exec, path, registry } = setup(t, { + testdir: fixtures, + mocks: { '../../lib/no-tty.js': () => true }, + }) + + await package({ registry, path }) + + await exec({ + args: ['@npmcli/create-index'], + yes: undefined, + }) + + const installedDir = `npxCache/e7ce50d8d2d8ec11/node_modules/${pkg.name}/package.json` + t.ok(await fs.stat(resolve(path, installedDir)).then(f => f.isFile())) +}) + +t.test('no prompt if CI', async t => { + const { pkg, package, fixtures } = createPkg({ + name: '@npmcli/create-index', + version: '1.0.0', + }) + const { exec, path, registry } = setup(t, { + testdir: fixtures, + mocks: { 'ci-info': { isCI: true } }, + }) + + await package({ registry, path }) + + await exec({ + args: ['@npmcli/create-index'], + yes: undefined, + }) + + const installedDir = `npxCache/e7ce50d8d2d8ec11/node_modules/${pkg.name}/package.json` + t.ok(await fs.stat(resolve(path, installedDir)).then(f => f.isFile())) +}) + +t.test('no prompt if CI, multiple packages', async t => { + t.plan(4) + + const pkgIndex = createPkg({ + name: '@npmcli/create-index', + version: '1.0.0', + }) + const pkgTest = createPkg({ + name: '@npmcli/create-test', + version: '1.0.0', + }) + const { exec, path, registry } = setup(t, { + testdir: merge(pkgIndex.fixtures, pkgTest.fixtures), + mocks: { + 'ci-info': { isCI: true }, + 'proc-log': { + ...log, + warn (title, msg) { + t.equal(title, 'exec', 'should warn exec title') + // this message is nondeterministic as it queries manifests so we just + // test the constituent parts + t.match( + msg, + 'The following packages were not found and will be installed:', + 'should warn installing packages' + ) + t.match(msg, '@npmcli/create-index@1.0.0', 'includes package being installed') + t.match(msg, '@npmcli/create-test@1.0.0', 'includes package being installed') + }, + }, + }, + }) + + await pkgIndex.package({ path, registry }) + await pkgTest.package({ path, registry }) + + await exec({ + call: 'create-index', + packages: ['@npmcli/create-index', '@npmcli/create-test'], + yes: undefined, + }) +}) + +t.test('defaults', async t => { + const { pkg, fixtures, package } = createPkg({ + name: '@npmcli/create-index', + version: '1.0.0', + }) + const { exec, path, registry, readOutput } = setup(t, { + pkg, + defaults: false, + execPath: '../../../lib/index.js', + testdir: { + ...fixtures, + work: {}, + }, + }) + + const workDir = resolve(path, 'work') + const cwd = process.cwd() + process.chdir(workDir) + t.teardown(() => process.chdir(cwd)) + + await package({ registry, path }) + + await exec({ + args: ['@npmcli/create-index'], + yes: true, + }) + + t.match(await readOutput('', { root: workDir }), { + value: 'packages-1.0.0', + args: [], + }) +}) + +t.test('scriptShell default value', async t => { + await t.test('/bin/sh platforms', async t => { + t.plan(1) + const mockexec = t.mock('../lib/index.js', { + '../lib/is-windows.js': false, + '../lib/run-script.js': (opt) => { + t.equal(opt.scriptShell, 'sh', 'should use expected shell value') + }, + }) + await mockexec({ args: [], runPath: t.testDirName }) + }) + + await t.test('win32 defined ComSpec env var', async t => { + t.plan(1) + const comspec = process.env.ComSpec + process.env.ComSpec = 'CMD' + const mockexec = t.mock('../lib/index.js', { + '../lib/is-windows.js': true, + '../lib/run-script.js': ({ scriptShell }) => { + t.equal(scriptShell, 'CMD', 'should use expected ComSpec value') + process.env.ComSpec = comspec + }, + }) + await mockexec({ args: [], runPath: t.testDirName }) + }) + + await t.test('win32 cmd', async t => { + t.plan(1) + const comspec = process.env.ComSpec + process.env.ComSpec = '' + const mockexec = t.mock('../lib/index.js', { + '../lib/is-windows.js': true, + '../lib/run-script.js': ({ scriptShell }) => { + t.equal(scriptShell, 'cmd', 'should use expected cmd default value') + process.env.ComSpec = comspec + }, + }) + await mockexec({ args: [], runPath: t.testDirName }) + }) +}) + +t.test('workspaces', async t => { + const { pkg, fixtures } = createPkg({ + name: '@npmcli/create-index', + localVersion: '2.0.0', + }) + + const { path, exec, chmod, binLinks, readOutput } = setup(t, { + pkg, + testdir: merge(fixtures, { + 'package.json': { + workspaces: ['a'], + dependencies: null, + }, + a: { + 'package.json': { + name: 'a', + version: '1.0.0', + dependencies: fixtures['package.json'].dependencies, + }, + }, + node_modules: { + a: t.fixture('symlink', '../a'), + }, + }), + }) + + await chmod() + await binLinks() + + // runs at the project level + await exec({ + args: ['create-index'], + localBin: resolve(path, 'node_modules/.bin'), + }) + + t.match(await readOutput(), { + value: 'local-2.0.0', + }) + + // runs at the child workspace level + await exec({ + args: ['create-index'], + localBin: resolve(path, 'a/node_modules/.bin'), + path: resolve(path, 'a'), + runPath: resolve(path, 'a'), + }) + + t.match(await readOutput('', { root: resolve(path, 'a') }), { + value: 'local-2.0.0', + }) +}) Binary files /tmp/tmp43gm7mng/vBAia6DgzR/npm-9.1.2~ds1/workspaces/libnpmexec/test/registry/content/ruyadorno/create-index/-/create-index-1.0.0.tgz and /tmp/tmp43gm7mng/ShmCSY3pG3/npm-9.2.0~ds1/workspaces/libnpmexec/test/registry/content/ruyadorno/create-index/-/create-index-1.0.0.tgz differ diff -Nru npm-9.1.2~ds1/workspaces/libnpmexec/test/registry/content/ruyadorno/create-index.json npm-9.2.0~ds1/workspaces/libnpmexec/test/registry/content/ruyadorno/create-index.json --- npm-9.1.2~ds1/workspaces/libnpmexec/test/registry/content/ruyadorno/create-index.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/workspaces/libnpmexec/test/registry/content/ruyadorno/create-index.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,81 +0,0 @@ -{ - "_id": "@ruyadorno/create-index", - "name": "@ruyadorno/create-index", - "dist-tags": { - "latest": "1.0.0" - }, - "versions": { - "1.0.0": { - "name": "@ruyadorno/create-index", - "version": "1.0.0", - "description": "Create an empty index.js file", - "bin": { - "create-index": "create-index.js" - }, - "keywords": [ - "init", - "create", - "index" - ], - "author": { - "name": "Ruy Adorno", - "url": "https://ruyadorno.com" - }, - "license": "MIT", - "gitHead": "0c1b6a4c503d8565439b2b194b4691824a1bc902", - "_id": "@ruyadorno/create-index@1.0.0", - "_nodeVersion": "15.13.0", - "_npmVersion": "7.9.0", - "dist": { - "integrity": "sha512-2T2JRYWtB9/wN8Vr/SRDcjIbKD5IjR5joO8iCCCYjXfDRZ2lYBSnZQ2kGp34F+T8OEavzJfj9sxNt9Y7QT7Oaw==", - "shasum": "a7d15d2ca78c496685b7b2bc24599d4e0983783c", - "tarball": "https://registry.npmjs.org/@ruyadorno/create-index/-/create-index-1.0.0.tgz", - "fileCount": 3, - "unpackedSize": 565, - "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgd0fRCRA9TVsSAnZWagAA9ysP/i22HySX0+RYcHUldWcv\neDgd24/wQqNEsQiTrGpIRSSorqbrC5+xoZfFzbvbUA24JaFChgQE1rRtYDab\ntjo5asfUqCspru1X05D3T3lmy3NyBCShqzwsZo88stj8L1w8DcnmU83als4h\n6DqxmwQbPMn+hd5gKtr6ZsUwHZRc/9dXWjn6GI3ztAla73RKXQ4D9Gs/ULyo\nNwS6a/CqThqu4atlA6ZGXum72XsFYSRB712N3Q1l0+8T9L3lAWuitGx/K8L/\n95gxU0e6ME+Wiin62SxH6QYWuVIKD04UNkz14dzfI2RIjT2NDbX6l308uSza\nbWz6aro4w9kUJviDX/hk/o469d+EQ87L+vpFrLDbSfZg8RtvSptHCDdM6mNw\n05xNFji33ujMX54HyGxplioAgnE5X2ZTQuBymsiINHq5gxCn8MSaUxiX45yB\n7Bhf1rWbp5KgiUa0kGXV4eoAutP6HWs1avzkHi9q2xS61wMBdPPHX5GsTTqe\nI+4mdgpNOdQLQjLyCp+ydvSqTHtVHkHDrBJzgkOjDWC7YzDcbzFQt6Fn6uc/\nA4kTlU1yTD2lPz9ICNI6BwqM7aOa9qCVkBL7vWaUUpxblRpzfbKmCtEi704h\nIJ6YZ3z6xwTl59aMXiInOLFsb7upEwtTXTAWqDlsJmTYS7hsVi3gY7wqYp1p\nMwwm\r\n=rrJ8\r\n-----END PGP SIGNATURE-----\r\n" - }, - "_npmUser": { - "name": "ruyadorno", - "email": "ruyadorno@hotmail.com" - }, - "directories": {}, - "maintainers": [ - { - "name": "ruyadorno", - "email": "ruyadorno@hotmail.com" - } - ], - "_npmOperationalInternal": { - "host": "s3://npm-registry-packages", - "tmp": "tmp/create-index_1.0.0_1618429905498_0.11104270815832784" - }, - "_hasShrinkwrap": false - } - }, - "time": { - "created": "2021-04-14T19:51:45.442Z", - "1.0.0": "2021-04-14T19:51:45.650Z", - "modified": "2021-04-14T19:51:47.833Z" - }, - "maintainers": [ - { - "name": "ruyadorno", - "email": "ruyadorno@hotmail.com" - } - ], - "description": "Create an empty index.js file", - "keywords": [ - "init", - "create", - "index" - ], - "author": { - "name": "Ruy Adorno", - "url": "https://ruyadorno.com" - }, - "license": "MIT", - "readme": "# create-index\n\nPuts an empty `index.js` into current working dir. Meant for testing only.\n\n## Usage\n\n`npm exec @ruyadorno/create-index`\n\n", - "readmeFilename": "README.md", - "_cached": false, - "_contentLength": 0 -} diff -Nru npm-9.1.2~ds1/workspaces/libnpmexec/test/registry/content/ruyadorno/create-index.min.json npm-9.2.0~ds1/workspaces/libnpmexec/test/registry/content/ruyadorno/create-index.min.json --- npm-9.1.2~ds1/workspaces/libnpmexec/test/registry/content/ruyadorno/create-index.min.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/workspaces/libnpmexec/test/registry/content/ruyadorno/create-index.min.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ -{ - "name": "@ruyadorno/create-index", - "dist-tags": { - "latest": "1.0.0" - }, - "versions": { - "1.0.0": { - "name": "@ruyadorno/create-index", - "version": "1.0.0", - "bin": { - "create-index": "create-index.js" - }, - "dist": { - "integrity": "sha512-2T2JRYWtB9/wN8Vr/SRDcjIbKD5IjR5joO8iCCCYjXfDRZ2lYBSnZQ2kGp34F+T8OEavzJfj9sxNt9Y7QT7Oaw==", - "shasum": "a7d15d2ca78c496685b7b2bc24599d4e0983783c", - "tarball": "https://registry.npmjs.org/@ruyadorno/create-index/-/create-index-1.0.0.tgz", - "fileCount": 3, - "unpackedSize": 565, - "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgd0fRCRA9TVsSAnZWagAA9ysP/i22HySX0+RYcHUldWcv\neDgd24/wQqNEsQiTrGpIRSSorqbrC5+xoZfFzbvbUA24JaFChgQE1rRtYDab\ntjo5asfUqCspru1X05D3T3lmy3NyBCShqzwsZo88stj8L1w8DcnmU83als4h\n6DqxmwQbPMn+hd5gKtr6ZsUwHZRc/9dXWjn6GI3ztAla73RKXQ4D9Gs/ULyo\nNwS6a/CqThqu4atlA6ZGXum72XsFYSRB712N3Q1l0+8T9L3lAWuitGx/K8L/\n95gxU0e6ME+Wiin62SxH6QYWuVIKD04UNkz14dzfI2RIjT2NDbX6l308uSza\nbWz6aro4w9kUJviDX/hk/o469d+EQ87L+vpFrLDbSfZg8RtvSptHCDdM6mNw\n05xNFji33ujMX54HyGxplioAgnE5X2ZTQuBymsiINHq5gxCn8MSaUxiX45yB\n7Bhf1rWbp5KgiUa0kGXV4eoAutP6HWs1avzkHi9q2xS61wMBdPPHX5GsTTqe\nI+4mdgpNOdQLQjLyCp+ydvSqTHtVHkHDrBJzgkOjDWC7YzDcbzFQt6Fn6uc/\nA4kTlU1yTD2lPz9ICNI6BwqM7aOa9qCVkBL7vWaUUpxblRpzfbKmCtEi704h\nIJ6YZ3z6xwTl59aMXiInOLFsb7upEwtTXTAWqDlsJmTYS7hsVi3gY7wqYp1p\nMwwm\r\n=rrJ8\r\n-----END PGP SIGNATURE-----\r\n" - } - } - }, - "modified": "2021-04-14T19:51:47.833Z", - "_cached": false, - "_contentLength": 1423 -} \ No newline at end of file Binary files /tmp/tmp43gm7mng/vBAia6DgzR/npm-9.1.2~ds1/workspaces/libnpmexec/test/registry/content/ruyadorno/create-test/-/create-test-1.0.0.tgz and /tmp/tmp43gm7mng/ShmCSY3pG3/npm-9.2.0~ds1/workspaces/libnpmexec/test/registry/content/ruyadorno/create-test/-/create-test-1.0.0.tgz differ diff -Nru npm-9.1.2~ds1/workspaces/libnpmexec/test/registry/content/ruyadorno/create-test.json npm-9.2.0~ds1/workspaces/libnpmexec/test/registry/content/ruyadorno/create-test.json --- npm-9.1.2~ds1/workspaces/libnpmexec/test/registry/content/ruyadorno/create-test.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/workspaces/libnpmexec/test/registry/content/ruyadorno/create-test.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,81 +0,0 @@ -{ - "_id": "@ruyadorno/create-test", - "name": "@ruyadorno/create-test", - "dist-tags": { - "latest": "1.0.0" - }, - "versions": { - "1.0.0": { - "name": "@ruyadorno/create-test", - "version": "1.0.0", - "description": "Creates an empty test.js file", - "bin": { - "create-test": "create-test.js" - }, - "keywords": [ - "init", - "create", - "test" - ], - "author": { - "name": "Ruy Adorno", - "url": "https://ruyadorno.com" - }, - "license": "MIT", - "gitHead": "707aa293e34f48dcf9cb6b4b452cb1fc8e484c8b", - "_id": "@ruyadorno/create-test@1.0.0", - "_nodeVersion": "15.13.0", - "_npmVersion": "7.9.0", - "dist": { - "integrity": "sha512-WOifELHCU8nmg0yHsPbSETPaNO1orDPhTSflJsomqGFNwVS44qvkWwMPbDE3L2aAglXLf5AxUznyFkxsXgDF2w==", - "shasum": "f0f393449fe5205c54a4ca2181d8355d2372da93", - "tarball": "https://registry.npmjs.org/@ruyadorno/create-test/-/create-test-1.0.0.tgz", - "fileCount": 3, - "unpackedSize": 557, - "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgd1SICRA9TVsSAnZWagAAOa4P/jknjgmFaBWz6PCng8qV\nsdfa23GbE4MdmvpB72v6DvNjGQ+51Vgd7PBAJRo+d3LmQ0c2DE/e6PZEgam/\nOtuVbgimxPy85V1MTA66bgML4nFtEOKS/R/Z5s7wMMCrhYqKdMp6ELMUEO07\n7cDIzAmc7WeSLyzhTBC661T0nKPPAf2nKKYXLI+6RisQoXnEgZmgNyNlIt6D\nNDNTRZjaR6s1QvHgWN9h/hLAgKvgaAnSy+JOzcB+SGaClLow3svbvW+klQpA\n8afOTLV4D/pgPDGXvvwDDInH6yccYSOSNiAZgd45hsmo82xIR3n+Cod2qk9Y\njCye36nXzdQTz9A7a3SgH++DV7fA5n87GoahkpGEnKu8gjgMuE6ncDEypbTi\nM4R8JikZrScR2wWXtO+jK4f/5XHVh19ZpqdOrlxzXutkUy0/bMoHFNxcGrXB\n5D1Qk/lOpNO4rd0NoURk6OkpueHOlBHlBNxqrEsltzY2IWs+JICcFaz385H0\nKYyNQrmltEqWVgW+LeFvm3B1sLL5wySqplX/396lC6kCHZyofeeqZFcC1G+m\ntkp0iho63tlm6WjIzw6ddHWu8olNohCk4xFpvNkkZ0u9GR4BaDBRXS60AcoD\nNIYwMuUlqmXAc7ey+xNZCqXokgbtjD7aI2uIDLNUMHELxrRzBccHe76sIQit\nBeBy\r\n=u7P4\r\n-----END PGP SIGNATURE-----\r\n" - }, - "_npmUser": { - "name": "ruyadorno", - "email": "ruyadorno@hotmail.com" - }, - "directories": {}, - "maintainers": [ - { - "name": "ruyadorno", - "email": "ruyadorno@hotmail.com" - } - ], - "_npmOperationalInternal": { - "host": "s3://npm-registry-packages", - "tmp": "tmp/create-test_1.0.0_1618433159830_0.5969279363908722" - }, - "_hasShrinkwrap": false - } - }, - "time": { - "created": "2021-04-14T20:45:59.789Z", - "1.0.0": "2021-04-14T20:45:59.974Z", - "modified": "2021-04-14T20:46:02.139Z" - }, - "maintainers": [ - { - "name": "ruyadorno", - "email": "ruyadorno@hotmail.com" - } - ], - "description": "Creates an empty test.js file", - "keywords": [ - "init", - "create", - "test" - ], - "author": { - "name": "Ruy Adorno", - "url": "https://ruyadorno.com" - }, - "license": "MIT", - "readme": "# create-test\n\nPuts an empty `test.js` into current working dir. Meant for testing only.\n\n## Usage\n\n`npm exec @ruyadorno/create-test`\n\n", - "readmeFilename": "README.md", - "_cached": false, - "_contentLength": 0 -} \ No newline at end of file diff -Nru npm-9.1.2~ds1/workspaces/libnpmexec/test/registry/content/ruyadorno/create-test.min.json npm-9.2.0~ds1/workspaces/libnpmexec/test/registry/content/ruyadorno/create-test.min.json --- npm-9.1.2~ds1/workspaces/libnpmexec/test/registry/content/ruyadorno/create-test.min.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/workspaces/libnpmexec/test/registry/content/ruyadorno/create-test.min.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ -{ - "name": "@ruyadorno/create-test", - "dist-tags": { - "latest": "1.0.0" - }, - "versions": { - "1.0.0": { - "name": "@ruyadorno/create-test", - "version": "1.0.0", - "bin": { - "create-test": "create-test.js" - }, - "dist": { - "integrity": "sha512-WOifELHCU8nmg0yHsPbSETPaNO1orDPhTSflJsomqGFNwVS44qvkWwMPbDE3L2aAglXLf5AxUznyFkxsXgDF2w==", - "shasum": "f0f393449fe5205c54a4ca2181d8355d2372da93", - "tarball": "https://registry.npmjs.org/@ruyadorno/create-test/-/create-test-1.0.0.tgz", - "fileCount": 3, - "unpackedSize": 557, - "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgd1SICRA9TVsSAnZWagAAOa4P/jknjgmFaBWz6PCng8qV\nsdfa23GbE4MdmvpB72v6DvNjGQ+51Vgd7PBAJRo+d3LmQ0c2DE/e6PZEgam/\nOtuVbgimxPy85V1MTA66bgML4nFtEOKS/R/Z5s7wMMCrhYqKdMp6ELMUEO07\n7cDIzAmc7WeSLyzhTBC661T0nKPPAf2nKKYXLI+6RisQoXnEgZmgNyNlIt6D\nNDNTRZjaR6s1QvHgWN9h/hLAgKvgaAnSy+JOzcB+SGaClLow3svbvW+klQpA\n8afOTLV4D/pgPDGXvvwDDInH6yccYSOSNiAZgd45hsmo82xIR3n+Cod2qk9Y\njCye36nXzdQTz9A7a3SgH++DV7fA5n87GoahkpGEnKu8gjgMuE6ncDEypbTi\nM4R8JikZrScR2wWXtO+jK4f/5XHVh19ZpqdOrlxzXutkUy0/bMoHFNxcGrXB\n5D1Qk/lOpNO4rd0NoURk6OkpueHOlBHlBNxqrEsltzY2IWs+JICcFaz385H0\nKYyNQrmltEqWVgW+LeFvm3B1sLL5wySqplX/396lC6kCHZyofeeqZFcC1G+m\ntkp0iho63tlm6WjIzw6ddHWu8olNohCk4xFpvNkkZ0u9GR4BaDBRXS60AcoD\nNIYwMuUlqmXAc7ey+xNZCqXokgbtjD7aI2uIDLNUMHELxrRzBccHe76sIQit\nBeBy\r\n=u7P4\r\n-----END PGP SIGNATURE-----\r\n" - } - } - }, - "modified": "2021-04-14T20:46:02.139Z", - "_cached": false, - "_contentLength": 1417 -} \ No newline at end of file diff -Nru npm-9.1.2~ds1/workspaces/libnpmexec/test/registry/server.js npm-9.2.0~ds1/workspaces/libnpmexec/test/registry/server.js --- npm-9.1.2~ds1/workspaces/libnpmexec/test/registry/server.js 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/workspaces/libnpmexec/test/registry/server.js 1970-01-01 00:00:00.000000000 +0000 @@ -1,280 +0,0 @@ -const { join, dirname } = require('path') -const { existsSync, readFileSync, writeFileSync } = require('fs') -const PORT = 12345 + (+process.env.TAP_CHILD_ID || 0) -const http = require('http') -const https = require('https') - -const mkdirp = require('mkdirp') -const doProxy = process.env.ARBORIST_TEST_PROXY -const missing = /\/@isaacs(\/|%2[fF])(this-does-not-exist-at-all|testing-missing-tgz\/-\/)/ -const corgiDoc = 'application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*' -const { gzipSync, unzipSync } = require('zlib') - -let advisoryBulkResponse = null -let failAdvisoryBulk = false -let auditResponse = null -let failAudit = false -const startServer = cb => { - const server = module.exports.server = http.createServer((req, res) => { - res.setHeader('connection', 'close') - - if (req.url === '/-/npm/v1/security/advisories/bulk') { - const body = [] - req.on('data', c => body.push(c)) - req.on('end', () => { - res.setHeader('connection', 'close') - if (failAdvisoryBulk) { - res.statusCode = 503 - return res.end('no advisory bulk for you') - } - if (!advisoryBulkResponse) { - if (auditResponse && !failAudit) { - // simulate what the registry does when quick audits are allowed, - // but advisory bulk requests are not - res.statusCode = 405 - return res.end(JSON.stringify({ - code: 'MethodNotAllowedError', - message: 'POST is not allowed', - })) - } else { - res.statusCode = 404 - return res.end('not found') - } - } - if (doProxy && !existsSync(advisoryBulkResponse)) { - // hit the main registry, then fall back to staging for now - // XXX: remove this when bulk advisory endpoint pushed to production! - const opts = { - host: 'registry.npmjs.org', - method: req.method, - path: req.url, - headers: { - ...req.headers, - accept: '*', - host: 'registry.npmjs.org', - connection: 'close', - 'if-none-match': '', - }, - } - const handleUpstream = upstream => { - res.statusCode = upstream.statusCode - if (upstream.statusCode >= 300 || upstream.statusCode < 200) { - console.error('UPSTREAM ERROR', upstream.statusCode) - return upstream.pipe(res) - } - res.setHeader('content-encoding', upstream.headers['content-encoding']) - const file = advisoryBulkResponse - console.error('PROXY', `${req.url} -> ${file} ${upstream.statusCode}`) - mkdirp.sync(dirname(file)) - const data = [] - upstream.on('end', () => { - const out = Buffer.concat(data) - const obj = JSON.parse(unzipSync(out).toString()) - writeFileSync(file, JSON.stringify(obj, 0, 2) + '\n') - res.end(out) - }) - upstream.on('data', c => data.push(c)) - } - return https.request(opts).on('response', upstream => { - if (upstream.statusCode !== 200) { - console.error('ATTEMPTING TO PROXY FROM STAGING') - console.error('NOTE: THIS WILL FAIL WHEN NOT ON VPN!') - opts.host = 'security-microservice-3-west.npm.red' - opts.headers.host = opts.host - opts.path = '/v1/advisories/bulk' - https.request(opts) - .on('response', r => handleUpstream(r)) - .end(Buffer.concat(body)) - } else { - handleUpstream(upstream) - } - }).end(Buffer.concat(body)) - } else { - res.setHeader('content-encoding', 'gzip') - res.end(gzipSync(readFileSync(advisoryBulkResponse))) - } - }) - return - } else if (req.url === '/-/npm/v1/security/audits/quick') { - const body = [] - req.on('data', c => body.push(c)) - req.on('end', () => { - res.setHeader('connection', 'close') - if (failAudit) { - res.statusCode = 503 - return res.end('no audit for you') - } - if (!auditResponse) { - res.statusCode = 404 - return res.end('not found') - } - if (doProxy && !existsSync(auditResponse)) { - return https.request({ - host: 'registry.npmjs.org', - method: req.method, - path: req.url, - headers: { - ...req.headers, - accept: '*', - host: 'registry.npmjs.org', - connection: 'close', - 'if-none-match': '', - }, - }).on('response', upstream => { - res.statusCode = upstream.statusCode - if (upstream.statusCode >= 300 || upstream.statusCode < 200) { - console.error('UPSTREAM ERROR', upstream.statusCode) - // don't save if it's not a valid response - return upstream.pipe(res) - } - res.setHeader('content-encoding', upstream.headers['content-encoding']) - const file = auditResponse - console.error('PROXY', `${req.url} -> ${file} ${upstream.statusCode}`) - mkdirp.sync(dirname(file)) - const data = [] - upstream.on('end', () => { - const out = Buffer.concat(data) - // make it a bit prettier to read later - const obj = JSON.parse(unzipSync(out).toString()) - writeFileSync(file, JSON.stringify(obj, 0, 2) + '\n') - res.end(out) - }) - upstream.on('data', c => data.push(c)) - }).end(Buffer.concat(body)) - } else { - res.setHeader('content-encoding', 'gzip') - res.end(gzipSync(readFileSync(auditResponse))) - } - }) - return - } - - const f = join(__dirname, 'content', join('/', req.url.replace(/@/, '').replace(/%2f/i, '/'))) - const isCorgi = req.headers.accept.includes('application/vnd.npm.install-v1+json') - const file = f + ( - isCorgi && existsSync(`${f}.min.json`) ? '.min.json' - : existsSync(`${f}.json`) ? '.json' - : existsSync(`${f}/index.json`) ? 'index.json' - : '' - ) - - try { - const body = readFileSync(file) - res.setHeader('content-length', body.length) - res.setHeader('content-type', /\.min\.json$/.test(file) ? corgiDoc - : /\.json$/.test(file) ? 'application/json' - : 'application/octet-stream') - res.end(body) - } catch (er) { - // testing things going missing from the registry somehow - if (missing.test(req.url)) { - res.statusCode = 404 - res.end('{"error": "not found"}') - return - } - - if (doProxy) { - return https.get({ - host: 'registry.npmjs.org', - path: req.url, - headers: { - ...req.headers, - accept: '*', - 'accept-encoding': 'identity', - host: 'registry.npmjs.org', - connection: 'close', - 'if-none-match': '', - }, - }).on('response', upstream => { - const errorStatus = - upstream.statusCode >= 300 || upstream.statusCode < 200 - - if (errorStatus) { - console.error('UPSTREAM ERROR', upstream.statusCode) - } - - const ct = upstream.headers['content-type'] - const isJson = ct.includes('application/json') - const proxyFile = isJson ? f + '.json' : f - console.error('PROXY', `${req.url} -> ${proxyFile} ${ct}`) - mkdirp.sync(dirname(proxyFile)) - const data = [] - res.statusCode = upstream.statusCode - res.setHeader('content-type', ct) - upstream.on('end', () => { - console.error('ENDING', req.url) - const out = Buffer.concat(data) - if (!errorStatus) { - if (isJson) { - const obj = JSON.parse(out.toString()) - writeFileSync(proxyFile, JSON.stringify(obj, 0, 2) + '\n') - const mrm = require('minify-registry-metadata') - const minFile = proxyFile.replace(/\.json$/, '.min.json') - writeFileSync(minFile, JSON.stringify(mrm(obj), 0, 2) + '\n') - console.error('WROTE JSONS', [proxyFile, minFile]) - } else { - writeFileSync(proxyFile, out) - } - } - res.end(out) - }) - upstream.on('data', c => data.push(c)) - }).end() - } - - res.statusCode = er.code === 'ENOENT' ? 404 : 500 - if (res.method === 'GET') { - console.error(er) - } - res.setHeader('content-type', 'text/plain') - res.end(er.stack) - } - }) - server.listen(PORT, cb) -} - -module.exports = t => startServer(() => { - t.parent.teardown(() => module.exports.server.close()) - t.end() -}) - -module.exports.auditResponse = value => { - if (auditResponse && auditResponse !== value) { - throw new Error('setting audit response, but already set\n' + - '(did you forget to call the returned function on teardown?)') - } - auditResponse = value - return () => auditResponse = null -} -module.exports.failAudit = () => { - failAudit = true - return () => failAudit = false -} - -module.exports.advisoryBulkResponse = value => { - if (advisoryBulkResponse && advisoryBulkResponse !== value) { - throw new Error('setting advisory bulk response, but already set\n' + - '(did you forget to call the returned function on teardown?)') - } - advisoryBulkResponse = value - return () => advisoryBulkResponse = null -} -module.exports.failAdvisoryBulk = () => { - failAdvisoryBulk = true - return () => failAdvisoryBulk = false -} - -module.exports.registry = `http://localhost:${PORT}/` - -module.exports.start = startServer -module.exports.stop = () => module.exports.server.close() - -if (require.main === module) { - startServer(() => { - console.log(`Mock registry live at: - ${module.exports.registry} -Press ^D to close gracefully.`) - }) - process.openStdin() - process.stdin.on('end', () => module.exports.server.close()) -} diff -Nru npm-9.1.2~ds1/workspaces/libnpmexec/test/registry.js npm-9.2.0~ds1/workspaces/libnpmexec/test/registry.js --- npm-9.1.2~ds1/workspaces/libnpmexec/test/registry.js 1970-01-01 00:00:00.000000000 +0000 +++ npm-9.2.0~ds1/workspaces/libnpmexec/test/registry.js 2022-12-07 23:13:18.000000000 +0000 @@ -0,0 +1,166 @@ +const { resolve } = require('path') +const t = require('tap') +const { setup, createPkg, merge } = require('./fixtures/setup.js') + +t.test('run from registry - no local packages', async t => { + const { fixtures, package } = createPkg({ versions: ['2.0.0'] }) + + const { exec, path, registry, readOutput } = setup(t, { + testdir: merge(fixtures, { + global: {}, + }), + }) + + await package({ registry, path }) + + await exec({ + args: ['@npmcli/create-index'], + globalPath: resolve(path, 'global'), + }) + + t.match(await readOutput('@npmcli-create-index'), { + value: 'packages-2.0.0', + }) +}) + +t.test('run from registry - local version mismatch', async t => { + const { fixtures, package } = createPkg({ + localVersion: '2.0.0', + versions: ['2.0.0', '1.0.0'], + }) + + const { exec, path, registry, readOutput } = setup(t, { + testdir: { + ...fixtures, + }, + }) + + await package({ registry, path, tarballs: ['1.0.0'] }) + + await exec({ args: ['@npmcli/create-index@1.0.0'] }) + + t.match(await readOutput('@npmcli-create-index'), { + value: 'packages-1.0.0', + }) +}) + +t.test('run from registry - local range mismatch', async t => { + const { fixtures, package } = createPkg({ + localVersion: '2.0.0', + versions: ['2.0.0', '1.0.0'], + }) + + const { exec, path, registry, readOutput } = setup(t, { + testdir: { + ...fixtures, + }, + }) + + await package({ registry, path, tarballs: ['1.0.0'] }) + + await exec({ + args: ['@npmcli/create-index@^1.0.0'], + }) + + t.match(await readOutput('@npmcli-create-index'), { + value: 'packages-1.0.0', + }) +}) + +t.test('run from registry - local tag mismatch', async t => { + const { fixtures, package } = createPkg({ + localVersion: '2.0.0', + versions: ['2.0.0'], + }) + + const { exec, path, registry, readOutput } = setup(t, { + testdir: { + ...fixtures, + }, + }) + + await package({ registry, path }) + + await exec({ + args: ['@npmcli/create-index@latest'], + }) + + t.match(await readOutput('@npmcli-create-index'), { + value: 'packages-2.0.0', + }) +}) + +t.test('avoid install when exec from registry an available pkg', async t => { + const { fixtures, package } = createPkg({ + versions: ['2.0.0'], + }) + + const { exec, path, registry, readOutput, rmOutput } = setup(t, { + testdir: { + ...fixtures, + }, + }) + + await package({ registry, path }) + + // no file + t.rejects(() => readOutput('@npmcli-create-index'), { code: 'ENOENT' }) + + // file is created + await exec({ args: ['@npmcli/create-index'] }) + t.match(await readOutput('@npmcli-create-index'), { + value: 'packages-2.0.0', + }) + + // remove file + await rmOutput('@npmcli-create-index') + t.rejects(() => readOutput('@npmcli-create-index'), { code: 'ENOENT' }) + + // create file again but mock manifest only once + await package({ registry, path, tarballs: [], times: 1 }) + await exec({ args: ['@npmcli/create-index'] }) + t.match(await readOutput('@npmcli-create-index'), { + value: 'packages-2.0.0', + }) +}) + +t.test('run multiple from registry', async t => { + const indexPkg = createPkg({ + versions: ['2.0.0'], + name: '@npmcli/create-index', + }) + const testPkg = createPkg({ + versions: ['2.0.0'], + name: '@npmcli/create-test', + }) + + const { exec, path, registry, readOutput } = setup(t, { + testdir: { + ...merge(indexPkg.fixtures, testPkg.fixtures), + }, + }) + + await indexPkg.package({ registry, path }) + await testPkg.package({ registry, path }) + + t.rejects( + () => readOutput(resolve('@npmcli-create-index')), + { code: 'ENOENT' } + ) + t.rejects( + () => readOutput(resolve('@npmcli-create-test')), + { code: 'ENOENT' } + ) + + await exec({ + packages: ['@npmcli/create-test', '@npmcli/create-index'], + call: 'create-test && create-index', + }) + + t.match(await readOutput('@npmcli-create-index'), { + value: 'packages-2.0.0', + }) + t.match(await readOutput('@npmcli-create-test'), { + value: 'packages-2.0.0', + }) +}) diff -Nru npm-9.1.2~ds1/workspaces/libnpmfund/CHANGELOG.md npm-9.2.0~ds1/workspaces/libnpmfund/CHANGELOG.md --- npm-9.1.2~ds1/workspaces/libnpmfund/CHANGELOG.md 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/workspaces/libnpmfund/CHANGELOG.md 2022-12-07 23:13:18.000000000 +0000 @@ -1,5 +1,17 @@ # Changelog +## [4.0.6](https://github.com/npm/cli/compare/libnpmfund-v4.0.5...libnpmfund-v4.0.6) (2022-12-07) + +### Dependencies + +* [Workspace](https://github.com/npm/cli/releases/tag/arborist-v6.1.5): `@npmcli/arborist@6.1.5` + +## [4.0.5](https://github.com/npm/cli/compare/libnpmfund-v4.0.4...libnpmfund-v4.0.5) (2022-11-30) + +### Dependencies + +* [Workspace](https://github.com/npm/cli/compare/arborist-v6.1.3...arborist-v6.1.4): `@npmcli/arborist@6.1.4` + ## [4.0.4](https://github.com/npm/cli/compare/libnpmfund-v4.0.3...libnpmfund-v4.0.4) (2022-11-16) ### Dependencies diff -Nru npm-9.1.2~ds1/workspaces/libnpmfund/package.json npm-9.2.0~ds1/workspaces/libnpmfund/package.json --- npm-9.1.2~ds1/workspaces/libnpmfund/package.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/workspaces/libnpmfund/package.json 2022-12-07 23:13:18.000000000 +0000 @@ -1,6 +1,6 @@ { "name": "libnpmfund", - "version": "4.0.4", + "version": "4.0.6", "main": "lib/index.js", "files": [ "bin/", @@ -42,18 +42,18 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", - "tap": "^16.0.1" + "@npmcli/template-oss": "4.11.0", + "tap": "^16.3.2" }, "dependencies": { - "@npmcli/arborist": "^6.1.3" + "@npmcli/arborist": "^6.1.5" }, "engines": { "node": "^14.17.0 || ^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.10.0", + "version": "4.11.0", "content": "../../scripts/template-oss/index.js" }, "tap": { diff -Nru npm-9.1.2~ds1/workspaces/libnpmhook/CHANGELOG.md npm-9.2.0~ds1/workspaces/libnpmhook/CHANGELOG.md --- npm-9.1.2~ds1/workspaces/libnpmhook/CHANGELOG.md 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/workspaces/libnpmhook/CHANGELOG.md 2022-12-07 23:13:18.000000000 +0000 @@ -1,5 +1,12 @@ # Changelog +## [9.0.1](https://github.com/npm/cli/compare/libnpmhook-v9.0.0...libnpmhook-v9.0.1) (2022-12-07) + +### Dependencies + +* [`0a3fe00`](https://github.com/npm/cli/commit/0a3fe000e2723ae6fdb8b1d3154fd3835057c992) [#5933](https://github.com/npm/cli/pull/5933) `minipass@4.0.0` +* [`fee9b66`](https://github.com/npm/cli/commit/fee9b6686892a1c7f976c36ddd5d89b70c416817) `npm-registry-fetch@14.0.3` + ## [9.0.0](https://github.com/npm/cli/compare/libnpmhook-v9.0.0-pre.1...libnpmhook-v9.0.0) (2022-10-19) ### Features diff -Nru npm-9.1.2~ds1/workspaces/libnpmhook/package.json npm-9.2.0~ds1/workspaces/libnpmhook/package.json --- npm-9.1.2~ds1/workspaces/libnpmhook/package.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/workspaces/libnpmhook/package.json 2022-12-07 23:13:18.000000000 +0000 @@ -1,6 +1,6 @@ { "name": "libnpmhook", - "version": "9.0.0", + "version": "9.0.1", "description": "programmatic API for managing npm registry hooks", "main": "lib/index.js", "files": [ @@ -33,20 +33,20 @@ "license": "ISC", "dependencies": { "aproba": "^2.0.0", - "npm-registry-fetch": "^14.0.2" + "npm-registry-fetch": "^14.0.3" }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", + "@npmcli/template-oss": "4.11.0", "nock": "^13.2.4", - "tap": "^16.0.1" + "tap": "^16.3.2" }, "engines": { "node": "^14.17.0 || ^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.10.0", + "version": "4.11.0", "content": "../../scripts/template-oss/index.js" }, "tap": { diff -Nru npm-9.1.2~ds1/workspaces/libnpmorg/CHANGELOG.md npm-9.2.0~ds1/workspaces/libnpmorg/CHANGELOG.md --- npm-9.1.2~ds1/workspaces/libnpmorg/CHANGELOG.md 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/workspaces/libnpmorg/CHANGELOG.md 2022-12-07 23:13:18.000000000 +0000 @@ -1,5 +1,12 @@ # Changelog +## [5.0.1](https://github.com/npm/cli/compare/libnpmorg-v5.0.0...libnpmorg-v5.0.1) (2022-12-07) + +### Dependencies + +* [`0a3fe00`](https://github.com/npm/cli/commit/0a3fe000e2723ae6fdb8b1d3154fd3835057c992) [#5933](https://github.com/npm/cli/pull/5933) `minipass@4.0.0` +* [`fee9b66`](https://github.com/npm/cli/commit/fee9b6686892a1c7f976c36ddd5d89b70c416817) `npm-registry-fetch@14.0.3` + ## [5.0.0](https://github.com/npm/cli/compare/libnpmorg-v5.0.0-pre.1...libnpmorg-v5.0.0) (2022-10-19) ### Features diff -Nru npm-9.1.2~ds1/workspaces/libnpmorg/package.json npm-9.2.0~ds1/workspaces/libnpmorg/package.json --- npm-9.1.2~ds1/workspaces/libnpmorg/package.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/workspaces/libnpmorg/package.json 2022-12-07 23:13:18.000000000 +0000 @@ -1,6 +1,6 @@ { "name": "libnpmorg", - "version": "5.0.0", + "version": "5.0.1", "description": "Programmatic api for `npm org` commands", "author": "GitHub Inc.", "main": "lib/index.js", @@ -28,10 +28,10 @@ ], "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", - "minipass": "^3.1.1", + "@npmcli/template-oss": "4.11.0", + "minipass": "^4.0.0", "nock": "^13.2.4", - "tap": "^16.0.1" + "tap": "^16.3.2" }, "repository": { "type": "git", @@ -42,14 +42,14 @@ "homepage": "https://npmjs.com/package/libnpmorg", "dependencies": { "aproba": "^2.0.0", - "npm-registry-fetch": "^14.0.2" + "npm-registry-fetch": "^14.0.3" }, "engines": { "node": "^14.17.0 || ^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.10.0", + "version": "4.11.0", "content": "../../scripts/template-oss/index.js" }, "tap": { diff -Nru npm-9.1.2~ds1/workspaces/libnpmpack/CHANGELOG.md npm-9.2.0~ds1/workspaces/libnpmpack/CHANGELOG.md --- npm-9.1.2~ds1/workspaces/libnpmpack/CHANGELOG.md 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/workspaces/libnpmpack/CHANGELOG.md 2022-12-07 23:13:18.000000000 +0000 @@ -1,5 +1,20 @@ # Changelog +## [5.0.6](https://github.com/npm/cli/compare/libnpmpack-v5.0.5...libnpmpack-v5.0.6) (2022-12-07) + +### Dependencies + +* [`0a3fe00`](https://github.com/npm/cli/commit/0a3fe000e2723ae6fdb8b1d3154fd3835057c992) [#5933](https://github.com/npm/cli/pull/5933) `minipass@4.0.0` +* [`3da9a1a`](https://github.com/npm/cli/commit/3da9a1a4ebcf1779035b5f9ae985c087f617efe3) `pacote@15.0.7` +* [`875bd56`](https://github.com/npm/cli/commit/875bd56c33ca5eef80c2a50a11808445f2a39a2a) `npm-package-arg@10.1.0` +* [Workspace](https://github.com/npm/cli/releases/tag/arborist-v6.1.5): `@npmcli/arborist@6.1.5` + +## [5.0.5](https://github.com/npm/cli/compare/libnpmpack-v5.0.4...libnpmpack-v5.0.5) (2022-11-30) + +### Dependencies + +* [Workspace](https://github.com/npm/cli/compare/arborist-v6.1.3...arborist-v6.1.4): `@npmcli/arborist@6.1.4` + ## [5.0.4](https://github.com/npm/cli/compare/libnpmpack-v5.0.3...libnpmpack-v5.0.4) (2022-11-16) ### Dependencies diff -Nru npm-9.1.2~ds1/workspaces/libnpmpack/package.json npm-9.2.0~ds1/workspaces/libnpmpack/package.json --- npm-9.1.2~ds1/workspaces/libnpmpack/package.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/workspaces/libnpmpack/package.json 2022-12-07 23:13:18.000000000 +0000 @@ -1,6 +1,6 @@ { "name": "libnpmpack", - "version": "5.0.4", + "version": "5.0.6", "description": "Programmatic API for the bits behind npm pack", "author": "GitHub Inc.", "main": "lib/index.js", @@ -23,10 +23,10 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", + "@npmcli/template-oss": "4.11.0", "nock": "^13.0.7", "spawk": "^1.7.1", - "tap": "^16.0.1" + "tap": "^16.3.2" }, "repository": { "type": "git", @@ -36,17 +36,17 @@ "bugs": "https://github.com/npm/libnpmpack/issues", "homepage": "https://npmjs.com/package/libnpmpack", "dependencies": { - "@npmcli/arborist": "^6.1.3", + "@npmcli/arborist": "^6.1.5", "@npmcli/run-script": "^6.0.0", - "npm-package-arg": "^10.0.0", - "pacote": "^15.0.2" + "npm-package-arg": "^10.1.0", + "pacote": "^15.0.7" }, "engines": { "node": "^14.17.0 || ^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.10.0", + "version": "4.11.0", "content": "../../scripts/template-oss/index.js" }, "tap": { diff -Nru npm-9.1.2~ds1/workspaces/libnpmpublish/CHANGELOG.md npm-9.2.0~ds1/workspaces/libnpmpublish/CHANGELOG.md --- npm-9.1.2~ds1/workspaces/libnpmpublish/CHANGELOG.md 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/workspaces/libnpmpublish/CHANGELOG.md 2022-12-07 23:13:18.000000000 +0000 @@ -1,5 +1,21 @@ # Changelog +## [7.0.6](https://github.com/npm/cli/compare/libnpmpublish-v7.0.5...libnpmpublish-v7.0.6) (2022-12-07) + +### Dependencies + +* [`0a3fe00`](https://github.com/npm/cli/commit/0a3fe000e2723ae6fdb8b1d3154fd3835057c992) [#5933](https://github.com/npm/cli/pull/5933) `minipass@4.0.0` +* [`cf0a174`](https://github.com/npm/cli/commit/cf0a17407abc577c27420a1c8a4a0c08c7cefce9) `ssri@10.0.1` +* [`fee9b66`](https://github.com/npm/cli/commit/fee9b6686892a1c7f976c36ddd5d89b70c416817) `npm-registry-fetch@14.0.3` +* [`875bd56`](https://github.com/npm/cli/commit/875bd56c33ca5eef80c2a50a11808445f2a39a2a) `npm-package-arg@10.1.0` +* [Workspace](https://github.com/npm/cli/releases/tag/libnpmpack-v5.0.6): `libnpmpack@5.0.6` + +## [7.0.5](https://github.com/npm/cli/compare/libnpmpublish-v7.0.4...libnpmpublish-v7.0.5) (2022-11-30) + +### Dependencies + +* [Workspace](https://github.com/npm/cli/compare/libnpmpack-v5.0.4...libnpmpack-v5.0.5): `libnpmpack@5.0.5` + ## [7.0.4](https://github.com/npm/cli/compare/libnpmpublish-v7.0.3...libnpmpublish-v7.0.4) (2022-11-16) ### Dependencies diff -Nru npm-9.1.2~ds1/workspaces/libnpmpublish/package.json npm-9.2.0~ds1/workspaces/libnpmpublish/package.json --- npm-9.1.2~ds1/workspaces/libnpmpublish/package.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/workspaces/libnpmpublish/package.json 2022-12-07 23:13:18.000000000 +0000 @@ -1,6 +1,6 @@ { "name": "libnpmpublish", - "version": "7.0.4", + "version": "7.0.6", "description": "Programmatic API for the bits behind npm publish and unpublish", "author": "GitHub Inc.", "main": "lib/index.js", @@ -25,11 +25,11 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", - "libnpmpack": "^5.0.4", + "@npmcli/template-oss": "4.11.0", + "libnpmpack": "^5.0.6", "lodash.clonedeep": "^4.5.0", "nock": "^13.2.4", - "tap": "^16.0.1" + "tap": "^16.3.2" }, "repository": { "type": "git", @@ -40,17 +40,17 @@ "homepage": "https://npmjs.com/package/libnpmpublish", "dependencies": { "normalize-package-data": "^5.0.0", - "npm-package-arg": "^10.0.0", - "npm-registry-fetch": "^14.0.2", + "npm-package-arg": "^10.1.0", + "npm-registry-fetch": "^14.0.3", "semver": "^7.3.7", - "ssri": "^10.0.0" + "ssri": "^10.0.1" }, "engines": { "node": "^14.17.0 || ^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.10.0", + "version": "4.11.0", "content": "../../scripts/template-oss/index.js" }, "tap": { diff -Nru npm-9.1.2~ds1/workspaces/libnpmsearch/CHANGELOG.md npm-9.2.0~ds1/workspaces/libnpmsearch/CHANGELOG.md --- npm-9.1.2~ds1/workspaces/libnpmsearch/CHANGELOG.md 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/workspaces/libnpmsearch/CHANGELOG.md 2022-12-07 23:13:18.000000000 +0000 @@ -1,5 +1,12 @@ # Changelog +## [6.0.1](https://github.com/npm/cli/compare/libnpmsearch-v6.0.0...libnpmsearch-v6.0.1) (2022-12-07) + +### Dependencies + +* [`0a3fe00`](https://github.com/npm/cli/commit/0a3fe000e2723ae6fdb8b1d3154fd3835057c992) [#5933](https://github.com/npm/cli/pull/5933) `minipass@4.0.0` +* [`fee9b66`](https://github.com/npm/cli/commit/fee9b6686892a1c7f976c36ddd5d89b70c416817) `npm-registry-fetch@14.0.3` + ## [6.0.0](https://github.com/npm/cli/compare/libnpmsearch-v6.0.0-pre.1...libnpmsearch-v6.0.0) (2022-10-19) ### Features diff -Nru npm-9.1.2~ds1/workspaces/libnpmsearch/package.json npm-9.2.0~ds1/workspaces/libnpmsearch/package.json --- npm-9.1.2~ds1/workspaces/libnpmsearch/package.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/workspaces/libnpmsearch/package.json 2022-12-07 23:13:18.000000000 +0000 @@ -1,6 +1,6 @@ { "name": "libnpmsearch", - "version": "6.0.0", + "version": "6.0.1", "description": "Programmatic API for searching in npm and compatible registries.", "author": "GitHub Inc.", "main": "lib/index.js", @@ -26,9 +26,9 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", + "@npmcli/template-oss": "4.11.0", "nock": "^13.2.4", - "tap": "^16.0.1" + "tap": "^16.3.2" }, "repository": { "type": "git", @@ -38,14 +38,14 @@ "bugs": "https://github.com/npm/libnpmsearch/issues", "homepage": "https://npmjs.com/package/libnpmsearch", "dependencies": { - "npm-registry-fetch": "^14.0.2" + "npm-registry-fetch": "^14.0.3" }, "engines": { "node": "^14.17.0 || ^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.10.0", + "version": "4.11.0", "content": "../../scripts/template-oss/index.js" }, "tap": { diff -Nru npm-9.1.2~ds1/workspaces/libnpmteam/CHANGELOG.md npm-9.2.0~ds1/workspaces/libnpmteam/CHANGELOG.md --- npm-9.1.2~ds1/workspaces/libnpmteam/CHANGELOG.md 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/workspaces/libnpmteam/CHANGELOG.md 2022-12-07 23:13:18.000000000 +0000 @@ -1,5 +1,12 @@ # Changelog +## [5.0.1](https://github.com/npm/cli/compare/libnpmteam-v5.0.0...libnpmteam-v5.0.1) (2022-12-07) + +### Dependencies + +* [`0a3fe00`](https://github.com/npm/cli/commit/0a3fe000e2723ae6fdb8b1d3154fd3835057c992) [#5933](https://github.com/npm/cli/pull/5933) `minipass@4.0.0` +* [`fee9b66`](https://github.com/npm/cli/commit/fee9b6686892a1c7f976c36ddd5d89b70c416817) `npm-registry-fetch@14.0.3` + ## [5.0.0](https://github.com/npm/cli/compare/libnpmteam-v5.0.0-pre.1...libnpmteam-v5.0.0) (2022-10-19) ### Features diff -Nru npm-9.1.2~ds1/workspaces/libnpmteam/package.json npm-9.2.0~ds1/workspaces/libnpmteam/package.json --- npm-9.1.2~ds1/workspaces/libnpmteam/package.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/workspaces/libnpmteam/package.json 2022-12-07 23:13:18.000000000 +0000 @@ -1,7 +1,7 @@ { "name": "libnpmteam", "description": "npm Team management APIs", - "version": "5.0.0", + "version": "5.0.1", "author": "GitHub Inc.", "license": "ISC", "main": "lib/index.js", @@ -16,9 +16,9 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", + "@npmcli/template-oss": "4.11.0", "nock": "^13.2.4", - "tap": "^16.0.1" + "tap": "^16.3.2" }, "repository": { "type": "git", @@ -32,14 +32,14 @@ "homepage": "https://npmjs.com/package/libnpmteam", "dependencies": { "aproba": "^2.0.0", - "npm-registry-fetch": "^14.0.2" + "npm-registry-fetch": "^14.0.3" }, "engines": { "node": "^14.17.0 || ^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.10.0", + "version": "4.11.0", "content": "../../scripts/template-oss/index.js" }, "tap": { diff -Nru npm-9.1.2~ds1/workspaces/libnpmversion/package.json npm-9.2.0~ds1/workspaces/libnpmversion/package.json --- npm-9.1.2~ds1/workspaces/libnpmversion/package.json 2022-11-16 21:06:08.000000000 +0000 +++ npm-9.2.0~ds1/workspaces/libnpmversion/package.json 2022-12-07 23:13:18.000000000 +0000 @@ -32,9 +32,9 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", + "@npmcli/template-oss": "4.11.0", "require-inject": "^1.4.4", - "tap": "^16.0.1" + "tap": "^16.3.2" }, "dependencies": { "@npmcli/git": "^4.0.1", @@ -48,7 +48,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.10.0", + "version": "4.11.0", "content": "../../scripts/template-oss/index.js" } }