Skip to content

Commit

Permalink
fix(@schematics/update): validate all peer dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
filipesilva authored and vikerman committed Oct 28, 2019
1 parent 769eea1 commit 2fc322f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/schematics/update/update/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ function _validateForwardPeerDependencies(
logger: logging.LoggerApi,
next: boolean,
): boolean {
let validationFailed = false;
for (const [peer, range] of Object.entries(peers)) {
logger.debug(`Checking forward peer ${peer}...`);
const maybePeerInfo = infoMap.get(peer);
Expand All @@ -125,7 +126,7 @@ function _validateForwardPeerDependencies(
`${JSON.stringify(peer)} @ ${JSON.stringify(range)}.`,
].join(' '));

return false;
continue;
}

const peerVersion = maybePeerInfo.target && maybePeerInfo.target.packageJson.version
Expand All @@ -140,11 +141,12 @@ function _validateForwardPeerDependencies(
`would install ${JSON.stringify(peerVersion)})`,
].join(' '));

return true;
validationFailed = true;
continue;
}
}

return false;
return validationFailed;
}


Expand Down

0 comments on commit 2fc322f

Please sign in to comment.