@angular/core 20.0.6 → 20.1.0-next.1

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 (74) hide show
  1. package/{api.d.d.ts → api.d-Dwpmmn5j.d.ts} +2 -2
  2. package/{chrome_dev_tools_performance.d.d.ts → chrome_dev_tools_performance.d-Dk_7kdX9.d.ts} +7 -3
  3. package/{discovery.d.d.ts → discovery.d-AiW64LSq.d.ts} +5 -6
  4. package/{event_dispatcher.d.d.ts → event_dispatcher.d-BReQpZfC.d.ts} +1 -1
  5. package/fesm2022/{attribute.mjs → attribute-BWp59EjE.mjs} +2 -2
  6. package/fesm2022/attribute-BWp59EjE.mjs.map +1 -0
  7. package/fesm2022/core.mjs +22 -28
  8. package/fesm2022/core.mjs.map +1 -1
  9. package/fesm2022/{debug_node.mjs → debug_node-CGQXW8qF.mjs} +1479 -1466
  10. package/fesm2022/debug_node-CGQXW8qF.mjs.map +1 -0
  11. package/fesm2022/primitives/di.mjs +1 -1
  12. package/fesm2022/primitives/di.mjs.map +1 -1
  13. package/fesm2022/primitives/event-dispatch.mjs +2 -2
  14. package/fesm2022/primitives/event-dispatch.mjs.map +1 -1
  15. package/fesm2022/primitives/signals.mjs +5 -5
  16. package/fesm2022/primitives/signals.mjs.map +1 -1
  17. package/fesm2022/{resource.mjs → resource-CIODajJI.mjs} +8 -12
  18. package/fesm2022/resource-CIODajJI.mjs.map +1 -0
  19. package/fesm2022/{root_effect_scheduler.mjs → root_effect_scheduler-BvK6bnZD.mjs} +20 -27
  20. package/fesm2022/root_effect_scheduler-BvK6bnZD.mjs.map +1 -0
  21. package/fesm2022/rxjs-interop.mjs +5 -5
  22. package/fesm2022/rxjs-interop.mjs.map +1 -1
  23. package/fesm2022/{signal.mjs → signal-nCiHhWf6.mjs} +2 -2
  24. package/fesm2022/signal-nCiHhWf6.mjs.map +1 -0
  25. package/fesm2022/testing.mjs +72 -171
  26. package/fesm2022/testing.mjs.map +1 -1
  27. package/fesm2022/{untracked.mjs → untracked-DmD_2MlC.mjs} +3 -3
  28. package/fesm2022/untracked-DmD_2MlC.mjs.map +1 -0
  29. package/fesm2022/{weak_ref.mjs → weak_ref-BaIq-pgY.mjs} +2 -2
  30. package/fesm2022/weak_ref-BaIq-pgY.mjs.map +1 -0
  31. package/{graph.d.d.ts → graph.d-BcIOep_B.d.ts} +1 -1
  32. package/index.d.ts +23 -16
  33. package/package.json +2 -2
  34. package/primitives/di/index.d.ts +1 -1
  35. package/primitives/event-dispatch/index.d.ts +3 -3
  36. package/primitives/signals/index.d.ts +6 -6
  37. package/rxjs-interop/index.d.ts +5 -5
  38. package/schematics/bundles/{apply_import_manager-mlmcgZ0v.cjs → apply_import_manager-BsIRDO9W.cjs} +3 -3
  39. package/schematics/bundles/{checker-a0VNmSrQ.cjs → checker-CY7a8ko8.cjs} +771 -642
  40. package/schematics/bundles/cleanup-unused-imports.cjs +21 -35
  41. package/schematics/bundles/{compiler_host-CwrMDc6k.cjs → compiler_host-DNYQkH4l.cjs} +2 -2
  42. package/schematics/bundles/control-flow-migration.cjs +3 -3
  43. package/schematics/bundles/document-core.cjs +5 -5
  44. package/schematics/bundles/imports-CIX-JgAN.cjs +1 -1
  45. package/schematics/bundles/{index-DAP9ZmeX.cjs → index-BJ3PYYwQ.cjs} +17 -16
  46. package/schematics/bundles/{index-jMQgXbRg.cjs → index-BUgQDm-J.cjs} +1018 -589
  47. package/schematics/bundles/inject-flags.cjs +5 -5
  48. package/schematics/bundles/inject-migration.cjs +4 -9
  49. package/schematics/bundles/leading_space-D9nQ8UQC.cjs +1 -1
  50. package/schematics/bundles/{migrate_ts_type_references-CX0snBqz.cjs → migrate_ts_type_references-MBd4NBjn.cjs} +26 -77
  51. package/schematics/bundles/ng_decorators-B5HCqr20.cjs +1 -1
  52. package/schematics/bundles/nodes-B16H9JUd.cjs +1 -1
  53. package/schematics/bundles/output-migration.cjs +6 -6
  54. package/schematics/bundles/{project_paths-C4WM31v5.cjs → project_paths-C5Df24y1.cjs} +3 -3
  55. package/schematics/bundles/project_tsconfig_paths-CDVxT6Ov.cjs +1 -1
  56. package/schematics/bundles/property_name-BBwFuqMe.cjs +1 -1
  57. package/schematics/bundles/route-lazy-loading.cjs +3 -3
  58. package/schematics/bundles/self-closing-tags-migration.cjs +7 -19
  59. package/schematics/bundles/signal-input-migration.cjs +28 -12
  60. package/schematics/bundles/signal-queries-migration.cjs +7 -7
  61. package/schematics/bundles/signals.cjs +7 -7
  62. package/schematics/bundles/standalone-migration.cjs +4 -4
  63. package/schematics/bundles/symbol-VPWguRxr.cjs +1 -1
  64. package/schematics/bundles/test-bed-get.cjs +4 -4
  65. package/{signal.d.d.ts → signal.d-BcmOdASA.d.ts} +2 -2
  66. package/testing/index.d.ts +6 -73
  67. package/{weak_ref.d.d.ts → weak_ref.d-eGOEP9S1.d.ts} +1 -1
  68. package/fesm2022/attribute.mjs.map +0 -1
  69. package/fesm2022/debug_node.mjs.map +0 -1
  70. package/fesm2022/resource.mjs.map +0 -1
  71. package/fesm2022/root_effect_scheduler.mjs.map +0 -1
  72. package/fesm2022/signal.mjs.map +0 -1
  73. package/fesm2022/untracked.mjs.map +0 -1
  74. package/fesm2022/weak_ref.mjs.map +0 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.0.6
