-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(material): ng-add should always install matching CDK version (#18076
) Currently ng-add for Angular Material determines the version name of the CDK and Angular Material by looking for `@angular/cdk/package.json` and `@angular/material/package.json` in the node modules. This is incorrect because other installed packages could rely on older CDK versions being installed. In those cases, we don't want to add that transitively installed CDK version to the `package.json` file. Instead, we always want to add the CDK version that matches Angular Material. We can do this by just relying on the version placeholder we use in other locations too. Also in the issue ticket (#18020) it was mentioned that we might want to warn if a lower CDK version is transitively installed. This seems unnecessary since we explicitly add a project-scoped dependency on the CDK and transitive CDK dependencies are nothing we should bother about. In general, if someone runs `ng add @angular/material` it's _only_ right to always install a working/matching version of the CDK. Fixes #18020
- Loading branch information
1 parent
fad8d24
commit fba22bc
Showing
5 changed files
with
24 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters