@angular/core 21.2.7 → 21.2.9

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 (64) hide show
  1. package/fesm2022/_attribute-chunk.mjs +1 -1
  2. package/fesm2022/_debug_node-chunk.mjs +24 -6
  3. package/fesm2022/_debug_node-chunk.mjs.map +1 -1
  4. package/fesm2022/_effect-chunk.mjs +1 -1
  5. package/fesm2022/_effect-chunk2.mjs +2 -2
  6. package/fesm2022/_effect-chunk2.mjs.map +1 -1
  7. package/fesm2022/_not_found-chunk.mjs +1 -1
  8. package/fesm2022/_resource-chunk.mjs +1 -1
  9. package/fesm2022/_untracked-chunk.mjs +1 -1
  10. package/fesm2022/_weak_ref-chunk.mjs +1 -1
  11. package/fesm2022/core.mjs +1 -1
  12. package/fesm2022/primitives-di.mjs +1 -1
  13. package/fesm2022/primitives-event-dispatch.mjs +1 -5
  14. package/fesm2022/primitives-event-dispatch.mjs.map +1 -1
  15. package/fesm2022/primitives-signals.mjs +1 -1
  16. package/fesm2022/rxjs-interop.mjs +1 -1
  17. package/fesm2022/testing.mjs +1 -1
  18. package/package.json +2 -2
  19. package/schematics/bundles/add-bootstrap-context-to-server-main.cjs +1 -1
  20. package/schematics/bundles/application-config-core.cjs +1 -1
  21. package/schematics/bundles/apply_import_manager-CxA_YYgB.cjs +1 -1
  22. package/schematics/bundles/bootstrap-options-migration.cjs +1 -1
  23. package/schematics/bundles/cleanup-unused-imports.cjs +1 -1
  24. package/schematics/bundles/common-to-standalone-migration.cjs +1 -1
  25. package/schematics/bundles/compiler_host-CY14HvaP.cjs +1 -1
  26. package/schematics/bundles/control-flow-migration.cjs +1 -1
  27. package/schematics/bundles/imports-CVmcbVA9.cjs +1 -1
  28. package/schematics/bundles/{index-BtLcQH8g.cjs → index-DADA7AvC.cjs} +7 -3
  29. package/schematics/bundles/inject-migration.cjs +1 -1
  30. package/schematics/bundles/leading_space-BTPRV0wu.cjs +1 -1
  31. package/schematics/bundles/{migrate_ts_type_references-MWoZx-Cb.cjs → migrate_ts_type_references-CJvpTtkh.cjs} +2 -2
  32. package/schematics/bundles/ng_component_template-BOuKAnQd.cjs +1 -1
  33. package/schematics/bundles/ng_decorators-DYy6II6x.cjs +1 -1
  34. package/schematics/bundles/ngclass-to-class-migration.cjs +1 -1
  35. package/schematics/bundles/ngstyle-to-style-migration.cjs +1 -1
  36. package/schematics/bundles/nodes-ZSQ7WZRB.cjs +1 -1
  37. package/schematics/bundles/output-migration.cjs +2 -2
  38. package/schematics/bundles/parse_html-C8eKA9px.cjs +1 -1
  39. package/schematics/bundles/project_paths-D2V-Uh2L.cjs +1 -1
  40. package/schematics/bundles/project_tsconfig_paths-DkkMibv-.cjs +1 -1
  41. package/schematics/bundles/property_name-BCpALNpZ.cjs +1 -1
  42. package/schematics/bundles/route-lazy-loading.cjs +1 -1
  43. package/schematics/bundles/router-current-navigation.cjs +1 -1
  44. package/schematics/bundles/router-last-successful-navigation.cjs +1 -1
  45. package/schematics/bundles/router-testing-module-migration.cjs +1 -1
  46. package/schematics/bundles/self-closing-tags-migration.cjs +1 -1
  47. package/schematics/bundles/signal-input-migration.cjs +3 -3
  48. package/schematics/bundles/signal-queries-migration.cjs +3 -3
  49. package/schematics/bundles/signals.cjs +3 -3
  50. package/schematics/bundles/standalone-migration.cjs +29 -17
  51. package/schematics/bundles/symbol-DZeHSR-V.cjs +1 -1
  52. package/types/_api-chunk.d.ts +1 -1
  53. package/types/_chrome_dev_tools_performance-chunk.d.ts +1 -1
  54. package/types/_discovery-chunk.d.ts +1 -1
  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 +2 -2
  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 +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v21.2.7
