@angular/core 20.3.0-rc.0 → 20.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/api.d.d.ts +1 -1
  2. package/chrome_dev_tools_performance.d.d.ts +1 -1
  3. package/discovery.d.d.ts +43 -3
  4. package/effect.d.d.ts +1 -1
  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 -27
  9. package/fesm2022/core.mjs.map +1 -1
  10. package/fesm2022/debug_node.mjs +505 -483
  11. package/fesm2022/debug_node.mjs.map +1 -1
  12. package/fesm2022/effect.mjs +1 -1
  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 +2 -2
  21. package/fesm2022/primitives/signals.mjs.map +1 -1
  22. package/fesm2022/resource.mjs +1 -1
  23. package/fesm2022/resource.mjs.map +1 -1
  24. package/fesm2022/root_effect_scheduler.mjs +47 -27
  25. package/fesm2022/root_effect_scheduler.mjs.map +1 -1
  26. package/fesm2022/rxjs-interop.mjs +3 -1
  27. package/fesm2022/rxjs-interop.mjs.map +1 -1
  28. package/fesm2022/signal.mjs +32 -11
  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 +24 -4
  35. package/index.d.ts +10 -94
  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 +2 -2
  40. package/rxjs-interop/index.d.ts +3 -1
  41. package/schematics/bundles/add-bootstrap-context-to-server-main.cjs +5 -5
  42. package/schematics/bundles/{apply_import_manager-CeOmw2t5.cjs → apply_import_manager-C8vgfoJx.cjs} +3 -3
  43. package/schematics/bundles/cleanup-unused-imports.cjs +5 -5
  44. package/schematics/bundles/{compiler_host-CXabxf2P.cjs → compiler_host-DC7Yquzy.cjs} +2 -2
  45. package/schematics/bundles/control-flow-migration.cjs +3 -3
  46. package/schematics/bundles/document-core.cjs +5 -5
  47. package/schematics/bundles/imports-CIX-JgAN.cjs +1 -1
  48. package/schematics/bundles/{index-CLpTl6rd.cjs → index-B5lv9x1v.cjs} +101 -29
  49. package/schematics/bundles/{index-CKtFJ_6n.cjs → index-Bufm9_1r.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-CjIN7lkE.cjs → migrate_ts_type_references-Ctl6-8qO.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-CGqaSutM.cjs → project_paths-CIUSEdn4.cjs} +3 -3
  58. package/schematics/bundles/{project_tsconfig_paths-RAvhwg8f.cjs → project_tsconfig_paths-crm5NKE7.cjs} +168 -198
  59. package/schematics/bundles/property_name-BBwFuqMe.cjs +1 -1
  60. package/schematics/bundles/route-lazy-loading.cjs +48 -4
  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 +17 -9
  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 +4 -4
  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 +1 -1
  70. package/weak_ref.d.d.ts +1 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.3.0-rc.0
3
+ * @license Angular v20.3.1
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -2849,10 +2849,6 @@ class Identifiers {
2849
2849
  name: 'ɵɵExternalStylesFeature',
2850
2850
  moduleName: CORE,
2851
2851
  };
2852
- static AnimationsFeature = {
2853
- name: 'ɵɵAnimationsFeature',
2854
- moduleName: CORE,
2855
- };
2856
2852
  static listener = { name: 'ɵɵlistener', moduleName: CORE };
2857
2853
  static getInheritedFactory = {
2858
2854
  name: 'ɵɵgetInheritedFactory',
@@ -2986,7 +2982,7 @@ function getJitStandaloneDefaultForVersion(version) {
2986
2982
  }
2987
2983
 
2988
2984
  // https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit
2989
- const VERSION = 3;
2985
+ const VERSION$1 = 3;
2990
2986
  const JS_B64_PREFIX = '# sourceMappingURL=data:application/json;base64,';
2991
2987
  class SourceMapGenerator {
2992
2988
  file;
@@ -3080,7 +3076,7 @@ class SourceMapGenerator {
3080
3076
  mappings = mappings.slice(0, -1);
3081
3077
  return {
3082
3078
  'file': this.file || '',
3083
- 'version': VERSION,
3079
+ 'version': VERSION$1,
3084
3080
  'sourceRoot': '',
3085
3081
  'sources': sources,
3086
3082
  'sourcesContent': sourcesContent,
@@ -20336,7 +20332,7 @@ const OBJECT = 'object';
20336
20332
  //
20337
20333
  // =================================================================================================
20338
20334
  const SCHEMA = [
20339
- '[Element]|textContent,%ariaAtomic,%ariaAutoComplete,%ariaBusy,%ariaChecked,%ariaColCount,%ariaColIndex,%ariaColSpan,%ariaCurrent,%ariaDescription,%ariaDisabled,%ariaExpanded,%ariaHasPopup,%ariaHidden,%ariaKeyShortcuts,%ariaLabel,%ariaLevel,%ariaLive,%ariaModal,%ariaMultiLine,%ariaMultiSelectable,%ariaOrientation,%ariaPlaceholder,%ariaPosInSet,%ariaPressed,%ariaReadOnly,%ariaRelevant,%ariaRequired,%ariaRoleDescription,%ariaRowCount,%ariaRowIndex,%ariaRowSpan,%ariaSelected,%ariaSetSize,%ariaSort,%ariaValueMax,%ariaValueMin,%ariaValueNow,%ariaValueText,%classList,className,elementTiming,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*fullscreenchange,*fullscreenerror,*search,*webkitfullscreenchange,*webkitfullscreenerror,outerHTML,%part,#scrollLeft,#scrollTop,slot' +
20335
+ '[Element]|textContent,%ariaAtomic,%ariaAutoComplete,%ariaBusy,%ariaChecked,%ariaColCount,%ariaColIndex,%ariaColSpan,%ariaCurrent,%ariaDescription,%ariaDisabled,%ariaExpanded,%ariaHasPopup,%ariaHidden,%ariaInvalid,%ariaKeyShortcuts,%ariaLabel,%ariaLevel,%ariaLive,%ariaModal,%ariaMultiLine,%ariaMultiSelectable,%ariaOrientation,%ariaPlaceholder,%ariaPosInSet,%ariaPressed,%ariaReadOnly,%ariaRelevant,%ariaRequired,%ariaRoleDescription,%ariaRowCount,%ariaRowIndex,%ariaRowSpan,%ariaSelected,%ariaSetSize,%ariaSort,%ariaValueMax,%ariaValueMin,%ariaValueNow,%ariaValueText,%classList,className,elementTiming,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*fullscreenchange,*fullscreenerror,*search,*webkitfullscreenchange,*webkitfullscreenerror,outerHTML,%part,#scrollLeft,#scrollTop,slot' +
20340
20336
  /* added manually to avoid breaking changes */
20341
20337
  ',*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored',
20342
20338
  '[HTMLElement]^[Element]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,!inert,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy',
@@ -30104,184 +30100,9 @@ function makeBindingParser(interpolationConfig = DEFAULT_INTERPOLATION_CONFIG, s
30104
30100
  return new BindingParser(new Parser(new Lexer(), selectorlessEnabled), interpolationConfig, elementRegistry, []);
30105
30101
  }
30106
30102
 
30107
- /*!
30108
- * @license
30109
- * Copyright Google LLC All Rights Reserved.
30110
- *
30111
- * Use of this source code is governed by an MIT-style license that can be
30112
- * found in the LICENSE file at https://angular.dev/license
30113
- */
30114
- /**
30115
- * Visitor that traverses all template and expression AST nodes in a template.
30116
- * Useful for cases where every single node needs to be visited.
30117
- */
30118
- class CombinedRecursiveAstVisitor extends RecursiveAstVisitor {
30119
- visit(node) {
30120
- if (node instanceof ASTWithSource) {
30121
- this.visit(node.ast);
30122
- }
30123
- else {
30124
- node.visit(this);
30125
- }
30126
- }
30127
- visitElement(element) {
30128
- this.visitAllTemplateNodes(element.attributes);
30129
- this.visitAllTemplateNodes(element.inputs);
30130
- this.visitAllTemplateNodes(element.outputs);
30131
- this.visitAllTemplateNodes(element.directives);
30132
- this.visitAllTemplateNodes(element.references);
30133
- this.visitAllTemplateNodes(element.children);
30134
- }
30135
- visitTemplate(template) {
30136
- this.visitAllTemplateNodes(template.attributes);
30137
- this.visitAllTemplateNodes(template.inputs);
30138
- this.visitAllTemplateNodes(template.outputs);
30139
- this.visitAllTemplateNodes(template.directives);
30140
- this.visitAllTemplateNodes(template.templateAttrs);
30141
- this.visitAllTemplateNodes(template.variables);
30142
- this.visitAllTemplateNodes(template.references);
30143
- this.visitAllTemplateNodes(template.children);
30144
- }
30145
- visitContent(content) {
30146
- this.visitAllTemplateNodes(content.children);
30147
- }
30148
- visitBoundAttribute(attribute) {
30149
- this.visit(attribute.value);
30150
- }
30151
- visitBoundEvent(attribute) {
30152
- this.visit(attribute.handler);
30153
- }
30154
- visitBoundText(text) {
30155
- this.visit(text.value);
30156
- }
30157
- visitIcu(icu) {
30158
- Object.keys(icu.vars).forEach((key) => this.visit(icu.vars[key]));
30159
- Object.keys(icu.placeholders).forEach((key) => this.visit(icu.placeholders[key]));
30160
- }
30161
- visitDeferredBlock(deferred) {
30162
- deferred.visitAll(this);
30163
- }
30164
- visitDeferredTrigger(trigger) {
30165
- if (trigger instanceof BoundDeferredTrigger) {
30166
- this.visit(trigger.value);
30167
- }
30168
- }
30169
- visitDeferredBlockPlaceholder(block) {
30170
- this.visitAllTemplateNodes(block.children);
30171
- }
30172
- visitDeferredBlockError(block) {
30173
- this.visitAllTemplateNodes(block.children);
30174
- }
30175
- visitDeferredBlockLoading(block) {
30176
- this.visitAllTemplateNodes(block.children);
30177
- }
30178
- visitSwitchBlock(block) {
30179
- this.visit(block.expression);
30180
- this.visitAllTemplateNodes(block.cases);
30181
- }
30182
- visitSwitchBlockCase(block) {
30183
- block.expression && this.visit(block.expression);
30184
- this.visitAllTemplateNodes(block.children);
30185
- }
30186
- visitForLoopBlock(block) {
30187
- block.item.visit(this);
30188
- this.visitAllTemplateNodes(block.contextVariables);
30189
- this.visit(block.expression);
30190
- this.visitAllTemplateNodes(block.children);
30191
- block.empty?.visit(this);
30192
- }
30193
- visitForLoopBlockEmpty(block) {
30194
- this.visitAllTemplateNodes(block.children);
30195
- }
30196
- visitIfBlock(block) {
30197
- this.visitAllTemplateNodes(block.branches);
30198
- }
30199
- visitIfBlockBranch(block) {
30200
- block.expression && this.visit(block.expression);
30201
- block.expressionAlias?.visit(this);
30202
- this.visitAllTemplateNodes(block.children);
30203
- }
30204
- visitLetDeclaration(decl) {
30205
- this.visit(decl.value);
30206
- }
30207
- visitComponent(component) {
30208
- this.visitAllTemplateNodes(component.attributes);
30209
- this.visitAllTemplateNodes(component.inputs);
30210
- this.visitAllTemplateNodes(component.outputs);
30211
- this.visitAllTemplateNodes(component.directives);
30212
- this.visitAllTemplateNodes(component.references);
30213
- this.visitAllTemplateNodes(component.children);
30214
- }
30215
- visitDirective(directive) {
30216
- this.visitAllTemplateNodes(directive.attributes);
30217
- this.visitAllTemplateNodes(directive.inputs);
30218
- this.visitAllTemplateNodes(directive.outputs);
30219
- this.visitAllTemplateNodes(directive.references);
30220
- }
30221
- visitVariable(variable) { }
30222
- visitReference(reference) { }
30223
- visitTextAttribute(attribute) { }
30224
- visitText(text) { }
30225
- visitUnknownBlock(block) { }
30226
- visitAllTemplateNodes(nodes) {
30227
- for (const node of nodes) {
30228
- this.visit(node);
30229
- }
30230
- }
30231
- }
30232
-
30233
- /*!
30234
- * @license
30235
- * Copyright Google LLC All Rights Reserved.
30236
- *
30237
- * Use of this source code is governed by an MIT-style license that can be
30238
- * found in the LICENSE file at https://angular.dev/license
30239
- */
30240
- const ANIMATE_LEAVE$1 = `animate.leave`;
30241
- /**
30242
- * Analyzes a component's template to determine if it's using animate.enter
30243
- * or animate.leave syntax.
30244
- */
30245
- function analyzeTemplateForAnimations(template) {
30246
- const analyzer = new AnimationsAnalyzer();
30247
- visitAll$1(analyzer, template);
30248
- // The template is considered selectorless only if there
30249
- // are direct references to directives or pipes.
30250
- return analyzer.hasAnimations;
30251
- }
30252
- /**
30253
- * Visitor that traverses all the template nodes and
30254
- * expressions to look for selectorless references.
30255
- */
30256
- class AnimationsAnalyzer extends CombinedRecursiveAstVisitor {
30257
- hasAnimations = false;
30258
- visitElement(element) {
30259
- // check for regular strings
30260
- for (const attr of element.attributes) {
30261
- if (attr.name === ANIMATE_LEAVE$1) {
30262
- this.hasAnimations = true;
30263
- }
30264
- }
30265
- // check for attribute bindings
30266
- for (const input of element.inputs) {
30267
- if (input.name === ANIMATE_LEAVE$1) {
30268
- this.hasAnimations = true;
30269
- }
30270
- }
30271
- // check for event bindings
30272
- for (const output of element.outputs) {
30273
- if (output.name === ANIMATE_LEAVE$1) {
30274
- this.hasAnimations = true;
30275
- }
30276
- }
30277
- super.visitElement(element);
30278
- }
30279
- }
30280
-
30281
30103
  const COMPONENT_VARIABLE = '%COMP%';
30282
30104
  const HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`;
30283
30105
  const CONTENT_ATTR = `_ngcontent-${COMPONENT_VARIABLE}`;
30284
- const ANIMATE_LEAVE = `animate.leave`;
30285
30106
  function baseDirectiveFields(meta, constantPool, bindingParser) {
30286
30107
  const definitionMap = new DefinitionMap();
30287
30108
  const selectors = parseSelectorToR3Selector(meta.selector);
@@ -30315,11 +30136,6 @@ function baseDirectiveFields(meta, constantPool, bindingParser) {
30315
30136
  }
30316
30137
  return definitionMap;
30317
30138
  }
30318
- function hasAnimationHostBinding(meta) {
30319
- return (meta.host.attributes[ANIMATE_LEAVE] !== undefined ||
30320
- meta.host.properties[ANIMATE_LEAVE] !== undefined ||
30321
- meta.host.listeners[ANIMATE_LEAVE] !== undefined);
30322
- }
30323
30139
  /**
30324
30140
  * Add features to the definition map.
30325
30141
  */
@@ -30354,12 +30170,6 @@ function addFeatures(definitionMap, meta) {
30354
30170
  const externalStyleNodes = meta.externalStyles.map((externalStyle) => literal(externalStyle));
30355
30171
  features.push(importExpr(Identifiers.ExternalStylesFeature).callFn([literalArr(externalStyleNodes)]));
30356
30172
  }
30357
- const template = meta.template;
30358
- if (hasAnimationHostBinding(meta) || (template && template.nodes.length > 0)) {
30359
- if (hasAnimationHostBinding(meta) || analyzeTemplateForAnimations(template.nodes)) {
30360
- features.push(importExpr(Identifiers.AnimationsFeature).callFn([]));
30361
- }
30362
- }
30363
30173
  if (features.length) {
30364
30174
  definitionMap.set('features', literalArr(features));
30365
30175
  }
@@ -30800,6 +30610,132 @@ function compileDeferResolverFunction(meta) {
30800
30610
  return arrowFn([], literalArr(depExpressions));
30801
30611
  }
30802
30612
 
30613
+ /*!
30614
+ * @license
30615
+ * Copyright Google LLC All Rights Reserved.
30616
+ *
30617
+ * Use of this source code is governed by an MIT-style license that can be
30618
+ * found in the LICENSE file at https://angular.dev/license
30619
+ */
30620
+ /**
30621
+ * Visitor that traverses all template and expression AST nodes in a template.
30622
+ * Useful for cases where every single node needs to be visited.
30623
+ */
30624
+ class CombinedRecursiveAstVisitor extends RecursiveAstVisitor {
30625
+ visit(node) {
30626
+ if (node instanceof ASTWithSource) {
30627
+ this.visit(node.ast);
30628
+ }
30629
+ else {
30630
+ node.visit(this);
30631
+ }
30632
+ }
30633
+ visitElement(element) {
30634
+ this.visitAllTemplateNodes(element.attributes);
30635
+ this.visitAllTemplateNodes(element.inputs);
30636
+ this.visitAllTemplateNodes(element.outputs);
30637
+ this.visitAllTemplateNodes(element.directives);
30638
+ this.visitAllTemplateNodes(element.references);
30639
+ this.visitAllTemplateNodes(element.children);
30640
+ }
30641
+ visitTemplate(template) {
30642
+ this.visitAllTemplateNodes(template.attributes);
30643
+ this.visitAllTemplateNodes(template.inputs);
30644
+ this.visitAllTemplateNodes(template.outputs);
30645
+ this.visitAllTemplateNodes(template.directives);
30646
+ this.visitAllTemplateNodes(template.templateAttrs);
30647
+ this.visitAllTemplateNodes(template.variables);
30648
+ this.visitAllTemplateNodes(template.references);
30649
+ this.visitAllTemplateNodes(template.children);
30650
+ }
30651
+ visitContent(content) {
30652
+ this.visitAllTemplateNodes(content.children);
30653
+ }
30654
+ visitBoundAttribute(attribute) {
30655
+ this.visit(attribute.value);
30656
+ }
30657
+ visitBoundEvent(attribute) {
30658
+ this.visit(attribute.handler);
30659
+ }
30660
+ visitBoundText(text) {
30661
+ this.visit(text.value);
30662
+ }
30663
+ visitIcu(icu) {
30664
+ Object.keys(icu.vars).forEach((key) => this.visit(icu.vars[key]));
30665
+ Object.keys(icu.placeholders).forEach((key) => this.visit(icu.placeholders[key]));
30666
+ }
30667
+ visitDeferredBlock(deferred) {
30668
+ deferred.visitAll(this);
30669
+ }
30670
+ visitDeferredTrigger(trigger) {
30671
+ if (trigger instanceof BoundDeferredTrigger) {
30672
+ this.visit(trigger.value);
30673
+ }
30674
+ }
30675
+ visitDeferredBlockPlaceholder(block) {
30676
+ this.visitAllTemplateNodes(block.children);
30677
+ }
30678
+ visitDeferredBlockError(block) {
30679
+ this.visitAllTemplateNodes(block.children);
30680
+ }
30681
+ visitDeferredBlockLoading(block) {
30682
+ this.visitAllTemplateNodes(block.children);
30683
+ }
30684
+ visitSwitchBlock(block) {
30685
+ this.visit(block.expression);
30686
+ this.visitAllTemplateNodes(block.cases);
30687
+ }
30688
+ visitSwitchBlockCase(block) {
30689
+ block.expression && this.visit(block.expression);
30690
+ this.visitAllTemplateNodes(block.children);
30691
+ }
30692
+ visitForLoopBlock(block) {
30693
+ block.item.visit(this);
30694
+ this.visitAllTemplateNodes(block.contextVariables);
30695
+ this.visit(block.expression);
30696
+ this.visitAllTemplateNodes(block.children);
30697
+ block.empty?.visit(this);
30698
+ }
30699
+ visitForLoopBlockEmpty(block) {
30700
+ this.visitAllTemplateNodes(block.children);
30701
+ }
30702
+ visitIfBlock(block) {
30703
+ this.visitAllTemplateNodes(block.branches);
30704
+ }
30705
+ visitIfBlockBranch(block) {
30706
+ block.expression && this.visit(block.expression);
30707
+ block.expressionAlias?.visit(this);
30708
+ this.visitAllTemplateNodes(block.children);
30709
+ }
30710
+ visitLetDeclaration(decl) {
30711
+ this.visit(decl.value);
30712
+ }
30713
+ visitComponent(component) {
30714
+ this.visitAllTemplateNodes(component.attributes);
30715
+ this.visitAllTemplateNodes(component.inputs);
30716
+ this.visitAllTemplateNodes(component.outputs);
30717
+ this.visitAllTemplateNodes(component.directives);
30718
+ this.visitAllTemplateNodes(component.references);
30719
+ this.visitAllTemplateNodes(component.children);
30720
+ }
30721
+ visitDirective(directive) {
30722
+ this.visitAllTemplateNodes(directive.attributes);
30723
+ this.visitAllTemplateNodes(directive.inputs);
30724
+ this.visitAllTemplateNodes(directive.outputs);
30725
+ this.visitAllTemplateNodes(directive.references);
30726
+ }
30727
+ visitVariable(variable) { }
30728
+ visitReference(reference) { }
30729
+ visitTextAttribute(attribute) { }
30730
+ visitText(text) { }
30731
+ visitUnknownBlock(block) { }
30732
+ visitAllTemplateNodes(nodes) {
30733
+ for (const node of nodes) {
30734
+ this.visit(node);
30735
+ }
30736
+ }
30737
+ }
30738
+
30803
30739
  /**
30804
30740
  * Processes `Target`s with a given set of directives and performs a binding operation, which
30805
30741
  * returns an object similar to TypeScript's `ts.TypeChecker` that contains knowledge about the
@@ -32838,7 +32774,7 @@ function isAttrNode(ast) {
32838
32774
  * @description
32839
32775
  * Entry point for all public APIs of the compiler package.
32840
32776
  */
32841
- new Version('20.3.0-rc.0');
32777
+ const VERSION = new Version('20.3.1');
32842
32778
 
32843
32779
  //////////////////////////////////////
32844
32780
  // THIS FILE HAS GLOBAL SIDE EFFECT //
@@ -33385,6 +33321,21 @@ exports.ErrorCode = void 0;
33385
33321
  * ```
33386
33322
  */
33387
33323
  ErrorCode[ErrorCode["UNINVOKED_FUNCTION_IN_TEXT_INTERPOLATION"] = 8117] = "UNINVOKED_FUNCTION_IN_TEXT_INTERPOLATION";
33324
+ /**
33325
+ * A required initializer is being invoked in a forbidden context such as a property initializer
33326
+ * or a constructor.
33327
+ *
33328
+ * For example:
33329
+ * ```ts
33330
+ * class MyComponent {
33331
+ * myInput = input.required();
33332
+ * somValue = this.myInput(); // Error
33333
+ *
33334
+ * constructor() {
33335
+ * this.myInput(); // Error
33336
+ * }
33337
+ */
33338
+ ErrorCode[ErrorCode["FORBIDDEN_REQUIRED_INITIALIZER_INVOCATION"] = 8118] = "FORBIDDEN_REQUIRED_INITIALIZER_INVOCATION";
33388
33339
  /**
33389
33340
  * The template type-checking engine would need to generate an inline type check block for a
33390
33341
  * component, but the current type-checking environment doesn't support it.
@@ -33519,6 +33470,18 @@ function isFatalDiagnosticError(err) {
33519
33470
  return err._isFatalDiagnosticError === true;
33520
33471
  }
33521
33472
 
33473
+ /**
33474
+ * Base URL for the error details page.
33475
+ *
33476
+ * Keep the files below in full sync:
33477
+ * - packages/compiler-cli/src/ngtsc/diagnostics/src/error_details_base_url.ts
33478
+ * - packages/core/src/error_details_base_url.ts
33479
+ */
33480
+ const ERROR_DETAILS_PAGE_BASE_URL = (() => {
33481
+ const versionSubDomain = VERSION.major !== '0' ? `v${VERSION.major}.` : '';
33482
+ return `https://${versionSubDomain}angular.dev/errors`;
33483
+ })();
33484
+
33522
33485
  /**
33523
33486
  * Enum holding the name of each extended template diagnostic. The name is used as a user-meaningful
33524
33487
  * value for configuring the diagnostic in the project's options.
@@ -33873,7 +33836,7 @@ class NodeJSPathManipulation {
33873
33836
  // G3-ESM-MARKER: G3 uses CommonJS, but externally everything in ESM.
33874
33837
  // CommonJS/ESM interop for determining the current file name and containing dir.
33875
33838
  const isCommonJS = typeof __filename !== 'undefined';
33876
- 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-RAvhwg8f.cjs', document.baseURI).href));
33839
+ 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-crm5NKE7.cjs', document.baseURI).href));
33877
33840
  // Note, when this code loads in the browser, `url` may be an empty `{}` due to the Closure shims.
33878
33841
  const currentFileName = isCommonJS
33879
33842
  ? __filename
@@ -47868,11 +47831,17 @@ function getBoundAttributes(directive, node) {
47868
47831
  });
47869
47832
  }
47870
47833
  };
47871
- node.inputs.forEach(processAttribute);
47872
- node.attributes.forEach(processAttribute);
47873
47834
  if (node instanceof Template) {
47835
+ if (node.tagName === 'ng-template') {
47836
+ node.inputs.forEach(processAttribute);
47837
+ node.attributes.forEach(processAttribute);
47838
+ }
47874
47839
  node.templateAttrs.forEach(processAttribute);
47875
47840
  }
47841
+ else {
47842
+ node.inputs.forEach(processAttribute);
47843
+ node.attributes.forEach(processAttribute);
47844
+ }
47876
47845
  return boundInputs;
47877
47846
  }
47878
47847
  /**
@@ -50865,6 +50834,7 @@ exports.Directive = Directive$1;
50865
50834
  exports.DomElementSchemaRegistry = DomElementSchemaRegistry;
50866
50835
  exports.DynamicImportExpr = DynamicImportExpr;
50867
50836
  exports.DynamicValue = DynamicValue;
50837
+ exports.ERROR_DETAILS_PAGE_BASE_URL = ERROR_DETAILS_PAGE_BASE_URL;
50868
50838
  exports.Element = Element;
50869
50839
  exports.Element$1 = Element$1;
50870
50840
  exports.EnumValue = EnumValue;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.3.0-rc.0
3
+ * @license Angular v20.3.1
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.3.0-rc.0
3
+ * @license Angular v20.3.1
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -9,8 +9,8 @@
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-CXabxf2P.cjs');
13
- var project_tsconfig_paths = require('./project_tsconfig_paths-RAvhwg8f.cjs');
12
+ var compiler_host = require('./compiler_host-DC7Yquzy.cjs');
13
+ var project_tsconfig_paths = require('./project_tsconfig_paths-crm5NKE7.cjs');
14
14
  var ts = require('typescript');
15
15
  var property_name = require('./property_name-BBwFuqMe.cjs');
16
16
  require('os');
@@ -208,7 +208,7 @@ function findRoutesArrayToMigrate(sourceFile, typeChecker) {
208
208
  }
209
209
  }
210
210
  }
211
- if (ts.isVariableDeclaration(node)) {
211
+ else if (ts.isVariableDeclaration(node)) {
212
212
  if (isAngularRoutesArray(node, typeChecker)) {
213
213
  const initializer = node.initializer;
214
214
  if (initializer &&
@@ -227,6 +227,33 @@ function findRoutesArrayToMigrate(sourceFile, typeChecker) {
227
227
  }
228
228
  }
229
229
  }
230
+ else if (ts.isExportAssignment(node)) {
231
+ // Handles `export default routes`, `export default [...]` and `export default [...] as Routes`
232
+ let expression = node.expression;
233
+ if (ts.isAsExpression(expression)) {
234
+ expression = expression.expression;
235
+ }
236
+ if (ts.isArrayLiteralExpression(expression)) {
237
+ routesArrays.push({
238
+ routeFilePath: sourceFile.fileName,
239
+ array: expression,
240
+ routeFileImports: sourceFile.statements.filter(ts.isImportDeclaration),
241
+ });
242
+ }
243
+ else if (ts.isIdentifier(expression)) {
244
+ manageRoutesExportedByDefault(routesArrays, typeChecker, expression, sourceFile);
245
+ }
246
+ }
247
+ else if (ts.isExportDeclaration(node)) {
248
+ // Handles cases like `export { routes as default }`
249
+ if (node.exportClause && ts.isNamedExports(node.exportClause)) {
250
+ for (const specifier of node.exportClause.elements) {
251
+ if (specifier.name.text === 'default') {
252
+ manageRoutesExportedByDefault(routesArrays, typeChecker, specifier.propertyName ?? specifier.name, sourceFile);
253
+ }
254
+ }
255
+ }
256
+ }
230
257
  node.forEachChild(walk);
231
258
  });
232
259
  return routesArrays;
@@ -333,6 +360,23 @@ function createLoadComponentPropertyAssignment(componentImportPath, componentDec
333
360
  // will generate import('./path).then(m => m.componentName)
334
361
  ts.factory.createPropertyAccessExpression(createImportCallExpression(componentImportPath), 'then'), undefined, [createImportThenCallExpression(componentDeclarationName)])));
335
362
  }
363
+ const manageRoutesExportedByDefault = (routesArrays, typeChecker, expression, sourceFile) => {
364
+ const symbol = typeChecker.getSymbolAtLocation(expression);
365
+ if (!symbol?.declarations) {
366
+ return;
367
+ }
368
+ for (const declaration of symbol.declarations) {
369
+ if (ts.isVariableDeclaration(declaration) &&
370
+ declaration.initializer &&
371
+ ts.isArrayLiteralExpression(declaration.initializer)) {
372
+ routesArrays.push({
373
+ routeFilePath: sourceFile.fileName,
374
+ array: declaration.initializer,
375
+ routeFileImports: sourceFile.statements.filter(ts.isImportDeclaration),
376
+ });
377
+ }
378
+ }
379
+ };
336
380
  // import('./path)
337
381
  const createImportCallExpression = (componentImportPath) => ts.factory.createCallExpression(ts.factory.createIdentifier('import'), undefined, [
338
382
  ts.factory.createStringLiteral(componentImportPath, true),
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.3.0-rc.0
3
+ * @license Angular v20.3.1
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-RAvhwg8f.cjs');
12
- require('./index-CLpTl6rd.cjs');
11
+ require('./project_tsconfig_paths-crm5NKE7.cjs');
12
+ require('./index-B5lv9x1v.cjs');
13
13
  require('path');
14
14
  require('node:path');
15
- var project_paths = require('./project_paths-CGqaSutM.cjs');
15
+ var project_paths = require('./project_paths-CIUSEdn4.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.0-rc.0
3
+ * @license Angular v20.3.1
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-RAvhwg8f.cjs');
12
- require('./index-CLpTl6rd.cjs');
11
+ var project_tsconfig_paths = require('./project_tsconfig_paths-crm5NKE7.cjs');
12
+ require('./index-B5lv9x1v.cjs');
13
13
  require('path');
14
14
  require('node:path');
15
- var project_paths = require('./project_paths-CGqaSutM.cjs');
15
+ var project_paths = require('./project_paths-CIUSEdn4.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.0-rc.0
3
+ * @license Angular v20.3.1
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
7
7
  'use strict';
8
8
 
9
- var migrate_ts_type_references = require('./migrate_ts_type_references-CjIN7lkE.cjs');
9
+ var migrate_ts_type_references = require('./migrate_ts_type_references-Ctl6-8qO.cjs');
10
10
  var ts = require('typescript');
11
11
  require('os');
12
- var project_tsconfig_paths = require('./project_tsconfig_paths-RAvhwg8f.cjs');
13
- var index$1 = require('./index-CLpTl6rd.cjs');
12
+ var project_tsconfig_paths = require('./project_tsconfig_paths-crm5NKE7.cjs');
13
+ var index$1 = require('./index-B5lv9x1v.cjs');
14
14
  require('path');
15
15
  require('node:path');
16
- var project_paths = require('./project_paths-CGqaSutM.cjs');
17
- var index = require('./index-CKtFJ_6n.cjs');
16
+ var project_paths = require('./project_paths-CIUSEdn4.cjs');
17
+ var index = require('./index-Bufm9_1r.cjs');
18
18
  var assert$1 = require('assert');
19
19
  var assert = require('node:assert');
20
- var apply_import_manager = require('./apply_import_manager-CeOmw2t5.cjs');
20
+ var apply_import_manager = require('./apply_import_manager-C8vgfoJx.cjs');
21
21
  require('@angular-devkit/core');
22
22
  require('node:path/posix');
23
23
  require('./leading_space-D9nQ8UQC.cjs');
@@ -397,7 +397,15 @@ function extractSourceCodeInput(node, host, reflector, evaluator) {
397
397
  isRequired = !!evaluatedInputOpts.get('required');
398
398
  }
399
399
  if (evaluatedInputOpts.has('transform') && evaluatedInputOpts.get('transform') != null) {
400
- transformResult = parseTransformOfInput(evaluatedInputOpts, node, reflector);
400
+ const result = parseTransformOfInput(evaluatedInputOpts, node, reflector);
401
+ if (result === 'parsingError') {
402
+ if (!host.config.bestEffortMode) {
403
+ return null;
404
+ }
405
+ }
406
+ else {
407
+ transformResult = result;
408
+ }
401
409
  }
402
410
  }
403
411
  }
@@ -444,7 +452,7 @@ function parseTransformOfInput(evaluatedInputOpts, node, reflector) {
444
452
  // TODO: implement error handling.
445
453
  // See failing case: e.g. inherit_definition_feature_spec.ts
446
454
  console.error(`${e.node.getSourceFile().fileName}: ${e.toString()}`);
447
- return null;
455
+ return 'parsingError';
448
456
  }
449
457
  }
450
458