From 792c832e881ff03c9ee2bf06e705ed73027f350b Mon Sep 17 00:00:00 2001 From: Ruy Adorno Date: Wed, 24 Mar 2021 17:25:32 -0400 Subject: [PATCH] deps: upgrade npm to 7.7.4 --- deps/npm/AUTHORS | 2 + deps/npm/CHANGELOG.md | 77 +++ .../docs/content/commands/npm-find-dupes.md | 1 + deps/npm/docs/content/using-npm/config.md | 14 +- deps/npm/docs/output/commands/npm-ls.html | 2 +- deps/npm/docs/output/commands/npm.html | 2 +- deps/npm/docs/output/using-npm/config.html | 15 +- deps/npm/lib/audit.js | 1 + deps/npm/lib/ci.js | 11 +- deps/npm/lib/config.js | 5 + deps/npm/lib/dedupe.js | 1 + deps/npm/lib/exec.js | 12 +- deps/npm/lib/install.js | 13 +- deps/npm/lib/link.js | 9 +- deps/npm/lib/prune.js | 8 +- deps/npm/lib/set-script.js | 11 + deps/npm/lib/uninstall.js | 16 +- deps/npm/lib/update.js | 1 + deps/npm/lib/utils/config/definitions.js | 86 ++-- deps/npm/man/man1/npm-ls.1 | 2 +- deps/npm/man/man1/npm.1 | 2 +- deps/npm/man/man7/config.7 | 18 +- .../@npmcli/disparity-colors/CHANGELOG.md | 1 + .../@npmcli/disparity-colors/README.md | 3 +- .../node_modules/string-width/index.js | 8 +- .../node_modules/string-width/package.json | 2 +- .../node_modules/string-width/readme.md | 2 +- deps/npm/node_modules/diff/README.md | 2 +- deps/npm/node_modules/env-paths/index.d.ts | 32 ++ deps/npm/node_modules/env-paths/package.json | 2 +- deps/npm/node_modules/env-paths/readme.md | 49 +- .../hosted-git-info/git-host-info.js | 2 +- .../node_modules/hosted-git-info/package.json | 2 +- deps/npm/node_modules/libnpmdiff/CHANGELOG.md | 1 + deps/npm/node_modules/libnpmdiff/README.md | 5 +- deps/npm/node_modules/mime-db/HISTORY.md | 8 + deps/npm/node_modules/mime-db/README.md | 6 +- deps/npm/node_modules/mime-db/db.json | 77 ++- deps/npm/node_modules/mime-db/package.json | 18 +- deps/npm/node_modules/mime-types/HISTORY.md | 9 + deps/npm/node_modules/mime-types/README.md | 10 - deps/npm/node_modules/mime-types/package.json | 14 +- .../node_modules/hosted-git-info/CHANGELOG.md | 185 ------- .../node_modules/hosted-git-info/LICENSE | 13 - .../node_modules/hosted-git-info/README.md | 133 ----- .../hosted-git-info/git-host-info.js | 154 ------ .../node_modules/hosted-git-info/git-host.js | 110 ---- .../node_modules/hosted-git-info/index.js | 237 --------- .../node_modules/hosted-git-info/package.json | 52 -- .../node_modules/hosted-git-info/CHANGELOG.md | 185 ------- .../node_modules/hosted-git-info/LICENSE | 13 - .../node_modules/hosted-git-info/README.md | 133 ----- .../hosted-git-info/git-host-info.js | 154 ------ .../node_modules/hosted-git-info/git-host.js | 110 ---- .../node_modules/hosted-git-info/index.js | 237 --------- .../node_modules/hosted-git-info/package.json | 52 -- .../npm-pick-manifest/CHANGELOG.md | 2 +- .../node_modules/resolve/test/mock_sync.js | 1 + deps/npm/node_modules/retry/Readme.md | 2 +- deps/npm/node_modules/socks/README.md | 26 +- .../socks/build/client/socksclient.js | 90 +++- .../socks/build/client/socksclient.js.map | 2 +- .../socks/build/common/constants.js | 12 +- .../socks/build/common/constants.js.map | 2 +- .../socks/build/common/helpers.js | 27 + .../socks/build/common/helpers.js.map | 2 +- deps/npm/node_modules/socks/package.json | 16 +- .../socks/typings/client/socksclient.d.ts | 5 + .../socks/typings/common/constants.d.ts | 11 +- deps/npm/node_modules/uuid/README.md | 8 +- deps/npm/package.json | 4 +- ...ib-utils-config-definitions.js-TAP.test.js | 1 + ...b-utils-config-describe-all.js-TAP.test.js | 14 +- .../test-lib-utils-npm-usage.js-TAP.test.js | 482 +++++++++--------- .../test-lib-utils-tar.js-TAP.test.js | 2 +- deps/npm/test/lib/config.js | 19 +- deps/npm/test/lib/install.js | 6 +- deps/npm/test/lib/set-script.js | 37 ++ deps/npm/test/lib/uninstall.js | 6 +- deps/npm/test/lib/update.js | 7 +- deps/npm/test/lib/utils/config/definitions.js | 85 ++- deps/npm/test/lib/utils/config/flatten.js | 6 + 82 files changed, 1001 insertions(+), 2204 deletions(-) delete mode 100644 deps/npm/node_modules/normalize-package-data/node_modules/hosted-git-info/CHANGELOG.md delete mode 100644 deps/npm/node_modules/normalize-package-data/node_modules/hosted-git-info/LICENSE delete mode 100644 deps/npm/node_modules/normalize-package-data/node_modules/hosted-git-info/README.md delete mode 100644 deps/npm/node_modules/normalize-package-data/node_modules/hosted-git-info/git-host-info.js delete mode 100644 deps/npm/node_modules/normalize-package-data/node_modules/hosted-git-info/git-host.js delete mode 100644 deps/npm/node_modules/normalize-package-data/node_modules/hosted-git-info/index.js delete mode 100644 deps/npm/node_modules/normalize-package-data/node_modules/hosted-git-info/package.json delete mode 100644 deps/npm/node_modules/npm-package-arg/node_modules/hosted-git-info/CHANGELOG.md delete mode 100644 deps/npm/node_modules/npm-package-arg/node_modules/hosted-git-info/LICENSE delete mode 100644 deps/npm/node_modules/npm-package-arg/node_modules/hosted-git-info/README.md delete mode 100644 deps/npm/node_modules/npm-package-arg/node_modules/hosted-git-info/git-host-info.js delete mode 100644 deps/npm/node_modules/npm-package-arg/node_modules/hosted-git-info/git-host.js delete mode 100644 deps/npm/node_modules/npm-package-arg/node_modules/hosted-git-info/index.js delete mode 100644 deps/npm/node_modules/npm-package-arg/node_modules/hosted-git-info/package.json diff --git a/deps/npm/AUTHORS b/deps/npm/AUTHORS index 9c67cf88ef2505..769d18f83d5d98 100644 --- a/deps/npm/AUTHORS +++ b/deps/npm/AUTHORS @@ -765,3 +765,5 @@ Jan Sepke <625043+jansepke@users.noreply.github.com> Augusto Moura Eric Chow kbayrhammer +James Chen-Smith +Yash Singh diff --git a/deps/npm/CHANGELOG.md b/deps/npm/CHANGELOG.md index c11a44734ae8eb..8bec00e87d7b57 100644 --- a/deps/npm/CHANGELOG.md +++ b/deps/npm/CHANGELOG.md @@ -1,3 +1,80 @@ +## v7.7.4 (2021-03-24) + +### BUG FIXES + +* [`200bee74b`](https://github.com/npm/cli/commit/200bee74b31a738687446b7b535cac67b1c582fd) + [#2951](https://github.com/npm/cli/issues/2951) + fix(config): accept explicit `production=false` + ([@wraithgar](https://github.com/wraithgar)) +* [`7b45e9df6`](https://github.com/npm/cli/commit/7b45e9df6102c7bd6e403d1fdc9939581c38f546) + [#2950](https://github.com/npm/cli/issues/2950) + warn if using workspaces config options in `npm config` + ([@ruyadorno](https://github.com/ruyadorno)) + +## v7.7.3 (2021-03-24) + +### BUG FIXES + +* [`c76f04ac2`](https://github.com/npm/cli/commit/c76f04ac28ddf2ae4df4b3ce0aec684a118de1b5) + [#2925](https://github.com/npm/cli/issues/2925) + fix(set-script): add completion + ([@Yash-Singh1](https://github.com/Yash-Singh1)) +* [`0379eab69`](https://github.com/npm/cli/commit/0379eab698b78ae4aa89bbe2043607f420e52f11) + [#2929](https://github.com/npm/cli/issues/2929) + fix(install): ignore auditLevel + `npm install` should not be affected by the `auditLevel` config, as the + results of audit do not change its exit status. + ([@wraithgar](https://github.com/wraithgar)) +* [`98efadeb4`](https://github.com/npm/cli/commit/98efadeb4b2ae9289f14ed6f42a169230faf7239) + [#2923](https://github.com/npm/cli/issues/2923) + fix(audit-level): add `info` audit level + This is a valid level but wasn't configured to be allowed. + Also added this param to the usage output for `npm audit` + ([@wraithgar](https://github.com/wraithgar)) +* [`e8d2adcf4`](https://github.com/npm/cli/commit/e8d2adcf40ad63030f844c9aa44c6d16e2146797) + [#2945](https://github.com/npm/cli/issues/2945) + config should not error when workspaces are configured + ([@nlf](https://github.com/nlf)) +* [`aba2bc623`](https://github.com/npm/cli/commit/aba2bc623ea99e563b1b15b81dbb4ba94f86fe4c) + [#2944](https://github.com/npm/cli/issues/2944) + fix(progress): re-add progress bar to reify + The logger was no longer in flatOptions, we pass it in explicitly now + ([@wraithgar](https://github.com/wraithgar)) +* [`877b4ed29`](https://github.com/npm/cli/commit/877b4ed2925c97b5249a4d33575420dda64f7339) + [#2946](https://github.com/npm/cli/issues/2946) + fix(flatOptions): re-add `_auth` + This was not being added to flatOptions, and things like + `npm-registry-fetch` are looking for it. + ([@wraithgar](https://github.com/wraithgar)) + +## v7.7.2 (2021-03-24) + +### BUG FIXES +* [`a4df2b98d`](https://github.com/npm/cli/commit/a4df2b98d89429b19cd29b5fc895cdbfc0a6bd78) + [#2942](https://github.com/npm/cli/issues/2942) + Restore --dev flag, unify --omit flatteners + ([@isaacs](https://github.com/isaacs)) + +### DEPENDENCIES +* [`2cbfaac0e`](https://github.com/npm/cli/commit/2cbfaac0ecd5810316f6d76168ed9618bd11bf3a) + `hosted-git-info@4.0.2` + * [#83](https://github.com/npm/hosted-git-info/pull/83) Do not parse + urls for gitlab + ([@nlf](https://github.com/nlf)) + +## v7.7.1 (2021-03-24) + +### BUG FIXES + +* [`543b0e39b`](https://github.com/npm/cli/commit/543b0e39bcb94fc408804b01ca9c0d7b960b2681) + [#2930](https://github.com/npm/cli/issues/2930) + fix(uninstall): use correct local prefix + ([@jameschensmith](https://github.com/jameschensmith)) +* [`dce4960ef`](https://github.com/npm/cli/commit/dce4960ef6d52af128affe7755b2ca72de913b6c) + [#2932](https://github.com/npm/cli/issues/2932) + fix(config): flatten savePrefix properly + ([@wraithgar](https://github.com/wraithgar)) + ## v7.7.0 (2021-03-23) ### FEATURES diff --git a/deps/npm/docs/content/commands/npm-find-dupes.md b/deps/npm/docs/content/commands/npm-find-dupes.md index e098cf47f49915..6f55d47bfd7f32 100644 --- a/deps/npm/docs/content/commands/npm-find-dupes.md +++ b/deps/npm/docs/content/commands/npm-find-dupes.md @@ -21,3 +21,4 @@ duplications, without actually changing the package tree. * [npm ls](/cli-commands/ls) * [npm update](/cli-commands/update) * [npm install](/cli-commands/install) + diff --git a/deps/npm/docs/content/using-npm/config.md b/deps/npm/docs/content/using-npm/config.md index da69ad46325305..c701a361afbb94 100644 --- a/deps/npm/docs/content/using-npm/config.md +++ b/deps/npm/docs/content/using-npm/config.md @@ -185,7 +185,7 @@ registry and all registries configured for scopes. See the documentation for #### `audit-level` * Default: null -* Type: "low", "moderate", "high", "critical", "none", or null +* Type: "info", "low", "moderate", "high", "critical", "none", or null The minimum level of vulnerability for `npm audit` to exit with a non-zero exit code. @@ -1382,6 +1382,14 @@ What authentication strategy to use with `adduser`/`login`. `--cache-min=9999 (or bigger)` is an alias for `--prefer-offline`. +#### `dev` + +* Default: false +* Type: Boolean +* DEPRECATED: Please use --include=dev instead. + +Alias for `--include=dev`. + #### `init.author.email` * Default: "" @@ -1451,8 +1459,8 @@ Alias for --include=optional or --omit=optional #### `production` -* Default: false -* Type: Boolean +* Default: null +* Type: null or Boolean * DEPRECATED: Use `--omit=dev` instead. Alias for `--omit=dev` diff --git a/deps/npm/docs/output/commands/npm-ls.html b/deps/npm/docs/output/commands/npm-ls.html index 454c5567442657..287149aba986dd 100644 --- a/deps/npm/docs/output/commands/npm-ls.html +++ b/deps/npm/docs/output/commands/npm-ls.html @@ -159,7 +159,7 @@

