Skip to content

Commit 7e24498

Browse files
npm-cli-botRafaelGSS
authored andcommitted
deps: upgrade npm to 9.6.2
PR-URL: #47108 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 0949f23 commit 7e24498

File tree

260 files changed

+3377
-2191
lines changed

Some content is hidden

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

260 files changed

+3377
-2191
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ description: Install a project with a clean slate and run tests
99
```bash
1010
npm install-ci-test
1111

12-
alias: cit
12+
aliases: cit, clean-install-test, sit
1313
```
1414

1515
### Description

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

+1-1
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@9.5.1 /path/to/npm
30+
npm@9.6.2 /path/to/npm
3131
└─┬ init-package-json@0.0.4
3232
└── promzard@0.1.5
3333
```

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Note: This command is unaware of workspaces.
1414

1515
### Version
1616

17-
9.5.1
17+
9.6.2
1818

1919
### Description
2020

deps/npm/docs/content/configuring-npm/package-lock-json.md

+3-6
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,9 @@ the npm registry. Lockfiles generated by npm v7 will contain
112112
* No version provided: an "ancient" shrinkwrap file from a version of npm
113113
prior to npm v5.
114114
* `1`: The lockfile version used by npm v5 and v6.
115-
* `2`: The lockfile version used by npm v7, which is backwards compatible
116-
to v1 lockfiles.
117-
* `3`: The lockfile version used by npm v7, _without_ backwards
118-
compatibility affordances. This is used for the hidden lockfile at
119-
`node_modules/.package-lock.json`, and will likely be used in a future
120-
version of npm, once support for npm v6 is no longer relevant.
115+
* `2`: The lockfile version used by npm v7 and v8. Backwards compatible to v1
116+
lockfiles.
117+
* `3`: The lockfile version used by npm v9. Backwards compatible to npm v7.
121118

122119
npm will always attempt to get whatever data it can out of a lockfile, even
123120
if it is not a version that it was designed to support.

deps/npm/docs/output/commands/npm-install-ci-test.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ <h2 id="table-of-contents">Table of contents</h2>
148148
<div id="_content"><h3 id="synopsis">Synopsis</h3>
149149
<pre><code class="language-bash">npm install-ci-test
150150

151-
alias: cit
151+
aliases: cit, clean-install-test, sit
152152
</code></pre>
153153
<h3 id="description">Description</h3>
154154
<p>This command runs <code>npm ci</code> followed immediately by <code>npm test</code>.</p>

deps/npm/docs/output/commands/npm-ls.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ <h3 id="description">Description</h3>
160160
the results to only the paths to the packages named. Note that nested
161161
packages will <em>also</em> show the paths to the specified packages. For
162162
example, running <code>npm ls promzard</code> in npm's source tree will show:</p>
163-
<pre><code class="language-bash">npm@9.5.1 /path/to/npm
163+
<pre><code class="language-bash">npm@9.6.2 /path/to/npm
164164
└─┬ init-package-json@0.0.4
165165
└── promzard@0.1.5
166166
</code></pre>

deps/npm/docs/output/commands/npm.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ <h2 id="table-of-contents">Table of contents</h2>
150150
</code></pre>
151151
<p>Note: This command is unaware of workspaces.</p>
152152
<h3 id="version">Version</h3>
153-
<p>9.5.1</p>
153+
<p>9.6.2</p>
154154
<h3 id="description">Description</h3>
155155
<p>npm is the package manager for the Node JavaScript platform. It puts
156156
modules in place so that node can find them, and manages dependency

deps/npm/docs/output/configuring-npm/package-lock-json.html

+3-6
Original file line numberDiff line numberDiff line change
@@ -239,12 +239,9 @@ <h4 id="lockfileversion"><code>lockfileVersion</code></h4>
239239
<li>No version provided: an "ancient" shrinkwrap file from a version of npm
240240
prior to npm v5.</li>
241241
<li><code>1</code>: The lockfile version used by npm v5 and v6.</li>
242-
<li><code>2</code>: The lockfile version used by npm v7, which is backwards compatible
243-
to v1 lockfiles.</li>
244-
<li><code>3</code>: The lockfile version used by npm v7, <em>without</em> backwards
245-
compatibility affordances. This is used for the hidden lockfile at
246-
<code>node_modules/.package-lock.json</code>, and will likely be used in a future
247-
version of npm, once support for npm v6 is no longer relevant.</li>
242+
<li><code>2</code>: The lockfile version used by npm v7 and v8. Backwards compatible to v1
243+
lockfiles.</li>
244+
<li><code>3</code>: The lockfile version used by npm v9. Backwards compatible to npm v7.</li>
248245
</ul>
249246
<p>npm will always attempt to get whatever data it can out of a lockfile, even
250247
if it is not a version that it was designed to support.</p>

deps/npm/lib/commands/access.js

+18-16
Original file line numberDiff line numberDiff line change
@@ -53,20 +53,22 @@ class Access extends BaseCommand {
5353
return commands
5454
}
5555

56-
switch (argv[2]) {
57-
case 'grant':
58-
return ['read-only', 'read-write']
59-
case 'revoke':
60-
return []
61-
case 'list':
62-
case 'ls':
63-
return ['packages', 'collaborators']
64-
case 'get':
65-
return ['status']
66-
case 'set':
67-
return setCommands
68-
default:
69-
throw new Error(argv[2] + ' not recognized')
56+
if (argv.length === 3) {
57+
switch (argv[2]) {
58+
case 'grant':
59+
return ['read-only', 'read-write']
60+
case 'revoke':
61+
return []
62+
case 'list':
63+
case 'ls':
64+
return ['packages', 'collaborators']
65+
case 'get':
66+
return ['status']
67+
case 'set':
68+
return setCommands
69+
default:
70+
throw new Error(argv[2] + ' not recognized')
71+
}
7072
}
7173
}
7274

@@ -116,11 +118,11 @@ class Access extends BaseCommand {
116118
}
117119

118120
async #grant (permissions, scope, pkg) {
119-
await libnpmaccess.setPermissions(scope, pkg, permissions)
121+
await libnpmaccess.setPermissions(scope, pkg, permissions, this.npm.flatOptions)
120122
}
121123

122124
async #revoke (scope, pkg) {
123-
await libnpmaccess.removePermissions(scope, pkg)
125+
await libnpmaccess.removePermissions(scope, pkg, this.npm.flatOptions)
124126
}
125127

126128
async #listPackages (owner, pkg) {

deps/npm/lib/commands/audit.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -389,11 +389,12 @@ class Audit extends ArboristWorkspaceCmd {
389389
const argv = opts.conf.argv.remain
390390

391391
if (argv.length === 2) {
392-
return ['fix']
392+
return ['fix', 'signatures']
393393
}
394394

395395
switch (argv[2]) {
396396
case 'fix':
397+
case 'signatures':
397398
return []
398399
default:
399400
throw Object.assign(new Error(argv[2] + ' not recognized'), {

deps/npm/lib/commands/completion.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,10 @@ class Completion extends BaseCommand {
7979
})
8080
}
8181

82-
const { COMP_CWORD, COMP_LINE, COMP_POINT } = process.env
82+
const { COMP_CWORD, COMP_LINE, COMP_POINT, COMP_FISH } = process.env
8383

8484
// if the COMP_* isn't in the env, then just dump the script.
85-
if (COMP_CWORD === undefined ||
86-
COMP_LINE === undefined ||
87-
COMP_POINT === undefined) {
85+
if (COMP_CWORD === undefined || COMP_LINE === undefined || COMP_POINT === undefined) {
8886
return dumpScript(resolve(this.npm.npmRoot, 'lib', 'utils', 'completion.sh'))
8987
}
9088

@@ -111,6 +109,7 @@ class Completion extends BaseCommand {
111109
partialWords.push(partialWord)
112110

113111
const opts = {
112+
isFish: COMP_FISH === 'true',
114113
words,
115114
w,
116115
word,

deps/npm/lib/commands/run-script.js

+3
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ class RunScript extends BaseCommand {
5151
// find the script name
5252
const json = resolve(this.npm.localPrefix, 'package.json')
5353
const { scripts = {} } = await rpj(json).catch(er => ({}))
54+
if (opts.isFish) {
55+
return Object.keys(scripts).map(s => `${s}\t${scripts[s].slice(0, 30)}`)
56+
}
5457
return Object.keys(scripts)
5558
}
5659
}

deps/npm/lib/utils/audit-error.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const log = require('./log-shim')
2+
const replaceInfo = require('./replace-info.js')
23

34
// print an error or just nothing if the audit report has an error
45
// this is called by the audit command, and by the reify-output util
@@ -24,7 +25,7 @@ const auditError = (npm, report) => {
2425
npm.output(JSON.stringify({
2526
message: error.message,
2627
method: error.method,
27-
uri: error.uri,
28+
uri: replaceInfo(error.uri),
2829
headers: error.headers,
2930
statusCode: error.statusCode,
3031
body,

deps/npm/lib/utils/cmd-list.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const aliases = {
3636
v: 'view',
3737
run: 'run-script',
3838
'clean-install': 'ci',
39-
'clean-install-test': 'cit',
39+
'clean-install-test': 'install-ci-test',
4040
x: 'exec',
4141
why: 'explain',
4242
la: 'll',
@@ -62,7 +62,7 @@ const aliases = {
6262
upgrade: 'update',
6363
udpate: 'update',
6464
rum: 'run-script',
65-
sit: 'cit',
65+
sit: 'install-ci-test',
6666
urn: 'run-script',
6767
ogr: 'org',
6868
'add-user': 'adduser',

deps/npm/lib/utils/completion.fish

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# npm completions for Fish shell
2+
# This script is a work in progress and does not fall under the normal semver contract as the rest of npm.
3+
4+
# __fish_npm_needs_command taken from:
5+
# https://stackoverflow.com/questions/16657803/creating-autocomplete-script-with-sub-commands
6+
function __fish_npm_needs_command
7+
set -l cmd (commandline -opc)
8+
9+
if test (count $cmd) -eq 1
10+
return 0
11+
end
12+
13+
return 1
14+
end
15+
16+
# Taken from https://github.com/fish-shell/fish-shell/blob/HEAD/share/completions/npm.fish
17+
function __fish_complete_npm -d "Complete the commandline using npm's 'completion' tool"
18+
# tell npm we are fish shell
19+
set -lx COMP_FISH true
20+
if command -sq npm
21+
# npm completion is bash-centric, so we need to translate fish's "commandline" stuff to bash's $COMP_* stuff
22+
# COMP_LINE is an array with the words in the commandline
23+
set -lx COMP_LINE (commandline -opc)
24+
# COMP_CWORD is the index of the current word in COMP_LINE
25+
# bash starts arrays with 0, so subtract 1
26+
set -lx COMP_CWORD (math (count $COMP_LINE) - 1)
27+
# COMP_POINT is the index of point/cursor when the commandline is viewed as a string
28+
set -lx COMP_POINT (commandline -C)
29+
# If the cursor is after the last word, the empty token will disappear in the expansion
30+
# Readd it
31+
if test (commandline -ct) = ""
32+
set COMP_CWORD (math $COMP_CWORD + 1)
33+
set COMP_LINE $COMP_LINE ""
34+
end
35+
command npm completion -- $COMP_LINE 2>/dev/null
36+
end
37+
end
38+
39+
# flush out what ships with fish
40+
complete -e npm

deps/npm/man/man1/npm-access.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "NPM-ACCESS" "1" "February 2023" "" ""
1+
.TH "NPM-ACCESS" "1" "March 2023" "" ""
22
.SH "NAME"
33
\fBnpm-access\fR - Set access level on published packages
44
.SS "Synopsis"

deps/npm/man/man1/npm-adduser.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "NPM-ADDUSER" "1" "February 2023" "" ""
1+
.TH "NPM-ADDUSER" "1" "March 2023" "" ""
22
.SH "NAME"
33
\fBnpm-adduser\fR - Add a registry user account
44
.SS "Synopsis"

deps/npm/man/man1/npm-audit.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "NPM-AUDIT" "1" "February 2023" "" ""
1+
.TH "NPM-AUDIT" "1" "March 2023" "" ""
22
.SH "NAME"
33
\fBnpm-audit\fR - Run a security audit
44
.SS "Synopsis"

deps/npm/man/man1/npm-bugs.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "NPM-BUGS" "1" "February 2023" "" ""
1+
.TH "NPM-BUGS" "1" "March 2023" "" ""
22
.SH "NAME"
33
\fBnpm-bugs\fR - Report bugs for a package in a web browser
44
.SS "Synopsis"

deps/npm/man/man1/npm-cache.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "NPM-CACHE" "1" "February 2023" "" ""
1+
.TH "NPM-CACHE" "1" "March 2023" "" ""
22
.SH "NAME"
33
\fBnpm-cache\fR - Manipulates packages cache
44
.SS "Synopsis"

deps/npm/man/man1/npm-ci.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "NPM-CI" "1" "February 2023" "" ""
1+
.TH "NPM-CI" "1" "March 2023" "" ""
22
.SH "NAME"
33
\fBnpm-ci\fR - Clean install a project
44
.SS "Synopsis"

deps/npm/man/man1/npm-completion.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "NPM-COMPLETION" "1" "February 2023" "" ""
1+
.TH "NPM-COMPLETION" "1" "March 2023" "" ""
22
.SH "NAME"
33
\fBnpm-completion\fR - Tab Completion for npm
44
.SS "Synopsis"

deps/npm/man/man1/npm-config.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "NPM-CONFIG" "1" "February 2023" "" ""
1+
.TH "NPM-CONFIG" "1" "March 2023" "" ""
22
.SH "NAME"
33
\fBnpm-config\fR - Manage the npm configuration files
44
.SS "Synopsis"

deps/npm/man/man1/npm-dedupe.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "NPM-DEDUPE" "1" "February 2023" "" ""
1+
.TH "NPM-DEDUPE" "1" "March 2023" "" ""
22
.SH "NAME"
33
\fBnpm-dedupe\fR - Reduce duplication in the package tree
44
.SS "Synopsis"

deps/npm/man/man1/npm-deprecate.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "NPM-DEPRECATE" "1" "February 2023" "" ""
1+
.TH "NPM-DEPRECATE" "1" "March 2023" "" ""
22
.SH "NAME"
33
\fBnpm-deprecate\fR - Deprecate a version of a package
44
.SS "Synopsis"

deps/npm/man/man1/npm-diff.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "NPM-DIFF" "1" "February 2023" "" ""
1+
.TH "NPM-DIFF" "1" "March 2023" "" ""
22
.SH "NAME"
33
\fBnpm-diff\fR - The registry diff command
44
.SS "Synopsis"

deps/npm/man/man1/npm-dist-tag.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "NPM-DIST-TAG" "1" "February 2023" "" ""
1+
.TH "NPM-DIST-TAG" "1" "March 2023" "" ""
22
.SH "NAME"
33
\fBnpm-dist-tag\fR - Modify package distribution tags
44
.SS "Synopsis"

deps/npm/man/man1/npm-docs.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "NPM-DOCS" "1" "February 2023" "" ""
1+
.TH "NPM-DOCS" "1" "March 2023" "" ""
22
.SH "NAME"
33
\fBnpm-docs\fR - Open documentation for a package in a web browser
44
.SS "Synopsis"

deps/npm/man/man1/npm-doctor.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "NPM-DOCTOR" "1" "February 2023" "" ""
1+
.TH "NPM-DOCTOR" "1" "March 2023" "" ""
22
.SH "NAME"
33
\fBnpm-doctor\fR - Check your npm environment
44
.SS "Synopsis"

deps/npm/man/man1/npm-edit.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "NPM-EDIT" "1" "February 2023" "" ""
1+
.TH "NPM-EDIT" "1" "March 2023" "" ""
22
.SH "NAME"
33
\fBnpm-edit\fR - Edit an installed package
44
.SS "Synopsis"

deps/npm/man/man1/npm-exec.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "NPM-EXEC" "1" "February 2023" "" ""
1+
.TH "NPM-EXEC" "1" "March 2023" "" ""
22
.SH "NAME"
33
\fBnpm-exec\fR - Run a command from a local or remote npm package
44
.SS "Synopsis"

deps/npm/man/man1/npm-explain.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "NPM-EXPLAIN" "1" "February 2023" "" ""
1+
.TH "NPM-EXPLAIN" "1" "March 2023" "" ""
22
.SH "NAME"
33
\fBnpm-explain\fR - Explain installed packages
44
.SS "Synopsis"

deps/npm/man/man1/npm-explore.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "NPM-EXPLORE" "1" "February 2023" "" ""
1+
.TH "NPM-EXPLORE" "1" "March 2023" "" ""
22
.SH "NAME"
33
\fBnpm-explore\fR - Browse an installed package
44
.SS "Synopsis"

deps/npm/man/man1/npm-find-dupes.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "NPM-FIND-DUPES" "1" "February 2023" "" ""
1+
.TH "NPM-FIND-DUPES" "1" "March 2023" "" ""
22
.SH "NAME"
33
\fBnpm-find-dupes\fR - Find duplication in the package tree
44
.SS "Synopsis"

deps/npm/man/man1/npm-fund.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "NPM-FUND" "1" "February 2023" "" ""
1+
.TH "NPM-FUND" "1" "March 2023" "" ""
22
.SH "NAME"
33
\fBnpm-fund\fR - Retrieve funding information
44
.SS "Synopsis"

deps/npm/man/man1/npm-help-search.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "NPM-HELP-SEARCH" "1" "February 2023" "" ""
1+
.TH "NPM-HELP-SEARCH" "1" "March 2023" "" ""
22
.SH "NAME"
33
\fBnpm-help-search\fR - Search npm help documentation
44
.SS "Synopsis"

deps/npm/man/man1/npm-help.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "NPM-HELP" "1" "February 2023" "" ""
1+
.TH "NPM-HELP" "1" "March 2023" "" ""
22
.SH "NAME"
33
\fBnpm-help\fR - Get help on npm
44
.SS "Synopsis"

deps/npm/man/man1/npm-hook.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "NPM-HOOK" "1" "February 2023" "" ""
1+
.TH "NPM-HOOK" "1" "March 2023" "" ""
22
.SH "NAME"
33
\fBnpm-hook\fR - Manage registry hooks
44
.SS "Synopsis"

0 commit comments

Comments
 (0)