CLI documentation update from CI

npm CLI robot committed May 15, 2025 at 17:06 UTC 12b0c656571921974f932ae50a994e9e8169332e
35 files changed +162 -72
cli-cache.json
+1 -1
@@ -2,5 +2,5 @@
2 "v8": "aa8fff11cdab94fff1a2160ee5241f5f4632e96b",
3 "v9": "64763a341e7aa5b456e696f956759bf9b3440dc1",
4 "v10": "e510f14bf6a20d67e7b37c3f25ff271d9f7a0da5",
5 - "v11": "b5173d13c182efa5434ef4ca413e62ce1437f47a"
5 + "v11": "3d90a4936ec3324ff5b1642b20588c6d57ab04a5"
6 }
\ No newline at end of file
content/cli/v11/commands/npm-adduser.mdx
+2
@@ -49,6 +49,8 @@ Note: This command is unaware of workspaces.
49
50 Create a new user in the specified registry, and save the credentials to the `.npmrc` file. If no registry is specified, the default registry will be used (see [`registry`](/cli/v11/using-npm/registry)).
51
52 +When you run `npm adduser`, the CLI automatically generates a legacy token of `publish` type. For more information, see [About legacy tokens](/about-access-tokens#about-legacy-tokens).
53 +
54 When using `legacy` for your `auth-type`, the username, password, and email are read in from prompts.
55
56 ### Configuration
content/cli/v11/commands/npm-audit.mdx
+1 -1
@@ -323,7 +323,7 @@ Note that this will generally make installs run slower, and be much noisier, but
323
324 If true, npm does not run scripts specified in package.json files.
325
326 -Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
326 +Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
327
328 #### `workspace`
329
content/cli/v11/commands/npm-ci.mdx
+1 -1
@@ -163,7 +163,7 @@ Note that this will generally make installs run slower, and be much noisier, but
163
164 If true, npm does not run scripts specified in package.json files.
165
166 -Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
166 +Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
167
168 #### `audit`
169
content/cli/v11/commands/npm-dedupe.mdx
+1 -1
@@ -166,7 +166,7 @@ Dependency types specified in `--include` will not be omitted, regardless of the
166
167 If true, npm does not run scripts specified in package.json files.
168
169 -Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
169 +Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
170
171 #### `audit`
172
content/cli/v11/commands/npm-exec.mdx
+1 -1
@@ -293,7 +293,7 @@ Run scripts in the context of all configured workspaces for the current project.
293
294 ### See Also
295
296 -- [npm run-script](/cli/v11/commands/npm-run-script)
296 +- [npm run](/cli/v11/commands/npm-run)
297 - [npm scripts](/cli/v11/using-npm/scripts)
298 - [npm test](/cli/v11/commands/npm-test)
299 - [npm start](/cli/v11/commands/npm-start)
content/cli/v11/commands/npm-find-dupes.mdx
+1 -1
@@ -119,7 +119,7 @@ Dependency types specified in `--include` will not be omitted, regardless of the
119
120 If true, npm does not run scripts specified in package.json files.
121
122 -Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
122 +Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
123
124 #### `audit`
125
content/cli/v11/commands/npm-init.mdx
+13
@@ -103,6 +103,12 @@ Generate it without having it ask any questions:
103 $ npm init -y
104 ```
105
106 +Set the private flag to `true` in package.json:
107 +
108 +```bash
109 +$ npm init --init-private -y
110 +```
111 +
112 ### Workspaces support
113
114 It's possible to create a new workspace within your project by using the `workspace` config option. When using `npm init -w <dir>` the cli will create the folders and boilerplate expected while also adding a reference to your project `package.json` `"workspaces": []` property in order to make sure that new generated **workspace** is properly set up as such.
@@ -194,6 +200,13 @@ The value that `npm init` should use by default for the package.json type field.
200
201 The value that `npm init` should use by default for the package version number, if not already set in package.json.
202
203 +#### `init-private`
204 +
205 +- Default: false
206 +- Type: Boolean
207 +
208 +The value `npm init` should use by default for the package's private flag.
209 +
210 #### `yes`
211
212 - Default: null
content/cli/v11/commands/npm-install-ci-test.mdx
+1 -1
@@ -123,7 +123,7 @@ Note that this will generally make installs run slower, and be much noisier, but
123
124 If true, npm does not run scripts specified in package.json files.
125
126 -Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
126 +Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
127
128 #### `audit`
129
content/cli/v11/commands/npm-install-test.mdx
+1 -1
@@ -177,7 +177,7 @@ Note that this will generally make installs run slower, and be much noisier, but
177
178 If true, npm does not run scripts specified in package.json files.
179
180 -Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
180 +Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
181
182 #### `audit`
183
content/cli/v11/commands/npm-install.mdx
+1 -1
@@ -460,7 +460,7 @@ Note that this will generally make installs run slower, and be much noisier, but
460
461 If true, npm does not run scripts specified in package.json files.
462
463 -Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
463 +Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
464
465 #### `audit`
466
content/cli/v11/commands/npm-link.mdx
+1 -1
@@ -211,7 +211,7 @@ Dependency types specified in `--include` will not be omitted, regardless of the
211
212 If true, npm does not run scripts specified in package.json files.
213
214 -Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
214 +Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
215
216 #### `audit`
217
content/cli/v11/commands/npm-login.mdx
+2
@@ -47,6 +47,8 @@ Note: This command is unaware of workspaces.
47
48 Verify a user in the specified registry, and save the credentials to the `.npmrc` file. If no registry is specified, the default registry will be used (see [`config`](/cli/v11/using-npm/config)).
49
50 +When you run `npm login`, the CLI automatically generates a legacy token of `publish` type. For more information, see [About legacy tokens](/about-access-tokens#about-legacy-tokens).
51 +
52 When using `legacy` for your `auth-type`, the username and password, are read in from prompts.
53
54 To reset your password, go to [https://www.npmjs.com/forgot](https://www.npmjs.com/forgot)
content/cli/v11/commands/npm-ls.mdx
+1 -1
@@ -52,7 +52,7 @@ Note: to get a "bottoms up" view of why a given package is included in the tree
52 Positional arguments are `name@version-range` identifiers, which will limit 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:
53
54 ```bash
55 -npm@11.3.0 /path/to/npm
55 +npm@11.4.0 /path/to/npm
56 └─┬ init-package-json@0.0.4
57 └── promzard@0.1.5
58 ```
content/cli/v11/commands/npm-outdated.mdx
+1
@@ -55,6 +55,7 @@ In the output:
55 - `depended by` shows which package depends on the displayed dependency
56 - `package type` (when using `--long` / `-l`) tells you whether this package is a `dependency` or a dev/peer/optional dependency. Packages not included in `package.json` are always marked `dependencies`.
57 - `homepage` (when using `--long` / `-l`) is the `homepage` value contained in the package's packument
58 +- `depended by location` (when using `--long` / `-l`) shows location of the package that depends on the displayed dependency
59 - Red means there's a newer version matching your semver requirements, so you should update now.
60 - Yellow indicates that there's a newer version _above_ your semver requirements (usually new major, or new 0.x minor) so proceed with caution.
61
content/cli/v11/commands/npm-pack.mdx
+1 -1
@@ -118,7 +118,7 @@ This value is not exported to the environment for child processes.
118
119 If true, npm does not run scripts specified in package.json files.
120
121 -Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
121 +Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
122
123 ### Description
124
content/cli/v11/commands/npm-prune.mdx
+1 -1
@@ -117,7 +117,7 @@ Note that this will generally make installs run slower, and be much noisier, but
117
118 If true, npm does not run scripts specified in package.json files.
119
120 -Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
120 +Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
121
122 #### `workspace`
123
content/cli/v11/commands/npm-rebuild.mdx
+1 -1
@@ -107,7 +107,7 @@ Note that this will generally make installs run slower, and be much noisier, but
107
108 If true, npm does not run scripts specified in package.json files.
109
110 -Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
110 +Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
111
112 #### `workspace`
113
content/cli/v11/commands/npm-restart.mdx
+3 -3
@@ -43,7 +43,7 @@ npm restart [-- <args>]
43
44 ### Description
45
46 -This restarts a project. It is equivalent to running `npm run-script restart`.
46 +This restarts a project. It is equivalent to running `npm run restart`.
47
48 If the current project has a `"restart"` script specified in `package.json`, then the following scripts will be run:
49
@@ -71,7 +71,7 @@ If it does _not_ have a `"restart"` script specified, but it does have `stop` an
71
72 If true, npm does not run scripts specified in package.json files.
73
74 -Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
74 +Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
75
76 #### `script-shell`
77
@@ -82,7 +82,7 @@ The shell to use for scripts run with the `npm exec`, `npm run` and `npm init <p
82
83 ### See Also
84
85 -- [npm run-script](/cli/v11/commands/npm-run-script)
85 +- [npm run](/cli/v11/commands/npm-run)
86 - [npm scripts](/cli/v11/using-npm/scripts)
87 - [npm test](/cli/v11/commands/npm-test)
88 - [npm start](/cli/v11/commands/npm-start)
content/cli/v11/commands/npm-run.mdx renamed
+33 -33
@@ -1,46 +1,46 @@
1 ---
2 -title: npm-run-script
2 +title: npm-run
3 section: 1
4 description: Run arbitrary package scripts
5 github_repo: npm/cli
6 github_branch: latest
7 -github_path: docs/lib/content/commands/npm-run-script.md
7 +github_path: docs/lib/content/commands/npm-run.md
8 redirect_from:
9 - - /cli-commands/npm-run-script
10 - - /cli-commands/run-script
11 - - /cli-documentation/cli-commands/npm-run-script
12 - - /cli-documentation/cli-commands/run-script
13 - - /cli-documentation/commands/npm-run-script
14 - - /cli-documentation/commands/run-script
15 - - /cli-documentation/npm-run-script
16 - - /cli-documentation/run-script
17 - - /cli-documentation/v11/cli-commands/npm-run-script
18 - - /cli-documentation/v11/cli-commands/run-script
19 - - /cli-documentation/v11/commands/npm-run-script
20 - - /cli-documentation/v11/commands/run-script
21 - - /cli-documentation/v11/npm-run-script
22 - - /cli-documentation/v11/run-script
23 - - /cli/cli-commands/npm-run-script
24 - - /cli/cli-commands/run-script
25 - - /cli/commands/npm-run-script
26 - - /cli/commands/run-script
27 - - /cli/npm-run-script
28 - - /cli/run-script
29 - - /cli/v11/cli-commands/npm-run-script
30 - - /cli/v11/cli-commands/run-script
31 - - /cli/v11/commands/run-script
32 - - /cli/v11/npm-run-script
33 - - /cli/v11/run-script
34 - - /commands/npm-run-script
35 - - /commands/run-script
9 + - /cli-commands/npm-run
10 + - /cli-commands/run
11 + - /cli-documentation/cli-commands/npm-run
12 + - /cli-documentation/cli-commands/run
13 + - /cli-documentation/commands/npm-run
14 + - /cli-documentation/commands/run
15 + - /cli-documentation/npm-run
16 + - /cli-documentation/run
17 + - /cli-documentation/v11/cli-commands/npm-run
18 + - /cli-documentation/v11/cli-commands/run
19 + - /cli-documentation/v11/commands/npm-run
20 + - /cli-documentation/v11/commands/run
21 + - /cli-documentation/v11/npm-run
22 + - /cli-documentation/v11/run
23 + - /cli/cli-commands/npm-run
24 + - /cli/cli-commands/run
25 + - /cli/commands/npm-run
26 + - /cli/commands/run
27 + - /cli/npm-run
28 + - /cli/run
29 + - /cli/v11/cli-commands/npm-run
30 + - /cli/v11/cli-commands/run
31 + - /cli/v11/commands/run
32 + - /cli/v11/npm-run
33 + - /cli/v11/run
34 + - /commands/npm-run
35 + - /commands/run
36 ---
37
38 ### Synopsis
39
40 ```bash
41 -npm run-script <command> [-- <args>]
41 +npm run <command> [-- <args>]
42
43 -aliases: run, rum, urn
43 +aliases: run-script, rum, urn
44 ```
45
46 ### Description
@@ -177,7 +177,7 @@ This value is not exported to the environment for child processes.
177 - Default: false
178 - Type: Boolean
179
180 -If true, npm will not exit with an error code when `run-script` is invoked for a script that isn't defined in the `scripts` section of `package.json`. This option can be used when it's desirable to optionally run a script when it's present and fail if the script fails. This is useful, for example, when running scripts that may only apply for some builds in an otherwise generic CI setup.
180 +If true, npm will not exit with an error code when `run` is invoked for a script that isn't defined in the `scripts` section of `package.json`. This option can be used when it's desirable to optionally run a script when it's present and fail if the script fails. This is useful, for example, when running scripts that may only apply for some builds in an otherwise generic CI setup.
181
182 This value is not exported to the environment for child processes.
183
@@ -188,7 +188,7 @@ This value is not exported to the environment for child processes.
188
189 If true, npm does not run scripts specified in package.json files.
190
191 -Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
191 +Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
192
193 #### `foreground-scripts`
194
content/cli/v11/commands/npm-shrinkwrap.mdx
+1 -1
@@ -50,7 +50,7 @@ This command repurposes `package-lock.json` into a publishable `npm-shrinkwrap.j
50 ### See Also
51
52 - [npm install](/cli/v11/commands/npm-install)
53 -- [npm run-script](/cli/v11/commands/npm-run-script)
53 +- [npm run](/cli/v11/commands/npm-run)
54 - [npm scripts](/cli/v11/using-npm/scripts)
55 - [package.json](/cli/v11/configuring-npm/package-json)
56 - [package-lock.json](/cli/v11/configuring-npm/package-lock-json)
content/cli/v11/commands/npm-start.mdx
+3 -3
@@ -49,7 +49,7 @@ If the `"scripts"` object does not define a `"start"` property, npm will run `no
49
50 Note that this is different from the default node behavior of running the file specified in a package's `"main"` attribute when evoking with `node .`
51
52 -As of [`npm@2.0.0`](https://blog.npmjs.org/post/98131109725/npm-2-0-0), you can use custom arguments when executing scripts. Refer to [`npm run-script`](/cli/v11/commands/npm-run-script) for more details.
52 +As of [`npm@2.0.0`](https://blog.npmjs.org/post/98131109725/npm-2-0-0), you can use custom arguments when executing scripts. Refer to [`npm run`](/cli/v11/commands/npm-run) for more details.
53
54 ### Example
55
@@ -80,7 +80,7 @@ npm start
80
81 If true, npm does not run scripts specified in package.json files.
82
83 -Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
83 +Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
84
85 #### `script-shell`
86
@@ -91,7 +91,7 @@ The shell to use for scripts run with the `npm exec`, `npm run` and `npm init <p
91
92 ### See Also
93
94 -- [npm run-script](/cli/v11/commands/npm-run-script)
94 +- [npm run](/cli/v11/commands/npm-run)
95 - [npm scripts](/cli/v11/using-npm/scripts)
96 - [npm test](/cli/v11/commands/npm-test)
97 - [npm restart](/cli/v11/commands/npm-restart)
content/cli/v11/commands/npm-stop.mdx
+2 -2
@@ -76,7 +76,7 @@ npm stop
76
77 If true, npm does not run scripts specified in package.json files.
78
79 -Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
79 +Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
80
81 #### `script-shell`
82
@@ -87,7 +87,7 @@ The shell to use for scripts run with the `npm exec`, `npm run` and `npm init <p
87
88 ### See Also
89
90 -- [npm run-script](/cli/v11/commands/npm-run-script)
90 +- [npm run](/cli/v11/commands/npm-run)
91 - [npm scripts](/cli/v11/using-npm/scripts)
92 - [npm test](/cli/v11/commands/npm-test)
93 - [npm start](/cli/v11/commands/npm-start)
content/cli/v11/commands/npm-test.mdx
+2 -2
@@ -74,7 +74,7 @@ npm test
74
75 If true, npm does not run scripts specified in package.json files.
76
77 -Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
77 +Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
78
79 #### `script-shell`
80
@@ -85,7 +85,7 @@ The shell to use for scripts run with the `npm exec`, `npm run` and `npm init <p
85
86 ### See Also
87
88 -- [npm run-script](/cli/v11/commands/npm-run-script)
88 +- [npm run](/cli/v11/commands/npm-run)
89 - [npm scripts](/cli/v11/using-npm/scripts)
90 - [npm start](/cli/v11/commands/npm-start)
91 - [npm restart](/cli/v11/commands/npm-restart)
content/cli/v11/commands/npm-update.mdx
+1 -1
@@ -262,7 +262,7 @@ Note that this will generally make installs run slower, and be much noisier, but
262
263 If true, npm does not run scripts specified in package.json files.
264
265 -Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
265 +Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
266
267 #### `audit`
268
content/cli/v11/commands/npm-version.mdx
+1 -1
@@ -196,7 +196,7 @@ This runs all your tests and proceeds only if they pass. Then runs your `build`
196 ### See Also
197
198 - [npm init](/cli/v11/commands/npm-init)
199 -- [npm run-script](/cli/v11/commands/npm-run-script)
199 +- [npm run](/cli/v11/commands/npm-run)
200 - [npm scripts](/cli/v11/using-npm/scripts)
201 - [package.json](/cli/v11/configuring-npm/package-json)
202 - [config](/cli/v11/using-npm/config)
content/cli/v11/commands/npm.mdx
+1 -1
@@ -31,7 +31,7 @@ Note: This command is unaware of workspaces.
31
32 ### Version
33
34 -11.3.0
34 +11.4.0
35
36 ### Description
37
content/cli/v11/commands/npx.mdx
+1 -1
@@ -127,7 +127,7 @@ This resulted in some shifts in its functionality:
127
128 ### See Also
129
130 -- [npm run-script](/cli/v11/commands/npm-run-script)
130 +- [npm run](/cli/v11/commands/npm-run)
131 - [npm scripts](/cli/v11/using-npm/scripts)
132 - [npm test](/cli/v11/commands/npm-test)
133 - [npm start](/cli/v11/commands/npm-start)
content/cli/v11/configuring-npm/package-json.mdx
+2 -2
@@ -323,7 +323,7 @@ If your module is meant to be used client-side the browser field should be used
323
324 A lot of packages have one or more executable files that they'd like to install into the PATH. npm makes this pretty easy (in fact, it uses this feature to install the "npm" executable.)
325
326 -To use this, supply a `bin` field in your package.json which is a map of command name to local file name. When this package is installed globally, that file will be either linked inside the global bins directory or a cmd (Windows Command File) will be created which executes the specified file in the `bin` field, so it is available to run by `name` or `name.cmd` (on Windows PowerShell). When this package is installed as a dependency in another package, the file will be linked where it will be available to that package either directly by `npm exec` or by name in other scripts when invoking them via `npm run-script`.
326 +To use this, supply a `bin` field in your package.json which is a map of command name to local file name. When this package is installed globally, that file will be either linked inside the global bins directory or a cmd (Windows Command File) will be created which executes the specified file in the `bin` field, so it is available to run by `name` or `name.cmd` (on Windows PowerShell). When this package is installed as a dependency in another package, the file will be linked where it will be available to that package either directly by `npm exec` or by name in other scripts when invoking them via `npm run`.
327
328 For example, myapp could have this:
329
@@ -762,7 +762,7 @@ Overrides provide a way to replace a package in your dependency tree with anothe
762
763 Overrides are only considered in the root `package.json` file for a project. Overrides in installed dependencies (including [workspaces](/cli/v11/using-npm/workspaces)) are not considered in dependency tree resolution. Published packages may dictate their resolutions by pinning dependencies or using an [`npm-shrinkwrap.json`](/cli/v11/configuring-npm/npm-shrinkwrap-json) file.
764
765 -To make sure the package `foo` is always installed as version `1.0.0` no matter what version your dependencies rely on:
765 +To make sure the package `@npm/foo` is always installed as version `1.0.0` no matter what version your dependencies rely on:
766
767 ```json
768 {
content/cli/v11/using-npm/changelog.mdx
+57
@@ -15,6 +15,63 @@ redirect_from:
15 - /using-npm/changelog
16 ---
17
18 +## [11.4.0](https://github.com/npm/cli/compare/v11.3.0...v11.4.0) (2025-05-15)
19 +
20 +### Features
21 +
22 +- [`a0e60fb`](https://github.com/npm/cli/commit/a0e60fb1893ac77a78380d9a9faaaaa54da1fe85) [#8246](https://github.com/npm/cli/pull/8246) added init-private option (@owlstronaut)
23 +- [`57aa89f`](https://github.com/npm/cli/commit/57aa89ff70e0c6186a43888b944b5799b25c7bc8) [#8265](https://github.com/npm/cli/pull/8265) use run by default and run-script as the alias (#8265) (@owlstronaut)
24 +- [`0d4c023`](https://github.com/npm/cli/commit/0d4c023914f835927540bd0110c1ca5716b84056) [#8234](https://github.com/npm/cli/pull/8234) install: add package info to json output (#8234) (@wraithgar)
25 +
26 +### Bug Fixes
27 +
28 +- [`8794fd9`](https://github.com/npm/cli/commit/8794fd9161c29fea3f51ae8581f54172011d4069) [#8297](https://github.com/npm/cli/pull/8297) powershell: support pipeline input with Invoke-Expression (#8297) (@alexsch01)
29 +- [`b5173d1`](https://github.com/npm/cli/commit/b5173d13c182efa5434ef4ca413e62ce1437f47a) [#8293](https://github.com/npm/cli/pull/8293) docs: corrected github_path (#8293) (@xaos7991)
30 +- [`2210d7a`](https://github.com/npm/cli/commit/2210d7a670ac3522ceee8856a3399e8f44e77bbe) [#8278](https://github.com/npm/cli/pull/8278) powershell: use Invoke-Expression to pass args (#8278) (@alexsch01)
31 +- [`8669d09`](https://github.com/npm/cli/commit/8669d0931abd0ae4b655cf9e5a024065054a8bb4) [#8228](https://github.com/npm/cli/pull/8228) add otplease for enable-2fa, disable-2fa, access (#8228) (@reggi, @wraithgar)
32 +- [`78b5a6f`](https://github.com/npm/cli/commit/78b5a6fa9cd103bb80a25957ddfcb5832bc1f937) [#8269](https://github.com/npm/cli/pull/8269) correctly handle scenario where prefix is the cwd (#8269) (@owlstronaut, @ficocelliguy)
33 +- [`fdc3413`](https://github.com/npm/cli/commit/fdc3413019c2f34f1fde35449e5f3a6b0fb51ba2) [#8221](https://github.com/npm/cli/pull/8221) exec: Fails to Execute Binaries Named After Shell Keywords (#8221) (@13sfaith)
34 +- [`4b08e2e`](https://github.com/npm/cli/commit/4b08e2ed252a18f85a360b76c7273a7aa7a994ca) [#8245](https://github.com/npm/cli/pull/8245) docs: prepare script runs for local package links (@milaninfy)
35 +- [`1622ac4`](https://github.com/npm/cli/commit/1622ac456f07403e6afe02352b8f95db14dcf9eb) [#8241](https://github.com/npm/cli/pull/8241) handle missing `time` in packument to prevent crash on `npm view` (@owlstronaut)
36 +- [`db8f5da`](https://github.com/npm/cli/commit/db8f5da886326ae40d44a8cceedb99e2e6a00855) [#8110](https://github.com/npm/cli/pull/8110) outdated: add dependent location in long output (#8110) (@milaninfy, @wraithgar)
37 +
38 +### Documentation
39 +
40 +- [`d2498df`](https://github.com/npm/cli/commit/d2498df8efa558c3048f71324be0ef189c14bd49) [#8295](https://github.com/npm/cli/pull/8295) Remove `CHANGELOG` from never-ignored list (#8295) (@mrazauskas)
41 +- [`4d5c3c1`](https://github.com/npm/cli/commit/4d5c3c1d8d99e352b1b4906c2607752ee3051a75) [#8283](https://github.com/npm/cli/pull/8283) fix `overrides` example in package-json.md (#8283) (@glasser)
42 +- [`96cc4f9`](https://github.com/npm/cli/commit/96cc4f9a87a231abf4c9584a277765368ba6663d) [#8226](https://github.com/npm/cli/pull/8226) format publish as code to highlight it (@LiangYingC)
43 +- [`4990ea0`](https://github.com/npm/cli/commit/4990ea0f0c017e4702cf2da2fbd99dad61c77015) [#8226](https://github.com/npm/cli/pull/8226) clarify legacy token creation in npm login and adduser commands (@LiangYingC)
44 +
45 +### Dependencies
46 +
47 +- [`c97ef8a`](https://github.com/npm/cli/commit/c97ef8ae62187b5330c82887e9f566a4d2466cc4) [#8246](https://github.com/npm/cli/pull/8246) `init-package-json@8.2.1`
48 +- [`f48613d`](https://github.com/npm/cli/commit/f48613d0403a5267a7a55cbaa9d1e814d2033fe4) [#8292](https://github.com/npm/cli/pull/8292) `@sigstore/verify@2.1.1`
49 +- [`a4c5e74`](https://github.com/npm/cli/commit/a4c5e7455b621a4dffa893fef0ebf8ffa2307b1f) [#8292](https://github.com/npm/cli/pull/8292) `tinyglobby@0.2.13`
50 +- [`b9156d2`](https://github.com/npm/cli/commit/b9156d2144ca387edd13178547c0ec276450f118) [#8292](https://github.com/npm/cli/pull/8292) `http-cache-semantics@4.2.0`
51 +- [`472a685`](https://github.com/npm/cli/commit/472a685a8fe4d120a86ea6c7ee50e304bc8e7e94) [#8292](https://github.com/npm/cli/pull/8292) `binary-extensions@3.1.0`
52 +- [`988696e`](https://github.com/npm/cli/commit/988696eb93548e703ae04496d0e361a6015cb0d3) [#8292](https://github.com/npm/cli/pull/8292) `@sigstore/tuf@3.1.1`
53 +- [`569ac84`](https://github.com/npm/cli/commit/569ac84537f05450260e05d006361cdfe586359b) [#8292](https://github.com/npm/cli/pull/8292) `semver@7.7.2`
54 +- [`2521c9b`](https://github.com/npm/cli/commit/2521c9ba18172c2ade525cbe9a675d293a0484d9) [#8233](https://github.com/npm/cli/pull/8233) `@sigstore/protobuf-specs@0.4.1`
55 +- [`3274d68`](https://github.com/npm/cli/commit/3274d68b13595415586b41445838cc258543173a) [#8233](https://github.com/npm/cli/pull/8233) `@npmcli/query@4.0.1`
56 +- [`c263626`](https://github.com/npm/cli/commit/c2636268e83b8049789534e78f4c15913e047c89) [#8233](https://github.com/npm/cli/pull/8233) `abbrev@3.0.1`
57 +- [`78df711`](https://github.com/npm/cli/commit/78df711a60aaf8538b9fcaf13f2f9d50ce62b7b8) [#8233](https://github.com/npm/cli/pull/8233) `hosted-git-info@8.1.0`
58 +
59 +### Chores
60 +
61 +- [`e80e38e`](https://github.com/npm/cli/commit/e80e38eb961865de4006dc0e2ea991aebb1a3bdf) [#8292](https://github.com/npm/cli/pull/8292) dev dependency updates (@wraithgar)
62 +- [`3231ee9`](https://github.com/npm/cli/commit/3231ee9afefcadce2b17a143fd51d365de4d6dea) [#8244](https://github.com/npm/cli/pull/8244) update snapshots (@owlstronaut)
63 +- [`c561a33`](https://github.com/npm/cli/commit/c561a3307b18f9c208eb7305db0f2a51db61277d) [#8233](https://github.com/npm/cli/pull/8233) dev dependency updates (@owlstronaut)
64 +- [`7eca19c`](https://github.com/npm/cli/commit/7eca19cb5ddc32688a8e331d5468d58f14684bff) [#8215](https://github.com/npm/cli/pull/8215) update workflow permissions for updating Node PR (@owlstronaut)
65 +- [workspace](https://github.com/npm/cli/releases/tag/arborist-v9.1.0): `@npmcli/arborist@9.1.0`
66 +- [workspace](https://github.com/npm/cli/releases/tag/config-v10.3.0): `@npmcli/config@10.3.0`
67 +- [workspace](https://github.com/npm/cli/releases/tag/libnpmaccess-v10.0.1): `libnpmaccess@10.0.1`
68 +- [workspace](https://github.com/npm/cli/releases/tag/libnpmdiff-v8.0.3): `libnpmdiff@8.0.3`
69 +- [workspace](https://github.com/npm/cli/releases/tag/libnpmexec-v10.1.2): `libnpmexec@10.1.2`
70 +- [workspace](https://github.com/npm/cli/releases/tag/libnpmfund-v7.0.3): `libnpmfund@7.0.3`
71 +- [workspace](https://github.com/npm/cli/releases/tag/libnpmpack-v9.0.3): `libnpmpack@9.0.3`
72 +- [workspace](https://github.com/npm/cli/releases/tag/libnpmteam-v8.0.1): `libnpmteam@8.0.1`
73 +- [workspace](https://github.com/npm/cli/releases/tag/libnpmversion-v8.0.1): `libnpmversion@8.0.1`
74 +
75 ## [11.3.0](https://github.com/npm/cli/compare/v11.2.0...v11.3.0) (2025-04-08)
76
77 ### Features
content/cli/v11/using-npm/config.mdx
+17 -2
@@ -521,7 +521,7 @@ A proxy to use for outgoing https requests. If the `HTTPS_PROXY` or `https_proxy
521 - Default: false
522 - Type: Boolean
523
524 -If true, npm will not exit with an error code when `run-script` is invoked for a script that isn't defined in the `scripts` section of `package.json`. This option can be used when it's desirable to optionally run a script when it's present and fail if the script fails. This is useful, for example, when running scripts that may only apply for some builds in an otherwise generic CI setup.
524 +If true, npm will not exit with an error code when `run` is invoked for a script that isn't defined in the `scripts` section of `package.json`. This option can be used when it's desirable to optionally run a script when it's present and fail if the script fails. This is useful, for example, when running scripts that may only apply for some builds in an otherwise generic CI setup.
525
526 This value is not exported to the environment for child processes.
527
@@ -532,7 +532,7 @@ This value is not exported to the environment for child processes.
532
533 If true, npm does not run scripts specified in package.json files.
534
535 -Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
535 +Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
536
537 #### `include`
538
@@ -600,6 +600,13 @@ The value `npm init` should use by default for the package license.
600
601 A module that will be loaded by the `npm init` command. See the documentation for the [init-package-json](https://github.com/npm/init-package-json) module for more information, or [npm init](/cli/v11/commands/npm-init).
602
603 +#### `init-private`
604 +
605 +- Default: false
606 +- Type: Boolean
607 +
608 +The value `npm init` should use by default for the package's private flag.
609 +
610 #### `init-type`
611
612 - Default: "commonjs"
@@ -984,6 +991,8 @@ Ignored if `--save-peer` is set, since peerDependencies cannot be bundled.
991
992 Save installed packages to a package.json file as `devDependencies`.
993
994 +This config can not be used with: `save-optional`, `save-peer`, `save-prod`
995 +
996 #### `save-exact`
997
998 - Default: false
@@ -998,6 +1007,8 @@ Dependencies saved to package.json will be configured with an exact version rath
1007
1008 Save installed packages to a package.json file as `optionalDependencies`.
1009
1010 +This config can not be used with: `save-dev`, `save-peer`, `save-prod`
1011 +
1012 #### `save-peer`
1013
1014 - Default: false
@@ -1005,6 +1016,8 @@ Save installed packages to a package.json file as `optionalDependencies`.
1016
1017 Save installed packages to a package.json file as `peerDependencies`
1018
1019 +This config can not be used with: `save-dev`, `save-optional`, `save-prod`
1020 +
1021 #### `save-prefix`
1022
1023 - Default: "^"
@@ -1023,6 +1036,8 @@ Save installed packages into `dependencies` specifically. This is useful if a pa
1036
1037 This is the default behavior if `--save` is true, and neither `--save-dev` or `--save-optional` are true.
1038
1039 +This config can not be used with: `save-dev`, `save-optional`, `save-peer`
1040 +
1041 #### `sbom-format`
1042
1043 - Default: null
content/cli/v11/using-npm/developers.mdx
-1
@@ -114,7 +114,6 @@ The following paths and files are never ignored, so adding them to `.npmignore`
114
115 - `package.json`
116 - `README` (and its variants)
117 -- `CHANGELOG` (and its variants)
117 - `LICENSE` / `LICENCE`
118
119 If, given the structure of your project, you find `.npmignore` to be a maintenance headache, you might instead try populating the `files` property of `package.json`, which is an array of file or directory names that should be included in your package. Sometimes manually picking which items to allow is easier to manage than building a block list.
content/cli/v11/using-npm/scripts.mdx
+4 -3
@@ -19,7 +19,7 @@ redirect_from:
19
20 ### Description
21
22 -The `"scripts"` property of your `package.json` file supports a number of built-in scripts and their preset life cycle events as well as arbitrary scripts. These all can be executed by running `npm run-script <stage>` or `npm run <stage>` for short. _Pre_ and _post_ commands with matching names will be run for those as well (e.g. `premyscript`, `myscript`, `postmyscript`). Scripts from dependencies can be run with `npm explore <pkg> -- npm run <stage>`.
22 +The `"scripts"` property of your `package.json` file supports a number of built-in scripts and their preset life cycle events as well as arbitrary scripts. These all can be executed by running `npm run <stage>` or `npm run <stage>` for short. _Pre_ and _post_ commands with matching names will be run for those as well (e.g. `premyscript`, `myscript`, `postmyscript`). Scripts from dependencies can be run with `npm explore <pkg> -- npm run <stage>`.
23
24 ### Pre & Post Scripts
25
@@ -48,6 +48,7 @@ There are some special life cycle scripts that happen only in certain situations
48 - Runs BEFORE the package is packed, i.e. during `npm publish` and `npm pack`
49 - Runs on local `npm install` without any arguments
50 - Runs AFTER `prepublish`, but BEFORE `prepublishOnly`
51 +- Runs for a package if it's being installed as a link through `npm install <folder>`
52
53 - NOTE: If a package being installed through git contains a `prepare` script, its `dependencies` and `devDependencies` will be installed, and the prepare script will be run, before the package is packaged and installed.
54
@@ -171,7 +172,7 @@ If there is a `restart` script defined, these events are run, otherwise `stop` a
172 - `restart`
173 - `postrestart`
174
174 -#### [`npm run <user defined>`](/cli/v11/commands/npm-run-script)
175 +#### [`npm run <user defined>`](/cli/v11/commands/npm-run)
176
177 - `pre<user-defined>`
178 - `<user-defined>`
@@ -305,7 +306,7 @@ Note that these script files don't have to be Node.js or even JavaScript program
306
307 ### See Also
308
308 -- [npm run-script](/cli/v11/commands/npm-run-script)
309 +- [npm run](/cli/v11/commands/npm-run)
310 - [package.json](/cli/v11/configuring-npm/package-json)
311 - [npm developers](/cli/v11/using-npm/developers)
312 - [npm install](/cli/v11/commands/npm-install)
content/cli/v11/using-npm/workspaces.mdx
+1 -1
@@ -194,5 +194,5 @@ npm run test --workspaces --if-present
194
195 - [npm install](/cli/v11/commands/npm-install)
196 - [npm publish](/cli/v11/commands/npm-publish)
197 -- [npm run-script](/cli/v11/commands/npm-run-script)
197 +- [npm run](/cli/v11/commands/npm-run)
198 - [config](/cli/v11/using-npm/config)
content/nav.yml
+1 -1
@@ -1594,7 +1594,7 @@
1594 - title: Changelog
1595 url: /cli/v10/using-npm/changelog
1596 description: Changelog notes for each version
1597 - - title: Version 11.3.0
1597 + - title: Version 11.4.0
1598 shortName: v11
1599 url: /cli/v11
1600 default: true