From 2fd04bfebb4da332f75d8c394a77df7a24f4ce05 Mon Sep 17 00:00:00 2001 From: Ruy Adorno Date: Fri, 4 Dec 2020 15:51:55 -0500 Subject: [PATCH] deps: upgrade npm to 7.1.0 --- deps/npm/AUTHORS | 1 + deps/npm/CHANGELOG.md | 34 +++ .../npm/docs/content/commands/npm-dist-tag.md | 4 +- deps/npm/docs/content/commands/npm-exec.md | 7 + .../docs/content/commands/npm-set-script.md | 34 +++ .../docs/output/commands/npm-dist-tag.html | 3 +- deps/npm/docs/output/commands/npm-exec.html | 6 + deps/npm/docs/output/commands/npm-ls.html | 2 +- .../docs/output/commands/npm-set-script.html | 184 +++++++++++ deps/npm/docs/output/commands/npm.html | 2 +- deps/npm/lib/exec.js | 48 ++- deps/npm/lib/explore.js | 76 ++--- deps/npm/lib/set-script.js | 55 ++++ deps/npm/lib/uninstall.js | 37 ++- deps/npm/lib/update.js | 5 +- deps/npm/lib/utils/cmd-list.js | 1 + deps/npm/lib/utils/depr-check.js | 22 -- deps/npm/lib/utils/escape-arg.js | 18 -- deps/npm/lib/utils/escape-exec-path.js | 21 -- deps/npm/lib/utils/package-id.js | 15 - .../pick-manifest-from-registry-metadata.js | 26 -- deps/npm/lib/utils/save-stack.js | 16 - deps/npm/lib/utils/unix-format-path.js | 5 - deps/npm/lib/utils/warn-deprecated.js | 28 -- deps/npm/man/man1/npm-access.1 | 2 +- deps/npm/man/man1/npm-adduser.1 | 2 +- deps/npm/man/man1/npm-audit.1 | 2 +- deps/npm/man/man1/npm-bin.1 | 2 +- deps/npm/man/man1/npm-bugs.1 | 2 +- deps/npm/man/man1/npm-cache.1 | 2 +- deps/npm/man/man1/npm-ci.1 | 2 +- deps/npm/man/man1/npm-completion.1 | 2 +- deps/npm/man/man1/npm-config.1 | 2 +- deps/npm/man/man1/npm-dedupe.1 | 2 +- deps/npm/man/man1/npm-deprecate.1 | 2 +- deps/npm/man/man1/npm-dist-tag.1 | 6 +- deps/npm/man/man1/npm-docs.1 | 2 +- deps/npm/man/man1/npm-doctor.1 | 2 +- deps/npm/man/man1/npm-edit.1 | 2 +- deps/npm/man/man1/npm-exec.1 | 9 +- deps/npm/man/man1/npm-explain.1 | 2 +- deps/npm/man/man1/npm-explore.1 | 2 +- deps/npm/man/man1/npm-fund.1 | 2 +- deps/npm/man/man1/npm-help-search.1 | 2 +- deps/npm/man/man1/npm-help.1 | 2 +- deps/npm/man/man1/npm-hook.1 | 2 +- deps/npm/man/man1/npm-init.1 | 2 +- deps/npm/man/man1/npm-install-ci-test.1 | 2 +- deps/npm/man/man1/npm-install-test.1 | 2 +- deps/npm/man/man1/npm-install.1 | 2 +- deps/npm/man/man1/npm-link.1 | 2 +- deps/npm/man/man1/npm-logout.1 | 2 +- deps/npm/man/man1/npm-ls.1 | 4 +- deps/npm/man/man1/npm-org.1 | 2 +- deps/npm/man/man1/npm-outdated.1 | 2 +- deps/npm/man/man1/npm-owner.1 | 2 +- deps/npm/man/man1/npm-pack.1 | 2 +- deps/npm/man/man1/npm-ping.1 | 2 +- deps/npm/man/man1/npm-prefix.1 | 2 +- deps/npm/man/man1/npm-profile.1 | 2 +- deps/npm/man/man1/npm-prune.1 | 2 +- deps/npm/man/man1/npm-publish.1 | 2 +- deps/npm/man/man1/npm-rebuild.1 | 2 +- deps/npm/man/man1/npm-repo.1 | 2 +- deps/npm/man/man1/npm-restart.1 | 2 +- deps/npm/man/man1/npm-root.1 | 2 +- deps/npm/man/man1/npm-run-script.1 | 2 +- deps/npm/man/man1/npm-search.1 | 2 +- deps/npm/man/man1/npm-set-script.1 | 43 +++ deps/npm/man/man1/npm-shrinkwrap.1 | 2 +- deps/npm/man/man1/npm-star.1 | 2 +- deps/npm/man/man1/npm-stars.1 | 2 +- deps/npm/man/man1/npm-start.1 | 2 +- deps/npm/man/man1/npm-stop.1 | 2 +- deps/npm/man/man1/npm-team.1 | 2 +- deps/npm/man/man1/npm-test.1 | 2 +- deps/npm/man/man1/npm-token.1 | 2 +- deps/npm/man/man1/npm-uninstall.1 | 2 +- deps/npm/man/man1/npm-unpublish.1 | 2 +- deps/npm/man/man1/npm-unstar.1 | 2 +- deps/npm/man/man1/npm-update.1 | 2 +- deps/npm/man/man1/npm-version.1 | 2 +- deps/npm/man/man1/npm-view.1 | 2 +- deps/npm/man/man1/npm-whoami.1 | 2 +- deps/npm/man/man1/npm.1 | 4 +- deps/npm/man/man1/npx.1 | 2 +- deps/npm/man/man5/folders.5 | 2 +- deps/npm/man/man5/install.5 | 2 +- deps/npm/man/man5/npmrc.5 | 2 +- deps/npm/man/man5/package-json.5 | 2 +- deps/npm/man/man5/package-lock-json.5 | 2 +- deps/npm/man/man5/package-locks.5 | 2 +- deps/npm/man/man5/shrinkwrap-json.5 | 2 +- deps/npm/man/man7/config.7 | 2 +- deps/npm/man/man7/developers.7 | 2 +- deps/npm/man/man7/disputes.7 | 2 +- deps/npm/man/man7/orgs.7 | 2 +- deps/npm/man/man7/registry.7 | 2 +- deps/npm/man/man7/removal.7 | 2 +- deps/npm/man/man7/scope.7 | 2 +- deps/npm/man/man7/scripts.7 | 2 +- deps/npm/man/man7/semver.7 | 2 +- deps/npm/man/man7/workspaces.7 | 2 +- .../node_modules/@npmcli/arborist/lib/node.js | 10 +- .../@npmcli/arborist/package.json | 2 +- .../node_modules/@npmcli/config/package.json | 7 +- .../node_modules/semver/classes/comparator.js | 8 +- deps/npm/node_modules/semver/classes/range.js | 63 +++- .../npm/node_modules/semver/classes/semver.js | 9 +- .../node_modules/semver/functions/parse.js | 8 +- .../semver/internal/parse-options.js | 11 + deps/npm/node_modules/semver/package.json | 7 +- .../node_modules/semver/ranges/min-version.js | 7 +- .../npm/node_modules/semver/ranges/outside.js | 2 +- deps/npm/node_modules/semver/ranges/subset.js | 15 +- deps/npm/package.json | 14 +- .../test-lib-utils-cmd-list.js-TAP.test.js | 1 + deps/npm/test/coverage-map.js | 3 +- deps/npm/test/lib/exec.js | 74 ++++- deps/npm/test/lib/explore.js | 285 +++++++++++------- deps/npm/test/lib/set-script.js | 154 ++++++++++ deps/npm/test/lib/uninstall.js | 253 ++++++++++++++++ deps/npm/test/lib/update.js | 162 ++++++++++ deps/npm/test/lib/utils/escape-arg.js | 15 - deps/npm/test/lib/utils/escape-exec-path.js | 15 - 125 files changed, 1501 insertions(+), 488 deletions(-) create mode 100644 deps/npm/docs/content/commands/npm-set-script.md create mode 100644 deps/npm/docs/output/commands/npm-set-script.html create mode 100644 deps/npm/lib/set-script.js delete mode 100644 deps/npm/lib/utils/depr-check.js delete mode 100644 deps/npm/lib/utils/escape-arg.js delete mode 100644 deps/npm/lib/utils/escape-exec-path.js delete mode 100644 deps/npm/lib/utils/package-id.js delete mode 100644 deps/npm/lib/utils/pick-manifest-from-registry-metadata.js delete mode 100644 deps/npm/lib/utils/save-stack.js delete mode 100644 deps/npm/lib/utils/unix-format-path.js delete mode 100644 deps/npm/lib/utils/warn-deprecated.js create mode 100644 deps/npm/man/man1/npm-set-script.1 create mode 100644 deps/npm/node_modules/semver/internal/parse-options.js create mode 100644 deps/npm/test/lib/set-script.js create mode 100644 deps/npm/test/lib/uninstall.js create mode 100644 deps/npm/test/lib/update.js delete mode 100644 deps/npm/test/lib/utils/escape-arg.js delete mode 100644 deps/npm/test/lib/utils/escape-exec-path.js diff --git a/deps/npm/AUTHORS b/deps/npm/AUTHORS index 33647f09277cf2..008d9099561199 100644 --- a/deps/npm/AUTHORS +++ b/deps/npm/AUTHORS @@ -738,3 +738,4 @@ Hollow Man kai zhu Alex Woollam Daniel Fischer +Yash-Singh1 diff --git a/deps/npm/CHANGELOG.md b/deps/npm/CHANGELOG.md index a3a9984d24462f..cb9f013bc32625 100644 --- a/deps/npm/CHANGELOG.md +++ b/deps/npm/CHANGELOG.md @@ -1,3 +1,37 @@ +## 7.1.0 (2020-12-04) + +### FEATURES + +* [`6b1575110`](https://github.com/npm/cli/commit/6b15751106beb99234aa4bf39ae05cf40076d42a) + [#2237](https://github.com/npm/cli/pull/2237) + add `npm set-script` command + ([@Yash-Singh1](https://github.com/Yash-Singh1)) +* [`15d7333f8`](https://github.com/npm/cli/commit/15d7333f832e3d68ae16895569f27a27ef86573e) + add interactive `npm exec` + ([@isaacs](https://github.com/isaacs)) + +### BUG FIXES + +* [`2a1192e4b`](https://github.com/npm/cli/commit/2a1192e4b03acdf6e6e24e58de68f736ab9bb35f) + [#2202](https://github.com/npm/cli/pull/2202) + Do not run interactive `npm exec` in CI when a TTY + ([@isaacs](https://github.com/isaacs)) + +### DOCUMENTATION + +* [`0599cc37d`](https://github.com/npm/cli/commit/0599cc37df453bf79d47490eb4fca3cd63f67f80) + [#2271](https://github.com/npm/cli/pull/2271) + don't wrap code block + ([@ethomson](https://github.com/ethomson)) + +### DEPENDENCIES + +* [`def85c726`](https://github.com/npm/cli/commit/def85c72640ffe2d27977c56b7aa06c6f6346ca9) + `@npmcli/arborist@1.0.14` + * fixes running `npm exec` from file system root folder +* [`4c94673ab`](https://github.com/npm/cli/commit/4c94673ab5399d27e5a48e52f7a65b038a456265) + `semver@7.3.4` + ## 7.0.15 (2020-11-27) ### DEPENDENCIES diff --git a/deps/npm/docs/content/commands/npm-dist-tag.md b/deps/npm/docs/content/commands/npm-dist-tag.md index 65ce22a179fc7f..585da16ad2d2c4 100644 --- a/deps/npm/docs/content/commands/npm-dist-tag.md +++ b/deps/npm/docs/content/commands/npm-dist-tag.md @@ -78,8 +78,8 @@ This command used to be known as `npm tag`, which only created new tags, and so had a different syntax. Tags must share a namespace with version numbers, because they are -specified in the same slot: `npm install @` vs `npm install -@`. +specified in the same slot: `npm install @` vs +`npm install @`. Tags that can be interpreted as valid semver ranges will be rejected. For example, `v1.4` cannot be used as a tag, because it is interpreted by diff --git a/deps/npm/docs/content/commands/npm-exec.md b/deps/npm/docs/content/commands/npm-exec.md index c9de9933be3a55..3ae30fa0cba9a7 100644 --- a/deps/npm/docs/content/commands/npm-exec.md +++ b/deps/npm/docs/content/commands/npm-exec.md @@ -16,9 +16,11 @@ npx [@] [args...] npx -p [@] [args...] npx -c ' [args...]' npx -p [@] -c ' [args...]' +Run without --call or positional args to open interactive subshell alias: npm x, npx +common options: --package= (may be specified multiple times) -p is a shorthand for --package only when using npx executable -c --call= (may not be mixed with positional arguments) @@ -30,6 +32,11 @@ This command allows you to run an arbitrary command from an npm package (either one installed locally, or fetched remotely), in a similar context as running it via `npm run`. +Run without positional arguments or `--call`, this allows you to +interactively run commands in the same sort of shell environment that +`package.json` scripts are run. Interactive mode is not supported in CI +environments when standard input is a TTY, to prevent hangs. + Whatever packages are specified by the `--package` option will be provided in the `PATH` of the executed command, along with any locally installed package executables. The `--package` option may be diff --git a/deps/npm/docs/content/commands/npm-set-script.md b/deps/npm/docs/content/commands/npm-set-script.md new file mode 100644 index 00000000000000..7bc8f75d236537 --- /dev/null +++ b/deps/npm/docs/content/commands/npm-set-script.md @@ -0,0 +1,34 @@ +--- +title: npm-set-script +section: 1 +description: Set tasks in the scripts section of package.json +--- + +### Synopsis +An npm command that lets you create a task in the scripts section of the package.json. + +```bash +npm set-script [