Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v7.5.2 #2597

Merged
merged 5 commits into from Feb 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 20 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,23 @@
## v7.5.2 (2021-02-02)

### BUG FIXES

* [`37613e4e6`](https://github.com/npm/cli/commit/37613e4e686e4891210acaabc9c23f41456eda3f)
[#2395](https://github.com/npm/cli/issues/2395)
[#2329](https://github.com/npm/cli/issues/2329)
fix(exec): use latest version when possible
([@wraithgar](https://github.com/wraithgar))
* [`567c9bd03`](https://github.com/npm/cli/commit/567c9bd03a7669111fbba6eb6d1f12ed7cad5a1b)
fix(lib/npm): do not clobber config.execPath
([@wraithgar](https://github.com/wraithgar))

### DEPENDENCIES

* [`643709706`](https://github.com/npm/cli/commit/64370970653af5c8d7a2be2c2144e355aa6431b0)
`@npmcli/config@1.2.9` ([@isaacs](https://github.com/isaacs))
* [`4c6be4a`](https://github.com/npm/config/commit/4c6be4a66a3e89ae607e08172b8543b588a95fb5) Restore npm v6 behavior with `INIT_CWD`
* [`bbebc66`](https://github.com/npm/config/commit/bbebc668888f71dba57959682364b6ff26ff4fac) Do not set the `PREFIX` environment variable

## v7.5.1 (2021-02-01

### BUG FIXES
Expand Down
14 changes: 11 additions & 3 deletions lib/exec.js
Expand Up @@ -169,8 +169,12 @@ const exec = async args => {
return await readPackageJson(pj)
} catch (er) {}
}
// Force preferOnline to true so we are making sure to pull in the latest
// This is especially useful if the user didn't give us a version, and
// they expect to be running @latest
return await pacote.manifest(p, {
...npm.flatOptions,
preferOnline: true,
})
}))

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

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

Expand Down
2 changes: 1 addition & 1 deletion lib/npm.js
Expand Up @@ -173,8 +173,8 @@ const npm = module.exports = new class extends EventEmitter {
if (node && node.toUpperCase() !== process.execPath.toUpperCase()) {
log.verbose('node symlink', node)
process.execPath = node
this.config.execPath = node
}
this.config.execPath = node

await this.config.load()
this.argv = this.config.parsedArgv.remain
Expand Down
8 changes: 1 addition & 7 deletions node_modules/@npmcli/config/lib/set-envs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion node_modules/@npmcli/config/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
@@ -1,5 +1,5 @@
{
"version": "7.5.1",
"version": "7.5.2",
"name": "npm",
"description": "a package manager for JavaScript",
"keywords": [
Expand Down Expand Up @@ -44,7 +44,7 @@
"dependencies": {
"@npmcli/arborist": "^2.1.1",
"@npmcli/ci-detect": "^1.2.0",
"@npmcli/config": "^1.2.8",
"@npmcli/config": "^1.2.9",
"@npmcli/run-script": "^1.8.1",
"abbrev": "~1.1.1",
"ansicolors": "~0.3.2",
Expand Down