@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
  */
@@ -6089,10 +6089,13 @@ function compileNgModuleDeclarationExpression(meta) {
6089
6089
  }
6090
6090
  return importExpr(Identifiers.defineNgModule).callFn([definitionMap.toLiteralMap()]);
6091
6091
  }
6092
- function createNgModuleType({ type: moduleType, declarations, imports, exports }) {
6092
+ function createNgModuleType({ type: moduleType, declarations, exports, imports, includeImportTypes, publicDeclarationTypes }) {
6093
6093
  return new ExpressionType(importExpr(Identifiers.NgModuleDeclaration, [
6094
- new ExpressionType(moduleType.type), tupleTypeOf(declarations), tupleTypeOf(imports),
6095
- tupleTypeOf(exports)
6094
+ new ExpressionType(moduleType.type),
6095
+ publicDeclarationTypes === null ? tupleTypeOf(declarations) :
6096
+ tupleOfTypes(publicDeclarationTypes),
6097
+ includeImportTypes ? tupleTypeOf(imports) : NONE_TYPE,
6098
+ tupleTypeOf(exports),
6096
6099
  ]));
6097
6100
  }
6098
6101
  /**
@@ -6136,6 +6139,10 @@ function tupleTypeOf(exp) {
6136
6139
  const types = exp.map(ref => typeofExpr(ref.type));
6137
6140
  return exp.length > 0 ? expressionType(literalArr(types)) : NONE_TYPE;
6138
6141
  }
6142
+ function tupleOfTypes(types) {
6143
+ const typeofTypes = types.map(type => typeofExpr(type));
6144
+ return types.length > 0 ? expressionType(literalArr(typeofTypes)) : NONE_TYPE;
6145
+ }
6139
6146
 
6140
6147
  /**
6141
6148
  * @license
@@ -19436,7 +19443,9 @@ class CompilerFacadeImpl {
19436
19443
  name: facade.name,
19437
19444
  type: wrapReference(facade.type),
19438
19445
  internalType: new WrappedNodeExpr(facade.type),
19439
- providers: new WrappedNodeExpr(facade.providers),
19446
+ providers: facade.providers && facade.providers.length > 0 ?
19447
+ new WrappedNodeExpr(facade.providers) :
19448
+ null,
19440
19449
  imports: facade.imports.map(i => new WrappedNodeExpr(i)),
19441
19450
  };
19442
19451
  const res = compileInjector(meta);
@@ -19454,7 +19463,9 @@ class CompilerFacadeImpl {
19454
19463
  adjacentType: new WrappedNodeExpr(facade.type),
19455
19464
  bootstrap: facade.bootstrap.map(wrapReference),
19456
19465
  declarations: facade.declarations.map(wrapReference),
19466
+ publicDeclarationTypes: null,
19457
19467
  imports: facade.imports.map(wrapReference),
19468
+ includeImportTypes: true,
19458
19469
  exports: facade.exports.map(wrapReference),
19459
19470
  selectorScopeMode: R3SelectorScopeMode.Inline,
19460
19471
  containsForwardDecls: false,
@@ -19827,7 +19838,8 @@ function convertDeclareInjectorFacadeToMetadata(declaration) {
19827
19838
  name: declaration.type.name,
19828
19839
  type: wrapReference(declaration.type),
19829
19840
  internalType: new WrappedNodeExpr(declaration.type),
19830
- providers: declaration.providers !== undefined ? new WrappedNodeExpr(declaration.providers) :
19841
+ providers: declaration.providers !== undefined && declaration.providers.length > 0 ?
19842
+ new WrappedNodeExpr(declaration.providers) :
19831
19843
  null,
19832
19844
  imports: declaration.imports !== undefined ?
19833
19845
  declaration.imports.map(i => new WrappedNodeExpr(i)) :
@@ -19846,7 +19858,7 @@ function publishFacade(global) {
19846
19858
  * Use of this source code is governed by an MIT-style license that can be
19847
19859
  * found in the LICENSE file at https://angular.io/license
19848
19860
  */
19849
- const VERSION = new Version('14.0.1');
19861
+ const VERSION = new Version('14.1.0-next.1');
19850
19862
 
19851
19863
  /**
19852
19864
  * @license
@@ -21873,7 +21885,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$6 = '12.0.0';
21873
21885
  function compileDeclareClassMetadata(metadata) {
21874
21886
  const definitionMap = new DefinitionMap();
21875
21887
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$6));
21876
- definitionMap.set('version', literal('14.0.1'));
21888
+ definitionMap.set('version', literal('14.1.0-next.1'));
21877
21889
  definitionMap.set('ngImport', importExpr(Identifiers.core));
21878
21890
  definitionMap.set('type', metadata.type);
21879
21891
  definitionMap.set('decorators', metadata.decorators);
@@ -21990,7 +22002,7 @@ function compileDeclareDirectiveFromMetadata(meta) {
21990
22002
  function createDirectiveDefinitionMap(meta) {
21991
22003
  const definitionMap = new DefinitionMap();
21992
22004
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
21993
- definitionMap.set('version', literal('14.0.1'));
22005
+ definitionMap.set('version', literal('14.1.0-next.1'));
21994
22006
  // e.g. `type: MyDirective`
21995
22007
  definitionMap.set('type', meta.internalType);
21996
22008
  if (meta.isStandalone) {
@@ -22204,7 +22216,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
22204
22216
  function compileDeclareFactoryFunction(meta) {
22205
22217
  const definitionMap = new DefinitionMap();
22206
22218
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
22207
- definitionMap.set('version', literal('14.0.1'));
22219
+ definitionMap.set('version', literal('14.1.0-next.1'));
22208
22220
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22209
22221
  definitionMap.set('type', meta.internalType);
22210
22222
  definitionMap.set('deps', compileDependencies(meta.deps));
@@ -22246,7 +22258,7 @@ function compileDeclareInjectableFromMetadata(meta) {
22246
22258
  function createInjectableDefinitionMap(meta) {
22247
22259
  const definitionMap = new DefinitionMap();
22248
22260
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
22249
- definitionMap.set('version', literal('14.0.1'));
22261
+ definitionMap.set('version', literal('14.1.0-next.1'));
22250
22262
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22251
22263
  definitionMap.set('type', meta.internalType);
22252
22264
  // Only generate providedIn property if it has a non-null value
@@ -22304,7 +22316,7 @@ function compileDeclareInjectorFromMetadata(meta) {
22304
22316
  function createInjectorDefinitionMap(meta) {
22305
22317
  const definitionMap = new DefinitionMap();
22306
22318
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
22307
- definitionMap.set('version', literal('14.0.1'));
22319
+ definitionMap.set('version', literal('14.1.0-next.1'));
22308
22320
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22309
22321
  definitionMap.set('type', meta.internalType);
22310
22322
  definitionMap.set('providers', meta.providers);
@@ -22341,7 +22353,7 @@ function compileDeclareNgModuleFromMetadata(meta) {
22341
22353
  function createNgModuleDefinitionMap(meta) {
22342
22354
  const definitionMap = new DefinitionMap();
22343
22355
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
22344
- definitionMap.set('version', literal('14.0.1'));
22356
+ definitionMap.set('version', literal('14.1.0-next.1'));
22345
22357
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22346
22358
  definitionMap.set('type', meta.internalType);
22347
22359
  // We only generate the keys in the metadata if the arrays contain values.
@@ -22399,7 +22411,7 @@ function compileDeclarePipeFromMetadata(meta) {
22399
22411
  function createPipeDefinitionMap(meta) {
22400
22412
  const definitionMap = new DefinitionMap();
22401
22413
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
22402
- definitionMap.set('version', literal('14.0.1'));
22414
+ definitionMap.set('version', literal('14.1.0-next.1'));
22403
22415
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22404
22416
  // e.g. `type: MyPipe`
22405
22417
  definitionMap.set('type', meta.internalType);