bug(Material Migration m2-theming-v18): Material 18 Migration Fails - Invalid regular expression #30827
Labels
area: cdk/schematics
cdk/schematics is *not* a public API
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Is this a regression?
The previous version in which this bug was not present was
17.3.10
Description
When attempting to run the
ng update @angular/material@18
script to make the step from Angular Material 17 to 18, the script breaks consistently, providing the following output:The angular-errors.log provides slightly more details:
This has been tested by multiple people on our team with the same results. According to the code here ( https://github.com/angular/components/blob/18.0.x/src/material/schematics/ng-update/migrations/m2-theming-v18/migration.ts ) it is checking for commented out function names, but it is not escaping the comment characters, which is causing the
migrateFunction
function to fail on line 154, since the/*
characters are not being escaped.Reproduction
StackBlitz link: (As this is a migration script run via ng update, a stackblitz does not make sense
Steps to reproduce:
Expected Behavior
I would expect the script to proceed, and finish migrating things from 17 to 18.
Actual Behavior
It crashes out, with the errors above.
Environment
The text was updated successfully, but these errors were encountered: