@angular/compiler-cli 18.0.0-next.6 → 18.0.0-rc.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-5YGSPVK5.js → chunk-3UXY73FR.js} +4 -4
- package/bundles/chunk-3UXY73FR.js.map +6 -0
- package/bundles/{chunk-UM6JO3VZ.js → chunk-3W345P4E.js} +1 -1
- package/bundles/chunk-3W345P4E.js.map +6 -0
- package/bundles/{chunk-A2LVDCHW.js → chunk-3ZM5BFEI.js} +114 -49
- package/bundles/chunk-3ZM5BFEI.js.map +6 -0
- package/bundles/{chunk-CU5WWBVV.js → chunk-5DY7CLVW.js} +6 -4
- package/bundles/chunk-5DY7CLVW.js.map +6 -0
- package/bundles/{chunk-QWOTSGRF.js → chunk-BAS2AOWB.js} +37 -16
- package/bundles/chunk-BAS2AOWB.js.map +6 -0
- package/bundles/{chunk-HE4PX3Z3.js → chunk-CFIOLJL4.js} +18 -10
- package/bundles/chunk-CFIOLJL4.js.map +6 -0
- package/bundles/{chunk-64JBPJBS.js → chunk-JZQHA4E7.js} +1 -1
- package/bundles/{chunk-64JBPJBS.js.map → chunk-JZQHA4E7.js.map} +1 -1
- package/bundles/{chunk-2WQIUGOU.js → chunk-QYV344EV.js} +5 -2
- package/bundles/chunk-QYV344EV.js.map +6 -0
- package/bundles/{chunk-JJY5IERQ.js → chunk-XAPDG6EU.js} +126 -61
- package/bundles/chunk-XAPDG6EU.js.map +6 -0
- package/bundles/{chunk-XIYC7KSQ.js → chunk-ZX6BKV7T.js} +1 -1
- package/bundles/{chunk-XIYC7KSQ.js.map → chunk-ZX6BKV7T.js.map} +1 -1
- package/bundles/index.js +8 -8
- package/bundles/index.js.map +1 -1
- package/bundles/linker/babel/index.js +7 -5
- package/bundles/linker/babel/index.js.map +1 -1
- package/bundles/linker/index.js +4 -4
- package/bundles/ngcc/index.js.map +1 -1
- package/bundles/private/bazel.js +1 -1
- package/bundles/private/localize.js +2 -2
- package/bundles/private/migrations.js +5 -5
- package/bundles/private/tooling.js +5 -5
- package/bundles/src/bin/ng_xi18n.js +7 -7
- package/bundles/src/bin/ng_xi18n.js.map +1 -1
- package/bundles/src/bin/ngc.js +7 -7
- package/bundles/src/bin/ngc.js.map +1 -1
- package/bundles_metadata.json +1 -1
- package/linker/src/file_linker/partial_linkers/util.d.ts +1 -1
- package/package.json +2 -2
- package/private/migrations.d.ts +2 -2
- package/src/ngtsc/annotations/common/src/util.d.ts +2 -2
- package/src/ngtsc/annotations/directive/src/initializer_functions.d.ts +2 -2
- package/src/ngtsc/annotations/index.d.ts +2 -2
- package/src/ngtsc/annotations/ng_module/index.d.ts +1 -1
- package/src/ngtsc/annotations/ng_module/src/handler.d.ts +2 -2
- package/src/ngtsc/diagnostics/index.d.ts +1 -1
- package/src/ngtsc/file_system/index.d.ts +2 -2
- package/src/ngtsc/imports/index.d.ts +4 -4
- package/src/ngtsc/incremental/index.d.ts +1 -1
- package/src/ngtsc/incremental/semantic_graph/index.d.ts +1 -1
- package/src/ngtsc/metadata/index.d.ts +3 -3
- package/src/ngtsc/partial_evaluator/index.d.ts +1 -1
- package/src/ngtsc/reflection/index.d.ts +2 -2
- package/src/ngtsc/scope/index.d.ts +1 -1
- package/src/ngtsc/shims/index.d.ts +1 -1
- package/src/ngtsc/transform/index.d.ts +2 -2
- package/src/ngtsc/translator/index.d.ts +4 -4
- package/src/ngtsc/typecheck/src/expression.d.ts +1 -1
- package/src/perform_compile.d.ts +1 -1
- package/src/transformers/compiler_host.d.ts +1 -1
- package/src/transformers/program.d.ts +1 -1
- package/bundles/chunk-2WQIUGOU.js.map +0 -6
- package/bundles/chunk-5YGSPVK5.js.map +0 -6
- package/bundles/chunk-A2LVDCHW.js.map +0 -6
- package/bundles/chunk-CU5WWBVV.js.map +0 -6
- package/bundles/chunk-HE4PX3Z3.js.map +0 -6
- package/bundles/chunk-JJY5IERQ.js.map +0 -6
- package/bundles/chunk-QWOTSGRF.js.map +0 -6
- package/bundles/chunk-UM6JO3VZ.js.map +0 -6
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
PotentialImportKind,
|
|
9
9
|
PotentialImportMode,
|
|
10
10
|
SymbolKind
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ZX6BKV7T.js";
|
|
12
12
|
import {
|
|
13
13
|
CompilationMode,
|
|
14
14
|
ComponentDecoratorHandler,
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
isHostDirectiveMetaForGlobalMode,
|
|
45
45
|
ivyTransformFactory,
|
|
46
46
|
tryParseInitializerApi
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-3ZM5BFEI.js";
|
|
48
48
|
import {
|
|
49
49
|
AbsoluteModuleStrategy,
|
|
50
50
|
AliasStrategy,
|
|
@@ -94,14 +94,14 @@ import {
|
|
|
94
94
|
toUnredirectedSourceFile,
|
|
95
95
|
translateExpression,
|
|
96
96
|
translateType
|
|
97
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-CFIOLJL4.js";
|
|
98
98
|
import {
|
|
99
99
|
ActivePerfRecorder,
|
|
100
100
|
DelegatingPerfRecorder,
|
|
101
101
|
PerfCheckpoint,
|
|
102
102
|
PerfEvent,
|
|
103
103
|
PerfPhase
|
|
104
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-JZQHA4E7.js";
|
|
105
105
|
import {
|
|
106
106
|
LogicalFileSystem,
|
|
107
107
|
absoluteFrom,
|
|
@@ -111,7 +111,7 @@ import {
|
|
|
111
111
|
getSourceFileOrError,
|
|
112
112
|
join,
|
|
113
113
|
resolve
|
|
114
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-3W345P4E.js";
|
|
115
115
|
|
|
116
116
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/api.mjs
|
|
117
117
|
var DEFAULT_ERROR_CODE = 100;
|
|
@@ -2584,7 +2584,11 @@ var AdapterResourceLoader = class {
|
|
|
2584
2584
|
if (!this.adapter.transformResource || context.type !== "style") {
|
|
2585
2585
|
return data;
|
|
2586
2586
|
}
|
|
2587
|
-
const transformResult = await this.adapter.transformResource(data, {
|
|
2587
|
+
const transformResult = await this.adapter.transformResource(data, {
|
|
2588
|
+
type: "style",
|
|
2589
|
+
containingFile: context.containingFile,
|
|
2590
|
+
resourceFile: null
|
|
2591
|
+
});
|
|
2588
2592
|
if (transformResult === null) {
|
|
2589
2593
|
return data;
|
|
2590
2594
|
}
|
|
@@ -2817,9 +2821,7 @@ function makeTemplateDiagnostic(templateId, mapping, span, category, code, messa
|
|
|
2817
2821
|
try {
|
|
2818
2822
|
sf = getParsedTemplateSourceFile(fileName, mapping);
|
|
2819
2823
|
} catch (e) {
|
|
2820
|
-
const failureChain = makeDiagnosticChain(`Failed to report an error in '${fileName}' at ${span.start.line + 1}:${span.start.col + 1}`, [
|
|
2821
|
-
makeDiagnosticChain((_a = e == null ? void 0 : e.stack) != null ? _a : `${e}`)
|
|
2822
|
-
]);
|
|
2824
|
+
const failureChain = makeDiagnosticChain(`Failed to report an error in '${fileName}' at ${span.start.line + 1}:${span.start.col + 1}`, [makeDiagnosticChain((_a = e == null ? void 0 : e.stack) != null ? _a : `${e}`)]);
|
|
2823
2825
|
return {
|
|
2824
2826
|
source: "ngtsc",
|
|
2825
2827
|
category,
|
|
@@ -2869,7 +2871,13 @@ function parseTemplateAsSourceFile(fileName, template) {
|
|
|
2869
2871
|
if (parseTemplateAsSourceFileForTest !== null) {
|
|
2870
2872
|
return parseTemplateAsSourceFileForTest(fileName, template);
|
|
2871
2873
|
}
|
|
2872
|
-
return ts18.createSourceFile(
|
|
2874
|
+
return ts18.createSourceFile(
|
|
2875
|
+
fileName,
|
|
2876
|
+
template,
|
|
2877
|
+
ts18.ScriptTarget.Latest,
|
|
2878
|
+
false,
|
|
2879
|
+
ts18.ScriptKind.JSX
|
|
2880
|
+
);
|
|
2873
2881
|
}
|
|
2874
2882
|
|
|
2875
2883
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/diagnostics/src/id.mjs
|
|
@@ -4743,10 +4751,7 @@ var Environment = class extends ReferenceEmitEnvironment {
|
|
|
4743
4751
|
return emitter.emit((ref) => this.referenceType(ref));
|
|
4744
4752
|
}
|
|
4745
4753
|
getPreludeStatements() {
|
|
4746
|
-
return [
|
|
4747
|
-
...this.pipeInstStatements,
|
|
4748
|
-
...this.typeCtorStatements
|
|
4749
|
-
];
|
|
4754
|
+
return [...this.pipeInstStatements, ...this.typeCtorStatements];
|
|
4750
4755
|
}
|
|
4751
4756
|
};
|
|
4752
4757
|
|
|
@@ -4808,12 +4813,14 @@ var OutOfBandDiagnosticRecorderImpl = class {
|
|
|
4808
4813
|
duplicateTemplateVar(templateId, variable, firstDecl) {
|
|
4809
4814
|
const mapping = this.resolver.getSourceMapping(templateId);
|
|
4810
4815
|
const errorMsg = `Cannot redeclare variable '${variable.name}' as it was previously declared elsewhere for the same template.`;
|
|
4811
|
-
this._diagnostics.push(makeTemplateDiagnostic(templateId, mapping, variable.sourceSpan, ts27.DiagnosticCategory.Error, ngErrorCode(ErrorCode.DUPLICATE_VARIABLE_DECLARATION), errorMsg, [
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
|
|
4816
|
+
this._diagnostics.push(makeTemplateDiagnostic(templateId, mapping, variable.sourceSpan, ts27.DiagnosticCategory.Error, ngErrorCode(ErrorCode.DUPLICATE_VARIABLE_DECLARATION), errorMsg, [
|
|
4817
|
+
{
|
|
4818
|
+
text: `The variable '${firstDecl.name}' was first declared here.`,
|
|
4819
|
+
start: firstDecl.sourceSpan.start.offset,
|
|
4820
|
+
end: firstDecl.sourceSpan.end.offset,
|
|
4821
|
+
sourceFile: mapping.node.getSourceFile()
|
|
4822
|
+
}
|
|
4823
|
+
]));
|
|
4817
4824
|
}
|
|
4818
4825
|
requiresInlineTcb(templateId, node) {
|
|
4819
4826
|
this._diagnostics.push(makeInlineDiagnostic(templateId, ErrorCode.INLINE_TCB_REQUIRED, node.name, `This component requires inline template type-checking, which is not supported by the current environment.`));
|
|
@@ -4831,7 +4838,7 @@ var OutOfBandDiagnosticRecorderImpl = class {
|
|
|
4831
4838
|
const mapping = this.resolver.getSourceMapping(templateId);
|
|
4832
4839
|
let diagnosticVar = null;
|
|
4833
4840
|
for (const variable of variables) {
|
|
4834
|
-
if (diagnosticVar === null ||
|
|
4841
|
+
if (diagnosticVar === null || variable.value === "" || variable.value === "$implicit") {
|
|
4835
4842
|
diagnosticVar = variable;
|
|
4836
4843
|
}
|
|
4837
4844
|
}
|
|
@@ -4969,7 +4976,12 @@ function addParseSpanInfo(node, span) {
|
|
|
4969
4976
|
} else {
|
|
4970
4977
|
commentText = `${span.start.offset},${span.end.offset}`;
|
|
4971
4978
|
}
|
|
4972
|
-
ts29.addSyntheticTrailingComment(
|
|
4979
|
+
ts29.addSyntheticTrailingComment(
|
|
4980
|
+
node,
|
|
4981
|
+
ts29.SyntaxKind.MultiLineCommentTrivia,
|
|
4982
|
+
commentText,
|
|
4983
|
+
false
|
|
4984
|
+
);
|
|
4973
4985
|
}
|
|
4974
4986
|
function addTemplateId(tcb, id) {
|
|
4975
4987
|
ts29.addSyntheticLeadingComment(tcb, ts29.SyntaxKind.MultiLineCommentTrivia, id, true);
|
|
@@ -4991,7 +5003,12 @@ function translateDiagnostic(diagnostic, resolver) {
|
|
|
4991
5003
|
if (diagnostic.file === void 0 || diagnostic.start === void 0) {
|
|
4992
5004
|
return null;
|
|
4993
5005
|
}
|
|
4994
|
-
const fullMapping = getTemplateMapping(
|
|
5006
|
+
const fullMapping = getTemplateMapping(
|
|
5007
|
+
diagnostic.file,
|
|
5008
|
+
diagnostic.start,
|
|
5009
|
+
resolver,
|
|
5010
|
+
true
|
|
5011
|
+
);
|
|
4995
5012
|
if (fullMapping === null) {
|
|
4996
5013
|
return null;
|
|
4997
5014
|
}
|
|
@@ -5368,11 +5385,10 @@ function generateTypeCheckBlock(env, ref, name, meta, domSchemaChecker, oobRecor
|
|
|
5368
5385
|
}
|
|
5369
5386
|
const paramList = [tcbThisParam(ctxRawType.typeName, typeArguments)];
|
|
5370
5387
|
const scopeStatements = scope.render();
|
|
5371
|
-
const innerBody = ts31.factory.createBlock([
|
|
5372
|
-
|
|
5373
|
-
|
|
5388
|
+
const innerBody = ts31.factory.createBlock([...env.getPreludeStatements(), ...scopeStatements]);
|
|
5389
|
+
const body = ts31.factory.createBlock([
|
|
5390
|
+
ts31.factory.createIfStatement(ts31.factory.createTrue(), innerBody, void 0)
|
|
5374
5391
|
]);
|
|
5375
|
-
const body = ts31.factory.createBlock([ts31.factory.createIfStatement(ts31.factory.createTrue(), innerBody, void 0)]);
|
|
5376
5392
|
const fnDecl = ts31.factory.createFunctionDeclaration(
|
|
5377
5393
|
void 0,
|
|
5378
5394
|
void 0,
|
|
@@ -5510,7 +5526,10 @@ var TcbTemplateBodyOp = class extends TcbOp {
|
|
|
5510
5526
|
}
|
|
5511
5527
|
let tmplBlock = ts31.factory.createBlock(statements);
|
|
5512
5528
|
if (guard !== null) {
|
|
5513
|
-
tmplBlock = ts31.factory.createIfStatement(
|
|
5529
|
+
tmplBlock = ts31.factory.createIfStatement(
|
|
5530
|
+
guard,
|
|
5531
|
+
tmplBlock
|
|
5532
|
+
);
|
|
5514
5533
|
}
|
|
5515
5534
|
this.scope.addStatement(tmplBlock);
|
|
5516
5535
|
return null;
|
|
@@ -5777,7 +5796,11 @@ var TcbDirectiveCtorCircularFallbackOp = class extends TcbOp {
|
|
|
5777
5796
|
execute() {
|
|
5778
5797
|
const id = this.tcb.allocateId();
|
|
5779
5798
|
const typeCtor = this.tcb.env.typeCtorFor(this.dir);
|
|
5780
|
-
const circularPlaceholder = ts31.factory.createCallExpression(
|
|
5799
|
+
const circularPlaceholder = ts31.factory.createCallExpression(
|
|
5800
|
+
typeCtor,
|
|
5801
|
+
void 0,
|
|
5802
|
+
[ts31.factory.createNonNullExpression(ts31.factory.createNull())]
|
|
5803
|
+
);
|
|
5781
5804
|
this.scope.addStatement(tsCreateVariable(id, circularPlaceholder));
|
|
5782
5805
|
return id;
|
|
5783
5806
|
}
|
|
@@ -5963,7 +5986,9 @@ var TcbDirectiveOutputsOp = class extends TcbOp {
|
|
|
5963
5986
|
if (this.tcb.env.config.checkTypeOfOutputEvents) {
|
|
5964
5987
|
const handler = tcbCreateEventHandler(output, this.tcb, this.scope, 0);
|
|
5965
5988
|
const subscribeFn = ts31.factory.createPropertyAccessExpression(outputField, "subscribe");
|
|
5966
|
-
const call = ts31.factory.createCallExpression(subscribeFn, void 0, [
|
|
5989
|
+
const call = ts31.factory.createCallExpression(subscribeFn, void 0, [
|
|
5990
|
+
handler
|
|
5991
|
+
]);
|
|
5967
5992
|
addParseSpanInfo(call, output.sourceSpan);
|
|
5968
5993
|
this.scope.addStatement(ts31.factory.createExpressionStatement(call));
|
|
5969
5994
|
} else {
|
|
@@ -7286,7 +7311,10 @@ var SymbolBuilder = class {
|
|
|
7286
7311
|
getSymbolOfElement(element) {
|
|
7287
7312
|
var _a;
|
|
7288
7313
|
const elementSourceSpan = (_a = element.startSourceSpan) != null ? _a : element.sourceSpan;
|
|
7289
|
-
const node = findFirstMatchingNode(this.typeCheckBlock, {
|
|
7314
|
+
const node = findFirstMatchingNode(this.typeCheckBlock, {
|
|
7315
|
+
withSpan: elementSourceSpan,
|
|
7316
|
+
filter: ts34.isVariableDeclaration
|
|
7317
|
+
});
|
|
7290
7318
|
if (node === null) {
|
|
7291
7319
|
return null;
|
|
7292
7320
|
}
|
|
@@ -7307,7 +7335,10 @@ var SymbolBuilder = class {
|
|
|
7307
7335
|
const elementSourceSpan = (_a = element.startSourceSpan) != null ? _a : element.sourceSpan;
|
|
7308
7336
|
const tcbSourceFile = this.typeCheckBlock.getSourceFile();
|
|
7309
7337
|
const isDirectiveDeclaration = (node) => (ts34.isTypeNode(node) || ts34.isIdentifier(node)) && ts34.isVariableDeclaration(node.parent) && hasExpressionIdentifier(tcbSourceFile, node, ExpressionIdentifier.DIRECTIVE);
|
|
7310
|
-
const nodes = findAllMatchingNodes(this.typeCheckBlock, {
|
|
7338
|
+
const nodes = findAllMatchingNodes(this.typeCheckBlock, {
|
|
7339
|
+
withSpan: elementSourceSpan,
|
|
7340
|
+
filter: isDirectiveDeclaration
|
|
7341
|
+
});
|
|
7311
7342
|
const symbols = [];
|
|
7312
7343
|
for (const node of nodes) {
|
|
7313
7344
|
const symbol = this.getSymbolOfTsNode(node.parent);
|
|
@@ -7421,7 +7452,10 @@ var SymbolBuilder = class {
|
|
|
7421
7452
|
return ts34.isStringLiteral(n2.argumentExpression) && n2.argumentExpression.text === expectedAccess;
|
|
7422
7453
|
}
|
|
7423
7454
|
}
|
|
7424
|
-
const outputFieldAccesses = findAllMatchingNodes(this.typeCheckBlock, {
|
|
7455
|
+
const outputFieldAccesses = findAllMatchingNodes(this.typeCheckBlock, {
|
|
7456
|
+
withSpan: eventBinding.keySpan,
|
|
7457
|
+
filter
|
|
7458
|
+
});
|
|
7425
7459
|
const bindings = [];
|
|
7426
7460
|
for (const outputFieldAccess of outputFieldAccesses) {
|
|
7427
7461
|
if (consumer instanceof TmplAstTemplate3 || consumer instanceof TmplAstElement4) {
|
|
@@ -7489,7 +7523,10 @@ var SymbolBuilder = class {
|
|
|
7489
7523
|
const host = this.getSymbol(consumer);
|
|
7490
7524
|
return host !== null ? { kind: SymbolKind.DomBinding, host } : null;
|
|
7491
7525
|
}
|
|
7492
|
-
const nodes = findAllMatchingNodes(this.typeCheckBlock, {
|
|
7526
|
+
const nodes = findAllMatchingNodes(this.typeCheckBlock, {
|
|
7527
|
+
withSpan: binding.sourceSpan,
|
|
7528
|
+
filter: isAssignment
|
|
7529
|
+
});
|
|
7493
7530
|
const bindings = [];
|
|
7494
7531
|
for (const node of nodes) {
|
|
7495
7532
|
if (!isAccessExpression(node.left)) {
|
|
@@ -7562,7 +7599,10 @@ var SymbolBuilder = class {
|
|
|
7562
7599
|
};
|
|
7563
7600
|
}
|
|
7564
7601
|
getSymbolOfVariable(variable) {
|
|
7565
|
-
const node = findFirstMatchingNode(this.typeCheckBlock, {
|
|
7602
|
+
const node = findFirstMatchingNode(this.typeCheckBlock, {
|
|
7603
|
+
withSpan: variable.sourceSpan,
|
|
7604
|
+
filter: ts34.isVariableDeclaration
|
|
7605
|
+
});
|
|
7566
7606
|
if (node === null) {
|
|
7567
7607
|
return null;
|
|
7568
7608
|
}
|
|
@@ -7590,7 +7630,10 @@ var SymbolBuilder = class {
|
|
|
7590
7630
|
}
|
|
7591
7631
|
getSymbolOfReference(ref) {
|
|
7592
7632
|
const target = this.templateData.boundTarget.getReferenceTarget(ref);
|
|
7593
|
-
let node = findFirstMatchingNode(this.typeCheckBlock, {
|
|
7633
|
+
let node = findFirstMatchingNode(this.typeCheckBlock, {
|
|
7634
|
+
withSpan: ref.sourceSpan,
|
|
7635
|
+
filter: ts34.isVariableDeclaration
|
|
7636
|
+
});
|
|
7594
7637
|
if (node === null || target === null || node.initializer === void 0) {
|
|
7595
7638
|
return null;
|
|
7596
7639
|
}
|
|
@@ -7633,7 +7676,10 @@ var SymbolBuilder = class {
|
|
|
7633
7676
|
}
|
|
7634
7677
|
}
|
|
7635
7678
|
getSymbolOfPipe(expression) {
|
|
7636
|
-
const methodAccess = findFirstMatchingNode(this.typeCheckBlock, {
|
|
7679
|
+
const methodAccess = findFirstMatchingNode(this.typeCheckBlock, {
|
|
7680
|
+
withSpan: expression.nameSpan,
|
|
7681
|
+
filter: ts34.isPropertyAccessExpression
|
|
7682
|
+
});
|
|
7637
7683
|
if (methodAccess === null) {
|
|
7638
7684
|
return null;
|
|
7639
7685
|
}
|
|
@@ -7673,7 +7719,10 @@ var SymbolBuilder = class {
|
|
|
7673
7719
|
}
|
|
7674
7720
|
let node = null;
|
|
7675
7721
|
if (expression instanceof PropertyRead5) {
|
|
7676
|
-
node = findFirstMatchingNode(this.typeCheckBlock, {
|
|
7722
|
+
node = findFirstMatchingNode(this.typeCheckBlock, {
|
|
7723
|
+
withSpan,
|
|
7724
|
+
filter: ts34.isPropertyAccessExpression
|
|
7725
|
+
});
|
|
7677
7726
|
}
|
|
7678
7727
|
if (node === null) {
|
|
7679
7728
|
node = findFirstMatchingNode(this.typeCheckBlock, { withSpan, filter: anyNodeFilter });
|
|
@@ -9059,12 +9108,14 @@ var ExpressionsSemanticsVisitor = class extends RecursiveAstVisitor3 {
|
|
|
9059
9108
|
}
|
|
9060
9109
|
makeIllegalTemplateVarDiagnostic(target, expressionNode, errorMessage) {
|
|
9061
9110
|
var _a, _b;
|
|
9062
|
-
return this.templateTypeChecker.makeTemplateDiagnostic(this.component, expressionNode.handlerSpan, ts39.DiagnosticCategory.Error, ngErrorCode(ErrorCode.WRITE_TO_READ_ONLY_VARIABLE), errorMessage, [
|
|
9063
|
-
|
|
9064
|
-
|
|
9065
|
-
|
|
9066
|
-
|
|
9067
|
-
|
|
9111
|
+
return this.templateTypeChecker.makeTemplateDiagnostic(this.component, expressionNode.handlerSpan, ts39.DiagnosticCategory.Error, ngErrorCode(ErrorCode.WRITE_TO_READ_ONLY_VARIABLE), errorMessage, [
|
|
9112
|
+
{
|
|
9113
|
+
text: `The variable ${target.name} is declared here.`,
|
|
9114
|
+
start: ((_a = target.valueSpan) == null ? void 0 : _a.start.offset) || target.sourceSpan.start.offset,
|
|
9115
|
+
end: ((_b = target.valueSpan) == null ? void 0 : _b.end.offset) || target.sourceSpan.end.offset,
|
|
9116
|
+
sourceFile: this.component.getSourceFile()
|
|
9117
|
+
}
|
|
9118
|
+
]);
|
|
9068
9119
|
}
|
|
9069
9120
|
};
|
|
9070
9121
|
function unwrapAstWithSource(ast) {
|
|
@@ -9336,9 +9387,7 @@ var NgCompiler = class {
|
|
|
9336
9387
|
return this.incrementalCompilation.depGraph.getResourceDependencies(file);
|
|
9337
9388
|
}
|
|
9338
9389
|
getDiagnostics() {
|
|
9339
|
-
const diagnostics = [
|
|
9340
|
-
...this.getNonTemplateDiagnostics()
|
|
9341
|
-
];
|
|
9390
|
+
const diagnostics = [...this.getNonTemplateDiagnostics()];
|
|
9342
9391
|
try {
|
|
9343
9392
|
diagnostics.push(...this.getTemplateDiagnostics(), ...this.runAdditionalChecks());
|
|
9344
9393
|
} catch (err) {
|
|
@@ -9350,7 +9399,9 @@ var NgCompiler = class {
|
|
|
9350
9399
|
return this.addMessageTextDetails(diagnostics);
|
|
9351
9400
|
}
|
|
9352
9401
|
getDiagnosticsForFile(file, optimizeFor) {
|
|
9353
|
-
const diagnostics = [
|
|
9402
|
+
const diagnostics = [
|
|
9403
|
+
...this.getNonTemplateDiagnostics().filter((diag) => diag.file === file)
|
|
9404
|
+
];
|
|
9354
9405
|
try {
|
|
9355
9406
|
diagnostics.push(...this.getTemplateDiagnosticsForFile(file, optimizeFor), ...this.runAdditionalChecks(file));
|
|
9356
9407
|
} catch (err) {
|
|
@@ -9751,7 +9802,10 @@ var NgCompiler = class {
|
|
|
9751
9802
|
const ngModuleIndex = new NgModuleIndexImpl(metaReader, localMetaReader);
|
|
9752
9803
|
const ngModuleScopeRegistry = new LocalModuleScopeRegistry(localMetaReader, metaReader, depScopeReader, refEmitter, aliasingHost);
|
|
9753
9804
|
const standaloneScopeReader = new StandaloneComponentScopeReader(metaReader, ngModuleScopeRegistry, depScopeReader);
|
|
9754
|
-
const scopeReader = new CompoundComponentScopeReader([
|
|
9805
|
+
const scopeReader = new CompoundComponentScopeReader([
|
|
9806
|
+
ngModuleScopeRegistry,
|
|
9807
|
+
standaloneScopeReader
|
|
9808
|
+
]);
|
|
9755
9809
|
const semanticDepGraphUpdater = this.incrementalCompilation.semanticDepGraphUpdater;
|
|
9756
9810
|
const metaRegistry = new CompoundMetadataRegistry([localMetaRegistry, ngModuleScopeRegistry]);
|
|
9757
9811
|
const injectableRegistry = new InjectableClassRegistry(reflector, isCore);
|
|
@@ -10441,15 +10495,17 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
|
|
|
10441
10495
|
}
|
|
10442
10496
|
return { project: projectFile, rootNames, projectReferences, options, errors, emitFlags };
|
|
10443
10497
|
} catch (e) {
|
|
10444
|
-
const errors = [
|
|
10445
|
-
|
|
10446
|
-
|
|
10447
|
-
|
|
10448
|
-
|
|
10449
|
-
|
|
10450
|
-
|
|
10451
|
-
|
|
10452
|
-
|
|
10498
|
+
const errors = [
|
|
10499
|
+
{
|
|
10500
|
+
category: ts45.DiagnosticCategory.Error,
|
|
10501
|
+
messageText: (_a = e.stack) != null ? _a : e.message,
|
|
10502
|
+
file: void 0,
|
|
10503
|
+
start: void 0,
|
|
10504
|
+
length: void 0,
|
|
10505
|
+
source: "angular",
|
|
10506
|
+
code: UNKNOWN_ERROR_CODE
|
|
10507
|
+
}
|
|
10508
|
+
];
|
|
10453
10509
|
return { project: "", errors, rootNames: [], options: {}, emitFlags: EmitFlags.Default };
|
|
10454
10510
|
}
|
|
10455
10511
|
}
|
|
@@ -10511,7 +10567,13 @@ function performCompilation({ rootNames, options, host, oldProgram, emitCallback
|
|
|
10511
10567
|
allDiagnostics.push(createMessageDiagnostic(`Time for diagnostics: ${afterDiags - beforeDiags}ms.`));
|
|
10512
10568
|
}
|
|
10513
10569
|
if (!hasErrors(allDiagnostics)) {
|
|
10514
|
-
emitResult = program.emit({
|
|
10570
|
+
emitResult = program.emit({
|
|
10571
|
+
emitCallback,
|
|
10572
|
+
mergeEmitResultsCallback,
|
|
10573
|
+
customTransformers,
|
|
10574
|
+
emitFlags,
|
|
10575
|
+
forceEmit
|
|
10576
|
+
});
|
|
10515
10577
|
allDiagnostics.push(...emitResult.diagnostics);
|
|
10516
10578
|
return { diagnostics: allDiagnostics, program, emitResult };
|
|
10517
10579
|
}
|
|
@@ -10541,7 +10603,10 @@ function defaultGatherDiagnostics(program) {
|
|
|
10541
10603
|
let checkOtherDiagnostics = true;
|
|
10542
10604
|
checkOtherDiagnostics = checkOtherDiagnostics && checkDiagnostics([...program.getTsOptionDiagnostics(), ...program.getNgOptionDiagnostics()]);
|
|
10543
10605
|
checkOtherDiagnostics = checkOtherDiagnostics && checkDiagnostics(program.getTsSyntacticDiagnostics());
|
|
10544
|
-
checkOtherDiagnostics = checkOtherDiagnostics && checkDiagnostics([
|
|
10606
|
+
checkOtherDiagnostics = checkOtherDiagnostics && checkDiagnostics([
|
|
10607
|
+
...program.getTsSemanticDiagnostics(),
|
|
10608
|
+
...program.getNgStructuralDiagnostics()
|
|
10609
|
+
]);
|
|
10545
10610
|
checkOtherDiagnostics = checkOtherDiagnostics && checkDiagnostics(program.getNgSemanticDiagnostics());
|
|
10546
10611
|
return allDiagnostics;
|
|
10547
10612
|
}
|
|
@@ -10593,4 +10658,4 @@ export {
|
|
|
10593
10658
|
* Use of this source code is governed by an MIT-style license that can be
|
|
10594
10659
|
* found in the LICENSE file at https://angular.io/license
|
|
10595
10660
|
*/
|
|
10596
|
-
//# sourceMappingURL=chunk-
|
|
10661
|
+
//# sourceMappingURL=chunk-XAPDG6EU.js.map
|