3
+ * @license Angular v20.1.0-next.1
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -8,13 +8,14 @@
8
8
 
9
9
  require('@angular-devkit/core');
10
10
  require('node:path/posix');
11
- var project_paths = require('./project_paths-C4WM31v5.cjs');
11
+ var project_paths = require('./project_paths-C5Df24y1.cjs');
12
12
  var ts = require('typescript');
13
13
  require('os');
14
- var checker = require('./checker-a0VNmSrQ.cjs');
15
- var index = require('./index-jMQgXbRg.cjs');
14
+ var checker = require('./checker-CY7a8ko8.cjs');
15
+ var index = require('./index-BUgQDm-J.cjs');
16
16
  require('path');
17
- var apply_import_manager = require('./apply_import_manager-mlmcgZ0v.cjs');
17
+ var apply_import_manager = require('./apply_import_manager-BsIRDO9W.cjs');
18
+ var leading_space = require('./leading_space-D9nQ8UQC.cjs');
18
19
  require('@angular-devkit/schematics');
19
20
  require('./project_tsconfig_paths-CDVxT6Ov.cjs');
20
21
  require('fs');
@@ -206,10 +207,7 @@ class UnusedImportsMigration extends project_paths.TsurgeFunnelMigration {
206
207
  // Filter out the unused identifiers from an array.
207
208
  partialRemovals.forEach((toRemove, parent) => {
208
209
  toRemove.forEach((node) => {
209
- replacements.push(new project_paths.Replacement(project_paths.projectFile(sourceFile, info), getArrayElementRemovalUpdate(node, sourceText)));
210
- });
211
- stripTrailingSameLineCommas(parent, toRemove, sourceText)?.forEach((update) => {
212
- replacements.push(new project_paths.Replacement(project_paths.projectFile(sourceFile, info), update));
210
+ replacements.push(new project_paths.Replacement(project_paths.projectFile(sourceFile, info), getArrayElementRemovalUpdate(node, parent, sourceText)));
213
211
  });
214
212
  });
215
213
  // Attempt to clean up unused import declarations. Note that this isn't foolproof, because we
@@ -231,7 +229,7 @@ class UnusedImportsMigration extends project_paths.TsurgeFunnelMigration {
231
229
  }
232
230
  }
233
231
  /** Generates a `TextUpdate` for the removal of an array element. */
