diff options
author | Rebecca Turner <me@re-becca.org> | 2017-06-29 10:12:06 +0300 |
---|---|---|
committer | Kat Marchán <kzm@sykosomatic.org> | 2017-07-06 00:58:48 +0300 |
commit | 33827c74767da256453ed8683ebfae580b737d88 (patch) | |
tree | dff8ce04b916900d9abd9f1f79ee63d4a5c27190 /lib/ls.js | |
parent | 8dd3337df6907a516bf3988642a0be32429a40a2 (diff) |
install: Insist on full tree when mutating with a package.lock
That is, if you have a package-lock but haven't installed anything yet then
we're going to insist that all of the bits be there. This is necessary in order
to be able to cleanly upgrade old package-lock files. This means if you type
`npm install foo` or `npm rm foo` and don't have a `node_modules` but do have
a `package-lock.json` it's gonna install everything from the
`package-lock.json` in addition to making your change.
The one thing we won't do is update your package-lock from your
package.json. We only do that when you request a full install.
This does not change the behavior if you don't have a lock file.
PR-URL: https://github.com/npm/npm/pull/17508
Credit: @iarna
Reviewed-By: @zkat
Diffstat (limited to 'lib/ls.js')
-rw-r--r-- | lib/ls.js | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -39,7 +39,7 @@ function ls (args, silent, cb) { readPackageTree(dir, function (_, physicalTree) { if (!physicalTree) physicalTree = {package: {}, path: dir} physicalTree.isTop = true - readShrinkwrap.andInflate(physicalTree, {fakeChildren: true}, function () { + readShrinkwrap.andInflate(physicalTree, function () { lsFromTree(dir, computeMetadata(physicalTree), args, silent, cb) }) }) |