@angular/core 20.0.0-next.8 → 20.0.0-next.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/{api.d-KjtSQajV.d.ts → api.d-B58KU5QT.d.ts} +25 -40
  2. package/chrome_dev_tools_performance.d-qv7drdAl.d.ts +1 -1
  3. package/{discovery.d-vJaEafe4.d.ts → discovery.d-BCmtv8-u.d.ts} +19 -5
  4. package/event_dispatcher.d-DlbccpYq.d.ts +1 -1
  5. package/fesm2022/attribute-BWp59EjE.mjs +1 -1
  6. package/fesm2022/core.mjs +59 -158
  7. package/fesm2022/core.mjs.map +1 -1
  8. package/fesm2022/{debug_node-DEfPCixm.mjs → debug_node-sP8Ihhla.mjs} +126 -42
  9. package/fesm2022/debug_node-sP8Ihhla.mjs.map +1 -0
  10. package/fesm2022/primitives/di.mjs +1 -1
  11. package/fesm2022/primitives/event-dispatch.mjs +1 -1
  12. package/fesm2022/primitives/signals.mjs +4 -4
  13. package/fesm2022/{resource-DhKtse7l.mjs → resource-aJC_NNLX.mjs} +29 -76
  14. package/fesm2022/resource-aJC_NNLX.mjs.map +1 -0
  15. package/fesm2022/{root_effect_scheduler-BZMWiScf.mjs → root_effect_scheduler-C95A9imp.mjs} +10 -7
  16. package/fesm2022/root_effect_scheduler-C95A9imp.mjs.map +1 -0
  17. package/fesm2022/rxjs-interop.mjs +11 -6
  18. package/fesm2022/rxjs-interop.mjs.map +1 -1
  19. package/fesm2022/{signal-B6pMq7KS.mjs → signal-CVVPheSN.mjs} +13 -3
  20. package/fesm2022/{signal-B6pMq7KS.mjs.map → signal-CVVPheSN.mjs.map} +1 -1
  21. package/fesm2022/testing.mjs +34 -26
  22. package/fesm2022/testing.mjs.map +1 -1
  23. package/fesm2022/{untracked-Bz5WMeU1.mjs → untracked-BLZYODu2.mjs} +3 -3
  24. package/fesm2022/{untracked-Bz5WMeU1.mjs.map → untracked-BLZYODu2.mjs.map} +1 -1
  25. package/fesm2022/weak_ref-BaIq-pgY.mjs +1 -1
  26. package/graph.d-BcIOep_B.d.ts +1 -1
  27. package/index.d.ts +135 -114
  28. package/package.json +2 -2
  29. package/primitives/di/index.d.ts +1 -1
  30. package/primitives/event-dispatch/index.d.ts +1 -1
  31. package/primitives/signals/index.d.ts +3 -3
  32. package/rxjs-interop/index.d.ts +3 -3
  33. package/schematics/bundles/{apply_import_manager-CaG-_cEq.js → apply_import_manager-CxaTw_Wy.js} +3 -3
  34. package/schematics/bundles/{change_tracker-ISzWfEHN.js → change_tracker-CkPYZ_km.js} +3 -3
  35. package/schematics/bundles/{checker-DV96LHWz.js → checker-Crz1jSZM.js} +386 -122
  36. package/schematics/bundles/cleanup-unused-imports.js +6 -6
  37. package/schematics/bundles/{compiler-BEZ6sUQS.js → compiler-B4MK7BP9.js} +49 -54
  38. package/schematics/bundles/compiler_host-CAfDJO3W.js +1 -1
  39. package/schematics/bundles/control-flow-migration.js +2 -2
  40. package/schematics/bundles/document-core.js +6 -6
  41. package/schematics/bundles/imports-CIX-JgAN.js +1 -1
  42. package/schematics/bundles/{index-6wv04ZFQ.js → index-BbZ6cSR1.js} +6 -5
  43. package/schematics/bundles/{index-B1R5GL-k.js → index-Bk_3geTg.js} +421 -317
  44. package/schematics/bundles/inject-flags.js +6 -6
  45. package/schematics/bundles/inject-migration.js +4 -4
  46. package/schematics/bundles/leading_space-D9nQ8UQC.js +1 -1
  47. package/schematics/bundles/{migrate_ts_type_references-Dh9TZgTr.js → migrate_ts_type_references-D6T3FlkH.js} +6 -6
  48. package/schematics/bundles/ng_decorators-DznZ5jMl.js +1 -1
  49. package/schematics/bundles/nodes-B16H9JUd.js +1 -1
  50. package/schematics/bundles/output-migration.js +7 -7
  51. package/schematics/bundles/{project_paths-B-Nevd-p.js → project_paths-CQ4-VKlW.js} +4 -4
  52. package/schematics/bundles/project_tsconfig_paths-CDVxT6Ov.js +1 -1
  53. package/schematics/bundles/property_name-BBwFuqMe.js +1 -1
  54. package/schematics/bundles/route-lazy-loading.js +4 -4
  55. package/schematics/bundles/self-closing-tags-migration.js +5 -5
  56. package/schematics/bundles/signal-input-migration.js +8 -8
  57. package/schematics/bundles/signal-queries-migration.js +8 -8
  58. package/schematics/bundles/signals.js +8 -8
  59. package/schematics/bundles/standalone-migration.js +5 -5
  60. package/schematics/bundles/symbol-VPWguRxr.js +1 -1
  61. package/schematics/bundles/test-bed-get.js +5 -5
  62. package/{signal.d-E0e5nW1p.d.ts → signal.d-D6VJ67xi.d.ts} +8 -2
  63. package/testing/index.d.ts +9 -12
  64. package/weak_ref.d-eGOEP9S1.d.ts +1 -1
  65. package/fesm2022/debug_node-DEfPCixm.mjs.map +0 -1
  66. package/fesm2022/resource-DhKtse7l.mjs.map +0 -1
  67. package/fesm2022/root_effect_scheduler-BZMWiScf.mjs.map +0 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.0.0-next.8
