Skip to content
This repository has been archived by the owner on May 10, 2021. It is now read-only.

Commit

Permalink
fix(extract): stop extracting deps before parent :\
Browse files Browse the repository at this point in the history
  • Loading branch information
zkat committed Feb 21, 2018
1 parent f49f673 commit c6847dc
Showing 1 changed file with 6 additions and 20 deletions.
26 changes: 6 additions & 20 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,26 +156,12 @@ class Installer {
})
: BB.resolve(false)
)
.then(wasBundled => {
const hasBundled = Array.from(dep.dependencies.values())
.some(d => d.bundled)

if (hasBundled) {
return BB.resolve(
wasBundled ||
extract.child(dep.name, dep, depPath, this.config, this.opts)
)
.then(next)
} else {
// If it has no bundled children, we can extract children
// concurrently
return BB.join(
wasBundled ||
extract.child(dep.name, dep, depPath, this.config, this.opts),
next()
)
}
})
.then(wasBundled => (
// Don't extract if a bundled dep is actually present
wasBundled ||
extract.child(dep.name, dep, depPath, this.config, this.opts)
))
.then(next)
.then(() => { this.pkgCount++ })
}
}, {concurrency: 50, Promise: BB})
Expand Down

0 comments on commit c6847dc

Please sign in to comment.