Skip to content

fix(migrations): Do not remove a template if it is referenced with a trailing semicolon#64745

Merged
crisbeto merged 1 commit intoangular:mainfrom
lukasmatta:fix-cf-migration
Oct 29, 2025
Merged

fix(migrations): Do not remove a template if it is referenced with a trailing semicolon#64745
crisbeto merged 1 commit intoangular:mainfrom
lukasmatta:fix-cf-migration

Conversation

@lukasmatta
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.dev application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Under a specific condition described in #64741 the migration is wrongly removing a template that is used.

Issue Number: #64741

What is the new behavior?

It should not remove the template that is still used.

Does this PR introduce a breaking change?

  • Yes
  • No

@pullapprove pullapprove bot requested a review from atscott October 28, 2025 23:15
@angular-robot angular-robot bot added the area: migrations Issues related to `ng update`/`ng generate` migrations label Oct 28, 2025
@ngbot ngbot bot added this to the Backlog milestone Oct 28, 2025
@lukasmatta lukasmatta changed the title fix(migrations): Do not remove a template if it is used with context fix(migrations): Do not remove a template if it is referenced with a trailing semicolon Oct 28, 2025
@atscott atscott added the action: merge The PR is ready for merge by the caretaker label Oct 28, 2025
…th a trailing semilocon

This commit fixes a behavior where under certain conditions, the migration script ignored
a template reference with a trailing semicolon and incorrectly removed the definition
of a referenced template.

Fixes angular#64741
@crisbeto crisbeto added the target: patch This PR is targeted for the next patch release label Oct 29, 2025
@crisbeto crisbeto merged commit 64cb085 into angular:main Oct 29, 2025
16 of 19 checks passed
@crisbeto
Copy link
Member

This PR was merged into the repository. The changes were merged into the following branches:

lukasmatta added a commit to lukasmatta/angular that referenced this pull request Nov 2, 2025
…ng whitespace characters

In angular#64745, a fix was introduced for templates referenced with a trailing semicolon. However, templates are still incorrectly removed when there are whitespace characters before the template name.

This commit updates the control flow migration logic to ensure templates referenced with preceding whitespace are not removed.

Fixes angular#64741
lukasmatta added a commit to lukasmatta/angular that referenced this pull request Nov 2, 2025
…ng whitespace characters

In angular#64745, a fix was introduced for templates referenced with a trailing semicolon. However, templates are still incorrectly removed when there are whitespace characters before the template name.

This commit updates the control flow migration logic to ensure templates referenced with preceding whitespace are not removed.

Fixes angular#64854
atscott pushed a commit that referenced this pull request Nov 4, 2025
…ng whitespace characters

In #64745, a fix was introduced for templates referenced with a trailing semicolon. However, templates are still incorrectly removed when there are whitespace characters before the template name.

This commit updates the control flow migration logic to ensure templates referenced with preceding whitespace are not removed.

Fixes #64854
atscott pushed a commit that referenced this pull request Nov 4, 2025
…ng whitespace characters

In #64745, a fix was introduced for templates referenced with a trailing semicolon. However, templates are still incorrectly removed when there are whitespace characters before the template name.

This commit updates the control flow migration logic to ensure templates referenced with preceding whitespace are not removed.

Fixes #64854

(cherry picked from commit 5b210e9)
atscott pushed a commit that referenced this pull request Nov 4, 2025
…ng whitespace characters

In #64745, a fix was introduced for templates referenced with a trailing semicolon. However, templates are still incorrectly removed when there are whitespace characters before the template name.

This commit updates the control flow migration logic to ensure templates referenced with preceding whitespace are not removed.

Fixes #64854

(cherry picked from commit 5b210e9)
@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 Nov 29, 2025
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`/`ng generate` migrations target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants