Skip to content

bug(schematic): Material migration for renamed functions/variables does not run #29147

@electrofLy

Description

@electrofLy

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

No response

Description

When running ng update @angular/material the automatic migration for renamed functions/variables does not run. After some investigation I figured that the new line \n in the RegEx for matching namespaces matches nothing in my case. Removing the \n fixes the issue. I am talking about this line.

I am using NX so not sure if that is the issue or maybe an OS problem (\n vs \r\n)?.

Reproduction

Not applicable

Expected Behavior

Renamed functions/variables are migrated automatically.

Actual Behavior

Functions are not migrated.

Environment

Angular CLI: 18.0.2
Node: 20.11.1
Package Manager: npm 10.2.4
OS: win32 x64

Angular: 18.0.1
... animations, cdk, common, compiler, compiler-cli, core, forms
... language-service, material, material-date-fns-adapter
... platform-browser, platform-browser-dynamic, router

Package Version

@angular-devkit/architect 0.1800.2
@angular-devkit/build-angular 18.0.2
@angular-devkit/core 18.0.2
@angular-devkit/schematics 18.0.2
@angular/cli 18.0.2
@schematics/angular 18.0.2
ng-packagr 18.0.0
rxjs 7.8.1
typescript 5.4.5
webpack 5.91.0
zone.js 0.14.5

Metadata

Metadata

Assignees

Labels

P2The issue is important to a large percentage of users, with a workaroundarea: cdk/schematicscdk/schematics is *not* a public API

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions