Skip to content

Commit e4b9796

Browse files
lou1swuMichael Perrotte
authored and
Michael Perrotte
committed
shrinkwrap: no need to read package.json when read shrinkwrap
PR-URL: #504 Credit: @Lighting-Jack Close: #504 Reviewed-by: @mikemimik
1 parent 8676429 commit e4b9796

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/install/read-shrinkwrap.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ function readShrinkwrap (child, next) {
1919
maybeReadFile('npm-shrinkwrap.json', child),
2020
// Don't read non-root lockfiles
2121
child.isTop && maybeReadFile('package-lock.json', child),
22-
child.isTop && maybeReadFile('package.json', child),
23-
(shrinkwrap, lockfile, pkgJson) => {
22+
(shrinkwrap, lockfile) => {
2423
if (shrinkwrap && lockfile) {
2524
log.warn('read-shrinkwrap', 'Ignoring package-lock.json because there is already an npm-shrinkwrap.json. Please use only one of the two.')
2625
}

0 commit comments

Comments
 (0)