@angular/core 22.0.0-next.6 → 22.0.0-next.8

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 (71) hide show
  1. package/fesm2022/_attribute-chunk.mjs +1 -1
  2. package/fesm2022/_debug_node-chunk.mjs +1031 -943
  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/_pending_tasks-chunk.mjs +10 -8
  7. package/fesm2022/_pending_tasks-chunk.mjs.map +1 -1
  8. package/fesm2022/_resource-chunk.mjs +25 -11
  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 +285 -6
  13. package/fesm2022/core.mjs.map +1 -1
  14. package/fesm2022/primitives-di.mjs +1 -1
  15. package/fesm2022/primitives-event-dispatch.mjs +1 -5
  16. package/fesm2022/primitives-event-dispatch.mjs.map +1 -1
  17. package/fesm2022/primitives-signals.mjs +1 -1
  18. package/fesm2022/rxjs-interop.mjs +4 -1
  19. package/fesm2022/rxjs-interop.mjs.map +1 -1
  20. package/fesm2022/testing.mjs +2 -12
  21. package/fesm2022/testing.mjs.map +1 -1
  22. package/package.json +2 -2
  23. package/schematics/bundles/apply_import_manager-CxA_YYgB.cjs +1 -1
  24. package/schematics/bundles/can-match-snapshot-required.cjs +104 -0
  25. package/schematics/bundles/change-detection-eager.cjs +1 -1
  26. package/schematics/bundles/cleanup-unused-imports.cjs +1 -1
  27. package/schematics/bundles/common-to-standalone-migration.cjs +1 -1
  28. package/schematics/bundles/compiler_host-CY14HvaP.cjs +1 -1
  29. package/schematics/bundles/control-flow-migration.cjs +1 -1
  30. package/schematics/bundles/http-xhr-backend.cjs +1 -1
  31. package/schematics/bundles/imports-CKV-ITqD.cjs +1 -1
  32. package/schematics/bundles/incremental-hydration.cjs +91 -0
  33. package/schematics/bundles/{index-BtLcQH8g.cjs → index-DADA7AvC.cjs} +7 -3
  34. package/schematics/bundles/inject-migration.cjs +1 -1
  35. package/schematics/bundles/json-file-Drblb4E1.cjs +1916 -0
  36. package/schematics/bundles/leading_space-BTPRV0wu.cjs +1 -1
  37. package/schematics/bundles/{migrate_ts_type_references-Dp33iyGx.cjs → migrate_ts_type_references-B9LlDDUg.cjs} +2 -2
  38. package/schematics/bundles/ng_component_template-DPAF1aEA.cjs +1 -1
  39. package/schematics/bundles/ng_decorators-IVztR9rk.cjs +1 -1
  40. package/schematics/bundles/ngclass-to-class-migration.cjs +1 -1
  41. package/schematics/bundles/ngstyle-to-style-migration.cjs +1 -1
  42. package/schematics/bundles/nodes-ZSQ7WZRB.cjs +1 -1
  43. package/schematics/bundles/output-migration.cjs +2 -2
  44. package/schematics/bundles/parse_html-C8eKA9px.cjs +1 -1
  45. package/schematics/bundles/project_paths-D2V-Uh2L.cjs +1 -1
  46. package/schematics/bundles/project_tsconfig_paths-DkkMibv-.cjs +1 -1
  47. package/schematics/bundles/property_name-BCpALNpZ.cjs +1 -1
  48. package/schematics/bundles/route-lazy-loading.cjs +1 -1
  49. package/schematics/bundles/router-testing-module-migration.cjs +1 -1
  50. package/schematics/bundles/self-closing-tags-migration.cjs +1 -1
  51. package/schematics/bundles/signal-input-migration.cjs +3 -3
  52. package/schematics/bundles/signal-queries-migration.cjs +3 -3
  53. package/schematics/bundles/signals.cjs +3 -3
  54. package/schematics/bundles/standalone-migration.cjs +29 -17
  55. package/schematics/bundles/strict-safe-navigation-narrow.cjs +32 -0
  56. package/schematics/bundles/strict-templates-default.cjs +63 -0
  57. package/schematics/migrations.json +18 -3
  58. package/types/_api-chunk.d.ts +9 -3
  59. package/types/_chrome_dev_tools_performance-chunk.d.ts +2 -2
  60. package/types/_debug_node-chunk.d.ts +136 -262
  61. package/types/_effect-chunk.d.ts +1 -1
  62. package/types/_event_dispatcher-chunk.d.ts +1 -1
  63. package/types/_formatter-chunk.d.ts +1 -1
  64. package/types/_weak_ref-chunk.d.ts +1 -1
  65. package/types/core.d.ts +666 -660
  66. package/types/primitives-di.d.ts +1 -1
  67. package/types/primitives-event-dispatch.d.ts +1 -1
  68. package/types/primitives-signals.d.ts +1 -1
  69. package/types/rxjs-interop.d.ts +1 -1
  70. package/types/testing.d.ts +2 -2
  71. package/schematics/bundles/strict-templates.cjs +0 -55
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/core",
3
- "version": "22.0.0-next.6",
3
+ "version": "22.0.0-next.8",
4
4
  "description": "Angular - the core framework",
