@angular/core 20.3.1 → 20.3.3

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 (70) hide show
  1. package/api.d.d.ts +7 -4
  2. package/chrome_dev_tools_performance.d.d.ts +2 -2
  3. package/discovery.d.d.ts +7 -6
  4. package/effect.d.d.ts +2 -3
  5. package/event_dispatcher.d.d.ts +1 -1
  6. package/fesm2022/attribute.mjs +1 -1
  7. package/fesm2022/attribute.mjs.map +1 -1
  8. package/fesm2022/core.mjs +4 -4
  9. package/fesm2022/core.mjs.map +1 -1
  10. package/fesm2022/debug_node.mjs +31 -42
  11. package/fesm2022/debug_node.mjs.map +1 -1
  12. package/fesm2022/effect.mjs +3 -4
  13. package/fesm2022/effect.mjs.map +1 -1
  14. package/fesm2022/not_found.mjs +1 -1
  15. package/fesm2022/not_found.mjs.map +1 -1
  16. package/fesm2022/primitives/di.mjs +1 -1
  17. package/fesm2022/primitives/di.mjs.map +1 -1
  18. package/fesm2022/primitives/event-dispatch.mjs +1 -1
  19. package/fesm2022/primitives/event-dispatch.mjs.map +1 -1
  20. package/fesm2022/primitives/signals.mjs +138 -6
  21. package/fesm2022/primitives/signals.mjs.map +1 -1
  22. package/fesm2022/resource.mjs +5 -4
  23. package/fesm2022/resource.mjs.map +1 -1
  24. package/fesm2022/root_effect_scheduler.mjs +2 -2
  25. package/fesm2022/root_effect_scheduler.mjs.map +1 -1
  26. package/fesm2022/rxjs-interop.mjs +1 -1
  27. package/fesm2022/rxjs-interop.mjs.map +1 -1
  28. package/fesm2022/signal.mjs +8 -8
  29. package/fesm2022/signal.mjs.map +1 -1
  30. package/fesm2022/testing.mjs +1 -1
  31. package/fesm2022/testing.mjs.map +1 -1
  32. package/fesm2022/weak_ref.mjs +1 -1
  33. package/fesm2022/weak_ref.mjs.map +1 -1
  34. package/{graph.d.d.ts → formatter.d.d.ts} +14 -2
  35. package/index.d.ts +10 -8
  36. package/package.json +2 -2
  37. package/primitives/di/index.d.ts +1 -1
  38. package/primitives/event-dispatch/index.d.ts +1 -1
  39. package/primitives/signals/index.d.ts +3 -4
  40. package/rxjs-interop/index.d.ts +2 -2
  41. package/schematics/bundles/add-bootstrap-context-to-server-main.cjs +5 -5
  42. package/schematics/bundles/{apply_import_manager-C8vgfoJx.cjs → apply_import_manager-CUBvPp_2.cjs} +3 -3
  43. package/schematics/bundles/cleanup-unused-imports.cjs +5 -5
  44. package/schematics/bundles/{compiler_host-DC7Yquzy.cjs → compiler_host-DJHZ7M9N.cjs} +2 -2
  45. package/schematics/bundles/control-flow-migration.cjs +70 -38
  46. package/schematics/bundles/document-core.cjs +5 -5
  47. package/schematics/bundles/imports-CIX-JgAN.cjs +1 -1
  48. package/schematics/bundles/{index-B5lv9x1v.cjs → index-BZJ8bv9v.cjs} +50 -26
  49. package/schematics/bundles/{index-Bufm9_1r.cjs → index-DU_evmAi.cjs} +4 -4
  50. package/schematics/bundles/inject-flags.cjs +5 -5
  51. package/schematics/bundles/inject-migration.cjs +3 -3
  52. package/schematics/bundles/leading_space-D9nQ8UQC.cjs +1 -1
  53. package/schematics/bundles/{migrate_ts_type_references-Ctl6-8qO.cjs → migrate_ts_type_references-58gA72Ti.cjs} +5 -5
  54. package/schematics/bundles/ng_decorators-B5HCqr20.cjs +1 -1
  55. package/schematics/bundles/nodes-B16H9JUd.cjs +1 -1
  56. package/schematics/bundles/output-migration.cjs +6 -6
  57. package/schematics/bundles/{project_paths-CIUSEdn4.cjs → project_paths-DcM18127.cjs} +3 -3
  58. package/schematics/bundles/{project_tsconfig_paths-crm5NKE7.cjs → project_tsconfig_paths-Dqd0J7st.cjs} +50 -42
  59. package/schematics/bundles/property_name-BBwFuqMe.cjs +1 -1
  60. package/schematics/bundles/route-lazy-loading.cjs +3 -3
  61. package/schematics/bundles/router-current-navigation.cjs +4 -4
  62. package/schematics/bundles/self-closing-tags-migration.cjs +4 -4
  63. package/schematics/bundles/signal-input-migration.cjs +67 -8
  64. package/schematics/bundles/signal-queries-migration.cjs +7 -7
  65. package/schematics/bundles/signals.cjs +7 -7
  66. package/schematics/bundles/standalone-migration.cjs +70 -43
  67. package/schematics/bundles/symbol-VPWguRxr.cjs +1 -1
  68. package/schematics/bundles/test-bed-get.cjs +4 -4
  69. package/testing/index.d.ts +2 -2
  70. package/weak_ref.d.d.ts +1 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.3.1
