@angular/compiler-cli 14.2.0-rc.0 → 14.2.0
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/bundles/chunk-DEPZI7L5.js +2 -2
- package/bundles/{chunk-B7JAY2ME.js → chunk-DGTSPJIN.js} +3 -3
- package/bundles/{chunk-B7JAY2ME.js.map → chunk-DGTSPJIN.js.map} +0 -0
- package/bundles/{chunk-F25ME2LE.js → chunk-I4BG3CAN.js} +3 -3
- package/bundles/{chunk-F25ME2LE.js.map → chunk-I4BG3CAN.js.map} +0 -0
- package/bundles/{chunk-KL7KPCG5.js → chunk-J6AVV3MN.js} +27 -13
- package/bundles/chunk-J6AVV3MN.js.map +6 -0
- package/bundles/{chunk-4OBZ37XJ.js → chunk-NDIOQ2EH.js} +41 -5
- package/bundles/{chunk-4OBZ37XJ.js.map → chunk-NDIOQ2EH.js.map} +1 -1
- package/bundles/{chunk-5D4YK7IY.js → chunk-TTIGAMYZ.js} +2 -2
- package/bundles/{chunk-5D4YK7IY.js.map → chunk-TTIGAMYZ.js.map} +0 -0
- package/bundles/index.js +3 -3
- package/bundles/ngcc/index.js +4 -4
- package/bundles/ngcc/main-ngcc.js +4 -4
- package/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js +3 -3
- package/bundles/private/migrations.js +1 -1
- package/bundles/src/bin/ng_xi18n.js +3 -3
- package/bundles/src/bin/ngc.js +3 -3
- package/bundles_metadata.json +1 -1
- package/ngcc/src/packages/build_marker.d.ts +1 -1
- package/package.json +2 -2
- package/src/ngtsc/annotations/component/src/metadata.d.ts +1 -0
- package/src/ngtsc/annotations/directive/src/handler.d.ts +2 -0
- package/src/ngtsc/annotations/ng_module/src/handler.d.ts +1 -0
- package/src/ngtsc/annotations/src/pipe.d.ts +1 -0
- package/src/ngtsc/core/api/src/options.d.ts +4 -0
- package/src/ngtsc/core/src/compiler.d.ts +1 -1
- package/src/ngtsc/metadata/src/api.d.ts +13 -0
- package/src/ngtsc/typecheck/api/checker.d.ts +14 -4
- package/src/ngtsc/typecheck/src/checker.d.ts +5 -1
- package/bundles/chunk-KL7KPCG5.js.map +0 -6
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
aliasTransformFactory,
|
|
31
31
|
declarationTransformFactory,
|
|
32
32
|
ivyTransformFactory
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-J6AVV3MN.js";
|
|
34
34
|
import {
|
|
35
35
|
TypeScriptReflectionHost,
|
|
36
36
|
isNamedClassDeclaration
|
|
@@ -5258,7 +5258,7 @@ function sourceSpanEqual(a, b) {
|
|
|
5258
5258
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/checker.mjs
|
|
5259
5259
|
var REGISTRY2 = new DomElementSchemaRegistry2();
|
|
5260
5260
|
var TemplateTypeCheckerImpl = class {
|
|
5261
|
-
constructor(originalProgram, programDriver, typeCheckAdapter, config, refEmitter, reflector, compilerHost, priorBuild, componentScopeReader, typeCheckScopeRegistry, perf) {
|
|
5261
|
+
constructor(originalProgram, programDriver, typeCheckAdapter, config, refEmitter, reflector, compilerHost, priorBuild, metaReader, componentScopeReader, typeCheckScopeRegistry, perf) {
|
|
5262
5262
|
this.originalProgram = originalProgram;
|
|
5263
5263
|
this.programDriver = programDriver;
|
|
5264
5264
|
this.typeCheckAdapter = typeCheckAdapter;
|
|
@@ -5267,6 +5267,7 @@ var TemplateTypeCheckerImpl = class {
|
|
|
5267
5267
|
this.reflector = reflector;
|
|
5268
5268
|
this.compilerHost = compilerHost;
|
|
5269
5269
|
this.priorBuild = priorBuild;
|
|
5270
|
+
this.metaReader = metaReader;
|
|
5270
5271
|
this.componentScopeReader = componentScopeReader;
|
|
5271
5272
|
this.typeCheckScopeRegistry = typeCheckScopeRegistry;
|
|
5272
5273
|
this.perf = perf;
|
|
@@ -5652,6 +5653,40 @@ var TemplateTypeCheckerImpl = class {
|
|
|
5652
5653
|
getPotentialDomEvents(tagName) {
|
|
5653
5654
|
return REGISTRY2.allKnownEventsOfElement(tagName);
|
|
5654
5655
|
}
|
|
5656
|
+
getPrimaryAngularDecorator(target) {
|
|
5657
|
+
this.ensureAllShimsForOneFile(target.getSourceFile());
|
|
5658
|
+
if (!isNamedClassDeclaration(target)) {
|
|
5659
|
+
return null;
|
|
5660
|
+
}
|
|
5661
|
+
const ref = new Reference(target);
|
|
5662
|
+
const dirMeta = this.metaReader.getDirectiveMetadata(ref);
|
|
5663
|
+
if (dirMeta !== null) {
|
|
5664
|
+
return dirMeta.decorator;
|
|
5665
|
+
}
|
|
5666
|
+
const pipeMeta = this.metaReader.getPipeMetadata(ref);
|
|
5667
|
+
if (pipeMeta !== null) {
|
|
5668
|
+
return pipeMeta.decorator;
|
|
5669
|
+
}
|
|
5670
|
+
const ngModuleMeta = this.metaReader.getNgModuleMetadata(ref);
|
|
5671
|
+
if (ngModuleMeta !== null) {
|
|
5672
|
+
return ngModuleMeta.decorator;
|
|
5673
|
+
}
|
|
5674
|
+
return null;
|
|
5675
|
+
}
|
|
5676
|
+
getOwningNgModule(component) {
|
|
5677
|
+
if (!isNamedClassDeclaration(component)) {
|
|
5678
|
+
return null;
|
|
5679
|
+
}
|
|
5680
|
+
const dirMeta = this.metaReader.getDirectiveMetadata(new Reference(component));
|
|
5681
|
+
if (dirMeta !== null && dirMeta.isStandalone) {
|
|
5682
|
+
return null;
|
|
5683
|
+
}
|
|
5684
|
+
const scope = this.componentScopeReader.getScopeForComponent(component);
|
|
5685
|
+
if (scope === null || scope.kind !== ComponentScopeKind.NgModule || !isNamedClassDeclaration(scope.ngModule)) {
|
|
5686
|
+
return null;
|
|
5687
|
+
}
|
|
5688
|
+
return scope.ngModule;
|
|
5689
|
+
}
|
|
5655
5690
|
getScopeData(component) {
|
|
5656
5691
|
if (this.scopeCache.has(component)) {
|
|
5657
5692
|
return this.scopeCache.get(component);
|
|
@@ -6264,19 +6299,20 @@ function incrementalFromStateTicket(oldProgram, oldState, newProgram, options, i
|
|
|
6264
6299
|
}
|
|
6265
6300
|
var NgCompiler = class {
|
|
6266
6301
|
constructor(adapter, options, inputProgram, programDriver, incrementalStrategy, incrementalCompilation, enableTemplateTypeChecker, usePoisonedData, livePerfRecorder) {
|
|
6302
|
+
var _a;
|
|
6267
6303
|
this.adapter = adapter;
|
|
6268
6304
|
this.options = options;
|
|
6269
6305
|
this.inputProgram = inputProgram;
|
|
6270
6306
|
this.programDriver = programDriver;
|
|
6271
6307
|
this.incrementalStrategy = incrementalStrategy;
|
|
6272
6308
|
this.incrementalCompilation = incrementalCompilation;
|
|
6273
|
-
this.enableTemplateTypeChecker = enableTemplateTypeChecker;
|
|
6274
6309
|
this.usePoisonedData = usePoisonedData;
|
|
6275
6310
|
this.livePerfRecorder = livePerfRecorder;
|
|
6276
6311
|
this.compilation = null;
|
|
6277
6312
|
this.constructionDiagnostics = [];
|
|
6278
6313
|
this.nonTemplateDiagnostics = null;
|
|
6279
6314
|
this.delegatingPerfRecorder = new DelegatingPerfRecorder(this.perfRecorder);
|
|
6315
|
+
this.enableTemplateTypeChecker = enableTemplateTypeChecker || ((_a = options._enableTemplateTypeChecker) != null ? _a : false);
|
|
6280
6316
|
this.constructionDiagnostics.push(...this.adapter.constructionDiagnostics, ...verifyCompatibleTypeCheckOptions(this.options));
|
|
6281
6317
|
this.currentProgram = inputProgram;
|
|
6282
6318
|
this.closureCompilerEnabled = !!this.options.annotateForClosureCompiler;
|
|
@@ -6723,7 +6759,7 @@ var NgCompiler = class {
|
|
|
6723
6759
|
this.incrementalStrategy.setIncrementalState(this.incrementalCompilation.state, program);
|
|
6724
6760
|
this.currentProgram = program;
|
|
6725
6761
|
});
|
|
6726
|
-
const templateTypeChecker = new TemplateTypeCheckerImpl(this.inputProgram, notifyingDriver, traitCompiler, this.getTypeCheckingConfig(), refEmitter, reflector, this.adapter, this.incrementalCompilation, scopeReader, typeCheckScopeRegistry, this.delegatingPerfRecorder);
|
|
6762
|
+
const templateTypeChecker = new TemplateTypeCheckerImpl(this.inputProgram, notifyingDriver, traitCompiler, this.getTypeCheckingConfig(), refEmitter, reflector, this.adapter, this.incrementalCompilation, metaReader, scopeReader, typeCheckScopeRegistry, this.delegatingPerfRecorder);
|
|
6727
6763
|
const extendedTemplateChecker = this.constructionDiagnostics.length === 0 ? new ExtendedTemplateCheckerImpl(templateTypeChecker, checker, ALL_DIAGNOSTIC_FACTORIES, this.options) : null;
|
|
6728
6764
|
return {
|
|
6729
6765
|
isCore,
|
|
@@ -7494,4 +7530,4 @@ export {
|
|
|
7494
7530
|
* found in the LICENSE file at https://angular.io/license
|
|
7495
7531
|
*/
|
|
7496
7532
|
// Closure Compiler ignores @suppress and similar if the comment contains @license.
|
|
7497
|
-
//# sourceMappingURL=chunk-
|
|
7533
|
+
//# sourceMappingURL=chunk-NDIOQ2EH.js.map
|