From 33827c74767da256453ed8683ebfae580b737d88 Mon Sep 17 00:00:00 2001 From: Rebecca Turner Date: Thu, 29 Jun 2017 00:12:06 -0700 Subject: 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 --- lib/ls.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/ls.js') diff --git a/lib/ls.js b/lib/ls.js index a6da7905f..bd7465e64 100644 --- a/lib/ls.js +++ b/lib/ls.js @@ -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) }) }) -- cgit v1.2.3