@angular/compiler-cli 17.1.2 → 17.1.3
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-5YHUYFQ5.js → chunk-ELKFSTAE.js} +95 -36
- package/bundles/chunk-ELKFSTAE.js.map +6 -0
- package/bundles/{chunk-24NMPW5I.js → chunk-ENSQEBQC.js} +3 -3
- package/bundles/{chunk-MIB7EGOT.js → chunk-H3PIRNUD.js} +2 -2
- package/bundles/{chunk-GKQNBAG5.js → chunk-HJWHU6BO.js} +15 -5
- package/bundles/{chunk-GKQNBAG5.js.map → chunk-HJWHU6BO.js.map} +1 -1
- package/bundles/{chunk-TKJ4KX5N.js → chunk-JJ5HCA72.js} +3 -3
- package/bundles/{chunk-TFBB265K.js → chunk-O2GHHXCL.js} +21 -7
- package/bundles/chunk-O2GHHXCL.js.map +6 -0
- package/bundles/{chunk-DUY2FPLZ.js → chunk-UM6JO3VZ.js} +3 -3
- package/bundles/{chunk-DUY2FPLZ.js.map → chunk-UM6JO3VZ.js.map} +1 -1
- package/bundles/index.js +6 -6
- package/bundles/linker/babel/index.js +3 -3
- package/bundles/linker/index.js +3 -3
- package/bundles/private/localize.js +1 -1
- package/bundles/private/migrations.js +3 -3
- package/bundles/private/tooling.js +4 -4
- package/bundles/src/bin/ng_xi18n.js +5 -5
- package/bundles/src/bin/ngc.js +5 -5
- package/bundles_metadata.json +1 -1
- package/linker/src/file_linker/partial_linkers/util.d.ts +1 -1
- package/package.json +2 -2
- package/src/ngtsc/annotations/component/src/metadata.d.ts +4 -1
- package/src/ngtsc/diagnostics/src/error.d.ts +4 -3
- package/src/ngtsc/docs/src/entities.d.ts +1 -0
- package/src/ngtsc/docs/src/function_extractor.d.ts +3 -2
- package/src/ngtsc/reflection/src/typescript.d.ts +1 -2
- package/bundles/chunk-5YHUYFQ5.js.map +0 -6
- package/bundles/chunk-TFBB265K.js.map +0 -6
- /package/bundles/{chunk-24NMPW5I.js.map → chunk-ENSQEBQC.js.map} +0 -0
- /package/bundles/{chunk-MIB7EGOT.js.map → chunk-H3PIRNUD.js.map} +0 -0
- /package/bundles/{chunk-TKJ4KX5N.js.map → chunk-JJ5HCA72.js.map} +0 -0
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
aliasTransformFactory,
|
|
39
39
|
declarationTransformFactory,
|
|
40
40
|
ivyTransformFactory
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-HJWHU6BO.js";
|
|
42
42
|
import {
|
|
43
43
|
AbsoluteModuleStrategy,
|
|
44
44
|
AliasStrategy,
|
|
@@ -49,7 +49,6 @@ import {
|
|
|
49
49
|
ERROR_DETAILS_PAGE_BASE_URL,
|
|
50
50
|
ErrorCode,
|
|
51
51
|
ExtendedTemplateDiagnosticName,
|
|
52
|
-
FatalDiagnosticError,
|
|
53
52
|
ImportFlags,
|
|
54
53
|
ImportManager,
|
|
55
54
|
LocalIdentifierStrategy,
|
|
@@ -73,6 +72,7 @@ import {
|
|
|
73
72
|
getTokenAtPosition,
|
|
74
73
|
isAssignment,
|
|
75
74
|
isDtsPath,
|
|
75
|
+
isFatalDiagnosticError,
|
|
76
76
|
isNamedClassDeclaration,
|
|
77
77
|
isNonDeclarationTsPath,
|
|
78
78
|
isSymbolWithValueDeclaration,
|
|
@@ -86,7 +86,7 @@ import {
|
|
|
86
86
|
toUnredirectedSourceFile,
|
|
87
87
|
translateExpression,
|
|
88
88
|
translateType
|
|
89
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-O2GHHXCL.js";
|
|
90
90
|
import {
|
|
91
91
|
ActivePerfRecorder,
|
|
92
92
|
DelegatingPerfRecorder,
|
|
@@ -103,7 +103,7 @@ import {
|
|
|
103
103
|
getSourceFileOrError,
|
|
104
104
|
join,
|
|
105
105
|
resolve
|
|
106
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-UM6JO3VZ.js";
|
|
107
107
|
|
|
108
108
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/api.mjs
|
|
109
109
|
var DEFAULT_ERROR_CODE = 100;
|
|
@@ -528,7 +528,8 @@ function extractResolvedTypeString(node, checker) {
|
|
|
528
528
|
|
|
529
529
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/function_extractor.mjs
|
|
530
530
|
var FunctionExtractor = class {
|
|
531
|
-
constructor(declaration, typeChecker) {
|
|
531
|
+
constructor(name, declaration, typeChecker) {
|
|
532
|
+
this.name = name;
|
|
532
533
|
this.declaration = declaration;
|
|
533
534
|
this.typeChecker = typeChecker;
|
|
534
535
|
}
|
|
@@ -537,7 +538,8 @@ var FunctionExtractor = class {
|
|
|
537
538
|
const returnType = signature ? this.typeChecker.typeToString(this.typeChecker.getReturnTypeOfSignature(signature)) : "unknown";
|
|
538
539
|
return {
|
|
539
540
|
params: this.extractAllParams(this.declaration.parameters),
|
|
540
|
-
name: this.
|
|
541
|
+
name: this.name,
|
|
542
|
+
isNewType: ts5.isConstructSignatureDeclaration(this.declaration),
|
|
541
543
|
returnType,
|
|
542
544
|
entryType: EntryType.Function,
|
|
543
545
|
generics: extractGenerics(this.declaration),
|
|
@@ -591,7 +593,7 @@ var ClassExtractor = class {
|
|
|
591
593
|
name: this.declaration.name.text,
|
|
592
594
|
isAbstract: this.isAbstract(),
|
|
593
595
|
entryType: ts6.isInterfaceDeclaration(this.declaration) ? EntryType.Interface : EntryType.UndecoratedClass,
|
|
594
|
-
members: this.extractAllClassMembers(),
|
|
596
|
+
members: this.extractSignatures().concat(this.extractAllClassMembers()),
|
|
595
597
|
generics: extractGenerics(this.declaration),
|
|
596
598
|
description: extractJsDocDescription(this.declaration),
|
|
597
599
|
jsdocTags: extractJsDocTags(this.declaration),
|
|
@@ -620,14 +622,25 @@ var ClassExtractor = class {
|
|
|
620
622
|
}
|
|
621
623
|
return void 0;
|
|
622
624
|
}
|
|
625
|
+
extractSignatures() {
|
|
626
|
+
return this.computeAllSignatureDeclarations().map((s) => this.extractSignature(s));
|
|
627
|
+
}
|
|
623
628
|
extractMethod(methodDeclaration) {
|
|
624
|
-
const functionExtractor = new FunctionExtractor(methodDeclaration, this.typeChecker);
|
|
629
|
+
const functionExtractor = new FunctionExtractor(methodDeclaration.name.getText(), methodDeclaration, this.typeChecker);
|
|
625
630
|
return {
|
|
626
631
|
...functionExtractor.extract(),
|
|
627
632
|
memberType: MemberType.Method,
|
|
628
633
|
memberTags: this.getMemberTags(methodDeclaration)
|
|
629
634
|
};
|
|
630
635
|
}
|
|
636
|
+
extractSignature(signature) {
|
|
637
|
+
const functionExtractor = new FunctionExtractor(ts6.isConstructSignatureDeclaration(signature) ? "new" : "", signature, this.typeChecker);
|
|
638
|
+
return {
|
|
639
|
+
...functionExtractor.extract(),
|
|
640
|
+
memberType: MemberType.Method,
|
|
641
|
+
memberTags: []
|
|
642
|
+
};
|
|
643
|
+
}
|
|
631
644
|
extractClassProperty(propertyDeclaration) {
|
|
632
645
|
return {
|
|
633
646
|
name: propertyDeclaration.name.getText(),
|
|
@@ -655,6 +668,21 @@ var ClassExtractor = class {
|
|
|
655
668
|
}
|
|
656
669
|
return tags;
|
|
657
670
|
}
|
|
671
|
+
computeAllSignatureDeclarations() {
|
|
672
|
+
const type = this.typeChecker.getTypeAtLocation(this.declaration);
|
|
673
|
+
const signatures = [
|
|
674
|
+
...type.getCallSignatures(),
|
|
675
|
+
...type.getConstructSignatures()
|
|
676
|
+
];
|
|
677
|
+
const result = [];
|
|
678
|
+
for (const signature of signatures) {
|
|
679
|
+
const decl = signature.getDeclaration();
|
|
680
|
+
if (this.isDocumentableSignature(decl) && this.isDocumentableMember(decl)) {
|
|
681
|
+
result.push(decl);
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
return result;
|
|
685
|
+
}
|
|
658
686
|
getMemberDeclarations() {
|
|
659
687
|
var _a;
|
|
660
688
|
const type = this.typeChecker.getTypeAtLocation(this.declaration);
|
|
@@ -708,6 +736,9 @@ var ClassExtractor = class {
|
|
|
708
736
|
isMethod(member) {
|
|
709
737
|
return ts6.isMethodDeclaration(member) || ts6.isMethodSignature(member);
|
|
710
738
|
}
|
|
739
|
+
isDocumentableSignature(signature) {
|
|
740
|
+
return ts6.isConstructSignatureDeclaration(signature) || ts6.isCallSignatureDeclaration(signature);
|
|
741
|
+
}
|
|
711
742
|
isAbstract() {
|
|
712
743
|
var _a;
|
|
713
744
|
const modifiers = (_a = this.declaration.modifiers) != null ? _a : [];
|
|
@@ -973,7 +1004,7 @@ var DocsExtractor = class {
|
|
|
973
1004
|
return extractInterface(node, this.typeChecker);
|
|
974
1005
|
}
|
|
975
1006
|
if (ts9.isFunctionDeclaration(node)) {
|
|
976
|
-
const functionExtractor = new FunctionExtractor(node, this.typeChecker);
|
|
1007
|
+
const functionExtractor = new FunctionExtractor(node.name.getText(), node, this.typeChecker);
|
|
977
1008
|
return functionExtractor.extract();
|
|
978
1009
|
}
|
|
979
1010
|
if (ts9.isVariableDeclaration(node) && !isSyntheticAngularConstant(node)) {
|
|
@@ -996,7 +1027,7 @@ var DocsExtractor = class {
|
|
|
996
1027
|
for (let i = 0; i < declarationCount; i++) {
|
|
997
1028
|
const [exportName, declaration] = exportedDeclarations[i];
|
|
998
1029
|
if (ts9.isFunctionDeclaration(declaration)) {
|
|
999
|
-
const extractor = new FunctionExtractor(declaration, this.typeChecker);
|
|
1030
|
+
const extractor = new FunctionExtractor(exportName, declaration, this.typeChecker);
|
|
1000
1031
|
const overloads = extractor.getOverloads().map((overload) => [exportName, overload]);
|
|
1001
1032
|
exportedDeclarations.push(...overloads);
|
|
1002
1033
|
}
|
|
@@ -5973,7 +6004,7 @@ var TemplateSourceManager = class {
|
|
|
5973
6004
|
};
|
|
5974
6005
|
|
|
5975
6006
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/template_symbol_builder.mjs
|
|
5976
|
-
import { AST, ASTWithSource as ASTWithSource3, BindingPipe as BindingPipe2, PropertyRead as PropertyRead5, PropertyWrite as PropertyWrite4, SafePropertyRead as SafePropertyRead4, TmplAstBoundAttribute as TmplAstBoundAttribute2, TmplAstBoundEvent, TmplAstElement as TmplAstElement4, TmplAstReference as TmplAstReference4, TmplAstTemplate as TmplAstTemplate3, TmplAstTextAttribute as TmplAstTextAttribute3, TmplAstVariable as TmplAstVariable3 } from "@angular/compiler";
|
|
6007
|
+
import { AST, ASTWithSource as ASTWithSource3, BindingPipe as BindingPipe2, PropertyRead as PropertyRead5, PropertyWrite as PropertyWrite4, R3Identifiers as R3Identifiers4, SafePropertyRead as SafePropertyRead4, TmplAstBoundAttribute as TmplAstBoundAttribute2, TmplAstBoundEvent, TmplAstElement as TmplAstElement4, TmplAstReference as TmplAstReference4, TmplAstTemplate as TmplAstTemplate3, TmplAstTextAttribute as TmplAstTextAttribute3, TmplAstVariable as TmplAstVariable3 } from "@angular/compiler";
|
|
5977
6008
|
import ts31 from "typescript";
|
|
5978
6009
|
var SymbolBuilder = class {
|
|
5979
6010
|
constructor(tcbPath, tcbIsShim, typeCheckBlock, templateData, componentScopeReader, getTypeChecker) {
|
|
@@ -6209,6 +6240,7 @@ var SymbolBuilder = class {
|
|
|
6209
6240
|
return { kind: SymbolKind.Output, bindings };
|
|
6210
6241
|
}
|
|
6211
6242
|
getSymbolOfInputBinding(binding) {
|
|
6243
|
+
var _a;
|
|
6212
6244
|
const consumer = this.templateData.boundTarget.getConsumerOfBinding(binding);
|
|
6213
6245
|
if (consumer === null) {
|
|
6214
6246
|
return null;
|
|
@@ -6223,11 +6255,23 @@ var SymbolBuilder = class {
|
|
|
6223
6255
|
if (!isAccessExpression(node.left)) {
|
|
6224
6256
|
continue;
|
|
6225
6257
|
}
|
|
6226
|
-
const
|
|
6258
|
+
const signalInputAssignment = unwrapSignalInputWriteTAccessor(node.left);
|
|
6259
|
+
let symbolInfo = null;
|
|
6260
|
+
if (signalInputAssignment !== null) {
|
|
6261
|
+
const fieldSymbol = this.getSymbolOfTsNode(signalInputAssignment.fieldExpr);
|
|
6262
|
+
const typeSymbol = this.getSymbolOfTsNode(signalInputAssignment.typeExpr);
|
|
6263
|
+
symbolInfo = fieldSymbol === null || typeSymbol === null ? null : {
|
|
6264
|
+
tcbLocation: fieldSymbol.tcbLocation,
|
|
6265
|
+
tsSymbol: fieldSymbol.tsSymbol,
|
|
6266
|
+
tsType: typeSymbol.tsType
|
|
6267
|
+
};
|
|
6268
|
+
} else {
|
|
6269
|
+
symbolInfo = this.getSymbolOfTsNode(node.left);
|
|
6270
|
+
}
|
|
6227
6271
|
if (symbolInfo === null || symbolInfo.tsSymbol === null) {
|
|
6228
6272
|
continue;
|
|
6229
6273
|
}
|
|
6230
|
-
const target = this.getDirectiveSymbolForAccessExpression(node.left, consumer);
|
|
6274
|
+
const target = this.getDirectiveSymbolForAccessExpression((_a = signalInputAssignment == null ? void 0 : signalInputAssignment.fieldExpr) != null ? _a : node.left, consumer);
|
|
6231
6275
|
if (target === null) {
|
|
6232
6276
|
continue;
|
|
6233
6277
|
}
|
|
@@ -6243,9 +6287,9 @@ var SymbolBuilder = class {
|
|
|
6243
6287
|
}
|
|
6244
6288
|
return { kind: SymbolKind.Input, bindings };
|
|
6245
6289
|
}
|
|
6246
|
-
getDirectiveSymbolForAccessExpression(
|
|
6290
|
+
getDirectiveSymbolForAccessExpression(fieldAccessExpr, { isComponent, selector, isStructural }) {
|
|
6247
6291
|
var _a;
|
|
6248
|
-
const tsSymbol = this.getTypeChecker().getSymbolAtLocation(
|
|
6292
|
+
const tsSymbol = this.getTypeChecker().getSymbolAtLocation(fieldAccessExpr.expression);
|
|
6249
6293
|
if ((tsSymbol == null ? void 0 : tsSymbol.declarations) === void 0 || tsSymbol.declarations.length === 0 || selector === null) {
|
|
6250
6294
|
return null;
|
|
6251
6295
|
}
|
|
@@ -6423,8 +6467,6 @@ var SymbolBuilder = class {
|
|
|
6423
6467
|
let tsSymbol;
|
|
6424
6468
|
if (ts31.isPropertyAccessExpression(node)) {
|
|
6425
6469
|
tsSymbol = this.getTypeChecker().getSymbolAtLocation(node.name);
|
|
6426
|
-
} else if (ts31.isElementAccessExpression(node)) {
|
|
6427
|
-
tsSymbol = this.getTypeChecker().getSymbolAtLocation(node.argumentExpression);
|
|
6428
6470
|
} else {
|
|
6429
6471
|
tsSymbol = this.getTypeChecker().getSymbolAtLocation(node);
|
|
6430
6472
|
}
|
|
@@ -6460,6 +6502,21 @@ function anyNodeFilter(n) {
|
|
|
6460
6502
|
function sourceSpanEqual(a, b) {
|
|
6461
6503
|
return a.start.offset === b.start.offset && a.end.offset === b.end.offset;
|
|
6462
6504
|
}
|
|
6505
|
+
function unwrapSignalInputWriteTAccessor(expr) {
|
|
6506
|
+
if (!ts31.isElementAccessExpression(expr) || !ts31.isPropertyAccessExpression(expr.argumentExpression)) {
|
|
6507
|
+
return null;
|
|
6508
|
+
}
|
|
6509
|
+
if (!ts31.isIdentifier(expr.argumentExpression.name) || expr.argumentExpression.name.text !== R3Identifiers4.InputSignalBrandWriteType.name) {
|
|
6510
|
+
return null;
|
|
6511
|
+
}
|
|
6512
|
+
if (!ts31.isPropertyAccessExpression(expr.expression) && !ts31.isElementAccessExpression(expr.expression)) {
|
|
6513
|
+
throw new Error("Unexpected expression for signal input write type.");
|
|
6514
|
+
}
|
|
6515
|
+
return {
|
|
6516
|
+
fieldExpr: expr.expression,
|
|
6517
|
+
typeExpr: expr
|
|
6518
|
+
};
|
|
6519
|
+
}
|
|
6463
6520
|
|
|
6464
6521
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/checker.mjs
|
|
6465
6522
|
var REGISTRY2 = new DomElementSchemaRegistry2();
|
|
@@ -7304,7 +7361,7 @@ var InterpolatedSignalCheck = class extends TemplateCheckWithVisitor {
|
|
|
7304
7361
|
}
|
|
7305
7362
|
};
|
|
7306
7363
|
function isSignal(symbol) {
|
|
7307
|
-
return ((symbol == null ? void 0 : symbol.escapedName) === "WritableSignal" || (symbol == null ? void 0 : symbol.escapedName) === "Signal" || (symbol == null ? void 0 : symbol.escapedName) === "InputSignal") && symbol.parent.escapedName.includes("@angular/core");
|
|
7364
|
+
return ((symbol == null ? void 0 : symbol.escapedName) === "WritableSignal" || (symbol == null ? void 0 : symbol.escapedName) === "Signal" || (symbol == null ? void 0 : symbol.escapedName) === "InputSignal" || (symbol == null ? void 0 : symbol.escapedName) === "InputSignalWithTransform") && symbol.parent.escapedName.includes("@angular/core");
|
|
7308
7365
|
}
|
|
7309
7366
|
function buildDiagnosticForSignal(ctx, node, component) {
|
|
7310
7367
|
const symbol = ctx.templateTypeChecker.getSymbolOfNode(node, component);
|
|
@@ -7807,10 +7864,19 @@ var NgCompiler = class {
|
|
|
7807
7864
|
return this.incrementalCompilation.depGraph.getResourceDependencies(file);
|
|
7808
7865
|
}
|
|
7809
7866
|
getDiagnostics() {
|
|
7810
|
-
const diagnostics = [
|
|
7811
|
-
|
|
7812
|
-
|
|
7813
|
-
|
|
7867
|
+
const diagnostics = [
|
|
7868
|
+
...this.getNonTemplateDiagnostics()
|
|
7869
|
+
];
|
|
7870
|
+
try {
|
|
7871
|
+
diagnostics.push(...this.getTemplateDiagnostics());
|
|
7872
|
+
if (this.options.strictTemplates) {
|
|
7873
|
+
diagnostics.push(...this.getExtendedTemplateDiagnostics());
|
|
7874
|
+
}
|
|
7875
|
+
} catch (err) {
|
|
7876
|
+
if (!isFatalDiagnosticError(err)) {
|
|
7877
|
+
throw err;
|
|
7878
|
+
}
|
|
7879
|
+
diagnostics.push(err.toDiagnostic());
|
|
7814
7880
|
}
|
|
7815
7881
|
return this.addMessageTextDetails(diagnostics);
|
|
7816
7882
|
}
|
|
@@ -7821,11 +7887,11 @@ var NgCompiler = class {
|
|
|
7821
7887
|
if (this.options.strictTemplates) {
|
|
7822
7888
|
diagnostics.push(...this.getExtendedTemplateDiagnostics(file));
|
|
7823
7889
|
}
|
|
7824
|
-
} catch (
|
|
7825
|
-
if (
|
|
7826
|
-
|
|
7890
|
+
} catch (err) {
|
|
7891
|
+
if (!isFatalDiagnosticError(err)) {
|
|
7892
|
+
throw err;
|
|
7827
7893
|
}
|
|
7828
|
-
|
|
7894
|
+
diagnostics.push(err.toDiagnostic());
|
|
7829
7895
|
}
|
|
7830
7896
|
return this.addMessageTextDetails(diagnostics);
|
|
7831
7897
|
}
|
|
@@ -7840,7 +7906,7 @@ var NgCompiler = class {
|
|
|
7840
7906
|
diagnostics.push(...extendedTemplateChecker.getDiagnosticsForComponent(component));
|
|
7841
7907
|
}
|
|
7842
7908
|
} catch (err) {
|
|
7843
|
-
if (!(err
|
|
7909
|
+
if (!isFatalDiagnosticError(err)) {
|
|
7844
7910
|
throw err;
|
|
7845
7911
|
}
|
|
7846
7912
|
diagnostics.push(err.toDiagnostic());
|
|
@@ -8100,14 +8166,7 @@ var NgCompiler = class {
|
|
|
8100
8166
|
if (sf.isDeclarationFile || this.adapter.isShim(sf)) {
|
|
8101
8167
|
continue;
|
|
8102
8168
|
}
|
|
8103
|
-
|
|
8104
|
-
diagnostics.push(...compilation.templateTypeChecker.getDiagnosticsForFile(sf, OptimizeFor.WholeProgram));
|
|
8105
|
-
} catch (err) {
|
|
8106
|
-
if (!(err instanceof FatalDiagnosticError)) {
|
|
8107
|
-
throw err;
|
|
8108
|
-
}
|
|
8109
|
-
diagnostics.push(err.toDiagnostic());
|
|
8110
|
-
}
|
|
8169
|
+
diagnostics.push(...compilation.templateTypeChecker.getDiagnosticsForFile(sf, OptimizeFor.WholeProgram));
|
|
8111
8170
|
}
|
|
8112
8171
|
const program = this.programDriver.getProgram();
|
|
8113
8172
|
this.incrementalStrategy.setIncrementalState(this.incrementalCompilation.state, program);
|
|
@@ -9026,4 +9085,4 @@ export {
|
|
|
9026
9085
|
* Use of this source code is governed by an MIT-style license that can be
|
|
9027
9086
|
* found in the LICENSE file at https://angular.io/license
|
|
9028
9087
|
*/
|
|
9029
|
-
//# sourceMappingURL=chunk-
|
|
9088
|
+
//# sourceMappingURL=chunk-ELKFSTAE.js.map
|