X Tutup
The Wayback Machine - https://web.archive.org/web/20210827210157/https://github.com/nodejs/node/commit/bc531d1860
Skip to content
Permalink
Browse files
deps: upgrade npm to 7.8.0
PR-URL: #38030
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruy Adorno <ruyadorno@github.com>
  • Loading branch information
darcyclarke authored and ruyadorno committed Apr 8, 2021
1 parent cc4ee6c commit bc531d1860e822db4e12ef424073ce438234fbe5
Showing with 2,164 additions and 4,290 deletions.
  1. +49 −0 deps/npm/CHANGELOG.md
  2. +13 −0 deps/npm/docs/content/commands/npm-docs.md
  3. +13 −0 deps/npm/docs/content/commands/npm-repo.md
  4. +14 −1 deps/npm/docs/content/commands/npm-set-script.md
  5. +1 −2 deps/npm/docs/content/commands/npm-view.md
  6. +5 −1 deps/npm/docs/content/using-npm/config.md
  7. +9 −1 deps/npm/docs/output/commands/npm-docs.html
  8. +1 −1 deps/npm/docs/output/commands/npm-ls.html
  9. +9 −1 deps/npm/docs/output/commands/npm-repo.html
  10. +9 −2 deps/npm/docs/output/commands/npm-set-script.html
  11. +1 −2 deps/npm/docs/output/commands/npm-view.html
  12. +1 −1 deps/npm/docs/output/commands/npm.html
  13. +3 −1 deps/npm/docs/output/using-npm/config.html
  14. +1 −0 deps/npm/lib/base-command.js
  15. +16 −0 deps/npm/lib/docs.js
  16. +7 −5 deps/npm/lib/exec.js
  17. +16 −0 deps/npm/lib/repo.js
  18. +9 −6 deps/npm/lib/run-script.js
  19. +64 −17 deps/npm/lib/set-script.js
  20. +41 −16 deps/npm/lib/utils/config/definition.js
  21. +4 −1 deps/npm/lib/utils/config/definitions.js
  22. +9 −2 deps/npm/lib/utils/explain-eresolve.js
  23. +124 −62 deps/npm/lib/view.js
  24. +1 −1 deps/npm/man/man1/npm-access.1
  25. +1 −1 deps/npm/man/man1/npm-adduser.1
  26. +1 −1 deps/npm/man/man1/npm-audit.1
  27. +1 −1 deps/npm/man/man1/npm-bin.1
  28. +1 −1 deps/npm/man/man1/npm-bugs.1
  29. +1 −1 deps/npm/man/man1/npm-cache.1
  30. +1 −1 deps/npm/man/man1/npm-ci.1
  31. +1 −1 deps/npm/man/man1/npm-completion.1
  32. +1 −1 deps/npm/man/man1/npm-config.1
  33. +1 −1 deps/npm/man/man1/npm-dedupe.1
  34. +1 −1 deps/npm/man/man1/npm-deprecate.1
  35. +1 −1 deps/npm/man/man1/npm-diff.1
  36. +1 −1 deps/npm/man/man1/npm-dist-tag.1
  37. +11 −1 deps/npm/man/man1/npm-docs.1
  38. +1 −1 deps/npm/man/man1/npm-doctor.1
  39. +1 −1 deps/npm/man/man1/npm-edit.1
  40. +1 −1 deps/npm/man/man1/npm-exec.1
  41. +1 −1 deps/npm/man/man1/npm-explain.1
  42. +1 −1 deps/npm/man/man1/npm-explore.1
  43. +1 −1 deps/npm/man/man1/npm-find-dupes.1
  44. +1 −1 deps/npm/man/man1/npm-fund.1
  45. +1 −1 deps/npm/man/man1/npm-help-search.1
  46. +1 −1 deps/npm/man/man1/npm-help.1
  47. +1 −1 deps/npm/man/man1/npm-hook.1
  48. +1 −1 deps/npm/man/man1/npm-init.1
  49. +1 −1 deps/npm/man/man1/npm-install-ci-test.1
  50. +1 −1 deps/npm/man/man1/npm-install-test.1
  51. +1 −1 deps/npm/man/man1/npm-install.1
  52. +1 −1 deps/npm/man/man1/npm-link.1
  53. +1 −1 deps/npm/man/man1/npm-logout.1
  54. +2 −2 deps/npm/man/man1/npm-ls.1
  55. +1 −1 deps/npm/man/man1/npm-org.1
  56. +1 −1 deps/npm/man/man1/npm-outdated.1
  57. +1 −1 deps/npm/man/man1/npm-owner.1
  58. +1 −1 deps/npm/man/man1/npm-pack.1
  59. +1 −1 deps/npm/man/man1/npm-ping.1
  60. +1 −1 deps/npm/man/man1/npm-prefix.1
  61. +1 −1 deps/npm/man/man1/npm-profile.1
  62. +1 −1 deps/npm/man/man1/npm-prune.1
  63. +1 −1 deps/npm/man/man1/npm-publish.1
  64. +1 −1 deps/npm/man/man1/npm-rebuild.1
  65. +11 −1 deps/npm/man/man1/npm-repo.1
  66. +1 −1 deps/npm/man/man1/npm-restart.1
  67. +1 −1 deps/npm/man/man1/npm-root.1
  68. +1 −1 deps/npm/man/man1/npm-run-script.1
  69. +1 −1 deps/npm/man/man1/npm-search.1
  70. +11 −2 deps/npm/man/man1/npm-set-script.1
  71. +1 −1 deps/npm/man/man1/npm-shrinkwrap.1
  72. +1 −1 deps/npm/man/man1/npm-star.1
  73. +1 −1 deps/npm/man/man1/npm-stars.1
  74. +1 −1 deps/npm/man/man1/npm-start.1
  75. +1 −1 deps/npm/man/man1/npm-stop.1
  76. +1 −1 deps/npm/man/man1/npm-team.1
  77. +1 −1 deps/npm/man/man1/npm-test.1
  78. +1 −1 deps/npm/man/man1/npm-token.1
  79. +1 −1 deps/npm/man/man1/npm-uninstall.1
  80. +1 −1 deps/npm/man/man1/npm-unpublish.1
  81. +1 −1 deps/npm/man/man1/npm-unstar.1
  82. +1 −1 deps/npm/man/man1/npm-update.1
  83. +1 −1 deps/npm/man/man1/npm-version.1
  84. +2 −3 deps/npm/man/man1/npm-view.1
  85. +1 −1 deps/npm/man/man1/npm-whoami.1
  86. +2 −2 deps/npm/man/man1/npm.1
  87. +1 −1 deps/npm/man/man1/npx.1
  88. +1 −1 deps/npm/man/man5/folders.5
  89. +1 −1 deps/npm/man/man5/install.5
  90. +1 −1 deps/npm/man/man5/npm-shrinkwrap-json.5
  91. +1 −1 deps/npm/man/man5/npmrc.5
  92. +1 −1 deps/npm/man/man5/package-json.5
  93. +1 −1 deps/npm/man/man5/package-lock-json.5
  94. +6 −2 deps/npm/man/man7/config.7
  95. +1 −1 deps/npm/man/man7/developers.7
  96. +1 −1 deps/npm/man/man7/orgs.7
  97. +1 −1 deps/npm/man/man7/registry.7
  98. +1 −1 deps/npm/man/man7/removal.7
  99. +1 −1 deps/npm/man/man7/scope.7
  100. +1 −1 deps/npm/man/man7/scripts.7
  101. +1 −1 deps/npm/man/man7/workspaces.7
  102. +7 −1 deps/npm/node_modules/@npmcli/arborist/bin/lib/options.js
  103. +93 −30 deps/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js
  104. +28 −2 deps/npm/node_modules/@npmcli/arborist/lib/arborist/load-actual.js
  105. +128 −15 deps/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js
  106. +59 −10 deps/npm/node_modules/@npmcli/arborist/lib/diff.js
  107. +13 −7 deps/npm/node_modules/@npmcli/arborist/lib/link.js
  108. +5 −2 deps/npm/node_modules/@npmcli/arborist/lib/node.js
  109. +9 −0 deps/npm/node_modules/@npmcli/arborist/lib/printable.js
  110. +46 −1 deps/npm/node_modules/@npmcli/arborist/lib/tree-check.js
  111. +2 −2 deps/npm/node_modules/@npmcli/arborist/package.json
  112. +2 −2 deps/npm/node_modules/@npmcli/config/lib/set-envs.js
  113. +1 −1 deps/npm/node_modules/@npmcli/config/package.json
  114. +0 −3 deps/npm/node_modules/json-stringify-nice/.github/FUNDING.yml
  115. +0 −23 deps/npm/node_modules/json-stringify-nice/.npmignore
  116. +1 −1 deps/npm/node_modules/json-stringify-nice/index.js
  117. +0 −3,447 deps/npm/node_modules/json-stringify-nice/package-lock.json
  118. +5 −2 deps/npm/node_modules/json-stringify-nice/package.json
  119. +0 −127 deps/npm/node_modules/json-stringify-nice/tap-snapshots/test-basic.js-TAP.test.js
  120. +0 −68 deps/npm/node_modules/json-stringify-nice/test/basic.js
  121. +3 −3 deps/npm/package.json
  122. +5 −1 deps/npm/tap-snapshots/test-lib-utils-config-describe-all.js-TAP.test.js
  123. +182 −0 deps/npm/tap-snapshots/test-lib-utils-explain-eresolve.js-TAP.test.js
  124. +18 −0 deps/npm/tap-snapshots/test-lib-utils-npm-usage.js-TAP.test.js
  125. +257 −0 deps/npm/tap-snapshots/test-lib-view.js-TAP.test.js
  126. +142 −67 deps/npm/test/fixtures/eresolve-explanations.js
  127. +113 −35 deps/npm/test/lib/docs.js
  128. +4 −5 deps/npm/test/lib/load-all-commands.js
  129. +233 −112 deps/npm/test/lib/repo.js
  130. +120 −116 deps/npm/test/lib/set-script.js
  131. +27 −1 deps/npm/test/lib/utils/config/definition.js
  132. +126 −0 deps/npm/test/lib/view.js
