You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
0 commit comments