@angular/core 21.2.0 → 22.0.0-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/fesm2022/_attribute-chunk.mjs +1 -1
  2. package/fesm2022/_debug_node-chunk.mjs +613 -523
  3. package/fesm2022/_debug_node-chunk.mjs.map +1 -1
  4. package/fesm2022/_effect-chunk.mjs +1 -1
  5. package/fesm2022/_not_found-chunk.mjs +1 -1
  6. package/fesm2022/{_effect-chunk2.mjs → _pending_tasks-chunk.mjs} +31 -31
  7. package/fesm2022/_pending_tasks-chunk.mjs.map +1 -0
  8. package/fesm2022/_resource-chunk.mjs +92 -30
  9. package/fesm2022/_resource-chunk.mjs.map +1 -1
  10. package/fesm2022/_untracked-chunk.mjs +1 -1
  11. package/fesm2022/_weak_ref-chunk.mjs +1 -1
  12. package/fesm2022/core.mjs +5 -5
  13. package/fesm2022/core.mjs.map +1 -1
  14. package/fesm2022/primitives-di.mjs +1 -1
  15. package/fesm2022/primitives-event-dispatch.mjs +1 -1
  16. package/fesm2022/primitives-signals.mjs +1 -1
  17. package/fesm2022/rxjs-interop.mjs +2 -2
  18. package/fesm2022/testing.mjs +14 -2
  19. package/fesm2022/testing.mjs.map +1 -1
  20. package/package.json +3 -3
  21. package/schematics/bundles/apply_import_manager-CxA_YYgB.cjs +1 -1
  22. package/schematics/bundles/change-detection-eager.cjs +155 -0
  23. package/schematics/bundles/cleanup-unused-imports.cjs +1 -1
  24. package/schematics/bundles/common-to-standalone-migration.cjs +4 -4
  25. package/schematics/bundles/compiler_host-CY14HvaP.cjs +1 -1
  26. package/schematics/bundles/control-flow-migration.cjs +1 -1
  27. package/schematics/bundles/http-xhr-backend.cjs +118 -0
  28. package/schematics/bundles/{imports-CVmcbVA9.cjs → imports-CKV-ITqD.cjs} +4 -3
  29. package/schematics/bundles/index-BtLcQH8g.cjs +1 -1
  30. package/schematics/bundles/inject-migration.cjs +3 -3
  31. package/schematics/bundles/leading_space-BTPRV0wu.cjs +1 -1
  32. package/schematics/bundles/migrate_ts_type_references-MWoZx-Cb.cjs +1 -1
  33. package/schematics/bundles/{ng_component_template-BOuKAnQd.cjs → ng_component_template-DPAF1aEA.cjs} +2 -2
  34. package/schematics/bundles/{ng_decorators-DYy6II6x.cjs → ng_decorators-IVztR9rk.cjs} +2 -2
  35. package/schematics/bundles/ngclass-to-class-migration.cjs +4 -4
  36. package/schematics/bundles/ngstyle-to-style-migration.cjs +4 -4
  37. package/schematics/bundles/nodes-ZSQ7WZRB.cjs +1 -1
  38. package/schematics/bundles/output-migration.cjs +1 -1
  39. package/schematics/bundles/parse_html-C8eKA9px.cjs +1 -1
  40. package/schematics/bundles/project_paths-D2V-Uh2L.cjs +1 -1
  41. package/schematics/bundles/project_tsconfig_paths-DkkMibv-.cjs +1 -1
  42. package/schematics/bundles/property_name-BCpALNpZ.cjs +1 -1
  43. package/schematics/bundles/route-lazy-loading.cjs +4 -16
  44. package/schematics/bundles/router-testing-module-migration.cjs +1 -1
  45. package/schematics/bundles/self-closing-tags-migration.cjs +4 -4
  46. package/schematics/bundles/signal-input-migration.cjs +1 -1
  47. package/schematics/bundles/signal-queries-migration.cjs +1 -1
  48. package/schematics/bundles/signals.cjs +1 -1
  49. package/schematics/bundles/standalone-migration.cjs +20 -6
  50. package/schematics/collection.json +5 -5
  51. package/schematics/migrations.json +9 -30
  52. package/types/_api-chunk.d.ts +31 -4
  53. package/types/_chrome_dev_tools_performance-chunk.d.ts +1 -1
  54. package/types/_discovery-chunk.d.ts +2 -2
  55. package/types/_effect-chunk.d.ts +1 -1
  56. package/types/_event_dispatcher-chunk.d.ts +1 -1
  57. package/types/_formatter-chunk.d.ts +1 -1
  58. package/types/_weak_ref-chunk.d.ts +1 -1
  59. package/types/core.d.ts +44 -14
  60. package/types/primitives-di.d.ts +1 -1
  61. package/types/primitives-event-dispatch.d.ts +1 -1
  62. package/types/primitives-signals.d.ts +1 -1
  63. package/types/rxjs-interop.d.ts +1 -1
  64. package/types/testing.d.ts +6 -1
  65. package/fesm2022/_effect-chunk2.mjs.map +0 -1
  66. package/schematics/bundles/add-bootstrap-context-to-server-main.cjs +0 -117
  67. package/schematics/bundles/application-config-core.cjs +0 -84
  68. package/schematics/bundles/bootstrap-options-migration.cjs +0 -644
  69. package/schematics/bundles/router-current-navigation.cjs +0 -103
  70. package/schematics/bundles/router-last-successful-navigation.cjs +0 -103
  71. package/schematics/bundles/symbol-DZeHSR-V.cjs +0 -26
  72. /package/schematics/{migrations → ng-generate}/common-to-standalone-migration/schema.json +0 -0
  73. /package/schematics/{migrations → ng-generate}/control-flow-migration/schema.json +0 -0
  74. /package/schematics/{migrations → ng-generate}/ngclass-to-class-migration/schema.json +0 -0
  75. /package/schematics/{migrations → ng-generate}/ngstyle-to-style-migration/schema.json +0 -0
  76. /package/schematics/{migrations → ng-generate}/router-testing-module-migration/schema.json +0 -0
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@angular/core",
3
- "version": "21.2.0",
3
+ "version": "22.0.0-next.0",
4
4
  "description": "Angular - the core framework",
