Browse files

shrinkwrap: don't ignore devdevps that are also deps

Fixes #4296.
  • Loading branch information...
1 parent e05b1e4 commit 9c575c56efa9b0c8b0d4a17cb9c1de3833004bcd Di Wu committed with domenic Jun 3, 2013
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/shrinkwrap.js
View
5 lib/shrinkwrap.js
@@ -38,6 +38,11 @@ function shrinkwrap_ (pkginfo, silent, dev, cb) {
return cb(er)
if (data.devDependencies) {
Object.keys(data.devDependencies).forEach(function (dep) {
+ if (data.dependencies && data.dependencies[dep]) {
+ // do not exclude the dev dependency if it's also listed as a dependency
+ return
+ }
+
log.warn("shrinkwrap", "Excluding devDependency: %s", dep)
delete pkginfo.dependencies[dep]
})

1 comment on commit 9c575c5

Please sign in to comment.