Skip to content

Commit 3a3808a

Browse files
npm-cli-botrichardlau
authored andcommitted
deps: upgrade npm to 10.5.0
PR-URL: #51913 Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: Richard Lau <[email protected]>
1 parent c8876d7 commit 3a3808a

File tree

396 files changed

+8964
-3998
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

396 files changed

+8964
-3998
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,8 @@ the order in which omit/include are specified on the command-line.
374374

375375
#### `foreground-scripts`
376376

377-
* Default: false
377+
* Default: `false` unless when using `npm pack` or `npm publish` where it
378+
defaults to `true`
378379
* Type: Boolean
379380

380381
Run all build scripts (ie, `preinstall`, `install`, and `postinstall`)

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ this warning is treated as a failure.
169169

170170
#### `foreground-scripts`
171171

172-
* Default: false
172+
* Default: `false` unless when using `npm pack` or `npm publish` where it
173+
defaults to `true`
173174
* Type: Boolean
174175

175176
Run all build scripts (ie, `preinstall`, `install`, and `postinstall`)

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ npm config set key=value [key=value...]
4444
npm set key=value [key=value...]
4545
```
4646
47-
Sets each of the config keys to the value provided.
47+
Sets each of the config keys to the value provided. Modifies the user configuration
48+
file unless [`location`](/commands/npm-config#location) is passed.
4849
4950
If value is omitted, the key will be removed from your config file entirely.
5051

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ this warning is treated as a failure.
115115

116116
#### `foreground-scripts`
117117

118-
* Default: false
118+
* Default: `false` unless when using `npm pack` or `npm publish` where it
119+
defaults to `true`
119120
* Type: Boolean
120121

121122
Run all build scripts (ie, `preinstall`, `install`, and `postinstall`)

deps/npm/docs/content/commands/npm-install-test.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,8 @@ For `list` this means the output will be based on the tree described by the
192192

193193
#### `foreground-scripts`
194194

195-
* Default: false
195+
* Default: `false` unless when using `npm pack` or `npm publish` where it
196+
defaults to `true`
196197
* Type: Boolean
197198

198199
Run all build scripts (ie, `preinstall`, `install`, and `postinstall`)

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,8 @@ For `list` this means the output will be based on the tree described by the
582582
583583
#### `foreground-scripts`
584584
585-
* Default: false
585+
* Default: `false` unless when using `npm pack` or `npm publish` where it
586+
defaults to `true`
586587
* Type: Boolean
587588
588589
Run all build scripts (ie, `preinstall`, `install`, and `postinstall`)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ packages will *also* show the paths to the specified packages. For
2727
example, running `npm ls promzard` in npm's source tree will show:
2828

2929
```bash
30-
npm@10.3.0 /path/to/npm
30+
npm@10.5.0 /path/to/npm
3131
3232
3333
```

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ Not supported by all npm commands.
9999

100100
#### `foreground-scripts`
101101

102-
* Default: false
102+
* Default: `false` unless when using `npm pack` or `npm publish` where it
103+
defaults to `true`
103104
* Type: Boolean
104105

105106
Run all build scripts (ie, `preinstall`, `install`, and `postinstall`)

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

Lines changed: 41 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -135,19 +135,32 @@ npm query ":type(git)" | jq 'map(.name)' | xargs -I {} npm why {}
135135
},
136136
...
137137
```
138-
### Package lock only mode
139138

140-
If package-lock-only is enabled, only the information in the package
141-
lock (or shrinkwrap) is loaded. This means that information from the
142-
package.json files of your dependencies will not be included in the
143-
result set (e.g. description, homepage, engines).
139+
### Expecting a certain number of results
140+
141+
One common use of `npm query` is to make sure there is only one version of
142+
a certain dependency in your tree. This is especially common for
143+
ecosystems like that rely on `typescript` where having state split
144+
across two different but identically-named packages causes bugs. You
145+
can use the `--expect-results` or `--expect-result-count` in your setup
146+
to ensure that npm will exit with an exit code if your tree doesn't look
147+
like you want it to.
148+
149+
150+
```sh
151+
$ npm query '#react' --expect-result-count=1
152+
```
153+
154+
Perhaps you want to quickly check if there are any production
155+
dependencies that could be updated:
156+
157+
```sh
158+
$ npm query ':root>:outdated(in-range).prod' --no-expect-results
159+
```
144160

145161
### Package lock only mode
146162

147-
If package-lock-only is enabled, only the information in the package
148-
lock (or shrinkwrap) is loaded. This means that information from the
149-
package.json files of your dependencies will not be included in the
150-
result set (e.g. description, homepage, engines).
163+
If package-lock-only is enabled, only the information in the package lock (or shrinkwrap) is loaded. This means that information from the package.json files of your dependencies will not be included in the result set (e.g. description, homepage, engines).
151164

152165
### Configuration
153166

@@ -235,6 +248,25 @@ For `list` this means the output will be based on the tree described by the
235248
`package-lock.json`, rather than the contents of `node_modules`.
236249

237250

251+
252+
#### `expect-results`
253+
254+
* Default: null
255+
* Type: null or Boolean
256+
257+
Tells npm whether or not to expect results from the command. Can be either
258+
true (expect some results) or false (expect no results).
259+
260+
This config can not be used with: `expect-result-count`
261+
262+
#### `expect-result-count`
263+
264+
* Default: null
265+
* Type: null or Number
266+
267+
Tells to expect a specific number of results from the command.
268+
269+
This config can not be used with: `expect-results`
238270
## See Also
239271

240272
* [dependency selectors](/using-npm/dependency-selectors)

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ systems.
7272

7373
#### `foreground-scripts`
7474

75-
* Default: false
75+
* Default: `false` unless when using `npm pack` or `npm publish` where it
76+
defaults to `true`
7677
* Type: Boolean
7778

7879
Run all build scripts (ie, `preinstall`, `install`, and `postinstall`)

0 commit comments

Comments
 (0)