@angular/compiler 18.0.0-rc.1 → 18.0.0-rc.3

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v18.0.0-rc.1
2
+ * @license Angular v18.0.0-rc.3
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -736,7 +736,6 @@ function hash32(view, length, c) {
736
736
  }
737
737
  return mix(a, b, c)[2];
738
738
  }
739
- // clang-format off
740
739
  function mix(a, b, c) {
741
740
  a -= b;
742
741
  a -= c;
@@ -767,7 +766,6 @@ function mix(a, b, c) {
767
766
  c ^= b >>> 15;
768
767
  return [a, b, c];
769
768
  }
770
- // clang-format on
771
769
  // Utils
772
770
  var Endian;
773
771
  (function (Endian) {
@@ -6157,6 +6155,7 @@ function createFactoryFunction(type) {
6157
6155
  }
6158
6156
 
6159
6157
  const UNUSABLE_INTERPOLATION_REGEXPS = [
6158
+ /@/, // control flow reserved symbol
6160
6159
  /^\s*$/, // empty
6161
6160
  /[<>]/, // html tag
6162
6161
  /^[{}]$/, // i18n expansion
@@ -23632,6 +23631,7 @@ const phases = [
23632
23631
  { kind: CompilationJobKind.Both, fn: generateNullishCoalesceExpressions },
23633
23632
  { kind: CompilationJobKind.Both, fn: expandSafeReads },
23634
23633
  { kind: CompilationJobKind.Both, fn: generateTemporaryVariables },
23634
+ { kind: CompilationJobKind.Both, fn: optimizeVariables },
23635
23635
  { kind: CompilationJobKind.Tmpl, fn: allocateSlots },
23636
23636
  { kind: CompilationJobKind.Tmpl, fn: resolveI18nElementPlaceholders },
23637
23637
  { kind: CompilationJobKind.Tmpl, fn: resolveI18nExpressionPlaceholders },
@@ -23643,7 +23643,6 @@ const phases = [
23643
23643
  { kind: CompilationJobKind.Tmpl, fn: removeI18nContexts },
23644
23644
  { kind: CompilationJobKind.Both, fn: countVariables },
23645
23645
  { kind: CompilationJobKind.Tmpl, fn: generateAdvance },
23646
- { kind: CompilationJobKind.Both, fn: optimizeVariables },
23647
23646
  { kind: CompilationJobKind.Both, fn: nameFunctionsAndVariables },
23648
23647
  { kind: CompilationJobKind.Tmpl, fn: resolveDeferDepsFns },
23649
23648
  { kind: CompilationJobKind.Tmpl, fn: mergeNextContextExpressions },
@@ -26758,6 +26757,10 @@ class HtmlAstToIvyAst {
26758
26757
  const relatedBlocks = [];
26759
26758
  for (let i = primaryBlockIndex + 1; i < siblings.length; i++) {
26760
26759
  const node = siblings[i];
26760
+ // Skip over comments.
26761
+ if (node instanceof Comment) {
26762
+ continue;
26763
+ }
26761
26764
  // Ignore empty text nodes between blocks.
26762
26765
  if (node instanceof Text && node.value.trim().length === 0) {
26763
26766
  // Add the text node to the processed nodes since we don't want
@@ -29056,7 +29059,7 @@ function publishFacade(global) {
29056
29059
  * @description
29057
29060
  * Entry point for all public APIs of the compiler package.
29058
29061
  */
29059
- const VERSION = new Version('18.0.0-rc.1');
29062
+ const VERSION = new Version('18.0.0-rc.3');
29060
29063
 
29061
29064
  class CompilerConfig {
29062
29065
  constructor({ defaultEncapsulation = ViewEncapsulation.Emulated, preserveWhitespaces, strictInjectionParameters, } = {}) {
@@ -30687,7 +30690,7 @@ const MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = '18.0.0';
30687
30690
  function compileDeclareClassMetadata(metadata) {
30688
30691
  const definitionMap = new DefinitionMap();
30689
30692
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
30690
- definitionMap.set('version', literal('18.0.0-rc.1'));
30693
+ definitionMap.set('version', literal('18.0.0-rc.3'));
30691
30694
  definitionMap.set('ngImport', importExpr(Identifiers.core));
30692
30695
  definitionMap.set('type', metadata.type);
30693
30696
  definitionMap.set('decorators', metadata.decorators);
@@ -30705,7 +30708,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
30705
30708
  callbackReturnDefinitionMap.set('ctorParameters', metadata.ctorParameters ?? literal(null));
30706
30709
  callbackReturnDefinitionMap.set('propDecorators', metadata.propDecorators ?? literal(null));
30707
30710
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
30708
- definitionMap.set('version', literal('18.0.0-rc.1'));
30711
+ definitionMap.set('version', literal('18.0.0-rc.3'));
30709
30712
  definitionMap.set('ngImport', importExpr(Identifiers.core));
30710
30713
  definitionMap.set('type', metadata.type);
30711
30714
  definitionMap.set('resolveDeferredDeps', compileComponentMetadataAsyncResolver(dependencies));
@@ -30800,7 +30803,7 @@ function createDirectiveDefinitionMap(meta) {
30800
30803
  const definitionMap = new DefinitionMap();
30801
30804
  const minVersion = getMinimumVersionForPartialOutput(meta);
30802
30805
  definitionMap.set('minVersion', literal(minVersion));
30803
- definitionMap.set('version', literal('18.0.0-rc.1'));
30806
+ definitionMap.set('version', literal('18.0.0-rc.3'));
30804
30807
  // e.g. `type: MyDirective`
30805
30808
  definitionMap.set('type', meta.type.value);
30806
30809
  if (meta.isStandalone) {
@@ -31222,7 +31225,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
31222
31225
  function compileDeclareFactoryFunction(meta) {
31223
31226
  const definitionMap = new DefinitionMap();
31224
31227
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
31225
- definitionMap.set('version', literal('18.0.0-rc.1'));
31228
+ definitionMap.set('version', literal('18.0.0-rc.3'));
31226
31229
  definitionMap.set('ngImport', importExpr(Identifiers.core));
31227
31230
  definitionMap.set('type', meta.type.value);
31228
31231
  definitionMap.set('deps', compileDependencies(meta.deps));
@@ -31257,7 +31260,7 @@ function compileDeclareInjectableFromMetadata(meta) {
31257
31260
  function createInjectableDefinitionMap(meta) {
31258
31261
  const definitionMap = new DefinitionMap();
31259
31262
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
31260
- definitionMap.set('version', literal('18.0.0-rc.1'));
31263
+ definitionMap.set('version', literal('18.0.0-rc.3'));
31261
31264
  definitionMap.set('ngImport', importExpr(Identifiers.core));
31262
31265
  definitionMap.set('type', meta.type.value);
31263
31266
  // Only generate providedIn property if it has a non-null value
@@ -31308,7 +31311,7 @@ function compileDeclareInjectorFromMetadata(meta) {
31308
31311
  function createInjectorDefinitionMap(meta) {
31309
31312
  const definitionMap = new DefinitionMap();
31310
31313
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
31311
- definitionMap.set('version', literal('18.0.0-rc.1'));
31314
+ definitionMap.set('version', literal('18.0.0-rc.3'));
31312
31315
  definitionMap.set('ngImport', importExpr(Identifiers.core));
31313
31316
  definitionMap.set('type', meta.type.value);
31314
31317
  definitionMap.set('providers', meta.providers);
@@ -31341,7 +31344,7 @@ function createNgModuleDefinitionMap(meta) {
31341
31344
  throw new Error('Invalid path! Local compilation mode should not get into the partial compilation path');
31342
31345
  }
31343
31346
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
31344
- definitionMap.set('version', literal('18.0.0-rc.1'));
31347
+ definitionMap.set('version', literal('18.0.0-rc.3'));
31345
31348
  definitionMap.set('ngImport', importExpr(Identifiers.core));
31346
31349
  definitionMap.set('type', meta.type.value);
31347
31350
  // We only generate the keys in the metadata if the arrays contain values.
@@ -31392,7 +31395,7 @@ function compileDeclarePipeFromMetadata(meta) {
31392
31395
  function createPipeDefinitionMap(meta) {
31393
31396
  const definitionMap = new DefinitionMap();
31394
31397
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
31395
- definitionMap.set('version', literal('18.0.0-rc.1'));
31398
+ definitionMap.set('version', literal('18.0.0-rc.3'));
31396
31399
  definitionMap.set('ngImport', importExpr(Identifiers.core));
31397
31400
  // e.g. `type: MyPipe`
31398
31401
  definitionMap.set('type', meta.type.value);