3
+ * @license Angular v20.3.3
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -8,11 +8,11 @@
8
8
 
9
9
  var ts = require('typescript');
10
10
  require('os');
11
- require('./project_tsconfig_paths-crm5NKE7.cjs');
12
- require('./index-B5lv9x1v.cjs');
11
+ require('./project_tsconfig_paths-Dqd0J7st.cjs');
12
+ require('./index-BZJ8bv9v.cjs');
13
13
  require('path');
14
14
  require('node:path');
15
- var project_paths = require('./project_paths-CIUSEdn4.cjs');
15
+ var project_paths = require('./project_paths-DcM18127.cjs');
16
16
  var imports = require('./imports-CIX-JgAN.cjs');
17
17
  var symbol = require('./symbol-VPWguRxr.cjs');
18
18
  require('@angular-devkit/core');
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.3.1
3
+ * @license Angular v20.3.3
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -8,11 +8,11 @@
8
8
 
9
9
  var ts = require('typescript');
10
10
  require('os');
11
- var project_tsconfig_paths = require('./project_tsconfig_paths-crm5NKE7.cjs');
12
- require('./index-B5lv9x1v.cjs');
11
+ var project_tsconfig_paths = require('./project_tsconfig_paths-Dqd0J7st.cjs');
12
+ require('./index-BZJ8bv9v.cjs');
13
13
  require('path');
14
14
  require('node:path');
15
- var project_paths = require('./project_paths-CIUSEdn4.cjs');
15
+ var project_paths = require('./project_paths-DcM18127.cjs');
16
16
  var ng_decorators = require('./ng_decorators-B5HCqr20.cjs');
17
17
  var property_name = require('./property_name-BBwFuqMe.cjs');
18
18
  require('@angular-devkit/core');
@@ -1,23 +1,23 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.3.1
3
+ * @license Angular v20.3.3
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
7
7
  'use strict';
8
8
 
9
- var migrate_ts_type_references = require('./migrate_ts_type_references-Ctl6-8qO.cjs');
9
+ var migrate_ts_type_references = require('./migrate_ts_type_references-58gA72Ti.cjs');
10
10
  var ts = require('typescript');
11
11
  require('os');
12
- var project_tsconfig_paths = require('./project_tsconfig_paths-crm5NKE7.cjs');
13
- var index$1 = require('./index-B5lv9x1v.cjs');
12
+ var project_tsconfig_paths = require('./project_tsconfig_paths-Dqd0J7st.cjs');
13
+ var index$1 = require('./index-BZJ8bv9v.cjs');
14
14
  require('path');
15
15
  require('node:path');
16
- var project_paths = require('./project_paths-CIUSEdn4.cjs');
17
- var index = require('./index-Bufm9_1r.cjs');
16
+ var project_paths = require('./project_paths-DcM18127.cjs');
17
+ var index = require('./index-DU_evmAi.cjs');
18
18
  var assert$1 = require('assert');
19
19
  var assert = require('node:assert');
20
- var apply_import_manager = require('./apply_import_manager-C8vgfoJx.cjs');
20
+ var apply_import_manager = require('./apply_import_manager-CUBvPp_2.cjs');
21
21
  require('@angular-devkit/core');