2
+ * @license Angular v21.2.9
3
3
  * (c) 2010-2026 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v21.2.7
2
+ * @license Angular v21.2.9
3
3
  * (c) 2010-2026 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v21.2.7
2
+ * @license Angular v21.2.9
3
3
  * (c) 2010-2026 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/core",
3
- "version": "21.2.7",
3
+ "version": "21.2.9",
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": "21.2.7",
49
+ "@angular/compiler": "21.2.9",
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.7
3
+ * @license Angular v21.2.9
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.7
3
+ * @license Angular v21.2.9
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.7
3
+ * @license Angular v21.2.9
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.7
3
+ * @license Angular v21.2.9
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.7
3
+ * @license Angular v21.2.9
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.7
3
+ * @license Angular v21.2.9
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.7
3
+ * @license Angular v21.2.9
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.7
3
+ * @license Angular v21.2.9
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.7
3
+ * @license Angular v21.2.9
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.7
3
+ * @license Angular v21.2.9
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 v21.2.7
3
+ * @license Angular v21.2.9
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.7
3
+ * @license Angular v21.2.9
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.7
3
+ * @license Angular v21.2.9
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -9,7 +9,7 @@
9
9
  var assert = require('assert');
10
10
  var ts = require('typescript');
11
11
  var migrations = require('@angular/compiler-cli/private/migrations');
12
- var index = require('./index-BtLcQH8g.cjs');
12
+ var index = require('./index-DADA7AvC.cjs');
13
13
  var project_paths = require('./project_paths-D2V-Uh2L.cjs');
14
14
  var leading_space = require('./leading_space-BTPRV0wu.cjs');
15
15
  require('@angular/compiler-cli');
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v21.2.7
3
+ * @license Angular v21.2.9
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.7
3
+ * @license Angular v21.2.9
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.7
3
+ * @license Angular v21.2.9
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.7
3
+ * @license Angular v21.2.9
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.7
3
+ * @license Angular v21.2.9
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.7
3
+ * @license Angular v21.2.9
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -13,7 +13,7 @@ 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 index = require('./index-BtLcQH8g.cjs');
16
+ var index = require('./index-DADA7AvC.cjs');
17
17
  require('@angular-devkit/core');
18
18
  require('node:path/posix');
19
19
  require('@angular-devkit/schematics');
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v21.2.7
3
+ * @license Angular v21.2.9
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.7
3
+ * @license Angular v21.2.9
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.7
3
+ * @license Angular v21.2.9
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.7
3
+ * @license Angular v21.2.9
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.7
3
+ * @license Angular v21.2.9
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.7
3
+ * @license Angular v21.2.9
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.7
3
+ * @license Angular v21.2.9
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.7
3
+ * @license Angular v21.2.9
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.7
3
+ * @license Angular v21.2.9
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -1,18 +1,18 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v21.2.7
3
+ * @license Angular v21.2.9
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
7
7
  'use strict';
8
8
 
9
- var migrate_ts_type_references = require('./migrate_ts_type_references-MWoZx-Cb.cjs');
9
+ var migrate_ts_type_references = require('./migrate_ts_type_references-CJvpTtkh.cjs');
10
10
  var ts = require('typescript');
11
11
  require('@angular/compiler-cli');
12
12
  var migrations = require('@angular/compiler-cli/private/migrations');
13
13
  require('node:path');
14
14
  var project_paths = require('./project_paths-D2V-Uh2L.cjs');
15
- var index = require('./index-BtLcQH8g.cjs');
15
+ var index = require('./index-DADA7AvC.cjs');
16
16
  var assert = require('assert');
17
17
  var apply_import_manager = require('./apply_import_manager-CxA_YYgB.cjs');
18
18
  require('@angular-devkit/core');
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v21.2.7
3
+ * @license Angular v21.2.9
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -12,9 +12,9 @@ require('@angular/compiler-cli');
12
12
  require('node:path');
13
13
  var project_paths = require('./project_paths-D2V-Uh2L.cjs');
14
14
  var apply_import_manager = require('./apply_import_manager-CxA_YYgB.cjs');
15
- var migrate_ts_type_references = require('./migrate_ts_type_references-MWoZx-Cb.cjs');
15
+ var migrate_ts_type_references = require('./migrate_ts_type_references-CJvpTtkh.cjs');
16
16
  var assert = require('assert');
17
- var index = require('./index-BtLcQH8g.cjs');
17
+ var index = require('./index-DADA7AvC.cjs');
18
18
  var compiler = require('@angular/compiler');
19
19
  require('@angular-devkit/core');
20
20
  require('node:path/posix');
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v21.2.7
3
+ * @license Angular v21.2.9
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -19,9 +19,9 @@ require('@angular-devkit/core');
19
19
  require('node:path/posix');
20
20
  require('./project_tsconfig_paths-DkkMibv-.cjs');
21
21
  require('./apply_import_manager-CxA_YYgB.cjs');
22
- require('./migrate_ts_type_references-MWoZx-Cb.cjs');
22
+ require('./migrate_ts_type_references-CJvpTtkh.cjs');
23
23
  require('assert');
24
- require('./index-BtLcQH8g.cjs');
24
+ require('./index-DADA7AvC.cjs');
25
25
  require('@angular/compiler');
26
26
  require('./leading_space-BTPRV0wu.cjs');
27
27
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v21.2.7
3
+ * @license Angular v21.2.9
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -325,7 +325,7 @@ function toStandalone(sourceFiles, program, printer, fileImportRemapper, declara
325
325
  testObjects.forEach((obj) => testObjectsToMigrate.add(obj));
326
326
  }
327
327
  for (const declaration of declarations) {
328
- convertNgModuleDeclarationToStandalone(declaration, declarations, tracker, templateTypeChecker, declarationImportRemapper);
328
+ convertNgModuleDeclarationToStandalone(declaration, declarations, tracker, templateTypeChecker, program.getTsProgram(), declarationImportRemapper);
329
329
  }
