Skip to content

Commit bf81dc6

Browse files
committed
install: Ignore shrinkwrap when --no-shrinkwrap is set
1 parent 6f08651 commit bf81dc6

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

doc/cli/config.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -721,6 +721,14 @@ character to indicate reverse sort.
721721

722722
The shell to run for the `npm explore` command.
723723

724+
### shrinkwrap
725+
726+
* Default: true
727+
* Type: Boolean
728+
729+
If set to false, then ignore `npm-shrinkwrap.json` files when
730+
installing.
731+
724732
### sign-git-tag
725733

726734
* Default: false

lib/install.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,10 @@ function readDependencies (context, where, opts, cb) {
250250
})
251251
}
252252

253+
// User has opted out of shrinkwraps entirely
254+
if (npm.config.get("shrinkwrap") === false)
255+
return cb(null, data, null)
256+
253257
if (wrap) {
254258
log.verbose("readDependencies: using existing wrap", [where, wrap])
255259
var rv = {}

0 commit comments

Comments
 (0)