diff options
author | Ruy Adorno <ruyadorno@hotmail.com> | 2021-04-29 16:30:06 -0400 |
---|---|---|
committer | Ruy Adorno <ruyadorno@hotmail.com> | 2021-04-30 17:39:15 -0400 |
commit | c975dff3c0f0f1ecb1574f3b10dd1d135a7704db (patch) | |
tree | 9cf2326029ecd81a0e37aac5697589b5b0322683 /deps/npm/man | |
parent | ff4e782c0866f75beeab6e875f1b3c917c6e4569 (diff) | |
download | node-new-c975dff3c0f0f1ecb1574f3b10dd1d135a7704db.tar.gz |
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/man')
-rw-r--r-- | deps/npm/man/man1/npm-adduser.1 | 20 | ||||
-rw-r--r-- | deps/npm/man/man1/npm-exec.1 | 8 | ||||
-rw-r--r-- | deps/npm/man/man1/npm-init.1 | 147 | ||||
-rw-r--r-- | deps/npm/man/man1/npm-ls.1 | 2 | ||||
-rw-r--r-- | deps/npm/man/man1/npm-run-script.1 | 4 | ||||
-rw-r--r-- | deps/npm/man/man1/npm-view.1 | 14 | ||||
-rw-r--r-- | deps/npm/man/man1/npm.1 | 2 | ||||
-rw-r--r-- | deps/npm/man/man5/package-json.5 | 2 | ||||
-rw-r--r-- | deps/npm/man/man7/config.7 | 14 |
9 files changed, 166 insertions, 47 deletions
diff --git a/deps/npm/man/man1/npm-adduser.1 b/deps/npm/man/man1/npm-adduser.1 index 9daa39292d..aa7d0e5e52 100644 --- a/deps/npm/man/man1/npm-adduser.1 +++ b/deps/npm/man/man1/npm-adduser.1 @@ -5,7 +5,7 @@ .P .RS 2 .nf -npm adduser [\-\-registry=url] [\-\-scope=@orgname] [\-\-always\-auth] [\-\-auth\-type=legacy] +npm adduser [\-\-registry=url] [\-\-scope=@orgname] [\-\-auth\-type=legacy] aliases: login, add\-user .fi @@ -54,24 +54,6 @@ npm adduser \-\-registry=http://myregistry\.example\.com \-\-scope=@myco .P This will set a registry for the given scope and login or create a user for that registry at the same time\. -.SS always\-auth -.P -Default: false -.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 \fB\-\-registry\fP and / or \fB\-\-scope\fP, e\.g\. -.P -.RS 2 -.nf -npm adduser \-\-registry=http://private\-registry\.example\.com \-\-always\-auth -.fi -.RE -.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 \fBalways\-auth\fP in npm help \fBconfig\fP for more details on always\-auth\. Registry\-specific configuration of \fBalways\-auth\fP takes precedence over any global configuration\. .SS auth\-type .RS 0 .IP \(bu 2 diff --git a/deps/npm/man/man1/npm-exec.1 b/deps/npm/man/man1/npm-exec.1 index 3711534c58..1ac663ff18 100644 --- a/deps/npm/man/man1/npm-exec.1 +++ b/deps/npm/man/man1/npm-exec.1 @@ -9,7 +9,7 @@ npm exec \-\- <pkg>[@<version>] [args\.\.\.] npm exec \-\-package=<pkg>[@<version>] \-\- <cmd> [args\.\.\.] npm exec \-c '<cmd> [args\.\.\.]' npm exec \-\-package=foo \-c '<cmd> [args\.\.\.]' -npm exec [\-ws] [\-w <workspace\-name] [args\.\.\.] +npm exec [\-\-ws] [\-w <workspace\-name] [args\.\.\.] npx <pkg>[@<specifier>] [args\.\.\.] npx \-p <pkg>[@<specifier>] <cmd> [args\.\.\.] @@ -205,7 +205,7 @@ workspace folder: .P .RS 2 .nf -npm exec \-ws \-\- eslint \./*\.js +npm exec \-\-ws \-\- eslint \./*\.js .fi .RE .SS Filtering workspaces @@ -317,7 +317,7 @@ children workspaces) .SS workspaces .RS 0 .IP \(bu 2 -Alias: \fB\-ws\fP +Alias: \fB\-\-ws\fP .IP \(bu 2 Type: Boolean .IP \(bu 2 @@ -343,5 +343,7 @@ npm help restart npm help stop .IP \(bu 2 npm help config +.IP \(bu 2 +npm help workspaces .RE diff --git a/deps/npm/man/man1/npm-init.1 b/deps/npm/man/man1/npm-init.1 index b3be3f35e6..b4b09e598d 100644 --- a/deps/npm/man/man1/npm-init.1 +++ b/deps/npm/man/man1/npm-init.1 @@ -6,8 +6,9 @@ .RS 2 .nf npm init [\-\-force|\-f|\-\-yes|\-y|\-\-scope] -npm init <@scope> (same as `npx <@scope>/create`) -npm init [<@scope>/]<name> (same as `npx [<@scope>/]create\-<name>`) +npm init <@scope> (same as `npm exec <@scope>/create`) +npm init [<@scope>/]<name> (same as `npm exec [<@scope>/]create\-<name>`) +npm init [\-w <dir>] [args\.\.\.] .fi .RE .SS Description @@ -16,25 +17,22 @@ npm init [<@scope>/]<name> (same as `npx [<@scope>/]create\-<name>`) package\. .P \fBinitializer\fP in this case is an npm package named \fBcreate\-<initializer>\fP, -which will be installed by \fBnpx\fP \fIhttps://npm\.im/npx\fR, and then have its +which will be installed by npm help \fBnpm\-exec\fP, and then have its main bin executed \-\- presumably creating or updating \fBpackage\.json\fP and running any other initialization\-related operations\. .P -The init command is transformed to a corresponding \fBnpx\fP operation as +The init command is transformed to a corresponding \fBnpm exec\fP operation as follows: .RS 0 .IP \(bu 2 -\fBnpm init foo\fP \-> \fBnpx create\-foo\fP +\fBnpm init foo\fP \-> \fBnpm exec create\-foo\fP .IP \(bu 2 -\fBnpm init @usr/foo\fP \-> \fBnpx @usr/create\-foo\fP +\fBnpm init @usr/foo\fP \-> \fBnpm exec @usr/create\-foo\fP .IP \(bu 2 -\fBnpm init @usr\fP \-> \fBnpx @usr/create\fP +\fBnpm init @usr\fP \-> \fBnpm exec @usr/create\fP .RE .P -Any additional options will be passed directly to the command, so \fBnpm init -foo \-\- \-\-hello\fP will map to \fBnpx create\-foo \-\-hello\fP\|\. -.P If the initializer is omitted (by just calling \fBnpm init\fP), 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 @@ -42,6 +40,21 @@ 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 \fB\-y\fP/\fB\-\-yes\fP to skip the questionnaire altogether\. If you pass \fB\-\-scope\fP, it will create a scoped package\. +.SS Forwarding additional options +.P +Any additional options will be passed directly to the command, so \fBnpm init +foo \-\- \-\-hello\fP will map to \fBnpm exec \-\- create\-foo \-\-hello\fP\|\. +.P +To better illustrate how options are forwarded, here's a more evolved +example showing options passed to both the \fBnpm cli\fR and a create package, +both following commands are equivalent: +.RS 0 +.IP \(bu 2 +\fBnpm init foo \-y \-\-registry=<url> \-\- \-\-hello \-a\fP +.IP \(bu 2 +\fBnpm exec \-y \-\-registry=<url> \-\- create\-foo \-\-hello \-a\fP + +.RE .SS Examples .P Create a new React\-based project using @@ -80,6 +93,77 @@ Generate it without having it ask any questions: $ npm init \-y .fi .RE +.SS Workspaces support +.P +It's possible to create a new workspace within your project by using the +\fBworkspace\fP config option\. When using \fBnpm init \-w <dir>\fP the cli will +create the folders and boilerplate expected while also adding a reference +to your project \fBpackage\.json\fP \fB"workspaces": []\fP property in order to make +sure that new generated \fBworkspace\fR is properly set up as such\. +.P +Given a project with no workspaces, e\.g: +.P +.RS 2 +.nf +\|\. ++\-\- package\.json +.fi +.RE +.P +You may generate a new workspace using the legacy init: +.P +.RS 2 +.nf +$ npm init \-w packages/a +.fi +.RE +.P +That will generate a new folder and \fBpackage\.json\fP file, while also updating +your top\-level \fBpackage\.json\fP to add the reference to this new workspace: +.P +.RS 2 +.nf +\|\. ++\-\- package\.json +`\-\- packages + `\-\- a + `\-\- package\.json +.fi +.RE +.P +The workspaces init also supports the \fBnpm init <initializer> \-w <dir>\fP +syntax, following the same set of rules explained earlier in the initial +\fBDescription\fR section of this page\. Similar to the previous example of +creating a new React\-based project using +\fBcreate\-react\-app\fP \fIhttps://npm\.im/create\-react\-app\fR, the following syntax +will make sure to create the new react app as a nested \fBworkspace\fR within your +project and configure your \fBpackage\.json\fP to recognize it as such: +.P +.RS 2 +.nf +npm init \-w packages/my\-react\-app react\-app \. +.fi +.RE +.P +This will make sure to generate your react app as expected, one important +consideration to have in mind is that \fBnpm exec\fP 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: \fBreact\-app \.\fP: +.P +.RS 2 +.nf +\|\. ++\-\- package\.json +`\-\- packages + +\-\- a + | `\-\- package\.json + `\-\- my\-react\-app + +\-\- README + +\-\- package\.json + `\-\- \.\.\. +.fi +.RE .SS A note on caching .P The npm cli utilizes its internal package cache when using the package @@ -98,6 +182,47 @@ requested from the server\. To force full offline mode, use \fBoffline\fP\|\. .P Forces full offline mode\. Any packages not locally cached will result in an error\. +.SS workspace +.RS 0 +.IP \(bu 2 +Alias: \fB\-w\fP +.IP \(bu 2 +Type: Array +.IP \(bu 2 +Default: \fB[]\fP + +.RE +.P +Enable running \fBnpm init\fP in the context of workspaces, creating any missing +folders, generating files and adding/updating the \fB"workspaces"\fP property of +the project \fBpackage\.json\fP\|\. +.P +the provided names or paths provided\. +.P +Valid values for the \fBworkspace\fP config are either: +.RS 0 +.IP \(bu 2 +Workspace names +.IP \(bu 2 +Path to a workspace directory +.IP \(bu 2 +Path to a parent workspace directory (will result to selecting all of the +children workspaces) + +.RE +.SS workspaces +.RS 0 +.IP \(bu 2 +Alias: \fB\-ws\fP +.IP \(bu 2 +Type: Boolean +.IP \(bu 2 +Default: \fBfalse\fP + +.RE +.P +Run \fBnpm init\fP in the context of all configured workspaces for the +current project\. .SS See Also .RS 0 .IP \(bu 2 @@ -110,5 +235,7 @@ npm help version npm help scope .IP \(bu 2 npm help exec +.IP \(bu 2 +npm help workspaces .RE diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1 index 6f1041b8dc..2d4720ad8a 100644 --- a/deps/npm/man/man1/npm-ls.1 +++ b/deps/npm/man/man1/npm-ls.1 @@ -26,7 +26,7 @@ example, running \fBnpm ls promzard\fP in npm's source tree will show: .P .RS 2 .nf -npm@7\.10\.0 /path/to/npm +npm@7\.11\.2 /path/to/npm └─┬ init\-package\-json@0\.0\.4 └── promzard@0\.1\.5 .fi diff --git a/deps/npm/man/man1/npm-run-script.1 b/deps/npm/man/man1/npm-run-script.1 index b108b5491f..53b88e6fab 100644 --- a/deps/npm/man/man1/npm-run-script.1 +++ b/deps/npm/man/man1/npm-run-script.1 @@ -221,7 +221,7 @@ children workspaces) .SS workspaces .RS 0 .IP \(bu 2 -Alias: \fB\-ws\fP +Alias: \fB\-\-ws\fP .IP \(bu 2 Type: Boolean .IP \(bu 2 @@ -245,5 +245,7 @@ npm help restart npm help stop .IP \(bu 2 npm help config +.IP \(bu 2 +npm help workspaces .RE diff --git a/deps/npm/man/man1/npm-view.1 b/deps/npm/man/man1/npm-view.1 index 5ecf798513..498821fbb6 100644 --- a/deps/npm/man/man1/npm-view.1 +++ b/deps/npm/man/man1/npm-view.1 @@ -111,6 +111,20 @@ this: npm view connect versions .fi .RE +.SS Configuration +.SS json +.P +Show information in JSON format\. See \fBOutput\fP \fI#output\fR below\. +.SS workspaces +.P +Enables workspaces context while searching the \fBpackage\.json\fP in the +current folder\. Information about packages named in each workspace will +be viewed\. +.SS workspace +.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\. .SS Output .P If only a single string field for a single version is output, then it diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1 index 595b8e6847..8dbeca5362 100644 --- a/deps/npm/man/man1/npm.1 +++ b/deps/npm/man/man1/npm.1 @@ -10,7 +10,7 @@ npm <command> [args] .RE .SS Version .P -7\.10\.0 +7\.11\.2 .SS Description .P npm is the package manager for the Node JavaScript platform\. It puts diff --git a/deps/npm/man/man5/package-json.5 b/deps/npm/man/man5/package-json.5 index 9943296b25..a882e445ca 100644 --- a/deps/npm/man/man5/package-json.5 +++ b/deps/npm/man/man5/package-json.5 @@ -437,6 +437,8 @@ would be the same as this: Please make sure that your file(s) referenced in \fBbin\fP starts with \fB#!/usr/bin/env node\fP, otherwise the scripts are started without the node executable! +.P +Note that you can also set the executable files using directories\.bin \fI#directoriesbin\fR\|\. .SS man .P Specify either a single file or an array of filenames to put in place for diff --git a/deps/npm/man/man7/config.7 b/deps/npm/man/man7/config.7 index 211651fed6..522e974fc0 100644 --- a/deps/npm/man/man7/config.7 +++ b/deps/npm/man/man7/config.7 @@ -217,17 +217,6 @@ Type: Boolean .P Prevents throwing an error when \fBnpm version\fP is used to set the new version to the same value as the current version\. -.SS \fBalways\-auth\fP -.RS 0 -.IP \(bu 2 -Default: false -.IP \(bu 2 -Type: Boolean - -.RE -.P -Force npm to always require authentication when accessing the registry, even -for \fBGET\fP requests\. .SS \fBaudit\fP .RS 0 .IP \(bu 2 @@ -1455,7 +1444,8 @@ Type: null or String .RE .P -The shell to use for scripts run with the \fBnpm run\fP command\. +The shell to use for scripts run with the \fBnpm exec\fP, \fBnpm run\fP and \fBnpm +init <pkg>\fP commands\. .SS \fBsearchexclude\fP .RS 0 .IP \(bu 2 |