@angular/compiler-cli 20.1.2 → 20.2.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-BPDNYZBC.js +1 -1
- package/bundles/{chunk-JWGODKML.js → chunk-F7QVREVY.js} +1 -1
- package/bundles/{chunk-NA3RDKZL.js → chunk-PLUBZWSY.js} +1 -1
- package/bundles/{chunk-GXMJGI7A.js → chunk-TMIC4MKN.js} +450 -308
- package/bundles/{chunk-WX5V4QZA.js → chunk-U3R42CLJ.js} +3 -3
- package/bundles/index.js +4 -4
- package/bundles/private/migrations.js +1 -1
- package/bundles/private/tooling.js +2 -2
- package/bundles/src/bin/ng_xi18n.js +4 -4
- package/bundles/src/bin/ngc.js +4 -4
- package/linker/src/file_linker/partial_linkers/util.d.ts +1 -1
- package/package.json +3 -3
- package/src/ngtsc/perf/src/api.d.ts +24 -16
- package/src/ngtsc/typecheck/api/api.d.ts +1 -1
- package/src/ngtsc/typecheck/api/checker.d.ts +15 -0
- package/src/ngtsc/typecheck/diagnostics/src/diagnostic.d.ts +7 -1
- package/src/ngtsc/typecheck/src/checker.d.ts +2 -0
- package/src/ngtsc/typecheck/src/ts_util.d.ts +7 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
6
|
angularJitApplicationTransform
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-PLUBZWSY.js";
|
|
8
8
|
import {
|
|
9
9
|
AbsoluteModuleStrategy,
|
|
10
10
|
ActivePerfRecorder,
|
|
@@ -92,7 +92,7 @@ import {
|
|
|
92
92
|
toUnredirectedSourceFile,
|
|
93
93
|
tryParseInitializerApi,
|
|
94
94
|
untagAllTsFiles
|
|
95
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-TMIC4MKN.js";
|
|
96
96
|
import {
|
|
97
97
|
LogicalFileSystem,
|
|
98
98
|
absoluteFrom,
|
|
@@ -1298,7 +1298,7 @@ function compareVersions(v1, v2) {
|
|
|
1298
1298
|
|
|
1299
1299
|
// packages/compiler-cli/src/typescript_support.js
|
|
1300
1300
|
var MIN_TS_VERSION = "5.8.0";
|
|
1301
|
-
var MAX_TS_VERSION = "
|
|
1301
|
+
var MAX_TS_VERSION = "6.0.0";
|
|
1302
1302
|
var tsVersion = ts13.version;
|
|
1303
1303
|
function checkVersion(version, minVersion, maxVersion) {
|
|
1304
1304
|
if (compareVersions(version, minVersion) < 0 || compareVersions(version, maxVersion) >= 0) {
|
package/bundles/index.js
CHANGED
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
isTsDiagnostic,
|
|
29
29
|
performCompilation,
|
|
30
30
|
readConfiguration
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-U3R42CLJ.js";
|
|
32
32
|
import {
|
|
33
33
|
ConsoleLogger,
|
|
34
34
|
LogLevel
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
angularJitApplicationTransform,
|
|
38
38
|
getDownlevelDecoratorsTransform,
|
|
39
39
|
getInitializerApiJitTransform
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-PLUBZWSY.js";
|
|
41
41
|
import {
|
|
42
42
|
ActivePerfRecorder,
|
|
43
43
|
ErrorCode,
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
TsCreateProgramDriver,
|
|
47
47
|
isLocalCompilationDiagnostics,
|
|
48
48
|
ngErrorCode
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-TMIC4MKN.js";
|
|
50
50
|
import "./chunk-I2BHWRAU.js";
|
|
51
51
|
import {
|
|
52
52
|
InvalidFileSystem,
|
|
@@ -77,7 +77,7 @@ import "./chunk-DWRM7PIK.js";
|
|
|
77
77
|
|
|
78
78
|
// packages/compiler-cli/src/version.js
|
|
79
79
|
import { Version } from "@angular/compiler";
|
|
80
|
-
var VERSION = new Version("20.1
|
|
80
|
+
var VERSION = new Version("20.2.0-next.1");
|
|
81
81
|
|
|
82
82
|
// packages/compiler-cli/private/tooling.js
|
|
83
83
|
var GLOBAL_DEFS_FOR_TERSER = {
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
TypeScriptReflectionHost,
|
|
14
14
|
createForwardRefResolver,
|
|
15
15
|
reflectObjectLiteral
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-TMIC4MKN.js";
|
|
17
17
|
import "../chunk-I2BHWRAU.js";
|
|
18
18
|
import "../chunk-GWZQLAGK.js";
|
|
19
19
|
import "../chunk-SZY7NM6F.js";
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
6
|
angularJitApplicationTransform
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-PLUBZWSY.js";
|
|
8
|
+
import "../chunk-TMIC4MKN.js";
|
|
9
9
|
import "../chunk-I2BHWRAU.js";
|
|
10
10
|
import "../chunk-GWZQLAGK.js";
|
|
11
11
|
import "../chunk-SZY7NM6F.js";
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
import {
|
|
7
7
|
main,
|
|
8
8
|
readCommandLineAndConfiguration
|
|
9
|
-
} from "../../chunk-
|
|
9
|
+
} from "../../chunk-F7QVREVY.js";
|
|
10
10
|
import {
|
|
11
11
|
EmitFlags
|
|
12
|
-
} from "../../chunk-
|
|
13
|
-
import "../../chunk-
|
|
14
|
-
import "../../chunk-
|
|
12
|
+
} from "../../chunk-U3R42CLJ.js";
|
|
13
|
+
import "../../chunk-PLUBZWSY.js";
|
|
14
|
+
import "../../chunk-TMIC4MKN.js";
|
|
15
15
|
import "../../chunk-I2BHWRAU.js";
|
|
16
16
|
import {
|
|
17
17
|
setFileSystem
|
package/bundles/src/bin/ngc.js
CHANGED
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
|
|
6
6
|
import {
|
|
7
7
|
main
|
|
8
|
-
} from "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
11
|
-
import "../../chunk-
|
|
8
|
+
} from "../../chunk-F7QVREVY.js";
|
|
9
|
+
import "../../chunk-U3R42CLJ.js";
|
|
10
|
+
import "../../chunk-PLUBZWSY.js";
|
|
11
|
+
import "../../chunk-TMIC4MKN.js";
|
|
12
12
|
import "../../chunk-I2BHWRAU.js";
|
|
13
13
|
import {
|
|
14
14
|
setFileSystem
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { MaybeForwardRefExpression, outputAst as o, R3DeclareDependencyMetadata, R3DependencyMetadata, R3Reference } from '@angular/compiler';
|
|
9
9
|
import { AstObject, AstValue } from '../../ast/ast_value';
|
|
10
|
-
export declare const PLACEHOLDER_VERSION = "20.1
|
|
10
|
+
export declare const PLACEHOLDER_VERSION = "20.2.0-next.1";
|
|
11
11
|
export declare function wrapReference<TExpression>(wrapped: o.WrappedNodeExpr<TExpression>): R3Reference;
|
|
12
12
|
/**
|
|
13
13
|
* Parses the value of an enum from the AST value's symbol name.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/compiler-cli",
|
|
3
|
-
"version": "20.1
|
|
3
|
+
"version": "20.2.0-next.1",
|
|
4
4
|
"description": "Angular - the compiler CLI for Node.js",
|
|
5
5
|
"typings": "index.d.ts",
|
|
6
6
|
"bin": {
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"yargs": "^18.0.0"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@angular/compiler": "20.1
|
|
52
|
-
"typescript": ">=5.8 <
|
|
51
|
+
"@angular/compiler": "20.2.0-next.1",
|
|
52
|
+
"typescript": ">=5.8 <6.0"
|
|
53
53
|
},
|
|
54
54
|
"peerDependenciesMeta": {
|
|
55
55
|
"typescript": {
|
|
@@ -83,75 +83,83 @@ export declare enum PerfPhase {
|
|
|
83
83
|
* Time spent computing template type-checking diagnostics.
|
|
84
84
|
*/
|
|
85
85
|
TtcDiagnostics = 14,
|
|
86
|
+
/**
|
|
87
|
+
* Time spent computing template type-checking suggestion diagnostics.
|
|
88
|
+
*/
|
|
89
|
+
TtcSuggestionDiagnostics = 15,
|
|
86
90
|
/**
|
|
87
91
|
* Time spent getting a `Symbol` from the `TemplateTypeChecker`.
|
|
88
92
|
*/
|
|
89
|
-
TtcSymbol =
|
|
93
|
+
TtcSymbol = 16,
|
|
90
94
|
/**
|
|
91
95
|
* Time spent by the Angular Language Service calculating a "get references" or a renaming
|
|
92
96
|
* operation.
|
|
93
97
|
*/
|
|
94
|
-
LsReferencesAndRenames =
|
|
98
|
+
LsReferencesAndRenames = 17,
|
|
95
99
|
/**
|
|
96
100
|
* Time spent by the Angular Language Service calculating a "quick info" operation.
|
|
97
101
|
*/
|
|
98
|
-
LsQuickInfo =
|
|
102
|
+
LsQuickInfo = 18,
|
|
99
103
|
/**
|
|
100
104
|
* Time spent by the Angular Language Service calculating a "get type definition" or "get
|
|
101
105
|
* definition" operation.
|
|
102
106
|
*/
|
|
103
|
-
LsDefinition =
|
|
107
|
+
LsDefinition = 19,
|
|
104
108
|
/**
|
|
105
109
|
* Time spent by the Angular Language Service calculating a "get completions" (AKA autocomplete)
|
|
106
110
|
* operation.
|
|
107
111
|
*/
|
|
108
|
-
LsCompletions =
|
|
112
|
+
LsCompletions = 20,
|
|
109
113
|
/**
|
|
110
114
|
* Time spent by the Angular Language Service calculating a "view template typecheck block"
|
|
111
115
|
* operation.
|
|
112
116
|
*/
|
|
113
|
-
LsTcb =
|
|
117
|
+
LsTcb = 21,
|
|
114
118
|
/**
|
|
115
119
|
* Time spent by the Angular Language Service calculating diagnostics.
|
|
116
120
|
*/
|
|
117
|
-
LsDiagnostics =
|
|
121
|
+
LsDiagnostics = 22,
|
|
122
|
+
/**
|
|
123
|
+
* Time spent by the Angular Language Service calculating suggestion diagnostics.
|
|
124
|
+
*/
|
|
125
|
+
LsSuggestionDiagnostics = 23,
|
|
118
126
|
/**
|
|
119
127
|
* Time spent by the Angular Language Service calculating a "get component locations for template"
|
|
120
128
|
* operation.
|
|
121
129
|
*/
|
|
122
|
-
LsComponentLocations =
|
|
130
|
+
LsComponentLocations = 24,
|
|
123
131
|
/**
|
|
124
132
|
* Time spent by the Angular Language Service calculating signature help.
|
|
125
133
|
*/
|
|
126
|
-
LsSignatureHelp =
|
|
134
|
+
LsSignatureHelp = 25,
|
|
127
135
|
/**
|
|
128
136
|
* Time spent by the Angular Language Service calculating outlining spans.
|
|
129
137
|
*/
|
|
130
|
-
OutliningSpans =
|
|
138
|
+
OutliningSpans = 26,
|
|
131
139
|
/**
|
|
132
140
|
* Time spent by the Angular Language Service calculating code fixes.
|
|
133
141
|
*/
|
|
134
|
-
LsCodeFixes =
|
|
142
|
+
LsCodeFixes = 27,
|
|
135
143
|
/**
|
|
136
144
|
* Time spent by the Angular Language Service to fix all detected same type errors.
|
|
137
145
|
*/
|
|
138
|
-
LsCodeFixesAll =
|
|
146
|
+
LsCodeFixesAll = 28,
|
|
139
147
|
/**
|
|
140
148
|
* Time spent computing possible Angular refactorings.
|
|
141
149
|
*/
|
|
142
|
-
LSComputeApplicableRefactorings =
|
|
150
|
+
LSComputeApplicableRefactorings = 29,
|
|
143
151
|
/**
|
|
144
152
|
* Time spent computing changes for applying a given refactoring.
|
|
145
153
|
*/
|
|
146
|
-
LSApplyRefactoring =
|
|
154
|
+
LSApplyRefactoring = 30,
|
|
147
155
|
/**
|
|
148
156
|
* Time spent by the Angular Language Service calculating semantic classifications.
|
|
149
157
|
*/
|
|
150
|
-
LSSemanticClassification =
|
|
158
|
+
LSSemanticClassification = 31,
|
|
151
159
|
/**
|
|
152
160
|
* Tracks the number of `PerfPhase`s, and must appear at the end of the list.
|
|
153
161
|
*/
|
|
154
|
-
LAST =
|
|
162
|
+
LAST = 32
|
|
155
163
|
}
|
|
156
164
|
/**
|
|
157
165
|
* Represents some occurrence during compilation, and is tracked with a counter.
|
|
@@ -35,7 +35,7 @@ export type TypeCheckId = string & {
|
|
|
35
35
|
* A `ts.Diagnostic` with additional information about the diagnostic related to template
|
|
36
36
|
* type-checking.
|
|
37
37
|
*/
|
|
38
|
-
export interface TemplateDiagnostic extends ts.
|
|
38
|
+
export interface TemplateDiagnostic extends ts.DiagnosticWithLocation {
|
|
39
39
|
/**
|
|
40
40
|
* The component with the template that resulted in this diagnostic.
|
|
41
41
|
*/
|
|
@@ -53,6 +53,12 @@ export interface TemplateTypeChecker {
|
|
|
53
53
|
* checking as part of the template type-checking program it creates.
|
|
54
54
|
*/
|
|
55
55
|
getDiagnosticsForFile(sf: ts.SourceFile, optimizeFor: OptimizeFor): ts.Diagnostic[];
|
|
56
|
+
/**
|
|
57
|
+
* Gets suggestion diagnostics for the given `ts.SourceFile`. These diagnostics tend to
|
|
58
|
+
* proactively suggest deprecated, as opposed to diagnostics that indicate
|
|
59
|
+
* potentially incorrect runtime behavior.
|
|
60
|
+
*/
|
|
61
|
+
getSuggestionDiagnosticsForFile(sf: ts.SourceFile, tsLs: ts.LanguageService, optimizeFor: OptimizeFor): ts.DiagnosticWithLocation[];
|
|
56
62
|
/**
|
|
57
63
|
* Given a `shim` and position within the file, returns information for mapping back to a source
|
|
58
64
|
* location.
|
|
@@ -64,6 +70,15 @@ export interface TemplateTypeChecker {
|
|
|
64
70
|
* This method always runs in `OptimizeFor.SingleFile` mode.
|
|
65
71
|
*/
|
|
66
72
|
getDiagnosticsForComponent(component: ts.ClassDeclaration): ts.Diagnostic[];
|
|
73
|
+
/**
|
|
74
|
+
* Gets suggestion diagnostics for the given component. These diagnostics tend to
|
|
75
|
+
* proactively suggest deprecated, as opposed to diagnostics that indicate
|
|
76
|
+
* potentially incorrect runtime behavior.
|
|
77
|
+
*
|
|
78
|
+
*
|
|
79
|
+
* This method always runs in `OptimizeFor.SingleFile` mode.
|
|
80
|
+
*/
|
|
81
|
+
getSuggestionDiagnosticsForComponent(component: ts.ClassDeclaration, tsLs: ts.LanguageService): ts.DiagnosticWithLocation[];
|
|
67
82
|
/**
|
|
68
83
|
* Ensures shims for the whole program are generated. This type of operation would be required by
|
|
69
84
|
* operations like "find references" and "refactor/rename" because references may appear in type
|
|
@@ -8,15 +8,21 @@
|
|
|
8
8
|
import { ParseSourceSpan } from '@angular/compiler';
|
|
9
9
|
import ts from 'typescript';
|
|
10
10
|
import { TemplateDiagnostic, TypeCheckId, SourceMapping } from '../../api';
|
|
11
|
+
interface DeprecatedDiagnosticInfo {
|
|
12
|
+
reportsDeprecated: {} | undefined;
|
|
13
|
+
relatedMessages: ts.DiagnosticRelatedInformation[] | undefined;
|
|
14
|
+
}
|
|
11
15
|
/**
|
|
12
16
|
* Constructs a `ts.Diagnostic` for a given `ParseSourceSpan` within a template.
|
|
17
|
+
*
|
|
18
|
+
* @param deprecatedDiagInfo Optional information about deprecation and related messages.
|
|
13
19
|
*/
|
|
14
20
|
export declare function makeTemplateDiagnostic(id: TypeCheckId, mapping: SourceMapping, span: ParseSourceSpan, category: ts.DiagnosticCategory, code: number, messageText: string | ts.DiagnosticMessageChain, relatedMessages?: {
|
|
15
21
|
text: string;
|
|
16
22
|
start: number;
|
|
17
23
|
end: number;
|
|
18
24
|
sourceFile: ts.SourceFile;
|
|
19
|
-
}[]): TemplateDiagnostic;
|
|
25
|
+
}[], deprecatedDiagInfo?: DeprecatedDiagnosticInfo): TemplateDiagnostic;
|
|
20
26
|
export declare function setParseTemplateAsSourceFileForTest(fn: typeof parseTemplateAsSourceFile): void;
|
|
21
27
|
export declare function resetParseTemplateAsSourceFileForTest(): void;
|
|
22
28
|
declare function parseTemplateAsSourceFile(fileName: string, template: string): ts.SourceFile;
|
|
@@ -91,7 +91,9 @@ export declare class TemplateTypeCheckerImpl implements TemplateTypeChecker {
|
|
|
91
91
|
* most recent type-checking program.
|
|
92
92
|
*/
|
|
93
93
|
getDiagnosticsForFile(sf: ts.SourceFile, optimizeFor: OptimizeFor): ts.Diagnostic[];
|
|
94
|
+
getSuggestionDiagnosticsForFile(sf: ts.SourceFile, tsLs: ts.LanguageService, optimizeFor: OptimizeFor): ts.DiagnosticWithLocation[];
|
|
94
95
|
getDiagnosticsForComponent(component: ts.ClassDeclaration): ts.Diagnostic[];
|
|
96
|
+
getSuggestionDiagnosticsForComponent(component: ts.ClassDeclaration, tsLs: ts.LanguageService): ts.DiagnosticWithLocation[];
|
|
95
97
|
getTypeCheckBlock(component: ts.ClassDeclaration): ts.Node | null;
|
|
96
98
|
getGlobalCompletions(context: TmplAstTemplate | null, component: ts.ClassDeclaration, node: AST | TmplAstNode): GlobalCompletion | null;
|
|
97
99
|
getExpressionCompletionLocation(ast: PropertyRead | SafePropertyRead, component: ts.ClassDeclaration): TcbLocation | null;
|
|
@@ -48,3 +48,10 @@ export declare function isAccessExpression(node: ts.Node): node is ts.ElementAcc
|
|
|
48
48
|
* Creates a TypeScript node representing a numeric value.
|
|
49
49
|
*/
|
|
50
50
|
export declare function tsNumericExpression(value: number): ts.NumericLiteral | ts.PrefixUnaryExpression;
|
|
51
|
+
/**
|
|
52
|
+
* Check if a node represents a directive declaration in a TypeCheck Block.
|
|
53
|
+
* Directive declarations can be either:
|
|
54
|
+
* - var _t1: TestDir /*T:D*\/ = null! as TestDir;
|
|
55
|
+
* - var _t1 /*T:D*\/ = _ctor1({});
|
|
56
|
+
*/
|
|
57
|
+
export declare function isDirectiveDeclaration(node: ts.Node): node is ts.TypeNode | ts.Identifier;
|