Skip to content
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

fix(migrations): Add support for nested structures inside a switch statement #52358

Closed
wants to merge 1 commit into from

Conversation

jessicajaniuk
Copy link
Contributor

This updates the code to handle switches more elegantly in line with how the other blocks are handled. This allows nesting to be handled just like other blocks.

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix

Does this PR introduce a breaking change?

  • Yes
  • No

@jessicajaniuk jessicajaniuk added action: review The PR is still awaiting reviews from at least one requested reviewer area: migrations Issues related to `ng update` migrations target: rc This PR is targeted for the next release-candidate labels Oct 24, 2023
@ngbot ngbot bot added this to the Backlog milestone Oct 24, 2023
@pullapprove pullapprove bot requested a review from alxhub October 24, 2023 20:09
@jessicajaniuk jessicajaniuk requested review from AndrewKushnir and removed request for alxhub October 24, 2023 20:18
@pullapprove pullapprove bot requested a review from alxhub October 24, 2023 20:18
@jessicajaniuk jessicajaniuk requested review from dylhunn and removed request for alxhub October 24, 2023 20:33
@jessicajaniuk jessicajaniuk added action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Oct 24, 2023
…atement

This updates the code to handle switches more elegantly in line with how the other blocks are handled. This allows nesting to be handled just like other blocks.
@jessicajaniuk jessicajaniuk added action: merge The PR is ready for merge by the caretaker merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Oct 24, 2023
@jessicajaniuk
Copy link
Contributor Author

Caretaker note: This is safe to merge. The G3 failures are unrelated.

@dylhunn
Copy link
Contributor

dylhunn commented Oct 25, 2023

This PR was merged into the repository by commit 9692aeb.

@dylhunn dylhunn closed this in 9692aeb Oct 25, 2023
dylhunn pushed a commit that referenced this pull request Oct 25, 2023
…atement (#52358)

This updates the code to handle switches more elegantly in line with how the other blocks are handled. This allows nesting to be handled just like other blocks.

PR Close #52358
@@ -134,10 +134,12 @@ export function migrateTemplate(template: string): {migrated: string|null, error

// start from top of template
// loop through each element
visitor.elements[0].hasLineBreaks = hasLineBreaks;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This crashes the migration if there are files without any control flow statements

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the heads up. #52399 should fix this.

@jessicajaniuk jessicajaniuk deleted the migration-switch branch November 9, 2023 20:34
tbondwilkinson pushed a commit to tbondwilkinson/angular that referenced this pull request Dec 6, 2023
…atement (angular#52358)

This updates the code to handle switches more elegantly in line with how the other blocks are handled. This allows nesting to be handled just like other blocks.

PR Close angular#52358
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Dec 10, 2023
ChellappanRajan pushed a commit to ChellappanRajan/angular that referenced this pull request Jan 23, 2024
…atement (angular#52358)

This updates the code to handle switches more elegantly in line with how the other blocks are handled. This allows nesting to be handled just like other blocks.

PR Close angular#52358
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: migrations Issues related to `ng update` migrations merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: rc This PR is targeted for the next release-candidate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants