Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0df47d5

Browse filesBrowse files
npm-robotBethGriggs
authored andcommitted
deps: upgrade npm to 7.23.0
PR-URL: #40055 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Beth Griggs <bgriggs@redhat.com>
1 parent 8aad81d commit 0df47d5
Copy full SHA for 0df47d5

File tree

Expand file treeCollapse file tree

203 files changed

+3991
-1957
lines changed
Open diff view settings
Filter options

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree

203 files changed

+3991
-1957
lines changed
Open diff view settings
Expand file

‎deps/npm/docs/content/commands/npm-deprecate.md‎

Copy file name to clipboardExpand all lines: deps/npm/docs/content/commands/npm-deprecate.md
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Expand file

‎deps/npm/docs/content/using-npm/workspaces.md‎

Copy file name to clipboardExpand all lines: deps/npm/docs/content/using-npm/workspaces.md
+10Lines changed: 10 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Collapse file

‎deps/npm/docs/output/commands/npm-deprecate.html‎

Copy file name to clipboardExpand all lines: deps/npm/docs/output/commands/npm-deprecate.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ <h3 id="see-also">See Also</h3>
194194
<li><a href="../commands/npm-publish.html">npm publish</a></li>
195195
<li><a href="../using-npm/registry.html">npm registry</a></li>
196196
<li><a href="../commands/npm-owner.html">npm owner</a></li>
197-
<li><a href="../commands/npm-adduser.html">npm owner</a></li>
197+
<li><a href="../commands/npm-adduser.html">npm adduser</a></li>
198198
</ul>
199199
</div>
200200

Collapse file

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

Copy file name to clipboardExpand all lines: deps/npm/docs/output/commands/npm-ls.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ <h3 id="description">Description</h3>
159159
the results to only the paths to the packages named. Note that nested
160160
packages will <em>also</em> show the paths to the specified packages. For
161161
example, running <code>npm ls promzard</code> in npm’s source tree will show:</p>
162-
<pre lang="bash"><code>npm@7.21.1 /path/to/npm
162+
<pre lang="bash"><code>npm@7.23.0 /path/to/npm
163163
└─┬ init-package-json@0.0.4
164164
└── promzard@0.1.5
165165
</code></pre>
Collapse file

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

Copy file name to clipboardExpand all lines: deps/npm/docs/output/commands/npm.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ <h2 id="table-of-contents">Table of contents</h2>
148148
<pre lang="bash"><code>npm &lt;command&gt; [args]
149149
</code></pre>
150150
<h3 id="version">Version</h3>
151-
<p>7.21.1</p>
151+
<p>7.23.0</p>
152152
<h3 id="description">Description</h3>
153153
<p>npm is the package manager for the Node JavaScript platform. It puts
154154
modules in place so that node can find them, and manages dependency
Collapse file

‎deps/npm/docs/output/using-npm/workspaces.html‎

Copy file name to clipboardExpand all lines: deps/npm/docs/output/using-npm/workspaces.html
+6-1Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ <h1 id="workspaces">workspaces</h1>
141141

142142
<section id="table_of_contents">
143143
<h2 id="table-of-contents">Table of contents</h2>
144-
<div id="_table_of_contents"><ul><li><a href="#description">Description</a></li><li><a href="#defining-workspaces">Defining workspaces</a></li><li><a href="#getting-started-with-workspaces">Getting started with workspaces</a></li><li><a href="#adding-dependencies-to-a-workspace">Adding dependencies to a workspace</a></li><li><a href="#using-workspaces">Using workspaces</a></li><li><a href="#running-commands-in-the-context-of-workspaces">Running commands in the context of workspaces</a></li><li><a href="#see-also">See also</a></li></ul></div>
144+
<div id="_table_of_contents"><ul><li><a href="#description">Description</a></li><li><a href="#defining-workspaces">Defining workspaces</a></li><li><a href="#getting-started-with-workspaces">Getting started with workspaces</a></li><li><a href="#adding-dependencies-to-a-workspace">Adding dependencies to a workspace</a></li><li><a href="#using-workspaces">Using workspaces</a></li><li><a href="#running-commands-in-the-context-of-workspaces">Running commands in the context of workspaces</a></li><li><a href="#ignoring-missing-scripts">Ignoring missing scripts</a></li><li><a href="#see-also">See also</a></li></ul></div>
145145
</section>
146146

