@angular/core 20.2.0-next.2 → 20.2.0-next.4

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 (61) hide show
  1. package/api.d.d.ts +2 -2
  2. package/chrome_dev_tools_performance.d.d.ts +1 -1
  3. package/discovery.d.d.ts +8 -1
  4. package/event_dispatcher.d.d.ts +1 -1
  5. package/fesm2022/attribute.mjs +1 -1
  6. package/fesm2022/core.mjs +35 -10
  7. package/fesm2022/core.mjs.map +1 -1
  8. package/fesm2022/debug_node.mjs +254 -141
  9. package/fesm2022/debug_node.mjs.map +1 -1
  10. package/fesm2022/not_found.mjs +1 -1
  11. package/fesm2022/primitives/di.mjs +1 -1
  12. package/fesm2022/primitives/event-dispatch.mjs +1 -1
  13. package/fesm2022/primitives/signals.mjs +1 -1
  14. package/fesm2022/resource.mjs +12 -3
  15. package/fesm2022/resource.mjs.map +1 -1
  16. package/fesm2022/root_effect_scheduler.mjs +1 -1
  17. package/fesm2022/root_effect_scheduler.mjs.map +1 -1
  18. package/fesm2022/rxjs-interop.mjs +1 -1
  19. package/fesm2022/signal.mjs +154 -118
  20. package/fesm2022/signal.mjs.map +1 -1
  21. package/fesm2022/testing.mjs +19 -2
  22. package/fesm2022/testing.mjs.map +1 -1
  23. package/fesm2022/untracked.mjs +1 -1
  24. package/fesm2022/weak_ref.mjs +1 -1
  25. package/graph.d.d.ts +20 -33
  26. package/index.d.ts +32 -7
  27. package/package.json +2 -2
  28. package/primitives/di/index.d.ts +1 -1
  29. package/primitives/event-dispatch/index.d.ts +1 -1
  30. package/primitives/signals/index.d.ts +1 -1
  31. package/rxjs-interop/index.d.ts +1 -1
  32. package/schematics/bundles/{apply_import_manager-Bkosyy2x.cjs → apply_import_manager-Doo9rveC.cjs} +4 -4
  33. package/schematics/bundles/cleanup-unused-imports.cjs +7 -8
  34. package/schematics/bundles/{compiler_host-CSrf1kFh.cjs → compiler_host-Dtf8fsIr.cjs} +3 -3
  35. package/schematics/bundles/control-flow-migration.cjs +18 -19
  36. package/schematics/bundles/document-core.cjs +6 -7
  37. package/schematics/bundles/imports-CIX-JgAN.cjs +1 -1
  38. package/schematics/bundles/{index-DwmX8Ifa.cjs → index-B10puRUY.cjs} +49 -49
  39. package/schematics/bundles/{index-DYbdsCUu.cjs → index-DHoQSprx.cjs} +1268 -1264
  40. package/schematics/bundles/inject-flags.cjs +6 -7
  41. package/schematics/bundles/inject-migration.cjs +6 -7
  42. package/schematics/bundles/leading_space-D9nQ8UQC.cjs +1 -1
  43. package/schematics/bundles/{migrate_ts_type_references-C7NB9fZH.cjs → migrate_ts_type_references-Cr2742bs.cjs} +14 -14
  44. package/schematics/bundles/ng_decorators-B5HCqr20.cjs +1 -1
  45. package/schematics/bundles/nodes-B16H9JUd.cjs +1 -1
  46. package/schematics/bundles/output-migration.cjs +20 -21
  47. package/schematics/bundles/{project_paths-5CoqAjNK.cjs → project_paths-CrqHneU0.cjs} +16 -17
  48. package/schematics/bundles/{checker-Cfq29XaS.cjs → project_tsconfig_paths-BGhHq5-d.cjs} +166 -30
  49. package/schematics/bundles/property_name-BBwFuqMe.cjs +1 -1
  50. package/schematics/bundles/route-lazy-loading.cjs +6 -7
  51. package/schematics/bundles/self-closing-tags-migration.cjs +10 -11
  52. package/schematics/bundles/signal-input-migration.cjs +21 -22
  53. package/schematics/bundles/signal-queries-migration.cjs +31 -32
  54. package/schematics/bundles/signals.cjs +8 -9
  55. package/schematics/bundles/standalone-migration.cjs +10 -11
  56. package/schematics/bundles/symbol-VPWguRxr.cjs +1 -1
  57. package/schematics/bundles/test-bed-get.cjs +4 -5
  58. package/signal.d.d.ts +1 -1
  59. package/testing/index.d.ts +6 -1
  60. package/weak_ref.d.d.ts +1 -1
  61. package/schematics/bundles/project_tsconfig_paths-CDVxT6Ov.cjs +0 -90
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.2.0-next.2
3
+ * @license Angular v20.2.0-next.4
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -8,12 +8,12 @@
8
8
 
9
9
  var ts = require('typescript');
10
10
  require('os');
11
- var checker = require('./checker-Cfq29XaS.cjs');
12
- require('./index-DYbdsCUu.cjs');
11
+ var project_tsconfig_paths = require('./project_tsconfig_paths-BGhHq5-d.cjs');
12
+ require('./index-DHoQSprx.cjs');
13
13
  require('path');
14
14
  require('node:path');
15
- var project_paths = require('./project_paths-5CoqAjNK.cjs');
16
- var apply_import_manager = require('./apply_import_manager-Bkosyy2x.cjs');
15
+ var project_paths = require('./project_paths-CrqHneU0.cjs');
16
+ var apply_import_manager = require('./apply_import_manager-Doo9rveC.cjs');
17
17
  var imports = require('./imports-CIX-JgAN.cjs');
18
18
  require('@angular-devkit/core');
19
19
  require('node:path/posix');
@@ -21,7 +21,6 @@ require('fs');
21
21
  require('module');
22
22
  require('url');
23
23
  require('@angular-devkit/schematics');
24
- require('./project_tsconfig_paths-CDVxT6Ov.cjs');
25
24
 
26
25
  /** Mapping between `InjectFlag` enum members to their object literal equvalients. */
27
26
  const FLAGS_TO_FIELDS = {
@@ -42,7 +41,7 @@ class InjectFlagsMigration extends project_paths.TsurgeFunnelMigration {
42
41
  continue;
43
42
  }
44
43
  const file = project_paths.projectFile(sourceFile, info);
45
- const importManager = new checker.ImportManager();
44
+ const importManager = new project_tsconfig_paths.ImportManager();
46
45
  const importReplacements = [];
47
46
  // Always remove the `InjectFlags` since it has been removed from Angular.
48
47
  // Note that it be better to do this inside of `migrate`, but we don't have AST access there.
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.2.0-next.2
3
+ * @license Angular v20.2.0-next.4
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -8,17 +8,18 @@
8
8
 
9
9
  var schematics = require('@angular-devkit/schematics');
10
10
  var p = require('path');
11
- var compiler_host = require('./compiler_host-CSrf1kFh.cjs');
11
+ var compiler_host = require('./compiler_host-Dtf8fsIr.cjs');
12
12
  var ts = require('typescript');
13
13
  var ng_decorators = require('./ng_decorators-B5HCqr20.cjs');
14
14
  var imports = require('./imports-CIX-JgAN.cjs');
15
15
  var nodes = require('./nodes-B16H9JUd.cjs');
16
16
  var leading_space = require('./leading_space-D9nQ8UQC.cjs');
17
- require('./checker-Cfq29XaS.cjs');
17
+ var project_tsconfig_paths = require('./project_tsconfig_paths-BGhHq5-d.cjs');
18
18
  require('os');
19
19
  require('fs');
20
20
  require('module');
21
21
  require('url');
22
+ require('@angular-devkit/core');
22
23
 
23
24
  /*!
24
25
  * @license
@@ -1243,12 +1244,10 @@ function isStringType(node, checker) {
1243
1244
 
1244
1245
  function migrate(options) {
1245
1246
  return async (tree) => {
1247
+ const { buildPaths, testPaths } = await project_tsconfig_paths.getProjectTsConfigPaths(tree);
1246
1248
  const basePath = process.cwd();
1249
+ const allPaths = [...buildPaths, ...testPaths];
1247
1250
  const pathToMigrate = compiler_host.normalizePath(p.join(basePath, options.path));
1248
- let allPaths = [];
1249
- if (pathToMigrate.trim() !== '') {
1250
- allPaths.push(pathToMigrate);
1251
- }
1252
1251
  if (!allPaths.length) {
1253
1252
  throw new schematics.SchematicsException('Could not find any tsconfig file. Cannot run the inject migration.');
1254
1253
  }
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.2.0-next.2
3
+ * @license Angular v20.2.0-next.4
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -1,19 +1,19 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.2.0-next.2
3
+ * @license Angular v20.2.0-next.4
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-Cfq29XaS.cjs');
9
+ var project_tsconfig_paths = require('./project_tsconfig_paths-BGhHq5-d.cjs');
10
10
  var ts = require('typescript');
11
11
  require('os');
12
12
  var assert = require('assert');
13
- var index = require('./index-DwmX8Ifa.cjs');
14
- var project_paths = require('./project_paths-5CoqAjNK.cjs');
13
+ var index = require('./index-B10puRUY.cjs');
14
+ var project_paths = require('./project_paths-CrqHneU0.cjs');
15
15
  var leading_space = require('./leading_space-D9nQ8UQC.cjs');
16
- require('./index-DYbdsCUu.cjs');
16
+ require('./index-DHoQSprx.cjs');
17
17
  require('path');
18
18
  require('node:path');
19
19
 
@@ -122,24 +122,24 @@ class SpyOnFieldPattern {
122
122
  * In addition, spying onto an input may be problematic- so we skip migrating
123
123
  * such.
124
124
  */
125
- function checkIncompatiblePatterns(inheritanceGraph, checker$1, groupedTsAstVisitor, fields, getAllClassesWithKnownFields) {
125
+ function checkIncompatiblePatterns(inheritanceGraph, checker, groupedTsAstVisitor, fields, getAllClassesWithKnownFields) {
126
126
  const inputClassSymbolsToClass = new Map();
127
127
  for (const knownFieldClass of getAllClassesWithKnownFields()) {
128
- const classSymbol = checker$1.getTypeAtLocation(knownFieldClass).symbol;
128
+ const classSymbol = checker.getTypeAtLocation(knownFieldClass).symbol;
129
129
  assert(classSymbol != null, 'Expected a symbol to exist for the container of known field class.');
130
130
  assert(classSymbol.valueDeclaration !== undefined, 'Expected declaration to exist for known field class.');
131
131
  assert(ts.isClassDeclaration(classSymbol.valueDeclaration), 'Expected declaration to be a class.');
132
132
  // track class symbol for derived class checks.
133
133
  inputClassSymbolsToClass.set(classSymbol, classSymbol.valueDeclaration);
134
134
  }
135
- const spyOnPattern = new SpyOnFieldPattern(checker$1, fields);
135
+ const spyOnPattern = new SpyOnFieldPattern(checker, fields);
136
136
  const visitor = (node) => {
137
137
  // Check for manual class instantiations.
138
- if (ts.isNewExpression(node) && ts.isIdentifier(checker.unwrapExpression(node.expression))) {
139
- let newTarget = checker$1.getSymbolAtLocation(checker.unwrapExpression(node.expression));
138
+ if (ts.isNewExpression(node) && ts.isIdentifier(project_tsconfig_paths.unwrapExpression(node.expression))) {
139
+ let newTarget = checker.getSymbolAtLocation(project_tsconfig_paths.unwrapExpression(node.expression));
140
140
  // Plain identifier references can point to alias symbols (e.g. imports).
141
141
  if (newTarget !== undefined && newTarget.flags & ts.SymbolFlags.Alias) {
142
- newTarget = checker$1.getAliasedSymbol(newTarget);
142
+ newTarget = checker.getAliasedSymbol(newTarget);
143
143
  }
144
144
  if (newTarget && inputClassSymbolsToClass.has(newTarget)) {
145
145
  fields.markClassIncompatible(inputClassSymbolsToClass.get(newTarget), exports.ClassIncompatibilityReason.ClassManuallyInstantiated);
@@ -155,10 +155,10 @@ function checkIncompatiblePatterns(inheritanceGraph, checker$1, groupedTsAstVisi
155
155
  problematicReferencesCheck: if (insidePropertyDeclaration !== null &&
156
156
  ts.isIdentifier(node) &&
157
157
  insidePropertyDeclaration.parent.heritageClauses !== undefined) {
158
- let newTarget = checker$1.getSymbolAtLocation(checker.unwrapExpression(node));
158
+ let newTarget = checker.getSymbolAtLocation(project_tsconfig_paths.unwrapExpression(node));
159
159
  // Plain identifier references can point to alias symbols (e.g. imports).
160
160
  if (newTarget !== undefined && newTarget.flags & ts.SymbolFlags.Alias) {
161
- newTarget = checker$1.getAliasedSymbol(newTarget);
161
+ newTarget = checker.getAliasedSymbol(newTarget);
162
162
  }
163
163
  if (newTarget && inputClassSymbolsToClass.has(newTarget)) {
164
164
  const memberName = index.getMemberName(insidePropertyDeclaration);
@@ -384,7 +384,7 @@ function checkInheritanceOfKnownFields(inheritanceGraph, metaRegistry, fields, o
384
384
  if (metaRegistry !== null) {
385
385
  for (const derivedClasses of inheritanceGraph.traceDerivedClasses(inputClass)) {
386
386
  const derivedMeta = ts.isClassDeclaration(derivedClasses) && derivedClasses.name !== undefined
387
- ? metaRegistry.getDirectiveMetadata(new checker.Reference(derivedClasses))
387
+ ? metaRegistry.getDirectiveMetadata(new project_tsconfig_paths.Reference(derivedClasses))
388
388
  : null;
389
389
  if (derivedMeta !== null && derivedMeta.inputFieldNamesFromMetadataArray !== null) {
390
390
  derivedMeta.inputFieldNamesFromMetadataArray.forEach((b) => inputFieldNamesFromMetadataArray.add(b));
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.2.0-next.2
3
+ * @license Angular v20.2.0-next.4
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.2.0-next.2
3
+ * @license Angular v20.2.0-next.4
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.2.0-next.2
3
+ * @license Angular v20.2.0-next.4
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -8,20 +8,19 @@
8
8
 
9
9
  var ts = require('typescript');
10
10
  require('os');
11
- var checker = require('./checker-Cfq29XaS.cjs');
12
- var index$1 = require('./index-DYbdsCUu.cjs');
11
+ var project_tsconfig_paths = require('./project_tsconfig_paths-BGhHq5-d.cjs');
12
+ var index$1 = require('./index-DHoQSprx.cjs');
13
13
  require('path');
14
14
  require('node:path');
15
- var project_paths = require('./project_paths-5CoqAjNK.cjs');
16
- var apply_import_manager = require('./apply_import_manager-Bkosyy2x.cjs');
17
- var index = require('./index-DwmX8Ifa.cjs');
15
+ var project_paths = require('./project_paths-CrqHneU0.cjs');
16
+ var apply_import_manager = require('./apply_import_manager-Doo9rveC.cjs');
17
+ var index = require('./index-B10puRUY.cjs');
18
18
  require('@angular-devkit/core');
19
19
  require('node:path/posix');
20
20
  require('fs');
21
21
  require('module');
22
22
  require('url');
23
23
  require('@angular-devkit/schematics');
24
- require('./project_tsconfig_paths-CDVxT6Ov.cjs');
25
24
 
26
25
  function isOutputDeclarationEligibleForMigration(node) {
27
26
  return (node.initializer !== undefined &&
@@ -68,7 +67,7 @@ function isOutputDeclaration(node, reflector, dtsReader) {
68
67
  node.parent.name === undefined) {
69
68
  return false;
70
69
  }
71
- const ref = new checker.Reference(node.parent);
70
+ const ref = new project_tsconfig_paths.Reference(node.parent);
72
71
  const directiveMeta = dtsReader.getDirectiveMetadata(ref);
73
72
  return !!directiveMeta?.outputs.getByClassPropertyName(node.name.text);
74
73
  }
@@ -85,7 +84,7 @@ function getTargetPropertyDeclaration(targetSymbol) {
85
84
  /** Returns Angular `@Output` decorator or null when a given property declaration is not an @Output */
86
85
  function getOutputDecorator(node, reflector) {
87
86
  const decorators = reflector.getDecoratorsOfDeclaration(node);
88
- const ngDecorators = decorators !== null ? checker.getAngularDecorators(decorators, ['Output'], /* isCore */ false) : [];
87
+ const ngDecorators = decorators !== null ? project_tsconfig_paths.getAngularDecorators(decorators, ['Output'], /* isCore */ false) : [];
89
88
  return ngDecorators.length > 0 ? ngDecorators[0] : null;
90
89
  }
91
90
  // THINK: this utility + type is not specific to @Output, really, maybe move it to tsurge?
@@ -115,7 +114,7 @@ function checkNonTsReferenceAccessesField(ref, fieldName) {
115
114
  if (ref.from.read !== readFromPath) {
116
115
  return null;
117
116
  }
118
- if (!(parentRead instanceof checker.PropertyRead) || parentRead.name !== fieldName) {
117
+ if (!(parentRead instanceof project_tsconfig_paths.PropertyRead) || parentRead.name !== fieldName) {
119
118
  return null;
120
119
  }
121
120
  return parentRead;
@@ -171,7 +170,7 @@ function calculateDeclarationReplacement(info, node, aliasParam) {
171
170
  function calculateImportReplacements(info, sourceFiles) {
172
171
  const importReplacements = {};
173
172
  for (const sf of sourceFiles) {
174
- const importManager = new checker.ImportManager();
173
+ const importManager = new project_tsconfig_paths.ImportManager();
175
174
  const addOnly = [];
176
175
  const addRemove = [];
177
176
  const file = project_paths.projectFile(sf, info);
@@ -206,7 +205,7 @@ function calculateCompleteCallReplacement(info, node) {
206
205
  function calculatePipeCallReplacement(info, node) {
207
206
  if (ts.isPropertyAccessExpression(node.expression)) {
208
207
  const sf = node.getSourceFile();
209
- const importManager = new checker.ImportManager();
208
+ const importManager = new project_tsconfig_paths.ImportManager();
210
209
  const outputToObservableIdent = importManager.addImport({
211
210
  requestedFile: sf,
212
211
  exportModuleSpecifier: '@angular/core/rxjs-interop',
@@ -256,10 +255,10 @@ class OutputMigration extends project_paths.TsurgeFunnelMigration {
256
255
  const problematicUsages = {};
257
256
  let problematicDeclarationCount = 0;
258
257
  const filesWithOutputDeclarations = new Set();
259
- const checker$1 = program.getTypeChecker();
260
- const reflector = new checker.TypeScriptReflectionHost(checker$1);
261
- const dtsReader = new index$1.DtsMetadataReader(checker$1, reflector);
262
- const evaluator = new index$1.PartialEvaluator(reflector, checker$1, null);
258
+ const checker = program.getTypeChecker();
259
+ const reflector = new project_tsconfig_paths.TypeScriptReflectionHost(checker);
260
+ const dtsReader = new index$1.DtsMetadataReader(checker, reflector);
261
+ const evaluator = new index$1.PartialEvaluator(reflector, checker, null);
263
262
  const resourceLoader = info.ngCompiler?.['resourceManager'] ?? null;
264
263
  // Pre-analyze the program and get access to the template type checker.
265
264
  // If we are processing a non-Angular target, there is no template info.
@@ -320,7 +319,7 @@ class OutputMigration extends project_paths.TsurgeFunnelMigration {
320
319
  }
321
320
  // detect .next usages that should be migrated to .emit
322
321
  if (isPotentialNextCallUsage(node) && ts.isPropertyAccessExpression(node.expression)) {
323
- const propertyDeclaration = isTargetOutputDeclaration(node.expression.expression, checker$1, reflector, dtsReader);
322
+ const propertyDeclaration = isTargetOutputDeclaration(node.expression.expression, checker, reflector, dtsReader);
324
323
  if (propertyDeclaration !== null) {
325
324
  const id = getUniqueIdForProperty(info, propertyDeclaration);
326
325
  const outputFile = project_paths.projectFile(node.getSourceFile(), info);
@@ -329,7 +328,7 @@ class OutputMigration extends project_paths.TsurgeFunnelMigration {
329
328
  }
330
329
  // detect .complete usages that should be removed
331
330
  if (isPotentialCompleteCallUsage(node) && ts.isPropertyAccessExpression(node.expression)) {
332
- const propertyDeclaration = isTargetOutputDeclaration(node.expression.expression, checker$1, reflector, dtsReader);
331
+ const propertyDeclaration = isTargetOutputDeclaration(node.expression.expression, checker, reflector, dtsReader);
333
332
  if (propertyDeclaration !== null) {
334
333
  const id = getUniqueIdForProperty(info, propertyDeclaration);
335
334
  const outputFile = project_paths.projectFile(node.getSourceFile(), info);
@@ -341,14 +340,14 @@ class OutputMigration extends project_paths.TsurgeFunnelMigration {
341
340
  }
342
341
  }
343
342
  }
344
- addCommentForEmptyEmit(node, info, checker$1, reflector, dtsReader, outputFieldReplacements);
343
+ addCommentForEmptyEmit(node, info, checker, reflector, dtsReader, outputFieldReplacements);
345
344
  // detect imports of test runners
346
345
  if (isTestRunnerImport(node)) {
347
346
  isTestFile = true;
348
347
  }
349
348
  // detect unsafe access of the output property
350
349
  if (isPotentialPipeCallUsage(node) && ts.isPropertyAccessExpression(node.expression)) {
351
- const propertyDeclaration = isTargetOutputDeclaration(node.expression.expression, checker$1, reflector, dtsReader);
350
+ const propertyDeclaration = isTargetOutputDeclaration(node.expression.expression, checker, reflector, dtsReader);
352
351
  if (propertyDeclaration !== null) {
353
352
  const id = getUniqueIdForProperty(info, propertyDeclaration);
354
353
  if (isTestFile) {
@@ -369,7 +368,7 @@ class OutputMigration extends project_paths.TsurgeFunnelMigration {
369
368
  }
370
369
  // take care of the references in templates and host bindings
371
370
  const referenceResult = { references: [] };
372
- const { visitor: templateHostRefVisitor } = index.createFindAllSourceFileReferencesVisitor(info, checker$1, reflector, resourceLoader, evaluator, templateTypeChecker, knownFields, null, // TODO: capture known output names as an optimization
371
+ const { visitor: templateHostRefVisitor } = index.createFindAllSourceFileReferencesVisitor(info, checker, reflector, resourceLoader, evaluator, templateTypeChecker, knownFields, null, // TODO: capture known output names as an optimization
373
372
  referenceResult);
374
373
  // calculate template / host binding replacements
375
374
  for (const sf of sourceFiles) {
@@ -1,21 +1,20 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.2.0-next.2
3
+ * @license Angular v20.2.0-next.4
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
7
7
  'use strict';
8
8
 
9
- var index = require('./index-DYbdsCUu.cjs');
9
+ var index = require('./index-DHoQSprx.cjs');
10
10
  var schematics = require('@angular-devkit/schematics');
11
11
  var core = require('@angular-devkit/core');
12
12
  var posixPath = require('node:path/posix');
13
13
  var os = require('os');
14
14
  var ts = require('typescript');
15
- var checker = require('./checker-Cfq29XaS.cjs');
15
+ var project_tsconfig_paths = require('./project_tsconfig_paths-BGhHq5-d.cjs');
16
16
  require('path');
17
17
  var path = require('node:path');
18
- var project_tsconfig_paths = require('./project_tsconfig_paths-CDVxT6Ov.cjs');
19
18
 
20
19
  function _interopNamespaceDefault(e) {
21
20
  var n = Object.create(null);
@@ -59,7 +58,7 @@ class NgtscCompilerHost {
59
58
  return this.fs.getDefaultLibLocation();
60
59
  }
61
60
  writeFile(fileName, data, writeByteOrderMark, onError, sourceFiles) {
62
- const path = checker.absoluteFrom(fileName);
61
+ const path = project_tsconfig_paths.absoluteFrom(fileName);
63
62
  this.fs.ensureDir(this.fs.dirname(path));
64
63
  this.fs.writeFile(path, data);
65
64
  }
@@ -143,7 +142,7 @@ function createFileSystemTsReadDirectoryFn(fs) {
143
142
  };
144
143
  }
145
144
 
146
- function calcProjectFileAndBasePath(project, host = checker.getFileSystem()) {
145
+ function calcProjectFileAndBasePath(project, host = project_tsconfig_paths.getFileSystem()) {
147
146
  const absProject = host.resolve(project);
148
147
  const projectIsDir = host.lstat(absProject).isDirectory();
149
148
  const projectFile = projectIsDir ? host.join(absProject, 'tsconfig.json') : absProject;
@@ -151,9 +150,9 @@ function calcProjectFileAndBasePath(project, host = checker.getFileSystem()) {
151
150
  const basePath = host.resolve(projectDir);
152
151
  return { projectFile, basePath };
153
152
  }
154
- function readConfiguration(project, existingOptions, host = checker.getFileSystem()) {
153
+ function readConfiguration(project, existingOptions, host = project_tsconfig_paths.getFileSystem()) {
155
154
  try {
156
- const fs = checker.getFileSystem();
155
+ const fs = project_tsconfig_paths.getFileSystem();
157
156
  const readConfigFile = (configFile) => ts.readConfigFile(configFile, (file) => host.readFile(host.resolve(file)));
158
157
  const readAngularCompilerOptions = (configFile, parentOptions = {}) => {
159
158
  const { config, error } = readConfigFile(configFile);
@@ -226,7 +225,7 @@ function readConfiguration(project, existingOptions, host = checker.getFileSyste
226
225
  return { project: '', errors, rootNames: [], options: {}, emitFlags: index.EmitFlags.Default };
227
226
  }
228
227
  }
229
- function createParseConfigHost(host, fs = checker.getFileSystem()) {
228
+ function createParseConfigHost(host, fs = project_tsconfig_paths.getFileSystem()) {
230
229
  return {
231
230
  fileExists: host.exists.bind(host),
232
231
  readDirectory: createFileSystemTsReadDirectoryFn(fs),
@@ -256,7 +255,7 @@ function getExtendedConfigPathWorker(configFile, extendsValue, host, fs) {
256
255
  // Path isn't a rooted or relative path, resolve like a module.
257
256
  const { resolvedModule } = ts.nodeModuleNameResolver(extendsValue, configFile, { moduleResolution: ts.ModuleResolutionKind.Node10, resolveJsonModule: true }, parseConfigHost);
258
257
  if (resolvedModule) {
259
- return checker.absoluteFrom(resolvedModule.resolvedFileName);
258
+ return project_tsconfig_paths.absoluteFrom(resolvedModule.resolvedFileName);
260
259
  }
261
260
  }
262
261
  return null;
@@ -556,7 +555,7 @@ function createBaseProgramInfo(absoluteTsconfigPath, fs, optionOverrides = {}) {
556
555
  // Make sure the FS becomes globally available. Some code paths
557
556
  // of the Angular compiler, or tsconfig parsing aren't leveraging
558
557
  // the specified file system.
559
- checker.setFileSystem(fs);
558
+ project_tsconfig_paths.setFileSystem(fs);
560
559
  const tsconfig = parseTsconfigOrDie(absoluteTsconfigPath, fs);
561
560
  const tsHost = new NgtscCompilerHost(fs, tsconfig.options);
562
561
  // When enabled, use a plain TS program if we are sure it's not
@@ -585,14 +584,14 @@ function getProgramInfoFromBaseInfo(baseInfo) {
585
584
  const fullProgramSourceFiles = [...baseInfo.program.getSourceFiles()];
586
585
  const sourceFiles = fullProgramSourceFiles.filter((f) => !f.isDeclarationFile &&
587
586
  // Note `isShim` will work for the initial program, but for TCB programs, the shims are no longer annotated.
588
- !checker.isShim(f) &&
587
+ !project_tsconfig_paths.isShim(f) &&
589
588
  !f.fileName.endsWith('.ngtypecheck.ts'));
590
589
  // Sort it by length in reverse order (longest first). This speeds up lookups,
591
590
  // since there's no need to keep going through the array once a match is found.
592
- const sortedRootDirs = checker.getRootDirs(baseInfo.host, baseInfo.userOptions).sort((a, b) => b.length - a.length);
591
+ const sortedRootDirs = project_tsconfig_paths.getRootDirs(baseInfo.host, baseInfo.userOptions).sort((a, b) => b.length - a.length);
593
592
  // TODO: Consider also following TS's logic here, finding the common source root.
594
593
  // See: Program#getCommonSourceDirectory.
595
- const primaryRoot = checker.absoluteFrom(baseInfo.userOptions.rootDir ?? sortedRootDirs.at(-1) ?? baseInfo.program.getCurrentDirectory());
594
+ const primaryRoot = project_tsconfig_paths.absoluteFrom(baseInfo.userOptions.rootDir ?? sortedRootDirs.at(-1) ?? baseInfo.program.getCurrentDirectory());
596
595
  return {
597
596
  ...baseInfo,
598
597
  sourceFiles,
@@ -671,7 +670,7 @@ async function runMigrationInDevkit(config) {
671
670
  }
672
671
  const tsconfigPaths = [...buildPaths, ...testPaths];
673
672
  const fs = new DevkitMigrationFilesystem(config.tree);
674
- checker.setFileSystem(fs);
673
+ project_tsconfig_paths.setFileSystem(fs);
675
674
  const migration = config.getMigration(fs);
676
675
  const unitResults = [];
677
676
  const isFunnelMigration = migration instanceof TsurgeFunnelMigration;
@@ -781,7 +780,7 @@ function confirmAsSerializable(data) {
781
780
  * See {@link ProjectFile}.
782
781
  */
783
782
  function projectFile(file, { sortedRootDirs, projectRoot }) {
784
- const fs = checker.getFileSystem();
783
+ const fs = project_tsconfig_paths.getFileSystem();
785
784
  const filePath = fs.resolve(typeof file === 'string' ? file : file.fileName);
786
785
  // Sorted root directories are sorted longest to shortest. First match
787
786
  // is the appropriate root directory for ID computation.
@@ -808,7 +807,7 @@ function projectFile(file, { sortedRootDirs, projectRoot }) {
808
807
  * E.g. `a/b/c` is within `a/b` but not within `a/x`.
809
808
  */
810
809
  function isWithinBasePath(fs, base, path) {
811
- return checker.isLocalRelativePath(fs.relative(base, path));
810
+ return project_tsconfig_paths.isLocalRelativePath(fs.relative(base, path));
812
811
  }
813
812
 
814
813
  exports.Replacement = Replacement;