Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuy Adorno <ruyadorno@hotmail.com>2021-04-29 23:30:06 +0300
committerRuy Adorno <ruyadorno@hotmail.com>2021-05-01 00:39:15 +0300
commitc975dff3c0f0f1ecb1574f3b10dd1d135a7704db (patch)
tree9cf2326029ecd81a0e37aac5697589b5b0322683 /deps/npm/docs/output/commands
parentff4e782c0866f75beeab6e875f1b3c917c6e4569 (diff)
deps: upgrade npm to 7.11.2
PR-URL: https://github.com/nodejs/node/pull/38475 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com>
Diffstat (limited to 'deps/npm/docs/output/commands')
-rw-r--r--deps/npm/docs/output/commands/npm-adduser.html15
-rw-r--r--deps/npm/docs/output/commands/npm-exec.html7
-rw-r--r--deps/npm/docs/output/commands/npm-init.html98
-rw-r--r--deps/npm/docs/output/commands/npm-ls.html2
-rw-r--r--deps/npm/docs/output/commands/npm-run-script.html3
-rw-r--r--deps/npm/docs/output/commands/npm-view.html13
-rw-r--r--deps/npm/docs/output/commands/npm.html2
7 files changed, 111 insertions, 29 deletions
diff --git a/deps/npm/docs/output/commands/npm-adduser.html b/deps/npm/docs/output/commands/npm-adduser.html
index a079dfed71e..49484470814 100644
--- a/deps/npm/docs/output/commands/npm-adduser.html
+++ b/deps/npm/docs/output/commands/npm-adduser.html
@@ -141,11 +141,11 @@ npm command-line interface
<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="#registry">registry</a></li><li><a href="#scope">scope</a></li><li><a href="#always-auth">always-auth</a></li><li><a href="#auth-type">auth-type</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="#registry">registry</a></li><li><a href="#scope">scope</a></li><li><a href="#auth-type">auth-type</a></li></ul><li><a href="#see-also">See Also</a></li></ul></div>
</section>
<div id="_content"><h3 id="synopsis">Synopsis</h3>
-<pre lang="bash"><code>npm adduser [--registry=url] [--scope=@orgname] [--always-auth] [--auth-type=legacy]
+<pre lang="bash"><code>npm adduser [--registry=url] [--scope=@orgname] [--auth-type=legacy]
aliases: login, add-user
</code></pre>
@@ -177,17 +177,6 @@ e.g.</p>
</code></pre>
<p>This will set a registry for the given scope and login or create a user for
that registry at the same time.</p>
-<h4 id="always-auth">always-auth</h4>
-<p>Default: false</p>
-<p>If specified, save configuration indicating that all requests to the given
-registry should include authorization information. Useful for private
-registries. Can be used with <code>--registry</code> and / or <code>--scope</code>, e.g.</p>
-<pre lang="bash"><code>npm adduser --registry=http://private-registry.example.com --always-auth
-</code></pre>
-<p>This will ensure that all requests to that registry (including for tarballs)
-include an authorization header. This setting may be necessary for use with
-private registries where metadata and package tarballs are stored on hosts with
-different hostnames. See <code>always-auth</code> in <a href="../using-npm/config.html"><code>config</code></a> for more details on always-auth. Registry-specific configuration of <code>always-auth</code> takes precedence over any global configuration.</p>
<h4 id="auth-type">auth-type</h4>
<ul>
<li>Default: <code>'legacy'</code></li>
diff --git a/deps/npm/docs/output/commands/npm-exec.html b/deps/npm/docs/output/commands/npm-exec.html
index f8f882a2c54..528f5a571cf 100644
--- a/deps/npm/docs/output/commands/npm-exec.html
+++ b/deps/npm/docs/output/commands/npm-exec.html
@@ -149,7 +149,7 @@ npm command-line interface
npm exec --package=&lt;pkg&gt;[@&lt;version&gt;] -- &lt;cmd&gt; [args...]
npm exec -c '&lt;cmd&gt; [args...]'
npm exec --package=foo -c '&lt;cmd&gt; [args...]'
-npm exec [-ws] [-w &lt;workspace-name] [args...]
+npm exec [--ws] [-w &lt;workspace-name] [args...]
npx &lt;pkg&gt;[@&lt;specifier&gt;] [args...]
npx -p &lt;pkg&gt;[@&lt;specifier&gt;] &lt;cmd&gt; [args...]
@@ -276,7 +276,7 @@ at a time.</p>
the configured workspaces when using the <code>workspaces</code> configuration options,
in this example we’re using <strong>eslint</strong> to lint any js file found within each
workspace folder:</p>
-<pre><code>npm exec -ws -- eslint ./*.js
+<pre><code>npm exec --ws -- eslint ./*.js
</code></pre>
<h4 id="filtering-workspaces">Filtering workspaces</h4>
<p>It’s also possible to execute a command in a single workspace using the
@@ -348,7 +348,7 @@ children workspaces)</li>
</ul>
<h4 id="workspaces">workspaces</h4>
<ul>
-<li>Alias: <code>-ws</code></li>
+<li>Alias: <code>--ws</code></li>
<li>Type: Boolean</li>
<li>Default: <code>false</code></li>
</ul>
@@ -363,6 +363,7 @@ project.</p>
<li><a href="../commands/npm-restart.html">npm restart</a></li>
<li><a href="../commands/npm-stop.html">npm stop</a></li>
<li><a href="../commands/npm-config.html">npm config</a></li>
+<li><a href="../using-npm/workspaces.html">npm workspaces</a></li>
</ul>
</div>
diff --git a/deps/npm/docs/output/commands/npm-init.html b/deps/npm/docs/output/commands/npm-init.html
index 62dc20093b2..1aa0408baff 100644
--- a/deps/npm/docs/output/commands/npm-init.html
+++ b/deps/npm/docs/output/commands/npm-init.html
@@ -141,29 +141,29 @@ npm command-line interface
<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="#examples">Examples</a></li><li><a href="#a-note-on-caching">A note on caching</a></li><ul><li><a href="#prefer-online">prefer-online</a></li><li><a href="#prefer-offline">prefer-offline</a></li><li><a href="#offline">offline</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><ul><li><a href="#forwarding-additional-options">Forwarding additional options</a></li></ul><li><a href="#examples">Examples</a></li><li><a href="#workspaces-support">Workspaces support</a></li><li><a href="#a-note-on-caching">A note on caching</a></li><ul><li><a href="#prefer-online">prefer-online</a></li><li><a href="#prefer-offline">prefer-offline</a></li><li><a href="#offline">offline</a></li><li><a href="#workspace">workspace</a></li><li><a href="#workspaces">workspaces</a></li></ul><li><a href="#see-also">See Also</a></li></ul></div>
</section>
<div id="_content"><h3 id="synopsis">Synopsis</h3>
<pre lang="bash"><code>npm init [--force|-f|--yes|-y|--scope]
-npm init &lt;@scope&gt; (same as `npx &lt;@scope&gt;/create`)
-npm init [&lt;@scope&gt;/]&lt;name&gt; (same as `npx [&lt;@scope&gt;/]create-&lt;name&gt;`)
+npm init &lt;@scope&gt; (same as `npm exec &lt;@scope&gt;/create`)
+npm init [&lt;@scope&gt;/]&lt;name&gt; (same as `npm exec [&lt;@scope&gt;/]create-&lt;name&gt;`)
+npm init [-w &lt;dir&gt;] [args...]
</code></pre>
<h3 id="description">Description</h3>
<p><code>npm init &lt;initializer&gt;</code> can be used to set up a new or existing npm
package.</p>
<p><code>initializer</code> in this case is an npm package named <code>create-&lt;initializer&gt;</code>,
-which will be installed by <a href="https://npm.im/npx"><code>npx</code></a>, and then have its
+which will be installed by <a href="../commands/npm-exec.html"><code>npm-exec</code></a>, and then have its
main bin executed – presumably creating or updating <code>package.json</code> and
running any other initialization-related operations.</p>
-<p>The init command is transformed to a corresponding <code>npx</code> operation as
+<p>The init command is transformed to a corresponding <code>npm exec</code> operation as
follows:</p>
<ul>
-<li><code>npm init foo</code> -&gt; <code>npx create-foo</code></li>
-<li><code>npm init @usr/foo</code> -&gt; <code>npx @usr/create-foo</code></li>
-<li><code>npm init @usr</code> -&gt; <code>npx @usr/create</code></li>
+<li><code>npm init foo</code> -&gt; <code>npm exec create-foo</code></li>
+<li><code>npm init @usr/foo</code> -&gt; <code>npm exec @usr/create-foo</code></li>
+<li><code>npm init @usr</code> -&gt; <code>npm exec @usr/create</code></li>
</ul>
-<p>Any additional options will be passed directly to the command, so <code>npm init foo -- --hello</code> will map to <code>npx create-foo --hello</code>.</p>
<p>If the initializer is omitted (by just calling <code>npm init</code>), init will fall
back to legacy init behavior. It will ask you a bunch of questions, and
then write a package.json for you. It will attempt to make reasonable
@@ -171,6 +171,15 @@ guesses based on existing fields, dependencies, and options selected. It is
strictly additive, so it will keep any fields and values that were already
set. You can also use <code>-y</code>/<code>--yes</code> to skip the questionnaire altogether. If
you pass <code>--scope</code>, it will create a scoped package.</p>
+<h4 id="forwarding-additional-options">Forwarding additional options</h4>
+<p>Any additional options will be passed directly to the command, so <code>npm init foo -- --hello</code> will map to <code>npm exec -- create-foo --hello</code>.</p>
+<p>To better illustrate how options are forwarded, here’s a more evolved
+example showing options passed to both the <strong>npm cli</strong> and a create package,
+both following commands are equivalent:</p>
+<ul>
+<li><code>npm init foo -y --registry=&lt;url&gt; -- --hello -a</code></li>
+<li><code>npm exec -y --registry=&lt;url&gt; -- create-foo --hello -a</code></li>
+</ul>
<h3 id="examples">Examples</h3>
<p>Create a new React-based project using
<a href="https://npm.im/create-react-app"><code>create-react-app</code></a>:</p>
@@ -189,6 +198,51 @@ $ npm init
<p>Generate it without having it ask any questions:</p>
<pre lang="bash"><code>$ npm init -y
</code></pre>
+<h3 id="workspaces-support">Workspaces support</h3>
+<p>It’s possible to create a new workspace within your project by using the
+<code>workspace</code> config option. When using <code>npm init -w &lt;dir&gt;</code> the cli will
+create the folders and boilerplate expected while also adding a reference
+to your project <code>package.json</code> <code>"workspaces": []</code> property in order to make
+sure that new generated <strong>workspace</strong> is properly set up as such.</p>
+<p>Given a project with no workspaces, e.g:</p>
+<pre><code>.
++-- package.json
+</code></pre>
+<p>You may generate a new workspace using the legacy init:</p>
+<pre lang="bash"><code>$ npm init -w packages/a
+</code></pre>
+<p>That will generate a new folder and <code>package.json</code> file, while also updating
+your top-level <code>package.json</code> to add the reference to this new workspace:</p>
+<pre><code>.
++-- package.json
+`-- packages
+ `-- a
+ `-- package.json
+</code></pre>
+<p>The workspaces init also supports the <code>npm init &lt;initializer&gt; -w &lt;dir&gt;</code>
+syntax, following the same set of rules explained earlier in the initial
+<strong>Description</strong> section of this page. Similar to the previous example of
+creating a new React-based project using
+<a href="https://npm.im/create-react-app"><code>create-react-app</code></a>, the following syntax
+will make sure to create the new react app as a nested <strong>workspace</strong> within your
+project and configure your <code>package.json</code> to recognize it as such:</p>
+<pre lang="bash"><code>npm init -w packages/my-react-app react-app .
+</code></pre>
+<p>This will make sure to generate your react app as expected, one important
+consideration to have in mind is that <code>npm exec</code> is going to be run in the
+context of the newly created folder for that workspace, and that’s the reason
+why in this example the initializer uses the initializer name followed with a
+dot to represent the current directory in that context, e.g: <code>react-app .</code>:</p>
+<pre><code>.
++-- package.json
+`-- packages
+ +-- a
+ | `-- package.json
+ `-- my-react-app
+ +-- README
+ +-- package.json
+ `-- ...
+</code></pre>
<h3 id="a-note-on-caching">A note on caching</h3>
<p>The npm cli utilizes its internal package cache when using the package
name specified. You can use the following to change how and when the
@@ -203,6 +257,31 @@ requested from the server. To force full offline mode, use <code>offline</code>.
<h4 id="offline">offline</h4>
<p>Forces full offline mode. Any packages not locally cached will result in
an error.</p>
+<h4 id="workspace">workspace</h4>
+<ul>
+<li>Alias: <code>-w</code></li>
+<li>Type: Array</li>
+<li>Default: <code>[]</code></li>
+</ul>
+<p>Enable running <code>npm init</code> in the context of workspaces, creating any missing
+folders, generating files and adding/updating the <code>"workspaces"</code> property of
+the project <code>package.json</code>.</p>
+<p>the provided names or paths provided.</p>
+<p>Valid values for the <code>workspace</code> config are either:</p>
+<ul>
+<li>Workspace names</li>
+<li>Path to a workspace directory</li>
+<li>Path to a parent workspace directory (will result to selecting all of the
+children workspaces)</li>
+</ul>
+<h4 id="workspaces">workspaces</h4>
+<ul>
+<li>Alias: <code>-ws</code></li>
+<li>Type: Boolean</li>
+<li>Default: <code>false</code></li>
+</ul>
+<p>Run <code>npm init</code> in the context of all configured workspaces for the
+current project.</p>
<h3 id="see-also">See Also</h3>
<ul>
<li><a href="http://npm.im/init-package-json">init-package-json module</a></li>
@@ -210,6 +289,7 @@ an error.</p>
<li><a href="../commands/npm-version.html">npm version</a></li>
<li><a href="../using-npm/scope.html">npm scope</a></li>
<li><a href="../commands/npm-exec.html">npm exec</a></li>
+<li><a href="../using-npm/workspaces.html">npm workspaces</a></li>
</ul>
</div>
diff --git a/deps/npm/docs/output/commands/npm-ls.html b/deps/npm/docs/output/commands/npm-ls.html
index 5e2f75138a6..ede5cb04290 100644
--- a/deps/npm/docs/output/commands/npm-ls.html
+++ b/deps/npm/docs/output/commands/npm-ls.html
@@ -159,7 +159,7 @@ tree at all, use <a href="../commands/npm-explain.html"><code>npm explain</code>
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.10.0 /path/to/npm
+<pre lang="bash"><code>npm@7.11.2 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5
</code></pre>
diff --git a/deps/npm/docs/output/commands/npm-run-script.html b/deps/npm/docs/output/commands/npm-run-script.html
index 6fc343dfbaf..1e47bfec108 100644
--- a/deps/npm/docs/output/commands/npm-run-script.html
+++ b/deps/npm/docs/output/commands/npm-run-script.html
@@ -282,7 +282,7 @@ children workspaces)</li>
</ul>
<h4 id="workspaces">workspaces</h4>
<ul>
-<li>Alias: <code>-ws</code></li>
+<li>Alias: <code>--ws</code></li>
<li>Type: Boolean</li>
<li>Default: <code>false</code></li>
</ul>
@@ -296,6 +296,7 @@ project.</p>
<li><a href="../commands/npm-restart.html">npm restart</a></li>
<li><a href="../commands/npm-stop.html">npm stop</a></li>
<li><a href="../commands/npm-config.html">npm config</a></li>
+<li><a href="../using-npm/workspaces.html">npm workspaces</a></li>
</ul>
</div>
diff --git a/deps/npm/docs/output/commands/npm-view.html b/deps/npm/docs/output/commands/npm-view.html
index d3a1251673c..7489b17b1cd 100644
--- a/deps/npm/docs/output/commands/npm-view.html
+++ b/deps/npm/docs/output/commands/npm-view.html
@@ -141,7 +141,7 @@ npm command-line interface
<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="#output">Output</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="#description">Description</a></li><li><a href="#configuration">Configuration</a></li><ul><li><a href="#json">json</a></li><li><a href="#workspaces">workspaces</a></li><li><a href="#workspace">workspace</a></li></ul><li><a href="#output">Output</a></li><li><a href="#see-also">See Also</a></li></ul></div>
</section>
<div id="_content"><h3 id="synopsis">Synopsis</h3>
@@ -198,6 +198,17 @@ was required by each matching version of <code>yui3</code>:</p>
this:</p>
<pre lang="bash"><code>npm view connect versions
</code></pre>
+<h3 id="configuration">Configuration</h3>
+<h4 id="json">json</h4>
+<p>Show information in JSON format. See <a href="#output"><code>Output</code></a> below.</p>
+<h4 id="workspaces">workspaces</h4>
+<p>Enables workspaces context while searching the <code>package.json</code> in the
+current folder. Information about packages named in each workspace will
+be viewed.</p>
+<h4 id="workspace">workspace</h4>
+<p>Enables workspaces context and limits results to only those specified by
+this config item. Only the information about packages named in the
+workspaces given here will be viewed.</p>
<h3 id="output">Output</h3>
<p>If only a single string field for a single version is output, then it
will not be colorized or quoted, to enable piping the output to
diff --git a/deps/npm/docs/output/commands/npm.html b/deps/npm/docs/output/commands/npm.html
index dde689df3ee..311c581f681 100644
--- a/deps/npm/docs/output/commands/npm.html
+++ b/deps/npm/docs/output/commands/npm.html
@@ -148,7 +148,7 @@ npm command-line interface
<pre lang="bash"><code>npm &lt;command&gt; [args]
</code></pre>
<h3 id="version">Version</h3>
-<p>7.10.0</p>
+<p>7.11.2</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