Skip to content

Commit

Permalink
fix(shrinkwrap): don't fail when shrinkwrap misses a resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
zkochan committed Feb 13, 2017
1 parent f763d6a commit a73ae78
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/fs/shrinkwrap.ts
Expand Up @@ -90,6 +90,10 @@ function copyDependencyTree (shr: Shrinkwrap): ResolvedPackages {
while (pkgIds.length) {
let nextPkgIds: string[] = []
for (let pkgId of pkgIds) {
if (!shr.packages[pkgId]) {
logger.warn(`Cannot find resolution of ${pkgId} in shrinkwrap file`)
continue
}
resolvedPackages[pkgId] = shr.packages[pkgId]
const newDependencies = values(shr.packages[pkgId].dependencies || {})
.filter((newPkgId: string) => !resolvedPackages[newPkgId] && pkgIds.indexOf(newPkgId) === -1)
Expand Down

0 comments on commit a73ae78

Please sign in to comment.