deps: upgrade npm to 11.16.0 · nodejs/node@4da442f · GitHub
Skip to content

Commit 4da442f

Browse files
npm-cli-botaduh95
authored andcommitted
deps: upgrade npm to 11.16.0
PR-URL: #63602 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 5a1f67c commit 4da442f

277 files changed

Lines changed: 7294 additions & 482 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 125 additions & 0 deletions

deps/npm/docs/content/commands/npm-ci.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,56 @@ like `npm view`
262262

263263

264264

265+
#### `allow-scripts`
266+
267+
* Default: ""
268+
* Type: String (can be set multiple times)
269+
270+
Comma-separated list of packages whose install-time lifecycle scripts
271+
(`preinstall`, `install`, `postinstall`, and `prepare` for non-registry
272+
dependencies) are allowed to run.
273+
274+
This setting is intended for one-off and global contexts: `npm exec`, `npx`,
275+
and `npm install -g`, where no project `package.json` is involved. For
276+
team-wide policy in a project, use the `allowScripts` field in
277+
`package.json` (which also supports explicit denials), or configure it in
278+
`.npmrc`. Passing `--allow-scripts` on the command line during a
279+
project-scoped `npm install`, `ci`, `update`, or `rebuild` is an error.
280+
281+
Each name is matched against a dependency's resolved identity, not against
282+
the package's self-reported name. `--ignore-scripts` and
283+
`--dangerously-allow-all-scripts` both override this setting.
284+
285+
286+
287+
#### `strict-allow-scripts`
288+
289+
* Default: false
290+
* Type: Boolean
291+
292+
If `true`, turn the install-script policy from a warning into a hard error:
293+
any dependency with install scripts not covered by `allowScripts` will fail
294+
the install instead of running with a notice.
295+
296+
Dependencies explicitly denied with `false` in `allowScripts` are always
297+
silently skipped; this setting only affects unreviewed entries.
298+
`--ignore-scripts` and `--dangerously-allow-all-scripts` both override this
299+
setting.
300+
301+
302+
303+
#### `dangerously-allow-all-scripts`
304+
305+
* Default: false
306+
* Type: Boolean
307+
308+
If `true`, bypass the `allowScripts` policy entirely and run every
309+
dependency install script regardless of whether it was approved or denied.
310+
Intended as a migration escape hatch only; its use is strongly discouraged.
311+
`--ignore-scripts` still takes precedence over this setting.
312+
313+
314+
265315
#### `audit`
266316

267317
* Default: true
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
---
2+
title: npm-deny-scripts
3+
section: 1
4+
description: Deny install scripts for specific dependencies
5+
---
6+
7+
### Synopsis
8+
9+
```bash
10+
npm deny-scripts <pkg> [<pkg> ...]
11+
npm deny-scripts --all
12+
```
13+
14+
Note: This command is unaware of workspaces.
15+
16+
### Description
17+
18+
The companion command to [`npm approve-scripts`](/commands/npm-approve-scripts).
19+
Writes `false` entries into the `allowScripts` field of your project's
20+
`package.json`, recording that a dependency must not run install scripts
21+
even if a future version would otherwise be eligible.
22+
23+
In the current release, install scripts still run by default, so `deny-scripts`
24+
only affects how installs of denied packages are reported. A future release
25+
will block unreviewed install scripts and respect deny entries at install
26+
time.
27+
28+
```bash
29+
npm deny-scripts <pkg> [<pkg> ...]
30+
npm deny-scripts --all
31+
```
32+
33+
`<pkg>` matches every installed version of that package. Denies are always
34+
written name-only (`"pkg": false`), regardless of `--allow-scripts-pin`. Pinning a deny
35+
to a specific version would silently re-allow scripts for any other version
36+
of the same package, which defeats the purpose; the command picks the
37+
safer default for you.
38+
39+
`--all` denies every package with unreviewed install scripts.
40+
41+
If a `true` (pinned or name-only) entry exists for a package and you then
42+
deny it, the existing allow entries are removed so the name-only deny is
43+
unambiguous.
44+
45+
### Examples
46+
47+
```bash
48+
# Deny a specific package outright
49+
npm deny-scripts telemetry-pkg
50+
51+
# Deny everything that has install scripts and isn't already approved
52+
npm deny-scripts --all
53+
```
54+
55+
### Configuration
56+
57+
#### `all`
58+
59+
* Default: false
60+
* Type: Boolean
61+
62+
When running `npm outdated` and `npm ls`, setting `--all` will show all
63+
outdated or installed packages, rather than only those directly depended
64+
upon by the current project.
65+
66+
67+
68+
#### `allow-scripts-pending`
69+
70+
* Default: false
71+
* Type: Boolean
72+
73+
List packages with install scripts that are not yet covered by the
74+
`allowScripts` policy, without modifying `package.json`. Only meaningful for
75+
`npm approve-scripts`.
76+
77+
78+
79+
#### `allow-scripts-pin`
80+
81+
* Default: true
82+
* Type: Boolean
83+
84+
Write pinned (`pkg@version`) entries when approving install scripts. Set to
85+
`false` to write name-only entries that allow any version. Has no effect on
86+
`npm deny-scripts`, which always writes name-only entries regardless of this
87+
setting.
88+
89+
90+
91+
#### `json`
92+
93+
* Default: false
94+
* Type: Boolean
95+
96+
Whether or not to output JSON data, rather than the normal output.
97+
98+
* In `npm pkg set` it enables parsing set values with JSON.parse() before
99+
saving them to your `package.json`.
100+
101+
Not supported by all npm commands.
102+
103+
104+
105+
### See Also
106+
107+
* [npm approve-scripts](/commands/npm-approve-scripts)
108+
* [npm install](/commands/npm-install)
109+
* [package.json](/configuring-npm/package-json)

deps/npm/docs/content/commands/npm-exec.md

Lines changed: 50 additions & 0 deletions

0 commit comments

Comments
 (0)