angular/packages/core/schematics/utils
Paul Gschwendtner 8d308dc4ec fix(migrations): prevent migrations from updating external templates multiple times (#44013)
The `NgComponentTemplateVisitor` helper was always referring back to the original source file on disk
rather than the virtual file in the migration. This meant that some template migrations could attempt
to modify the template multiple times resulting in invalid output.

As an example the `migration-v13-router-link-empty-expression` migrates the following template:

```
<div [routerLink]></div>
```

to

```
<div [routerLink]="[]"></div>
```

But if the template was referenced multiple times in the program, such as when the component was
referenced in the source and test entry-points, the migration would result in things like:

```
<div [routerLink]="[]"="[]"></div>
```

Fixes #44005.

PR Close #44013
2021-11-03 09:38:43 -07:00
..
tslint refactor: make all imports compatible with ESM/CJS output. (#43431) 2021-10-01 18:28:45 +00:00
typescript refactor: make all imports compatible with ESM/CJS output. (#43431) 2021-10-01 18:28:45 +00:00
BUILD.bazel refactor(migrations): support use of an ESM @angular/compiler-cli package (#43657) 2021-10-04 16:24:48 -07:00
import_manager.ts refactor: make all imports compatible with ESM/CJS output. (#43431) 2021-10-01 18:28:45 +00:00
line_mappings.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
load_esm.ts refactor(migrations): support use of an ESM @angular/compiler-cli package (#43657) 2021-10-04 16:24:48 -07:00
ng_component_template.ts fix(migrations): prevent migrations from updating external templates multiple times (#44013) 2021-11-03 09:38:43 -07:00
ng_decorators.ts refactor: make all imports compatible with ESM/CJS output. (#43431) 2021-10-01 18:28:45 +00:00
parse_html.ts Revert "Revert "refactor(migrations): support use of an ESM @angular/compiler package (#43627)"" (#43637) 2021-09-29 14:46:03 -07:00
project_tsconfig_paths.ts fix(migrations): migration failed finding tsconfig file (#43343) 2021-09-07 23:16:56 +00:00
schematics_prompt.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
template_ast_visitor.ts Revert "Revert "refactor(migrations): support use of an ESM @angular/compiler package (#43627)"" (#43637) 2021-09-29 14:46:03 -07:00