147147
<div id="_content"><h3 id="description">Description</h3>
@@ -264,6 +264,11 @@ <h3 id="running-commands-in-the-context-of-workspaces">Running commands in the c
264264
<pre><code>npm run test --workspaces
265265
</code></pre>
266266
<p>Will run the <code>test</code> script in both <code>./packages/a</code> and <code>./packages/b</code>.</p>
267+
<h3 id="ignoring-missing-scripts">Ignoring missing scripts</h3>
268+
<p>It is not required for all of the workspaces to implement scripts run with the <code>npm run</code> command.</p>
269+
<p>By running the command with the <code>--if-present</code> flag, npm will ignore workspaces missing target script.</p>
270+
<pre><code>npm run test --workspaces --if-present
271+
</code></pre>
267272
<h3 id="see-also">See also</h3>
268273
<ul>
269274
<li><a href="../commands/npm-install.html">npm install</a></li>
Collapse file

‎deps/npm/lib/install.js‎

Copy file name to clipboardExpand all lines: deps/npm/lib/install.js
+20-2Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ const log = require('npmlog')
88
const { resolve, join } = require('path')
99
const Arborist = require('@npmcli/arborist')
1010
const runScript = require('@npmcli/run-script')
11+
const pacote = require('pacote')
12+
const checks = require('npm-install-checks')
1113

1214
const ArboristWorkspaceCmd = require('./workspaces/arborist-cmd.js')
1315
class Install extends ArboristWorkspaceCmd {
@@ -126,6 +128,23 @@ class Install extends ArboristWorkspaceCmd {
126128
const ignoreScripts = this.npm.config.get('ignore-scripts')
127129
const isGlobalInstall = this.npm.config.get('global')
128130
const where = isGlobalInstall ? globalTop : this.npm.prefix
131+
const forced = this.npm.config.get('force')
132+
const isDev = this.npm.config.get('dev')
133+
const scriptShell = this.npm.config.get('script-shell') || undefined
134+
135+
// be very strict about engines when trying to update npm itself
136+
const npmInstall = args.find(arg => arg.startsWith('npm@') || arg === 'npm')
137+
if (isGlobalInstall && npmInstall) {
138+
const npmManifest = await pacote.manifest(npmInstall)
139+
try {
140+
checks.checkEngine(npmManifest, npmManifest.version, process.version)
141+
} catch (e) {
142+
if (forced)
143+
this.npm.log.warn('install', `Forcing global npm install with incompatible version ${npmManifest.version} into node ${process.version}`)
144+
else
145+
throw e
146+
}
147+
}
129148

130149
// don't try to install the prefix into itself
131150
args = args.filter(a => resolve(a) !== this.npm.prefix)
@@ -135,7 +154,7 @@ class Install extends ArboristWorkspaceCmd {
135154
args = ['.']
136155

137156
// TODO: Add warnings for other deprecated flags? or remove this one?
138-
if (this.npm.config.get('dev'))
157+
if (isDev)
139158
log.warn('install', 'Usage of the `--dev` option is deprecated. Use `--include=dev` instead.')
140159

141160
const opts = {
@@ -150,7 +169,6 @@ class Install extends ArboristWorkspaceCmd {
150169
await arb.reify(opts)
151170

152171
if (!args.length && !isGlobalInstall && !ignoreScripts) {
153-
const scriptShell = this.npm.config.get('script-shell') || undefined
154172
const scripts = [
155173
'preinstall',
156174
'install',
Collapse file

‎deps/npm/lib/utils/error-message.js‎

Copy file name to clipboardExpand all lines: deps/npm/lib/utils/error-message.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ module.exports = (er, npm) => {
181181
const pkg = er.pkgid.replace(/(?!^)@.*$/, '')
182182

183183
detail.push(['404', ''])
184-
detail.push(['404', '', "'" + er.pkgid + "' is not in the npm registry."])
184+
detail.push(['404', '', `'${replaceInfo(er.pkgid)}' is not in this registry.`])
185185

186186
const valResult = nameValidator(pkg)
187187

Collapse file

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

Copy file name to clipboardExpand all lines: deps/npm/man/man1/npm-access.1
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "NPM\-ACCESS" "1" "August 2021" "" ""
1+
.TH "NPM\-ACCESS" "1" "September 2021" "" ""
22
.SH "NAME"
33
\fBnpm-access\fR \- Set access level on published packages
44
.SS Synopsis
Collapse file

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

Copy file name to clipboardExpand all lines: deps/npm/man/man1/npm-adduser.1
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "NPM\-ADDUSER" "1" "August 2021" "" ""
1+
.TH "NPM\-ADDUSER" "1" "September 2021" "" ""
22
.SH "NAME"
33
\fBnpm-adduser\fR \- Add a registry user account
44
.SS Synopsis

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.