@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
  */
@@ -12,6 +12,7 @@ var fs$1 = require('fs');
12
12
  var module$1 = require('module');
13
13
  var p = require('path');
14
14
  var url = require('url');
15
+ var core = require('@angular-devkit/core');
15
16
 
16
17
  var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
17
18
  function _interopNamespaceDefault(e) {
@@ -18707,7 +18708,7 @@ class Parser {
18707
18708
  parseAction(input, parseSourceSpan, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
18708
18709
  const errors = [];
18709
18710
  this._checkNoInterpolation(errors, input, parseSourceSpan, interpolationConfig);
18710
- const sourceToLex = this._stripComments(input);
18711
+ const { stripped: sourceToLex } = this._stripComments(input);
18711
18712
  const tokens = this._lexer.tokenize(sourceToLex);
18712
18713
  const ast = new _ParseAST(input, parseSourceSpan, absoluteOffset, tokens, 1 /* ParseFlags.Action */, errors, 0, this._supportsDirectPipeReferences).parseChain();
18713
18714
  return new ASTWithSource(ast, input, getLocation(parseSourceSpan), absoluteOffset, errors);
@@ -18734,7 +18735,7 @@ class Parser {
18734
18735
  }
18735
18736
  _parseBindingAst(input, parseSourceSpan, absoluteOffset, interpolationConfig, errors) {
18736
18737
  this._checkNoInterpolation(errors, input, parseSourceSpan, interpolationConfig);
18737
- const sourceToLex = this._stripComments(input);
18738
+ const { stripped: sourceToLex } = this._stripComments(input);
18738
18739
  const tokens = this._lexer.tokenize(sourceToLex);
18739
18740
  return new _ParseAST(input, parseSourceSpan, absoluteOffset, tokens, 0 /* ParseFlags.None */, errors, 0, this._supportsDirectPipeReferences).parseChain();
18740
18741
  }
@@ -18785,8 +18786,13 @@ class Parser {
18785
18786
  // indexes inside the tokens.
18786
18787
  const expressionSpan = interpolatedTokens?.[i * 2 + 1]?.sourceSpan;
18787
18788
  const expressionText = expressions[i].text;
18788
- const sourceToLex = this._stripComments(expressionText);
18789
+ const { stripped: sourceToLex, hasComments } = this._stripComments(expressionText);
18789
18790
  const tokens = this._lexer.tokenize(sourceToLex);
18791
+ if (hasComments && sourceToLex.trim().length === 0 && tokens.length === 0) {
18792
+ // Empty expressions error are handled futher down, here we only take care of the comment case
18793
+ errors.push(getParseError('Interpolation expression cannot only contain a comment', input, `at column ${expressions[i].start} in`, parseSourceSpan));
18794
+ continue;
18795
+ }
18790
18796
  const ast = new _ParseAST(expressionSpan ? expressionText : input, expressionSpan || parseSourceSpan, absoluteOffset, tokens, 0 /* ParseFlags.None */, errors, offsets[i], this._supportsDirectPipeReferences).parseChain();
18791
18797
  expressionNodes.push(ast);
18792
18798
  }
@@ -18798,7 +18804,7 @@ class Parser {
18798
18804
  * This is used for parsing the switch expression in ICUs.
18799
18805
  */
18800
18806
  parseInterpolationExpression(expression, parseSourceSpan, absoluteOffset) {
18801
- const sourceToLex = this._stripComments(expression);
18807
+ const { stripped: sourceToLex } = this._stripComments(expression);
18802
18808
  const tokens = this._lexer.tokenize(sourceToLex);
18803
18809
  const errors = [];
18804
18810
  const ast = new _ParseAST(expression, parseSourceSpan, absoluteOffset, tokens, 0 /* ParseFlags.None */, errors, 0, this._supportsDirectPipeReferences).parseChain();
@@ -18886,7 +18892,9 @@ class Parser {
18886
18892
  }
18887
18893
  _stripComments(input) {
18888
18894
  const i = this._commentStart(input);
18889
- return i != null ? input.substring(0, i) : input;
18895
+ return i != null
18896
+ ? { stripped: input.substring(0, i), hasComments: true }
18897
+ : { stripped: input, hasComments: false };
18890
18898
  }
18891
18899
  _commentStart(input) {
18892
18900
  let outerQuote = null;
@@ -28138,11 +28146,25 @@ class BindingParser {
28138
28146
  return this._isAllowedAssignmentEvent(ast.args[0]);
28139
28147
  }
28140
28148
  if (ast instanceof PropertyRead || ast instanceof KeyedRead) {
28141
- return true;
28149
+ if (!hasRecursiveSafeReceiver(ast)) {
28150
+ return true;
28151
+ }
28142
28152
  }
28143
28153
  return false;
28144
28154
  }
28145
28155
  }
28156
+ function hasRecursiveSafeReceiver(ast) {
28157
+ if (ast instanceof SafePropertyRead || ast instanceof SafeKeyedRead) {
28158
+ return true;
28159
+ }
28160
+ if (ast instanceof ParenthesizedExpression) {
28161
+ return hasRecursiveSafeReceiver(ast.expression);
28162
+ }
28163
+ if (ast instanceof PropertyRead || ast instanceof KeyedRead || ast instanceof Call) {
28164
+ return hasRecursiveSafeReceiver(ast.receiver);
28165
+ }
28166
+ return false;
28167
+ }
28146
28168
  function isLegacyAnimationLabel(name) {
28147
28169
  return name[0] == '@';
28148
28170
  }
@@ -30775,7 +30797,8 @@ class R3TargetBinder {
30775
30797
  // Bind the host element in a separate scope. Note that it only uses the
30776
30798
  // `TemplateBinder` since directives don't apply inside a host context.
30777
30799
  if (target.host) {
30778
- TemplateBinder.applyWithScope(target.host, Scope$1.apply(target.host), expressions, symbols, nestingLevel, usedPipes, eagerPipes, deferBlocks);
30800
+ directives.set(target.host.node, target.host.directives);
30801
+ TemplateBinder.applyWithScope(target.host.node, Scope$1.apply(target.host.node), expressions, symbols, nestingLevel, usedPipes, eagerPipes, deferBlocks);
30779
30802
  }
30780
30803
  return new R3BoundTarget(target, directives, eagerDirectives, missingDirectives, bindings, references, expressions, symbols, nestingLevel, scopedNodeEntities, usedPipes, eagerPipes, deferBlocks);
30781
30804
  }
@@ -31568,7 +31591,8 @@ class R3BoundTarget {
31568
31591
  }
31569
31592
  if (target instanceof Template ||
31570
31593
  target.node instanceof Component$1 ||
31571
- target.node instanceof Directive$1) {
31594
+ target.node instanceof Directive$1 ||
31595
+ target.node instanceof HostElement) {
31572
31596
  return null;
31573
31597
  }
31574
31598
  return this.referenceTargetToElement(target.node);
@@ -32762,7 +32786,7 @@ function isAttrNode(ast) {
32762
32786
  * @description
32763
32787
  * Entry point for all public APIs of the compiler package.
32764
32788
  */
32765
- new Version('20.2.0-next.2');
32789
+ new Version('20.2.0-next.4');
32766
32790
 
32767
32791
  //////////////////////////////////////
32768
32792
  // THIS FILE HAS GLOBAL SIDE EFFECT //
@@ -33797,7 +33821,7 @@ class NodeJSPathManipulation {
33797
33821
  // G3-ESM-MARKER: G3 uses CommonJS, but externally everything in ESM.
33798
33822
  // CommonJS/ESM interop for determining the current file name and containing dir.
33799
33823
  const isCommonJS = typeof __filename !== 'undefined';
33800
- const currentFileUrl = isCommonJS ? null : (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('checker-Cfq29XaS.cjs', document.baseURI).href));
33824
+ const currentFileUrl = isCommonJS ? null : (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('project_tsconfig_paths-BGhHq5-d.cjs', document.baseURI).href));
33801
33825
  // Note, when this code loads in the browser, `url` may be an empty `{}` due to the Closure shims.
33802
33826
  const currentFileName = isCommonJS
33803
33827
  ? __filename
@@ -45134,7 +45158,7 @@ function generateTypeCheckBlock(env, ref, name, meta, domSchemaChecker, oobRecor
45134
45158
  }
45135
45159
  // Add the host bindings type checking code.
45136
45160
  if (tcb.boundTarget.target.host !== undefined) {
45137
- const hostScope = Scope.forNodes(tcb, null, tcb.boundTarget.target.host, null, null);
45161
+ const hostScope = Scope.forNodes(tcb, null, tcb.boundTarget.target.host.node, null, null);
45138
45162
  statements.push(renderBlockStatements(env, hostScope, createHostBindingsBlockGuard()));
45139
45163
  }
45140
45164
  const body = ts.factory.createBlock(statements);
@@ -45505,6 +45529,7 @@ class TcbDirectiveTypeOpBase extends TcbOp {
45505
45529
  const dirRef = this.dir.ref;
45506
45530
  const rawType = this.tcb.env.referenceType(this.dir.ref);
45507
45531
  let type;
45532
+ let span;
45508
45533
  if (this.dir.isGeneric === false || dirRef.node.typeParameters === undefined) {
45509
45534
  type = rawType;
45510
45535
  }
@@ -45515,9 +45540,15 @@ class TcbDirectiveTypeOpBase extends TcbOp {
45515
45540
  const typeArguments = dirRef.node.typeParameters.map(() => ts.factory.createKeywordTypeNode(ts.SyntaxKind.AnyKeyword));
45516
45541
  type = ts.factory.createTypeReferenceNode(rawType.typeName, typeArguments);
45517
45542
  }
45543
+ if (this.node instanceof HostElement) {
45544
+ span = this.node.sourceSpan;
45545
+ }
45546
+ else {
45547
+ span = this.node.startSourceSpan || this.node.sourceSpan;
45548
+ }
45518
45549
  const id = this.tcb.allocateId();
45519
45550
  addExpressionIdentifier(id, ExpressionIdentifier.DIRECTIVE);
45520
- addParseSpanInfo(id, this.node.startSourceSpan || this.node.sourceSpan);
45551
+ addParseSpanInfo(id, span);
45521
45552
  this.scope.addStatement(tsDeclareVariable(id, type));
45522
45553
  return id;
45523
45554
  }
@@ -46187,12 +46218,16 @@ class TcbDirectiveOutputsOp extends TcbOp {
46187
46218
  tcb;
46188
46219
  scope;
46189
46220
  node;
46221
+ inputs;
46222
+ outputs;
46190
46223
  dir;
46191
- constructor(tcb, scope, node, dir) {
46224
+ constructor(tcb, scope, node, inputs, outputs, dir) {
46192
46225
  super();
46193
46226
  this.tcb = tcb;
46194
46227
  this.scope = scope;
46195
46228
  this.node = node;
46229
+ this.inputs = inputs;
46230
+ this.outputs = outputs;
46196
46231
  this.dir = dir;
46197
46232
  }
46198
46233
  get optional() {
@@ -46201,14 +46236,16 @@ class TcbDirectiveOutputsOp extends TcbOp {
46201
46236
  execute() {
46202
46237
  let dirId = null;
46203
46238
  const outputs = this.dir.outputs;
46204
- for (const output of this.node.outputs) {
46239
+ for (const output of this.outputs) {
46205
46240
  if (output.type === exports.ParsedEventType.LegacyAnimation ||
46206
46241
  !outputs.hasBindingPropertyName(output.name)) {
46207
46242
  continue;
46208
46243
  }
46209
- if (this.tcb.env.config.checkTypeOfOutputEvents && output.name.endsWith('Change')) {
46244
+ if (this.tcb.env.config.checkTypeOfOutputEvents &&
46245
+ this.inputs !== null &&
46246
+ output.name.endsWith('Change')) {
46210
46247
  const inputName = output.name.slice(0, -6);
46211
- checkSplitTwoWayBinding(inputName, output, this.node.inputs, this.tcb);
46248
+ checkSplitTwoWayBinding(inputName, output, this.inputs, this.tcb);
46212
46249
  }
46213
46250
  // TODO(alxhub): consider supporting multiple fields with the same property name for outputs.
46214
46251
  const field = outputs.getByBindingPropertyName(output.name)[0].classPropertyName;
@@ -46988,7 +47025,8 @@ class Scope {
46988
47025
  else if ((ref instanceof Element$1 ||
46989
47026
  ref instanceof Template ||
46990
47027
  ref instanceof Component$1 ||
46991
- ref instanceof Directive$1) &&
47028
+ ref instanceof Directive$1 ||
47029
+ ref instanceof HostElement) &&
46992
47030
  directive !== undefined &&
46993
47031
  this.directiveOpMap.has(ref)) {
46994
47032
  // Resolving a directive on an element or sub-template.
@@ -47051,7 +47089,7 @@ class Scope {
47051
47089
  this.appendContentProjectionCheckOp(node);
47052
47090
  }
47053
47091
  this.appendDirectivesAndInputsOfElementLikeNode(node);
47054
- this.appendOutputsOfElementLikeNode(node);
47092
+ this.appendOutputsOfElementLikeNode(node, node.inputs, node.outputs);
47055
47093
  this.appendSelectorlessDirectives(node);
47056
47094
  this.appendChildren(node);
47057
47095
  this.checkAndAppendReferencesOfNode(node);
@@ -47059,7 +47097,7 @@ class Scope {
47059
47097
  else if (node instanceof Template) {
47060
47098
  // Template children are rendered in a child scope.
47061
47099
  this.appendDirectivesAndInputsOfElementLikeNode(node);
47062
- this.appendOutputsOfElementLikeNode(node);
47100
+ this.appendOutputsOfElementLikeNode(node, node.inputs, node.outputs);
47063
47101
  this.appendSelectorlessDirectives(node);
47064
47102
  const ctxIndex = this.opQueue.push(new TcbTemplateContextOp(this.tcb, this)) - 1;
47065
47103
  this.templateCtxOpMap.set(node, ctxIndex);
@@ -47106,9 +47144,7 @@ class Scope {
47106
47144
  }
47107
47145
  }
47108
47146
  else if (node instanceof HostElement) {
47109
- const opIndex = this.opQueue.push(new TcbHostElementOp(this.tcb, this, node)) - 1;
47110
- this.hostElementOpMap.set(node, opIndex);
47111
- this.opQueue.push(new TcbUnclaimedInputsOp(this.tcb, this, node.bindings, node, null), new TcbUnclaimedOutputsOp(this.tcb, this, node, node.listeners, null, null), new TcbDomSchemaCheckerOp(this.tcb, node, false, null));
47147
+ this.appendHostElement(node);
47112
47148
  }
47113
47149
  }
47114
47150
  appendChildren(node) {
@@ -47182,7 +47218,7 @@ class Scope {
47182
47218
  this.opQueue.push(new TcbDomSchemaCheckerOp(this.tcb, node, checkElement, claimedInputs));
47183
47219
  }
47184
47220
  }
47185
- appendOutputsOfElementLikeNode(node) {
47221
+ appendOutputsOfElementLikeNode(node, bindings, events) {
47186
47222
  // Collect all the outputs on the element.
47187
47223
  const claimedOutputs = new Set();
47188
47224
  // Don't resolve directives when selectorless is enabled and treat all the outputs on the
@@ -47193,24 +47229,24 @@ class Scope {
47193
47229
  // If there are no directives, then all outputs are unclaimed outputs, so queue an operation
47194
47230
  // to add them if needed.
47195
47231
  if (node instanceof Element$1) {
47196
- this.opQueue.push(new TcbUnclaimedOutputsOp(this.tcb, this, node, node.outputs, node.inputs, claimedOutputs));
47232
+ this.opQueue.push(new TcbUnclaimedOutputsOp(this.tcb, this, node, events, bindings, claimedOutputs));
47197
47233
  }
47198
47234
  return;
47199
47235
  }
47200
47236
  // Queue operations for all directives to check the relevant outputs for a directive.
47201
47237
  for (const dir of directives) {
47202
- this.opQueue.push(new TcbDirectiveOutputsOp(this.tcb, this, node, dir));
47238
+ this.opQueue.push(new TcbDirectiveOutputsOp(this.tcb, this, node, bindings, events, dir));
47203
47239
  }
47204
47240
  // After expanding the directives, we might need to queue an operation to check any unclaimed
47205
47241
  // outputs.
47206
- if (node instanceof Element$1) {
47242
+ if (node instanceof Element$1 || node instanceof HostElement) {
47207
47243
  // Go through the directives and register any outputs that it claims in `claimedOutputs`.
47208
47244
  for (const dir of directives) {
47209
47245
  for (const outputProperty of dir.outputs.propertyNames) {
47210
47246
  claimedOutputs.add(outputProperty);
47211
47247
  }
47212
47248
  }
47213
- this.opQueue.push(new TcbUnclaimedOutputsOp(this.tcb, this, node, node.outputs, node.inputs, claimedOutputs));
47249
+ this.opQueue.push(new TcbUnclaimedOutputsOp(this.tcb, this, node, events, bindings, claimedOutputs));
47214
47250
  }
47215
47251
  }
47216
47252
  appendInputsOfSelectorlessNode(node) {
@@ -47251,7 +47287,7 @@ class Scope {
47251
47287
  const claimedOutputs = new Set();
47252
47288
  if (directives !== null && directives.length > 0) {
47253
47289
  for (const dir of directives) {
47254
- this.opQueue.push(new TcbDirectiveOutputsOp(this.tcb, this, node, dir));
47290
+ this.opQueue.push(new TcbDirectiveOutputsOp(this.tcb, this, node, node.inputs, node.outputs, dir));
47255
47291
  for (const outputProperty of dir.outputs.propertyNames) {
47256
47292
  claimedOutputs.add(outputProperty);
47257
47293
  }
@@ -47425,6 +47461,21 @@ class Scope {
47425
47461
  this.validateReferenceBasedDeferredTrigger(block, triggers.viewport);
47426
47462
  }
47427
47463
  }
47464
+ appendHostElement(node) {
47465
+ const opIndex = this.opQueue.push(new TcbHostElementOp(this.tcb, this, node)) - 1;
47466
+ const directives = this.tcb.boundTarget.getDirectivesOfNode(node);
47467
+ if (directives !== null && directives.length > 0) {
47468
+ const directiveOpMap = new Map();
47469
+ for (const directive of directives) {
47470
+ const directiveOp = new TcbNonGenericDirectiveTypeOp(this.tcb, this, node, directive);
47471
+ directiveOpMap.set(directive, this.opQueue.push(directiveOp) - 1);
47472
+ }
47473
+ this.directiveOpMap.set(node, directiveOpMap);
47474
+ }
47475
+ this.hostElementOpMap.set(node, opIndex);
47476
+ this.opQueue.push(new TcbUnclaimedInputsOp(this.tcb, this, node.bindings, node, null), new TcbDomSchemaCheckerOp(this.tcb, node, false, null));
47477
+ this.appendOutputsOfElementLikeNode(node, null, node.listeners);
47478
+ }
47428
47479
  validateReferenceBasedDeferredTrigger(block, trigger) {
47429
47480
  if (trigger.reference === null) {
47430
47481
  if (block.placeholder === null) {
@@ -48051,7 +48102,12 @@ class TypeCheckContextImpl {
48051
48102
  }
48052
48103
  const boundTarget = binder.bind({
48053
48104
  template: templateContext?.nodes,
48054
- host: hostBindingContext?.node,
48105
+ host: hostBindingContext === null
48106
+ ? undefined
48107
+ : {
48108
+ node: hostBindingContext.node,
48109
+ directives: hostBindingContext.directives,
48110
+ },
48055
48111
  });
48056
48112
  if (this.inlining === InliningMode.InlineOps) {
48057
48113
  // Get all of the directives used in the template and record inline type constructors when
@@ -50505,6 +50561,85 @@ function isDeprecatedDiagnostics(diag) {
50505
50561
  return diag.reportsDeprecated !== undefined;
50506
50562
  }
50507
50563
 
50564
+ /**
50565
+ * Gets all tsconfig paths from a CLI project by reading the workspace configuration
50566
+ * and looking for common tsconfig locations.
50567
+ */
50568
+ async function getProjectTsConfigPaths(tree) {
50569
+ // Start with some tsconfig paths that are generally used within CLI projects. Note
50570
+ // that we are not interested in IDE-specific tsconfig files (e.g. /tsconfig.json)
50571
+ const buildPaths = new Set();
50572
+ const testPaths = new Set();
50573
+ const workspace = await getWorkspace(tree);
50574
+ for (const [, project] of workspace.projects) {
50575
+ for (const [name, target] of project.targets) {
50576
+ if (name !== 'build' && name !== 'test') {
50577
+ continue;
50578
+ }
50579
+ for (const [, options] of allTargetOptions(target)) {
50580
+ const tsConfig = options['tsConfig'];
50581
+ // Filter out tsconfig files that don't exist in the CLI project.
50582
+ if (typeof tsConfig !== 'string' || !tree.exists(tsConfig)) {
50583
+ continue;
50584
+ }
50585
+ if (name === 'build') {
50586
+ buildPaths.add(core.normalize(tsConfig));
50587
+ }
50588
+ else {
50589
+ testPaths.add(core.normalize(tsConfig));
50590
+ }
50591
+ }
50592
+ }
50593
+ }
50594
+ return {
50595
+ buildPaths: [...buildPaths],
50596
+ testPaths: [...testPaths],
50597
+ };
50598
+ }
50599
+ /** Get options for all configurations for the passed builder target. */
50600
+ function* allTargetOptions(target) {
50601
+ if (target.options) {
50602
+ yield [undefined, target.options];
50603
+ }
50604
+ if (!target.configurations) {
50605
+ return;
50606
+ }
50607
+ for (const [name, options] of Object.entries(target.configurations)) {
50608
+ if (options) {
50609
+ yield [name, options];
50610
+ }
50611
+ }
50612
+ }
50613
+ function createHost(tree) {
50614
+ return {
50615
+ async readFile(path) {
50616
+ const data = tree.read(path);
50617
+ if (!data) {
50618
+ throw new Error('File not found.');
50619
+ }
50620
+ return core.virtualFs.fileBufferToString(data);
50621
+ },
50622
+ async writeFile(path, data) {
50623
+ return tree.overwrite(path, data);
50624
+ },
50625
+ async isDirectory(path) {
50626
+ // Approximate a directory check.
50627
+ // We don't need to consider empty directories and hence this is a good enough approach.
50628
+ // This is also per documentation, see:
50629
+ // https://angular.dev/tools/cli/schematics-for-libraries#get-the-project-configuration
50630
+ return !tree.exists(path) && tree.getDir(path).subfiles.length > 0;
50631
+ },
50632
+ async isFile(path) {
50633
+ return tree.exists(path);
50634
+ },
50635
+ };
50636
+ }
50637
+ async function getWorkspace(tree) {
50638
+ const host = createHost(tree);
50639
+ const { workspace } = await core.workspaces.readWorkspace('/', host);
50640
+ return workspace;
50641
+ }
50642
+
50508
50643
  exports.AST = AST;
50509
50644
  exports.ASTWithSource = ASTWithSource;
50510
50645
  exports.AbsoluteModuleStrategy = AbsoluteModuleStrategy;
@@ -50671,6 +50806,7 @@ exports.getDefaultImportDeclaration = getDefaultImportDeclaration;
50671
50806
  exports.getDirectiveDiagnostics = getDirectiveDiagnostics;
50672
50807
  exports.getFileSystem = getFileSystem;
50673
50808
  exports.getOriginNodeForDiagnostics = getOriginNodeForDiagnostics;
50809
+ exports.getProjectTsConfigPaths = getProjectTsConfigPaths;
50674
50810
  exports.getProviderDiagnostics = getProviderDiagnostics;
50675
50811
  exports.getRootDirs = getRootDirs;
50676
50812
  exports.getSourceFile = getSourceFile;
@@ -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
  */
@@ -9,15 +9,14 @@
9
9
  var schematics = require('@angular-devkit/schematics');
10
10
  var fs = require('fs');
11
11
  var p = require('path');
12
- var compiler_host = require('./compiler_host-CSrf1kFh.cjs');
13
- var project_tsconfig_paths = require('./project_tsconfig_paths-CDVxT6Ov.cjs');
12
+ var compiler_host = require('./compiler_host-Dtf8fsIr.cjs');
13
+ var project_tsconfig_paths = require('./project_tsconfig_paths-BGhHq5-d.cjs');
14
14
  var ts = require('typescript');
15
- var checker = require('./checker-Cfq29XaS.cjs');
16
15
  var property_name = require('./property_name-BBwFuqMe.cjs');
17
16
  require('os');
18
- require('@angular-devkit/core');
19
17
  require('module');
20
18
  require('url');
19
+ require('@angular-devkit/core');
21
20
 
22
21
  /**
23
22
  * Finds the class declaration that is being referred to by a node.
@@ -48,7 +47,7 @@ function isStandaloneComponent(node, reflector) {
48
47
  if (decorators === null) {
49
48
  return false;
50
49
  }
51
- const decorator = checker.findAngularDecorator(decorators, 'Component', false);
50
+ const decorator = project_tsconfig_paths.findAngularDecorator(decorators, 'Component', false);
52
51
  if (decorator === undefined || decorator.args === null || decorator.args.length !== 1) {
53
52
  return false;
54
53
  }
@@ -154,7 +153,7 @@ function isProvideRoutesCallExpression(node, typeChecker) {
154
153
  */
155
154
  function migrateFileToLazyRoutes(sourceFile, program) {
156
155
  const typeChecker = program.getTypeChecker();
157
- const reflector = new checker.TypeScriptReflectionHost(typeChecker);
156
+ const reflector = new project_tsconfig_paths.TypeScriptReflectionHost(typeChecker);
158
157
  const printer = ts.createPrinter();
159
158
  const tracker = new compiler_host.ChangeTracker(printer);
160
159
  const routeArraysToMigrate = findRoutesArrayToMigrate(sourceFile, typeChecker);
@@ -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,11 +8,11 @@
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');
15
+ var project_paths = require('./project_paths-CrqHneU0.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');
@@ -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
  require('./imports-CIX-JgAN.cjs');
26
25
 
27
26
  /**
@@ -128,7 +127,7 @@ function findClosestLineStartPosition(linesMap, position, low = 0, high = linesM
128
127
  class NgComponentTemplateVisitor {
129
128
  typeChecker;
130
129
  resolvedTemplates = [];
131
- fs = checker.getFileSystem();
130
+ fs = project_tsconfig_paths.getFileSystem();
132
131
  constructor(typeChecker) {
133
132
  this.typeChecker = typeChecker;
134
133
  }
@@ -203,7 +202,7 @@ function parseTemplate(template) {
203
202
  // interpolated text as text nodes containing a mixture of interpolation tokens and text tokens,
204
203
  // rather than turning them into `BoundText` nodes like the Ivy AST does. This allows us to
205
204
  // easily get the text-only ranges without having to reconstruct the original text.
206
- parsed = new checker.HtmlParser().parse(template, '', {
205
+ parsed = new project_tsconfig_paths.HtmlParser().parse(template, '', {
207
206
  // Allows for ICUs to be parsed.
208
207
  tokenizeExpansionForms: true,
209
208
  // Explicitly disable blocks so that their characters are treated as plain text.
@@ -228,7 +227,7 @@ function migrateTemplateToSelfClosingTags(template) {
228
227
  return { migrated: template, changed: false, replacementCount: 0 };
229
228
  }
230
229
  const visitor = new AngularElementCollector();
231
- checker.visitAll$1(visitor, parsed.tree.rootNodes);
230
+ project_tsconfig_paths.visitAll$1(visitor, parsed.tree.rootNodes);
232
231
  let newTemplate = template;
233
232
  let changedOffset = 0;
234
233
  let replacementCount = 0;
@@ -256,8 +255,8 @@ function replaceWithSelfClosingTag(html, tagName) {
256
255
  function replaceTemplate(template, replaceValue, start, end, offset) {
257
256
  return template.slice(0, start + offset) + replaceValue + template.slice(end + offset);
258
257
  }
259
- const ALL_HTML_TAGS = new checker.DomElementSchemaRegistry().allKnownElementNames();
260
- class AngularElementCollector extends checker.RecursiveVisitor$1 {
258
+ const ALL_HTML_TAGS = new project_tsconfig_paths.DomElementSchemaRegistry().allKnownElementNames();
259
+ class AngularElementCollector extends project_tsconfig_paths.RecursiveVisitor$1 {
261
260
  elements = [];
262
261
  constructor() {
263
262
  super();
@@ -280,7 +279,7 @@ class AngularElementCollector extends checker.RecursiveVisitor$1 {
280
279
  }
281
280
  if (element.children.length === 1) {
282
281
  const child = element.children[0];
283
- return child instanceof checker.Text && /^\s*$/.test(child.value);
282
+ return child instanceof project_tsconfig_paths.Text && /^\s*$/.test(child.value);
284
283
  }
285
284
  return false;
286
285
  }