@@ -1,3 +1,52 @@
## v7.8.0 (2021-04-01)
### FEATURES


* [`8bcc5d73f`](https://github.com/npm/cli/commit/8bcc5d73f35434e781ff56419dd7f0c380efd072)
[#2972](https://github.com/npm/cli/issues/2972)
feat(workspaces): add repo and docs
([@wraithgar](https://github.com/wraithgar))
* [`ec520ce32`](https://github.com/npm/cli/commit/ec520ce32d5e834a32ebd58491df4200e01ce690)
[#2998](https://github.com/npm/cli/issues/2998)
feat(set-script): implement workspaces
* [`32717a60e`](https://github.com/npm/cli/commit/32717a60eb55fcf8c7e5016223bfee78a6daba0e)
[#3001](https://github.com/npm/cli/issues/3001)
feat(view): add workspace support
([@wraithgar](https://github.com/wraithgar))
* [`7b177e43f`](https://github.com/npm/cli/commit/7b177e43f3bfb558bcd8723cdb2166a3df19647a)
[#3014](https://github.com/npm/cli/issues/3014)
feat(config): add 'envExport' flag
([@isaacs](https://github.com/isaacs))

### BUG FIXES

* [`4c4252348`](https://github.com/npm/cli/commit/4c4252348c538246e1072421d65f4558dc948080)
[#3016](https://github.com/npm/cli/issues/3016)
fix(usage): specify the key each time for multiples
([@isaacs](https://github.com/isaacs))
* [`9237d375b`](https://github.com/npm/cli/commit/9237d375b0b7d34c7dc5ba70aec7f616f4133732)
[#3013](https://github.com/npm/cli/issues/3013)
fix(docs): add workspaces configuration
([@wraithgar](https://github.com/wraithgar))
* [`cb6eb0d20`](https://github.com/npm/cli/commit/cb6eb0d206b7e2f63d5c7a7a17bea4aed1b9f2bf)
[#3015](https://github.com/npm/cli/issues/3015)
fix(ERESOLVE): better errors when current is missing
([@isaacs](https://github.com/isaacs))

### DEPENDENCIES

* [`61da39beb`](https://github.com/npm/cli/commit/61da39beb5373320e2b591b61ecd6596eeaba6ed)
`@npmcli/config@2.1.0`
* feat(config): add support for envExport:false
* [`fb095a708`](https://github.com/npm/cli/commit/fb095a708a1f930bbd0195446ac611b82bfeff14)
`@npmcli/arborist@2.3.0`:
* [#2896](https://github.com/npm/cli/issues/2896) Provide currentEdge in
ERESOLVE if known, and address self-linking edge case.
* Add/remove dependencies to/from workspaces when set, not root project
* Only reify the portions of the dependency graph identified by the
`workspace` configuration value.
* Do not recursively `chown` the project root path.

## v7.7.6 (2021-03-29)

### BUG FIXES
@@ -41,6 +41,19 @@ Set to `true` to use default system URL opener.
The base URL of the npm package registry.
#### workspaces
Enables workspaces context while searching the `package.json` in the
current folder. Documentation urls for the packages named in each
workspace will be opened.
#### workspace
Enables workspaces context and limits results to only those specified by
this config item. Only the documentation urls for the packages named in
the workspaces given here will be opened.
### See Also
* [npm view](/commands/npm-view)
@@ -31,6 +31,19 @@ terminal.
Set to `true` to use default system URL opener.
#### workspaces
Enables workspaces context while searching the `package.json` in the
current folder. Repo urls for the packages named in each workspace will
be opened.
#### workspace
Enables workspaces context and limits results to only those specified by
this config item. Only the repo urls for the packages named in the
workspaces given here will be opened.
### See Also
* [npm docs](/commands/npm-docs)
@@ -5,7 +5,7 @@ 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.
An npm command that lets you create a task in the `scripts` section of the `package.json`.

```bash
npm set-script [<script>] [<command>]
@@ -26,6 +26,19 @@ npm set-script [<script>] [<command>]
}
```

### Configuration

#### workspaces

Enables workspaces context. Tasks will be created in the `scripts` section
of the `package.json` of each workspace.

#### workspace

Enables workspaces context and limits creating a task to the
`package.json` files of the workspaces given.


### See Also

* [npm run-script](/commands/npm-run-script)
@@ -14,8 +14,7 @@ aliases: info, show, v

### Description

This command shows data about a package and prints it to the stream
referenced by the `outfd` config, which defaults to stdout.
This command shows data about a package and prints it to stdout.

As an example, to view information about the `connect` package from the registry, you would run:

@@ -185,7 +185,7 @@ registry and all registries configured for scopes. See the documentation for
#### `audit-level`

* Default: null
* Type: "info", "low", "moderate", "high", "critical", "none", or null
* Type: null, "info", "low", "moderate", "high", "critical", or "none"

The minimum level of vulnerability for `npm audit` to exit with a non-zero
exit code.
@@ -1333,6 +1333,8 @@ Valid values for the `workspace` config are either: - Workspace names - Path
to a workspace directory - Path to a parent workspace directory (will result
to selecting all of the nested workspaces)

This value is not exported to the environment for child processes.

#### `workspaces`

* Default: false
@@ -1341,6 +1343,8 @@ to selecting all of the nested workspaces)
Enable running a command in the context of **all** the configured
workspaces.

This value is not exported to the environment for child processes.

#### `yes`

* Default: null
@@ -141,7 +141,7 @@ <h1 id="npm-docs">npm-docs</h1>

<section id="table_of_contents">
<h2 id="table-of-contents">Table of contents</h2>
<div id="_table_of_contents"><ul><li><a href="#synopsis">Synopsis</a></li><li><a href="#description">Description</a></li><li><a href="#configuration">Configuration</a></li><ul><li><a href="#browser">browser</a></li><li><a href="#registry">registry</a></li></ul><li><a href="#see-also">See Also</a></li></ul></div>
<div id="_table_of_contents"><ul><li><a href="#synopsis">Synopsis</a></li><li><a href="#description">Description</a></li><li><a href="#configuration">Configuration</a></li><ul><li><a href="#browser">browser</a></li><li><a href="#registry">registry</a></li><li><a href="#workspaces">workspaces</a></li><li><a href="#workspace">workspace</a></li></ul><li><a href="#see-also">See Also</a></li></ul></div>
</section>

<div id="_content"><h3 id="synopsis">Synopsis</h3>
@@ -171,6 +171,14 @@ <h4 id="registry">registry</h4>
<li>Type: url</li>
</ul>
<p>The base URL of the npm package registry.</p>
<h4 id="workspaces">workspaces</h4>
<p>Enables workspaces context while searching the <code>package.json</code> in the
current folder. Documentation urls for the packages named in each
workspace will be opened.</p>
<h4 id="workspace">workspace</h4>
<p>Enables workspaces context and limits results to only those specified by
this config item. Only the documentation urls for the packages named in
the workspaces given here will be opened.</p>
<h3 id="see-also">See Also</h3>
<ul>
<li><a href="../commands/npm-view.html">npm view</a></li>
@@ -159,7 +159,7 @@ <h3 id="description">Description</h3>
the results to only the paths to the packages named. Note that nested
packages will <em>also</em> show the paths to the specified packages. For
example, running <code>npm ls promzard</code> in npm’s source tree will show:</p>
<pre lang="bash"><code>npm@7.7.6 /path/to/npm
<pre lang="bash"><code>npm@7.8.0 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5
</code></pre>
@@ -141,7 +141,7 @@ <h1 id="npm-repo">npm-repo</h1>

<section id="table_of_contents">
<h2 id="table-of-contents">Table of contents</h2>
<div id="_table_of_contents"><ul><li><a href="#synopsis">Synopsis</a></li><li><a href="#description">Description</a></li><li><a href="#configuration">Configuration</a></li><ul><li><a href="#browser">browser</a></li></ul><li><a href="#see-also">See Also</a></li></ul></div>
<div id="_table_of_contents"><ul><li><a href="#synopsis">Synopsis</a></li><li><a href="#description">Description</a></li><li><a href="#configuration">Configuration</a></li><ul><li><a href="#browser">browser</a></li><li><a href="#workspaces">workspaces</a></li><li><a href="#workspace">workspace</a></li></ul><li><a href="#see-also">See Also</a></li></ul></div>
</section>

<div id="_content"><h3 id="synopsis">Synopsis</h3>
@@ -162,6 +162,14 @@ <h4 id="browser">browser</h4>
<p>Set to <code>false</code> to suppress browser behavior and instead print urls to
terminal.</p>
<p>Set to <code>true</code> to use default system URL opener.</p>
<h4 id="workspaces">workspaces</h4>
<p>Enables workspaces context while searching the <code>package.json</code> in the
current folder. Repo urls for the packages named in each workspace will
be opened.</p>
<h4 id="workspace">workspace</h4>
<p>Enables workspaces context and limits results to only those specified by
this config item. Only the repo urls for the packages named in the
workspaces given here will be opened.</p>
<h3 id="see-also">See Also</h3>
<ul>
<li><a href="../commands/npm-docs.html">npm docs</a></li>
@@ -141,11 +141,11 @@ <h1 id="npm-set-script">npm-set-script</h1>

<section id="table_of_contents">
<h2 id="table-of-contents">Table of contents</h2>
<div id="_table_of_contents"><ul><li><a href="#synopsis">Synopsis</a></li><li><a href="#see-also">See Also</a></li></ul></div>
<div id="_table_of_contents"><ul><li><a href="#synopsis">Synopsis</a></li><li><a href="#configuration">Configuration</a></li><ul><li><a href="#workspaces">workspaces</a></li><li><a href="#workspace">workspace</a></li></ul><li><a href="#see-also">See Also</a></li></ul></div>
</section>

<div id="_content"><h3 id="synopsis">Synopsis</h3>
<p>An npm command that lets you create a task in the scripts section of the package.json.</p>
<p>An npm command that lets you create a task in the <code>scripts</code> section of the <code>package.json</code>.</p>
<pre lang="bash"><code>npm set-script [&lt;script&gt;] [&lt;command&gt;]
</code></pre>
<p><strong>Example:</strong></p>
@@ -160,6 +160,13 @@ <h2 id="table-of-contents">Table of contents</h2>
}
}
</code></pre>
<h3 id="configuration">Configuration</h3>
<h4 id="workspaces">workspaces</h4>
<p>Enables workspaces context. Tasks will be created in the <code>scripts</code> section
of the <code>package.json</code> of each workspace.</p>
<h4 id="workspace">workspace</h4>
<p>Enables workspaces context and limits creating a task to the
<code>package.json</code> files of the workspaces given.</p>
<h3 id="see-also">See Also</h3>
<ul>
<li><a href="../commands/npm-run-script.html">npm run-script</a></li>
@@ -150,8 +150,7 @@ <h2 id="table-of-contents">Table of contents</h2>
aliases: info, show, v
</code></pre>
<h3 id="description">Description</h3>
<p>This command shows data about a package and prints it to the stream
referenced by the <code>outfd</code> config, which defaults to stdout.</p>
<p>This command shows data about a package and prints it to stdout.</p>
<p>As an example, to view information about the <code>connect</code> package from the registry, you would run:</p>
<pre lang="bash"><code>npm view connect
</code></pre>
@@ -148,7 +148,7 @@ <h2 id="table-of-contents">Table of contents</h2>
<pre lang="bash"><code>npm &lt;command&gt; [args]
</code></pre>
<h3 id="version">Version</h3>
<p>7.7.6</p>
<p>7.8.0</p>
<h3 id="description">Description</h3>
<p>npm is the package manager for the Node JavaScript platform. It puts
modules in place so that node can find them, and manages dependency
@@ -297,7 +297,7 @@ <h4 id="audit"><code>audit</code></h4>
<h4 id="audit-level"><code>audit-level</code></h4>
<ul>
<li>Default: null</li>
<li>Type: “info”, “low”, “moderate”, “high”, “critical”, “none”, or null</li>
<li>Type: null, “info”, “low”, “moderate”, “high”, “critical”, or “none”</li>
</ul>
<p>The minimum level of vulnerability for <code>npm audit</code> to exit with a non-zero
exit code.</p>
@@ -1262,13 +1262,15 @@ <h4 id="workspace"><code>workspace</code></h4>
<p>Valid values for the <code>workspace</code> config are either: - Workspace names - Path
to a workspace directory - Path to a parent workspace directory (will result
to selecting all of the nested workspaces)</p>
<p>This value is not exported to the environment for child processes.</p>
<h4 id="workspaces"><code>workspaces</code></h4>
<ul>
<li>Default: false</li>
<li>Type: Boolean</li>
</ul>
<p>Enable running a command in the context of <strong>all</strong> the configured
workspaces.</p>
<p>This value is not exported to the environment for child processes.</p>
<h4 id="yes"><code>yes</code></h4>
<ul>
<li>Default: null</li>
@@ -27,6 +27,7 @@ class BaseCommand {
usage = `${usage}${this.constructor.usage.map(u => `npm ${this.constructor.name} ${u}`).join('\n')}`

if (this.constructor.params)
// TODO word wrap this along params boundaries
usage = `${usage}\n\nOptions:\n[${this.constructor.params.map(p => ConfigDefinitions[p].usage).join('] [')}]`

// Mostly this just appends aliases, this could be more clear
@@ -2,6 +2,7 @@ const log = require('npmlog')
const pacote = require('pacote')
const openUrl = require('./utils/open-url.js')
const hostedFromMani = require('./utils/hosted-git-info-from-manifest.js')
const getWorkspaces = require('./workspaces/get-workspaces.js')

const BaseCommand = require('./base-command.js')
class Docs extends BaseCommand {
@@ -15,6 +16,11 @@ class Docs extends BaseCommand {
return 'docs'
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get params () {
return ['browser', 'registry', 'workspace', 'workspaces']
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get usage () {
return ['[<pkgname> [<pkgname> ...]]']
@@ -24,13 +30,23 @@ class Docs extends BaseCommand {
this.docs(args).then(() => cb()).catch(cb)
}

execWorkspaces (args, filters, cb) {
this.docsWorkspaces(args, filters).then(() => cb()).catch(cb)
}

async docs (args) {
if (!args || !args.length)
args = ['.']

await Promise.all(args.map(pkg => this.getDocs(pkg)))
}

async docsWorkspaces (args, filters) {
const workspaces =
await getWorkspaces(filters, { path: this.npm.localPrefix })
return this.docs([...workspaces.values()])
}

async getDocs (pkg) {
const opts = { ...this.npm.flatOptions, fullMetadata: true }
const mani = await pacote.manifest(pkg, opts)
@@ -53,6 +53,11 @@ class Exec extends BaseCommand {
return 'Run a command from a local or remote npm package'
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get params () {
return ['workspace', 'workspaces']
}

/* istanbul ignore next - see test/lib/load-all-commands.js */
static get name () {
return 'exec'
@@ -339,12 +344,9 @@ class Exec extends BaseCommand {
.slice(0, 16)
}

async workspaces (filters) {
return getWorkspaces(filters, { path: this.npm.localPrefix })
}

async _execWorkspaces (args, filters) {
const workspaces = await this.workspaces(filters)
const workspaces =
await getWorkspaces(filters, { path: this.npm.localPrefix })
const getLocationMsg = async path => {
const color = this.npm.config.get('color')
const colorize = color ? chalk : nocolor

0 comments on commit bc531d1

Please sign in to comment.
X Tutup