@angular/compiler-cli 17.3.0-next.0 → 17.3.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.
- package/bundles/{chunk-NZQBYQYJ.js → chunk-2CAUFIKU.js} +18 -18
- package/bundles/{chunk-NZQBYQYJ.js.map → chunk-2CAUFIKU.js.map} +1 -1
- package/bundles/{chunk-GWFFFWTW.js → chunk-5A5Y7O22.js} +103 -69
- package/bundles/chunk-5A5Y7O22.js.map +6 -0
- package/bundles/{chunk-XLXSE3QH.js → chunk-7VU7HCQZ.js} +213 -153
- package/bundles/{chunk-XLXSE3QH.js.map → chunk-7VU7HCQZ.js.map} +3 -3
- package/bundles/{chunk-JKNKVO7U.js → chunk-FPKC3HSK.js} +2 -2
- package/bundles/{chunk-VPKIGOWE.js → chunk-IIZOI4XA.js} +4 -4
- package/bundles/{chunk-OW77LBBK.js → chunk-YVYW546M.js} +487 -483
- package/bundles/chunk-YVYW546M.js.map +6 -0
- package/bundles/index.js +5 -5
- package/bundles/linker/babel/index.js +2 -2
- package/bundles/linker/index.js +2 -2
- package/bundles/private/migrations.js +2 -2
- package/bundles/private/tooling.js +3 -3
- package/bundles/src/bin/ng_xi18n.js +4 -4
- package/bundles/src/bin/ngc.js +4 -4
- package/bundles_metadata.json +1 -1
- package/linker/src/file_linker/partial_linkers/util.d.ts +2 -2
- package/package.json +3 -3
- package/src/ngtsc/annotations/component/src/handler.d.ts +3 -2
- package/src/ngtsc/annotations/directive/src/handler.d.ts +3 -2
- package/src/ngtsc/annotations/directive/src/initializer_functions.d.ts +2 -3
- package/src/ngtsc/annotations/directive/src/input_function.d.ts +2 -1
- package/src/ngtsc/annotations/directive/src/model_function.d.ts +2 -1
- package/src/ngtsc/annotations/directive/src/output_function.d.ts +2 -1
- package/src/ngtsc/annotations/directive/src/query_functions.d.ts +2 -1
- package/src/ngtsc/annotations/directive/src/shared.d.ts +2 -2
- package/src/ngtsc/core/src/feature_detection.d.ts +13 -0
- package/src/ngtsc/imports/index.d.ts +1 -0
- package/src/ngtsc/imports/src/imported_symbols_tracker.d.ts +37 -0
- package/src/transformers/jit_transforms/initializer_api_transforms/transform.d.ts +2 -1
- package/src/transformers/jit_transforms/initializer_api_transforms/transform_api.d.ts +3 -2
- package/bundles/chunk-GWFFFWTW.js.map +0 -6
- package/bundles/chunk-OW77LBBK.js.map +0 -6
- /package/bundles/{chunk-JKNKVO7U.js.map → chunk-FPKC3HSK.js.map} +0 -0
- /package/bundles/{chunk-VPKIGOWE.js.map → chunk-IIZOI4XA.js.map} +0 -0
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
declarationTransformFactory,
|
|
40
40
|
isHostDirectiveMetaForGlobalMode,
|
|
41
41
|
ivyTransformFactory
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-YVYW546M.js";
|
|
43
43
|
import {
|
|
44
44
|
AbsoluteModuleStrategy,
|
|
45
45
|
AliasStrategy,
|
|
@@ -52,6 +52,7 @@ import {
|
|
|
52
52
|
ExtendedTemplateDiagnosticName,
|
|
53
53
|
ImportFlags,
|
|
54
54
|
ImportManager,
|
|
55
|
+
ImportedSymbolsTracker,
|
|
55
56
|
LocalCompilationExtraImportsTracker,
|
|
56
57
|
LocalIdentifierStrategy,
|
|
57
58
|
LogicalProjectStrategy,
|
|
@@ -88,7 +89,7 @@ import {
|
|
|
88
89
|
toUnredirectedSourceFile,
|
|
89
90
|
translateExpression,
|
|
90
91
|
translateType
|
|
91
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-7VU7HCQZ.js";
|
|
92
93
|
import {
|
|
93
94
|
ActivePerfRecorder,
|
|
94
95
|
DelegatingPerfRecorder,
|
|
@@ -180,7 +181,7 @@ var MemberTags;
|
|
|
180
181
|
|
|
181
182
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/program.mjs
|
|
182
183
|
import { HtmlParser, MessageBundle } from "@angular/compiler";
|
|
183
|
-
import
|
|
184
|
+
import ts39 from "typescript";
|
|
184
185
|
|
|
185
186
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/transformers/i18n.mjs
|
|
186
187
|
import { Xliff, Xliff2, Xmb } from "@angular/compiler";
|
|
@@ -273,7 +274,7 @@ function compareVersions(v1, v2) {
|
|
|
273
274
|
|
|
274
275
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/typescript_support.mjs
|
|
275
276
|
var MIN_TS_VERSION = "5.2.0";
|
|
276
|
-
var MAX_TS_VERSION = "5.
|
|
277
|
+
var MAX_TS_VERSION = "5.5.0";
|
|
277
278
|
var tsVersion = ts2.version;
|
|
278
279
|
function checkVersion(version, minVersion, maxVersion) {
|
|
279
280
|
if (compareVersions(version, minVersion) < 0 || compareVersions(version, maxVersion) >= 0) {
|
|
@@ -285,7 +286,7 @@ function verifySupportedTypeScriptVersion() {
|
|
|
285
286
|
}
|
|
286
287
|
|
|
287
288
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/compiler.mjs
|
|
288
|
-
import
|
|
289
|
+
import ts37 from "typescript";
|
|
289
290
|
|
|
290
291
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/cycles/src/analyzer.mjs
|
|
291
292
|
var CycleAnalyzer = class {
|
|
@@ -877,9 +878,12 @@ function isSyntheticAngularConstant(declaration) {
|
|
|
877
878
|
return declaration.name.getText() === "USED_FOR_NG_TYPE_CHECKING";
|
|
878
879
|
}
|
|
879
880
|
function extractLiteralPropertiesAsEnumMembers(declaration) {
|
|
880
|
-
|
|
881
|
+
let initializer = declaration.initializer;
|
|
882
|
+
while (initializer && (ts7.isAsExpression(initializer) || ts7.isParenthesizedExpression(initializer))) {
|
|
883
|
+
initializer = initializer.expression;
|
|
884
|
+
}
|
|
881
885
|
if (initializer === void 0 || !ts7.isObjectLiteralExpression(initializer)) {
|
|
882
|
-
throw new Error(`Declaration tagged with "${LITERAL_AS_ENUM_TAG}" must be initialized to an object literal`);
|
|
886
|
+
throw new Error(`Declaration tagged with "${LITERAL_AS_ENUM_TAG}" must be initialized to an object literal, but received ${initializer ? ts7.SyntaxKind[initializer.kind] : "undefined"}`);
|
|
883
887
|
}
|
|
884
888
|
return initializer.properties.map((prop) => {
|
|
885
889
|
if (!ts7.isPropertyAssignment(prop) || !ts7.isIdentifier(prop.name)) {
|
|
@@ -7278,6 +7282,7 @@ var SingleShimTypeCheckingHost = class extends SingleFileTypeCheckingHost {
|
|
|
7278
7282
|
|
|
7279
7283
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/interpolated_signal_not_invoked/index.mjs
|
|
7280
7284
|
import { Interpolation, PropertyRead as PropertyRead6 } from "@angular/compiler";
|
|
7285
|
+
import ts33 from "typescript";
|
|
7281
7286
|
|
|
7282
7287
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/api/api.mjs
|
|
7283
7288
|
import { ASTWithSource as ASTWithSource4, RecursiveAstVisitor as RecursiveAstVisitor3, TmplAstBoundDeferredTrigger as TmplAstBoundDeferredTrigger2 } from "@angular/compiler";
|
|
@@ -7404,6 +7409,15 @@ var TemplateVisitor2 = class extends RecursiveAstVisitor3 {
|
|
|
7404
7409
|
};
|
|
7405
7410
|
|
|
7406
7411
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/interpolated_signal_not_invoked/index.mjs
|
|
7412
|
+
var SIGNAL_FNS = /* @__PURE__ */ new Set([
|
|
7413
|
+
"WritableSignal",
|
|
7414
|
+
"Signal",
|
|
7415
|
+
"InputSignal",
|
|
7416
|
+
"InputSignalWithTransform",
|
|
7417
|
+
"ModelSignal"
|
|
7418
|
+
]);
|
|
7419
|
+
var SIGNAL_INSTANCE_PROPERTIES = /* @__PURE__ */ new Set(["set", "update", "asReadonly"]);
|
|
7420
|
+
var FUNCTION_INSTANCE_PROPERTIES = /* @__PURE__ */ new Set(["name", "length", "prototype"]);
|
|
7407
7421
|
var InterpolatedSignalCheck = class extends TemplateCheckWithVisitor {
|
|
7408
7422
|
constructor() {
|
|
7409
7423
|
super(...arguments);
|
|
@@ -7411,18 +7425,23 @@ var InterpolatedSignalCheck = class extends TemplateCheckWithVisitor {
|
|
|
7411
7425
|
}
|
|
7412
7426
|
visitNode(ctx, component, node) {
|
|
7413
7427
|
if (node instanceof Interpolation) {
|
|
7414
|
-
return node.expressions.filter((item) => item instanceof PropertyRead6).flatMap((item) =>
|
|
7415
|
-
if (item instanceof PropertyRead6) {
|
|
7416
|
-
return buildDiagnosticForSignal(ctx, item, component);
|
|
7417
|
-
}
|
|
7418
|
-
return [];
|
|
7419
|
-
});
|
|
7428
|
+
return node.expressions.filter((item) => item instanceof PropertyRead6).flatMap((item) => buildDiagnosticForSignal(ctx, item, component));
|
|
7420
7429
|
}
|
|
7421
7430
|
return [];
|
|
7422
7431
|
}
|
|
7423
7432
|
};
|
|
7424
7433
|
function isSignal(symbol) {
|
|
7425
|
-
|
|
7434
|
+
const declarations = symbol == null ? void 0 : symbol.getDeclarations();
|
|
7435
|
+
return declarations !== void 0 && declarations.some((decl) => {
|
|
7436
|
+
const fileName = decl.getSourceFile().fileName;
|
|
7437
|
+
return (ts33.isInterfaceDeclaration(decl) || ts33.isTypeAliasDeclaration(decl)) && SIGNAL_FNS.has(decl.name.text) && (fileName.includes("@angular/core") || fileName.includes("angular2/rc/packages/core"));
|
|
7438
|
+
});
|
|
7439
|
+
}
|
|
7440
|
+
function isFunctionInstanceProperty(name) {
|
|
7441
|
+
return FUNCTION_INSTANCE_PROPERTIES.has(name);
|
|
7442
|
+
}
|
|
7443
|
+
function isSignalInstanceProperty(name) {
|
|
7444
|
+
return SIGNAL_INSTANCE_PROPERTIES.has(name);
|
|
7426
7445
|
}
|
|
7427
7446
|
function buildDiagnosticForSignal(ctx, node, component) {
|
|
7428
7447
|
const symbol = ctx.templateTypeChecker.getSymbolOfNode(node, component);
|
|
@@ -7432,6 +7451,13 @@ function buildDiagnosticForSignal(ctx, node, component) {
|
|
|
7432
7451
|
const diagnostic = ctx.makeTemplateDiagnostic(templateMapping.span, errorString);
|
|
7433
7452
|
return [diagnostic];
|
|
7434
7453
|
}
|
|
7454
|
+
const symbolOfReceiver = ctx.templateTypeChecker.getSymbolOfNode(node.receiver, component);
|
|
7455
|
+
if ((isFunctionInstanceProperty(node.name) || isSignalInstanceProperty(node.name)) && (symbolOfReceiver == null ? void 0 : symbolOfReceiver.kind) === SymbolKind.Expression && (isSignal(symbolOfReceiver.tsType.symbol) || isSignal(symbolOfReceiver.tsType.aliasSymbol))) {
|
|
7456
|
+
const templateMapping = ctx.templateTypeChecker.getTemplateMappingAtTcbLocation(symbolOfReceiver.tcbLocation);
|
|
7457
|
+
const errorString = `${node.receiver.name} is a function and should be invoked: ${node.receiver.name}()`;
|
|
7458
|
+
const diagnostic = ctx.makeTemplateDiagnostic(templateMapping.span, errorString);
|
|
7459
|
+
return [diagnostic];
|
|
7460
|
+
}
|
|
7435
7461
|
return [];
|
|
7436
7462
|
}
|
|
7437
7463
|
var factory = {
|
|
@@ -7546,7 +7572,7 @@ var factory4 = {
|
|
|
7546
7572
|
|
|
7547
7573
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/nullish_coalescing_not_nullable/index.mjs
|
|
7548
7574
|
import { Binary } from "@angular/compiler";
|
|
7549
|
-
import
|
|
7575
|
+
import ts34 from "typescript";
|
|
7550
7576
|
var NullishCoalescingNotNullableCheck = class extends TemplateCheckWithVisitor {
|
|
7551
7577
|
constructor() {
|
|
7552
7578
|
super(...arguments);
|
|
@@ -7560,7 +7586,7 @@ var NullishCoalescingNotNullableCheck = class extends TemplateCheckWithVisitor {
|
|
|
7560
7586
|
return [];
|
|
7561
7587
|
}
|
|
7562
7588
|
const typeLeft = symbolLeft.tsType;
|
|
7563
|
-
if (typeLeft.flags & (
|
|
7589
|
+
if (typeLeft.flags & (ts34.TypeFlags.Any | ts34.TypeFlags.Unknown)) {
|
|
7564
7590
|
return [];
|
|
7565
7591
|
}
|
|
7566
7592
|
if (typeLeft.getNonNullableType() !== typeLeft)
|
|
@@ -7591,7 +7617,7 @@ var factory5 = {
|
|
|
7591
7617
|
|
|
7592
7618
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/optional_chain_not_nullable/index.mjs
|
|
7593
7619
|
import { SafeCall as SafeCall2, SafeKeyedRead as SafeKeyedRead2, SafePropertyRead as SafePropertyRead5 } from "@angular/compiler";
|
|
7594
|
-
import
|
|
7620
|
+
import ts35 from "typescript";
|
|
7595
7621
|
var OptionalChainNotNullableCheck = class extends TemplateCheckWithVisitor {
|
|
7596
7622
|
constructor() {
|
|
7597
7623
|
super(...arguments);
|
|
@@ -7605,7 +7631,7 @@ var OptionalChainNotNullableCheck = class extends TemplateCheckWithVisitor {
|
|
|
7605
7631
|
return [];
|
|
7606
7632
|
}
|
|
7607
7633
|
const typeLeft = symbolLeft.tsType;
|
|
7608
|
-
if (typeLeft.flags & (
|
|
7634
|
+
if (typeLeft.flags & (ts35.TypeFlags.Any | ts35.TypeFlags.Unknown)) {
|
|
7609
7635
|
return [];
|
|
7610
7636
|
}
|
|
7611
7637
|
if (typeLeft.getNonNullableType() !== typeLeft)
|
|
@@ -7699,7 +7725,7 @@ var factory8 = {
|
|
|
7699
7725
|
};
|
|
7700
7726
|
|
|
7701
7727
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/src/extended_template_checker.mjs
|
|
7702
|
-
import
|
|
7728
|
+
import ts36 from "typescript";
|
|
7703
7729
|
|
|
7704
7730
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/api/src/public_options.mjs
|
|
7705
7731
|
var DiagnosticCategoryLabel;
|
|
@@ -7748,9 +7774,9 @@ var ExtendedTemplateCheckerImpl = class {
|
|
|
7748
7774
|
function diagnosticLabelToCategory(label) {
|
|
7749
7775
|
switch (label) {
|
|
7750
7776
|
case DiagnosticCategoryLabel.Warning:
|
|
7751
|
-
return
|
|
7777
|
+
return ts36.DiagnosticCategory.Warning;
|
|
7752
7778
|
case DiagnosticCategoryLabel.Error:
|
|
7753
|
-
return
|
|
7779
|
+
return ts36.DiagnosticCategory.Error;
|
|
7754
7780
|
case DiagnosticCategoryLabel.Suppress:
|
|
7755
7781
|
return null;
|
|
7756
7782
|
default:
|
|
@@ -7778,8 +7804,17 @@ var SUPPORTED_DIAGNOSTIC_NAMES = /* @__PURE__ */ new Set([
|
|
|
7778
7804
|
...ALL_DIAGNOSTIC_FACTORIES.map((factory9) => factory9.name)
|
|
7779
7805
|
]);
|
|
7780
7806
|
|
|
7807
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/feature_detection.mjs
|
|
7808
|
+
import semver from "semver";
|
|
7809
|
+
function coreVersionSupportsFeature(coreVersion, minVersion) {
|
|
7810
|
+
if (coreVersion === `0.0.0-${"PLACEHOLDER"}`) {
|
|
7811
|
+
return true;
|
|
7812
|
+
}
|
|
7813
|
+
return semver.satisfies(coreVersion, minVersion);
|
|
7814
|
+
}
|
|
7815
|
+
|
|
7781
7816
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/compiler.mjs
|
|
7782
|
-
var SHOULD_USE_TEMPLATE_PIPELINE =
|
|
7817
|
+
var SHOULD_USE_TEMPLATE_PIPELINE = true;
|
|
7783
7818
|
var CompilationTicketKind;
|
|
7784
7819
|
(function(CompilationTicketKind2) {
|
|
7785
7820
|
CompilationTicketKind2[CompilationTicketKind2["Fresh"] = 0] = "Fresh";
|
|
@@ -7851,7 +7886,7 @@ var NgCompiler = class {
|
|
|
7851
7886
|
}
|
|
7852
7887
|
}
|
|
7853
7888
|
constructor(adapter, options, inputProgram, programDriver, incrementalStrategy, incrementalCompilation, enableTemplateTypeChecker, usePoisonedData, livePerfRecorder) {
|
|
7854
|
-
var _a, _b;
|
|
7889
|
+
var _a, _b, _c;
|
|
7855
7890
|
this.adapter = adapter;
|
|
7856
7891
|
this.options = options;
|
|
7857
7892
|
this.inputProgram = inputProgram;
|
|
@@ -7866,12 +7901,12 @@ var NgCompiler = class {
|
|
|
7866
7901
|
this.delegatingPerfRecorder = new DelegatingPerfRecorder(this.perfRecorder);
|
|
7867
7902
|
this.enableTemplateTypeChecker = enableTemplateTypeChecker || ((_a = options["_enableTemplateTypeChecker"]) != null ? _a : false);
|
|
7868
7903
|
this.enableBlockSyntax = (_b = options["_enableBlockSyntax"]) != null ? _b : true;
|
|
7869
|
-
this.angularCoreVersion = options["_angularCoreVersion"]
|
|
7904
|
+
this.angularCoreVersion = (_c = options["_angularCoreVersion"]) != null ? _c : null;
|
|
7870
7905
|
this.constructionDiagnostics.push(...this.adapter.constructionDiagnostics, ...verifyCompatibleTypeCheckOptions(this.options));
|
|
7871
7906
|
this.currentProgram = inputProgram;
|
|
7872
7907
|
this.closureCompilerEnabled = !!this.options.annotateForClosureCompiler;
|
|
7873
7908
|
this.entryPoint = adapter.entryPoint !== null ? getSourceFileOrNull(inputProgram, adapter.entryPoint) : null;
|
|
7874
|
-
const moduleResolutionCache =
|
|
7909
|
+
const moduleResolutionCache = ts37.createModuleResolutionCache(
|
|
7875
7910
|
this.adapter.getCurrentDirectory(),
|
|
7876
7911
|
this.adapter.getCanonicalFileName.bind(this.adapter)
|
|
7877
7912
|
);
|
|
@@ -7915,7 +7950,7 @@ var NgCompiler = class {
|
|
|
7915
7950
|
}
|
|
7916
7951
|
for (const clazz of classesToUpdate) {
|
|
7917
7952
|
this.compilation.traitCompiler.updateResources(clazz);
|
|
7918
|
-
if (!
|
|
7953
|
+
if (!ts37.isClassDeclaration(clazz)) {
|
|
7919
7954
|
continue;
|
|
7920
7955
|
}
|
|
7921
7956
|
this.compilation.templateTypeChecker.invalidateClass(clazz);
|
|
@@ -8133,7 +8168,7 @@ var NgCompiler = class {
|
|
|
8133
8168
|
var _a, _b, _c, _d;
|
|
8134
8169
|
const strictTemplates = !!this.options.strictTemplates;
|
|
8135
8170
|
const useInlineTypeConstructors = this.programDriver.supportsInlineOperations;
|
|
8136
|
-
const allowSignalsInTwoWayBindings = this.angularCoreVersion === null || this.angularCoreVersion
|
|
8171
|
+
const allowSignalsInTwoWayBindings = this.angularCoreVersion === null || coreVersionSupportsFeature(this.angularCoreVersion, ">= 17.2.0-0");
|
|
8137
8172
|
let typeCheckingConfig;
|
|
8138
8173
|
if (this.fullTemplateTypeCheck) {
|
|
8139
8174
|
typeCheckingConfig = {
|
|
@@ -8336,6 +8371,7 @@ var NgCompiler = class {
|
|
|
8336
8371
|
const injectableRegistry = new InjectableClassRegistry(reflector, isCore);
|
|
8337
8372
|
const hostDirectivesResolver = new HostDirectivesResolver(metaReader);
|
|
8338
8373
|
const exportedProviderStatusResolver = new ExportedProviderStatusResolver(metaReader);
|
|
8374
|
+
const importTracker = new ImportedSymbolsTracker();
|
|
8339
8375
|
const typeCheckScopeRegistry = new TypeCheckScopeRegistry(scopeReader, metaReader, hostDirectivesResolver);
|
|
8340
8376
|
let referencesRegistry;
|
|
8341
8377
|
let exportReferenceGraph = null;
|
|
@@ -8366,8 +8402,8 @@ var NgCompiler = class {
|
|
|
8366
8402
|
throw new Error('JIT mode support ("supportJitMode" option) cannot be disabled when forbidOrphanComponents is set to true');
|
|
8367
8403
|
}
|
|
8368
8404
|
const handlers = [
|
|
8369
|
-
new ComponentDecoratorHandler(reflector, evaluator, metaRegistry, metaReader, scopeReader, depScopeReader, ngModuleScopeRegistry, typeCheckScopeRegistry, resourceRegistry, isCore, strictCtorDeps, this.resourceManager, this.adapter.rootDirs, this.options.preserveWhitespaces || false, this.options.i18nUseExternalIds !== false, this.options.enableI18nLegacyMessageIdFormat !== false, this.usePoisonedData, this.options.i18nNormalizeLineEndingsInICUs === true, this.moduleResolver, this.cycleAnalyzer, cycleHandlingStrategy, refEmitter, referencesRegistry, this.incrementalCompilation.depGraph, injectableRegistry, semanticDepGraphUpdater, this.closureCompilerEnabled, this.delegatingPerfRecorder, hostDirectivesResolver, supportTestBed, compilationMode, deferredSymbolsTracker, !!this.options.forbidOrphanComponents, this.enableBlockSyntax, (_d = this.options.useTemplatePipeline) != null ? _d : SHOULD_USE_TEMPLATE_PIPELINE, localCompilationExtraImportsTracker),
|
|
8370
|
-
new DirectiveDecoratorHandler(reflector, evaluator, metaRegistry, ngModuleScopeRegistry, metaReader, injectableRegistry, refEmitter, referencesRegistry, isCore, strictCtorDeps, semanticDepGraphUpdater, this.closureCompilerEnabled, this.delegatingPerfRecorder, supportTestBed, compilationMode, (_e = this.options.useTemplatePipeline) != null ? _e : SHOULD_USE_TEMPLATE_PIPELINE, !!this.options.generateExtraImportsInLocalMode),
|
|
8405
|
+
new ComponentDecoratorHandler(reflector, evaluator, metaRegistry, metaReader, scopeReader, depScopeReader, ngModuleScopeRegistry, typeCheckScopeRegistry, resourceRegistry, isCore, strictCtorDeps, this.resourceManager, this.adapter.rootDirs, this.options.preserveWhitespaces || false, this.options.i18nUseExternalIds !== false, this.options.enableI18nLegacyMessageIdFormat !== false, this.usePoisonedData, this.options.i18nNormalizeLineEndingsInICUs === true, this.moduleResolver, this.cycleAnalyzer, cycleHandlingStrategy, refEmitter, referencesRegistry, this.incrementalCompilation.depGraph, injectableRegistry, semanticDepGraphUpdater, this.closureCompilerEnabled, this.delegatingPerfRecorder, hostDirectivesResolver, importTracker, supportTestBed, compilationMode, deferredSymbolsTracker, !!this.options.forbidOrphanComponents, this.enableBlockSyntax, (_d = this.options.useTemplatePipeline) != null ? _d : SHOULD_USE_TEMPLATE_PIPELINE, localCompilationExtraImportsTracker),
|
|
8406
|
+
new DirectiveDecoratorHandler(reflector, evaluator, metaRegistry, ngModuleScopeRegistry, metaReader, injectableRegistry, refEmitter, referencesRegistry, isCore, strictCtorDeps, semanticDepGraphUpdater, this.closureCompilerEnabled, this.delegatingPerfRecorder, importTracker, supportTestBed, compilationMode, (_e = this.options.useTemplatePipeline) != null ? _e : SHOULD_USE_TEMPLATE_PIPELINE, !!this.options.generateExtraImportsInLocalMode),
|
|
8371
8407
|
new PipeDecoratorHandler(reflector, evaluator, metaRegistry, ngModuleScopeRegistry, injectableRegistry, isCore, this.delegatingPerfRecorder, supportTestBed, compilationMode, !!this.options.generateExtraImportsInLocalMode),
|
|
8372
8408
|
new InjectableDecoratorHandler(reflector, evaluator, isCore, strictCtorDeps, injectableRegistry, this.delegatingPerfRecorder, supportTestBed, compilationMode),
|
|
8373
8409
|
new NgModuleDecoratorHandler(reflector, evaluator, metaReader, metaRegistry, ngModuleScopeRegistry, referencesRegistry, exportedProviderStatusResolver, semanticDepGraphUpdater, isCore, refEmitter, this.closureCompilerEnabled, (_f = this.options.onlyPublishPublicTypingsForNgModules) != null ? _f : false, injectableRegistry, this.delegatingPerfRecorder, supportTestBed, supportJitMode, compilationMode, localCompilationExtraImportsTracker)
|
|
@@ -8403,18 +8439,18 @@ function isAngularCorePackage(program) {
|
|
|
8403
8439
|
return false;
|
|
8404
8440
|
}
|
|
8405
8441
|
return r3Symbols.statements.some((stmt) => {
|
|
8406
|
-
if (!
|
|
8442
|
+
if (!ts37.isVariableStatement(stmt)) {
|
|
8407
8443
|
return false;
|
|
8408
8444
|
}
|
|
8409
|
-
const modifiers =
|
|
8410
|
-
if (modifiers === void 0 || !modifiers.some((mod) => mod.kind ===
|
|
8445
|
+
const modifiers = ts37.getModifiers(stmt);
|
|
8446
|
+
if (modifiers === void 0 || !modifiers.some((mod) => mod.kind === ts37.SyntaxKind.ExportKeyword)) {
|
|
8411
8447
|
return false;
|
|
8412
8448
|
}
|
|
8413
8449
|
return stmt.declarationList.declarations.some((decl) => {
|
|
8414
|
-
if (!
|
|
8450
|
+
if (!ts37.isIdentifier(decl.name) || decl.name.text !== "ITS_JUST_ANGULAR") {
|
|
8415
8451
|
return false;
|
|
8416
8452
|
}
|
|
8417
|
-
if (decl.initializer === void 0 || decl.initializer.kind !==
|
|
8453
|
+
if (decl.initializer === void 0 || decl.initializer.kind !== ts37.SyntaxKind.TrueKeyword) {
|
|
8418
8454
|
return false;
|
|
8419
8455
|
}
|
|
8420
8456
|
return true;
|
|
@@ -8428,7 +8464,7 @@ function* verifyCompatibleTypeCheckOptions(options) {
|
|
|
8428
8464
|
var _a, _b, _c;
|
|
8429
8465
|
if (options.fullTemplateTypeCheck === false && options.strictTemplates === true) {
|
|
8430
8466
|
yield makeConfigDiagnostic({
|
|
8431
|
-
category:
|
|
8467
|
+
category: ts37.DiagnosticCategory.Error,
|
|
8432
8468
|
code: ErrorCode.CONFIG_STRICT_TEMPLATES_IMPLIES_FULL_TEMPLATE_TYPECHECK,
|
|
8433
8469
|
messageText: `
|
|
8434
8470
|
Angular compiler option "strictTemplates" is enabled, however "fullTemplateTypeCheck" is disabled.
|
|
@@ -8447,7 +8483,7 @@ https://angular.io/guide/template-typecheck
|
|
|
8447
8483
|
}
|
|
8448
8484
|
if (options.extendedDiagnostics && options.strictTemplates === false) {
|
|
8449
8485
|
yield makeConfigDiagnostic({
|
|
8450
|
-
category:
|
|
8486
|
+
category: ts37.DiagnosticCategory.Error,
|
|
8451
8487
|
code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_IMPLIES_STRICT_TEMPLATES,
|
|
8452
8488
|
messageText: `
|
|
8453
8489
|
Angular compiler option "extendedDiagnostics" is configured, however "strictTemplates" is disabled.
|
|
@@ -8464,7 +8500,7 @@ One of the following actions is required:
|
|
|
8464
8500
|
const defaultCategory = (_a = options.extendedDiagnostics) == null ? void 0 : _a.defaultCategory;
|
|
8465
8501
|
if (defaultCategory && !allowedCategoryLabels.includes(defaultCategory)) {
|
|
8466
8502
|
yield makeConfigDiagnostic({
|
|
8467
|
-
category:
|
|
8503
|
+
category: ts37.DiagnosticCategory.Error,
|
|
8468
8504
|
code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CATEGORY_LABEL,
|
|
8469
8505
|
messageText: `
|
|
8470
8506
|
Angular compiler option "extendedDiagnostics.defaultCategory" has an unknown diagnostic category: "${defaultCategory}".
|
|
@@ -8477,7 +8513,7 @@ ${allowedCategoryLabels.join("\n")}
|
|
|
8477
8513
|
for (const [checkName, category] of Object.entries((_c = (_b = options.extendedDiagnostics) == null ? void 0 : _b.checks) != null ? _c : {})) {
|
|
8478
8514
|
if (!SUPPORTED_DIAGNOSTIC_NAMES.has(checkName)) {
|
|
8479
8515
|
yield makeConfigDiagnostic({
|
|
8480
|
-
category:
|
|
8516
|
+
category: ts37.DiagnosticCategory.Error,
|
|
8481
8517
|
code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CHECK,
|
|
8482
8518
|
messageText: `
|
|
8483
8519
|
Angular compiler option "extendedDiagnostics.checks" has an unknown check: "${checkName}".
|
|
@@ -8489,7 +8525,7 @@ ${Array.from(SUPPORTED_DIAGNOSTIC_NAMES).join("\n")}
|
|
|
8489
8525
|
}
|
|
8490
8526
|
if (!allowedCategoryLabels.includes(category)) {
|
|
8491
8527
|
yield makeConfigDiagnostic({
|
|
8492
|
-
category:
|
|
8528
|
+
category: ts37.DiagnosticCategory.Error,
|
|
8493
8529
|
code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CATEGORY_LABEL,
|
|
8494
8530
|
messageText: `
|
|
8495
8531
|
Angular compiler option "extendedDiagnostics.checks['${checkName}']" has an unknown diagnostic category: "${category}".
|
|
@@ -8519,7 +8555,7 @@ var ReferenceGraphAdapter = class {
|
|
|
8519
8555
|
for (const { node } of references) {
|
|
8520
8556
|
let sourceFile = node.getSourceFile();
|
|
8521
8557
|
if (sourceFile === void 0) {
|
|
8522
|
-
sourceFile =
|
|
8558
|
+
sourceFile = ts37.getOriginalNode(node).getSourceFile();
|
|
8523
8559
|
}
|
|
8524
8560
|
if (sourceFile === void 0 || !isDtsPath(sourceFile.fileName)) {
|
|
8525
8561
|
this.graph.add(source, node);
|
|
@@ -8556,18 +8592,9 @@ function versionMapFromProgram(program, driver) {
|
|
|
8556
8592
|
}
|
|
8557
8593
|
return versions;
|
|
8558
8594
|
}
|
|
8559
|
-
var Version = class {
|
|
8560
|
-
constructor(full) {
|
|
8561
|
-
this.full = full;
|
|
8562
|
-
[this.major, this.minor, this.patch] = full.split(".").map((part) => {
|
|
8563
|
-
const parsed = parseInt(part);
|
|
8564
|
-
return isNaN(parsed) ? -1 : parsed;
|
|
8565
|
-
});
|
|
8566
|
-
}
|
|
8567
|
-
};
|
|
8568
8595
|
|
|
8569
8596
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/host.mjs
|
|
8570
|
-
import
|
|
8597
|
+
import ts38 from "typescript";
|
|
8571
8598
|
var DelegatingCompilerHost2 = class {
|
|
8572
8599
|
get jsDocParsingMode() {
|
|
8573
8600
|
return this.delegate.jsDocParsingMode;
|
|
@@ -8652,7 +8679,7 @@ var NgCompilerHost = class extends DelegatingCompilerHost2 {
|
|
|
8652
8679
|
entryPoint = findFlatIndexEntryPoint(normalizedTsInputFiles);
|
|
8653
8680
|
if (entryPoint === null) {
|
|
8654
8681
|
diagnostics.push({
|
|
8655
|
-
category:
|
|
8682
|
+
category: ts38.DiagnosticCategory.Error,
|
|
8656
8683
|
code: ngErrorCode(ErrorCode.CONFIG_FLAT_MODULE_NO_INDEX),
|
|
8657
8684
|
file: void 0,
|
|
8658
8685
|
start: void 0,
|
|
@@ -8695,10 +8722,10 @@ var NgCompilerHost = class extends DelegatingCompilerHost2 {
|
|
|
8695
8722
|
return this.fileNameToModuleName !== void 0 ? this : null;
|
|
8696
8723
|
}
|
|
8697
8724
|
createCachedResolveModuleNamesFunction() {
|
|
8698
|
-
const moduleResolutionCache =
|
|
8725
|
+
const moduleResolutionCache = ts38.createModuleResolutionCache(this.getCurrentDirectory(), this.getCanonicalFileName.bind(this));
|
|
8699
8726
|
return (moduleNames, containingFile, reusedNames, redirectedReference, options) => {
|
|
8700
8727
|
return moduleNames.map((moduleName) => {
|
|
8701
|
-
const module =
|
|
8728
|
+
const module = ts38.resolveModuleName(moduleName, containingFile, options, this, moduleResolutionCache, redirectedReference);
|
|
8702
8729
|
return module.resolvedModule;
|
|
8703
8730
|
});
|
|
8704
8731
|
};
|
|
@@ -8722,7 +8749,7 @@ var NgtscProgram = class {
|
|
|
8722
8749
|
if (reuseProgram !== void 0) {
|
|
8723
8750
|
retagAllTsFiles(reuseProgram);
|
|
8724
8751
|
}
|
|
8725
|
-
this.tsProgram = perfRecorder.inPhase(PerfPhase.TypeScriptProgramCreate, () =>
|
|
8752
|
+
this.tsProgram = perfRecorder.inPhase(PerfPhase.TypeScriptProgramCreate, () => ts39.createProgram(this.host.inputFiles, options, this.host, reuseProgram));
|
|
8726
8753
|
perfRecorder.phase(PerfPhase.Unaccounted);
|
|
8727
8754
|
perfRecorder.memory(PerfCheckpoint.TypeScriptProgramCreate);
|
|
8728
8755
|
this.host.postProgramCreationCleanup();
|
|
@@ -8938,16 +8965,16 @@ function createProgram({ rootNames, options, host, oldProgram }) {
|
|
|
8938
8965
|
}
|
|
8939
8966
|
|
|
8940
8967
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/perform_compile.mjs
|
|
8941
|
-
import
|
|
8968
|
+
import ts41 from "typescript";
|
|
8942
8969
|
|
|
8943
8970
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/transformers/util.mjs
|
|
8944
|
-
import
|
|
8971
|
+
import ts40 from "typescript";
|
|
8945
8972
|
function createMessageDiagnostic(messageText) {
|
|
8946
8973
|
return {
|
|
8947
8974
|
file: void 0,
|
|
8948
8975
|
start: void 0,
|
|
8949
8976
|
length: void 0,
|
|
8950
|
-
category:
|
|
8977
|
+
category: ts40.DiagnosticCategory.Message,
|
|
8951
8978
|
messageText,
|
|
8952
8979
|
code: DEFAULT_ERROR_CODE,
|
|
8953
8980
|
source: SOURCE
|
|
@@ -8956,13 +8983,13 @@ function createMessageDiagnostic(messageText) {
|
|
|
8956
8983
|
|
|
8957
8984
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/perform_compile.mjs
|
|
8958
8985
|
var defaultFormatHost = {
|
|
8959
|
-
getCurrentDirectory: () =>
|
|
8986
|
+
getCurrentDirectory: () => ts41.sys.getCurrentDirectory(),
|
|
8960
8987
|
getCanonicalFileName: (fileName) => fileName,
|
|
8961
|
-
getNewLine: () =>
|
|
8988
|
+
getNewLine: () => ts41.sys.newLine
|
|
8962
8989
|
};
|
|
8963
8990
|
function formatDiagnostics(diags, host = defaultFormatHost) {
|
|
8964
8991
|
if (diags && diags.length) {
|
|
8965
|
-
return diags.map((diagnostic) => replaceTsWithNgInErrors(
|
|
8992
|
+
return diags.map((diagnostic) => replaceTsWithNgInErrors(ts41.formatDiagnosticsWithColorAndContext([diagnostic], host))).join("");
|
|
8966
8993
|
} else {
|
|
8967
8994
|
return "";
|
|
8968
8995
|
}
|
|
@@ -8979,7 +9006,7 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
|
|
|
8979
9006
|
var _a;
|
|
8980
9007
|
try {
|
|
8981
9008
|
const fs = getFileSystem();
|
|
8982
|
-
const readConfigFile = (configFile) =>
|
|
9009
|
+
const readConfigFile = (configFile) => ts41.readConfigFile(configFile, (file) => host.readFile(host.resolve(file)));
|
|
8983
9010
|
const readAngularCompilerOptions = (configFile, parentOptions = {}) => {
|
|
8984
9011
|
const { config: config2, error: error2 } = readConfigFile(configFile);
|
|
8985
9012
|
if (error2) {
|
|
@@ -9014,7 +9041,7 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
|
|
|
9014
9041
|
...existingOptions
|
|
9015
9042
|
};
|
|
9016
9043
|
const parseConfigHost = createParseConfigHost(host, fs);
|
|
9017
|
-
const { options, errors, fileNames: rootNames, projectReferences } =
|
|
9044
|
+
const { options, errors, fileNames: rootNames, projectReferences } = ts41.parseJsonConfigFileContent(config, parseConfigHost, basePath, existingCompilerOptions, configFileName);
|
|
9018
9045
|
let emitFlags = EmitFlags.Default;
|
|
9019
9046
|
if (!(options["skipMetadataEmit"] || options["flatModuleOutFile"])) {
|
|
9020
9047
|
emitFlags |= EmitFlags.Metadata;
|
|
@@ -9025,7 +9052,7 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
|
|
|
9025
9052
|
return { project: projectFile, rootNames, projectReferences, options, errors, emitFlags };
|
|
9026
9053
|
} catch (e) {
|
|
9027
9054
|
const errors = [{
|
|
9028
|
-
category:
|
|
9055
|
+
category: ts41.DiagnosticCategory.Error,
|
|
9029
9056
|
messageText: (_a = e.stack) != null ? _a : e.message,
|
|
9030
9057
|
file: void 0,
|
|
9031
9058
|
start: void 0,
|
|
@@ -9039,7 +9066,7 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
|
|
|
9039
9066
|
function createParseConfigHost(host, fs = getFileSystem()) {
|
|
9040
9067
|
return {
|
|
9041
9068
|
fileExists: host.exists.bind(host),
|
|
9042
|
-
readDirectory:
|
|
9069
|
+
readDirectory: ts41.sys.readDirectory,
|
|
9043
9070
|
readFile: host.readFile.bind(host),
|
|
9044
9071
|
useCaseSensitiveFileNames: fs.isCaseSensitive()
|
|
9045
9072
|
};
|
|
@@ -9059,7 +9086,7 @@ function getExtendedConfigPathWorker(configFile, extendsValue, host, fs) {
|
|
|
9059
9086
|
}
|
|
9060
9087
|
} else {
|
|
9061
9088
|
const parseConfigHost = createParseConfigHost(host, fs);
|
|
9062
|
-
const { resolvedModule } =
|
|
9089
|
+
const { resolvedModule } = ts41.nodeModuleNameResolver(extendsValue, configFile, { moduleResolution: ts41.ModuleResolutionKind.Node10, resolveJsonModule: true }, parseConfigHost);
|
|
9063
9090
|
if (resolvedModule) {
|
|
9064
9091
|
return absoluteFrom(resolvedModule.resolvedFileName);
|
|
9065
9092
|
}
|
|
@@ -9069,7 +9096,7 @@ function getExtendedConfigPathWorker(configFile, extendsValue, host, fs) {
|
|
|
9069
9096
|
function exitCodeFromResult(diags) {
|
|
9070
9097
|
if (!diags)
|
|
9071
9098
|
return 0;
|
|
9072
|
-
if (diags.every((diag) => diag.category !==
|
|
9099
|
+
if (diags.every((diag) => diag.category !== ts41.DiagnosticCategory.Error)) {
|
|
9073
9100
|
return 0;
|
|
9074
9101
|
}
|
|
9075
9102
|
return diags.some((d) => d.source === "angular" && d.code === UNKNOWN_ERROR_CODE) ? 2 : 1;
|
|
@@ -9102,7 +9129,7 @@ function performCompilation({ rootNames, options, host, oldProgram, emitCallback
|
|
|
9102
9129
|
} catch (e) {
|
|
9103
9130
|
program = void 0;
|
|
9104
9131
|
allDiagnostics.push({
|
|
9105
|
-
category:
|
|
9132
|
+
category: ts41.DiagnosticCategory.Error,
|
|
9106
9133
|
messageText: (_a = e.stack) != null ? _a : e.message,
|
|
9107
9134
|
code: UNKNOWN_ERROR_CODE,
|
|
9108
9135
|
file: void 0,
|
|
@@ -9129,7 +9156,7 @@ function defaultGatherDiagnostics(program) {
|
|
|
9129
9156
|
return allDiagnostics;
|
|
9130
9157
|
}
|
|
9131
9158
|
function hasErrors(diags) {
|
|
9132
|
-
return diags.some((d) => d.category ===
|
|
9159
|
+
return diags.some((d) => d.category === ts41.DiagnosticCategory.Error);
|
|
9133
9160
|
}
|
|
9134
9161
|
|
|
9135
9162
|
export {
|
|
@@ -9160,6 +9187,13 @@ export {
|
|
|
9160
9187
|
performCompilation,
|
|
9161
9188
|
defaultGatherDiagnostics
|
|
9162
9189
|
};
|
|
9190
|
+
/*!
|
|
9191
|
+
* @license
|
|
9192
|
+
* Copyright Google LLC All Rights Reserved.
|
|
9193
|
+
*
|
|
9194
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
9195
|
+
* found in the LICENSE file at https://angular.io/license
|
|
9196
|
+
*/
|
|
9163
9197
|
/**
|
|
9164
9198
|
* @license
|
|
9165
9199
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -9167,4 +9201,4 @@ export {
|
|
|
9167
9201
|
* Use of this source code is governed by an MIT-style license that can be
|
|
9168
9202
|
* found in the LICENSE file at https://angular.io/license
|
|
9169
9203
|
*/
|
|
9170
|
-
//# sourceMappingURL=chunk-
|
|
9204
|
+
//# sourceMappingURL=chunk-5A5Y7O22.js.map
|