Skip to content

Commit

Permalink
shrinkwrap: no need to read package.json when read shrinkwrap
Browse files Browse the repository at this point in the history
PR-URL: #504
Credit: @Lighting-Jack
Close: #504
Reviewed-by: @mikemimik
  • Loading branch information
lou1swu authored and Michael Perrotte committed Dec 3, 2019
1 parent 8676429 commit e4b9796
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/install/read-shrinkwrap.js
Expand Up @@ -19,8 +19,7 @@ function readShrinkwrap (child, next) {
maybeReadFile('npm-shrinkwrap.json', child),
// Don't read non-root lockfiles
child.isTop && maybeReadFile('package-lock.json', child),
child.isTop && maybeReadFile('package.json', child),
(shrinkwrap, lockfile, pkgJson) => {
(shrinkwrap, lockfile) => {
if (shrinkwrap && lockfile) {
log.warn('read-shrinkwrap', 'Ignoring package-lock.json because there is already an npm-shrinkwrap.json. Please use only one of the two.')
}
Expand Down

0 comments on commit e4b9796

Please sign in to comment.