5
5
  "author": "angular",
6
6
  "license": "MIT",
@@ -46,7 +46,7 @@
46
46
  "tslib": "^2.3.0"
47
47
  },
48
48
  "peerDependencies": {
49
- "@angular/compiler": "22.0.0-next.6",
49
+ "@angular/compiler": "22.0.0-next.8",
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 v22.0.0-next.6
3
+ * @license Angular v22.0.0-next.8
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -0,0 +1,104 @@
1
+ 'use strict';
2
+ /**
3
+ * @license Angular v22.0.0-next.8
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 ts = require('typescript');
13
+ require('@angular/compiler-cli');
14
+ require('@angular/compiler-cli/private/migrations');
15
+ require('node:path');
16
+ require('@angular-devkit/schematics');
17
+ require('./project_tsconfig_paths-DkkMibv-.cjs');
18
+
19
+ class CanMatchSnapshotRequiredMigration extends project_paths.TsurgeFunnelMigration {
20
+ async analyze(info) {
21
+ const replacements = [];
22
+ const { sourceFiles, program } = info;
23
+ const typeChecker = program.getTypeChecker();
24
+ for (const sourceFile of sourceFiles) {
25
+ const walk = (node) => {
26
+ ts.forEachChild(node, walk);
27
+ if (ts.isCallExpression(node)) {
28
+ let shouldMigrate = false;
29
+ // 1. Method calls objective: obj.canMatch(a, b)
30
+ if (ts.isPropertyAccessExpression(node.expression) &&
31
+ node.expression.name.text === 'canMatch') {
32
+ const type = typeChecker.getTypeAtLocation(node.expression.expression);
33
+ const classSymbol = type.getSymbol();
34
+ if (classSymbol && classSymbol.declarations) {
35
+ const decl = classSymbol.declarations[0];
36
+ if (ts.isClassDeclaration(decl)) {
37
+ if (implementsInterface(decl, 'CanMatch')) {
38
+ shouldMigrate = true;
39
+ }
40
+ }
41
+ }
42
+ }
43
+ // 2. Function calls objective: canMatch(a, b)
44
+ if (ts.isIdentifier(node.expression) && node.expression.text === 'canMatch') {
45
+ const type = typeChecker.getTypeAtLocation(node.expression);
46
+ const typeStr = typeChecker.typeToString(type);
47
+ if (typeStr.includes('CanMatchFn')) {
48
+ shouldMigrate = true;
49
+ }
50
+ }
51
+ if (shouldMigrate && node.arguments.length === 2) {
52
+ const lastArg = node.arguments[1];
53
+ replacements.push(new project_paths.Replacement(project_paths.projectFile(sourceFile, info), new project_paths.TextUpdate({
54
+ position: lastArg.getEnd(),
55
+ end: lastArg.getEnd(),
56
+ toInsert: ', {} as any /* added by migration */',
57
+ })));
58
+ }
59
+ }
60
+ };
61
+ ts.forEachChild(sourceFile, walk);
62
+ }
63
+ return project_paths.confirmAsSerializable({ replacements });
64
+ }
65
+ async combine(unitA, unitB) {
66
+ return project_paths.confirmAsSerializable({
67
+ replacements: [...unitA.replacements, ...unitB.replacements],
68
+ });
69
+ }
70
+ async globalMeta(combinedData) {
71
+ return project_paths.confirmAsSerializable(combinedData);
72
+ }
73
+ async stats(globalMetadata) {
74
+ return project_paths.confirmAsSerializable({});
75
+ }
76
+ async migrate(globalData) {
77
+ return { replacements: globalData.replacements };
78
+ }
79
+ }
80
+ function implementsInterface(decl, interfaceName) {
81
+ if (!decl.heritageClauses)
82
+ return false;
83
+ for (const clause of decl.heritageClauses) {
84
+ if (clause.token === ts.SyntaxKind.ImplementsKeyword) {
85
+ for (const expr of clause.types) {
86
+ if (ts.isIdentifier(expr.expression) && expr.expression.text === interfaceName) {
87
+ return true;
88
+ }
89
+ }
90
+ }
91
+ }
92
+ return false;
93
+ }
94
+
95
+ function migrate(options) {
96
+ return async (tree, context) => {
97
+ await project_paths.runMigrationInDevkit({
98
+ tree,
99
+ getMigration: (fs) => new CanMatchSnapshotRequiredMigration(),
100
+ });
101
+ };
102
+ }
103
+
104
+ exports.migrate = migrate;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v22.0.0-next.6
3
+ * @license Angular v22.0.0-next.8
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 v22.0.0-next.6
3
+ * @license Angular v22.0.0-next.8
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 v22.0.0-next.6
3
+ * @license Angular v22.0.0-next.8
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 v22.0.0-next.6
3
+ * @license Angular v22.0.0-next.8
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 v22.0.0-next.6
3
+ * @license Angular v22.0.0-next.8
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 v22.0.0-next.6
3
+ * @license Angular v22.0.0-next.8
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 v22.0.0-next.6
3
+ * @license Angular v22.0.0-next.8
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -0,0 +1,91 @@
1
+ 'use strict';
2
+ /**
3
+ * @license Angular v22.0.0-next.8
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
+ require('@angular-devkit/schematics');
18
+ require('./project_tsconfig_paths-DkkMibv-.cjs');
19
+
20
+ class IncrementalHydrationMigration extends project_paths.TsurgeFunnelMigration {
21
+ async analyze(info) {
22
+ const { sourceFiles, program } = info;
23
+ program.getTypeChecker();
24
+ const replacements = [];
25
+ const importManager = new migrations.ImportManager();
26
+ const printer = ts.createPrinter();
27
+ for (const sf of sourceFiles) {
28
+ ts.forEachChild(sf, function visit(node) {
29
+ if (ts.isCallExpression(node) &&
30
+ ts.isIdentifier(node.expression) &&
31
+ node.expression.text === 'provideClientHydration') {
32
+ let hasIncremental = false;
33
+ for (const arg of node.arguments) {
34
+ if (ts.isCallExpression(arg) &&
35
+ ts.isIdentifier(arg.expression) &&
36
+ arg.expression.text === 'withIncrementalHydration') {
37
+ hasIncremental = true;
38
+ break;
39
+ }
40
+ }
41
+ if (!hasIncremental) {
42
+ // Add withNoIncrementalHydration()
43
+ const withNoIncrementalExpr = importManager.addImport({
44
+ exportModuleSpecifier: '@angular/platform-browser',
45
+ exportSymbolName: 'withNoIncrementalHydration',
46
+ requestedFile: sf,
47
+ });
48
+ const exprText = printer.printNode(ts.EmitHint.Unspecified, withNoIncrementalExpr, sf);
49
+ const insertPos = node.arguments.end;
50
+ const toInsert = node.arguments.length > 0 ? `, ${exprText}()` : `${exprText}()`;
51
+ replacements.push(new project_paths.Replacement(project_paths.projectFile(sf, info), new project_paths.TextUpdate({
52
+ position: insertPos,
53
+ end: insertPos,
54
+ toInsert: toInsert,
55
+ })));
56
+ }
57
+ }
58
+ ts.forEachChild(node, visit);
59
+ });
60
+ }
61
+ apply_import_manager.applyImportManagerChanges(importManager, replacements, sourceFiles, info);
62
+ return project_paths.confirmAsSerializable({
63
+ replacements,
64
+ });
65
+ }
66
+ async combine(unitA, unitB) {
67
+ return project_paths.confirmAsSerializable({
68
+ replacements: [...unitA.replacements, ...unitB.replacements],
69
+ });
70
+ }
71
+ async globalMeta(combinedData) {
72
+ return project_paths.confirmAsSerializable(combinedData);
73
+ }
74
+ async stats(globalMetadata) {
75
+ return project_paths.confirmAsSerializable({});
76
+ }
77
+ async migrate(globalData) {
78
+ return { replacements: globalData.replacements };
79
+ }
80
+ }
81
+
82
+ function migrate() {
83
+ return async (tree, context) => {
84
+ await project_paths.runMigrationInDevkit({
85
+ tree,
86
+ getMigration: (fs) => new IncrementalHydrationMigration(),
87
+ });
88
+ };
89
+ }
90
+
91
+ exports.migrate = migrate;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v22.0.0-next.6
3
+ * @license Angular v22.0.0-next.8
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -402,13 +402,17 @@ class TemplateExpressionReferenceVisitor extends compiler.RecursiveAstVisitor {
402
402
  return false;
403
403
  }
404
404
  const symbol = this.templateTypeChecker.getSymbolOfNode(ast, this.componentClass);
405
- if (symbol?.kind !== migrations.SymbolKind.Expression || symbol.tsSymbol === null) {
405
+ if (symbol?.kind !== migrations.SymbolKind.Expression) {
406
+ return false;
407
+ }
408
+ const tsSymbol = this.templateTypeChecker.getTsSymbolOfSymbol(symbol);
409
+ if (tsSymbol === null) {
406
410
  return false;
407
411
  }
408
412
  // Dangerous: Type checking symbol retrieval is a totally different `ts.Program`,
409
413
  // than the one where we analyzed `knownInputs`.
410
414
  // --> Find the input via its input id.
411
- const targetInput = this.knownFields.attemptRetrieveDescriptorFromSymbol(symbol.tsSymbol);
415
+ const targetInput = this.knownFields.attemptRetrieveDescriptorFromSymbol(tsSymbol);
412
416
  if (targetInput === null) {
413
417
  return false;
414
418
  }
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v22.0.0-next.6
3
+ * @license Angular v22.0.0-next.8
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */