-
Notifications
You must be signed in to change notification settings - Fork 26.5k
fix(core): Fixed inject migration schematics for migrate destructured properties #62832
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
d978f3c
to
ff3fcf4
Compare
Fixed lint |
packages/core/schematics/ng-generate/inject-migration/migration.ts
Outdated
Show resolved
Hide resolved
ff3fcf4
to
0dfe02b
Compare
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request fixes a bug in the inject
migration schematic to correctly handle destructured properties in constructor parameters. The implementation introduces a ParameterMigrationContext
to group related parameters, refactors the main migration function to handle different parameter kinds, and adds logic to correctly transform destructured properties into class properties with inject()
. A new test case is also added to cover this scenario. The changes are well-structured and the fix appears correct. I have one minor suggestion to improve code clarity.
packages/core/schematics/ng-generate/inject-migration/migration.ts
Outdated
Show resolved
Hide resolved
packages/core/schematics/ng-generate/inject-migration/migration.ts
Outdated
Show resolved
Hide resolved
packages/core/schematics/ng-generate/inject-migration/migration.ts
Outdated
Show resolved
Hide resolved
0dfe02b
to
7b38c50
Compare
@JeanMeche fixed lint and made the requested changes |
packages/core/schematics/ng-generate/inject-migration/migration.ts
Outdated
Show resolved
Hide resolved
… properties Fixes angular#62626 - Properties used with the destructor are also managed during migration.
7b38c50
to
3a970bc
Compare
Fixed inject migration schematics for migrate destructured properties
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: #62626
What is the new behavior?
Fixed inject migration schematics for migrate destructured properties
Does this PR introduce a breaking change?