@angular-eslint/bundled-angular-compiler 16.0.4-alpha.29 → 16.0.4-alpha.34
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.
- package/dist/index.js +82 -36
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @license Angular v16.1.
|
|
4
|
+
* @license Angular v16.1.4
|
|
5
5
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
6
6
|
* License: MIT
|
|
7
7
|
*/
|
|
@@ -5583,31 +5583,49 @@ exports.R3SelectorScopeMode = void 0;
|
|
|
5583
5583
|
*/
|
|
5584
5584
|
R3SelectorScopeMode[R3SelectorScopeMode["Omit"] = 2] = "Omit";
|
|
5585
5585
|
})(exports.R3SelectorScopeMode || (exports.R3SelectorScopeMode = {}));
|
|
5586
|
+
/**
|
|
5587
|
+
* The type of the NgModule meta data.
|
|
5588
|
+
* - Global: Used for full and partial compilation modes which mainly includes R3References.
|
|
5589
|
+
* - Local: Used for the local compilation mode which mainly includes the raw expressions as appears
|
|
5590
|
+
* in the NgModule decorator.
|
|
5591
|
+
*/
|
|
5592
|
+
exports.R3NgModuleMetadataKind = void 0;
|
|
5593
|
+
(function (R3NgModuleMetadataKind) {
|
|
5594
|
+
R3NgModuleMetadataKind[R3NgModuleMetadataKind["Global"] = 0] = "Global";
|
|
5595
|
+
R3NgModuleMetadataKind[R3NgModuleMetadataKind["Local"] = 1] = "Local";
|
|
5596
|
+
})(exports.R3NgModuleMetadataKind || (exports.R3NgModuleMetadataKind = {}));
|
|
5586
5597
|
/**
|
|
5587
5598
|
* Construct an `R3NgModuleDef` for the given `R3NgModuleMetadata`.
|
|
5588
5599
|
*/
|
|
5589
5600
|
function compileNgModule(meta) {
|
|
5590
|
-
const { type: moduleType, bootstrap, declarations, imports, exports: exports$1, schemas, containsForwardDecls, selectorScopeMode, id } = meta;
|
|
5591
5601
|
const statements = [];
|
|
5592
5602
|
const definitionMap = new DefinitionMap();
|
|
5593
|
-
definitionMap.set('type',
|
|
5594
|
-
|
|
5595
|
-
|
|
5603
|
+
definitionMap.set('type', meta.type.value);
|
|
5604
|
+
// Assign bootstrap definition
|
|
5605
|
+
if (meta.kind === exports.R3NgModuleMetadataKind.Global) {
|
|
5606
|
+
if (meta.bootstrap.length > 0) {
|
|
5607
|
+
definitionMap.set('bootstrap', refsToArray(meta.bootstrap, meta.containsForwardDecls));
|
|
5608
|
+
}
|
|
5609
|
+
}
|
|
5610
|
+
else {
|
|
5611
|
+
if (meta.bootstrapExpression) {
|
|
5612
|
+
definitionMap.set('bootstrap', meta.bootstrapExpression);
|
|
5613
|
+
}
|
|
5596
5614
|
}
|
|
5597
|
-
if (selectorScopeMode === exports.R3SelectorScopeMode.Inline) {
|
|
5615
|
+
if (meta.selectorScopeMode === exports.R3SelectorScopeMode.Inline) {
|
|
5598
5616
|
// If requested to emit scope information inline, pass the `declarations`, `imports` and
|
|
5599
5617
|
// `exports` to the `ɵɵdefineNgModule()` call directly.
|
|
5600
|
-
if (declarations.length > 0) {
|
|
5601
|
-
definitionMap.set('declarations', refsToArray(declarations, containsForwardDecls));
|
|
5618
|
+
if (meta.declarations.length > 0) {
|
|
5619
|
+
definitionMap.set('declarations', refsToArray(meta.declarations, meta.containsForwardDecls));
|
|
5602
5620
|
}
|
|
5603
|
-
if (imports.length > 0) {
|
|
5604
|
-
definitionMap.set('imports', refsToArray(imports, containsForwardDecls));
|
|
5621
|
+
if (meta.imports.length > 0) {
|
|
5622
|
+
definitionMap.set('imports', refsToArray(meta.imports, meta.containsForwardDecls));
|
|
5605
5623
|
}
|
|
5606
|
-
if (exports
|
|
5607
|
-
definitionMap.set('exports', refsToArray(exports
|
|
5624
|
+
if (meta.exports.length > 0) {
|
|
5625
|
+
definitionMap.set('exports', refsToArray(meta.exports, meta.containsForwardDecls));
|
|
5608
5626
|
}
|
|
5609
5627
|
}
|
|
5610
|
-
else if (selectorScopeMode === exports.R3SelectorScopeMode.SideEffect) {
|
|
5628
|
+
else if (meta.selectorScopeMode === exports.R3SelectorScopeMode.SideEffect) {
|
|
5611
5629
|
// In this mode, scope information is not passed into `ɵɵdefineNgModule` as it
|
|
5612
5630
|
// would prevent tree-shaking of the declarations, imports and exports references. Instead, it's
|
|
5613
5631
|
// patched onto the NgModule definition with a `ɵɵsetNgModuleScope` call that's guarded by the
|
|
@@ -5618,14 +5636,14 @@ function compileNgModule(meta) {
|
|
|
5618
5636
|
}
|
|
5619
5637
|
}
|
|
5620
5638
|
else ;
|
|
5621
|
-
if (schemas !== null && schemas.length > 0) {
|
|
5622
|
-
definitionMap.set('schemas', literalArr(schemas.map(ref => ref.value)));
|
|
5639
|
+
if (meta.schemas !== null && meta.schemas.length > 0) {
|
|
5640
|
+
definitionMap.set('schemas', literalArr(meta.schemas.map(ref => ref.value)));
|
|
5623
5641
|
}
|
|
5624
|
-
if (id !== null) {
|
|
5625
|
-
definitionMap.set('id', id);
|
|
5642
|
+
if (meta.id !== null) {
|
|
5643
|
+
definitionMap.set('id', meta.id);
|
|
5626
5644
|
// Generate a side-effectful call to register this NgModule by its id, as per the semantics of
|
|
5627
5645
|
// NgModule ids.
|
|
5628
|
-
statements.push(importExpr(Identifiers.registerNgModuleType).callFn([
|
|
5646
|
+
statements.push(importExpr(Identifiers.registerNgModuleType).callFn([meta.type.value, meta.id]).toStmt());
|
|
5629
5647
|
}
|
|
5630
5648
|
const expression = importExpr(Identifiers.defineNgModule).callFn([definitionMap.toLiteralMap()], undefined, true);
|
|
5631
5649
|
const type = createNgModuleType(meta);
|
|
@@ -5658,13 +5676,17 @@ function compileNgModuleDeclarationExpression(meta) {
|
|
|
5658
5676
|
}
|
|
5659
5677
|
return importExpr(Identifiers.defineNgModule).callFn([definitionMap.toLiteralMap()]);
|
|
5660
5678
|
}
|
|
5661
|
-
function createNgModuleType(
|
|
5679
|
+
function createNgModuleType(meta) {
|
|
5680
|
+
if (meta.kind === exports.R3NgModuleMetadataKind.Local) {
|
|
5681
|
+
return new ExpressionType(meta.type.value);
|
|
5682
|
+
}
|
|
5683
|
+
const { type: moduleType, declarations, exports: exports$1, imports, includeImportTypes, publicDeclarationTypes } = meta;
|
|
5662
5684
|
return new ExpressionType(importExpr(Identifiers.NgModuleDeclaration, [
|
|
5663
5685
|
new ExpressionType(moduleType.type),
|
|
5664
5686
|
publicDeclarationTypes === null ? tupleTypeOf(declarations) :
|
|
5665
5687
|
tupleOfTypes(publicDeclarationTypes),
|
|
5666
5688
|
includeImportTypes ? tupleTypeOf(imports) : NONE_TYPE,
|
|
5667
|
-
tupleTypeOf(exports),
|
|
5689
|
+
tupleTypeOf(exports$1),
|
|
5668
5690
|
]));
|
|
5669
5691
|
}
|
|
5670
5692
|
/**
|
|
@@ -5674,16 +5696,36 @@ function createNgModuleType({ type: moduleType, declarations, exports, imports,
|
|
|
5674
5696
|
* symbols to become tree-shakeable.
|
|
5675
5697
|
*/
|
|
5676
5698
|
function generateSetNgModuleScopeCall(meta) {
|
|
5677
|
-
const { type: moduleType, declarations, imports, exports, containsForwardDecls } = meta;
|
|
5678
5699
|
const scopeMap = new DefinitionMap();
|
|
5679
|
-
if (
|
|
5680
|
-
|
|
5700
|
+
if (meta.kind === exports.R3NgModuleMetadataKind.Global) {
|
|
5701
|
+
if (meta.declarations.length > 0) {
|
|
5702
|
+
scopeMap.set('declarations', refsToArray(meta.declarations, meta.containsForwardDecls));
|
|
5703
|
+
}
|
|
5681
5704
|
}
|
|
5682
|
-
|
|
5683
|
-
|
|
5705
|
+
else {
|
|
5706
|
+
if (meta.declarationsExpression) {
|
|
5707
|
+
scopeMap.set('declarations', meta.declarationsExpression);
|
|
5708
|
+
}
|
|
5709
|
+
}
|
|
5710
|
+
if (meta.kind === exports.R3NgModuleMetadataKind.Global) {
|
|
5711
|
+
if (meta.imports.length > 0) {
|
|
5712
|
+
scopeMap.set('imports', refsToArray(meta.imports, meta.containsForwardDecls));
|
|
5713
|
+
}
|
|
5714
|
+
}
|
|
5715
|
+
else {
|
|
5716
|
+
if (meta.importsExpression) {
|
|
5717
|
+
scopeMap.set('imports', meta.importsExpression);
|
|
5718
|
+
}
|
|
5719
|
+
}
|
|
5720
|
+
if (meta.kind === exports.R3NgModuleMetadataKind.Global) {
|
|
5721
|
+
if (meta.exports.length > 0) {
|
|
5722
|
+
scopeMap.set('exports', refsToArray(meta.exports, meta.containsForwardDecls));
|
|
5723
|
+
}
|
|
5684
5724
|
}
|
|
5685
|
-
|
|
5686
|
-
|
|
5725
|
+
else {
|
|
5726
|
+
if (meta.exportsExpression) {
|
|
5727
|
+
scopeMap.set('exports', meta.exportsExpression);
|
|
5728
|
+
}
|
|
5687
5729
|
}
|
|
5688
5730
|
if (Object.keys(scopeMap.values).length === 0) {
|
|
5689
5731
|
return null;
|
|
@@ -5691,7 +5733,7 @@ function generateSetNgModuleScopeCall(meta) {
|
|
|
5691
5733
|
// setNgModuleScope(...)
|
|
5692
5734
|
const fnCall = new InvokeFunctionExpr(
|
|
5693
5735
|
/* fn */ importExpr(Identifiers.setNgModuleScope),
|
|
5694
|
-
/* args */ [
|
|
5736
|
+
/* args */ [meta.type.value, scopeMap.toLiteralMap()]);
|
|
5695
5737
|
// (ngJitMode guard) && setNgModuleScope(...)
|
|
5696
5738
|
const guardedCall = jitOnlyGuardedExpression(fnCall);
|
|
5697
5739
|
// function() { (ngJitMode guard) && setNgModuleScope(...); }
|
|
@@ -19866,6 +19908,7 @@ class CompilerFacadeImpl {
|
|
|
19866
19908
|
}
|
|
19867
19909
|
compileNgModule(angularCoreEnv, sourceMapUrl, facade) {
|
|
19868
19910
|
const meta = {
|
|
19911
|
+
kind: exports.R3NgModuleMetadataKind.Global,
|
|
19869
19912
|
type: wrapReference(facade.type),
|
|
19870
19913
|
bootstrap: facade.bootstrap.map(wrapReference),
|
|
19871
19914
|
declarations: facade.declarations.map(wrapReference),
|
|
@@ -20377,7 +20420,7 @@ function publishFacade(global) {
|
|
|
20377
20420
|
* @description
|
|
20378
20421
|
* Entry point for all public APIs of the compiler package.
|
|
20379
20422
|
*/
|
|
20380
|
-
const VERSION = new Version('16.1.
|
|
20423
|
+
const VERSION = new Version('16.1.4');
|
|
20381
20424
|
|
|
20382
20425
|
class CompilerConfig {
|
|
20383
20426
|
constructor({ defaultEncapsulation = exports.ViewEncapsulation.Emulated, useJit = true, missingTranslation = null, preserveWhitespaces, strictInjectionParameters } = {}) {
|
|
@@ -22305,7 +22348,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$6 = '12.0.0';
|
|
|
22305
22348
|
function compileDeclareClassMetadata(metadata) {
|
|
22306
22349
|
const definitionMap = new DefinitionMap();
|
|
22307
22350
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$6));
|
|
22308
|
-
definitionMap.set('version', literal('16.1.
|
|
22351
|
+
definitionMap.set('version', literal('16.1.4'));
|
|
22309
22352
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22310
22353
|
definitionMap.set('type', metadata.type);
|
|
22311
22354
|
definitionMap.set('decorators', metadata.decorators);
|
|
@@ -22408,7 +22451,7 @@ function compileDeclareDirectiveFromMetadata(meta) {
|
|
|
22408
22451
|
function createDirectiveDefinitionMap(meta) {
|
|
22409
22452
|
const definitionMap = new DefinitionMap();
|
|
22410
22453
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
|
|
22411
|
-
definitionMap.set('version', literal('16.1.
|
|
22454
|
+
definitionMap.set('version', literal('16.1.4'));
|
|
22412
22455
|
// e.g. `type: MyDirective`
|
|
22413
22456
|
definitionMap.set('type', meta.type.value);
|
|
22414
22457
|
if (meta.isStandalone) {
|
|
@@ -22633,7 +22676,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
|
|
|
22633
22676
|
function compileDeclareFactoryFunction(meta) {
|
|
22634
22677
|
const definitionMap = new DefinitionMap();
|
|
22635
22678
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
|
|
22636
|
-
definitionMap.set('version', literal('16.1.
|
|
22679
|
+
definitionMap.set('version', literal('16.1.4'));
|
|
22637
22680
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22638
22681
|
definitionMap.set('type', meta.type.value);
|
|
22639
22682
|
definitionMap.set('deps', compileDependencies(meta.deps));
|
|
@@ -22668,7 +22711,7 @@ function compileDeclareInjectableFromMetadata(meta) {
|
|
|
22668
22711
|
function createInjectableDefinitionMap(meta) {
|
|
22669
22712
|
const definitionMap = new DefinitionMap();
|
|
22670
22713
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
|
|
22671
|
-
definitionMap.set('version', literal('16.1.
|
|
22714
|
+
definitionMap.set('version', literal('16.1.4'));
|
|
22672
22715
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22673
22716
|
definitionMap.set('type', meta.type.value);
|
|
22674
22717
|
// Only generate providedIn property if it has a non-null value
|
|
@@ -22719,7 +22762,7 @@ function compileDeclareInjectorFromMetadata(meta) {
|
|
|
22719
22762
|
function createInjectorDefinitionMap(meta) {
|
|
22720
22763
|
const definitionMap = new DefinitionMap();
|
|
22721
22764
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
|
|
22722
|
-
definitionMap.set('version', literal('16.1.
|
|
22765
|
+
definitionMap.set('version', literal('16.1.4'));
|
|
22723
22766
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22724
22767
|
definitionMap.set('type', meta.type.value);
|
|
22725
22768
|
definitionMap.set('providers', meta.providers);
|
|
@@ -22748,8 +22791,11 @@ function compileDeclareNgModuleFromMetadata(meta) {
|
|
|
22748
22791
|
*/
|
|
22749
22792
|
function createNgModuleDefinitionMap(meta) {
|
|
22750
22793
|
const definitionMap = new DefinitionMap();
|
|
22794
|
+
if (meta.kind === exports.R3NgModuleMetadataKind.Local) {
|
|
22795
|
+
throw new Error('Invalid path! Local compilation mode should not get into the partial compilation path');
|
|
22796
|
+
}
|
|
22751
22797
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
|
|
22752
|
-
definitionMap.set('version', literal('16.1.
|
|
22798
|
+
definitionMap.set('version', literal('16.1.4'));
|
|
22753
22799
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22754
22800
|
definitionMap.set('type', meta.type.value);
|
|
22755
22801
|
// We only generate the keys in the metadata if the arrays contain values.
|
|
@@ -22800,7 +22846,7 @@ function compileDeclarePipeFromMetadata(meta) {
|
|
|
22800
22846
|
function createPipeDefinitionMap(meta) {
|
|
22801
22847
|
const definitionMap = new DefinitionMap();
|
|
22802
22848
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
22803
|
-
definitionMap.set('version', literal('16.1.
|
|
22849
|
+
definitionMap.set('version', literal('16.1.4'));
|
|
22804
22850
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22805
22851
|
// e.g. `type: MyPipe`
|
|
22806
22852
|
definitionMap.set('type', meta.type.value);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-eslint/bundled-angular-compiler",
|
|
3
|
-
"version": "16.0.4-alpha.
|
|
3
|
+
"version": "16.0.4-alpha.34+93464ca",
|
|
4
4
|
"description": "A CJS bundled version of @angular/compiler",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -15,5 +15,5 @@
|
|
|
15
15
|
"package.json",
|
|
16
16
|
"README.md"
|
|
17
17
|
],
|
|
18
|
-
"gitHead": "
|
|
18
|
+
"gitHead": "93464ca55f7938a3bd99c7560d05ca24bea1e7c7"
|
|
19
19
|
}
|