@angular/compiler-cli 15.2.0-rc.0 → 16.0.0-next.0
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-JYL7IHZC.js → chunk-2DMH5JXJ.js} +16 -23
- package/bundles/chunk-2DMH5JXJ.js.map +6 -0
- package/bundles/{chunk-ZB4CDKOH.js → chunk-4TCRZYAK.js} +2 -2
- package/bundles/{chunk-NJMZRTB6.js → chunk-54RHUHYB.js} +1 -2
- package/bundles/{chunk-64X67E3N.js → chunk-6CARGXRJ.js} +5 -5
- package/bundles/{chunk-O4JLZZWJ.js → chunk-EDWIBG7R.js} +1 -10
- package/bundles/chunk-EDWIBG7R.js.map +6 -0
- package/bundles/{chunk-6ZJFIQBG.js → chunk-GYHDNUIK.js} +1 -2
- package/bundles/{chunk-HYFCMILZ.js → chunk-IS6KZYEA.js} +384 -614
- package/bundles/chunk-IS6KZYEA.js.map +6 -0
- package/bundles/{chunk-Q6W3UCXI.js → chunk-JHMH3CX2.js} +92 -125
- package/bundles/chunk-JHMH3CX2.js.map +6 -0
- package/bundles/chunk-K2A5WD7L.js +872 -0
- package/bundles/chunk-K2A5WD7L.js.map +6 -0
- package/bundles/chunk-PSGRCFPQ.js +714 -0
- package/bundles/chunk-PSGRCFPQ.js.map +6 -0
- package/bundles/index.js +13 -12
- package/bundles/index.js.map +1 -1
- package/bundles/linker/babel/index.js +8 -7
- package/bundles/linker/babel/index.js.map +1 -1
- package/bundles/linker/index.js +4 -3
- package/bundles/private/bazel.js +1 -1
- package/bundles/private/localize.js +1 -1
- package/bundles/private/migrations.js +5 -4
- package/bundles/private/tooling.js +4 -2
- package/bundles/src/bin/ng_xi18n.js +7 -6
- package/bundles/src/bin/ng_xi18n.js.map +1 -1
- package/bundles/src/bin/ngc.js +7 -6
- package/bundles/src/bin/ngc.js.map +1 -1
- package/bundles_metadata.json +1 -1
- package/package.json +2 -15
- package/src/ngtsc/annotations/ng_module/src/handler.d.ts +1 -3
- package/src/ngtsc/core/api/src/adapter.d.ts +0 -7
- package/src/ngtsc/core/api/src/options.d.ts +2 -2
- package/src/ngtsc/core/api/src/public_options.d.ts +0 -25
- package/src/ngtsc/core/src/host.d.ts +3 -5
- package/src/ngtsc/imports/index.d.ts +1 -0
- package/src/ngtsc/imports/src/default.d.ts +6 -10
- package/src/ngtsc/imports/src/patch_alias_reference_resolution.d.ts +61 -0
- package/src/ngtsc/shims/api.d.ts +0 -19
- package/src/ngtsc/shims/index.d.ts +0 -2
- package/src/transformers/api.d.ts +0 -5
- package/bundles/chunk-7DUI3BSX.js +0 -29
- package/bundles/chunk-7DUI3BSX.js.map +0 -6
- package/bundles/chunk-BEXFRTBC.js +0 -2187
- package/bundles/chunk-BEXFRTBC.js.map +0 -6
- package/bundles/chunk-HYFCMILZ.js.map +0 -6
- package/bundles/chunk-JYL7IHZC.js.map +0 -6
- package/bundles/chunk-O4JLZZWJ.js.map +0 -6
- package/bundles/chunk-OAZD7RII.js +0 -5263
- package/bundles/chunk-OAZD7RII.js.map +0 -6
- package/bundles/chunk-Q6W3UCXI.js.map +0 -6
- package/bundles/chunk-YRDMG3GM.js +0 -115
- package/bundles/chunk-YRDMG3GM.js.map +0 -6
- package/bundles/chunk-Z534TW2O.js +0 -1540
- package/bundles/chunk-Z534TW2O.js.map +0 -6
- package/bundles/ngcc/index.js +0 -51
- package/bundles/ngcc/index.js.map +0 -6
- package/bundles/ngcc/main-ngcc.js +0 -48
- package/bundles/ngcc/main-ngcc.js.map +0 -6
- package/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js +0 -113
- package/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js.map +0 -6
- package/bundles/ngcc/src/locking/lock_file_with_child_process/ngcc_lock_unlocker.js +0 -34
- package/bundles/ngcc/src/locking/lock_file_with_child_process/ngcc_lock_unlocker.js.map +0 -6
- package/ngcc/index.d.ts +0 -19
- package/ngcc/main-ngcc.d.ts +0 -2
- package/ngcc/src/analysis/decoration_analyzer.d.ts +0 -80
- package/ngcc/src/analysis/migration_host.d.ts +0 -22
- package/ngcc/src/analysis/module_with_providers_analyzer.d.ts +0 -61
- package/ngcc/src/analysis/ngcc_references_registry.d.ts +0 -34
- package/ngcc/src/analysis/ngcc_trait_compiler.d.ts +0 -42
- package/ngcc/src/analysis/private_declarations_analyzer.d.ts +0 -29
- package/ngcc/src/analysis/types.d.ts +0 -29
- package/ngcc/src/analysis/util.d.ts +0 -11
- package/ngcc/src/command_line_options.d.ts +0 -3
- package/ngcc/src/constants.d.ts +0 -9
- package/ngcc/src/dependencies/commonjs_dependency_host.d.ts +0 -20
- package/ngcc/src/dependencies/dependency_host.d.ts +0 -77
- package/ngcc/src/dependencies/dependency_resolver.d.ts +0 -102
- package/ngcc/src/dependencies/dts_dependency_host.d.ts +0 -20
- package/ngcc/src/dependencies/esm_dependency_host.d.ts +0 -93
- package/ngcc/src/dependencies/module_resolver.d.ts +0 -134
- package/ngcc/src/dependencies/umd_dependency_host.d.ts +0 -9
- package/ngcc/src/entry_point_finder/directory_walker_entry_point_finder.d.ts +0 -41
- package/ngcc/src/entry_point_finder/entry_point_collector.d.ts +0 -41
- package/ngcc/src/entry_point_finder/interface.d.ts +0 -14
- package/ngcc/src/entry_point_finder/program_based_entry_point_finder.d.ts +0 -61
- package/ngcc/src/entry_point_finder/targeted_entry_point_finder.d.ts +0 -95
- package/ngcc/src/entry_point_finder/tracing_entry_point_finder.d.ts +0 -67
- package/ngcc/src/entry_point_finder/utils.d.ts +0 -38
- package/ngcc/src/execution/analyze_entry_points.d.ts +0 -9
- package/ngcc/src/execution/api.d.ts +0 -27
- package/ngcc/src/execution/cluster/api.d.ts +0 -51
- package/ngcc/src/execution/cluster/executor.d.ts +0 -29
- package/ngcc/src/execution/cluster/master.d.ts +0 -57
- package/ngcc/src/execution/cluster/ngcc_cluster_worker.d.ts +0 -8
- package/ngcc/src/execution/cluster/package_json_updater.d.ts +0 -22
- package/ngcc/src/execution/cluster/utils.d.ts +0 -44
- package/ngcc/src/execution/cluster/worker.d.ts +0 -10
- package/ngcc/src/execution/create_compile_function.d.ts +0 -10
- package/ngcc/src/execution/single_process_executor.d.ts +0 -34
- package/ngcc/src/execution/tasks/api.d.ts +0 -141
- package/ngcc/src/execution/tasks/completion.d.ts +0 -41
- package/ngcc/src/execution/tasks/queues/base_task_queue.d.ts +0 -38
- package/ngcc/src/execution/tasks/queues/parallel_task_queue.d.ts +0 -27
- package/ngcc/src/execution/tasks/queues/serial_task_queue.d.ts +0 -16
- package/ngcc/src/execution/tasks/utils.d.ts +0 -57
- package/ngcc/src/host/commonjs_host.d.ts +0 -69
- package/ngcc/src/host/commonjs_umd_utils.d.ts +0 -146
- package/ngcc/src/host/delegating_host.d.ts +0 -43
- package/ngcc/src/host/esm2015_host.d.ts +0 -935
- package/ngcc/src/host/esm5_host.d.ts +0 -299
- package/ngcc/src/host/ngcc_host.d.ts +0 -87
- package/ngcc/src/host/umd_host.d.ts +0 -85
- package/ngcc/src/host/utils.d.ts +0 -9
- package/ngcc/src/locking/async_locker.d.ts +0 -34
- package/ngcc/src/locking/lock_file.d.ts +0 -31
- package/ngcc/src/locking/lock_file_with_child_process/index.d.ts +0 -44
- package/ngcc/src/locking/lock_file_with_child_process/ngcc_lock_unlocker.d.ts +0 -1
- package/ngcc/src/locking/lock_file_with_child_process/util.d.ts +0 -16
- package/ngcc/src/locking/sync_locker.d.ts +0 -35
- package/ngcc/src/main.d.ts +0 -17
- package/ngcc/src/migrations/migration.d.ts +0 -59
- package/ngcc/src/migrations/missing_injectable_migration.d.ts +0 -35
- package/ngcc/src/migrations/undecorated_child_migration.d.ts +0 -15
- package/ngcc/src/migrations/undecorated_parent_migration.d.ts +0 -51
- package/ngcc/src/migrations/utils.d.ts +0 -41
- package/ngcc/src/ngcc_options.d.ts +0 -155
- package/ngcc/src/packages/adjust_cjs_umd_exports.d.ts +0 -16
- package/ngcc/src/packages/build_marker.d.ts +0 -44
- package/ngcc/src/packages/bundle_program.d.ts +0 -35
- package/ngcc/src/packages/configuration.d.ts +0 -222
- package/ngcc/src/packages/entry_point.d.ts +0 -109
- package/ngcc/src/packages/entry_point_bundle.d.ts +0 -46
- package/ngcc/src/packages/entry_point_manifest.d.ts +0 -79
- package/ngcc/src/packages/ngcc_compiler_host.d.ts +0 -36
- package/ngcc/src/packages/patch_ts_expando_initializer.d.ts +0 -41
- package/ngcc/src/packages/source_file_cache.d.ts +0 -97
- package/ngcc/src/packages/transformer.d.ts +0 -70
- package/ngcc/src/path_mappings.d.ts +0 -19
- package/ngcc/src/rendering/commonjs_rendering_formatter.d.ts +0 -34
- package/ngcc/src/rendering/dts_renderer.d.ts +0 -51
- package/ngcc/src/rendering/esm5_rendering_formatter.d.ts +0 -35
- package/ngcc/src/rendering/esm_rendering_formatter.d.ts +0 -84
- package/ngcc/src/rendering/ngcc_import_rewriter.d.ts +0 -13
- package/ngcc/src/rendering/renderer.d.ts +0 -72
- package/ngcc/src/rendering/rendering_formatter.d.ts +0 -37
- package/ngcc/src/rendering/source_maps.d.ts +0 -23
- package/ngcc/src/rendering/umd_rendering_formatter.d.ts +0 -54
- package/ngcc/src/rendering/utils.d.ts +0 -24
- package/ngcc/src/utils.d.ts +0 -112
- package/ngcc/src/writing/cleaning/cleaning_strategies.d.ts +0 -44
- package/ngcc/src/writing/cleaning/package_cleaner.d.ts +0 -38
- package/ngcc/src/writing/cleaning/utils.d.ts +0 -15
- package/ngcc/src/writing/file_writer.d.ts +0 -28
- package/ngcc/src/writing/in_place_file_writer.d.ts +0 -28
- package/ngcc/src/writing/new_entry_point_file_writer.d.ts +0 -48
- package/ngcc/src/writing/package_json_updater.d.ts +0 -98
- package/src/ngtsc/shims/src/factory_generator.d.ts +0 -24
- package/src/ngtsc/shims/src/summary_generator.d.ts +0 -15
- package/src/transformers/downlevel_decorators_transform/patch_alias_reference_resolution.d.ts +0 -14
- /package/bundles/{chunk-ZB4CDKOH.js.map → chunk-4TCRZYAK.js.map} +0 -0
- /package/bundles/{chunk-NJMZRTB6.js.map → chunk-54RHUHYB.js.map} +0 -0
- /package/bundles/{chunk-64X67E3N.js.map → chunk-6CARGXRJ.js.map} +0 -0
- /package/bundles/{chunk-6ZJFIQBG.js.map → chunk-GYHDNUIK.js.map} +0 -0
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright Google LLC All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.io/license
|
|
7
|
-
*/
|
|
8
|
-
import { EntryPoint, EntryPointJsonProperty } from '../../packages/entry_point';
|
|
9
|
-
import { JsonObject, PartiallyOrderedList } from '../../utils';
|
|
10
|
-
/**
|
|
11
|
-
* Represents a unit of work to be undertaken by an `Executor`.
|
|
12
|
-
*
|
|
13
|
-
* A task consists of processing a specific format property of an entry-point.
|
|
14
|
-
* This may or may not also include processing the typings for that entry-point, which only needs to
|
|
15
|
-
* happen once across all the formats.
|
|
16
|
-
*/
|
|
17
|
-
export interface Task extends JsonObject {
|
|
18
|
-
/** The `EntryPoint` which needs to be processed as part of the task. */
|
|
19
|
-
entryPoint: EntryPoint;
|
|
20
|
-
/**
|
|
21
|
-
* The `package.json` format property to process (i.e. the property which points to the file that
|
|
22
|
-
* is the program entry-point).
|
|
23
|
-
*/
|
|
24
|
-
formatProperty: EntryPointJsonProperty;
|
|
25
|
-
/**
|
|
26
|
-
* The list of all format properties (including `task.formatProperty`) that should be marked as
|
|
27
|
-
* processed once the task has been completed, because they point to the format-path that will be
|
|
28
|
-
* processed as part of the task.
|
|
29
|
-
*/
|
|
30
|
-
formatPropertiesToMarkAsProcessed: EntryPointJsonProperty[];
|
|
31
|
-
/**
|
|
32
|
-
* Whether to process typings for this entry-point as part of the task.
|
|
33
|
-
*/
|
|
34
|
-
processDts: DtsProcessing;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* The options for processing Typescript typings (.d.ts) files.
|
|
38
|
-
*/
|
|
39
|
-
export declare enum DtsProcessing {
|
|
40
|
-
/**
|
|
41
|
-
* Yes, process the typings for this entry point as part of the task.
|
|
42
|
-
*/
|
|
43
|
-
Yes = 0,
|
|
44
|
-
/**
|
|
45
|
-
* No, do not process the typings as part of this task - they must have already been processed by
|
|
46
|
-
* another task or previous ngcc process.
|
|
47
|
-
*/
|
|
48
|
-
No = 1,
|
|
49
|
-
/**
|
|
50
|
-
* Only process the typings for this entry-point; do not render any JavaScript files for the
|
|
51
|
-
* `formatProperty` of this task.
|
|
52
|
-
*/
|
|
53
|
-
Only = 2
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Represents a partially ordered list of tasks.
|
|
57
|
-
*
|
|
58
|
-
* The ordering/precedence of tasks is determined by the inter-dependencies between their associated
|
|
59
|
-
* entry-points. Specifically, the tasks' order/precedence is such that tasks associated to
|
|
60
|
-
* dependent entry-points always come after tasks associated with their dependencies.
|
|
61
|
-
*
|
|
62
|
-
* As result of this ordering, it is guaranteed that - by processing tasks in the order in which
|
|
63
|
-
* they appear in the list - a task's dependencies will always have been processed before processing
|
|
64
|
-
* the task itself.
|
|
65
|
-
*
|
|
66
|
-
* See `DependencyResolver#sortEntryPointsByDependency()`.
|
|
67
|
-
*/
|
|
68
|
-
export type PartiallyOrderedTasks = PartiallyOrderedList<Task>;
|
|
69
|
-
/**
|
|
70
|
-
* A mapping from Tasks to the Tasks that depend upon them (dependents).
|
|
71
|
-
*/
|
|
72
|
-
export type TaskDependencies = Map<Task, Set<Task>>;
|
|
73
|
-
export declare const TaskDependencies: MapConstructor;
|
|
74
|
-
/**
|
|
75
|
-
* A function to create a TaskCompletedCallback function.
|
|
76
|
-
*/
|
|
77
|
-
export type CreateTaskCompletedCallback = (taskQueue: TaskQueue) => TaskCompletedCallback;
|
|
78
|
-
/**
|
|
79
|
-
* A function to be called once a task has been processed.
|
|
80
|
-
*/
|
|
81
|
-
export type TaskCompletedCallback = (task: Task, outcome: TaskProcessingOutcome, message: string | null) => void;
|
|
82
|
-
/**
|
|
83
|
-
* Represents the outcome of processing a `Task`.
|
|
84
|
-
*/
|
|
85
|
-
export declare const enum TaskProcessingOutcome {
|
|
86
|
-
/** Successfully processed the target format property. */
|
|
87
|
-
Processed = 0,
|
|
88
|
-
/** Failed to process the target format. */
|
|
89
|
-
Failed = 1
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* A wrapper around a list of tasks and providing utility methods for getting the next task of
|
|
93
|
-
* interest and determining when all tasks have been completed.
|
|
94
|
-
*
|
|
95
|
-
* (This allows different implementations to impose different constraints on when a task's
|
|
96
|
-
* processing can start.)
|
|
97
|
-
*/
|
|
98
|
-
export interface TaskQueue {
|
|
99
|
-
/** Whether all tasks have been completed. */
|
|
100
|
-
allTasksCompleted: boolean;
|
|
101
|
-
/**
|
|
102
|
-
* Get the next task whose processing can start (if any).
|
|
103
|
-
*
|
|
104
|
-
* This implicitly marks the task as in-progress.
|
|
105
|
-
* (This information is used to determine whether all tasks have been completed.)
|
|
106
|
-
*
|
|
107
|
-
* @return The next task available for processing or `null`, if no task can be processed at the
|
|
108
|
-
* moment (including if there are no more unprocessed tasks).
|
|
109
|
-
*/
|
|
110
|
-
getNextTask(): Task | null;
|
|
111
|
-
/**
|
|
112
|
-
* Mark a task as completed.
|
|
113
|
-
*
|
|
114
|
-
* This removes the task from the internal list of in-progress tasks.
|
|
115
|
-
* (This information is used to determine whether all tasks have been completed.)
|
|
116
|
-
*
|
|
117
|
-
* @param task The task to mark as completed.
|
|
118
|
-
*/
|
|
119
|
-
markAsCompleted(task: Task): void;
|
|
120
|
-
/**
|
|
121
|
-
* Mark a task as failed.
|
|
122
|
-
*
|
|
123
|
-
* Do not process the tasks that depend upon the given task.
|
|
124
|
-
*/
|
|
125
|
-
markAsFailed(task: Task): void;
|
|
126
|
-
/**
|
|
127
|
-
* Mark a task as not processed (i.e. add an in-progress task back to the queue).
|
|
128
|
-
*
|
|
129
|
-
* This removes the task from the internal list of in-progress tasks and adds it back to the list
|
|
130
|
-
* of pending tasks.
|
|
131
|
-
*
|
|
132
|
-
* @param task The task to mark as not processed.
|
|
133
|
-
*/
|
|
134
|
-
markAsUnprocessed(task: Task): void;
|
|
135
|
-
/**
|
|
136
|
-
* Return a string representation of the task queue (for debugging purposes).
|
|
137
|
-
*
|
|
138
|
-
* @return A string representation of the task queue.
|
|
139
|
-
*/
|
|
140
|
-
toString(): string;
|
|
141
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright Google LLC All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.io/license
|
|
7
|
-
*/
|
|
8
|
-
import { PathManipulation, ReadonlyFileSystem } from '../../../../src/ngtsc/file_system';
|
|
9
|
-
import { Logger } from '../../../../src/ngtsc/logging';
|
|
10
|
-
import { PackageJsonUpdater } from '../../writing/package_json_updater';
|
|
11
|
-
import { Task, TaskCompletedCallback, TaskProcessingOutcome, TaskQueue } from './api';
|
|
12
|
-
/**
|
|
13
|
-
* A function that can handle a specific outcome of a task completion.
|
|
14
|
-
*
|
|
15
|
-
* These functions can be composed using the `composeTaskCompletedCallbacks()`
|
|
16
|
-
* to create a `TaskCompletedCallback` function that can be passed to an `Executor`.
|
|
17
|
-
*/
|
|
18
|
-
export type TaskCompletedHandler = (task: Task, message: string | null) => void;
|
|
19
|
-
/**
|
|
20
|
-
* Compose a group of TaskCompletedHandlers into a single TaskCompletedCallback.
|
|
21
|
-
*
|
|
22
|
-
* The compose callback will receive an outcome and will delegate to the appropriate handler based
|
|
23
|
-
* on this outcome.
|
|
24
|
-
*
|
|
25
|
-
* @param callbacks a map of outcomes to handlers.
|
|
26
|
-
*/
|
|
27
|
-
export declare function composeTaskCompletedCallbacks(callbacks: Record<TaskProcessingOutcome, TaskCompletedHandler>): TaskCompletedCallback;
|
|
28
|
-
/**
|
|
29
|
-
* Create a handler that will mark the entry-points in a package as being processed.
|
|
30
|
-
*
|
|
31
|
-
* @param pkgJsonUpdater The service used to update the package.json
|
|
32
|
-
*/
|
|
33
|
-
export declare function createMarkAsProcessedHandler(fs: PathManipulation, pkgJsonUpdater: PackageJsonUpdater): TaskCompletedHandler;
|
|
34
|
-
/**
|
|
35
|
-
* Create a handler that will throw an error.
|
|
36
|
-
*/
|
|
37
|
-
export declare function createThrowErrorHandler(fs: ReadonlyFileSystem): TaskCompletedHandler;
|
|
38
|
-
/**
|
|
39
|
-
* Create a handler that logs an error and marks the task as failed.
|
|
40
|
-
*/
|
|
41
|
-
export declare function createLogErrorHandler(logger: Logger, fs: ReadonlyFileSystem, taskQueue: TaskQueue): TaskCompletedHandler;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright Google LLC All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.io/license
|
|
7
|
-
*/
|
|
8
|
-
import { Logger } from '../../../../../src/ngtsc/logging';
|
|
9
|
-
import { PartiallyOrderedTasks, Task, TaskDependencies, TaskQueue } from '../api';
|
|
10
|
-
/**
|
|
11
|
-
* A base `TaskQueue` implementation to be used as base for concrete implementations.
|
|
12
|
-
*/
|
|
13
|
-
export declare abstract class BaseTaskQueue implements TaskQueue {
|
|
14
|
-
protected logger: Logger;
|
|
15
|
-
protected tasks: PartiallyOrderedTasks;
|
|
16
|
-
protected dependencies: TaskDependencies;
|
|
17
|
-
get allTasksCompleted(): boolean;
|
|
18
|
-
protected inProgressTasks: Set<Task>;
|
|
19
|
-
/**
|
|
20
|
-
* A map of tasks that should be skipped, mapped to the task that caused them to be skipped.
|
|
21
|
-
*/
|
|
22
|
-
private tasksToSkip;
|
|
23
|
-
constructor(logger: Logger, tasks: PartiallyOrderedTasks, dependencies: TaskDependencies);
|
|
24
|
-
protected abstract computeNextTask(): Task | null;
|
|
25
|
-
getNextTask(): Task | null;
|
|
26
|
-
markAsCompleted(task: Task): void;
|
|
27
|
-
markAsFailed(task: Task): void;
|
|
28
|
-
markAsUnprocessed(task: Task): void;
|
|
29
|
-
toString(): string;
|
|
30
|
-
/**
|
|
31
|
-
* Mark the given `task` as to be skipped, then recursive skip all its dependents.
|
|
32
|
-
*
|
|
33
|
-
* @param task The task to skip
|
|
34
|
-
* @param failedTask The task that failed, causing this task to be skipped
|
|
35
|
-
*/
|
|
36
|
-
protected skipDependentTasks(task: Task, failedTask: Task): void;
|
|
37
|
-
protected stringifyTasks(tasks: Task[], indentation: string): string;
|
|
38
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright Google LLC All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.io/license
|
|
7
|
-
*/
|
|
8
|
-
import { Logger } from '../../../../../src/ngtsc/logging';
|
|
9
|
-
import { PartiallyOrderedTasks, Task, TaskDependencies } from '../api';
|
|
10
|
-
import { BaseTaskQueue } from './base_task_queue';
|
|
11
|
-
/**
|
|
12
|
-
* A `TaskQueue` implementation that assumes tasks are processed in parallel, thus has to ensure a
|
|
13
|
-
* task's dependencies have been processed before processing the task.
|
|
14
|
-
*/
|
|
15
|
-
export declare class ParallelTaskQueue extends BaseTaskQueue {
|
|
16
|
-
/**
|
|
17
|
-
* A map from Tasks to the Tasks that it depends upon.
|
|
18
|
-
*
|
|
19
|
-
* This is the reverse mapping of `TaskDependencies`.
|
|
20
|
-
*/
|
|
21
|
-
private blockedTasks;
|
|
22
|
-
constructor(logger: Logger, tasks: PartiallyOrderedTasks, dependencies: TaskDependencies);
|
|
23
|
-
computeNextTask(): Task | null;
|
|
24
|
-
markAsCompleted(task: Task): void;
|
|
25
|
-
toString(): string;
|
|
26
|
-
private stringifyBlockedTasks;
|
|
27
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright Google LLC All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.io/license
|
|
7
|
-
*/
|
|
8
|
-
import { Task } from '../api';
|
|
9
|
-
import { BaseTaskQueue } from './base_task_queue';
|
|
10
|
-
/**
|
|
11
|
-
* A `TaskQueue` implementation that assumes tasks are processed serially and each one is completed
|
|
12
|
-
* before requesting the next one.
|
|
13
|
-
*/
|
|
14
|
-
export declare class SerialTaskQueue extends BaseTaskQueue {
|
|
15
|
-
computeNextTask(): Task | null;
|
|
16
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright Google LLC All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.io/license
|
|
7
|
-
*/
|
|
8
|
-
import { DepGraph } from 'dependency-graph';
|
|
9
|
-
import { EntryPoint } from '../../packages/entry_point';
|
|
10
|
-
import { PartiallyOrderedTasks, Task, TaskDependencies } from './api';
|
|
11
|
-
/** Stringify a task for debugging purposes. */
|
|
12
|
-
export declare const stringifyTask: (task: Task) => string;
|
|
13
|
-
/**
|
|
14
|
-
* Compute a mapping of tasks to the tasks that are dependent on them (if any).
|
|
15
|
-
*
|
|
16
|
-
* Task A can depend upon task B, if either:
|
|
17
|
-
*
|
|
18
|
-
* * A and B have the same entry-point _and_ B is generating the typings for that entry-point
|
|
19
|
-
* (i.e. has `processDts: true`).
|
|
20
|
-
* * A's entry-point depends on B's entry-point _and_ B is also generating typings.
|
|
21
|
-
*
|
|
22
|
-
* NOTE: If a task is not generating typings, then it cannot affect anything which depends on its
|
|
23
|
-
* entry-point, regardless of the dependency graph. To put this another way, only the task
|
|
24
|
-
* which produces the typings for a dependency needs to have been completed.
|
|
25
|
-
*
|
|
26
|
-
* As a performance optimization, we take into account the fact that `tasks` are sorted in such a
|
|
27
|
-
* way that a task can only depend on earlier tasks (i.e. dependencies always come before
|
|
28
|
-
* dependents in the list of tasks).
|
|
29
|
-
*
|
|
30
|
-
* @param tasks A (partially ordered) list of tasks.
|
|
31
|
-
* @param graph The dependency graph between entry-points.
|
|
32
|
-
* @return A map from each task to those tasks directly dependent upon it.
|
|
33
|
-
*/
|
|
34
|
-
export declare function computeTaskDependencies(tasks: PartiallyOrderedTasks, graph: DepGraph<EntryPoint>): TaskDependencies;
|
|
35
|
-
export declare function getDependentsSet(map: TaskDependencies, task: Task): Set<Task>;
|
|
36
|
-
/**
|
|
37
|
-
* Invert the given mapping of Task dependencies.
|
|
38
|
-
*
|
|
39
|
-
* @param dependencies The mapping of tasks to the tasks that depend upon them.
|
|
40
|
-
* @returns A mapping of tasks to the tasks that they depend upon.
|
|
41
|
-
*/
|
|
42
|
-
export declare function getBlockedTasks(dependencies: TaskDependencies): Map<Task, Set<Task>>;
|
|
43
|
-
/**
|
|
44
|
-
* Sort a list of tasks by priority.
|
|
45
|
-
*
|
|
46
|
-
* Priority is determined by the number of other tasks that a task is (transitively) blocking:
|
|
47
|
-
* The more tasks a task is blocking the higher its priority is, because processing it will
|
|
48
|
-
* potentially unblock more tasks.
|
|
49
|
-
*
|
|
50
|
-
* To keep the behavior predictable, if two tasks block the same number of other tasks, their
|
|
51
|
-
* relative order in the original `tasks` lists is preserved.
|
|
52
|
-
*
|
|
53
|
-
* @param tasks A (partially ordered) list of tasks.
|
|
54
|
-
* @param dependencies The mapping of tasks to the tasks that depend upon them.
|
|
55
|
-
* @return The list of tasks sorted by priority.
|
|
56
|
-
*/
|
|
57
|
-
export declare function sortTasksByPriority(tasks: PartiallyOrderedTasks, dependencies: TaskDependencies): PartiallyOrderedTasks;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright Google LLC All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.io/license
|
|
7
|
-
*/
|
|
8
|
-
import ts from 'typescript';
|
|
9
|
-
import { Logger } from '../../../src/ngtsc/logging';
|
|
10
|
-
import { Declaration, Import } from '../../../src/ngtsc/reflection';
|
|
11
|
-
import { BundleProgram } from '../packages/bundle_program';
|
|
12
|
-
import { FactoryMap } from '../utils';
|
|
13
|
-
import { Esm5ReflectionHost } from './esm5_host';
|
|
14
|
-
import { NgccClassSymbol } from './ngcc_host';
|
|
15
|
-
export declare class CommonJsReflectionHost extends Esm5ReflectionHost {
|
|
16
|
-
protected commonJsExports: FactoryMap<ts.SourceFile, Map<string, Declaration<ts.Declaration>> | null>;
|
|
17
|
-
protected topLevelHelperCalls: FactoryMap<string, FactoryMap<ts.SourceFile, ts.CallExpression[]>>;
|
|
18
|
-
protected program: ts.Program;
|
|
19
|
-
protected compilerHost: ts.CompilerHost;
|
|
20
|
-
constructor(logger: Logger, isCore: boolean, src: BundleProgram, dts?: BundleProgram | null);
|
|
21
|
-
getImportOfIdentifier(id: ts.Identifier): Import | null;
|
|
22
|
-
getDeclarationOfIdentifier(id: ts.Identifier): Declaration | null;
|
|
23
|
-
getExportsOfModule(module: ts.Node): Map<string, Declaration> | null;
|
|
24
|
-
/**
|
|
25
|
-
* Search statements related to the given class for calls to the specified helper.
|
|
26
|
-
*
|
|
27
|
-
* In CommonJS these helper calls can be outside the class's IIFE at the top level of the
|
|
28
|
-
* source file. Searching the top level statements for helpers can be expensive, so we
|
|
29
|
-
* try to get helpers from the IIFE first and only fall back on searching the top level if
|
|
30
|
-
* no helpers are found.
|
|
31
|
-
*
|
|
32
|
-
* @param classSymbol the class whose helper calls we are interested in.
|
|
33
|
-
* @param helperNames the names of the helpers (e.g. `__decorate`) whose calls we are interested
|
|
34
|
-
* in.
|
|
35
|
-
* @returns an array of nodes of calls to the helper with the given name.
|
|
36
|
-
*/
|
|
37
|
-
protected getHelperCallsForClass(classSymbol: NgccClassSymbol, helperNames: string[]): ts.CallExpression[];
|
|
38
|
-
/**
|
|
39
|
-
* Find all the helper calls at the top level of a source file.
|
|
40
|
-
*
|
|
41
|
-
* We cache the helper calls per source file so that we don't have to keep parsing the code for
|
|
42
|
-
* each class in a file.
|
|
43
|
-
*
|
|
44
|
-
* @param sourceFile the source who may contain helper calls.
|
|
45
|
-
* @param helperNames the names of the helpers (e.g. `__decorate`) whose calls we are interested
|
|
46
|
-
* in.
|
|
47
|
-
* @returns an array of nodes of calls to the helper with the given name.
|
|
48
|
-
*/
|
|
49
|
-
private getTopLevelHelperCalls;
|
|
50
|
-
private computeExportsOfCommonJsModule;
|
|
51
|
-
private extractBasicCommonJsExportDeclaration;
|
|
52
|
-
private extractCommonJsWildcardReexports;
|
|
53
|
-
private extractCommonJsDefinePropertyExportDeclaration;
|
|
54
|
-
private findCommonJsImport;
|
|
55
|
-
/**
|
|
56
|
-
* Handle the case where the identifier represents a reference to a whole CommonJS
|
|
57
|
-
* module, i.e. the result of a call to `require(...)`.
|
|
58
|
-
*
|
|
59
|
-
* @param id the identifier whose declaration we are looking for.
|
|
60
|
-
* @returns a declaration if `id` refers to a CommonJS module, or `null` otherwise.
|
|
61
|
-
*/
|
|
62
|
-
private getCommonJsModuleDeclaration;
|
|
63
|
-
/**
|
|
64
|
-
* If this is an IFE then try to grab the outer and inner classes otherwise fallback on the super
|
|
65
|
-
* class.
|
|
66
|
-
*/
|
|
67
|
-
protected getDeclarationOfExpression(expression: ts.Expression): Declaration | null;
|
|
68
|
-
private resolveModuleName;
|
|
69
|
-
}
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright Google LLC All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.io/license
|
|
7
|
-
*/
|
|
8
|
-
import ts from 'typescript';
|
|
9
|
-
import { Declaration } from '../../../src/ngtsc/reflection';
|
|
10
|
-
export interface ExportDeclaration {
|
|
11
|
-
name: string;
|
|
12
|
-
declaration: Declaration;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* A CommonJS or UMD wildcard re-export statement.
|
|
16
|
-
*
|
|
17
|
-
* The CommonJS or UMD version of `export * from 'blah';`.
|
|
18
|
-
*
|
|
19
|
-
* These statements can have several forms (depending, for example, on whether
|
|
20
|
-
* the TypeScript helpers are imported or emitted inline). The expression can have one of the
|
|
21
|
-
* following forms:
|
|
22
|
-
* - `__export(firstArg)`
|
|
23
|
-
* - `__exportStar(firstArg)`
|
|
24
|
-
* - `tslib.__export(firstArg, exports)`
|
|
25
|
-
* - `tslib.__exportStar(firstArg, exports)`
|
|
26
|
-
*
|
|
27
|
-
* In all cases, we only care about `firstArg`, which is the first argument of the re-export call
|
|
28
|
-
* expression and can be either a `require('...')` call or an identifier (initialized via a
|
|
29
|
-
* `require('...')` call).
|
|
30
|
-
*/
|
|
31
|
-
export interface WildcardReexportStatement extends ts.ExpressionStatement {
|
|
32
|
-
expression: ts.CallExpression;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* A CommonJS or UMD re-export statement using an `Object.defineProperty()` call.
|
|
36
|
-
* For example:
|
|
37
|
-
*
|
|
38
|
-
* ```
|
|
39
|
-
* Object.defineProperty(exports, "<exported-id>",
|
|
40
|
-
* { enumerable: true, get: function () { return <imported-id>; } });
|
|
41
|
-
* ```
|
|
42
|
-
*/
|
|
43
|
-
export interface DefinePropertyReexportStatement extends ts.ExpressionStatement {
|
|
44
|
-
expression: ts.CallExpression & {
|
|
45
|
-
arguments: [ts.Identifier, ts.StringLiteral, ts.ObjectLiteralExpression];
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* A call expression that has a string literal for its first argument.
|
|
50
|
-
*/
|
|
51
|
-
export interface RequireCall extends ts.CallExpression {
|
|
52
|
-
arguments: ts.CallExpression['arguments'] & [ts.StringLiteral];
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Return the "namespace" of the specified `ts.Identifier` if the identifier is the RHS of a
|
|
56
|
-
* property access expression, i.e. an expression of the form `<namespace>.<id>` (in which case a
|
|
57
|
-
* `ts.Identifier` corresponding to `<namespace>` will be returned). Otherwise return `null`.
|
|
58
|
-
*/
|
|
59
|
-
export declare function findNamespaceOfIdentifier(id: ts.Identifier): ts.Identifier | null;
|
|
60
|
-
/**
|
|
61
|
-
* Return the `RequireCall` that is used to initialize the specified `ts.Identifier`, if the
|
|
62
|
-
* specified identifier was indeed initialized with a require call in a declaration of the form:
|
|
63
|
-
* `var <id> = require('...')`
|
|
64
|
-
*/
|
|
65
|
-
export declare function findRequireCallReference(id: ts.Identifier, checker: ts.TypeChecker): RequireCall | null;
|
|
66
|
-
/**
|
|
67
|
-
* Check whether the specified `ts.Statement` is a wildcard re-export statement.
|
|
68
|
-
* I.E. an expression statement of one of the following forms:
|
|
69
|
-
* - `__export(<foo>)`
|
|
70
|
-
* - `__exportStar(<foo>)`
|
|
71
|
-
* - `tslib.__export(<foo>, exports)`
|
|
72
|
-
* - `tslib.__exportStar(<foo>, exports)`
|
|
73
|
-
*/
|
|
74
|
-
export declare function isWildcardReexportStatement(stmt: ts.Statement): stmt is WildcardReexportStatement;
|
|
75
|
-
/**
|
|
76
|
-
* Check whether the statement is a re-export of the form:
|
|
77
|
-
*
|
|
78
|
-
* ```
|
|
79
|
-
* Object.defineProperty(exports, "<export-name>",
|
|
80
|
-
* { enumerable: true, get: function () { return <import-name>; } });
|
|
81
|
-
* ```
|
|
82
|
-
*/
|
|
83
|
-
export declare function isDefinePropertyReexportStatement(stmt: ts.Statement): stmt is DefinePropertyReexportStatement;
|
|
84
|
-
/**
|
|
85
|
-
* Extract the "value" of the getter in a `defineProperty` statement.
|
|
86
|
-
*
|
|
87
|
-
* This will return the `ts.Expression` value of a single `return` statement in the `get` method
|
|
88
|
-
* of the property definition object, or `null` if that is not possible.
|
|
89
|
-
*/
|
|
90
|
-
export declare function extractGetterFnExpression(statement: DefinePropertyReexportStatement): ts.Expression | null;
|
|
91
|
-
/**
|
|
92
|
-
* Check whether the specified `ts.Node` represents a `require()` call, i.e. an call expression of
|
|
93
|
-
* the form: `require('<foo>')`
|
|
94
|
-
*/
|
|
95
|
-
export declare function isRequireCall(node: ts.Node): node is RequireCall;
|
|
96
|
-
/**
|
|
97
|
-
* Check whether the specified `path` is an "external" import.
|
|
98
|
-
* In other words, that it comes from a entry-point outside the current one.
|
|
99
|
-
*/
|
|
100
|
-
export declare function isExternalImport(path: string): boolean;
|
|
101
|
-
/**
|
|
102
|
-
* A UMD/CommonJS style export declaration of the form `exports.<name>`.
|
|
103
|
-
*/
|
|
104
|
-
export interface ExportsDeclaration extends ts.PropertyAccessExpression {
|
|
105
|
-
name: ts.Identifier;
|
|
106
|
-
expression: ts.Identifier;
|
|
107
|
-
parent: ExportsAssignment;
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* Check whether the specified `node` is a property access expression of the form
|
|
111
|
-
* `exports.<foo>`.
|
|
112
|
-
*/
|
|
113
|
-
export declare function isExportsDeclaration(expr: ts.Node): expr is ExportsDeclaration;
|
|
114
|
-
/**
|
|
115
|
-
* A UMD/CommonJS style export assignment of the form `exports.<foo> = <bar>`.
|
|
116
|
-
*/
|
|
117
|
-
export interface ExportsAssignment extends ts.BinaryExpression {
|
|
118
|
-
left: ExportsDeclaration;
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Check whether the specified `node` is an assignment expression of the form
|
|
122
|
-
* `exports.<foo> = <bar>`.
|
|
123
|
-
*/
|
|
124
|
-
export declare function isExportsAssignment(expr: ts.Node): expr is ExportsAssignment;
|
|
125
|
-
/**
|
|
126
|
-
* An expression statement of the form `exports.<foo> = <bar>;`.
|
|
127
|
-
*/
|
|
128
|
-
export interface ExportsStatement extends ts.ExpressionStatement {
|
|
129
|
-
expression: ExportsAssignment;
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* Check whether the specified `stmt` is an expression statement of the form
|
|
133
|
-
* `exports.<foo> = <bar>;`.
|
|
134
|
-
*/
|
|
135
|
-
export declare function isExportsStatement(stmt: ts.Node): stmt is ExportsStatement;
|
|
136
|
-
/**
|
|
137
|
-
* Find the far right hand side of a sequence of aliased assignments of the form
|
|
138
|
-
*
|
|
139
|
-
* ```
|
|
140
|
-
* exports.MyClass = alias1 = alias2 = <<declaration>>
|
|
141
|
-
* ```
|
|
142
|
-
*
|
|
143
|
-
* @param node the expression to parse
|
|
144
|
-
* @returns the original `node` or the far right expression of a series of assignments.
|
|
145
|
-
*/
|
|
146
|
-
export declare function skipAliases(node: ts.Expression): ts.Expression;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright Google LLC All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.io/license
|
|
7
|
-
*/
|
|
8
|
-
import ts from 'typescript';
|
|
9
|
-
import { ClassDeclaration, ClassMember, CtorParameter, Declaration, DeclarationNode, Decorator, FunctionDefinition, Import, ReflectionHost } from '../../../src/ngtsc/reflection';
|
|
10
|
-
import { NgccClassSymbol, NgccReflectionHost } from './ngcc_host';
|
|
11
|
-
/**
|
|
12
|
-
* A reflection host implementation that delegates reflector queries depending on whether they
|
|
13
|
-
* reflect on declaration files (for dependent libraries) or source files within the entry-point
|
|
14
|
-
* that is being compiled. The first type of queries are handled by the regular TypeScript
|
|
15
|
-
* reflection host, whereas the other queries are handled by an `NgccReflectionHost` that is
|
|
16
|
-
* specific to the entry-point's format.
|
|
17
|
-
*/
|
|
18
|
-
export declare class DelegatingReflectionHost implements NgccReflectionHost {
|
|
19
|
-
private tsHost;
|
|
20
|
-
private ngccHost;
|
|
21
|
-
constructor(tsHost: ReflectionHost, ngccHost: NgccReflectionHost);
|
|
22
|
-
getConstructorParameters(clazz: ClassDeclaration): CtorParameter[] | null;
|
|
23
|
-
getDeclarationOfIdentifier(id: ts.Identifier): Declaration | null;
|
|
24
|
-
getDecoratorsOfDeclaration(declaration: DeclarationNode): Decorator[] | null;
|
|
25
|
-
getDefinitionOfFunction(fn: ts.Node): FunctionDefinition | null;
|
|
26
|
-
getDtsDeclaration(declaration: DeclarationNode): ts.Declaration | null;
|
|
27
|
-
getExportsOfModule(module: ts.Node): Map<string, Declaration> | null;
|
|
28
|
-
getGenericArityOfClass(clazz: ClassDeclaration): number | null;
|
|
29
|
-
getImportOfIdentifier(id: ts.Identifier): Import | null;
|
|
30
|
-
getInternalNameOfClass(clazz: ClassDeclaration): ts.Identifier;
|
|
31
|
-
getAdjacentNameOfClass(clazz: ClassDeclaration): ts.Identifier;
|
|
32
|
-
getMembersOfClass(clazz: ClassDeclaration): ClassMember[];
|
|
33
|
-
getVariableValue(declaration: ts.VariableDeclaration): ts.Expression | null;
|
|
34
|
-
hasBaseClass(clazz: ClassDeclaration): boolean;
|
|
35
|
-
getBaseClassExpression(clazz: ClassDeclaration): ts.Expression | null;
|
|
36
|
-
isClass(node: ts.Node): node is ClassDeclaration;
|
|
37
|
-
findClassSymbols(sourceFile: ts.SourceFile): NgccClassSymbol[];
|
|
38
|
-
getClassSymbol(node: ts.Node): NgccClassSymbol | undefined;
|
|
39
|
-
getDecoratorsOfSymbol(symbol: NgccClassSymbol): Decorator[] | null;
|
|
40
|
-
getEndOfClass(classSymbol: NgccClassSymbol): ts.Node;
|
|
41
|
-
detectKnownDeclaration<T extends Declaration>(decl: T): T;
|
|
42
|
-
isStaticallyExported(decl: ts.Node): boolean;
|
|
43
|
-
}
|