3
+ * @license Angular v20.0.0-next.9
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -8,14 +8,14 @@
8
8
 
9
9
  require('@angular-devkit/core');
10
10
  require('node:path/posix');
11
- var project_paths = require('./project_paths-B-Nevd-p.js');
11
+ var project_paths = require('./project_paths-CQ4-VKlW.js');
12
12
  var ts = require('typescript');
13
13
  require('os');
14
- var checker = require('./checker-DV96LHWz.js');
15
- require('./compiler-BEZ6sUQS.js');
16
- var index = require('./index-B1R5GL-k.js');
14
+ var checker = require('./checker-Crz1jSZM.js');
15
+ require('./compiler-B4MK7BP9.js');
16
+ var index = require('./index-Bk_3geTg.js');
17
17
  require('path');
18
- var apply_import_manager = require('./apply_import_manager-CaG-_cEq.js');
18
+ var apply_import_manager = require('./apply_import_manager-CxaTw_Wy.js');
19
19
  require('@angular-devkit/schematics');
20
20
  require('./project_tsconfig_paths-CDVxT6Ov.js');
21
21
  require('fs');
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.0.0-next.8
3
+ * @license Angular v20.0.0-next.9
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -405,7 +405,7 @@ class SelectorlessMatcher {
405
405
  this.registry = registry;
406
406
  }
407
407
  match(name) {
408
- return this.registry.get(name) ?? null;
408
+ return this.registry.has(name) ? this.registry.get(name) : [];
409
409
  }
410
410
  }
411
411
 
@@ -26304,6 +26304,7 @@ function ingestNodes(unit, template) {
26304
26304
  else if (node instanceof LetDeclaration$1) {
26305
26305
  ingestLetDeclaration(unit, node);
26306
26306
  }
26307
+ else if (node instanceof Component$1) ;
26307
26308
  else {
26308
26309
  throw new Error(`Unsupported template node: ${node.constructor.name}`);
26309
26310
  }
@@ -30284,6 +30285,7 @@ class R3TargetBinder {
30284
30285
  }
30285
30286
  const directives = new Map();
30286
30287
  const eagerDirectives = [];
30288
+ const missingDirectives = new Set();
30287
30289
  const bindings = new Map();
30288
30290
  const references = new Map();
30289
30291
  const scopedNodeEntities = new Map();
@@ -30304,7 +30306,9 @@ class R3TargetBinder {
30304
30306
  // - bindings: Map of inputs, outputs, and attributes to the directive/element that claims
30305
30307
  // them. TODO(alxhub): handle multiple directives claiming an input/output/etc.
30306
30308
  // - references: Map of #references to their targets.
30307
- DirectiveBinder.apply(target.template, this.directiveMatcher, directives, eagerDirectives, bindings, references);
30309
+ if (this.directiveMatcher !== null) {
30310
+ DirectiveBinder.apply(target.template, this.directiveMatcher, directives, eagerDirectives, missingDirectives, bindings, references);
30311
+ }
30308
30312
  // Finally, run the TemplateBinder to bind references, variables, and other entities within the
30309
30313
  // template. This extracts all the metadata that doesn't depend on directive matching.
30310
30314
  TemplateBinder.applyWithScope(target.template, scope, expressions, symbols, nestingLevel, usedPipes, eagerPipes, deferBlocks);
@@ -30314,7 +30318,7 @@ class R3TargetBinder {
30314
30318
  if (target.host) {
30315
30319
  TemplateBinder.applyWithScope(target.host, Scope.apply(target.host), expressions, symbols, nestingLevel, usedPipes, eagerPipes, deferBlocks);
30316
30320
  }
30317
- return new R3BoundTarget(target, directives, eagerDirectives, bindings, references, expressions, symbols, nestingLevel, scopedNodeEntities, usedPipes, eagerPipes, deferBlocks);
30321
+ return new R3BoundTarget(target, directives, eagerDirectives, missingDirectives, bindings, references, expressions, symbols, nestingLevel, scopedNodeEntities, usedPipes, eagerPipes, deferBlocks);
30318
30322
  }
30319
30323
  }
30320
30324
  /**
@@ -30526,14 +30530,16 @@ class DirectiveBinder {
30526
30530
  directiveMatcher;
30527
30531
  directives;
30528
30532
  eagerDirectives;
30533
+ missingDirectives;
30529
30534
  bindings;
30530
30535
  references;
30531
30536
  // Indicates whether we are visiting elements within a `defer` block
30532
30537
  isInDeferBlock = false;
30533
- constructor(directiveMatcher, directives, eagerDirectives, bindings, references) {
30538
+ constructor(directiveMatcher, directives, eagerDirectives, missingDirectives, bindings, references) {
30534
30539
  this.directiveMatcher = directiveMatcher;
30535
30540
  this.directives = directives;
30536
30541
  this.eagerDirectives = eagerDirectives;
30542
+ this.missingDirectives = missingDirectives;
30537
30543
  this.bindings = bindings;
30538
30544
  this.references = references;
30539
30545
  }
@@ -30549,8 +30555,8 @@ class DirectiveBinder {
30549
30555
  * map which resolves #references (`Reference`s) within the template to the named directive or
30550
30556
  * template node.
30551
30557
  */
30552
- static apply(template, directiveMatcher, directives, eagerDirectives, bindings, references) {
30553
- const matcher = new DirectiveBinder(directiveMatcher, directives, eagerDirectives, bindings, references);
30558
+ static apply(template, directiveMatcher, directives, eagerDirectives, missingDirectives, bindings, references) {
30559
+ const matcher = new DirectiveBinder(directiveMatcher, directives, eagerDirectives, missingDirectives, bindings, references);
30554
30560
  matcher.ingest(template);
30555
30561
  }
30556
30562
  ingest(template) {
@@ -30606,55 +30612,36 @@ class DirectiveBinder {
30606
30612
  content.children.forEach((child) => child.visit(this));
30607
30613
  }
30608
30614
  visitComponent(node) {
30609
- const directives = [];
30610
- let componentMetas = null;
30611
30615
  if (this.directiveMatcher instanceof SelectorlessMatcher) {
30612
- componentMetas = this.directiveMatcher.match(node.componentName);
30613
- if (componentMetas !== null) {
30614
- directives.push(...componentMetas);
30616
+ const componentMatches = this.directiveMatcher.match(node.componentName);
30617
+ if (componentMatches.length > 0) {
30618
+ this.trackSelectorlessMatchesAndDirectives(node, componentMatches);
30615
30619
  }
30616
- for (const directive of node.directives) {
30617
- const directiveMetas = this.directiveMatcher.match(directive.name);
30618
- if (directiveMetas !== null) {
30619
- directives.push(...directiveMetas);
30620
- }
30620
+ else {
30621
+ this.missingDirectives.add(node.componentName);
30621
30622
  }
30622
30623
  }
30623
- this.trackMatchedDirectives(node, directives);
30624
- if (componentMetas !== null) {
30625
- this.trackSelectorlessBindings(node, componentMetas);
30626
- }
30627
30624
  node.directives.forEach((directive) => directive.visit(this));
30628
30625
  node.children.forEach((child) => child.visit(this));
30629
30626
  }
30630
30627
  visitDirective(node) {
30631
- const directives = this.directiveMatcher instanceof SelectorlessMatcher
30632
- ? this.directiveMatcher.match(node.name)
30633
- : null;
30634
- if (directives !== null) {
30635
- this.trackSelectorlessBindings(node, directives);
30628
+ if (this.directiveMatcher instanceof SelectorlessMatcher) {
30629
+ const directives = this.directiveMatcher.match(node.name);
30630
+ if (directives.length > 0) {
30631
+ this.trackSelectorlessMatchesAndDirectives(node, directives);
30632
+ }
30633
+ else {
30634
+ this.missingDirectives.add(node.name);
30635
+ }
30636
30636
  }
30637
30637
  }
30638
30638
  visitElementOrTemplate(node) {
30639
- const directives = [];
30640
30639
  if (this.directiveMatcher instanceof SelectorMatcher) {
30641
- // First, determine the HTML shape of the node for the purpose of directive matching.
30642
- // Do this by building up a `CssSelector` for the node.
30640
+ const directives = [];
30643
30641
  const cssSelector = createCssSelectorFromNode(node);
30644
- this.directiveMatcher.match(cssSelector, (_selector, results) => {
30645
- directives.push(...results);
30646
- });
30647
- this.trackSelectorMatchedBindings(node, directives);
30648
- }
30649
- else {
30650
- for (const directive of node.directives) {
30651
- const matchedDirectives = this.directiveMatcher.match(directive.name);
30652
- if (matchedDirectives !== null) {
30653
- directives.push(...matchedDirectives);
30654
- }
30655
- }
30642
+ this.directiveMatcher.match(cssSelector, (_, results) => directives.push(...results));
30643
+ this.trackSelectorBasedBindingsAndDirectives(node, directives);
30656
30644
  }
30657
- this.trackMatchedDirectives(node, directives);
30658
30645
  node.directives.forEach((directive) => directive.visit(this));
30659
30646
  node.children.forEach((child) => child.visit(this));
30660
30647
  }
@@ -30666,25 +30653,28 @@ class DirectiveBinder {
30666
30653
  }
30667
30654
  }
30668
30655
  }
30669
- trackSelectorlessBindings(node, metas) {
30656
+ trackSelectorlessMatchesAndDirectives(node, directives) {
30657
+ if (directives.length === 0) {
30658
+ return;
30659
+ }
30660
+ this.trackMatchedDirectives(node, directives);
30670
30661
  const setBinding = (meta, attribute, ioType) => {
30671
30662
  if (meta[ioType].hasBindingPropertyName(attribute.name)) {
30672
30663
  this.bindings.set(attribute, meta);
30673
30664
  }
30674
30665
  };
30675
- for (const meta of metas) {
30676
- node.inputs.forEach((input) => setBinding(meta, input, 'inputs'));
30677
- node.attributes.forEach((attr) => setBinding(meta, attr, 'inputs'));
30678
- node.outputs.forEach((output) => setBinding(meta, output, 'outputs'));
30666
+ for (const directive of directives) {
30667
+ node.inputs.forEach((input) => setBinding(directive, input, 'inputs'));
30668
+ node.attributes.forEach((attr) => setBinding(directive, attr, 'inputs'));
30669
+ node.outputs.forEach((output) => setBinding(directive, output, 'outputs'));
30679
30670
  }
30680
30671
  // TODO(crisbeto): currently it's unclear how references should behave under selectorless,
30681
30672
  // given that there's one named class which can bring in multiple host directives.
30682
30673
  // For the time being only register the first directive as the reference target.
30683
- if (metas.length > 0) {
30684
- node.references.forEach((ref) => this.references.set(ref, { directive: metas[0], node: node }));
30685
- }
30674
+ node.references.forEach((ref) => this.references.set(ref, { directive: directives[0], node: node }));
30686
30675
  }
30687
- trackSelectorMatchedBindings(node, directives) {
30676
+ trackSelectorBasedBindingsAndDirectives(node, directives) {
30677
+ this.trackMatchedDirectives(node, directives);
30688
30678
  // Resolve any references that are created on this node.
30689
30679
  node.references.forEach((ref) => {
30690
30680
  let dirTarget = null;
@@ -31018,6 +31008,7 @@ class R3BoundTarget {
31018
31008
  target;
31019
31009
  directives;
31020
31010
  eagerDirectives;
31011
+ missingDirectives;
31021
31012
  bindings;
31022
31013
  references;
31023
31014
  exprTargets;
@@ -31030,10 +31021,11 @@ class R3BoundTarget {
31030
31021
  deferredBlocks;
31031
31022
  /** Map of deferred blocks to their scope. */
31032
31023
  deferredScopes;
31033
- constructor(target, directives, eagerDirectives, bindings, references, exprTargets, symbols, nestingLevel, scopedNodeEntities, usedPipes, eagerPipes, rawDeferred) {
31024
+ constructor(target, directives, eagerDirectives, missingDirectives, bindings, references, exprTargets, symbols, nestingLevel, scopedNodeEntities, usedPipes, eagerPipes, rawDeferred) {
31034
31025
  this.target = target;
31035
31026
  this.directives = directives;
31036
31027
  this.eagerDirectives = eagerDirectives;
31028
+ this.missingDirectives = missingDirectives;
31037
31029
  this.bindings = bindings;
31038
31030
  this.references = references;
31039
31031
  this.exprTargets = exprTargets;
@@ -31149,6 +31141,9 @@ class R3BoundTarget {
31149
31141
  }
31150
31142
  return false;
31151
31143
  }
31144
+ referencedDirectiveExists(name) {
31145
+ return !this.missingDirectives.has(name);
31146
+ }
31152
31147
  /**
31153
31148
  * Finds an entity with a specific name in a scope.
31154
31149
  * @param rootNode Root node of the scope.
@@ -31653,7 +31648,7 @@ function parseJitTemplate(template, typeName, sourceMapUrl, preserveWhitespaces,
31653
31648
  const errors = parsed.errors.map((err) => err.toString()).join(', ');
31654
31649
  throw new Error(`Errors during JIT compilation of template for ${typeName}: ${errors}`);
31655
31650
  }
31656
- const binder = new R3TargetBinder(new SelectorMatcher());
31651
+ const binder = new R3TargetBinder(null);
31657
31652
  const boundTarget = binder.bind({ template: parsed.nodes });
31658
31653
  return {
31659
31654
  template: parsed,
@@ -32371,7 +32366,7 @@ var FactoryTarget;
32371
32366
  * @description
32372
32367
  * Entry point for all public APIs of the compiler package.
32373
32368
  */
32374
- new Version('20.0.0-next.8');
32369
+ new Version('20.0.0-next.9');
32375
32370
 
32376
32371
  //////////////////////////////////////
32377
32372
  // THIS FILE HAS GLOBAL SIDE EFFECT //
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.0.0-next.8
3
+ * @license Angular v20.0.0-next.9
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.0.0-next.8
3
+ * @license Angular v20.0.0-next.9
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -9,7 +9,7 @@
9
9
  var schematics = require('@angular-devkit/schematics');
10
10
  var p = require('path');
11
11
  var compiler_host = require('./compiler_host-CAfDJO3W.js');
12
- var compiler = require('./compiler-BEZ6sUQS.js');
12
+ var compiler = require('./compiler-B4MK7BP9.js');
13
13
  var ts = require('typescript');
14
14
  var project_tsconfig_paths = require('./project_tsconfig_paths-CDVxT6Ov.js');
15
15
  require('@angular-devkit/core');
@@ -1,19 +1,19 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.0.0-next.8
3
+ * @license Angular v20.0.0-next.9
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
7
7
  'use strict';
8
8
 
9
- require('./compiler-BEZ6sUQS.js');
9
+ require('./compiler-B4MK7BP9.js');
10
10
  require('typescript');
11
- var checker = require('./checker-DV96LHWz.js');
11
+ var checker = require('./checker-Crz1jSZM.js');
12
12
  require('os');
13
- var apply_import_manager = require('./apply_import_manager-CaG-_cEq.js');
14
- require('./index-B1R5GL-k.js');
13
+ var apply_import_manager = require('./apply_import_manager-CxaTw_Wy.js');
14
+ require('./index-Bk_3geTg.js');
15
15
  require('path');
16
- var project_paths = require('./project_paths-B-Nevd-p.js');
16
+ var project_paths = require('./project_paths-CQ4-VKlW.js');
17
17
  var imports = require('./imports-CIX-JgAN.js');
18
18
  require('@angular-devkit/core');
19
19
  require('node:path/posix');
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.0.0-next.8
3
+ * @license Angular v20.0.0-next.9
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.0.0-next.8
3
+ * @license Angular v20.0.0-next.9
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-DV96LHWz.js');
12
- var compiler = require('./compiler-BEZ6sUQS.js');
13
- var index = require('./index-B1R5GL-k.js');
11
+ var checker = require('./checker-Crz1jSZM.js');
12
+ var compiler = require('./compiler-B4MK7BP9.js');
13
+ var index = require('./index-Bk_3geTg.js');
14
14
  require('path');
15
- var project_paths = require('./project_paths-B-Nevd-p.js');
15
+ var project_paths = require('./project_paths-CQ4-VKlW.js');
16
16
 
17
17
  function getMemberName(member) {
18
18
  if (member.name === undefined) {
@@ -745,6 +745,7 @@ function extractTemplateWithoutCompilerAnalysis(node, checker$1, reflector, reso
745
745
  usePoisonedData: true,
746
746
  enableI18nLegacyMessageIdFormat: options.enableI18nLegacyMessageIdFormat !== false,
747
747
  i18nNormalizeLineEndingsInICUs: options.i18nNormalizeLineEndingsInICUs === true,
748
+ enableSelectorless: false,
748
749
  }, checker.CompilationMode.FULL).nodes;
749
750
  }
750
751