@angular/compiler-cli 11.1.0-next.5 → 11.1.2
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/linker/src/file_linker/partial_linkers/partial_directive_linker_1.js +2 -1
- package/linker/src/file_linker/partial_linkers/partial_linker_selector.d.ts +1 -1
- package/linker/src/file_linker/partial_linkers/partial_linker_selector.js +15 -16
- package/ngcc/src/host/umd_host.js +2 -2
- package/ngcc/src/packages/build_marker.d.ts +1 -1
- package/ngcc/src/packages/build_marker.js +1 -1
- package/ngcc/src/rendering/esm_rendering_formatter.d.ts +1 -1
- package/ngcc/src/rendering/esm_rendering_formatter.js +2 -2
- package/ngcc/src/rendering/source_maps.js +18 -19
- package/ngcc/src/writing/new_entry_point_file_writer.d.ts +14 -1
- package/ngcc/src/writing/new_entry_point_file_writer.js +43 -7
- package/package.json +2 -2
- package/src/ngtsc/annotations/src/component.d.ts +48 -3
- package/src/ngtsc/annotations/src/component.js +202 -118
- package/src/ngtsc/annotations/src/directive.js +13 -2
- package/src/ngtsc/core/api/src/public_options.d.ts +2 -2
- package/src/ngtsc/core/api/src/public_options.js +1 -1
- package/src/ngtsc/core/index.d.ts +1 -1
- package/src/ngtsc/core/index.js +5 -5
- package/src/ngtsc/core/src/compiler.d.ts +83 -7
- package/src/ngtsc/core/src/compiler.js +205 -51
- package/src/ngtsc/diagnostics/index.d.ts +1 -1
- package/src/ngtsc/diagnostics/index.js +4 -2
- package/src/ngtsc/diagnostics/src/error_code.d.ts +6 -1
- package/src/ngtsc/diagnostics/src/error_code.js +29 -2
- package/src/ngtsc/incremental/src/strategy.d.ts +7 -0
- package/src/ngtsc/incremental/src/strategy.js +7 -1
- package/src/ngtsc/program.js +47 -19
- package/src/ngtsc/resource/src/loader.d.ts +4 -0
- package/src/ngtsc/resource/src/loader.js +7 -1
- package/src/ngtsc/sourcemaps/index.d.ts +3 -2
- package/src/ngtsc/sourcemaps/index.js +12 -3
- package/src/ngtsc/sourcemaps/src/content_origin.d.ts +34 -0
- package/src/ngtsc/sourcemaps/src/content_origin.js +48 -0
- package/src/ngtsc/sourcemaps/src/raw_source_map.d.ts +19 -1
- package/src/ngtsc/sourcemaps/src/raw_source_map.js +1 -8
- package/src/ngtsc/sourcemaps/src/segment_marker.d.ts +1 -1
- package/src/ngtsc/sourcemaps/src/segment_marker.js +1 -1
- package/src/ngtsc/sourcemaps/src/source_file.d.ts +5 -9
- package/src/ngtsc/sourcemaps/src/source_file.js +3 -6
- package/src/ngtsc/sourcemaps/src/source_file_loader.d.ts +34 -14
- package/src/ngtsc/sourcemaps/src/source_file_loader.js +72 -19
- package/src/ngtsc/transform/src/api.d.ts +5 -0
- package/src/ngtsc/transform/src/api.js +1 -1
- package/src/ngtsc/transform/src/compilation.d.ts +1 -0
- package/src/ngtsc/transform/src/compilation.js +40 -17
- package/src/ngtsc/tsc_plugin.js +20 -3
- package/src/ngtsc/typecheck/api/checker.d.ts +6 -19
- package/src/ngtsc/typecheck/api/checker.js +1 -1
- package/src/ngtsc/typecheck/src/checker.d.ts +10 -20
- package/src/ngtsc/typecheck/src/checker.js +56 -119
- package/src/ngtsc/typecheck/src/context.d.ts +0 -9
- package/src/ngtsc/typecheck/src/context.js +1 -7
- package/src/transformers/patch_alias_reference_resolution.js +2 -2
- package/src/version.js +1 -1
|
@@ -14,6 +14,68 @@ import { PerfRecorder } from '../../perf';
|
|
|
14
14
|
import { DeclarationNode } from '../../reflection';
|
|
15
15
|
import { OptimizeFor, TemplateTypeChecker, TypeCheckingProgramStrategy } from '../../typecheck/api';
|
|
16
16
|
import { LazyRoute, NgCompilerAdapter, NgCompilerOptions } from '../api';
|
|
17
|
+
/**
|
|
18
|
+
* Discriminant type for a `CompilationTicket`.
|
|
19
|
+
*/
|
|
20
|
+
export declare enum CompilationTicketKind {
|
|
21
|
+
Fresh = 0,
|
|
22
|
+
IncrementalTypeScript = 1,
|
|
23
|
+
IncrementalResource = 2
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Begin an Angular compilation operation from scratch.
|
|
27
|
+
*/
|
|
28
|
+
export interface FreshCompilationTicket {
|
|
29
|
+
kind: CompilationTicketKind.Fresh;
|
|
30
|
+
options: NgCompilerOptions;
|
|
31
|
+
incrementalBuildStrategy: IncrementalBuildStrategy;
|
|
32
|
+
typeCheckingProgramStrategy: TypeCheckingProgramStrategy;
|
|
33
|
+
enableTemplateTypeChecker: boolean;
|
|
34
|
+
usePoisonedData: boolean;
|
|
35
|
+
tsProgram: ts.Program;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Begin an Angular compilation operation that incorporates changes to TypeScript code.
|
|
39
|
+
*/
|
|
40
|
+
export interface IncrementalTypeScriptCompilationTicket {
|
|
41
|
+
kind: CompilationTicketKind.IncrementalTypeScript;
|
|
42
|
+
options: NgCompilerOptions;
|
|
43
|
+
oldProgram: ts.Program;
|
|
44
|
+
newProgram: ts.Program;
|
|
45
|
+
incrementalBuildStrategy: IncrementalBuildStrategy;
|
|
46
|
+
typeCheckingProgramStrategy: TypeCheckingProgramStrategy;
|
|
47
|
+
newDriver: IncrementalDriver;
|
|
48
|
+
enableTemplateTypeChecker: boolean;
|
|
49
|
+
usePoisonedData: boolean;
|
|
50
|
+
}
|
|
51
|
+
export interface IncrementalResourceCompilationTicket {
|
|
52
|
+
kind: CompilationTicketKind.IncrementalResource;
|
|
53
|
+
compiler: NgCompiler;
|
|
54
|
+
modifiedResourceFiles: Set<string>;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* A request to begin Angular compilation, either starting from scratch or from a known prior state.
|
|
58
|
+
*
|
|
59
|
+
* `CompilationTicket`s are used to initialize (or update) an `NgCompiler` instance, the core of the
|
|
60
|
+
* Angular compiler. They abstract the starting state of compilation and allow `NgCompiler` to be
|
|
61
|
+
* managed independently of any incremental compilation lifecycle.
|
|
62
|
+
*/
|
|
63
|
+
export declare type CompilationTicket = FreshCompilationTicket | IncrementalTypeScriptCompilationTicket | IncrementalResourceCompilationTicket;
|
|
64
|
+
/**
|
|
65
|
+
* Create a `CompilationTicket` for a brand new compilation, using no prior state.
|
|
66
|
+
*/
|
|
67
|
+
export declare function freshCompilationTicket(tsProgram: ts.Program, options: NgCompilerOptions, incrementalBuildStrategy: IncrementalBuildStrategy, typeCheckingProgramStrategy: TypeCheckingProgramStrategy, enableTemplateTypeChecker: boolean, usePoisonedData: boolean): CompilationTicket;
|
|
68
|
+
/**
|
|
69
|
+
* Create a `CompilationTicket` as efficiently as possible, based on a previous `NgCompiler`
|
|
70
|
+
* instance and a new `ts.Program`.
|
|
71
|
+
*/
|
|
72
|
+
export declare function incrementalFromCompilerTicket(oldCompiler: NgCompiler, newProgram: ts.Program, incrementalBuildStrategy: IncrementalBuildStrategy, typeCheckingProgramStrategy: TypeCheckingProgramStrategy, modifiedResourceFiles: Set<string>): CompilationTicket;
|
|
73
|
+
/**
|
|
74
|
+
* Create a `CompilationTicket` directly from an old `ts.Program` and associated Angular compilation
|
|
75
|
+
* state, along with a new `ts.Program`.
|
|
76
|
+
*/
|
|
77
|
+
export declare function incrementalFromDriverTicket(oldProgram: ts.Program, oldDriver: IncrementalDriver, newProgram: ts.Program, options: NgCompilerOptions, incrementalBuildStrategy: IncrementalBuildStrategy, typeCheckingProgramStrategy: TypeCheckingProgramStrategy, modifiedResourceFiles: Set<string>, enableTemplateTypeChecker: boolean, usePoisonedData: boolean): CompilationTicket;
|
|
78
|
+
export declare function resourceChangeTicket(compiler: NgCompiler, modifiedResourceFiles: Set<string>): IncrementalResourceCompilationTicket;
|
|
17
79
|
/**
|
|
18
80
|
* The heart of the Angular Ivy compiler.
|
|
19
81
|
*
|
|
@@ -28,12 +90,13 @@ import { LazyRoute, NgCompilerAdapter, NgCompilerOptions } from '../api';
|
|
|
28
90
|
*/
|
|
29
91
|
export declare class NgCompiler {
|
|
30
92
|
private adapter;
|
|
31
|
-
|
|
93
|
+
readonly options: NgCompilerOptions;
|
|
32
94
|
private tsProgram;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
95
|
+
readonly typeCheckingProgramStrategy: TypeCheckingProgramStrategy;
|
|
96
|
+
readonly incrementalStrategy: IncrementalBuildStrategy;
|
|
97
|
+
readonly incrementalDriver: IncrementalDriver;
|
|
98
|
+
readonly enableTemplateTypeChecker: boolean;
|
|
99
|
+
readonly usePoisonedData: boolean;
|
|
37
100
|
private perfRecorder;
|
|
38
101
|
/**
|
|
39
102
|
* Lazily evaluated state of the compilation.
|
|
@@ -60,10 +123,19 @@ export declare class NgCompiler {
|
|
|
60
123
|
private moduleResolver;
|
|
61
124
|
private resourceManager;
|
|
62
125
|
private cycleAnalyzer;
|
|
63
|
-
readonly incrementalDriver: IncrementalDriver;
|
|
64
126
|
readonly ignoreForDiagnostics: Set<ts.SourceFile>;
|
|
65
127
|
readonly ignoreForEmit: Set<ts.SourceFile>;
|
|
66
|
-
|
|
128
|
+
/**
|
|
129
|
+
* Convert a `CompilationTicket` into an `NgCompiler` instance for the requested compilation.
|
|
130
|
+
*
|
|
131
|
+
* Depending on the nature of the compilation request, the `NgCompiler` instance may be reused
|
|
132
|
+
* from a previous compilation and updated with any changes, it may be a new instance which
|
|
133
|
+
* incrementally reuses state from a previous compilation, or it may represent a fresh compilation
|
|
134
|
+
* entirely.
|
|
135
|
+
*/
|
|
136
|
+
static fromTicket(ticket: CompilationTicket, adapter: NgCompilerAdapter, perfRecorder?: PerfRecorder): NgCompiler;
|
|
137
|
+
private constructor();
|
|
138
|
+
private updateWithChangedResources;
|
|
67
139
|
/**
|
|
68
140
|
* Get the resource dependencies of a file.
|
|
69
141
|
*
|
|
@@ -80,6 +152,10 @@ export declare class NgCompiler {
|
|
|
80
152
|
* If a `ts.SourceFile` is passed, only diagnostics related to that file are returned.
|
|
81
153
|
*/
|
|
82
154
|
getDiagnosticsForFile(file: ts.SourceFile, optimizeFor: OptimizeFor): ts.Diagnostic[];
|
|
155
|
+
/**
|
|
156
|
+
* Add Angular.io error guide links to diagnostics for this compilation.
|
|
157
|
+
*/
|
|
158
|
+
private addMessageTextDetails;
|
|
83
159
|
/**
|
|
84
160
|
* Get all setup-related diagnostics for this compilation.
|
|
85
161
|
*/
|