5
5
  "author": "angular",
6
6
  "license": "MIT",
7
7
  "engines": {
8
- "node": "^20.19.0 || ^22.12.0 || >=24.0.0"
8
+ "node": "^22.22.0 || >=24.13.1"
9
9
  },
10
10
  "exports": {
11
11
  "./schematics/*": {
@@ -46,7 +46,7 @@
46
46
  "tslib": "^2.3.0"
47
47
  },
48
48
  "peerDependencies": {
49
- "@angular/compiler": "21.2.0",
49
+ "@angular/compiler": "22.0.0-next.0",
50
50
  "rxjs": "^6.5.3 || ^7.4.0",
51
51
  "zone.js": "~0.15.0 || ~0.16.0"
52
52
  },
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v21.2.0
3
+ * @license Angular v22.0.0-next.0
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -0,0 +1,155 @@
1
+ 'use strict';
2
+ /**
3
+ * @license Angular v22.0.0-next.0
4
+ * (c) 2010-2026 Google LLC. https://angular.dev/
5
+ * License: MIT
6
+ */
7
+ 'use strict';
8
+
9
+ require('@angular-devkit/core');
10
+ require('node:path/posix');
11
+ var project_paths = require('./project_paths-D2V-Uh2L.cjs');
12
+ var migrations = require('@angular/compiler-cli/private/migrations');
13
+ var ts = require('typescript');
14
+ var ng_decorators = require('./ng_decorators-IVztR9rk.cjs');
15
+ require('@angular/compiler-cli');
16
+ require('node:path');
17
+ var apply_import_manager = require('./apply_import_manager-CxA_YYgB.cjs');
18
+ require('@angular-devkit/schematics');
19
+ require('./project_tsconfig_paths-DkkMibv-.cjs');
20
+ require('./imports-CKV-ITqD.cjs');
21
+
22
+ class ChangeDetectionEagerMigration extends project_paths.TsurgeFunnelMigration {
23
+ config;
24
+ constructor(config = {}) {
25
+ super();
26
+ this.config = config;
27
+ }
28
+ async analyze(info) {
29
+ const { sourceFiles, program } = info;
30
+ const typeChecker = program.getTypeChecker();
31
+ const replacements = [];
32
+ const importManager = new migrations.ImportManager();
33
+ const printer = ts.createPrinter();
34
+ for (const sf of sourceFiles) {
35
+ const file = project_paths.projectFile(sf, info);
36
+ if (this.config.shouldMigrate && !this.config.shouldMigrate(file)) {
37
+ continue;
38
+ }
39
+ ts.forEachChild(sf, (node) => {
40
+ if (!ts.isClassDeclaration(node)) {
41
+ return;
42
+ }
43
+ const decorators = ng_decorators.getAngularDecorators(typeChecker, ts.getDecorators(node) || []);
44
+ const componentDecorator = decorators.find((d) => d.name === 'Component' && d.moduleName === '@angular/core');
45
+ if (!componentDecorator) {
46
+ return;
47
+ }
48
+ // The helper `getAngularDecorators` guarantees that `node` is `CallExpressionDecorator`.
49
+ // So `componentDecorator.node.expression` is `ts.CallExpression`.
50
+ const callExpression = componentDecorator.node.expression;
51
+ if (callExpression.arguments.length !== 1 ||
52
+ !ts.isObjectLiteralExpression(callExpression.arguments[0])) {
53
+ return;
54
+ }
55
+ const metadata = callExpression.arguments[0];
56
+ const changeDetectionProp = metadata.properties.find((p) => ts.isPropertyAssignment(p) &&
57
+ (ts.isIdentifier(p.name) || ts.isStringLiteral(p.name)) &&
58
+ p.name.text === 'changeDetection');
59
+ if (!changeDetectionProp) {
60
+ // Property missing. Add it.
61
+ const changeDetectionStrategyExpr = importManager.addImport({
62
+ exportModuleSpecifier: '@angular/core',
63
+ exportSymbolName: 'ChangeDetectionStrategy',
64
+ requestedFile: sf,
65
+ });
66
+ // Print the identifier
67
+ const exprText = printer.printNode(ts.EmitHint.Unspecified, changeDetectionStrategyExpr, sf);
68
+ const properties = metadata.properties;
69
+ let insertPos;
70
+ let toInsert;
71
+ if (properties.length > 0) {
72
+ const lastProp = properties[properties.length - 1];
73
+ insertPos = lastProp.getEnd();
74
+ // Simpler approach: check comma after last property.
75
+ const textAfter = sf.text.substring(lastProp.getEnd());
76
+ const hasComma = /^\s*,/.test(textAfter);
77
+ const prefix = hasComma ? '' : ',';
78
+ toInsert = `${prefix}\n changeDetection: ${exprText}.Eager`;
79
+ }
80
+ else {
81
+ insertPos = metadata.getStart() + 1;
82
+ toInsert = `\n changeDetection: ${exprText}.Eager\n`;
83
+ }
84
+ replacements.push(new project_paths.Replacement(project_paths.projectFile(sf, info), new project_paths.TextUpdate({
85
+ position: insertPos,
86
+ end: insertPos,
87
+ toInsert: toInsert,
88
+ })));
89
+ return;
90
+ }
91
+ // Check if explicitly set to Default.
92
+ if (!ts.isPropertyAccessExpression(changeDetectionProp.initializer)) {
93
+ return;
94
+ }
95
+ const initializer = changeDetectionProp.initializer;
96
+ // Best effort check for ChangeDetectionStrategy.Default
97
+ if (!ts.isIdentifier(initializer.expression) || initializer.name.text !== 'Default') {
98
+ return;
99
+ }
100
+ // Verify it is indeed ChangeDetectionStrategy.
101
+ // We can check if the symbol of the expression is imported from @angular/core and named ChangeDetectionStrategy.
102
+ const symbol = typeChecker.getSymbolAtLocation(initializer.expression);
103
+ if (!symbol || !symbol.declarations || symbol.declarations.length === 0) {
104
+ return;
105
+ }
106
+ const declaration = symbol.declarations[0];
107
+ if (!ts.isImportSpecifier(declaration)) {
108
+ return;
109
+ }
110
+ const propertyName = declaration.propertyName?.text ?? declaration.name.text;
111
+ const importDecl = declaration.parent.parent.parent;
112
+ if (!ts.isImportDeclaration(importDecl) ||
113
+ !ts.isStringLiteral(importDecl.moduleSpecifier) ||
114
+ importDecl.moduleSpecifier.text !== '@angular/core' ||
115
+ propertyName !== 'ChangeDetectionStrategy') {
116
+ return;
117
+ }
118
+ replacements.push(new project_paths.Replacement(project_paths.projectFile(sf, info), new project_paths.TextUpdate({
119
+ position: initializer.name.getStart(),
120
+ end: initializer.name.getEnd(),
121
+ toInsert: 'Eager',
122
+ })));
123
+ });
124
+ }
125
+ apply_import_manager.applyImportManagerChanges(importManager, replacements, sourceFiles, info);
126
+ return project_paths.confirmAsSerializable({
127
+ replacements,
128
+ });
129
+ }
130
+ async combine(unitA, unitB) {
131
+ return project_paths.confirmAsSerializable({
132
+ replacements: [...unitA.replacements, ...unitB.replacements],
133
+ });
134
+ }
135
+ async globalMeta(combinedData) {
136
+ return project_paths.confirmAsSerializable(combinedData);
137
+ }
138
+ async stats(globalMetadata) {
139
+ return project_paths.confirmAsSerializable({});
140
+ }
141
+ async migrate(globalData) {
142
+ return { replacements: globalData.replacements };
143
+ }
144
+ }
145
+
146
+ function migrate(options) {
147
+ return async (tree, context) => {
148
+ await project_paths.runMigrationInDevkit({
149
+ tree,
150
+ getMigration: (fs) => new ChangeDetectionEagerMigration(),
151
+ });
152
+ };
153
+ }
154
+
155
+ exports.migrate = migrate;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v21.2.0
3
+ * @license Angular v22.0.0-next.0
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v21.2.0
3
+ * @license Angular v22.0.0-next.0
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -11,10 +11,10 @@ require('@angular/compiler-cli');
11
11
  var migrations = require('@angular/compiler-cli/private/migrations');
12
12
  require('node:path');
13
13
  var project_paths = require('./project_paths-D2V-Uh2L.cjs');
14
- var ng_component_template = require('./ng_component_template-BOuKAnQd.cjs');
15
- var ng_decorators = require('./ng_decorators-DYy6II6x.cjs');
14
+ var ng_component_template = require('./ng_component_template-DPAF1aEA.cjs');
15
+ var ng_decorators = require('./ng_decorators-IVztR9rk.cjs');
16
16
  var apply_import_manager = require('./apply_import_manager-CxA_YYgB.cjs');
17
- var imports = require('./imports-CVmcbVA9.cjs');
17
+ var imports = require('./imports-CKV-ITqD.cjs');
18
18
  require('@angular-devkit/core');
19
19
  require('node:path/posix');
20
20
  require('@angular-devkit/schematics');
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v21.2.0
3
+ * @license Angular v22.0.0-next.0
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v21.2.0
3
+ * @license Angular v22.0.0-next.0
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -0,0 +1,118 @@
1
+ 'use strict';
2
+ /**
3
+ * @license Angular v22.0.0-next.0
4
+ * (c) 2010-2026 Google LLC. https://angular.dev/
5
+ * License: MIT
6
+ */
7
+ 'use strict';
8
+
9
+ require('@angular-devkit/core');
10
+ require('node:path/posix');
11
+ var project_paths = require('./project_paths-D2V-Uh2L.cjs');
12
+ var migrations = require('@angular/compiler-cli/private/migrations');
13
+ var ts = require('typescript');
14
+ require('@angular/compiler-cli');
15
+ require('node:path');
16
+ var apply_import_manager = require('./apply_import_manager-CxA_YYgB.cjs');
17
+ var imports = require('./imports-CKV-ITqD.cjs');
18
+ require('@angular-devkit/schematics');
19
+ require('./project_tsconfig_paths-DkkMibv-.cjs');
20
+
21
+ const HTTP = '@angular/common/http';
22
+ const provideHttpClient = 'provideHttpClient';
23
+ const WITH_FETCH = 'withFetch';
24
+ const WITH_XHR = 'withXhr';
25
+ const HTTP_PACKAGE = '@angular/common/http';
26
+ ts.factory.createIdentifier('provideHttpClient');
27
+ class XhrBackendMigration extends project_paths.TsurgeFunnelMigration {
28
+ config;
29
+ constructor(config = {}) {
30
+ super();
31
+ this.config = config;
32
+ }
33
+ async analyze(info) {
34
+ const replacements = [];
35
+ const importManager = new migrations.ImportManager();
36
+ for (const sourceFile of info.sourceFiles) {
37
+ const walk = (node) => {
38
+ const file = project_paths.projectFile(sourceFile, info);
39
+ if (this.config.shouldMigrate && !this.config.shouldMigrate(file)) {
40
+ return;
41
+ }
42
+ const httpImports = imports.getNamedImports(sourceFile, HTTP);
43
+ if (!httpImports) {
44
+ return;
45
+ }
46
+ const importSpecifier = imports.getImportSpecifier(sourceFile, HTTP, provideHttpClient);
47
+ if (!importSpecifier) {
48
+ return;
49
+ }
50
+ node.forEachChild(walk);
51
+ if (!ts.isCallExpression(node))
52
+ return;
53
+ if (!ts.isIdentifier(node.expression))
54
+ return;
55
+ if (node.expression.text !== 'provideHttpClient')
56
+ return;
57
+ const withFetchNode = node.arguments.find((arg) => {
58
+ return (ts.isCallExpression(arg) &&
59
+ ts.isIdentifier(arg.expression) &&
60
+ arg.expression.text === WITH_FETCH);
61
+ });
62
+ const withXhrNode = node.arguments.find((arg) => {
63
+ return (ts.isCallExpression(arg) &&
64
+ ts.isIdentifier(arg.expression) &&
65
+ arg.expression.text === WITH_XHR);
66
+ });
67
+ if (!withFetchNode && !withXhrNode) {
68
+ replacements.push(new project_paths.Replacement(project_paths.projectFile(sourceFile, info), new project_paths.TextUpdate({
69
+ position: node.arguments.pos,
70
+ end: node.arguments.pos,
71
+ toInsert: node.arguments.length ? 'withXhr(), ' : 'withXhr()',
72
+ })));
73
+ importManager.addImport({
74
+ exportModuleSpecifier: HTTP_PACKAGE,
75
+ exportSymbolName: WITH_XHR,
76
+ requestedFile: sourceFile,
77
+ });
78
+ }
79
+ else if (withFetchNode) {
80
+ const isLastArg = node.arguments[node.arguments.length - 1] === withFetchNode;
81
+ replacements.push(new project_paths.Replacement(project_paths.projectFile(sourceFile, info), new project_paths.TextUpdate({
82
+ position: withFetchNode.getStart(),
83
+ end: isLastArg ? withFetchNode.getEnd() : withFetchNode.getEnd() + 2, // +2 to remove the comma and space, could be improved
84
+ toInsert: '',
85
+ })));
86
+ importManager.removeImport(sourceFile, 'withFetch', HTTP_PACKAGE);
87
+ }
88
+ };
89
+ sourceFile.forEachChild(walk);
90
+ }
91
+ apply_import_manager.applyImportManagerChanges(importManager, replacements, info.sourceFiles, info);
92
+ return project_paths.confirmAsSerializable({ replacements });
93
+ }
94
+ async combine(unitA, unitB) {
95
+ const combined = [...unitA.replacements, ...unitB.replacements];
96
+ return project_paths.confirmAsSerializable({ replacements: combined });
97
+ }
98
+ async globalMeta(data) {
99
+ return project_paths.confirmAsSerializable(data);
100
+ }
101
+ async stats(data) {
102
+ return project_paths.confirmAsSerializable({});
103
+ }
104
+ async migrate(data) {
105
+ return { replacements: data.replacements };
106
+ }
107
+ }
108
+
109
+ function migrate() {
110
+ return async (tree) => {
111
+ await project_paths.runMigrationInDevkit({
112
+ tree,
113
+ getMigration: () => new XhrBackendMigration(),
114
+ });
115
+ };
116
+ }
117
+
118
+ exports.migrate = migrate;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v21.2.0
3
+ * @license Angular v22.0.0-next.0
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -86,8 +86,9 @@ function getImportSpecifiers(sourceFile, moduleName, specifierOrSpecifiers) {
86
86
  function getNamedImports(sourceFile, moduleName) {
87
87
  for (const node of sourceFile.statements) {
88
88
  if (ts.isImportDeclaration(node) && ts.isStringLiteral(node.moduleSpecifier)) {
89
- const isMatch = node.moduleSpecifier.text === moduleName
90
- ;
89
+ const isMatch = typeof moduleName === 'string'
90
+ ? node.moduleSpecifier.text === moduleName
91
+ : moduleName.test(node.moduleSpecifier.text);
91
92
  const namedBindings = node.importClause?.namedBindings;
92
93
  if (isMatch && namedBindings && ts.isNamedImports(namedBindings)) {
93
94
  return namedBindings;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v21.2.0
3
+ * @license Angular v22.0.0-next.0
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v21.2.0
3
+ * @license Angular v22.0.0-next.0
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -10,8 +10,8 @@ var schematics = require('@angular-devkit/schematics');
10
10
  var path = require('path');
11
11
  var compiler_host = require('./compiler_host-CY14HvaP.cjs');
12
12
  var ts = require('typescript');
13
- var ng_decorators = require('./ng_decorators-DYy6II6x.cjs');
14
- var imports = require('./imports-CVmcbVA9.cjs');
13
+ var ng_decorators = require('./ng_decorators-IVztR9rk.cjs');
14
+ var imports = require('./imports-CKV-ITqD.cjs');
15
15
  var nodes = require('./nodes-ZSQ7WZRB.cjs');
16
16
  var leading_space = require('./leading_space-BTPRV0wu.cjs');
17
17
  var project_tsconfig_paths = require('./project_tsconfig_paths-DkkMibv-.cjs');
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v21.2.0
3
+ * @license Angular v22.0.0-next.0
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v21.2.0
3
+ * @license Angular v22.0.0-next.0
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v21.2.0
3
+ * @license Angular v22.0.0-next.0
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -8,7 +8,7 @@
8
8
 
9
9
  var ts = require('typescript');
10
10
  var compilerCli = require('@angular/compiler-cli');
11
- var ng_decorators = require('./ng_decorators-DYy6II6x.cjs');
11
+ var ng_decorators = require('./ng_decorators-IVztR9rk.cjs');
12
12
  var property_name = require('./property_name-BCpALNpZ.cjs');
13
13
 
14
14
  /**
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v21.2.0
3
+ * @license Angular v22.0.0-next.0
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
7
7
  'use strict';
8
8
 
9
9
  var ts = require('typescript');
10
- var imports = require('./imports-CVmcbVA9.cjs');
10
+ var imports = require('./imports-CKV-ITqD.cjs');
11
11
 
12
12
  function getCallDecoratorImport(typeChecker, decorator) {
13
13
  // Note that this does not cover the edge case where decorators are called from
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v21.2.0
3
+ * @license Angular v22.0.0-next.0
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -13,14 +13,14 @@ require('node:path');
13
13
  var project_paths = require('./project_paths-D2V-Uh2L.cjs');
14
14
  var compiler = require('@angular/compiler');
15
15
  var apply_import_manager = require('./apply_import_manager-CxA_YYgB.cjs');
16
- var imports = require('./imports-CVmcbVA9.cjs');
16
+ var imports = require('./imports-CKV-ITqD.cjs');
17
17
  var parse_html = require('./parse_html-C8eKA9px.cjs');
18
- var ng_component_template = require('./ng_component_template-BOuKAnQd.cjs');
18
+ var ng_component_template = require('./ng_component_template-DPAF1aEA.cjs');
19
19
  require('@angular-devkit/core');
20
20
  require('node:path/posix');
21
21
  require('@angular-devkit/schematics');
22
22
  require('./project_tsconfig_paths-DkkMibv-.cjs');
23
- require('./ng_decorators-DYy6II6x.cjs');
23
+ require('./ng_decorators-IVztR9rk.cjs');
24
24
  require('./property_name-BCpALNpZ.cjs');
25
25
 
26
26
  const ngClassStr = 'NgClass';
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v21.2.0
3
+ * @license Angular v22.0.0-next.0
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -13,14 +13,14 @@ require('node:path');
13
13
  var project_paths = require('./project_paths-D2V-Uh2L.cjs');
14
14
  var compiler = require('@angular/compiler');
15
15
  var apply_import_manager = require('./apply_import_manager-CxA_YYgB.cjs');
16
- var imports = require('./imports-CVmcbVA9.cjs');
16
+ var imports = require('./imports-CKV-ITqD.cjs');
17
17
  var parse_html = require('./parse_html-C8eKA9px.cjs');
18
- var ng_component_template = require('./ng_component_template-BOuKAnQd.cjs');
18
+ var ng_component_template = require('./ng_component_template-DPAF1aEA.cjs');
19
19
  require('@angular-devkit/core');
20
20
  require('node:path/posix');
21
21
  require('@angular-devkit/schematics');
22
22
  require('./project_tsconfig_paths-DkkMibv-.cjs');
23
- require('./ng_decorators-DYy6II6x.cjs');
23
+ require('./ng_decorators-IVztR9rk.cjs');
24
24
  require('./property_name-BCpALNpZ.cjs');
25
25
 
26
26
  const ngStyleStr = 'NgStyle';
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v21.2.0
3
+ * @license Angular v22.0.0-next.0
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v21.2.0
3
+ * @license Angular v22.0.0-next.0
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v21.2.0
3
+ * @license Angular v22.0.0-next.0
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v21.2.0
3
+ * @license Angular v22.0.0-next.0
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v21.2.0
3
+ * @license Angular v22.0.0-next.0
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v21.2.0
3
+ * @license Angular v22.0.0-next.0
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v21.2.0
3
+ * @license Angular v22.0.0-next.0
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -107,22 +107,11 @@ function isRouterCallExpression(node, typeChecker) {
107
107
  }
108
108
  return false;
109
109
  }
110
- /**
111
- * Checks whether a node is a call expression to router provide function.
112
- * Example: provideRoutes(routes)
113
- */
114
- function isRouterProviderCallExpression(node, typeChecker) {
115
- if (ts.isIdentifier(node.expression)) {
116
- const moduleSymbol = typeChecker.getSymbolAtLocation(node.expression);
117
- return moduleSymbol && moduleSymbol.name === 'provideRoutes';
118
- }
119
- return false;
120
- }
121
110
  /**
122
111
  * Checks whether a node is a call expression to provideRouter function.
123
112
  * Example: provideRouter(routes)
124
113
  */
125
- function isProvideRoutesCallExpression(node, typeChecker) {
114
+ function isProvideRouterCallExpression(node, typeChecker) {
126
115
  if (ts.isIdentifier(node.expression)) {
127
116
  const moduleSymbol = typeChecker.getSymbolAtLocation(node.expression);
128
117
  return moduleSymbol && moduleSymbol.name === 'provideRouter';
@@ -157,9 +146,8 @@ function findRoutesArrayToMigrate(sourceFile, typeChecker) {
157
146
  sourceFile.forEachChild(function walk(node) {
158
147
  if (ts.isCallExpression(node)) {
159
148
  if (isRouterModuleCallExpression(node, typeChecker) ||
160
- isRouterProviderCallExpression(node, typeChecker) ||
161
149
  isRouterCallExpression(node, typeChecker) ||
162
- isProvideRoutesCallExpression(node, typeChecker)) {
150
+ isProvideRouterCallExpression(node, typeChecker)) {
163
151
  const arg = node.arguments[0]; // ex: RouterModule.forRoot(routes) or provideRouter(routes)
164
152
  const routeFileImports = sourceFile.statements.filter(ts.isImportDeclaration);
165
153
  if (ts.isArrayLiteralExpression(arg) && arg.elements.length > 0) {
@@ -172,7 +160,7 @@ function findRoutesArrayToMigrate(sourceFile, typeChecker) {
172
160
  }
173
161
  else if (ts.isIdentifier(arg)) {
174
162
  // ex: reference to routes array: RouterModule.forRoot(routes)
175
- // RouterModule.forRoot(routes), provideRouter(routes), provideRoutes(routes)
163
+ // RouterModule.forRoot(routes), provideRouter(routes)
176
164
  const symbol = typeChecker.getSymbolAtLocation(arg);
177
165
  if (!symbol?.declarations)
178
166
  return;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v21.2.0
3
+ * @license Angular v22.0.0-next.0
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v21.2.0
3
+ * @license Angular v22.0.0-next.0
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -11,15 +11,15 @@ require('@angular/compiler-cli');
11
11
  require('@angular/compiler-cli/private/migrations');
12
12
  require('node:path');
13
13
  var project_paths = require('./project_paths-D2V-Uh2L.cjs');
14
- var ng_component_template = require('./ng_component_template-BOuKAnQd.cjs');
14
+ var ng_component_template = require('./ng_component_template-DPAF1aEA.cjs');
15
15
  var compiler = require('@angular/compiler');
16
16
  var parse_html = require('./parse_html-C8eKA9px.cjs');
17
17
  require('@angular-devkit/core');
18
18
  require('node:path/posix');
19
19
  require('@angular-devkit/schematics');
20
20
  require('./project_tsconfig_paths-DkkMibv-.cjs');
21
- require('./ng_decorators-DYy6II6x.cjs');
22
- require('./imports-CVmcbVA9.cjs');
21
+ require('./ng_decorators-IVztR9rk.cjs');
22
+ require('./imports-CKV-ITqD.cjs');
23
23
  require('./property_name-BCpALNpZ.cjs');
24
24
 
25
25
  function migrateTemplateToSelfClosingTags(template) {