Description

the results to only the paths to the packages named. Note that nested packages will also show the paths to the specified packages. For example, running npm ls promzard in npm’s source tree will show:

-
npm@7.7.0 /path/to/npm
+
npm@7.7.4 /path/to/npm
 └─┬ init-package-json@0.0.4
   └── promzard@0.1.5
 
diff --git a/deps/npm/docs/output/commands/npm.html b/deps/npm/docs/output/commands/npm.html index f55659d9ee82a1..90e4019f1bc5d6 100644 --- a/deps/npm/docs/output/commands/npm.html +++ b/deps/npm/docs/output/commands/npm.html @@ -148,7 +148,7 @@

Table of contents

npm <command> [args]
 

Version

-

7.7.0

+

7.7.4

Description

npm is the package manager for the Node JavaScript platform. It puts modules in place so that node can find them, and manages dependency diff --git a/deps/npm/docs/output/using-npm/config.html b/deps/npm/docs/output/using-npm/config.html index dc50eb72b71ca4..6fe8f828157683 100644 --- a/deps/npm/docs/output/using-npm/config.html +++ b/deps/npm/docs/output/using-npm/config.html @@ -141,7 +141,7 @@

config

Table of contents

-
+

Description

@@ -297,7 +297,7 @@

audit

audit-level

  • Default: null
  • -
  • Type: “low”, “moderate”, “high”, “critical”, “none”, or null
  • +
  • Type: “info”, “low”, “moderate”, “high”, “critical”, “none”, or null