22
22
  require('node:path/posix');
23
23
  require('./leading_space-D9nQ8UQC.cjs');
@@ -970,6 +970,12 @@ function populateKnownInputsFromGlobalData(knownInputs, globalData) {
970
970
  * @returns Replacements for converting the input.
971
971
  */
972
972
  function convertToSignalInput(node, { resolvedMetadata: metadata, resolvedType, preferShorthandIfPossible, originalInputDecorator, initialValue, leadingTodoText, }, info, checker, importManager, result) {
973
+ // Check for 'this' references in initializer before doing anything else
974
+ if (node.initializer &&
975
+ (ts.isArrowFunction(node.initializer) || ts.isFunctionExpression(node.initializer)) &&
976
+ containsThisReferences(node.initializer)) {
977
+ return []; // Skip migration for this input by returning empty replacements
978
+ }
973
979
  let optionsLiteral = null;
974
980
  // We need an options array for the input because:
975
981
  // - the input is either aliased,
@@ -1039,7 +1045,23 @@ function convertToSignalInput(node, { resolvedMetadata: metadata, resolvedType,
1039
1045
  if (!modifiersWithoutInputDecorator?.some((s) => s.kind === ts.SyntaxKind.ReadonlyKeyword)) {
1040
1046
  modifiersWithoutInputDecorator.push(ts.factory.createModifier(ts.SyntaxKind.ReadonlyKeyword));
1041
1047
  }
1042
- const newNode = ts.factory.createPropertyDeclaration(modifiersWithoutInputDecorator, node.name, undefined, undefined, inputInitializer);
1048
+ // Skip migration if the input is a function that references class members via 'this'
1049
+ if (inputInitializer &&
1050
+ (ts.isArrowFunction(inputInitializer) || ts.isFunctionExpression(inputInitializer))) {
1051
+ if (containsThisReferences(inputInitializer)) {
1052
+ return []; // Skip migration for this input by returning empty replacements
1053
+ }
1054
+ }
1055
+ let finalInitializer = inputInitializer;
1056
+ if (inputInitializer === undefined) {
1057
+ if (preferShorthandIfPossible === null) {
1058
+ finalInitializer = ts.factory.createIdentifier('undefined');
1059
+ }
1060
+ else {
1061
+ resolvedType = preferShorthandIfPossible.originalType;
1062
+ }
1063
+ }
1064
+ const newNode = ts.factory.createPropertyDeclaration(modifiersWithoutInputDecorator, node.name, undefined, undefined, finalInitializer);
1043
1065
  const newPropertyText = result.printer.printNode(ts.EmitHint.Unspecified, newNode, node.getSourceFile());
1044
1066
  const replacements = [];
1045
1067
  if (leadingTodoText !== null) {
@@ -1083,6 +1105,43 @@ function extractTransformOfInput(transform, resolvedType, checker) {
1083
1105
  leadingTodoText,
1084
1106
  };
1085
1107
  }
1108
+ /**
1109
+ * Checks if a function node contains any references to 'this'.
1110
+ * This is used to skip migration for functions that reference class members.
1111
+ */
1112
+ function containsThisReferences(node) {
1113
+ let hasThis = false;
1114
+ const visit = (node) => {
1115
+ if (hasThis)
1116
+ return;
1117
+ if (node.kind === ts.SyntaxKind.ThisKeyword) {
1118
+ hasThis = true;
1119
+ return;
1120
+ }
1121
+ if (ts.isPropertyAccessExpression(node)) {
1122
+ const expr = node.expression;
1123
+ if (ts.isIdentifier(expr) && expr.text === 'this') {
1124
+ hasThis = true;
1125
+ return;
1126
+ }
1127
+ }
1128
+ ts.forEachChild(node, visit);
1129
+ };
1130
+ if (ts.isArrowFunction(node) || ts.isFunctionExpression(node)) {
1131
+ if (node.body) {
1132
+ if (node.body.kind === ts.SyntaxKind.Block) {
1133
+ node.body.statements.forEach(visit);
1134
+ }
1135
+ else {
1136
+ visit(node.body);
1137
+ }
1138
+ }
1139
+ }
1140
+ else {
1141
+ ts.forEachChild(node, visit);
1142
+ }
1143
+ return hasThis;
1144
+ }
1086
1145
 
1087
1146
  /**
1088
1147
  * Phase that migrates `@Input()` declarations to signal inputs and
@@ -1,23 +1,23 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.3.1
3
+ * @license Angular v20.3.3
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
7
7
  'use strict';
8
8
 
9
- var project_tsconfig_paths = require('./project_tsconfig_paths-crm5NKE7.cjs');
9
+ var project_tsconfig_paths = require('./project_tsconfig_paths-Dqd0J7st.cjs');
10
10
  var ts = require('typescript');
11
11
  require('os');
12
- var index$1 = require('./index-B5lv9x1v.cjs');
12
+ var index$1 = require('./index-BZJ8bv9v.cjs');
13
13
  require('path');
14
14
  require('node:path');
15
- var project_paths = require('./project_paths-CIUSEdn4.cjs');
16
- var apply_import_manager = require('./apply_import_manager-C8vgfoJx.cjs');
17
- var migrate_ts_type_references = require('./migrate_ts_type_references-Ctl6-8qO.cjs');
15
+ var project_paths = require('./project_paths-DcM18127.cjs');
16
+ var apply_import_manager = require('./apply_import_manager-CUBvPp_2.cjs');
17
+ var migrate_ts_type_references = require('./migrate_ts_type_references-58gA72Ti.cjs');
18
18
  var assert = require('assert');
19
19
  require('node:assert');
20
- var index = require('./index-Bufm9_1r.cjs');
20
+ var index = require('./index-DU_evmAi.cjs');
21
21
  require('@angular-devkit/core');
22
22
  require('node:path/posix');
23
23
  require('fs');
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.3.1
3
+ * @license Angular v20.3.3
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -10,7 +10,7 @@ var schematics = require('@angular-devkit/schematics');
10
10
  var signalQueriesMigration = require('./signal-queries-migration.cjs');
11
11
  var signalInputMigration = require('./signal-input-migration.cjs');
12
12
  var outputMigration = require('./output-migration.cjs');
13
- require('./project_tsconfig_paths-crm5NKE7.cjs');
13
+ require('./project_tsconfig_paths-Dqd0J7st.cjs');
14
14
  require('typescript');
15
15
  require('os');
16
16
  require('fs');
@@ -18,14 +18,14 @@ require('module');
18
18
  require('path');
19
19
  require('url');
20
20
  require('@angular-devkit/core');
21
- require('./index-B5lv9x1v.cjs');
21
+ require('./index-BZJ8bv9v.cjs');
22
22
  require('node:path');
23
- require('./project_paths-CIUSEdn4.cjs');
23
+ require('./project_paths-DcM18127.cjs');
24
24
  require('node:path/posix');
25
- require('./apply_import_manager-C8vgfoJx.cjs');
26
- require('./migrate_ts_type_references-Ctl6-8qO.cjs');
25
+ require('./apply_import_manager-CUBvPp_2.cjs');
26
+ require('./migrate_ts_type_references-58gA72Ti.cjs');
27
27
  require('assert');
28
- require('./index-Bufm9_1r.cjs');
28
+ require('./index-DU_evmAi.cjs');
29
29
  require('./leading_space-D9nQ8UQC.cjs');
30
30
  require('node:assert');
31
31
 
@@ -1,18 +1,18 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.3.1
3
+ * @license Angular v20.3.3
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 schematics = require('@angular-devkit/schematics');
10
- var index = require('./index-B5lv9x1v.cjs');
10
+ var index = require('./index-BZJ8bv9v.cjs');
11
11
  var fs = require('fs');
12
12
  var p = require('path');
13
13
  var ts = require('typescript');
14
- var compiler_host = require('./compiler_host-DC7Yquzy.cjs');
15
- var project_tsconfig_paths = require('./project_tsconfig_paths-crm5NKE7.cjs');
14
+ var compiler_host = require('./compiler_host-DJHZ7M9N.cjs');
15
+ var project_tsconfig_paths = require('./project_tsconfig_paths-Dqd0J7st.cjs');
16
16
  var ng_decorators = require('./ng_decorators-B5HCqr20.cjs');
17
17
  var nodes = require('./nodes-B16H9JUd.cjs');
18
18
  var symbol = require('./symbol-VPWguRxr.cjs');
@@ -402,9 +402,16 @@ function getComponentImportExpressions(decl, allDeclarations, tracker, typeCheck
402
402
  const importLocation = findImportLocation(dep, decl, usedDependenciesInMigration.has(dep)
403
403
  ? project_tsconfig_paths.PotentialImportMode.ForceDirect
404
404
  : project_tsconfig_paths.PotentialImportMode.Normal, typeChecker);
405
- if (importLocation && !seenImports.has(importLocation.symbolName)) {
406
- seenImports.add(importLocation.symbolName);
407
- resolvedDependencies.push(importLocation);
405
+ if (importLocation) {
406
+ // Create a unique key that includes both the symbol name and module specifier
407
+ // to handle cases where the same symbol name is imported from different modules
408
+ const importKey = importLocation.moduleSpecifier
409
+ ? `${importLocation.symbolName}::${importLocation.moduleSpecifier}`
410
+ : importLocation.symbolName;
411
+ if (!seenImports.has(importKey)) {
412
+ seenImports.add(importKey);
413
+ resolvedDependencies.push(importLocation);
414
+ }
408
415
  }
409
416
  }
410
417
  return potentialImportsToExpressions(resolvedDependencies, decl.getSourceFile(), tracker, importRemapper);
@@ -470,33 +477,42 @@ function moveDeclarationsToImports(literal, allDeclarations, typeChecker, templa
470
477
  ts.isArrayLiteralExpression(prop.initializer) &&
471
478
  prop.initializer.elements.hasTrailingComma);
472
479
  // Separate the declarations that we want to keep and ones we need to copy into the `imports`.
473
- if (ts.isPropertyAssignment(declarationsProp)) {
474
- // If the declarations are an array, we can analyze it to
475
- // find any classes from the current migration.
476
- if (ts.isArrayLiteralExpression(declarationsProp.initializer)) {
477
- for (const el of declarationsProp.initializer.elements) {
478
- if (ts.isIdentifier(el)) {
479
- const correspondingClass = findClassDeclaration(el, typeChecker);
480
- if (!correspondingClass ||
481
- // Check whether the declaration is either standalone already or is being converted
482
- // in this migration. We need to check if it's standalone already, in order to correct
483
- // some cases where the main app and the test files are being migrated in separate
484
- // programs.
485
- isStandaloneDeclaration(correspondingClass, allDeclarations, templateTypeChecker)) {
486
- declarationsToCopy.push(el);
480
+ if (ts.isPropertyAssignment(declarationsProp) ||
481
+ ts.isShorthandPropertyAssignment(declarationsProp)) {
482
+ // Handle both regular and shorthand property assignments
483
+ if (ts.isPropertyAssignment(declarationsProp)) {
484
+ // If the declarations are an array, we can analyze it to
485
+ // find any classes from the current migration.
486
+ if (ts.isArrayLiteralExpression(declarationsProp.initializer)) {
487
+ for (const el of declarationsProp.initializer.elements) {
488
+ if (ts.isIdentifier(el)) {
489
+ const correspondingClass = findClassDeclaration(el, typeChecker);
490
+ if (!correspondingClass ||
491
+ // Check whether the declaration is either standalone already or is being converted
492
+ // in this migration. We need to check if it's standalone already, in order to correct
493
+ // some cases where the main app and the test files are being migrated in separate
494
+ // programs.
495
+ isStandaloneDeclaration(correspondingClass, allDeclarations, templateTypeChecker)) {
496
+ declarationsToCopy.push(el);
497
+ }
498
+ else {
499
+ declarationsToPreserve.push(el);
500
+ }
487
501
  }
488
502
  else {
489
- declarationsToPreserve.push(el);
503
+ declarationsToCopy.push(el);
490
504
  }
491
505
  }
492
- else {
493
- declarationsToCopy.push(el);
494
- }
506
+ }
507
+ else {
508
+ // Otherwise create a spread that will be copied into the `imports`.
509
+ declarationsToCopy.push(ts.factory.createSpreadElement(declarationsProp.initializer));
495
510
  }
496
511
  }
497
512
  else {
498
- // Otherwise create a spread that will be copied into the `imports`.
499
- declarationsToCopy.push(ts.factory.createSpreadElement(declarationsProp.initializer));
513
+ // For shorthand properties, treat them as unanalyzable and use spread syntax
514
+ // shorthand properties were being ignored, now they're detected and treated as spreads
515
+ declarationsToCopy.push(ts.factory.createSpreadElement(declarationsProp.name));
500
516
  }
501
517
  }
502
518
  // If there are no `imports`, create them with the declarations we want to copy.
@@ -504,35 +520,38 @@ function moveDeclarationsToImports(literal, allDeclarations, typeChecker, templa
504
520
  properties.push(ts.factory.createPropertyAssignment('imports', ts.factory.createArrayLiteralExpression(ts.factory.createNodeArray(declarationsToCopy, hasAnyArrayTrailingComma && declarationsToCopy.length > 2))));
505
521
  }
506
522
  for (const prop of literal.properties) {
507
- if (!isNamedPropertyAssignment(prop)) {
523
+ if (!isNamedPropertyAssignment(prop) && !ts.isShorthandPropertyAssignment(prop)) {
508
524
  properties.push(prop);
509
525
  continue;
510
526
  }
511
527
  // If we have declarations to preserve, update the existing property, otherwise drop it.
512
528
  if (prop === declarationsProp) {
513
529
  if (declarationsToPreserve.length > 0) {
514
- const hasTrailingComma = ts.isArrayLiteralExpression(prop.initializer)
530
+ const hasTrailingComma = ts.isPropertyAssignment(prop) && ts.isArrayLiteralExpression(prop.initializer)
515
531
  ? prop.initializer.elements.hasTrailingComma
516
532
  : hasAnyArrayTrailingComma;
517
- properties.push(ts.factory.updatePropertyAssignment(prop, prop.name, ts.factory.createArrayLiteralExpression(ts.factory.createNodeArray(declarationsToPreserve, hasTrailingComma && declarationsToPreserve.length > 2))));
533
+ properties.push(ts.factory.createPropertyAssignment(prop.name, ts.factory.createArrayLiteralExpression(ts.factory.createNodeArray(declarationsToPreserve, hasTrailingComma && declarationsToPreserve.length > 2))));
518
534
  }
519
535
  continue;
520
536
  }
521
537
  // If we have an `imports` array and declarations
522
538
  // that should be copied, we merge the two arrays.
523
539
  if (prop === importsProp && declarationsToCopy.length > 0) {
524
- let initializer;
525
- if (ts.isArrayLiteralExpression(prop.initializer)) {
526
- initializer = ts.factory.updateArrayLiteralExpression(prop.initializer, ts.factory.createNodeArray([...prop.initializer.elements, ...declarationsToCopy], prop.initializer.elements.hasTrailingComma));
527
- }
528
- else {
529
- initializer = ts.factory.createArrayLiteralExpression(ts.factory.createNodeArray([ts.factory.createSpreadElement(prop.initializer), ...declarationsToCopy],
530
- // Expect the declarations to be greater than 1 since
531
- // we have the pre-existing initializer already.
532
- hasAnyArrayTrailingComma && declarationsToCopy.length > 1));
540
+ // Only regular property assignments have initializers that we can merge
541
+ if (ts.isPropertyAssignment(prop)) {
542
+ let initializer;
543
+ if (ts.isArrayLiteralExpression(prop.initializer)) {
544
+ initializer = ts.factory.updateArrayLiteralExpression(prop.initializer, ts.factory.createNodeArray([...prop.initializer.elements, ...declarationsToCopy], prop.initializer.elements.hasTrailingComma));
545
+ }
546
+ else {
547
+ initializer = ts.factory.createArrayLiteralExpression(ts.factory.createNodeArray([ts.factory.createSpreadElement(prop.initializer), ...declarationsToCopy],
548
+ // Expect the declarations to be greater than 1 since
549
+ // we have the pre-existing initializer already.
550
+ hasAnyArrayTrailingComma && declarationsToCopy.length > 1));
551
+ }
552
+ properties.push(ts.factory.updatePropertyAssignment(prop, prop.name, initializer));
553
+ continue;
533
554
  }
534
- properties.push(ts.factory.updatePropertyAssignment(prop, prop.name, initializer));
535
- continue;
536
555
  }
537
556
  // Retain any remaining properties.
538
557
  properties.push(prop);
@@ -642,8 +661,14 @@ function findImportLocation(target, inContext, importMode, typeChecker) {
642
661
  * but not `declarations: []`.
643
662
  */
644
663
  function hasNgModuleMetadataElements(node) {
645
- return (ts.isPropertyAssignment(node) &&
646
- (!ts.isArrayLiteralExpression(node.initializer) || node.initializer.elements.length > 0));
664
+ if (ts.isPropertyAssignment(node)) {
665
+ return !ts.isArrayLiteralExpression(node.initializer) || node.initializer.elements.length > 0;
666
+ }
667
+ if (ts.isShorthandPropertyAssignment(node)) {
668
+ // For shorthand properties, we assume they have elements since they reference a variable
669
+ return true;
670
+ }
671
+ return false;
647
672
  }
648
673
  /** Finds all modules whose declarations can be migrated. */
649
674
  function findNgModuleClassesToMigrate(sourceFile, typeChecker) {
@@ -820,6 +845,7 @@ function analyzeTestingModules(testObjects, typeChecker) {
820
845
  const importsProp = findLiteralProperty(obj, 'imports');
821
846
  const importElements = importsProp &&
822
847
  hasNgModuleMetadataElements(importsProp) &&
848
+ ts.isPropertyAssignment(importsProp) &&
823
849
  ts.isArrayLiteralExpression(importsProp.initializer)
824
850
  ? importsProp.initializer.elements.filter((el) => {
825
851
  // Filter out calls since they may be a `ModuleWithProviders`.
@@ -864,6 +890,7 @@ function extractDeclarationsFromTestObject(obj, typeChecker) {
864
890
  const declarations = findLiteralProperty(obj, 'declarations');
865
891
  if (declarations &&
866
892
  hasNgModuleMetadataElements(declarations) &&
893
+ ts.isPropertyAssignment(declarations) &&
867
894
  ts.isArrayLiteralExpression(declarations.initializer)) {
868
895
  for (const element of declarations.initializer.elements) {
869
896
  const declaration = findClassDeclaration(element, typeChecker);
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.3.1
3
+ * @license Angular v20.3.3
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.3.1
3
+ * @license Angular v20.3.3
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -8,11 +8,11 @@
8
8
 
9
9
  var ts = require('typescript');
10
10
  require('os');
11
- require('./project_tsconfig_paths-crm5NKE7.cjs');
12
- require('./index-B5lv9x1v.cjs');
11
+ require('./project_tsconfig_paths-Dqd0J7st.cjs');
12
+ require('./index-BZJ8bv9v.cjs');
13
13
  require('path');
14
14
  require('node:path');
15
- var project_paths = require('./project_paths-CIUSEdn4.cjs');
15
+ var project_paths = require('./project_paths-DcM18127.cjs');
16
16
  var imports = require('./imports-CIX-JgAN.cjs');
17
17
  var symbol = require('./symbol-VPWguRxr.cjs');
18
18
  require('@angular-devkit/core');
@@ -1,14 +1,14 @@
1
1
  /**
2
- * @license Angular v20.3.1
2
+ * @license Angular v20.3.3
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
6
6
 
7
+ import '../formatter.d.js';
7
8
  import '../event_dispatcher.d.js';
8
9
  import { InjectionToken, Type, ProviderToken, InjectOptions } from '../chrome_dev_tools_performance.d.js';
9
10
  import { DeferBlockDetails, DeferBlockState, ComponentRef, DebugElement, ElementRef, ChangeDetectorRef, NgZone, SchemaMetadata, DeferBlockBehavior, Binding, PlatformRef, NgModule, Component, Directive, Pipe, Navigation, NavigationNavigateOptions, NavigationOptions, NavigateEvent, NavigationCurrentEntryChangeEvent, NavigationTransition, NavigationUpdateCurrentEntryOptions, NavigationReloadOptions, NavigationResult, NavigationHistoryEntry, NavigationDestination, NavigationInterceptOptions } from '../discovery.d.js';
10
11
  import * as i0 from '@angular/core';
11
- import '../graph.d.js';
12
12
  import 'rxjs';
13
13
  import '../effect.d.js';
14
14
  import '@angular/core/primitives/di';
package/weak_ref.d.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v20.3.1
2
+ * @license Angular v20.3.3
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */