Skip to content

Commit 9260087

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.
1 parent 60086db commit 9260087

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

+2
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)