Skip to content

Commit 7dc423b

Browse files
npm-cli-botCeres6
authored andcommitted
deps: upgrade npm to 9.8.1
PR-URL: nodejs#48838 Reviewed-By: Luke Karrys <luke@lukekarrys.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
1 parent 2611b2c commit 7dc423b

File tree

41 files changed

+580
-166
lines changed

Some content is hidden

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

41 files changed

+580
-166
lines changed

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.8.0 /path/to/npm
30+
npm@9.8.1 /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.8.0
17+
9.8.1
1818

1919
### Description
2020

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.8.0 /path/to/npm
163+
<pre><code class="language-bash">npm@9.8.1 /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.8.0</p>
153+
<p>9.8.1</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/lib/commands/publish.js

+10-3
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class Publish extends BaseCommand {
8989
// The purpose of re-reading the manifest is in case it changed,
9090
// so that we send the latest and greatest thing to the registry
9191
// note that publishConfig might have changed as well!
92-
manifest = await this.getManifest(spec, opts)
92+
manifest = await this.getManifest(spec, opts, true)
9393

9494
// JSON already has the package contents
9595
if (!json) {
@@ -196,11 +196,18 @@ class Publish extends BaseCommand {
196196
// if it's a directory, read it from the file system
197197
// otherwise, get the full metadata from whatever it is
198198
// XXX can't pacote read the manifest from a directory?
199-
async getManifest (spec, opts) {
199+
async getManifest (spec, opts, logWarnings = false) {
200200
let manifest
201201
if (spec.type === 'directory') {
202+
const changes = []
203+
const pkg = await pkgJson.fix(spec.fetchSpec, { changes })
204+
if (changes.length && logWarnings) {
205+
/* eslint-disable-next-line max-len */
206+
log.warn('publish', 'npm auto-corrected some errors in your package.json when publishing. Please run "npm pkg fix" to address these errors.')
207+
log.warn('publish', `errors corrected:\n${changes.join('\n')}`)
208+
}
202209
// Prepare is the special function for publishing, different than normalize
203-
const { content } = await pkgJson.prepare(spec.fetchSpec)
210+
const { content } = await pkg.prepare()
204211
manifest = content
205212
} else {
206213
manifest = await pacote.manifest(spec, {

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Positional arguments are \fBname@version-range\fR identifiers, which will limit
2020
.P
2121
.RS 2
2222
.nf
23-
npm@9.8.0 /path/to/npm
23+
npm@9.8.1 /path/to/npm
2424
└─┬ init-package-json@0.0.4
2525
└── promzard@0.1.5
2626
.fi

deps/npm/man/man1/npm.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ npm
1212
Note: This command is unaware of workspaces.
1313
.SS "Version"
1414
.P
15-
9.8.0
15+
9.8.1
1616
.SS "Description"
1717
.P
1818
npm is the package manager for the Node JavaScript platform. It puts modules in place so that node can find them, and manages dependency conflicts intelligently.

deps/npm/node_modules/@npmcli/arborist/package.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deps/npm/node_modules/@npmcli/config/package.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deps/npm/node_modules/@npmcli/package-json/lib/index.js

-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)