@angular/compiler 19.2.0-next.1 → 19.2.0-next.2

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 v19.2.0-next.1
2
+ * @license Angular v19.2.0-next.2
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -31008,7 +31008,7 @@ function publishFacade(global) {
31008
31008
  * @description
31009
31009
  * Entry point for all public APIs of the compiler package.
31010
31010
  */
31011
- const VERSION = new Version('19.2.0-next.1');
31011
+ const VERSION = new Version('19.2.0-next.2');
31012
31012
 
31013
31013
  class CompilerConfig {
31014
31014
  defaultEncapsulation;
@@ -32765,7 +32765,6 @@ function compileHmrInitializer(meta) {
32765
32765
  const dataName = 'd';
32766
32766
  const timestampName = 't';
32767
32767
  const importCallbackName = `${meta.className}_HmrLoad`;
32768
- const locals = meta.localDependencies.map((localName) => variable(localName));
32769
32768
  const namespaces = meta.namespaceDependencies.map((dep) => {
32770
32769
  return new ExternalExpr({ moduleName: dep.moduleName, name: null });
32771
32770
  });
@@ -32773,7 +32772,12 @@ function compileHmrInitializer(meta) {
32773
32772
  const defaultRead = variable(moduleName).prop('default');
32774
32773
  // ɵɵreplaceMetadata(Comp, m.default, [...namespaces], [...locals]);
32775
32774
  const replaceCall = importExpr(Identifiers.replaceMetadata)
32776
- .callFn([meta.type, defaultRead, literalArr(namespaces), literalArr(locals)]);
32775
+ .callFn([
32776
+ meta.type,
32777
+ defaultRead,
32778
+ literalArr(namespaces),
32779
+ literalArr(meta.localDependencies.map((l) => l.runtimeRepresentation)),
32780
+ ]);
32777
32781
  // (m) => m.default && ɵɵreplaceMetadata(...)
32778
32782
  const replaceCallback = arrowFn([new FnParam(moduleName)], defaultRead.and(replaceCall));
32779
32783
  // '<urlPartial>' + encodeURIComponent(t)
@@ -32831,8 +32835,11 @@ function compileHmrInitializer(meta) {
32831
32835
  */
32832
32836
  function compileHmrUpdateCallback(definitions, constantStatements, meta) {
32833
32837
  const namespaces = 'ɵɵnamespaces';
32834
- const params = [meta.className, namespaces, ...meta.localDependencies].map((name) => new FnParam(name, DYNAMIC_TYPE));
32838
+ const params = [meta.className, namespaces].map((name) => new FnParam(name, DYNAMIC_TYPE));
32835
32839
  const body = [];
32840
+ for (const local of meta.localDependencies) {
32841
+ params.push(new FnParam(local.name));
32842
+ }
32836
32843
  // Declare variables that read out the individual namespaces.
32837
32844
  for (let i = 0; i < meta.namespaceDependencies.length; i++) {
32838
32845
  body.push(new DeclareVarStmt(meta.namespaceDependencies[i].assignedName, variable(namespaces).key(literal(i)), DYNAMIC_TYPE, StmtModifier.Final));
@@ -32864,7 +32871,7 @@ const MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = '18.0.0';
32864
32871
  function compileDeclareClassMetadata(metadata) {
32865
32872
  const definitionMap = new DefinitionMap();
32866
32873
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
32867
- definitionMap.set('version', literal('19.2.0-next.1'));
32874
+ definitionMap.set('version', literal('19.2.0-next.2'));
32868
32875
  definitionMap.set('ngImport', importExpr(Identifiers.core));
32869
32876
  definitionMap.set('type', metadata.type);
32870
32877
  definitionMap.set('decorators', metadata.decorators);
@@ -32882,7 +32889,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
32882
32889
  callbackReturnDefinitionMap.set('ctorParameters', metadata.ctorParameters ?? literal(null));
32883
32890
  callbackReturnDefinitionMap.set('propDecorators', metadata.propDecorators ?? literal(null));
32884
32891
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
32885
- definitionMap.set('version', literal('19.2.0-next.1'));
32892
+ definitionMap.set('version', literal('19.2.0-next.2'));
32886
32893
  definitionMap.set('ngImport', importExpr(Identifiers.core));
32887
32894
  definitionMap.set('type', metadata.type);
32888
32895
  definitionMap.set('resolveDeferredDeps', compileComponentMetadataAsyncResolver(dependencies));
@@ -32977,7 +32984,7 @@ function createDirectiveDefinitionMap(meta) {
32977
32984
  const definitionMap = new DefinitionMap();
32978
32985
  const minVersion = getMinimumVersionForPartialOutput(meta);
32979
32986
  definitionMap.set('minVersion', literal(minVersion));
32980
- definitionMap.set('version', literal('19.2.0-next.1'));
32987
+ definitionMap.set('version', literal('19.2.0-next.2'));
32981
32988
  // e.g. `type: MyDirective`
32982
32989
  definitionMap.set('type', meta.type.value);
32983
32990
  if (meta.isStandalone !== undefined) {
@@ -33396,7 +33403,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
33396
33403
  function compileDeclareFactoryFunction(meta) {
33397
33404
  const definitionMap = new DefinitionMap();
33398
33405
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
33399
- definitionMap.set('version', literal('19.2.0-next.1'));
33406
+ definitionMap.set('version', literal('19.2.0-next.2'));
33400
33407
  definitionMap.set('ngImport', importExpr(Identifiers.core));
33401
33408
  definitionMap.set('type', meta.type.value);
33402
33409
  definitionMap.set('deps', compileDependencies(meta.deps));
@@ -33431,7 +33438,7 @@ function compileDeclareInjectableFromMetadata(meta) {
33431
33438
  function createInjectableDefinitionMap(meta) {
33432
33439
  const definitionMap = new DefinitionMap();
33433
33440
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
33434
- definitionMap.set('version', literal('19.2.0-next.1'));
33441
+ definitionMap.set('version', literal('19.2.0-next.2'));
33435
33442
  definitionMap.set('ngImport', importExpr(Identifiers.core));
33436
33443
  definitionMap.set('type', meta.type.value);
33437
33444
  // Only generate providedIn property if it has a non-null value
@@ -33482,7 +33489,7 @@ function compileDeclareInjectorFromMetadata(meta) {
33482
33489
  function createInjectorDefinitionMap(meta) {
33483
33490
  const definitionMap = new DefinitionMap();
33484
33491
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
33485
- definitionMap.set('version', literal('19.2.0-next.1'));
33492
+ definitionMap.set('version', literal('19.2.0-next.2'));
33486
33493
  definitionMap.set('ngImport', importExpr(Identifiers.core));
33487
33494
  definitionMap.set('type', meta.type.value);
33488
33495
  definitionMap.set('providers', meta.providers);
@@ -33515,7 +33522,7 @@ function createNgModuleDefinitionMap(meta) {
33515
33522
  throw new Error('Invalid path! Local compilation mode should not get into the partial compilation path');
33516
33523
  }
33517
33524
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
33518
- definitionMap.set('version', literal('19.2.0-next.1'));
33525
+ definitionMap.set('version', literal('19.2.0-next.2'));
33519
33526
  definitionMap.set('ngImport', importExpr(Identifiers.core));
33520
33527
  definitionMap.set('type', meta.type.value);
33521
33528
  // We only generate the keys in the metadata if the arrays contain values.
@@ -33566,7 +33573,7 @@ function compileDeclarePipeFromMetadata(meta) {
33566
33573
  function createPipeDefinitionMap(meta) {
33567
33574
  const definitionMap = new DefinitionMap();
33568
33575
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
33569
- definitionMap.set('version', literal('19.2.0-next.1'));
33576
+ definitionMap.set('version', literal('19.2.0-next.2'));
33570
33577
  definitionMap.set('ngImport', importExpr(Identifiers.core));
33571
33578
  // e.g. `type: MyPipe`
33572
33579
  definitionMap.set('type', meta.type.value);