Skip to content

Commit e63b380

Browse files
ruyadornodanielleadams
authored andcommitted
deps: upgrade npm to 7.5.2
PR-URL: #37191 Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
1 parent 011910b commit e63b380

File tree

10 files changed

+40
-18
lines changed

10 files changed

+40
-18
lines changed

deps/npm/CHANGELOG.md

+20
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
## v7.5.2 (2021-02-02
2+
3+
### BUG FIXES
4+
5+
* [`37613e4e6`](https://github.com/npm/cli/commit/37613e4e686e4891210acaabc9c23f41456eda3f)
6+
[#2395](https://github.com/npm/cli/issues/2395)
7+
[#2329](https://github.com/npm/cli/issues/2329)
8+
fix(exec): use latest version when possible
9+
([@wraithgar](https://github.com/wraithgar))
10+
* [`567c9bd03`](https://github.com/npm/cli/commit/567c9bd03a7669111fbba6eb6d1f12ed7cad5a1b)
11+
fix(lib/npm): do not clobber config.execPath
12+
([@wraithgar](https://github.com/wraithgar))
13+
14+
### DEPENDENCIES
15+
16+
* [`643709706`](https://github.com/npm/cli/commit/64370970653af5c8d7a2be2c2144e355aa6431b0)
17+
`@npmcli/config@1.2.9` ([@isaacs](https://github.com/isaacs))
18+
* [`4c6be4a`](https://github.com/npm/config/commit/4c6be4a66a3e89ae607e08172b8543b588a95fb5) Restore npm v6 behavior with `INIT_CWD`
19+
* [`bbebc66`](https://github.com/npm/config/commit/bbebc668888f71dba57959682364b6ff26ff4fac) Do not set the `PREFIX` environment variable
20+
121
## v7.5.1 (2021-02-01
222

323
### BUG FIXES

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

+1-1
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.5.1 /path/to/npm
162+
<pre lang="bash"><code>npm@7.5.2 /path/to/npm
163163
└─┬ init-package-json@0.0.4
164164
└── promzard@0.1.5
165165
</code></pre>

deps/npm/docs/output/commands/npm.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
<pre lang="bash"><code>npm &lt;command&gt; [args]
149149
</code></pre>
150150
<h3 id="version">Version</h3>
151-
<p>7.5.1</p>
151+
<p>7.5.2</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

deps/npm/lib/exec.js

+11-3
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,12 @@ const exec = async args => {
169169
return await readPackageJson(pj)
170170
} catch (er) {}
171171
}
172+
// Force preferOnline to true so we are making sure to pull in the latest
173+
// This is especially useful if the user didn't give us a version, and
174+
// they expect to be running @latest
172175
return await pacote.manifest(p, {
173176
...npm.flatOptions,
177+
preferOnline: true,
174178
})
175179
}))
176180

@@ -193,9 +197,13 @@ const exec = async args => {
193197
const arb = new Arborist({ ...npm.flatOptions, path: installDir })
194198
const tree = await arb.loadActual()
195199

196-
// any that don't match the manifest we have, install them
197-
// add installDir/node_modules/.bin to pathArr
198-
const add = manis.filter(mani => manifestMissing(tree, mani))
200+
// at this point, we have to ensure that we get the exact same
201+
// version, because it's something that has only ever been installed
202+
// by npm exec in the cache install directory
203+
const add = manis.filter(mani => manifestMissing(tree, {
204+
...mani,
205+
_from: `${mani.name}@${mani.version}`,
206+
}))
199207
.map(mani => mani._from)
200208
.sort((a, b) => a.localeCompare(b))
201209

deps/npm/lib/npm.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,8 @@ const npm = module.exports = new class extends EventEmitter {
173173
if (node && node.toUpperCase() !== process.execPath.toUpperCase()) {
174174
log.verbose('node symlink', node)
175175
process.execPath = node
176+
this.config.execPath = node
176177
}
177-
this.config.execPath = node
178178

179179
await this.config.load()
180180
this.argv = this.config.parsedArgv.remain

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ example, running \fBnpm ls promzard\fP in npm's source tree will show:
2626
.P
2727
.RS 2
2828
.nf
29-
npm@7\.5\.1 /path/to/npm
29+
npm@7\.5\.2 /path/to/npm
3030
└─┬ init\-package\-json@0\.0\.4
3131
└── promzard@0\.1\.5
3232
.fi

deps/npm/man/man1/npm.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ npm <command> [args]
1010
.RE
1111
.SS Version
1212
.P
13-
7\.5\.1
13+
7\.5\.2
1414
.SS Description
1515
.P
1616
npm is the package manager for the Node JavaScript platform\. It puts

deps/npm/node_modules/@npmcli/config/lib/set-envs.js

+1-7
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

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

deps/npm/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "7.5.1",
2+
"version": "7.5.2",
33
"name": "npm",
44
"description": "a package manager for JavaScript",
55
"keywords": [
@@ -44,7 +44,7 @@
4444
"dependencies": {
4545
"@npmcli/arborist": "^2.1.1",
4646
"@npmcli/ci-detect": "^1.2.0",
47-
"@npmcli/config": "^1.2.8",
47+
"@npmcli/config": "^1.2.9",
4848
"@npmcli/run-script": "^1.8.1",
4949
"abbrev": "~1.1.1",
5050
"ansicolors": "~0.3.2",

0 commit comments

Comments
 (0)