@angular/compiler 14.0.1 → 14.1.0-next.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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v14.0.1
2
+ * @license Angular v14.1.0-next.1
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v14.0.1
2
+ * @license Angular v14.1.0-next.1
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -6100,10 +6100,13 @@ function compileNgModuleDeclarationExpression(meta) {
6100
6100
  }
6101
6101
  return importExpr(Identifiers.defineNgModule).callFn([definitionMap.toLiteralMap()]);
6102
6102
  }
6103
- function createNgModuleType({ type: moduleType, declarations, imports, exports }) {
6103
+ function createNgModuleType({ type: moduleType, declarations, exports, imports, includeImportTypes, publicDeclarationTypes }) {
6104
6104
  return new ExpressionType(importExpr(Identifiers.NgModuleDeclaration, [
6105
- new ExpressionType(moduleType.type), tupleTypeOf(declarations), tupleTypeOf(imports),
6106
- tupleTypeOf(exports)
6105
+ new ExpressionType(moduleType.type),
6106
+ publicDeclarationTypes === null ? tupleTypeOf(declarations) :
6107
+ tupleOfTypes(publicDeclarationTypes),
6108
+ includeImportTypes ? tupleTypeOf(imports) : NONE_TYPE,
6109
+ tupleTypeOf(exports),
6107
6110
  ]));
6108
6111
  }
6109
6112
  /**
@@ -6147,6 +6150,10 @@ function tupleTypeOf(exp) {
6147
6150
  const types = exp.map(ref => typeofExpr(ref.type));
6148
6151
  return exp.length > 0 ? expressionType(literalArr(types)) : NONE_TYPE;
6149
6152
  }
6153
+ function tupleOfTypes(types) {
6154
+ const typeofTypes = types.map(type => typeofExpr(type));
6155
+ return types.length > 0 ? expressionType(literalArr(typeofTypes)) : NONE_TYPE;
6156
+ }
6150
6157
 
6151
6158
  /**
6152
6159
  * @license
@@ -19434,7 +19441,9 @@ class CompilerFacadeImpl {
19434
19441
  name: facade.name,
19435
19442
  type: wrapReference(facade.type),
19436
19443
  internalType: new WrappedNodeExpr(facade.type),
19437
- providers: new WrappedNodeExpr(facade.providers),
19444
+ providers: facade.providers && facade.providers.length > 0 ?
19445
+ new WrappedNodeExpr(facade.providers) :
19446
+ null,
19438
19447
  imports: facade.imports.map(i => new WrappedNodeExpr(i)),
19439
19448
  };
19440
19449
  const res = compileInjector(meta);
@@ -19452,7 +19461,9 @@ class CompilerFacadeImpl {
19452
19461
  adjacentType: new WrappedNodeExpr(facade.type),
19453
19462
  bootstrap: facade.bootstrap.map(wrapReference),
19454
19463
  declarations: facade.declarations.map(wrapReference),
19464
+ publicDeclarationTypes: null,
19455
19465
  imports: facade.imports.map(wrapReference),
19466
+ includeImportTypes: true,
19456
19467
  exports: facade.exports.map(wrapReference),
19457
19468
  selectorScopeMode: R3SelectorScopeMode.Inline,
19458
19469
  containsForwardDecls: false,
@@ -19869,7 +19880,8 @@ function convertDeclareInjectorFacadeToMetadata(declaration) {
19869
19880
  name: declaration.type.name,
19870
19881
  type: wrapReference(declaration.type),
19871
19882
  internalType: new WrappedNodeExpr(declaration.type),
19872
- providers: declaration.providers !== undefined ? new WrappedNodeExpr(declaration.providers) :
19883
+ providers: declaration.providers !== undefined && declaration.providers.length > 0 ?
19884
+ new WrappedNodeExpr(declaration.providers) :
19873
19885
  null,
19874
19886
  imports: declaration.imports !== undefined ?
19875
19887
  declaration.imports.map(i => new WrappedNodeExpr(i)) :
@@ -19888,7 +19900,7 @@ function publishFacade(global) {
19888
19900
  * Use of this source code is governed by an MIT-style license that can be
19889
19901
  * found in the LICENSE file at https://angular.io/license
19890
19902
  */
19891
- const VERSION = new Version('14.0.1');
19903
+ const VERSION = new Version('14.1.0-next.1');
19892
19904
 
19893
19905
  /**
19894
19906
  * @license
@@ -21921,7 +21933,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$6 = '12.0.0';
21921
21933
  function compileDeclareClassMetadata(metadata) {
21922
21934
  const definitionMap = new DefinitionMap();
21923
21935
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$6));
21924
- definitionMap.set('version', literal('14.0.1'));
21936
+ definitionMap.set('version', literal('14.1.0-next.1'));
21925
21937
  definitionMap.set('ngImport', importExpr(Identifiers.core));
21926
21938
  definitionMap.set('type', metadata.type);
21927
21939
  definitionMap.set('decorators', metadata.decorators);
@@ -22038,7 +22050,7 @@ function compileDeclareDirectiveFromMetadata(meta) {
22038
22050
  function createDirectiveDefinitionMap(meta) {
22039
22051
  const definitionMap = new DefinitionMap();
22040
22052
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
22041
- definitionMap.set('version', literal('14.0.1'));
22053
+ definitionMap.set('version', literal('14.1.0-next.1'));
22042
22054
  // e.g. `type: MyDirective`
22043
22055
  definitionMap.set('type', meta.internalType);
22044
22056
  if (meta.isStandalone) {
@@ -22252,7 +22264,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
22252
22264
  function compileDeclareFactoryFunction(meta) {
22253
22265
  const definitionMap = new DefinitionMap();
22254
22266
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
22255
- definitionMap.set('version', literal('14.0.1'));
22267
+ definitionMap.set('version', literal('14.1.0-next.1'));
22256
22268
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22257
22269
  definitionMap.set('type', meta.internalType);
22258
22270
  definitionMap.set('deps', compileDependencies(meta.deps));
@@ -22294,7 +22306,7 @@ function compileDeclareInjectableFromMetadata(meta) {
22294
22306
  function createInjectableDefinitionMap(meta) {
22295
22307
  const definitionMap = new DefinitionMap();
22296
22308
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
22297
- definitionMap.set('version', literal('14.0.1'));
22309
+ definitionMap.set('version', literal('14.1.0-next.1'));
22298
22310
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22299
22311
  definitionMap.set('type', meta.internalType);
22300
22312
  // Only generate providedIn property if it has a non-null value
@@ -22352,7 +22364,7 @@ function compileDeclareInjectorFromMetadata(meta) {
22352
22364
  function createInjectorDefinitionMap(meta) {
22353
22365
  const definitionMap = new DefinitionMap();
22354
22366
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
22355
- definitionMap.set('version', literal('14.0.1'));
22367
+ definitionMap.set('version', literal('14.1.0-next.1'));
22356
22368
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22357
22369
  definitionMap.set('type', meta.internalType);
22358
22370
  definitionMap.set('providers', meta.providers);
@@ -22389,7 +22401,7 @@ function compileDeclareNgModuleFromMetadata(meta) {
22389
22401
  function createNgModuleDefinitionMap(meta) {
22390
22402
  const definitionMap = new DefinitionMap();
22391
22403
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
22392
- definitionMap.set('version', literal('14.0.1'));
22404
+ definitionMap.set('version', literal('14.1.0-next.1'));
22393
22405
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22394
22406
  definitionMap.set('type', meta.internalType);
22395
22407
  // We only generate the keys in the metadata if the arrays contain values.
@@ -22447,7 +22459,7 @@ function compileDeclarePipeFromMetadata(meta) {
22447
22459
  function createPipeDefinitionMap(meta) {
22448
22460
  const definitionMap = new DefinitionMap();
22449
22461
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
22450
- definitionMap.set('version', literal('14.0.1'));
22462
+ definitionMap.set('version', literal('14.1.0-next.1'));
22451
22463
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22452
22464
  // e.g. `type: MyPipe`
22453
22465
  definitionMap.set('type', meta.internalType);