234
- function getArrayElementRemovalUpdate(node, sourceText) {
232
+ function getArrayElementRemovalUpdate(node, parent, sourceText) {
235
233
  let position = node.getStart();
236
234
  let end = node.getEnd();
237
235
  let toInsert = '';
@@ -251,39 +249,27 @@ function getArrayElementRemovalUpdate(node, sourceText) {
251
249
  break;
252
250
  }
253
251
  }
254
- return new project_paths.TextUpdate({ position, end, toInsert });
255
- }
256
- /** Returns `TextUpdate`s that will remove any leftover trailing commas on the same line. */
257
- function stripTrailingSameLineCommas(node, toRemove, sourceText) {
258
- let updates = null;
259
- for (let i = 0; i < node.elements.length; i++) {
260
- // Skip over elements that are being removed already.
261
- if (toRemove.has(node.elements[i])) {
262
- continue;
263
- }
264
- // An element might have a trailing comma if all elements after it have been removed.
265
- const mightHaveTrailingComma = node.elements.slice(i + 1).every((e) => toRemove.has(e));
266
- if (!mightHaveTrailingComma) {
267
- continue;
268
- }
269
- const position = node.elements[i].getEnd();
270
- let end = position;
271
- // If the item might have a trailing comma, start looking after it until we hit a line break.
272
- for (let charIndex = position; charIndex < node.getEnd(); charIndex++) {
273
- const char = sourceText[charIndex];
252
+ // If we're removing the last element in the array, adjust the starting offset so that
253
+ // it includes the previous comma on the same line. This avoids turning something like
254
+ // `[One, Two, Three]` into `[One,]`. We only do this within the same like, because
255
+ // trailing comma at the end of the line is fine.
256
+ if (parent.elements[parent.elements.length - 1] === node) {
257
+ for (let i = position - 1; i >= 0; i--) {
258
+ const char = sourceText[i];
274
259
  if (char === ',' || char === ' ') {
275
- end++;
260
+ position--;
276
261
  }
277
262
  else {
278
- if (char !== '\n' && position !== end) {
279
- updates ??= [];
280
- updates.push(new project_paths.TextUpdate({ position, end, toInsert: '' }));
263
+ if (whitespaceOrLineFeed.test(char)) {
264
+ // Replace the node with its leading whitespace to preserve the formatting.
265
+ // This only needs to happen if we're breaking on a newline.
266
+ toInsert = leading_space.getLeadingLineWhitespaceOfNode(node);
281
267
  }
282
268
  break;
283
269
  }
284
270
  }
285
271
  }
286
- return updates;
272
+ return new project_paths.TextUpdate({ position, end, toInsert });
287
273
  }
288
274
 
289
275
  function migrate() {
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.0.6
3
+ * @license Angular v20.1.0-next.1
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
7
7
  'use strict';
8
8
 
9
9
  var ts = require('typescript');
10
- var checker = require('./checker-a0VNmSrQ.cjs');
10
+ var checker = require('./checker-CY7a8ko8.cjs');
11
11
  require('os');
12
12
  var p = require('path');
13
13
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.0.6
3
+ * @license Angular v20.1.0-next.1
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -8,8 +8,8 @@
8
8
 
9
9
  var schematics = require('@angular-devkit/schematics');
10
10
  var p = require('path');
11
- var compiler_host = require('./compiler_host-CwrMDc6k.cjs');
12
- var checker = require('./checker-a0VNmSrQ.cjs');
11
+ var compiler_host = require('./compiler_host-DNYQkH4l.cjs');
12
+ var checker = require('./checker-CY7a8ko8.cjs');
13
13
  var ts = require('typescript');
14
14
  var project_tsconfig_paths = require('./project_tsconfig_paths-CDVxT6Ov.cjs');
15
15
  require('os');
@@ -1,18 +1,18 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.0.6
3
+ * @license Angular v20.1.0-next.1
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
7
7
  'use strict';
8
8
 
9
- var checker = require('./checker-a0VNmSrQ.cjs');
9
+ var checker = require('./checker-CY7a8ko8.cjs');
10
10
  require('typescript');
11
11
  require('os');
12
- var apply_import_manager = require('./apply_import_manager-mlmcgZ0v.cjs');
13
- require('./index-jMQgXbRg.cjs');
12
+ var apply_import_manager = require('./apply_import_manager-BsIRDO9W.cjs');
13
+ require('./index-BUgQDm-J.cjs');
14
14
  require('path');
15
- var project_paths = require('./project_paths-C4WM31v5.cjs');
15
+ var project_paths = require('./project_paths-C5Df24y1.cjs');
16
16
  var imports = require('./imports-CIX-JgAN.cjs');
17
17
  require('@angular-devkit/core');
18
18
  require('node:path/posix');
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.0.6
3
+ * @license Angular v20.1.0-next.1
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.0.6
3
+ * @license Angular v20.1.0-next.1
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -8,10 +8,10 @@
8
8
 
9
9
  var ts = require('typescript');
10
10
  require('os');
11
- var checker = require('./checker-a0VNmSrQ.cjs');
12
- var index = require('./index-jMQgXbRg.cjs');
11
+ var checker = require('./checker-CY7a8ko8.cjs');
12
+ var index = require('./index-BUgQDm-J.cjs');
13
13
  require('path');
14
- var project_paths = require('./project_paths-C4WM31v5.cjs');
14
+ var project_paths = require('./project_paths-C5Df24y1.cjs');
15
15
 
16
16
  function getMemberName(member) {
17
17
  if (member.name === undefined) {
@@ -355,16 +355,20 @@ class TemplateExpressionReferenceVisitor extends checker.RecursiveAstVisitor {
355
355
  }
356
356
  }
357
357
  visitPropertyRead(ast, context) {
358
- this._inspectPropertyAccess(ast, context);
358
+ this._inspectPropertyAccess(ast, false, context);
359
359
  super.visitPropertyRead(ast, context);
360
360
  }
361
361
  visitSafePropertyRead(ast, context) {
362
- this._inspectPropertyAccess(ast, context);
362
+ this._inspectPropertyAccess(ast, false, context);
363
363
  super.visitPropertyRead(ast, context);
364
364
  }
365
- visitPropertyWrite(ast, context) {
366
- this._inspectPropertyAccess(ast, context);
367
- super.visitPropertyWrite(ast, context);
365
+ visitBinary(ast, context) {
366
+ if (ast.operation === '=' && ast.left instanceof checker.PropertyRead) {
367
+ this._inspectPropertyAccess(ast.left, true, [...context, ast, ast.left]);
368
+ }
369
+ else {
370
+ super.visitBinary(ast, context);
371
+ }
368
372
  }
369
373
  visitConditional(ast, context) {
370
374
  this.visit(ast.condition, context);
@@ -377,12 +381,12 @@ class TemplateExpressionReferenceVisitor extends checker.RecursiveAstVisitor {
377
381
  * Inspects the property access and attempts to resolve whether they access
378
382
  * a known field. If so, the result is captured.
379
383
  */
380
- _inspectPropertyAccess(ast, astPath) {
384
+ _inspectPropertyAccess(ast, isAssignment, astPath) {
381
385
  if (this.fieldNamesToConsiderForReferenceLookup !== null &&
382
386
  !this.fieldNamesToConsiderForReferenceLookup.has(ast.name)) {
383
387
  return;
384
388
  }
385
- const isWrite = !!(ast instanceof checker.PropertyWrite ||
389
+ const isWrite = !!(isAssignment ||
386
390
  (this.activeTmplAstNode && isTwoWayBindingNode(this.activeTmplAstNode)));
387
391
  this._checkAccessViaTemplateTypeCheckBlock(ast, isWrite, astPath) ||
388
392
  this._checkAccessViaOwningComponentClassType(ast, isWrite, astPath);
@@ -459,10 +463,7 @@ class TemplateExpressionReferenceVisitor extends checker.RecursiveAstVisitor {
459
463
  _isPartOfNarrowingTernary(read) {
460
464
  // Note: We do not safe check that the reads are fully matching 1:1. This is acceptable
461
465
  // as worst case we just skip an input from being migrated. This is very unlikely too.
462
- return this.insideConditionalExpressionsWithReads.some((r) => (r instanceof checker.PropertyRead ||
463
- r instanceof checker.PropertyWrite ||
464
- r instanceof checker.SafePropertyRead) &&
465
- r.name === read.name);
466
+ return this.insideConditionalExpressionsWithReads.some((r) => (r instanceof checker.PropertyRead || r instanceof checker.SafePropertyRead) && r.name === read.name);
466
467
  }
467
468
  }
468
469
  /**
@@ -472,7 +473,7 @@ class TemplateExpressionReferenceVisitor extends checker.RecursiveAstVisitor {
472
473
  function traverseReceiverAndLookupSymbol(readOrWrite, componentClass, checker$1) {
473
474
  const path = [readOrWrite.name];
474
475
  let node = readOrWrite;
475
- while (node.receiver instanceof checker.PropertyRead || node.receiver instanceof checker.PropertyWrite) {
476
+ while (node.receiver instanceof checker.PropertyRead) {
476
477
  node = node.receiver;
477
478
  path.unshift(node.name);
478
479
  }