summaryrefslogtreecommitdiff
path: root/deps/npm/lib/install/inflate-shrinkwrap.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/lib/install/inflate-shrinkwrap.js')
-rw-r--r--deps/npm/lib/install/inflate-shrinkwrap.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/deps/npm/lib/install/inflate-shrinkwrap.js b/deps/npm/lib/install/inflate-shrinkwrap.js
index ab1bdd1f19..b70e9576bf 100644
--- a/deps/npm/lib/install/inflate-shrinkwrap.js
+++ b/deps/npm/lib/install/inflate-shrinkwrap.js
@@ -45,14 +45,16 @@ function inflateShrinkwrap (topPath, tree, swdeps, finishInflating) {
return inflateShrinkwrap(topPath, child, dependencies || {}, next)
} else {
var from = sw.from || requested.raw
- return fetchPackageMetadata(requested, topPath, iferr(next, andAddShrinkwrap(from, dependencies, next)))
+ var optional = sw.optional
+ return fetchPackageMetadata(requested, topPath, iferr(next, andAddShrinkwrap(from, optional, dependencies, next)))
}
}
}
- function andAddShrinkwrap (from, dependencies, next) {
+ function andAddShrinkwrap (from, optional, dependencies, next) {
return function (pkg) {
pkg._from = from
+ pkg._optional = optional
addShrinkwrap(pkg, iferr(next, andAddBundled(pkg, dependencies, next)))
}
}