Skip to content

Commit 6446091

Browse files
clydindgp1130
authored andcommitted
fix(@angular/cli): exclude @angular/material@7.x from ng add package 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. (cherry picked from commit 9260087) (cherry picked from commit 1a58436)
1 parent f1fe0ea commit 6446091

File tree

1 file changed

+2
-0
lines changed
  • packages/angular/cli/src/commands/add

1 file changed

+2
-0
lines changed

packages/angular/cli/src/commands/add/cli.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ interface AddCommandArgs extends SchematicsCommandArgs {
5050
const packageVersionExclusions: Record<string, string | undefined> = {
5151
// @angular/localize@9.x versions do not have peer dependencies setup
5252
'@angular/localize': '9.x',
53+
// @angular/material@7.x versions have unbounded peer dependency ranges (>=7.0.0)
54+
'@angular/material': '7.x',
5355
};
5456

5557
export class AddCommandModule

0 commit comments

Comments
 (0)