330
330
  for (const node of modulesToMigrate) {
331
331
  migrateNgModuleClass(node, declarations, tracker, typeChecker, templateTypeChecker);
@@ -341,12 +341,12 @@ function toStandalone(sourceFiles, program, printer, fileImportRemapper, declara
341
341
  * @param typeChecker
342
342
  * @param importRemapper
343
343
  */
344
- function convertNgModuleDeclarationToStandalone(decl, allDeclarations, tracker, typeChecker, importRemapper) {
344
+ function convertNgModuleDeclarationToStandalone(decl, allDeclarations, tracker, typeChecker, program, importRemapper) {
345
345
  const directiveMeta = typeChecker.getDirectiveMetadata(decl);
346
346
  if (directiveMeta && directiveMeta.decorator && !directiveMeta.isStandalone) {
347
347
  let decorator = markDecoratorAsStandalone(directiveMeta.decorator);
348
348
  if (directiveMeta.isComponent) {
349
- const importsToAdd = getComponentImportExpressions(decl, allDeclarations, tracker, typeChecker, importRemapper);
349
+ const importsToAdd = getComponentImportExpressions(decl, allDeclarations, tracker, typeChecker, program, importRemapper);
350
350
  if (importsToAdd.length > 0) {
351
351
  const hasTrailingComma = importsToAdd.length > 2 &&
352
352
  !!extractMetadataLiteral(directiveMeta.decorator)?.properties.hasTrailingComma;
@@ -373,8 +373,8 @@ function convertNgModuleDeclarationToStandalone(decl, allDeclarations, tracker,
373
373
  * @param typeChecker
374
374
  * @param importRemapper
375
375
  */
376
- function getComponentImportExpressions(decl, allDeclarations, tracker, typeChecker, importRemapper) {
377
- const templateDependencies = findTemplateDependencies(decl, typeChecker);
376
+ function getComponentImportExpressions(decl, allDeclarations, tracker, typeChecker, program, importRemapper) {
377
+ const templateDependencies = findTemplateDependencies(decl, typeChecker, program);
378
378
  const usedDependenciesInMigration = new Set(templateDependencies.filter((dep) => allDeclarations.has(dep.node)));
379
379
  const seenImports = new Set();
380
380
  const resolvedDependencies = [];
@@ -696,23 +696,29 @@ function findTestObjectsToMigrate(sourceFile, typeChecker) {
696
696
  * @param decl Component in whose template we're looking for dependencies.
697
697
  * @param typeChecker
698
698
  */
699
- function findTemplateDependencies(decl, typeChecker) {
699
+ function findTemplateDependencies(decl, typeChecker, program) {
700
700
  const results = [];
701
701
  const usedDirectives = typeChecker.getUsedDirectives(decl);
702
702
  const usedPipes = typeChecker.getUsedPipes(decl);
703
703
  if (usedDirectives !== null) {
704
704
  for (const dir of usedDirectives) {
705
- if (ts.isClassDeclaration(dir.ref.node)) {
706
- results.push(dir.ref);
707
- }
705
+ results.push(dir.ref);
708
706
  }
709
707
  }
710
708
  if (usedPipes !== null) {
711
709
  const potentialPipes = typeChecker.getPotentialPipes(decl);
712
710
  for (const pipe of potentialPipes) {
713
- if (ts.isClassDeclaration(pipe.ref.node) &&
714
- usedPipes.some((current) => pipe.name === current)) {
715
- results.push(pipe.ref);
711
+ const sourceFile = program.getSourceFile(pipe.ref.filePath);
712
+ const node = sourceFile ? findTightestNode(sourceFile, pipe.ref.position) : null;
713
+ const classDecl = node ? nodes.closestNode(node, ts.isClassDeclaration) : null;
714
+ if (classDecl && usedPipes.some((current) => pipe.name === current)) {
715
+ const owningModule = pipe.ref.moduleSpecifier
716
+ ? {
717
+ specifier: pipe.ref.moduleSpecifier,
718
+ resolutionContext: decl.getSourceFile().fileName,
719
+ }
720
+ : null;
721
+ results.push(new migrations.Reference(classDecl, owningModule));
716
722
  }
717
723
  }
718
724
  }
@@ -906,6 +912,12 @@ function isStandaloneDeclaration(node, declarationsInMigration, templateTypeChec
906
912
  const metadata = templateTypeChecker.getDirectiveMetadata(node) || templateTypeChecker.getPipeMetadata(node);
907
913
  return metadata != null && metadata.isStandalone;
908
914
  }
915
+ function findTightestNode(node, position) {
916
+ if (position < node.getStart() || position > node.getEnd()) {
917
+ return undefined;
918
+ }
919
+ return node.forEachChild((c) => findTightestNode(c, position)) ?? node;
920
+ }
909
921
 
910
922
  function pruneNgModules(program, host, basePath, rootFileNames, sourceFiles, printer, importRemapper, referenceLookupExcludedFiles, declarationImportRemapper) {
911
923
  const filesToRemove = new Set();
@@ -944,7 +956,7 @@ function pruneNgModules(program, host, basePath, rootFileNames, sourceFiles, pri
944
956
  }
945
957
  node.forEachChild(walk);
946
958
  });
947
- replaceInComponentImportsArray(componentImportArrays, classesToRemove, removalLocations, tracker, typeChecker, templateTypeChecker, declarationImportRemapper);
959
+ replaceInComponentImportsArray(componentImportArrays, classesToRemove, removalLocations, tracker, typeChecker, templateTypeChecker, tsProgram, declarationImportRemapper);
948
960
  replaceInTestImportsArray(testArrays, removalLocations, classesToRemove, tracker, typeChecker, templateTypeChecker, declarationImportRemapper);
949
961
  // We collect all the places where we need to remove references first before generating the
950
962
  // removal instructions since we may have to remove multiple references from one node.
@@ -1056,14 +1068,14 @@ function collectChangeLocations(ngModule, removalLocations, componentImportArray
1056
1068
  * @param templateTypeChecker
1057
1069
  * @param importRemapper
1058
1070
  */
1059
- function replaceInComponentImportsArray(componentImportArrays, classesToRemove, removalLocations, tracker, typeChecker, templateTypeChecker, importRemapper) {
1071
+ function replaceInComponentImportsArray(componentImportArrays, classesToRemove, removalLocations, tracker, typeChecker, templateTypeChecker, program, importRemapper) {
1060
1072
  for (const [array, toReplace] of componentImportArrays.getEntries()) {
1061
1073
  const closestClass = nodes.closestNode(array, ts.isClassDeclaration);
1062
1074
  if (!closestClass) {
1063
1075
  continue;
1064
1076
  }
1065
1077
  const replacements = new UniqueItemTracker();
1066
- const usedImports = new Set(findTemplateDependencies(closestClass, templateTypeChecker).map((ref) => ref.node));
1078
+ const usedImports = new Set(findTemplateDependencies(closestClass, templateTypeChecker, program).map((ref) => ref.node));
1067
1079
  const nodesToRemove = new Set();
1068
1080
  for (const node of toReplace) {
1069
1081
  const moduleDecl = findClassDeclaration(node, typeChecker);
@@ -1460,7 +1472,7 @@ function toStandaloneBootstrap(program, host, basePath, rootFileNames, sourceFil
1460
1472
  // The previous migrations explicitly skip over bootstrapped
1461
1473
  // declarations so we have to migrate them now.
1462
1474
  for (const declaration of allDeclarations) {
1463
- convertNgModuleDeclarationToStandalone(declaration, allDeclarations, tracker, templateTypeChecker, declarationImportRemapper);
1475
+ convertNgModuleDeclarationToStandalone(declaration, allDeclarations, tracker, templateTypeChecker, program.getTsProgram(), declarationImportRemapper);
1464
1476
  }
1465
1477
  migrateTestDeclarations(testObjects, allDeclarations, tracker, templateTypeChecker, typeChecker);
1466
1478
  return tracker.recordChanges();
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v21.2.7
3
+ * @license Angular v21.2.9
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v21.2.7
2
+ * @license Angular v21.2.9
3
3
  * (c) 2010-2026 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v21.2.7
2
+ * @license Angular v21.2.9
3
3
  * (c) 2010-2026 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v21.2.7
2
+ * @license Angular v21.2.9
3
3
  * (c) 2010-2026 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v21.2.7
2
+ * @license Angular v21.2.9
3
3
  * (c) 2010-2026 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v21.2.7
2
+ * @license Angular v21.2.9
3
3
  * (c) 2010-2026 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v21.2.7
2
+ * @license Angular v21.2.9
3
3
  * (c) 2010-2026 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v21.2.7
2
+ * @license Angular v21.2.9
3
3
  * (c) 2010-2026 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
package/types/core.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v21.2.7
2
+ * @license Angular v21.2.9
3
3
  * (c) 2010-2026 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
@@ -3465,7 +3465,7 @@ declare function noSideEffects<T>(fn: () => T): T;
3465
3465
  *
3466
3466
  * Reference to the current application is provided as a parameter.
3467
3467
  *
3468
- * See ["Bootstrapping"](guide/ngmodules/bootstrapping).
3468
+ * See ["Bootstrapping"](/guide/ngmodules/overview#bootstrapping-an-application).
3469
3469
  *
3470
3470
  * @usageNotes
3471
3471
  * The example below uses `ApplicationRef.bootstrap()` to render the
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v21.2.7
2
+ * @license Angular v21.2.9
3
3
  * (c) 2010-2026 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v21.2.7
2
+ * @license Angular v21.2.9
3
3
  * (c) 2010-2026 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v21.2.7
2
+ * @license Angular v21.2.9
3
3
  * (c) 2010-2026 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v21.2.7
2
+ * @license Angular v21.2.9
3
3
  * (c) 2010-2026 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */