Repository navigation
bug(schematics): signal queries/style schematics run more than once #71147
Copy link
Copy link
Open
Labels
area: migrationsIssues related to `ng update`/`ng generate` migrationsIssues related to `ng update`/`ng generate` migrationsgemini-triagedLabel noting that an issue has been triaged by geminiLabel noting that an issue has been triaged by gemini
Milestone
Description
Which @angular/* package(s) are the source of the bug?
core
Is this a regression?
Yes
Description
I have experienced the same bug and respective fix as some previous issues (but for signal queries and style migration), especially this one: "Signal migrations executing multiple times #61337".
ng generate @angular/core:signal-queries-migration
https://angular.dev/reference/migrations/signal-queries
ng generate @angular/core:ngstyle-to-style
https://angular.dev/reference/migrations/ngstyle-to-style
My reproduction goes over the signal queries one. I could not reproduce a minimal @angular/core:ngstyle-to-style, but the same kind of problem happens in my real project I discovered these issues in.
Please provide a link to a minimal reproduction of the bug
https://github.com/msmallest/migrations-duplicate-bug/tree/signal-queries-migration
Please provide the exception or error you saw
Duplicated imports of the respective API (queries and style), duplicated class members that were changed (queries).
Please provide the environment you discovered this bug in (run ng version)
Angular CLI : 22.2.1
Angular : 22.2.1
Node.js : 22.22.3
Package Manager : npm 10.9.8
Operating System : darwin arm64
┌───────────────────────────┬───────────────────┬───────────────────┐
│ Package │ Installed Version │ Requested Version │
├───────────────────────────┼───────────────────┼───────────────────┤
│ @angular/build │ 22.2.1 │ ^22.2.1 │
│ @angular/cli │ 22.2.1 │ ^22.2.1 │
│ @angular/common │ 22.2.1 │ ^22.2.0 │
│ @angular/compiler │ 22.2.1 │ ^22.2.0 │
│ @angular/compiler-cli │ 22.2.1 │ ^22.2.0 │
│ @angular/core │ 22.2.1 │ ^22.2.0 │
│ @angular/forms │ 22.2.1 │ ^22.2.0 │
│ @angular/platform-browser │ 22.2.1 │ ^22.2.0 │
│ @angular/router │ 22.2.1 │ ^22.2.0 │
│ ng-packagr │ 22.2.4 │ ^22.2.0 │
│ rxjs │ 7.8.2 │ ~7.8.0 │
│ typescript │ 6.0.3 │ ~6.0.2 │
│ vitest │ 5.0.3 │ ^5.0.0 │
└───────────────────────────┴───────────────────┴───────────────────┘
Anything else?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: migrationsIssues related to `ng update`/`ng generate` migrationsIssues related to `ng update`/`ng generate` migrationsgemini-triagedLabel noting that an issue has been triaged by geminiLabel noting that an issue has been triaged by gemini


Activity
fix(migrations): avoid applying the same replacements twice in signal…
fix(migrations): avoid migrating files multiple times in signal queri…