Skip to content

Commit

Permalink
fix(@angular/cli): exclude @angular/material@7.x from ng add packag…
Browse files Browse the repository at this point in the history
…e discovery

`@angular/material@7.x` uses unbounded ranges for its framework peer dependencies.
This can cause `ng add` to pick these versions of the package if the newer versions
are not compatible since the peer dependency ranges would match any newer stable
framework version.
  • Loading branch information
clydin authored and dgp1130 committed Oct 25, 2022
1 parent 60086db commit 9260087
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/angular/cli/src/commands/add/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ interface AddCommandArgs extends SchematicsCommandArgs {
const packageVersionExclusions: Record<string, string | undefined> = {
// @angular/localize@9.x versions do not have peer dependencies setup
'@angular/localize': '9.x',
// @angular/material@7.x versions have unbounded peer dependency ranges (>=7.0.0)
'@angular/material': '7.x',
};

export class AddCommandModule
Expand Down

0 comments on commit 9260087

Please sign in to comment.