Skip to content

bug(update): ng update asks to update @angular/material when @angular/cdk is only installed #30546

@igorosabel

Description

@igorosabel

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

19.1.0 (not sure)

Description

Hi. I am using @angular/cdk on a project to handle drag-and-drop stuff but I am not using @angular/material. When I input "ng update" command it prompts me to update @angular/material but it doesn't prompt to update @angular/cdk.

Reproduction

StackBlitz link: https://stackblitz.com/edit/components-issue-starter-mkuwgncd?file=package.json
Steps to reproduce:

  1. Get reproduction project
  2. Input "ng update"
  3. Asks to update @angular/material despite of not being present on package.json

Expected Behavior

It should ask to update @angular/cdk instead of @angular/material

Actual Behavior

It asks to update @angular/material instead of @angular/cdk. If I input "ng update @angular/material" it fails saying:

Package '@angular/material' is not a dependency.

Environment

  • Angular: 19.1.4
  • CDK/Material: 19.1.2
  • Browser(s):
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows 11

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triageThis issue needs to be triaged by the team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions