Skip to content

Commit

Permalink
fix(@schematics/update): support upper unbounded ranges
Browse files Browse the repository at this point in the history
  • Loading branch information
clydin committed May 12, 2018
1 parent 452cd1d commit db2f93c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/schematics/update/update/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ const peerCompatibleWhitelist: { [name: string]: PeerVersionTransform } = {
while (!semver.gtr(major + '.0.0', range)) {
major++;
if (major >= 99) {
throw new SchematicsException(`Invalid range: ${JSON.stringify(range)}`);
// Use original range if it supports a major this high
// Range is most likely unbounded (e.g., >=5.0.0)
return range;
}
}

Expand Down

0 comments on commit db2f93c

Please sign in to comment.