Skip to content

Commit e40b5c9

Browse files
JeanMechethePunderWoman
authored andcommitted
refactor(core): run the control flow migration during ng update (angular#60492)
The migration had to be run manually before this change. It is now part of the update process when migrating to v20. PR Close angular#60492
1 parent b407157 commit e40b5c9

File tree

18 files changed

+21
-202
lines changed

18 files changed

+21
-202
lines changed

β€Žgoldens/public-api/common/index.api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@ export class NgSwitch {
692692
static Ι΅fac: i0.Ι΅Ι΅FactoryDeclaration<NgSwitch, never>;
693693
}
694694

695-
// @public
695+
// @public @deprecated
696696
export class NgSwitchCase implements DoCheck {
697697
constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef<Object>, ngSwitch: NgSwitch);
698698
ngDoCheck(): void;
@@ -703,7 +703,7 @@ export class NgSwitchCase implements DoCheck {
703703
static Ι΅fac: i0.Ι΅Ι΅FactoryDeclaration<NgSwitchCase, [null, null, { optional: true; host: true; }]>;
704704
}
705705

706-
// @public
706+
// @public @deprecated
707707
export class NgSwitchDefault {
708708
constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef<Object>, ngSwitch: NgSwitch);
709709
// (undocumented)

β€Žpackages/core/schematics/BUILD.bazel

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ pkg_npm(
1414
"migrations.json",
1515
"package.json",
1616
"//packages/core/schematics/ng-generate/cleanup-unused-imports:static_files",
17-
"//packages/core/schematics/ng-generate/control-flow-migration:static_files",
1817
"//packages/core/schematics/ng-generate/inject-migration:static_files",
1918
"//packages/core/schematics/ng-generate/output-migration:static_files",
2019
"//packages/core/schematics/ng-generate/route-lazy-loading:static_files",
@@ -35,7 +34,6 @@ rollup_bundle(
3534
name = "bundles",
3635
config_file = ":rollup.config.js",
3736
entry_points = {
38-
"//packages/core/schematics/ng-generate/control-flow-migration:index.ts": "control-flow-migration",
3937
"//packages/core/schematics/ng-generate/inject-migration:index.ts": "inject-migration",
4038
"//packages/core/schematics/ng-generate/route-lazy-loading:index.ts": "route-lazy-loading",
4139
"//packages/core/schematics/ng-generate/standalone-migration:index.ts": "standalone-migration",
@@ -47,6 +45,7 @@ rollup_bundle(
4745
"//packages/core/schematics/ng-generate/self-closing-tags-migration:index.ts": "self-closing-tags-migration",
4846
"//packages/core/schematics/migrations/inject-flags:index.ts": "inject-flags",
4947
"//packages/core/schematics/migrations/test-bed-get:index.ts": "test-bed-get",
48+
"//packages/core/schematics/migrations/control-flow-migration:index.ts": "control-flow-migration",
5049
},
5150
format = "cjs",
5251
link_workspace_root = True,
@@ -56,10 +55,10 @@ rollup_bundle(
5655
"//packages/core/schematics/test:__pkg__",
5756
],
5857
deps = [
58+
"//packages/core/schematics/migrations/control-flow-migration",
5959
"//packages/core/schematics/migrations/inject-flags",
6060
"//packages/core/schematics/migrations/test-bed-get",
6161
"//packages/core/schematics/ng-generate/cleanup-unused-imports",
62-
"//packages/core/schematics/ng-generate/control-flow-migration",
6362
"//packages/core/schematics/ng-generate/inject-migration",
6463
"//packages/core/schematics/ng-generate/output-migration",
6564
"//packages/core/schematics/ng-generate/route-lazy-loading",

β€Žpackages/core/schematics/collection.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@
66
"schema": "./ng-generate/standalone-migration/schema.json",
77
"aliases": ["standalone"]
88
},
9-
"control-flow-migration": {
10-
"description": "Converts the entire application to block control flow syntax",
11-
"factory": "./bundles/control-flow-migration#migrate",
12-
"schema": "./ng-generate/control-flow-migration/schema.json",
13-
"aliases": ["control-flow"]
14-
},
159
"inject-migration": {
1610
"description": "Converts usages of constructor-based injection to the inject() function",
1711
"factory": "./bundles/inject-migration#migrate",

β€Žpackages/core/schematics/migrations.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@
99
"version": "20.0.0",
1010
"description": "Replaces usages of the deprecated TestBed.get method with TestBed.inject",
1111
"factory": "./bundles/test-bed-get#migrate"
12+
},
13+
"control-flow-migration": {
14+
"version": "20.0.0",
15+
"description": "Converts the entire application to block control flow syntax",
16+
"factory": "./bundles/control-flow-migration#migrate",
17+
"optional": true
1218
}
1319
}
1420
}

0 commit comments

Comments
Β (0)