The minimum level of vulnerability for npm audit to exit with a non-zero exit code.

@@ -1305,6 +1305,13 @@

cache-min

  • DEPRECATED: This option has been deprecated in favor of --prefer-offline.
  • --cache-min=9999 (or bigger) is an alias for --prefer-offline.

    +

    dev

    +
      +
    • Default: false
    • +
    • Type: Boolean
    • +
    • DEPRECATED: Please use –include=dev instead.
    • +
    +

    Alias for --include=dev.

    init.author.email

    • Default: “”
    • @@ -1365,8 +1372,8 @@

      optional

      Alias for –include=optional or –omit=optional

      production

        -
      • Default: false
      • -
      • Type: Boolean
      • +
      • Default: null
      • +
      • Type: null or Boolean
      • DEPRECATED: Use --omit=dev instead.

      Alias for --omit=dev

      diff --git a/deps/npm/lib/audit.js b/deps/npm/lib/audit.js index f990e1fa5efaa9..9df26985892783 100644 --- a/deps/npm/lib/audit.js +++ b/deps/npm/lib/audit.js @@ -18,6 +18,7 @@ class Audit extends BaseCommand { /* istanbul ignore next - see test/lib/load-all-commands.js */ static get params () { return [ + 'audit-level', 'dry-run', 'force', 'json', diff --git a/deps/npm/lib/ci.js b/deps/npm/lib/ci.js index b73b3a85911148..9ae31950ef1021 100644 --- a/deps/npm/lib/ci.js +++ b/deps/npm/lib/ci.js @@ -42,8 +42,14 @@ class CI extends BaseCommand { } const where = this.npm.prefix - const arb = new Arborist({ ...this.npm.flatOptions, path: where }) + const opts = { + ...this.npm.flatOptions, + path: where, + log: this.npm.log, + save: false, // npm ci should never modify the lockfile or package.json + } + const arb = new Arborist(opts) await Promise.all([ arb.loadVirtual().catch(er => { log.verbose('loadVirtual', er.stack) @@ -55,8 +61,7 @@ class CI extends BaseCommand { }), removeNodeModules(where), ]) - // npm ci should never modify the lockfile or package.json - await arb.reify({ ...this.npm.flatOptions, save: false }) + await arb.reify(opts) const ignoreScripts = this.npm.config.get('ignore-scripts') // run the same set of scripts that `npm install` runs. diff --git a/deps/npm/lib/config.js b/deps/npm/lib/config.js index d5ef6ec50a5e60..f53d7e5ae271bc 100644 --- a/deps/npm/lib/config.js +++ b/deps/npm/lib/config.js @@ -88,6 +88,11 @@ class Config extends BaseCommand { this.config(args).then(() => cb()).catch(cb) } + execWorkspaces (args, filters, cb) { + this.npm.log.warn('config', 'This command does not support workspaces.') + this.exec(args, cb) + } + async config ([action, ...args]) { this.npm.log.disableProgress() try { diff --git a/deps/npm/lib/dedupe.js b/deps/npm/lib/dedupe.js index b80a777fcc2f75..9649025739c601 100644 --- a/deps/npm/lib/dedupe.js +++ b/deps/npm/lib/dedupe.js @@ -30,6 +30,7 @@ class Dedupe extends BaseCommand { const where = this.npm.prefix const opts = { ...this.npm.flatOptions, + log: this.npm.log, path: where, dryRun, } diff --git a/deps/npm/lib/exec.js b/deps/npm/lib/exec.js index 0a61de7c1200cd..5967ee42345920 100644 --- a/deps/npm/lib/exec.js +++ b/deps/npm/lib/exec.js @@ -175,7 +175,11 @@ class Exec extends BaseCommand { if (needInstall) { const installDir = this.cacheInstallDir(packages) await mkdirp(installDir) - const arb = new Arborist({ ...this.npm.flatOptions, path: installDir }) + const arb = new Arborist({ + ...this.npm.flatOptions, + log: this.npm.log, + path: installDir, + }) const tree = await arb.loadActual() // at this point, we have to ensure that we get the exact same @@ -212,7 +216,11 @@ class Exec extends BaseCommand { throw new Error('canceled') } } - await arb.reify({ ...this.npm.flatOptions, add }) + await arb.reify({ + ...this.npm.flatOptions, + log: this.npm.log, + add, + }) } pathArr.unshift(resolve(installDir, 'node_modules/.bin')) } diff --git a/deps/npm/lib/install.js b/deps/npm/lib/install.js index 54ea6d82510512..a023015ed823a3 100644 --- a/deps/npm/lib/install.js +++ b/deps/npm/lib/install.js @@ -126,15 +126,16 @@ class Install extends BaseCommand { if (this.npm.config.get('dev')) log.warn('install', 'Usage of the `--dev` option is deprecated. Use `--include=dev` instead.') - const arb = new Arborist({ + const opts = { ...this.npm.flatOptions, + log: this.npm.log, + auditLevel: null, path: where, - }) - - await arb.reify({ - ...this.npm.flatOptions, add: args, - }) + } + const arb = new Arborist(opts) + await arb.reify(opts) + if (!args.length && !isGlobalInstall && !ignoreScripts) { const scriptShell = this.npm.config.get('script-shell') || undefined const scripts = [ diff --git a/deps/npm/lib/link.js b/deps/npm/lib/link.js index fe9cfd3a6b254a..3e9ec1807fca1a 100644 --- a/deps/npm/lib/link.js +++ b/deps/npm/lib/link.js @@ -66,6 +66,7 @@ class Link extends BaseCommand { const globalOpts = { ...this.npm.flatOptions, path: globalTop, + log: this.npm.log, global: true, prune: false, } @@ -113,12 +114,14 @@ class Link extends BaseCommand { // reify all the pending names as symlinks there const localArb = new Arborist({ ...this.npm.flatOptions, + log: this.npm.log, path: this.npm.prefix, save, }) await localArb.reify({ ...this.npm.flatOptions, path: this.npm.prefix, + log: this.npm.log, add: names.map(l => `file:${resolve(globalTop, 'node_modules', l)}`), save, }) @@ -131,9 +134,13 @@ class Link extends BaseCommand { const arb = new Arborist({ ...this.npm.flatOptions, path: globalTop, + log: this.npm.log, global: true, }) - await arb.reify({ add: [`file:${this.npm.prefix}`] }) + await arb.reify({ + add: [`file:${this.npm.prefix}`], + log: this.npm.log, + }) await reifyFinish(this.npm, arb) } diff --git a/deps/npm/lib/prune.js b/deps/npm/lib/prune.js index 1da86a3e821878..5c4a549d4d7ada 100644 --- a/deps/npm/lib/prune.js +++ b/deps/npm/lib/prune.js @@ -30,11 +30,13 @@ class Prune extends BaseCommand { async prune () { const where = this.npm.prefix - const arb = new Arborist({ + const opts = { ...this.npm.flatOptions, path: where, - }) - await arb.prune(this.npm.flatOptions) + log: this.npm.log, + } + const arb = new Arborist(opts) + await arb.prune(opts) await reifyFinish(this.npm, arb) } } diff --git a/deps/npm/lib/set-script.js b/deps/npm/lib/set-script.js index df101a0acb7090..9d4aadad558fbf 100644 --- a/deps/npm/lib/set-script.js +++ b/deps/npm/lib/set-script.js @@ -2,6 +2,7 @@ const log = require('npmlog') const fs = require('fs') const parseJSON = require('json-parse-even-better-errors') const rpj = require('read-package-json-fast') +const { resolve } = require('path') const BaseCommand = require('./base-command.js') class SetScript extends BaseCommand { @@ -20,6 +21,16 @@ class SetScript extends BaseCommand { return ['[