@typescript-deploys/pr-build 4.8.0-pr-49285-2 → 4.8.0-pr-48784-20
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/lib/tsc.js +1098 -669
- package/lib/tsserver.js +1164 -735
- package/lib/tsserverlibrary.d.ts +1 -1
- package/lib/tsserverlibrary.js +1164 -735
- package/lib/typescript.d.ts +1 -1
- package/lib/typescript.js +1164 -735
- package/lib/typescriptServices.d.ts +1 -1
- package/lib/typescriptServices.js +1164 -735
- package/lib/typingsInstaller.js +1144 -732
- package/package.json +1 -1
package/lib/tsc.js
CHANGED
|
@@ -69,7 +69,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
69
69
|
var ts;
|
|
70
70
|
(function (ts) {
|
|
71
71
|
ts.versionMajorMinor = "4.8";
|
|
72
|
-
ts.version = ts.versionMajorMinor + ".0-insiders.
|
|
72
|
+
ts.version = ts.versionMajorMinor + ".0-insiders.20220601";
|
|
73
73
|
var NativeCollections;
|
|
74
74
|
(function (NativeCollections) {
|
|
75
75
|
var globals = typeof globalThis !== "undefined" ? globalThis :
|
|
@@ -2981,6 +2981,7 @@ var ts;
|
|
|
2981
2981
|
var marks = new ts.Map();
|
|
2982
2982
|
var counts = new ts.Map();
|
|
2983
2983
|
var durations = new ts.Map();
|
|
2984
|
+
var durationMarks = new ts.Set();
|
|
2984
2985
|
return {
|
|
2985
2986
|
createTimerIf: createTimerIf,
|
|
2986
2987
|
createTimer: createTimer,
|
|
@@ -2989,6 +2990,7 @@ var ts;
|
|
|
2989
2990
|
getCount: getCount,
|
|
2990
2991
|
getDuration: getDuration,
|
|
2991
2992
|
forEachMeasure: forEachMeasure,
|
|
2993
|
+
forEachCount: forEachCount,
|
|
2992
2994
|
isEnabled: isEnabled,
|
|
2993
2995
|
enable: enable,
|
|
2994
2996
|
disable: disable,
|
|
@@ -3029,6 +3031,7 @@ var ts;
|
|
|
3029
3031
|
function measure(measureName, startMarkName, endMarkName) {
|
|
3030
3032
|
var _a, _b;
|
|
3031
3033
|
if (enabled) {
|
|
3034
|
+
durationMarks.add(startMarkName).add(endMarkName);
|
|
3032
3035
|
var end = (_a = marks.get(endMarkName)) !== null && _a !== void 0 ? _a : ts.timestamp();
|
|
3033
3036
|
var start = (_b = marks.get(startMarkName)) !== null && _b !== void 0 ? _b : timeorigin;
|
|
3034
3037
|
var previousDuration = durations.get(measureName) || 0;
|
|
@@ -3045,6 +3048,9 @@ var ts;
|
|
|
3045
3048
|
function forEachMeasure(cb) {
|
|
3046
3049
|
durations.forEach(function (duration, measureName) { return cb(measureName, duration); });
|
|
3047
3050
|
}
|
|
3051
|
+
function forEachCount(cb) {
|
|
3052
|
+
counts.forEach(function (count, countName) { return !durationMarks.has(countName) && cb(countName, count); });
|
|
3053
|
+
}
|
|
3048
3054
|
function isEnabled() {
|
|
3049
3055
|
return enabled;
|
|
3050
3056
|
}
|
|
@@ -3749,7 +3755,7 @@ var ts;
|
|
|
3749
3755
|
};
|
|
3750
3756
|
}
|
|
3751
3757
|
function createDirectoryWatcher(dirName, dirPath, fallbackOptions) {
|
|
3752
|
-
var watcher = fsWatch(dirName, 1, function (_eventName, relativeFileName) {
|
|
3758
|
+
var watcher = fsWatch(dirName, 1, function (_eventName, relativeFileName, modifiedTime) {
|
|
3753
3759
|
if (!ts.isString(relativeFileName))
|
|
3754
3760
|
return;
|
|
3755
3761
|
var fileName = ts.getNormalizedAbsolutePath(relativeFileName, dirName);
|
|
@@ -3757,7 +3763,7 @@ var ts;
|
|
|
3757
3763
|
if (callbacks) {
|
|
3758
3764
|
for (var _i = 0, callbacks_1 = callbacks; _i < callbacks_1.length; _i++) {
|
|
3759
3765
|
var fileCallback = callbacks_1[_i];
|
|
3760
|
-
fileCallback(fileName, FileWatcherEventKind.Changed);
|
|
3766
|
+
fileCallback(fileName, FileWatcherEventKind.Changed, modifiedTime);
|
|
3761
3767
|
}
|
|
3762
3768
|
}
|
|
3763
3769
|
}, false, PollingInterval.Medium, fallbackOptions);
|
|
@@ -3809,7 +3815,7 @@ var ts;
|
|
|
3809
3815
|
}
|
|
3810
3816
|
else {
|
|
3811
3817
|
cache.set(path, {
|
|
3812
|
-
watcher: watchFile(fileName, function (fileName, eventKind) { return ts.forEach(callbacksCache.get(path), function (cb) { return cb(fileName, eventKind); }); }, pollingInterval, options),
|
|
3818
|
+
watcher: watchFile(fileName, function (fileName, eventKind, modifiedTime) { return ts.forEach(callbacksCache.get(path), function (cb) { return cb(fileName, eventKind, modifiedTime); }); }, pollingInterval, options),
|
|
3813
3819
|
refCount: 1
|
|
3814
3820
|
});
|
|
3815
3821
|
}
|
|
@@ -3833,7 +3839,7 @@ var ts;
|
|
|
3833
3839
|
var newTime = modifiedTime.getTime();
|
|
3834
3840
|
if (oldTime !== newTime) {
|
|
3835
3841
|
watchedFile.mtime = modifiedTime;
|
|
3836
|
-
watchedFile.callback(watchedFile.fileName, getFileWatcherEventKind(oldTime, newTime));
|
|
3842
|
+
watchedFile.callback(watchedFile.fileName, getFileWatcherEventKind(oldTime, newTime), modifiedTime);
|
|
3837
3843
|
return true;
|
|
3838
3844
|
}
|
|
3839
3845
|
return false;
|
|
@@ -4047,16 +4053,17 @@ var ts;
|
|
|
4047
4053
|
}
|
|
4048
4054
|
ts.createDirectoryWatcherSupportingRecursive = createDirectoryWatcherSupportingRecursive;
|
|
4049
4055
|
function createFileWatcherCallback(callback) {
|
|
4050
|
-
return function (_fileName, eventKind) { return callback(eventKind === FileWatcherEventKind.Changed ? "change" : "rename", ""); };
|
|
4056
|
+
return function (_fileName, eventKind, modifiedTime) { return callback(eventKind === FileWatcherEventKind.Changed ? "change" : "rename", "", modifiedTime); };
|
|
4051
4057
|
}
|
|
4052
4058
|
ts.createFileWatcherCallback = createFileWatcherCallback;
|
|
4053
|
-
function createFsWatchCallbackForFileWatcherCallback(fileName, callback,
|
|
4054
|
-
return function (eventName) {
|
|
4059
|
+
function createFsWatchCallbackForFileWatcherCallback(fileName, callback, getModifiedTime) {
|
|
4060
|
+
return function (eventName, _relativeFileName, modifiedTime) {
|
|
4055
4061
|
if (eventName === "rename") {
|
|
4056
|
-
|
|
4062
|
+
modifiedTime || (modifiedTime = getModifiedTime(fileName) || ts.missingFileModifiedTime);
|
|
4063
|
+
callback(fileName, modifiedTime !== ts.missingFileModifiedTime ? FileWatcherEventKind.Created : FileWatcherEventKind.Deleted, modifiedTime);
|
|
4057
4064
|
}
|
|
4058
4065
|
else {
|
|
4059
|
-
callback(fileName, FileWatcherEventKind.Changed);
|
|
4066
|
+
callback(fileName, FileWatcherEventKind.Changed, modifiedTime);
|
|
4060
4067
|
}
|
|
4061
4068
|
};
|
|
4062
4069
|
}
|
|
@@ -4075,7 +4082,7 @@ var ts;
|
|
|
4075
4082
|
};
|
|
4076
4083
|
}
|
|
4077
4084
|
function createSystemWatchFunctions(_a) {
|
|
4078
|
-
var pollingWatchFile = _a.pollingWatchFile, getModifiedTime = _a.getModifiedTime, setTimeout = _a.setTimeout, clearTimeout = _a.clearTimeout, fsWatch = _a.fsWatch,
|
|
4085
|
+
var pollingWatchFile = _a.pollingWatchFile, getModifiedTime = _a.getModifiedTime, setTimeout = _a.setTimeout, clearTimeout = _a.clearTimeout, fsWatch = _a.fsWatch, useCaseSensitiveFileNames = _a.useCaseSensitiveFileNames, getCurrentDirectory = _a.getCurrentDirectory, fsSupportsRecursiveFsWatch = _a.fsSupportsRecursiveFsWatch, directoryExists = _a.directoryExists, getAccessibleSortedChildDirectories = _a.getAccessibleSortedChildDirectories, realpath = _a.realpath, tscWatchFile = _a.tscWatchFile, useNonPollingWatchers = _a.useNonPollingWatchers, tscWatchDirectory = _a.tscWatchDirectory, defaultWatchFileKind = _a.defaultWatchFileKind;
|
|
4079
4086
|
var dynamicPollingWatchFile;
|
|
4080
4087
|
var fixedChunkSizePollingWatchFile;
|
|
4081
4088
|
var nonPollingWatchFile;
|
|
@@ -4097,7 +4104,7 @@ var ts;
|
|
|
4097
4104
|
case ts.WatchFileKind.FixedChunkSizePolling:
|
|
4098
4105
|
return ensureFixedChunkSizePollingWatchFile()(fileName, callback, undefined, undefined);
|
|
4099
4106
|
case ts.WatchFileKind.UseFsEvents:
|
|
4100
|
-
return fsWatch(fileName, 0, createFsWatchCallbackForFileWatcherCallback(fileName, callback,
|
|
4107
|
+
return fsWatch(fileName, 0, createFsWatchCallbackForFileWatcherCallback(fileName, callback, getModifiedTime), false, pollingInterval, ts.getFallbackOptions(options));
|
|
4101
4108
|
case ts.WatchFileKind.UseFsEventsOnParentDirectory:
|
|
4102
4109
|
if (!nonPollingWatchFile) {
|
|
4103
4110
|
nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames);
|
|
@@ -4254,7 +4261,6 @@ var ts;
|
|
|
4254
4261
|
fsWatch: fsWatch,
|
|
4255
4262
|
useCaseSensitiveFileNames: useCaseSensitiveFileNames,
|
|
4256
4263
|
getCurrentDirectory: getCurrentDirectory,
|
|
4257
|
-
fileExists: fileExists,
|
|
4258
4264
|
fsSupportsRecursiveFsWatch: fsSupportsRecursiveFsWatch,
|
|
4259
4265
|
directoryExists: directoryExists,
|
|
4260
4266
|
getAccessibleSortedChildDirectories: function (path) { return getAccessibleFileSystemEntries(path).directories; },
|
|
@@ -4482,7 +4488,7 @@ var ts;
|
|
|
4482
4488
|
else {
|
|
4483
4489
|
eventKind = FileWatcherEventKind.Changed;
|
|
4484
4490
|
}
|
|
4485
|
-
callback(fileName, eventKind);
|
|
4491
|
+
callback(fileName, eventKind, curr.mtime);
|
|
4486
4492
|
}
|
|
4487
4493
|
}
|
|
4488
4494
|
function fsWatch(fileOrDirectory, entryKind, callback, recursive, fallbackPollingInterval, fallbackOptions) {
|
|
@@ -4502,9 +4508,9 @@ var ts;
|
|
|
4502
4508
|
watcher = undefined;
|
|
4503
4509
|
}
|
|
4504
4510
|
};
|
|
4505
|
-
function invokeCallbackAndUpdateWatcher(createWatcher) {
|
|
4511
|
+
function invokeCallbackAndUpdateWatcher(createWatcher, modifiedTime) {
|
|
4506
4512
|
sysLog("sysLog:: " + fileOrDirectory + ":: Changing watcher to " + (createWatcher === watchPresentFileSystemEntry ? "Present" : "Missing") + "FileSystemEntryWatcher");
|
|
4507
|
-
callback("rename", "");
|
|
4513
|
+
callback("rename", "", modifiedTime);
|
|
4508
4514
|
if (watcher) {
|
|
4509
4515
|
watcher.close();
|
|
4510
4516
|
watcher = createWatcher();
|
|
@@ -4537,21 +4543,25 @@ var ts;
|
|
|
4537
4543
|
}
|
|
4538
4544
|
}
|
|
4539
4545
|
function callbackChangingToMissingFileSystemEntry(event, relativeName) {
|
|
4546
|
+
var modifiedTime = getModifiedTime(fileOrDirectory) || ts.missingFileModifiedTime;
|
|
4540
4547
|
return event === "rename" &&
|
|
4541
4548
|
(!relativeName ||
|
|
4542
4549
|
relativeName === lastDirectoryPart ||
|
|
4543
4550
|
(relativeName.lastIndexOf(lastDirectoryPartWithDirectorySeparator) !== -1 && relativeName.lastIndexOf(lastDirectoryPartWithDirectorySeparator) === relativeName.length - lastDirectoryPartWithDirectorySeparator.length)) &&
|
|
4544
|
-
|
|
4545
|
-
invokeCallbackAndUpdateWatcher(watchMissingFileSystemEntry) :
|
|
4546
|
-
callback(event, relativeName);
|
|
4551
|
+
modifiedTime === ts.missingFileModifiedTime ?
|
|
4552
|
+
invokeCallbackAndUpdateWatcher(watchMissingFileSystemEntry, modifiedTime) :
|
|
4553
|
+
callback(event, relativeName, modifiedTime);
|
|
4547
4554
|
}
|
|
4548
4555
|
function watchPresentFileSystemEntryWithFsWatchFile() {
|
|
4549
4556
|
return watchFile(fileOrDirectory, createFileWatcherCallback(callback), fallbackPollingInterval, fallbackOptions);
|
|
4550
4557
|
}
|
|
4551
4558
|
function watchMissingFileSystemEntry() {
|
|
4552
|
-
return watchFile(fileOrDirectory, function (_fileName, eventKind) {
|
|
4553
|
-
if (eventKind === FileWatcherEventKind.Created
|
|
4554
|
-
|
|
4559
|
+
return watchFile(fileOrDirectory, function (_fileName, eventKind, modifiedTime) {
|
|
4560
|
+
if (eventKind === FileWatcherEventKind.Created) {
|
|
4561
|
+
modifiedTime || (modifiedTime = getModifiedTime(fileOrDirectory) || ts.missingFileModifiedTime);
|
|
4562
|
+
if (modifiedTime !== ts.missingFileModifiedTime) {
|
|
4563
|
+
invokeCallbackAndUpdateWatcher(watchPresentFileSystemEntry, modifiedTime);
|
|
4564
|
+
}
|
|
4555
4565
|
}
|
|
4556
4566
|
}, fallbackPollingInterval, fallbackOptions);
|
|
4557
4567
|
}
|
|
@@ -4690,12 +4700,17 @@ var ts;
|
|
|
4690
4700
|
}
|
|
4691
4701
|
function getModifiedTime(path) {
|
|
4692
4702
|
var _a;
|
|
4703
|
+
var originalStackTraceLimit = Error.stackTraceLimit;
|
|
4704
|
+
Error.stackTraceLimit = 0;
|
|
4693
4705
|
try {
|
|
4694
4706
|
return (_a = statSync(path)) === null || _a === void 0 ? void 0 : _a.mtime;
|
|
4695
4707
|
}
|
|
4696
4708
|
catch (e) {
|
|
4697
4709
|
return undefined;
|
|
4698
4710
|
}
|
|
4711
|
+
finally {
|
|
4712
|
+
Error.stackTraceLimit = originalStackTraceLimit;
|
|
4713
|
+
}
|
|
4699
4714
|
}
|
|
4700
4715
|
function setModifiedTime(path, time) {
|
|
4701
4716
|
try {
|
|
@@ -6087,6 +6102,7 @@ var ts;
|
|
|
6087
6102
|
Import_assertion_values_must_be_string_literal_expressions: diag(2837, ts.DiagnosticCategory.Error, "Import_assertion_values_must_be_string_literal_expressions_2837", "Import assertion values must be string literal expressions."),
|
|
6088
6103
|
All_declarations_of_0_must_have_identical_constraints: diag(2838, ts.DiagnosticCategory.Error, "All_declarations_of_0_must_have_identical_constraints_2838", "All declarations of '{0}' must have identical constraints."),
|
|
6089
6104
|
This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value: diag(2839, ts.DiagnosticCategory.Error, "This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839", "This condition will always return '{0}' since JavaScript compares objects by reference, not value."),
|
|
6105
|
+
An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_classes: diag(2840, ts.DiagnosticCategory.Error, "An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_clas_2840", "An interface cannot extend a primitive type like '{0}'; an interface can only extend named types and classes"),
|
|
6090
6106
|
Import_declaration_0_is_using_private_name_1: diag(4000, ts.DiagnosticCategory.Error, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."),
|
|
6091
6107
|
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."),
|
|
6092
6108
|
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."),
|
|
@@ -6497,8 +6513,8 @@ var ts;
|
|
|
6497
6513
|
Cannot_prepend_project_0_because_it_does_not_have_outFile_set: diag(6308, ts.DiagnosticCategory.Error, "Cannot_prepend_project_0_because_it_does_not_have_outFile_set_6308", "Cannot prepend project '{0}' because it does not have 'outFile' set"),
|
|
6498
6514
|
Output_file_0_from_project_1_does_not_exist: diag(6309, ts.DiagnosticCategory.Error, "Output_file_0_from_project_1_does_not_exist_6309", "Output file '{0}' from project '{1}' does not exist"),
|
|
6499
6515
|
Referenced_project_0_may_not_disable_emit: diag(6310, ts.DiagnosticCategory.Error, "Referenced_project_0_may_not_disable_emit_6310", "Referenced project '{0}' may not disable emit."),
|
|
6500
|
-
|
|
6501
|
-
|
|
6516
|
+
Project_0_is_out_of_date_because_output_1_is_older_than_input_2: diag(6350, ts.DiagnosticCategory.Message, "Project_0_is_out_of_date_because_output_1_is_older_than_input_2_6350", "Project '{0}' is out of date because output '{1}' is older than input '{2}'"),
|
|
6517
|
+
Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2: diag(6351, ts.DiagnosticCategory.Message, "Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2_6351", "Project '{0}' is up to date because newest input '{1}' is older than output '{2}'"),
|
|
6502
6518
|
Project_0_is_out_of_date_because_output_file_1_does_not_exist: diag(6352, ts.DiagnosticCategory.Message, "Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352", "Project '{0}' is out of date because output file '{1}' does not exist"),
|
|
6503
6519
|
Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date: diag(6353, ts.DiagnosticCategory.Message, "Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353", "Project '{0}' is out of date because its dependency '{1}' is out of date"),
|
|
6504
6520
|
Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies: diag(6354, ts.DiagnosticCategory.Message, "Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354", "Project '{0}' is up to date with .d.ts files from its dependencies"),
|
|
@@ -6529,7 +6545,7 @@ var ts;
|
|
|
6529
6545
|
Project_0_can_t_be_built_because_its_dependency_1_was_not_built: diag(6383, ts.DiagnosticCategory.Message, "Project_0_can_t_be_built_because_its_dependency_1_was_not_built_6383", "Project '{0}' can't be built because its dependency '{1}' was not built"),
|
|
6530
6546
|
Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it: diag(6384, ts.DiagnosticCategory.Message, "Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_di_6384", "Have recompiles in '--incremental' and '--watch' assume that changes within a file will only affect files directly depending on it."),
|
|
6531
6547
|
_0_is_deprecated: diag(6385, ts.DiagnosticCategory.Suggestion, "_0_is_deprecated_6385", "'{0}' is deprecated.", undefined, undefined, true),
|
|
6532
|
-
|
|
6548
|
+
Performance_timings_for_diagnostics_or_extendedDiagnostics_or_solutionDiagnostics_are_not_available_in_this_session_A_native_implementation_of_the_Web_Performance_API_could_not_be_found: diag(6386, ts.DiagnosticCategory.Message, "Performance_timings_for_diagnostics_or_extendedDiagnostics_or_solutionDiagnostics_are_not_available__6386", "Performance timings for '--diagnostics' or '--extendedDiagnostics' or '--solutionDiagnostics' are not available in this session. A native implementation of the Web Performance API could not be found."),
|
|
6533
6549
|
The_signature_0_of_1_is_deprecated: diag(6387, ts.DiagnosticCategory.Suggestion, "The_signature_0_of_1_is_deprecated_6387", "The signature '{0}' of '{1}' is deprecated.", undefined, undefined, true),
|
|
6534
6550
|
Project_0_is_being_forcibly_rebuilt: diag(6388, ts.DiagnosticCategory.Message, "Project_0_is_being_forcibly_rebuilt_6388", "Project '{0}' is being forcibly rebuilt"),
|
|
6535
6551
|
Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved: diag(6389, ts.DiagnosticCategory.Message, "Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved_6389", "Reusing resolution of module '{0}' from '{1}' of old program, it was not resolved."),
|
|
@@ -6542,6 +6558,8 @@ var ts;
|
|
|
6542
6558
|
Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3: diag(6396, ts.DiagnosticCategory.Message, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6396", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."),
|
|
6543
6559
|
Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4: diag(6397, ts.DiagnosticCategory.Message, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6397", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."),
|
|
6544
6560
|
Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_resolved: diag(6398, ts.DiagnosticCategory.Message, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_re_6398", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was not resolved."),
|
|
6561
|
+
Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_are_not_emitted: diag(6399, ts.DiagnosticCategory.Message, "Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_are_not_emitted_6399", "Project '{0}' is out of date because buildinfo file '{1}' indicates that some of the changes are not emitted"),
|
|
6562
|
+
Project_0_is_up_to_date_but_needs_update_to_timestamps_of_output_files_that_are_older_than_input_files: diag(6400, ts.DiagnosticCategory.Message, "Project_0_is_up_to_date_but_needs_update_to_timestamps_of_output_files_that_are_older_than_input_fil_6400", "Project '{0}' is up to date but needs update to timestamps of output files that are older than input files"),
|
|
6545
6563
|
The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1: diag(6500, ts.DiagnosticCategory.Message, "The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500", "The expected type comes from property '{0}' which is declared here on type '{1}'"),
|
|
6546
6564
|
The_expected_type_comes_from_this_index_signature: diag(6501, ts.DiagnosticCategory.Message, "The_expected_type_comes_from_this_index_signature_6501", "The expected type comes from this index signature."),
|
|
6547
6565
|
The_expected_type_comes_from_the_return_type_of_this_signature: diag(6502, ts.DiagnosticCategory.Message, "The_expected_type_comes_from_the_return_type_of_this_signature_6502", "The expected type comes from the return type of this signature."),
|
|
@@ -6663,6 +6681,7 @@ var ts;
|
|
|
6663
6681
|
Specify_how_the_TypeScript_watch_mode_works: diag(6715, ts.DiagnosticCategory.Message, "Specify_how_the_TypeScript_watch_mode_works_6715", "Specify how the TypeScript watch mode works."),
|
|
6664
6682
|
Require_undeclared_properties_from_index_signatures_to_use_element_accesses: diag(6717, ts.DiagnosticCategory.Message, "Require_undeclared_properties_from_index_signatures_to_use_element_accesses_6717", "Require undeclared properties from index signatures to use element accesses."),
|
|
6665
6683
|
Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types: diag(6718, ts.DiagnosticCategory.Message, "Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_6718", "Specify emit/checking behavior for imports that are only used for types."),
|
|
6684
|
+
Output_more_detailed_solution_performance_information_after_building: diag(6719, ts.DiagnosticCategory.Message, "Output_more_detailed_solution_performance_information_after_building_6719", "Output more detailed solution performance information after building."),
|
|
6666
6685
|
Default_catch_clause_variables_as_unknown_instead_of_any: diag(6803, ts.DiagnosticCategory.Message, "Default_catch_clause_variables_as_unknown_instead_of_any_6803", "Default catch clause variables as 'unknown' instead of 'any'."),
|
|
6667
6686
|
one_of_Colon: diag(6900, ts.DiagnosticCategory.Message, "one_of_Colon_6900", "one of:"),
|
|
6668
6687
|
one_or_more_Colon: diag(6901, ts.DiagnosticCategory.Message, "one_or_more_Colon_6901", "one or more:"),
|
|
@@ -16008,6 +16027,10 @@ var ts;
|
|
|
16008
16027
|
return optionsHaveChanges(oldOptions, newOptions, ts.affectsEmitOptionDeclarations);
|
|
16009
16028
|
}
|
|
16010
16029
|
ts.compilerOptionsAffectEmit = compilerOptionsAffectEmit;
|
|
16030
|
+
function compilerOptionsAffectDeclarationPath(newOptions, oldOptions) {
|
|
16031
|
+
return optionsHaveChanges(oldOptions, newOptions, ts.affectsDeclarationPathOptionDeclarations);
|
|
16032
|
+
}
|
|
16033
|
+
ts.compilerOptionsAffectDeclarationPath = compilerOptionsAffectDeclarationPath;
|
|
16011
16034
|
function getCompilerOptionValue(options, option) {
|
|
16012
16035
|
return option.strictFlag ? getStrictOptionValue(options, option.name) : options[option.name];
|
|
16013
16036
|
}
|
|
@@ -31717,6 +31740,7 @@ var ts;
|
|
|
31717
31740
|
type: "boolean",
|
|
31718
31741
|
affectsSemanticDiagnostics: true,
|
|
31719
31742
|
affectsEmit: true,
|
|
31743
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31720
31744
|
category: ts.Diagnostics.Watch_and_Build_Modes,
|
|
31721
31745
|
description: ts.Diagnostics.Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it,
|
|
31722
31746
|
defaultValueDescription: false,
|
|
@@ -31750,12 +31774,39 @@ var ts;
|
|
|
31750
31774
|
affectsSourceFile: true,
|
|
31751
31775
|
affectsModuleResolution: true,
|
|
31752
31776
|
affectsEmit: true,
|
|
31777
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31753
31778
|
paramType: ts.Diagnostics.VERSION,
|
|
31754
31779
|
showInSimplifiedHelpView: true,
|
|
31755
31780
|
category: ts.Diagnostics.Language_and_Environment,
|
|
31756
31781
|
description: ts.Diagnostics.Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations,
|
|
31757
31782
|
defaultValueDescription: 0,
|
|
31758
31783
|
};
|
|
31784
|
+
ts.moduleOptionDeclaration = {
|
|
31785
|
+
name: "module",
|
|
31786
|
+
shortName: "m",
|
|
31787
|
+
type: new ts.Map(ts.getEntries({
|
|
31788
|
+
none: ts.ModuleKind.None,
|
|
31789
|
+
commonjs: ts.ModuleKind.CommonJS,
|
|
31790
|
+
amd: ts.ModuleKind.AMD,
|
|
31791
|
+
system: ts.ModuleKind.System,
|
|
31792
|
+
umd: ts.ModuleKind.UMD,
|
|
31793
|
+
es6: ts.ModuleKind.ES2015,
|
|
31794
|
+
es2015: ts.ModuleKind.ES2015,
|
|
31795
|
+
es2020: ts.ModuleKind.ES2020,
|
|
31796
|
+
es2022: ts.ModuleKind.ES2022,
|
|
31797
|
+
esnext: ts.ModuleKind.ESNext,
|
|
31798
|
+
node16: ts.ModuleKind.Node16,
|
|
31799
|
+
nodenext: ts.ModuleKind.NodeNext,
|
|
31800
|
+
})),
|
|
31801
|
+
affectsModuleResolution: true,
|
|
31802
|
+
affectsEmit: true,
|
|
31803
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31804
|
+
paramType: ts.Diagnostics.KIND,
|
|
31805
|
+
showInSimplifiedHelpView: true,
|
|
31806
|
+
category: ts.Diagnostics.Modules,
|
|
31807
|
+
description: ts.Diagnostics.Specify_what_module_code_is_generated,
|
|
31808
|
+
defaultValueDescription: undefined,
|
|
31809
|
+
};
|
|
31759
31810
|
var commandOptionsWithoutBuild = [
|
|
31760
31811
|
{
|
|
31761
31812
|
name: "all",
|
|
@@ -31816,36 +31867,13 @@ var ts;
|
|
|
31816
31867
|
category: ts.Diagnostics.Command_line_Options,
|
|
31817
31868
|
affectsSemanticDiagnostics: true,
|
|
31818
31869
|
affectsEmit: true,
|
|
31870
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31819
31871
|
isCommandLineOnly: true,
|
|
31820
31872
|
description: ts.Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing,
|
|
31821
31873
|
defaultValueDescription: false,
|
|
31822
31874
|
},
|
|
31823
31875
|
ts.targetOptionDeclaration,
|
|
31824
|
-
|
|
31825
|
-
name: "module",
|
|
31826
|
-
shortName: "m",
|
|
31827
|
-
type: new ts.Map(ts.getEntries({
|
|
31828
|
-
none: ts.ModuleKind.None,
|
|
31829
|
-
commonjs: ts.ModuleKind.CommonJS,
|
|
31830
|
-
amd: ts.ModuleKind.AMD,
|
|
31831
|
-
system: ts.ModuleKind.System,
|
|
31832
|
-
umd: ts.ModuleKind.UMD,
|
|
31833
|
-
es6: ts.ModuleKind.ES2015,
|
|
31834
|
-
es2015: ts.ModuleKind.ES2015,
|
|
31835
|
-
es2020: ts.ModuleKind.ES2020,
|
|
31836
|
-
es2022: ts.ModuleKind.ES2022,
|
|
31837
|
-
esnext: ts.ModuleKind.ESNext,
|
|
31838
|
-
node16: ts.ModuleKind.Node16,
|
|
31839
|
-
nodenext: ts.ModuleKind.NodeNext,
|
|
31840
|
-
})),
|
|
31841
|
-
affectsModuleResolution: true,
|
|
31842
|
-
affectsEmit: true,
|
|
31843
|
-
paramType: ts.Diagnostics.KIND,
|
|
31844
|
-
showInSimplifiedHelpView: true,
|
|
31845
|
-
category: ts.Diagnostics.Modules,
|
|
31846
|
-
description: ts.Diagnostics.Specify_what_module_code_is_generated,
|
|
31847
|
-
defaultValueDescription: undefined,
|
|
31848
|
-
},
|
|
31876
|
+
ts.moduleOptionDeclaration,
|
|
31849
31877
|
{
|
|
31850
31878
|
name: "lib",
|
|
31851
31879
|
type: "list",
|
|
@@ -31882,6 +31910,7 @@ var ts;
|
|
|
31882
31910
|
type: jsxOptionMap,
|
|
31883
31911
|
affectsSourceFile: true,
|
|
31884
31912
|
affectsEmit: true,
|
|
31913
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31885
31914
|
affectsModuleResolution: true,
|
|
31886
31915
|
paramType: ts.Diagnostics.KIND,
|
|
31887
31916
|
showInSimplifiedHelpView: true,
|
|
@@ -31894,6 +31923,7 @@ var ts;
|
|
|
31894
31923
|
shortName: "d",
|
|
31895
31924
|
type: "boolean",
|
|
31896
31925
|
affectsEmit: true,
|
|
31926
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31897
31927
|
showInSimplifiedHelpView: true,
|
|
31898
31928
|
category: ts.Diagnostics.Emit,
|
|
31899
31929
|
transpileOptionValue: undefined,
|
|
@@ -31904,6 +31934,7 @@ var ts;
|
|
|
31904
31934
|
name: "declarationMap",
|
|
31905
31935
|
type: "boolean",
|
|
31906
31936
|
affectsEmit: true,
|
|
31937
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31907
31938
|
showInSimplifiedHelpView: true,
|
|
31908
31939
|
category: ts.Diagnostics.Emit,
|
|
31909
31940
|
transpileOptionValue: undefined,
|
|
@@ -31914,6 +31945,7 @@ var ts;
|
|
|
31914
31945
|
name: "emitDeclarationOnly",
|
|
31915
31946
|
type: "boolean",
|
|
31916
31947
|
affectsEmit: true,
|
|
31948
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31917
31949
|
showInSimplifiedHelpView: true,
|
|
31918
31950
|
category: ts.Diagnostics.Emit,
|
|
31919
31951
|
description: ts.Diagnostics.Only_output_d_ts_files_and_not_JavaScript_files,
|
|
@@ -31924,6 +31956,7 @@ var ts;
|
|
|
31924
31956
|
name: "sourceMap",
|
|
31925
31957
|
type: "boolean",
|
|
31926
31958
|
affectsEmit: true,
|
|
31959
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31927
31960
|
showInSimplifiedHelpView: true,
|
|
31928
31961
|
category: ts.Diagnostics.Emit,
|
|
31929
31962
|
defaultValueDescription: false,
|
|
@@ -31933,6 +31966,9 @@ var ts;
|
|
|
31933
31966
|
name: "outFile",
|
|
31934
31967
|
type: "string",
|
|
31935
31968
|
affectsEmit: true,
|
|
31969
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31970
|
+
affectsDeclarationPath: true,
|
|
31971
|
+
affectsBundleEmitBuildInfo: true,
|
|
31936
31972
|
isFilePath: true,
|
|
31937
31973
|
paramType: ts.Diagnostics.FILE,
|
|
31938
31974
|
showInSimplifiedHelpView: true,
|
|
@@ -31944,6 +31980,8 @@ var ts;
|
|
|
31944
31980
|
name: "outDir",
|
|
31945
31981
|
type: "string",
|
|
31946
31982
|
affectsEmit: true,
|
|
31983
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31984
|
+
affectsDeclarationPath: true,
|
|
31947
31985
|
isFilePath: true,
|
|
31948
31986
|
paramType: ts.Diagnostics.DIRECTORY,
|
|
31949
31987
|
showInSimplifiedHelpView: true,
|
|
@@ -31954,6 +31992,8 @@ var ts;
|
|
|
31954
31992
|
name: "rootDir",
|
|
31955
31993
|
type: "string",
|
|
31956
31994
|
affectsEmit: true,
|
|
31995
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31996
|
+
affectsDeclarationPath: true,
|
|
31957
31997
|
isFilePath: true,
|
|
31958
31998
|
paramType: ts.Diagnostics.LOCATION,
|
|
31959
31999
|
category: ts.Diagnostics.Modules,
|
|
@@ -31964,6 +32004,8 @@ var ts;
|
|
|
31964
32004
|
name: "composite",
|
|
31965
32005
|
type: "boolean",
|
|
31966
32006
|
affectsEmit: true,
|
|
32007
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32008
|
+
affectsBundleEmitBuildInfo: true,
|
|
31967
32009
|
isTSConfigOnly: true,
|
|
31968
32010
|
category: ts.Diagnostics.Projects,
|
|
31969
32011
|
transpileOptionValue: undefined,
|
|
@@ -31974,6 +32016,8 @@ var ts;
|
|
|
31974
32016
|
name: "tsBuildInfoFile",
|
|
31975
32017
|
type: "string",
|
|
31976
32018
|
affectsEmit: true,
|
|
32019
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32020
|
+
affectsBundleEmitBuildInfo: true,
|
|
31977
32021
|
isFilePath: true,
|
|
31978
32022
|
paramType: ts.Diagnostics.FILE,
|
|
31979
32023
|
category: ts.Diagnostics.Projects,
|
|
@@ -31985,6 +32029,7 @@ var ts;
|
|
|
31985
32029
|
name: "removeComments",
|
|
31986
32030
|
type: "boolean",
|
|
31987
32031
|
affectsEmit: true,
|
|
32032
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31988
32033
|
showInSimplifiedHelpView: true,
|
|
31989
32034
|
category: ts.Diagnostics.Emit,
|
|
31990
32035
|
defaultValueDescription: false,
|
|
@@ -32003,6 +32048,7 @@ var ts;
|
|
|
32003
32048
|
name: "importHelpers",
|
|
32004
32049
|
type: "boolean",
|
|
32005
32050
|
affectsEmit: true,
|
|
32051
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32006
32052
|
category: ts.Diagnostics.Emit,
|
|
32007
32053
|
description: ts.Diagnostics.Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file,
|
|
32008
32054
|
defaultValueDescription: false,
|
|
@@ -32016,6 +32062,7 @@ var ts;
|
|
|
32016
32062
|
})),
|
|
32017
32063
|
affectsEmit: true,
|
|
32018
32064
|
affectsSemanticDiagnostics: true,
|
|
32065
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32019
32066
|
category: ts.Diagnostics.Emit,
|
|
32020
32067
|
description: ts.Diagnostics.Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types,
|
|
32021
32068
|
defaultValueDescription: 0,
|
|
@@ -32024,6 +32071,7 @@ var ts;
|
|
|
32024
32071
|
name: "downlevelIteration",
|
|
32025
32072
|
type: "boolean",
|
|
32026
32073
|
affectsEmit: true,
|
|
32074
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32027
32075
|
category: ts.Diagnostics.Emit,
|
|
32028
32076
|
description: ts.Diagnostics.Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration,
|
|
32029
32077
|
defaultValueDescription: false,
|
|
@@ -32039,6 +32087,7 @@ var ts;
|
|
|
32039
32087
|
{
|
|
32040
32088
|
name: "strict",
|
|
32041
32089
|
type: "boolean",
|
|
32090
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32042
32091
|
showInSimplifiedHelpView: true,
|
|
32043
32092
|
category: ts.Diagnostics.Type_Checking,
|
|
32044
32093
|
description: ts.Diagnostics.Enable_all_strict_type_checking_options,
|
|
@@ -32048,6 +32097,7 @@ var ts;
|
|
|
32048
32097
|
name: "noImplicitAny",
|
|
32049
32098
|
type: "boolean",
|
|
32050
32099
|
affectsSemanticDiagnostics: true,
|
|
32100
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32051
32101
|
strictFlag: true,
|
|
32052
32102
|
category: ts.Diagnostics.Type_Checking,
|
|
32053
32103
|
description: ts.Diagnostics.Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type,
|
|
@@ -32057,6 +32107,7 @@ var ts;
|
|
|
32057
32107
|
name: "strictNullChecks",
|
|
32058
32108
|
type: "boolean",
|
|
32059
32109
|
affectsSemanticDiagnostics: true,
|
|
32110
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32060
32111
|
strictFlag: true,
|
|
32061
32112
|
category: ts.Diagnostics.Type_Checking,
|
|
32062
32113
|
description: ts.Diagnostics.When_type_checking_take_into_account_null_and_undefined,
|
|
@@ -32065,6 +32116,8 @@ var ts;
|
|
|
32065
32116
|
{
|
|
32066
32117
|
name: "strictFunctionTypes",
|
|
32067
32118
|
type: "boolean",
|
|
32119
|
+
affectsSemanticDiagnostics: true,
|
|
32120
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32068
32121
|
strictFlag: true,
|
|
32069
32122
|
category: ts.Diagnostics.Type_Checking,
|
|
32070
32123
|
description: ts.Diagnostics.When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible,
|
|
@@ -32073,6 +32126,8 @@ var ts;
|
|
|
32073
32126
|
{
|
|
32074
32127
|
name: "strictBindCallApply",
|
|
32075
32128
|
type: "boolean",
|
|
32129
|
+
affectsSemanticDiagnostics: true,
|
|
32130
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32076
32131
|
strictFlag: true,
|
|
32077
32132
|
category: ts.Diagnostics.Type_Checking,
|
|
32078
32133
|
description: ts.Diagnostics.Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function,
|
|
@@ -32082,6 +32137,7 @@ var ts;
|
|
|
32082
32137
|
name: "strictPropertyInitialization",
|
|
32083
32138
|
type: "boolean",
|
|
32084
32139
|
affectsSemanticDiagnostics: true,
|
|
32140
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32085
32141
|
strictFlag: true,
|
|
32086
32142
|
category: ts.Diagnostics.Type_Checking,
|
|
32087
32143
|
description: ts.Diagnostics.Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor,
|
|
@@ -32091,6 +32147,7 @@ var ts;
|
|
|
32091
32147
|
name: "noImplicitThis",
|
|
32092
32148
|
type: "boolean",
|
|
32093
32149
|
affectsSemanticDiagnostics: true,
|
|
32150
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32094
32151
|
strictFlag: true,
|
|
32095
32152
|
category: ts.Diagnostics.Type_Checking,
|
|
32096
32153
|
description: ts.Diagnostics.Enable_error_reporting_when_this_is_given_the_type_any,
|
|
@@ -32100,6 +32157,7 @@ var ts;
|
|
|
32100
32157
|
name: "useUnknownInCatchVariables",
|
|
32101
32158
|
type: "boolean",
|
|
32102
32159
|
affectsSemanticDiagnostics: true,
|
|
32160
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32103
32161
|
strictFlag: true,
|
|
32104
32162
|
category: ts.Diagnostics.Type_Checking,
|
|
32105
32163
|
description: ts.Diagnostics.Default_catch_clause_variables_as_unknown_instead_of_any,
|
|
@@ -32109,6 +32167,8 @@ var ts;
|
|
|
32109
32167
|
name: "alwaysStrict",
|
|
32110
32168
|
type: "boolean",
|
|
32111
32169
|
affectsSourceFile: true,
|
|
32170
|
+
affectsEmit: true,
|
|
32171
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32112
32172
|
strictFlag: true,
|
|
32113
32173
|
category: ts.Diagnostics.Type_Checking,
|
|
32114
32174
|
description: ts.Diagnostics.Ensure_use_strict_is_always_emitted,
|
|
@@ -32118,6 +32178,7 @@ var ts;
|
|
|
32118
32178
|
name: "noUnusedLocals",
|
|
32119
32179
|
type: "boolean",
|
|
32120
32180
|
affectsSemanticDiagnostics: true,
|
|
32181
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32121
32182
|
category: ts.Diagnostics.Type_Checking,
|
|
32122
32183
|
description: ts.Diagnostics.Enable_error_reporting_when_local_variables_aren_t_read,
|
|
32123
32184
|
defaultValueDescription: false,
|
|
@@ -32126,6 +32187,7 @@ var ts;
|
|
|
32126
32187
|
name: "noUnusedParameters",
|
|
32127
32188
|
type: "boolean",
|
|
32128
32189
|
affectsSemanticDiagnostics: true,
|
|
32190
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32129
32191
|
category: ts.Diagnostics.Type_Checking,
|
|
32130
32192
|
description: ts.Diagnostics.Raise_an_error_when_a_function_parameter_isn_t_read,
|
|
32131
32193
|
defaultValueDescription: false,
|
|
@@ -32134,6 +32196,7 @@ var ts;
|
|
|
32134
32196
|
name: "exactOptionalPropertyTypes",
|
|
32135
32197
|
type: "boolean",
|
|
32136
32198
|
affectsSemanticDiagnostics: true,
|
|
32199
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32137
32200
|
category: ts.Diagnostics.Type_Checking,
|
|
32138
32201
|
description: ts.Diagnostics.Interpret_optional_property_types_as_written_rather_than_adding_undefined,
|
|
32139
32202
|
defaultValueDescription: false,
|
|
@@ -32142,6 +32205,7 @@ var ts;
|
|
|
32142
32205
|
name: "noImplicitReturns",
|
|
32143
32206
|
type: "boolean",
|
|
32144
32207
|
affectsSemanticDiagnostics: true,
|
|
32208
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32145
32209
|
category: ts.Diagnostics.Type_Checking,
|
|
32146
32210
|
description: ts.Diagnostics.Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function,
|
|
32147
32211
|
defaultValueDescription: false,
|
|
@@ -32151,6 +32215,7 @@ var ts;
|
|
|
32151
32215
|
type: "boolean",
|
|
32152
32216
|
affectsBindDiagnostics: true,
|
|
32153
32217
|
affectsSemanticDiagnostics: true,
|
|
32218
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32154
32219
|
category: ts.Diagnostics.Type_Checking,
|
|
32155
32220
|
description: ts.Diagnostics.Enable_error_reporting_for_fallthrough_cases_in_switch_statements,
|
|
32156
32221
|
defaultValueDescription: false,
|
|
@@ -32159,6 +32224,7 @@ var ts;
|
|
|
32159
32224
|
name: "noUncheckedIndexedAccess",
|
|
32160
32225
|
type: "boolean",
|
|
32161
32226
|
affectsSemanticDiagnostics: true,
|
|
32227
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32162
32228
|
category: ts.Diagnostics.Type_Checking,
|
|
32163
32229
|
description: ts.Diagnostics.Add_undefined_to_a_type_when_accessed_using_an_index,
|
|
32164
32230
|
defaultValueDescription: false,
|
|
@@ -32167,6 +32233,7 @@ var ts;
|
|
|
32167
32233
|
name: "noImplicitOverride",
|
|
32168
32234
|
type: "boolean",
|
|
32169
32235
|
affectsSemanticDiagnostics: true,
|
|
32236
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32170
32237
|
category: ts.Diagnostics.Type_Checking,
|
|
32171
32238
|
description: ts.Diagnostics.Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier,
|
|
32172
32239
|
defaultValueDescription: false,
|
|
@@ -32174,6 +32241,8 @@ var ts;
|
|
|
32174
32241
|
{
|
|
32175
32242
|
name: "noPropertyAccessFromIndexSignature",
|
|
32176
32243
|
type: "boolean",
|
|
32244
|
+
affectsSemanticDiagnostics: true,
|
|
32245
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32177
32246
|
showInSimplifiedHelpView: false,
|
|
32178
32247
|
category: ts.Diagnostics.Type_Checking,
|
|
32179
32248
|
description: ts.Diagnostics.Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type,
|
|
@@ -32254,6 +32323,7 @@ var ts;
|
|
|
32254
32323
|
name: "allowSyntheticDefaultImports",
|
|
32255
32324
|
type: "boolean",
|
|
32256
32325
|
affectsSemanticDiagnostics: true,
|
|
32326
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32257
32327
|
category: ts.Diagnostics.Interop_Constraints,
|
|
32258
32328
|
description: ts.Diagnostics.Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export,
|
|
32259
32329
|
defaultValueDescription: ts.Diagnostics.module_system_or_esModuleInterop
|
|
@@ -32263,6 +32333,7 @@ var ts;
|
|
|
32263
32333
|
type: "boolean",
|
|
32264
32334
|
affectsSemanticDiagnostics: true,
|
|
32265
32335
|
affectsEmit: true,
|
|
32336
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32266
32337
|
showInSimplifiedHelpView: true,
|
|
32267
32338
|
category: ts.Diagnostics.Interop_Constraints,
|
|
32268
32339
|
description: ts.Diagnostics.Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility,
|
|
@@ -32279,6 +32350,7 @@ var ts;
|
|
|
32279
32350
|
name: "allowUmdGlobalAccess",
|
|
32280
32351
|
type: "boolean",
|
|
32281
32352
|
affectsSemanticDiagnostics: true,
|
|
32353
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32282
32354
|
category: ts.Diagnostics.Modules,
|
|
32283
32355
|
description: ts.Diagnostics.Allow_accessing_UMD_globals_from_modules,
|
|
32284
32356
|
defaultValueDescription: false,
|
|
@@ -32299,6 +32371,7 @@ var ts;
|
|
|
32299
32371
|
name: "sourceRoot",
|
|
32300
32372
|
type: "string",
|
|
32301
32373
|
affectsEmit: true,
|
|
32374
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32302
32375
|
paramType: ts.Diagnostics.LOCATION,
|
|
32303
32376
|
category: ts.Diagnostics.Emit,
|
|
32304
32377
|
description: ts.Diagnostics.Specify_the_root_path_for_debuggers_to_find_the_reference_source_code,
|
|
@@ -32307,6 +32380,7 @@ var ts;
|
|
|
32307
32380
|
name: "mapRoot",
|
|
32308
32381
|
type: "string",
|
|
32309
32382
|
affectsEmit: true,
|
|
32383
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32310
32384
|
paramType: ts.Diagnostics.LOCATION,
|
|
32311
32385
|
category: ts.Diagnostics.Emit,
|
|
32312
32386
|
description: ts.Diagnostics.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations,
|
|
@@ -32315,6 +32389,7 @@ var ts;
|
|
|
32315
32389
|
name: "inlineSourceMap",
|
|
32316
32390
|
type: "boolean",
|
|
32317
32391
|
affectsEmit: true,
|
|
32392
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32318
32393
|
category: ts.Diagnostics.Emit,
|
|
32319
32394
|
description: ts.Diagnostics.Include_sourcemap_files_inside_the_emitted_JavaScript,
|
|
32320
32395
|
defaultValueDescription: false,
|
|
@@ -32323,6 +32398,7 @@ var ts;
|
|
|
32323
32398
|
name: "inlineSources",
|
|
32324
32399
|
type: "boolean",
|
|
32325
32400
|
affectsEmit: true,
|
|
32401
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32326
32402
|
category: ts.Diagnostics.Emit,
|
|
32327
32403
|
description: ts.Diagnostics.Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript,
|
|
32328
32404
|
defaultValueDescription: false,
|
|
@@ -32331,6 +32407,7 @@ var ts;
|
|
|
32331
32407
|
name: "experimentalDecorators",
|
|
32332
32408
|
type: "boolean",
|
|
32333
32409
|
affectsSemanticDiagnostics: true,
|
|
32410
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32334
32411
|
category: ts.Diagnostics.Language_and_Environment,
|
|
32335
32412
|
description: ts.Diagnostics.Enable_experimental_support_for_TC39_stage_2_draft_decorators,
|
|
32336
32413
|
defaultValueDescription: false,
|
|
@@ -32340,6 +32417,7 @@ var ts;
|
|
|
32340
32417
|
type: "boolean",
|
|
32341
32418
|
affectsSemanticDiagnostics: true,
|
|
32342
32419
|
affectsEmit: true,
|
|
32420
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32343
32421
|
category: ts.Diagnostics.Language_and_Environment,
|
|
32344
32422
|
description: ts.Diagnostics.Emit_design_type_metadata_for_decorated_declarations_in_source_files,
|
|
32345
32423
|
defaultValueDescription: false,
|
|
@@ -32363,6 +32441,7 @@ var ts;
|
|
|
32363
32441
|
type: "string",
|
|
32364
32442
|
affectsSemanticDiagnostics: true,
|
|
32365
32443
|
affectsEmit: true,
|
|
32444
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32366
32445
|
affectsModuleResolution: true,
|
|
32367
32446
|
category: ts.Diagnostics.Language_and_Environment,
|
|
32368
32447
|
description: ts.Diagnostics.Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk,
|
|
@@ -32380,6 +32459,9 @@ var ts;
|
|
|
32380
32459
|
name: "out",
|
|
32381
32460
|
type: "string",
|
|
32382
32461
|
affectsEmit: true,
|
|
32462
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32463
|
+
affectsDeclarationPath: true,
|
|
32464
|
+
affectsBundleEmitBuildInfo: true,
|
|
32383
32465
|
isFilePath: false,
|
|
32384
32466
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
32385
32467
|
paramType: ts.Diagnostics.FILE,
|
|
@@ -32390,6 +32472,7 @@ var ts;
|
|
|
32390
32472
|
name: "reactNamespace",
|
|
32391
32473
|
type: "string",
|
|
32392
32474
|
affectsEmit: true,
|
|
32475
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32393
32476
|
category: ts.Diagnostics.Language_and_Environment,
|
|
32394
32477
|
description: ts.Diagnostics.Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit,
|
|
32395
32478
|
defaultValueDescription: "`React`",
|
|
@@ -32397,6 +32480,7 @@ var ts;
|
|
|
32397
32480
|
{
|
|
32398
32481
|
name: "skipDefaultLibCheck",
|
|
32399
32482
|
type: "boolean",
|
|
32483
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32400
32484
|
category: ts.Diagnostics.Completeness,
|
|
32401
32485
|
description: ts.Diagnostics.Skip_type_checking_d_ts_files_that_are_included_with_TypeScript,
|
|
32402
32486
|
defaultValueDescription: false,
|
|
@@ -32412,6 +32496,7 @@ var ts;
|
|
|
32412
32496
|
name: "emitBOM",
|
|
32413
32497
|
type: "boolean",
|
|
32414
32498
|
affectsEmit: true,
|
|
32499
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32415
32500
|
category: ts.Diagnostics.Emit,
|
|
32416
32501
|
description: ts.Diagnostics.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files,
|
|
32417
32502
|
defaultValueDescription: false,
|
|
@@ -32423,6 +32508,7 @@ var ts;
|
|
|
32423
32508
|
lf: 1
|
|
32424
32509
|
})),
|
|
32425
32510
|
affectsEmit: true,
|
|
32511
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32426
32512
|
paramType: ts.Diagnostics.NEWLINE,
|
|
32427
32513
|
category: ts.Diagnostics.Emit,
|
|
32428
32514
|
description: ts.Diagnostics.Set_the_newline_character_for_emitting_files,
|
|
@@ -32432,6 +32518,7 @@ var ts;
|
|
|
32432
32518
|
name: "noErrorTruncation",
|
|
32433
32519
|
type: "boolean",
|
|
32434
32520
|
affectsSemanticDiagnostics: true,
|
|
32521
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32435
32522
|
category: ts.Diagnostics.Output_Formatting,
|
|
32436
32523
|
description: ts.Diagnostics.Disable_truncating_types_in_error_messages,
|
|
32437
32524
|
defaultValueDescription: false,
|
|
@@ -32458,6 +32545,7 @@ var ts;
|
|
|
32458
32545
|
name: "stripInternal",
|
|
32459
32546
|
type: "boolean",
|
|
32460
32547
|
affectsEmit: true,
|
|
32548
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32461
32549
|
category: ts.Diagnostics.Emit,
|
|
32462
32550
|
description: ts.Diagnostics.Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments,
|
|
32463
32551
|
defaultValueDescription: false,
|
|
@@ -32498,6 +32586,7 @@ var ts;
|
|
|
32498
32586
|
name: "noImplicitUseStrict",
|
|
32499
32587
|
type: "boolean",
|
|
32500
32588
|
affectsSemanticDiagnostics: true,
|
|
32589
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32501
32590
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
32502
32591
|
description: ts.Diagnostics.Disable_adding_use_strict_directives_in_emitted_JavaScript_files,
|
|
32503
32592
|
defaultValueDescription: false,
|
|
@@ -32506,6 +32595,7 @@ var ts;
|
|
|
32506
32595
|
name: "noEmitHelpers",
|
|
32507
32596
|
type: "boolean",
|
|
32508
32597
|
affectsEmit: true,
|
|
32598
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32509
32599
|
category: ts.Diagnostics.Emit,
|
|
32510
32600
|
description: ts.Diagnostics.Disable_generating_custom_helper_functions_like_extends_in_compiled_output,
|
|
32511
32601
|
defaultValueDescription: false,
|
|
@@ -32514,6 +32604,7 @@ var ts;
|
|
|
32514
32604
|
name: "noEmitOnError",
|
|
32515
32605
|
type: "boolean",
|
|
32516
32606
|
affectsEmit: true,
|
|
32607
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32517
32608
|
category: ts.Diagnostics.Emit,
|
|
32518
32609
|
transpileOptionValue: undefined,
|
|
32519
32610
|
description: ts.Diagnostics.Disable_emitting_files_if_any_type_checking_errors_are_reported,
|
|
@@ -32523,6 +32614,7 @@ var ts;
|
|
|
32523
32614
|
name: "preserveConstEnums",
|
|
32524
32615
|
type: "boolean",
|
|
32525
32616
|
affectsEmit: true,
|
|
32617
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32526
32618
|
category: ts.Diagnostics.Emit,
|
|
32527
32619
|
description: ts.Diagnostics.Disable_erasing_const_enum_declarations_in_generated_code,
|
|
32528
32620
|
defaultValueDescription: false,
|
|
@@ -32531,6 +32623,8 @@ var ts;
|
|
|
32531
32623
|
name: "declarationDir",
|
|
32532
32624
|
type: "string",
|
|
32533
32625
|
affectsEmit: true,
|
|
32626
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32627
|
+
affectsDeclarationPath: true,
|
|
32534
32628
|
isFilePath: true,
|
|
32535
32629
|
paramType: ts.Diagnostics.DIRECTORY,
|
|
32536
32630
|
category: ts.Diagnostics.Emit,
|
|
@@ -32540,6 +32634,7 @@ var ts;
|
|
|
32540
32634
|
{
|
|
32541
32635
|
name: "skipLibCheck",
|
|
32542
32636
|
type: "boolean",
|
|
32637
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32543
32638
|
category: ts.Diagnostics.Completeness,
|
|
32544
32639
|
description: ts.Diagnostics.Skip_type_checking_all_d_ts_files,
|
|
32545
32640
|
defaultValueDescription: false,
|
|
@@ -32549,6 +32644,7 @@ var ts;
|
|
|
32549
32644
|
type: "boolean",
|
|
32550
32645
|
affectsBindDiagnostics: true,
|
|
32551
32646
|
affectsSemanticDiagnostics: true,
|
|
32647
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32552
32648
|
category: ts.Diagnostics.Type_Checking,
|
|
32553
32649
|
description: ts.Diagnostics.Disable_error_reporting_for_unused_labels,
|
|
32554
32650
|
defaultValueDescription: undefined,
|
|
@@ -32558,6 +32654,7 @@ var ts;
|
|
|
32558
32654
|
type: "boolean",
|
|
32559
32655
|
affectsBindDiagnostics: true,
|
|
32560
32656
|
affectsSemanticDiagnostics: true,
|
|
32657
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32561
32658
|
category: ts.Diagnostics.Type_Checking,
|
|
32562
32659
|
description: ts.Diagnostics.Disable_error_reporting_for_unreachable_code,
|
|
32563
32660
|
defaultValueDescription: undefined,
|
|
@@ -32566,6 +32663,7 @@ var ts;
|
|
|
32566
32663
|
name: "suppressExcessPropertyErrors",
|
|
32567
32664
|
type: "boolean",
|
|
32568
32665
|
affectsSemanticDiagnostics: true,
|
|
32666
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32569
32667
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
32570
32668
|
description: ts.Diagnostics.Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals,
|
|
32571
32669
|
defaultValueDescription: false,
|
|
@@ -32574,6 +32672,7 @@ var ts;
|
|
|
32574
32672
|
name: "suppressImplicitAnyIndexErrors",
|
|
32575
32673
|
type: "boolean",
|
|
32576
32674
|
affectsSemanticDiagnostics: true,
|
|
32675
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32577
32676
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
32578
32677
|
description: ts.Diagnostics.Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures,
|
|
32579
32678
|
defaultValueDescription: false,
|
|
@@ -32598,6 +32697,7 @@ var ts;
|
|
|
32598
32697
|
name: "noStrictGenericChecks",
|
|
32599
32698
|
type: "boolean",
|
|
32600
32699
|
affectsSemanticDiagnostics: true,
|
|
32700
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32601
32701
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
32602
32702
|
description: ts.Diagnostics.Disable_strict_checking_of_generic_signatures_in_function_types,
|
|
32603
32703
|
defaultValueDescription: false,
|
|
@@ -32607,6 +32707,7 @@ var ts;
|
|
|
32607
32707
|
type: "boolean",
|
|
32608
32708
|
affectsSemanticDiagnostics: true,
|
|
32609
32709
|
affectsEmit: true,
|
|
32710
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32610
32711
|
category: ts.Diagnostics.Language_and_Environment,
|
|
32611
32712
|
description: ts.Diagnostics.Emit_ECMAScript_standard_compliant_class_fields,
|
|
32612
32713
|
defaultValueDescription: ts.Diagnostics.true_for_ES2022_and_above_including_ESNext
|
|
@@ -32615,6 +32716,7 @@ var ts;
|
|
|
32615
32716
|
name: "preserveValueImports",
|
|
32616
32717
|
type: "boolean",
|
|
32617
32718
|
affectsEmit: true,
|
|
32719
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32618
32720
|
category: ts.Diagnostics.Emit,
|
|
32619
32721
|
description: ts.Diagnostics.Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed,
|
|
32620
32722
|
defaultValueDescription: false,
|
|
@@ -32653,6 +32755,7 @@ var ts;
|
|
|
32653
32755
|
ts.optionDeclarations = __spreadArray(__spreadArray([], ts.commonOptionsWithBuild, true), commandOptionsWithoutBuild, true);
|
|
32654
32756
|
ts.semanticDiagnosticsOptionDeclarations = ts.optionDeclarations.filter(function (option) { return !!option.affectsSemanticDiagnostics; });
|
|
32655
32757
|
ts.affectsEmitOptionDeclarations = ts.optionDeclarations.filter(function (option) { return !!option.affectsEmit; });
|
|
32758
|
+
ts.affectsDeclarationPathOptionDeclarations = ts.optionDeclarations.filter(function (option) { return !!option.affectsDeclarationPath; });
|
|
32656
32759
|
ts.moduleResolutionOptionDeclarations = ts.optionDeclarations.filter(function (option) { return !!option.affectsModuleResolution; });
|
|
32657
32760
|
ts.sourceFileAffectingCompilerOptions = ts.optionDeclarations.filter(function (option) {
|
|
32658
32761
|
return !!option.affectsSourceFile || !!option.affectsModuleResolution || !!option.affectsBindDiagnostics;
|
|
@@ -32692,7 +32795,14 @@ var ts;
|
|
|
32692
32795
|
description: ts.Diagnostics.Delete_the_outputs_of_all_projects,
|
|
32693
32796
|
type: "boolean",
|
|
32694
32797
|
defaultValueDescription: false,
|
|
32695
|
-
}
|
|
32798
|
+
},
|
|
32799
|
+
{
|
|
32800
|
+
name: "solutionDiagnostics",
|
|
32801
|
+
type: "boolean",
|
|
32802
|
+
category: ts.Diagnostics.Compiler_Diagnostics,
|
|
32803
|
+
description: ts.Diagnostics.Output_more_detailed_solution_performance_information_after_building,
|
|
32804
|
+
defaultValueDescription: false,
|
|
32805
|
+
},
|
|
32696
32806
|
];
|
|
32697
32807
|
ts.buildOpts = __spreadArray(__spreadArray([], ts.commonOptionsWithBuild, true), ts.optionsForBuild, true);
|
|
32698
32808
|
ts.typeAcquisitionDeclarations = [
|
|
@@ -33432,6 +33542,7 @@ var ts;
|
|
|
33432
33542
|
}
|
|
33433
33543
|
});
|
|
33434
33544
|
}
|
|
33545
|
+
ts.getNameOfCompilerOptionValue = getNameOfCompilerOptionValue;
|
|
33435
33546
|
function serializeCompilerOptions(options, pathOptions) {
|
|
33436
33547
|
return serializeOptionBaseObject(options, getOptionsNameMap(), pathOptions);
|
|
33437
33548
|
}
|
|
@@ -36117,8 +36228,7 @@ var ts;
|
|
|
36117
36228
|
var pathAndExtension = loadModuleFromFile(extensions, candidate, onlyRecordFailures, state) ||
|
|
36118
36229
|
loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageInfo && packageInfo.packageJsonContent, packageInfo && packageInfo.versionPaths);
|
|
36119
36230
|
if (!pathAndExtension && packageInfo
|
|
36120
|
-
&& packageInfo.packageJsonContent.exports === undefined
|
|
36121
|
-
&& packageInfo.packageJsonContent.main === undefined
|
|
36231
|
+
&& (packageInfo.packageJsonContent.exports === undefined || packageInfo.packageJsonContent.exports === null)
|
|
36122
36232
|
&& state.features & NodeResolutionFeatures.EsmMode) {
|
|
36123
36233
|
pathAndExtension = loadModuleFromFile(extensions, ts.combinePaths(candidate, "index.js"), onlyRecordFailures, state);
|
|
36124
36234
|
}
|
|
@@ -41042,7 +41152,12 @@ var ts;
|
|
|
41042
41152
|
function checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) {
|
|
41043
41153
|
if (meaning & (111551 & ~1024)) {
|
|
41044
41154
|
if (isPrimitiveTypeName(name)) {
|
|
41045
|
-
|
|
41155
|
+
if (isExtendedByInterface(errorLocation)) {
|
|
41156
|
+
error(errorLocation, ts.Diagnostics.An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_classes, ts.unescapeLeadingUnderscores(name));
|
|
41157
|
+
}
|
|
41158
|
+
else {
|
|
41159
|
+
error(errorLocation, ts.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, ts.unescapeLeadingUnderscores(name));
|
|
41160
|
+
}
|
|
41046
41161
|
return true;
|
|
41047
41162
|
}
|
|
41048
41163
|
var symbol = resolveSymbol(resolveName(errorLocation, name, 788968 & ~111551, undefined, undefined, false));
|
|
@@ -41062,6 +41177,16 @@ var ts;
|
|
|
41062
41177
|
}
|
|
41063
41178
|
return false;
|
|
41064
41179
|
}
|
|
41180
|
+
function isExtendedByInterface(node) {
|
|
41181
|
+
var grandparent = node.parent.parent;
|
|
41182
|
+
var parentOfGrandparent = grandparent.parent;
|
|
41183
|
+
if (grandparent && parentOfGrandparent) {
|
|
41184
|
+
var isExtending = ts.isHeritageClause(grandparent) && grandparent.token === 94;
|
|
41185
|
+
var isInterface = ts.isInterfaceDeclaration(parentOfGrandparent);
|
|
41186
|
+
return isExtending && isInterface;
|
|
41187
|
+
}
|
|
41188
|
+
return false;
|
|
41189
|
+
}
|
|
41065
41190
|
function maybeMappedType(node, symbol) {
|
|
41066
41191
|
var container = ts.findAncestor(node.parent, function (n) {
|
|
41067
41192
|
return ts.isComputedPropertyName(n) || ts.isPropertySignature(n) ? false : ts.isTypeLiteralNode(n) || "quit";
|
|
@@ -43588,7 +43713,7 @@ var ts;
|
|
|
43588
43713
|
anyType : getNonMissingTypeOfSymbol(propertySymbol);
|
|
43589
43714
|
var saveEnclosingDeclaration = context.enclosingDeclaration;
|
|
43590
43715
|
context.enclosingDeclaration = undefined;
|
|
43591
|
-
if (context.tracker.trackSymbol &&
|
|
43716
|
+
if (context.tracker.trackSymbol && isLateBoundName(propertySymbol.escapedName)) {
|
|
43592
43717
|
if (propertySymbol.declarations) {
|
|
43593
43718
|
var decl = ts.first(propertySymbol.declarations);
|
|
43594
43719
|
if (hasLateBindableName(decl)) {
|
|
@@ -45043,7 +45168,7 @@ var ts;
|
|
|
45043
45168
|
? getBaseConstructorTypeOfClass(staticType)
|
|
45044
45169
|
: anyType;
|
|
45045
45170
|
var heritageClauses = __spreadArray(__spreadArray([], !ts.length(baseTypes) ? [] : [ts.factory.createHeritageClause(94, ts.map(baseTypes, function (b) { return serializeBaseType(b, staticBaseType, localName); }))], true), !ts.length(implementsExpressions) ? [] : [ts.factory.createHeritageClause(117, implementsExpressions)], true);
|
|
45046
|
-
var symbolProps =
|
|
45171
|
+
var symbolProps = getNonInheritedProperties(classType, baseTypes, getPropertiesOfType(classType));
|
|
45047
45172
|
var publicSymbolProps = ts.filter(symbolProps, function (s) {
|
|
45048
45173
|
var valueDecl = s.valueDeclaration;
|
|
45049
45174
|
return !!valueDecl && !(ts.isNamedDeclaration(valueDecl) && ts.isPrivateIdentifier(valueDecl.name));
|
|
@@ -45957,7 +46082,7 @@ var ts;
|
|
|
45957
46082
|
return type;
|
|
45958
46083
|
}
|
|
45959
46084
|
if (ts.getEffectiveTypeAnnotationNode(ts.walkUpBindingElementsAndPatterns(declaration))) {
|
|
45960
|
-
return strictNullChecks && !(
|
|
46085
|
+
return strictNullChecks && !(getTypeFacts(checkDeclarationInitializer(declaration, 0)) & 16777216) ? getNonUndefinedType(type) : type;
|
|
45961
46086
|
}
|
|
45962
46087
|
return widenTypeInferredFromInitializer(declaration, getUnionType([getNonUndefinedType(type), checkDeclarationInitializer(declaration, 0)], 2));
|
|
45963
46088
|
}
|
|
@@ -48745,7 +48870,7 @@ var ts;
|
|
|
48745
48870
|
var objectType;
|
|
48746
48871
|
return !!(type.flags & 8388608 && ts.getObjectFlags(objectType = type.objectType) & 32 &&
|
|
48747
48872
|
!isGenericMappedType(objectType) && isGenericIndexType(type.indexType) &&
|
|
48748
|
-
!objectType
|
|
48873
|
+
!(getMappedTypeModifiers(objectType) & 8) && !objectType.declaration.nameType);
|
|
48749
48874
|
}
|
|
48750
48875
|
function getApparentType(type) {
|
|
48751
48876
|
var t = !(type.flags & 465829888) ? type : getBaseConstraintOfType(type) || unknownType;
|
|
@@ -53444,7 +53569,7 @@ var ts;
|
|
|
53444
53569
|
var sourceSig = checkMode & 3 ? undefined : getSingleCallSignature(getNonNullableType(sourceType));
|
|
53445
53570
|
var targetSig = checkMode & 3 ? undefined : getSingleCallSignature(getNonNullableType(targetType));
|
|
53446
53571
|
var callbacks = sourceSig && targetSig && !getTypePredicateOfSignature(sourceSig) && !getTypePredicateOfSignature(targetSig) &&
|
|
53447
|
-
(
|
|
53572
|
+
(getTypeFacts(sourceType) & 50331648) === (getTypeFacts(targetType) & 50331648);
|
|
53448
53573
|
var related = callbacks ?
|
|
53449
53574
|
compareSignaturesRelated(targetSig, sourceSig, (checkMode & 8) | (strictVariance ? 2 : 1), reportErrors, errorReporter, incompatibleErrorReporter, compareTypes, reportUnreliableMarkers) :
|
|
53450
53575
|
!(checkMode & 3) && !strictVariance && compareTypes(sourceType, targetType, false) || compareTypes(targetType, sourceType, reportErrors);
|
|
@@ -56201,27 +56326,8 @@ var ts;
|
|
|
56201
56326
|
var value = _a.value;
|
|
56202
56327
|
return value.base10Value === "0";
|
|
56203
56328
|
}
|
|
56204
|
-
function getFalsyFlagsOfTypes(types) {
|
|
56205
|
-
var result = 0;
|
|
56206
|
-
for (var _i = 0, types_14 = types; _i < types_14.length; _i++) {
|
|
56207
|
-
var t = types_14[_i];
|
|
56208
|
-
result |= getFalsyFlags(t);
|
|
56209
|
-
}
|
|
56210
|
-
return result;
|
|
56211
|
-
}
|
|
56212
|
-
function getFalsyFlags(type) {
|
|
56213
|
-
var t = type.flags & 2097152 ? getBaseConstraintOrType(type) : type;
|
|
56214
|
-
return t.flags & 1048576 ? getFalsyFlagsOfTypes(t.types) :
|
|
56215
|
-
t.flags & 128 ? t.value === "" ? 128 : 0 :
|
|
56216
|
-
t.flags & 256 ? t.value === 0 ? 256 : 0 :
|
|
56217
|
-
t.flags & 2048 ? isZeroBigInt(t) ? 2048 : 0 :
|
|
56218
|
-
t.flags & 512 ? (t === falseType || t === regularFalseType) ? 512 : 0 :
|
|
56219
|
-
t.flags & 117724;
|
|
56220
|
-
}
|
|
56221
56329
|
function removeDefinitelyFalsyTypes(type) {
|
|
56222
|
-
return
|
|
56223
|
-
filterType(type, function (t) { return !(getFalsyFlags(t) & 117632); }) :
|
|
56224
|
-
type;
|
|
56330
|
+
return filterType(type, function (t) { return !!(getTypeFacts(t) & 4194304); });
|
|
56225
56331
|
}
|
|
56226
56332
|
function extractDefinitelyFalsyTypes(type) {
|
|
56227
56333
|
return mapType(type, getDefinitelyFalsyPartOfType);
|
|
@@ -56259,11 +56365,7 @@ var ts;
|
|
|
56259
56365
|
getIntersectionType([type, emptyObjectType]);
|
|
56260
56366
|
}
|
|
56261
56367
|
function getNonNullableType(type) {
|
|
56262
|
-
|
|
56263
|
-
var reducedType = getTypeWithFacts(type, 2097152);
|
|
56264
|
-
return maybeTypeOfKind(reducedType, 465829888) ? getGlobalNonNullableTypeInstantiation(reducedType) : reducedType;
|
|
56265
|
-
}
|
|
56266
|
-
return type;
|
|
56368
|
+
return strictNullChecks ? getAdjustedTypeWithFacts(type, 2097152) : type;
|
|
56267
56369
|
}
|
|
56268
56370
|
function addOptionalTypeMarker(type) {
|
|
56269
56371
|
return strictNullChecks ? getUnionType([type, optionalType]) : type;
|
|
@@ -57233,8 +57335,8 @@ var ts;
|
|
|
57233
57335
|
}
|
|
57234
57336
|
function getSingleTypeVariableFromIntersectionTypes(types) {
|
|
57235
57337
|
var typeVariable;
|
|
57236
|
-
for (var _i = 0,
|
|
57237
|
-
var type =
|
|
57338
|
+
for (var _i = 0, types_14 = types; _i < types_14.length; _i++) {
|
|
57339
|
+
var type = types_14[_i];
|
|
57238
57340
|
var t = type.flags & 2097152 && ts.find(type.types, function (t) { return !!getInferenceInfoForType(t); });
|
|
57239
57341
|
if (!t || typeVariable && t !== typeVariable) {
|
|
57240
57342
|
return undefined;
|
|
@@ -57894,8 +57996,8 @@ var ts;
|
|
|
57894
57996
|
}
|
|
57895
57997
|
}
|
|
57896
57998
|
};
|
|
57897
|
-
for (var _i = 0,
|
|
57898
|
-
var type =
|
|
57999
|
+
for (var _i = 0, types_15 = types; _i < types_15.length; _i++) {
|
|
58000
|
+
var type = types_15[_i];
|
|
57899
58001
|
var state_9 = _loop_24(type);
|
|
57900
58002
|
if (typeof state_9 === "object")
|
|
57901
58003
|
return state_9.value;
|
|
@@ -57994,14 +58096,16 @@ var ts;
|
|
|
57994
58096
|
return !!(resolved.callSignatures.length || resolved.constructSignatures.length ||
|
|
57995
58097
|
resolved.members.get("bind") && isTypeSubtypeOf(type, globalFunctionType));
|
|
57996
58098
|
}
|
|
57997
|
-
function getTypeFacts(type
|
|
57998
|
-
if (
|
|
58099
|
+
function getTypeFacts(type) {
|
|
58100
|
+
if (type.flags & (2097152 | 465829888)) {
|
|
58101
|
+
type = getBaseConstraintOfType(type) || unknownType;
|
|
58102
|
+
}
|
|
57999
58103
|
var flags = type.flags;
|
|
58000
|
-
if (flags & 4) {
|
|
58104
|
+
if (flags & (4 | 268435456)) {
|
|
58001
58105
|
return strictNullChecks ? 16317953 : 16776705;
|
|
58002
58106
|
}
|
|
58003
|
-
if (flags & 128) {
|
|
58004
|
-
var isEmpty = type.value === "";
|
|
58107
|
+
if (flags & (128 | 134217728)) {
|
|
58108
|
+
var isEmpty = flags & 128 && type.value === "";
|
|
58005
58109
|
return strictNullChecks ?
|
|
58006
58110
|
isEmpty ? 12123649 : 7929345 :
|
|
58007
58111
|
isEmpty ? 12582401 : 16776705;
|
|
@@ -58033,20 +58137,20 @@ var ts;
|
|
|
58033
58137
|
(type === falseType || type === regularFalseType) ? 12580616 : 16774920;
|
|
58034
58138
|
}
|
|
58035
58139
|
if (flags & 524288) {
|
|
58036
|
-
if (ignoreObjects) {
|
|
58037
|
-
return 16768959;
|
|
58038
|
-
}
|
|
58039
58140
|
return ts.getObjectFlags(type) & 16 && isEmptyObjectType(type) ?
|
|
58040
|
-
strictNullChecks ?
|
|
58141
|
+
strictNullChecks ? 83427327 : 83886079 :
|
|
58041
58142
|
isFunctionObjectType(type) ?
|
|
58042
58143
|
strictNullChecks ? 7880640 : 16728000 :
|
|
58043
58144
|
strictNullChecks ? 7888800 : 16736160;
|
|
58044
58145
|
}
|
|
58045
|
-
if (flags &
|
|
58146
|
+
if (flags & 16384) {
|
|
58046
58147
|
return 9830144;
|
|
58047
58148
|
}
|
|
58149
|
+
if (flags & 32768) {
|
|
58150
|
+
return 26607360;
|
|
58151
|
+
}
|
|
58048
58152
|
if (flags & 65536) {
|
|
58049
|
-
return
|
|
58153
|
+
return 42917664;
|
|
58050
58154
|
}
|
|
58051
58155
|
if (flags & 12288) {
|
|
58052
58156
|
return strictNullChecks ? 7925520 : 16772880;
|
|
@@ -58057,34 +58161,32 @@ var ts;
|
|
|
58057
58161
|
if (flags & 131072) {
|
|
58058
58162
|
return 0;
|
|
58059
58163
|
}
|
|
58060
|
-
if (flags & 465829888) {
|
|
58061
|
-
return !isPatternLiteralType(type) ? getTypeFacts(getBaseConstraintOfType(type) || unknownType, ignoreObjects) :
|
|
58062
|
-
strictNullChecks ? 7929345 : 16776705;
|
|
58063
|
-
}
|
|
58064
58164
|
if (flags & 1048576) {
|
|
58065
|
-
return ts.reduceLeft(type.types, function (facts, t) { return facts | getTypeFacts(t
|
|
58165
|
+
return ts.reduceLeft(type.types, function (facts, t) { return facts | getTypeFacts(t); }, 0);
|
|
58066
58166
|
}
|
|
58067
58167
|
if (flags & 2097152) {
|
|
58068
|
-
|
|
58069
|
-
return getIntersectionTypeFacts(type, ignoreObjects);
|
|
58168
|
+
return getIntersectionTypeFacts(type);
|
|
58070
58169
|
}
|
|
58071
|
-
return
|
|
58170
|
+
return 83886079;
|
|
58072
58171
|
}
|
|
58073
|
-
function getIntersectionTypeFacts(type
|
|
58172
|
+
function getIntersectionTypeFacts(type) {
|
|
58173
|
+
var ignoreObjects = maybeTypeOfKind(type, 131068);
|
|
58074
58174
|
var oredFacts = 0;
|
|
58075
|
-
var andedFacts =
|
|
58175
|
+
var andedFacts = 134217727;
|
|
58076
58176
|
for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
|
|
58077
58177
|
var t = _a[_i];
|
|
58078
|
-
|
|
58079
|
-
|
|
58080
|
-
|
|
58178
|
+
if (!(ignoreObjects && t.flags & 524288)) {
|
|
58179
|
+
var f = getTypeFacts(t);
|
|
58180
|
+
oredFacts |= f;
|
|
58181
|
+
andedFacts &= f;
|
|
58182
|
+
}
|
|
58081
58183
|
}
|
|
58082
|
-
return oredFacts & 8256 | andedFacts &
|
|
58184
|
+
return oredFacts & 8256 | andedFacts & 134209471;
|
|
58083
58185
|
}
|
|
58084
58186
|
function getTypeWithFacts(type, include) {
|
|
58085
58187
|
return filterType(type, function (t) { return (getTypeFacts(t) & include) !== 0; });
|
|
58086
58188
|
}
|
|
58087
|
-
function
|
|
58189
|
+
function getAdjustedTypeWithFacts(type, facts) {
|
|
58088
58190
|
var reduced = recombineUnknownType(getTypeWithFacts(strictNullChecks && type.flags & 2 ? unknownUnionType : type, facts));
|
|
58089
58191
|
if (strictNullChecks) {
|
|
58090
58192
|
switch (facts) {
|
|
@@ -58342,8 +58444,8 @@ var ts;
|
|
|
58342
58444
|
var types = origin && origin.flags & 1048576 ? origin.types : type.types;
|
|
58343
58445
|
var mappedTypes;
|
|
58344
58446
|
var changed = false;
|
|
58345
|
-
for (var _i = 0,
|
|
58346
|
-
var t =
|
|
58447
|
+
for (var _i = 0, types_16 = types; _i < types_16.length; _i++) {
|
|
58448
|
+
var t = types_16[_i];
|
|
58347
58449
|
var mapped = t.flags & 1048576 ? mapType(t, mapper, noReductions) : mapper(t);
|
|
58348
58450
|
changed || (changed = t !== mapped);
|
|
58349
58451
|
if (mapped) {
|
|
@@ -58416,8 +58518,8 @@ var ts;
|
|
|
58416
58518
|
}
|
|
58417
58519
|
function isEvolvingArrayTypeList(types) {
|
|
58418
58520
|
var hasEvolvingArrayType = false;
|
|
58419
|
-
for (var _i = 0,
|
|
58420
|
-
var t =
|
|
58521
|
+
for (var _i = 0, types_17 = types; _i < types_17.length; _i++) {
|
|
58522
|
+
var t = types_17[_i];
|
|
58421
58523
|
if (!(t.flags & 131072)) {
|
|
58422
58524
|
if (!(ts.getObjectFlags(t) & 256)) {
|
|
58423
58525
|
return false;
|
|
@@ -59138,10 +59240,10 @@ var ts;
|
|
|
59138
59240
|
}
|
|
59139
59241
|
function narrowTypeByTruthiness(type, expr, assumeTrue) {
|
|
59140
59242
|
if (isMatchingReference(reference, expr)) {
|
|
59141
|
-
return
|
|
59243
|
+
return getAdjustedTypeWithFacts(type, assumeTrue ? 4194304 : 8388608);
|
|
59142
59244
|
}
|
|
59143
59245
|
if (strictNullChecks && assumeTrue && optionalChainContainsReference(expr, reference)) {
|
|
59144
|
-
type =
|
|
59246
|
+
type = getAdjustedTypeWithFacts(type, 2097152);
|
|
59145
59247
|
}
|
|
59146
59248
|
var access = getDiscriminantPropertyAccess(expr, type);
|
|
59147
59249
|
if (access) {
|
|
@@ -59268,7 +59370,7 @@ var ts;
|
|
|
59268
59370
|
var valueType = getTypeOfExpression(value);
|
|
59269
59371
|
var removeNullable = equalsOperator !== assumeTrue && everyType(valueType, function (t) { return !!(t.flags & nullableFlags); }) ||
|
|
59270
59372
|
equalsOperator === assumeTrue && everyType(valueType, function (t) { return !(t.flags & (3 | nullableFlags)); });
|
|
59271
|
-
return removeNullable ?
|
|
59373
|
+
return removeNullable ? getAdjustedTypeWithFacts(type, 2097152) : type;
|
|
59272
59374
|
}
|
|
59273
59375
|
function narrowTypeByEquality(type, operator, value, assumeTrue) {
|
|
59274
59376
|
if (type.flags & 1) {
|
|
@@ -59297,7 +59399,7 @@ var ts;
|
|
|
59297
59399
|
valueType.flags & 65536 ?
|
|
59298
59400
|
assumeTrue ? 131072 : 1048576 :
|
|
59299
59401
|
assumeTrue ? 65536 : 524288;
|
|
59300
|
-
return
|
|
59402
|
+
return getAdjustedTypeWithFacts(type, facts);
|
|
59301
59403
|
}
|
|
59302
59404
|
if (assumeTrue) {
|
|
59303
59405
|
var filterFn = operator === 34 ?
|
|
@@ -59317,7 +59419,7 @@ var ts;
|
|
|
59317
59419
|
var target = getReferenceCandidate(typeOfExpr.expression);
|
|
59318
59420
|
if (!isMatchingReference(reference, target)) {
|
|
59319
59421
|
if (strictNullChecks && optionalChainContainsReference(target, reference) && assumeTrue === (literal.text !== "undefined")) {
|
|
59320
|
-
return
|
|
59422
|
+
return getAdjustedTypeWithFacts(type, 2097152);
|
|
59321
59423
|
}
|
|
59322
59424
|
return type;
|
|
59323
59425
|
}
|
|
@@ -59467,7 +59569,7 @@ var ts;
|
|
|
59467
59569
|
var left = getReferenceCandidate(expr.left);
|
|
59468
59570
|
if (!isMatchingReference(reference, left)) {
|
|
59469
59571
|
if (assumeTrue && strictNullChecks && optionalChainContainsReference(left, reference)) {
|
|
59470
|
-
return
|
|
59572
|
+
return getAdjustedTypeWithFacts(type, 2097152);
|
|
59471
59573
|
}
|
|
59472
59574
|
return type;
|
|
59473
59575
|
}
|
|
@@ -59543,7 +59645,7 @@ var ts;
|
|
|
59543
59645
|
}
|
|
59544
59646
|
if (strictNullChecks && assumeTrue && optionalChainContainsReference(predicateArgument, reference) &&
|
|
59545
59647
|
!(getTypeFacts(predicate.type) & 65536)) {
|
|
59546
|
-
type =
|
|
59648
|
+
type = getAdjustedTypeWithFacts(type, 2097152);
|
|
59547
59649
|
}
|
|
59548
59650
|
var access = getDiscriminantPropertyAccess(predicateArgument, type);
|
|
59549
59651
|
if (access) {
|
|
@@ -59594,7 +59696,7 @@ var ts;
|
|
|
59594
59696
|
}
|
|
59595
59697
|
function narrowTypeByOptionality(type, expr, assumePresent) {
|
|
59596
59698
|
if (isMatchingReference(reference, expr)) {
|
|
59597
|
-
return
|
|
59699
|
+
return getAdjustedTypeWithFacts(type, assumePresent ? 2097152 : 262144);
|
|
59598
59700
|
}
|
|
59599
59701
|
var access = getDiscriminantPropertyAccess(expr, type);
|
|
59600
59702
|
if (access) {
|
|
@@ -59669,8 +59771,8 @@ var ts;
|
|
|
59669
59771
|
var annotationIncludesUndefined = strictNullChecks &&
|
|
59670
59772
|
declaration.kind === 164 &&
|
|
59671
59773
|
declaration.initializer &&
|
|
59672
|
-
|
|
59673
|
-
!(
|
|
59774
|
+
getTypeFacts(declaredType) & 16777216 &&
|
|
59775
|
+
!(getTypeFacts(checkExpression(declaration.initializer)) & 16777216);
|
|
59674
59776
|
popTypeResolution();
|
|
59675
59777
|
return annotationIncludesUndefined ? getTypeWithFacts(declaredType, 524288) : declaredType;
|
|
59676
59778
|
}
|
|
@@ -59910,7 +60012,7 @@ var ts;
|
|
|
59910
60012
|
return convertAutoToAny(flowType);
|
|
59911
60013
|
}
|
|
59912
60014
|
}
|
|
59913
|
-
else if (!assumeInitialized && !(
|
|
60015
|
+
else if (!assumeInitialized && !(getTypeFacts(type) & 16777216) && getTypeFacts(flowType) & 16777216) {
|
|
59914
60016
|
error(node, ts.Diagnostics.Variable_0_is_used_before_being_assigned, symbolToString(symbol));
|
|
59915
60017
|
return type;
|
|
59916
60018
|
}
|
|
@@ -61188,8 +61290,8 @@ var ts;
|
|
|
61188
61290
|
}
|
|
61189
61291
|
var signatureList;
|
|
61190
61292
|
var types = type.types;
|
|
61191
|
-
for (var _i = 0,
|
|
61192
|
-
var current =
|
|
61293
|
+
for (var _i = 0, types_18 = types; _i < types_18.length; _i++) {
|
|
61294
|
+
var current = types_18[_i];
|
|
61193
61295
|
var signature = getContextualCallSignature(current, node);
|
|
61194
61296
|
if (signature) {
|
|
61195
61297
|
if (!signatureList) {
|
|
@@ -62152,19 +62254,19 @@ var ts;
|
|
|
62152
62254
|
return checkNonNullType(checkExpression(node), node);
|
|
62153
62255
|
}
|
|
62154
62256
|
function isNullableType(type) {
|
|
62155
|
-
return !!((
|
|
62257
|
+
return !!(getTypeFacts(type) & 50331648);
|
|
62156
62258
|
}
|
|
62157
62259
|
function getNonNullableTypeIfNeeded(type) {
|
|
62158
62260
|
return isNullableType(type) ? getNonNullableType(type) : type;
|
|
62159
62261
|
}
|
|
62160
|
-
function reportObjectPossiblyNullOrUndefinedError(node,
|
|
62161
|
-
error(node,
|
|
62262
|
+
function reportObjectPossiblyNullOrUndefinedError(node, facts) {
|
|
62263
|
+
error(node, facts & 16777216 ? facts & 33554432 ?
|
|
62162
62264
|
ts.Diagnostics.Object_is_possibly_null_or_undefined :
|
|
62163
62265
|
ts.Diagnostics.Object_is_possibly_undefined :
|
|
62164
62266
|
ts.Diagnostics.Object_is_possibly_null);
|
|
62165
62267
|
}
|
|
62166
|
-
function reportCannotInvokePossiblyNullOrUndefinedError(node,
|
|
62167
|
-
error(node,
|
|
62268
|
+
function reportCannotInvokePossiblyNullOrUndefinedError(node, facts) {
|
|
62269
|
+
error(node, facts & 16777216 ? facts & 33554432 ?
|
|
62168
62270
|
ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_null_or_undefined :
|
|
62169
62271
|
ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_undefined :
|
|
62170
62272
|
ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_null);
|
|
@@ -62174,9 +62276,9 @@ var ts;
|
|
|
62174
62276
|
error(node, ts.Diagnostics.Object_is_of_type_unknown);
|
|
62175
62277
|
return errorType;
|
|
62176
62278
|
}
|
|
62177
|
-
var
|
|
62178
|
-
if (
|
|
62179
|
-
reportError(node,
|
|
62279
|
+
var facts = getTypeFacts(type);
|
|
62280
|
+
if (facts & 50331648) {
|
|
62281
|
+
reportError(node, facts);
|
|
62180
62282
|
var t = getNonNullableType(type);
|
|
62181
62283
|
return t.flags & (98304 | 131072) ? errorType : t;
|
|
62182
62284
|
}
|
|
@@ -62442,7 +62544,7 @@ var ts;
|
|
|
62442
62544
|
assumeUninitialized = true;
|
|
62443
62545
|
}
|
|
62444
62546
|
var flowType = getFlowTypeOfReference(node, propType, assumeUninitialized ? getOptionalType(propType) : propType);
|
|
62445
|
-
if (assumeUninitialized && !(
|
|
62547
|
+
if (assumeUninitialized && !(getTypeFacts(propType) & 16777216) && getTypeFacts(flowType) & 16777216) {
|
|
62446
62548
|
error(errorNode, ts.Diagnostics.Property_0_is_used_before_being_assigned, symbolToString(prop));
|
|
62447
62549
|
return propType;
|
|
62448
62550
|
}
|
|
@@ -64046,8 +64148,8 @@ var ts;
|
|
|
64046
64148
|
if (apparentType.flags & 1048576) {
|
|
64047
64149
|
var types = apparentType.types;
|
|
64048
64150
|
var hasSignatures = false;
|
|
64049
|
-
for (var _i = 0,
|
|
64050
|
-
var constituent =
|
|
64151
|
+
for (var _i = 0, types_19 = types; _i < types_19.length; _i++) {
|
|
64152
|
+
var constituent = types_19[_i];
|
|
64051
64153
|
var signatures = getSignaturesOfType(constituent, kind);
|
|
64052
64154
|
if (signatures.length !== 0) {
|
|
64053
64155
|
hasSignatures = true;
|
|
@@ -65555,7 +65657,7 @@ var ts;
|
|
|
65555
65657
|
var type = getTypeOfSymbol(symbol);
|
|
65556
65658
|
if (strictNullChecks &&
|
|
65557
65659
|
!(type.flags & (3 | 131072)) &&
|
|
65558
|
-
!(exactOptionalPropertyTypes ? symbol.flags & 16777216 :
|
|
65660
|
+
!(exactOptionalPropertyTypes ? symbol.flags & 16777216 : getTypeFacts(type) & 16777216)) {
|
|
65559
65661
|
error(expr, ts.Diagnostics.The_operand_of_a_delete_operator_must_be_optional);
|
|
65560
65662
|
}
|
|
65561
65663
|
}
|
|
@@ -65714,8 +65816,8 @@ var ts;
|
|
|
65714
65816
|
}
|
|
65715
65817
|
if (type.flags & 3145728) {
|
|
65716
65818
|
var types = type.types;
|
|
65717
|
-
for (var _i = 0,
|
|
65718
|
-
var t =
|
|
65819
|
+
for (var _i = 0, types_20 = types; _i < types_20.length; _i++) {
|
|
65820
|
+
var t = types_20[_i];
|
|
65719
65821
|
if (maybeTypeOfKind(t, kind)) {
|
|
65720
65822
|
return true;
|
|
65721
65823
|
}
|
|
@@ -65905,7 +66007,7 @@ var ts;
|
|
|
65905
66007
|
var prop = exprOrAssignment;
|
|
65906
66008
|
if (prop.objectAssignmentInitializer) {
|
|
65907
66009
|
if (strictNullChecks &&
|
|
65908
|
-
!(
|
|
66010
|
+
!(getTypeFacts(checkExpression(prop.objectAssignmentInitializer)) & 16777216)) {
|
|
65909
66011
|
sourceType = getTypeWithFacts(sourceType, 524288);
|
|
65910
66012
|
}
|
|
65911
66013
|
checkBinaryLikeExpression(prop.name, prop.equalsToken, prop.objectAssignmentInitializer, checkMode);
|
|
@@ -66270,7 +66372,7 @@ var ts;
|
|
|
66270
66372
|
case 56:
|
|
66271
66373
|
case 75: {
|
|
66272
66374
|
var resultType_3 = getTypeFacts(leftType) & 8388608 ?
|
|
66273
|
-
getUnionType([removeDefinitelyFalsyTypes(leftType), rightType], 2) :
|
|
66375
|
+
getUnionType([getNonNullableType(removeDefinitelyFalsyTypes(leftType)), rightType], 2) :
|
|
66274
66376
|
leftType;
|
|
66275
66377
|
if (operator === 75) {
|
|
66276
66378
|
checkAssignmentOperator(rightType);
|
|
@@ -68432,8 +68534,8 @@ var ts;
|
|
|
68432
68534
|
}
|
|
68433
68535
|
function getEntityNameForDecoratorMetadataFromTypeList(types) {
|
|
68434
68536
|
var commonEntityName;
|
|
68435
|
-
for (var _i = 0,
|
|
68436
|
-
var typeNode =
|
|
68537
|
+
for (var _i = 0, types_21 = types; _i < types_21.length; _i++) {
|
|
68538
|
+
var typeNode = types_21[_i];
|
|
68437
68539
|
while (typeNode.kind === 191 || typeNode.kind === 197) {
|
|
68438
68540
|
typeNode = typeNode.type;
|
|
68439
68541
|
}
|
|
@@ -69324,7 +69426,7 @@ var ts;
|
|
|
69324
69426
|
return;
|
|
69325
69427
|
var type = checkTruthinessExpression(location);
|
|
69326
69428
|
var isPropertyExpressionCast = ts.isPropertyAccessExpression(location) && isTypeAssertion(location.expression);
|
|
69327
|
-
if (
|
|
69429
|
+
if (!(getTypeFacts(type) & 4194304) || isPropertyExpressionCast)
|
|
69328
69430
|
return;
|
|
69329
69431
|
var callSignatures = getSignaturesOfType(type, 0);
|
|
69330
69432
|
var isPromise = !!getAwaitedTypeOfPromise(type);
|
|
@@ -70678,17 +70780,16 @@ var ts;
|
|
|
70678
70780
|
});
|
|
70679
70781
|
}
|
|
70680
70782
|
function checkKindsOfPropertyMemberOverrides(type, baseType) {
|
|
70681
|
-
var _a, _b;
|
|
70783
|
+
var _a, _b, _c, _d;
|
|
70682
70784
|
var baseProperties = getPropertiesOfType(baseType);
|
|
70683
|
-
|
|
70684
|
-
var baseProperty = baseProperties_1[_i];
|
|
70785
|
+
var _loop_33 = function (baseProperty) {
|
|
70685
70786
|
var base = getTargetSymbol(baseProperty);
|
|
70686
70787
|
if (base.flags & 4194304) {
|
|
70687
|
-
continue;
|
|
70788
|
+
return "continue";
|
|
70688
70789
|
}
|
|
70689
70790
|
var baseSymbol = getPropertyOfObjectType(type, base.escapedName);
|
|
70690
70791
|
if (!baseSymbol) {
|
|
70691
|
-
continue;
|
|
70792
|
+
return "continue";
|
|
70692
70793
|
}
|
|
70693
70794
|
var derived = getTargetSymbol(baseSymbol);
|
|
70694
70795
|
var baseDeclarationFlags = ts.getDeclarationModifierFlagsFromSymbol(base);
|
|
@@ -70696,14 +70797,14 @@ var ts;
|
|
|
70696
70797
|
if (derived === base) {
|
|
70697
70798
|
var derivedClassDecl = ts.getClassLikeDeclarationOfSymbol(type.symbol);
|
|
70698
70799
|
if (baseDeclarationFlags & 128 && (!derivedClassDecl || !ts.hasSyntacticModifier(derivedClassDecl, 128))) {
|
|
70699
|
-
for (var
|
|
70700
|
-
var otherBaseType =
|
|
70800
|
+
for (var _e = 0, _f = getBaseTypes(type); _e < _f.length; _e++) {
|
|
70801
|
+
var otherBaseType = _f[_e];
|
|
70701
70802
|
if (otherBaseType === baseType)
|
|
70702
70803
|
continue;
|
|
70703
70804
|
var baseSymbol_1 = getPropertyOfObjectType(otherBaseType, base.escapedName);
|
|
70704
70805
|
var derivedElsewhere = baseSymbol_1 && getTargetSymbol(baseSymbol_1);
|
|
70705
70806
|
if (derivedElsewhere && derivedElsewhere !== base) {
|
|
70706
|
-
continue
|
|
70807
|
+
return "continue-basePropertyCheck";
|
|
70707
70808
|
}
|
|
70708
70809
|
}
|
|
70709
70810
|
if (derivedClassDecl.kind === 226) {
|
|
@@ -70717,16 +70818,18 @@ var ts;
|
|
|
70717
70818
|
else {
|
|
70718
70819
|
var derivedDeclarationFlags = ts.getDeclarationModifierFlagsFromSymbol(derived);
|
|
70719
70820
|
if (baseDeclarationFlags & 8 || derivedDeclarationFlags & 8) {
|
|
70720
|
-
continue;
|
|
70821
|
+
return "continue";
|
|
70721
70822
|
}
|
|
70722
70823
|
var errorMessage = void 0;
|
|
70723
70824
|
var basePropertyFlags = base.flags & 98308;
|
|
70724
70825
|
var derivedPropertyFlags = derived.flags & 98308;
|
|
70725
70826
|
if (basePropertyFlags && derivedPropertyFlags) {
|
|
70726
|
-
if (
|
|
70727
|
-
|
|
70827
|
+
if ((ts.getCheckFlags(base) & 6
|
|
70828
|
+
? (_a = base.declarations) === null || _a === void 0 ? void 0 : _a.some(function (d) { return isPropertyAbstractOrInterface(d, baseDeclarationFlags); })
|
|
70829
|
+
: (_b = base.declarations) === null || _b === void 0 ? void 0 : _b.every(function (d) { return isPropertyAbstractOrInterface(d, baseDeclarationFlags); }))
|
|
70830
|
+
|| ts.getCheckFlags(base) & 262144
|
|
70728
70831
|
|| derived.valueDeclaration && ts.isBinaryExpression(derived.valueDeclaration)) {
|
|
70729
|
-
continue;
|
|
70832
|
+
return "continue";
|
|
70730
70833
|
}
|
|
70731
70834
|
var overriddenInstanceProperty = basePropertyFlags !== 4 && derivedPropertyFlags === 4;
|
|
70732
70835
|
var overriddenInstanceAccessor = basePropertyFlags === 4 && derivedPropertyFlags !== 4;
|
|
@@ -70737,12 +70840,12 @@ var ts;
|
|
|
70737
70840
|
error(ts.getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage_1, symbolToString(base), typeToString(baseType), typeToString(type));
|
|
70738
70841
|
}
|
|
70739
70842
|
else if (useDefineForClassFields) {
|
|
70740
|
-
var uninitialized = (
|
|
70843
|
+
var uninitialized = (_c = derived.declarations) === null || _c === void 0 ? void 0 : _c.find(function (d) { return d.kind === 167 && !d.initializer; });
|
|
70741
70844
|
if (uninitialized
|
|
70742
70845
|
&& !(derived.flags & 33554432)
|
|
70743
70846
|
&& !(baseDeclarationFlags & 128)
|
|
70744
70847
|
&& !(derivedDeclarationFlags & 128)
|
|
70745
|
-
&& !((
|
|
70848
|
+
&& !((_d = derived.declarations) === null || _d === void 0 ? void 0 : _d.some(function (d) { return !!(d.flags & 16777216); }))) {
|
|
70746
70849
|
var constructor = findConstructorDeclaration(ts.getClassLikeDeclarationOfSymbol(type.symbol));
|
|
70747
70850
|
var propName = uninitialized.name;
|
|
70748
70851
|
if (uninitialized.exclamationToken
|
|
@@ -70755,11 +70858,11 @@ var ts;
|
|
|
70755
70858
|
}
|
|
70756
70859
|
}
|
|
70757
70860
|
}
|
|
70758
|
-
continue;
|
|
70861
|
+
return "continue";
|
|
70759
70862
|
}
|
|
70760
70863
|
else if (isPrototypeProperty(base)) {
|
|
70761
70864
|
if (isPrototypeProperty(derived) || derived.flags & 4) {
|
|
70762
|
-
continue;
|
|
70865
|
+
return "continue";
|
|
70763
70866
|
}
|
|
70764
70867
|
else {
|
|
70765
70868
|
ts.Debug.assert(!!(derived.flags & 98304));
|
|
@@ -70774,9 +70877,20 @@ var ts;
|
|
|
70774
70877
|
}
|
|
70775
70878
|
error(ts.getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage, typeToString(baseType), symbolToString(base), typeToString(type));
|
|
70776
70879
|
}
|
|
70880
|
+
};
|
|
70881
|
+
basePropertyCheck: for (var _i = 0, baseProperties_1 = baseProperties; _i < baseProperties_1.length; _i++) {
|
|
70882
|
+
var baseProperty = baseProperties_1[_i];
|
|
70883
|
+
var state_10 = _loop_33(baseProperty);
|
|
70884
|
+
switch (state_10) {
|
|
70885
|
+
case "continue-basePropertyCheck": continue basePropertyCheck;
|
|
70886
|
+
}
|
|
70777
70887
|
}
|
|
70778
70888
|
}
|
|
70779
|
-
function
|
|
70889
|
+
function isPropertyAbstractOrInterface(declaration, baseDeclarationFlags) {
|
|
70890
|
+
return baseDeclarationFlags & 128 && (!ts.isPropertyDeclaration(declaration) || !declaration.initializer)
|
|
70891
|
+
|| ts.isInterfaceDeclaration(declaration.parent);
|
|
70892
|
+
}
|
|
70893
|
+
function getNonInheritedProperties(type, baseTypes, properties) {
|
|
70780
70894
|
if (!ts.length(baseTypes)) {
|
|
70781
70895
|
return properties;
|
|
70782
70896
|
}
|
|
@@ -70845,7 +70959,7 @@ var ts;
|
|
|
70845
70959
|
var propName = member.name;
|
|
70846
70960
|
if (ts.isIdentifier(propName) || ts.isPrivateIdentifier(propName) || ts.isComputedPropertyName(propName)) {
|
|
70847
70961
|
var type = getTypeOfSymbol(getSymbolOfNode(member));
|
|
70848
|
-
if (!(type.flags & 3 ||
|
|
70962
|
+
if (!(type.flags & 3 || getTypeFacts(type) & 16777216)) {
|
|
70849
70963
|
if (!constructor || !isPropertyInitializedInConstructor(propName, type, constructor)) {
|
|
70850
70964
|
error(member.name, ts.Diagnostics.Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor, ts.declarationNameToString(propName));
|
|
70851
70965
|
}
|
|
@@ -70869,7 +70983,7 @@ var ts;
|
|
|
70869
70983
|
ts.setParent(reference, staticBlock);
|
|
70870
70984
|
reference.flowNode = staticBlock.returnFlowNode;
|
|
70871
70985
|
var flowType = getFlowTypeOfReference(reference, propType, getOptionalType(propType));
|
|
70872
|
-
if (!(
|
|
70986
|
+
if (!(getTypeFacts(flowType) & 16777216)) {
|
|
70873
70987
|
return true;
|
|
70874
70988
|
}
|
|
70875
70989
|
}
|
|
@@ -70884,7 +70998,7 @@ var ts;
|
|
|
70884
70998
|
ts.setParent(reference, constructor);
|
|
70885
70999
|
reference.flowNode = constructor.returnFlowNode;
|
|
70886
71000
|
var flowType = getFlowTypeOfReference(reference, propType, getOptionalType(propType));
|
|
70887
|
-
return !(
|
|
71001
|
+
return !(getTypeFacts(flowType) & 16777216);
|
|
70888
71002
|
}
|
|
70889
71003
|
function checkInterfaceDeclaration(node) {
|
|
70890
71004
|
if (!checkGrammarDecoratorsAndModifiers(node))
|
|
@@ -77903,8 +78017,8 @@ var ts;
|
|
|
77903
78017
|
}
|
|
77904
78018
|
function serializeTypeList(types) {
|
|
77905
78019
|
var serializedUnion;
|
|
77906
|
-
for (var _i = 0,
|
|
77907
|
-
var typeNode =
|
|
78020
|
+
for (var _i = 0, types_22 = types; _i < types_22.length; _i++) {
|
|
78021
|
+
var typeNode = types_22[_i];
|
|
77908
78022
|
while (typeNode.kind === 191) {
|
|
77909
78023
|
typeNode = typeNode.type;
|
|
77910
78024
|
}
|
|
@@ -90529,7 +90643,8 @@ var ts;
|
|
|
90529
90643
|
return;
|
|
90530
90644
|
}
|
|
90531
90645
|
var version = ts.version;
|
|
90532
|
-
|
|
90646
|
+
var buildInfo = { bundle: bundle, program: program, version: version };
|
|
90647
|
+
ts.writeFile(host, emitterDiagnostics, buildInfoPath, getBuildInfoText(buildInfo), false, undefined, { buildInfo: buildInfo });
|
|
90533
90648
|
}
|
|
90534
90649
|
function emitJsFileOrBundle(sourceFileOrBundle, jsFilePath, sourceMapFilePath, relativeToBuildInfo) {
|
|
90535
90650
|
if (!sourceFileOrBundle || emitOnlyDtsFiles || !jsFilePath) {
|
|
@@ -90549,7 +90664,7 @@ var ts;
|
|
|
90549
90664
|
sourceMap: compilerOptions.sourceMap,
|
|
90550
90665
|
inlineSourceMap: compilerOptions.inlineSourceMap,
|
|
90551
90666
|
inlineSources: compilerOptions.inlineSources,
|
|
90552
|
-
extendedDiagnostics: compilerOptions.extendedDiagnostics,
|
|
90667
|
+
extendedDiagnostics: compilerOptions.extendedDiagnostics || compilerOptions.solutionDiagnostics,
|
|
90553
90668
|
writeBundleFileInfo: !!bundleBuildInfo,
|
|
90554
90669
|
relativeToBuildInfo: relativeToBuildInfo
|
|
90555
90670
|
};
|
|
@@ -90594,7 +90709,7 @@ var ts;
|
|
|
90594
90709
|
target: compilerOptions.target,
|
|
90595
90710
|
sourceMap: compilerOptions.sourceMap,
|
|
90596
90711
|
inlineSourceMap: compilerOptions.inlineSourceMap,
|
|
90597
|
-
extendedDiagnostics: compilerOptions.extendedDiagnostics,
|
|
90712
|
+
extendedDiagnostics: compilerOptions.extendedDiagnostics || compilerOptions.solutionDiagnostics,
|
|
90598
90713
|
onlyPrintJsDocStyle: true,
|
|
90599
90714
|
writeBundleFileInfo: !!bundleBuildInfo,
|
|
90600
90715
|
recordInternalSection: !!bundleBuildInfo,
|
|
@@ -90614,7 +90729,7 @@ var ts;
|
|
|
90614
90729
|
sourceMap: !forceDtsEmit && compilerOptions.declarationMap,
|
|
90615
90730
|
sourceRoot: compilerOptions.sourceRoot,
|
|
90616
90731
|
mapRoot: compilerOptions.mapRoot,
|
|
90617
|
-
extendedDiagnostics: compilerOptions.extendedDiagnostics,
|
|
90732
|
+
extendedDiagnostics: compilerOptions.extendedDiagnostics || compilerOptions.solutionDiagnostics,
|
|
90618
90733
|
});
|
|
90619
90734
|
if (forceDtsEmit && declarationTransform.transformed[0].kind === 305) {
|
|
90620
90735
|
var sourceFile = declarationTransform.transformed[0];
|
|
@@ -90670,12 +90785,17 @@ var ts;
|
|
|
90670
90785
|
if (sourceMapFilePath) {
|
|
90671
90786
|
var sourceMap = sourceMapGenerator.toString();
|
|
90672
90787
|
ts.writeFile(host, emitterDiagnostics, sourceMapFilePath, sourceMap, false, sourceFiles);
|
|
90788
|
+
if (printer.bundleFileInfo)
|
|
90789
|
+
printer.bundleFileInfo.mapHash = ts.BuilderState.computeSignature(sourceMap, ts.maybeBind(host, host.createHash));
|
|
90673
90790
|
}
|
|
90674
90791
|
}
|
|
90675
90792
|
else {
|
|
90676
90793
|
writer.writeLine();
|
|
90677
90794
|
}
|
|
90678
|
-
|
|
90795
|
+
var text = writer.getText();
|
|
90796
|
+
ts.writeFile(host, emitterDiagnostics, jsFilePath, text, !!compilerOptions.emitBOM, sourceFiles, { sourceMapUrlPos: sourceMapUrlPos });
|
|
90797
|
+
if (printer.bundleFileInfo)
|
|
90798
|
+
printer.bundleFileInfo.hash = ts.BuilderState.computeSignature(text, ts.maybeBind(host, host.createHash));
|
|
90679
90799
|
writer.clear();
|
|
90680
90800
|
}
|
|
90681
90801
|
function shouldEmitSourceMaps(mapOptions, sourceFileOrBundle) {
|
|
@@ -90800,30 +90920,50 @@ var ts;
|
|
|
90800
90920
|
});
|
|
90801
90921
|
}
|
|
90802
90922
|
function emitUsingBuildInfo(config, host, getCommandLine, customTransformers) {
|
|
90923
|
+
var createHash = ts.maybeBind(host, host.createHash);
|
|
90803
90924
|
var _a = getOutputPathsForBundle(config.options, false), buildInfoPath = _a.buildInfoPath, jsFilePath = _a.jsFilePath, sourceMapFilePath = _a.sourceMapFilePath, declarationFilePath = _a.declarationFilePath, declarationMapPath = _a.declarationMapPath;
|
|
90804
|
-
var
|
|
90805
|
-
if (
|
|
90925
|
+
var buildInfo;
|
|
90926
|
+
if (host.getBuildInfo) {
|
|
90927
|
+
var hostBuildInfo = host.getBuildInfo(buildInfoPath, config.options.configFilePath);
|
|
90928
|
+
if (!hostBuildInfo)
|
|
90929
|
+
return buildInfoPath;
|
|
90930
|
+
buildInfo = hostBuildInfo;
|
|
90931
|
+
}
|
|
90932
|
+
else {
|
|
90933
|
+
var buildInfoText = host.readFile(buildInfoPath);
|
|
90934
|
+
if (!buildInfoText)
|
|
90935
|
+
return buildInfoPath;
|
|
90936
|
+
buildInfo = getBuildInfo(buildInfoText);
|
|
90937
|
+
}
|
|
90938
|
+
if (!buildInfo.bundle || !buildInfo.bundle.js || (declarationFilePath && !buildInfo.bundle.dts))
|
|
90806
90939
|
return buildInfoPath;
|
|
90807
90940
|
var jsFileText = host.readFile(ts.Debug.checkDefined(jsFilePath));
|
|
90808
90941
|
if (!jsFileText)
|
|
90809
90942
|
return jsFilePath;
|
|
90943
|
+
if (ts.BuilderState.computeSignature(jsFileText, createHash) !== buildInfo.bundle.js.hash)
|
|
90944
|
+
return jsFilePath;
|
|
90810
90945
|
var sourceMapText = sourceMapFilePath && host.readFile(sourceMapFilePath);
|
|
90811
90946
|
if ((sourceMapFilePath && !sourceMapText) || config.options.inlineSourceMap)
|
|
90812
90947
|
return sourceMapFilePath || "inline sourcemap decoding";
|
|
90948
|
+
if (sourceMapFilePath && ts.BuilderState.computeSignature(sourceMapText, createHash) !== buildInfo.bundle.js.mapHash)
|
|
90949
|
+
return sourceMapFilePath;
|
|
90813
90950
|
var declarationText = declarationFilePath && host.readFile(declarationFilePath);
|
|
90814
90951
|
if (declarationFilePath && !declarationText)
|
|
90815
90952
|
return declarationFilePath;
|
|
90953
|
+
if (declarationFilePath && ts.BuilderState.computeSignature(declarationText, createHash) !== buildInfo.bundle.dts.hash)
|
|
90954
|
+
return declarationFilePath;
|
|
90816
90955
|
var declarationMapText = declarationMapPath && host.readFile(declarationMapPath);
|
|
90817
90956
|
if ((declarationMapPath && !declarationMapText) || config.options.inlineSourceMap)
|
|
90818
90957
|
return declarationMapPath || "inline sourcemap decoding";
|
|
90819
|
-
|
|
90820
|
-
|
|
90821
|
-
return buildInfoPath;
|
|
90958
|
+
if (declarationMapPath && ts.BuilderState.computeSignature(declarationMapText, createHash) !== buildInfo.bundle.dts.mapHash)
|
|
90959
|
+
return declarationMapPath;
|
|
90822
90960
|
var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));
|
|
90823
90961
|
var ownPrependInput = ts.createInputFiles(jsFileText, declarationText, sourceMapFilePath, sourceMapText, declarationMapPath, declarationMapText, jsFilePath, declarationFilePath, buildInfoPath, buildInfo, true);
|
|
90824
90962
|
var outputFiles = [];
|
|
90825
90963
|
var prependNodes = ts.createPrependNodes(config.projectReferences, getCommandLine, function (f) { return host.readFile(f); });
|
|
90826
90964
|
var sourceFilesForJsEmit = createSourceFilesFromBundleBuildInfo(buildInfo.bundle, buildInfoDirectory, host);
|
|
90965
|
+
var changedDtsText;
|
|
90966
|
+
var changedDtsData;
|
|
90827
90967
|
var emitHost = {
|
|
90828
90968
|
getPrependNodes: ts.memoize(function () { return __spreadArray(__spreadArray([], prependNodes, true), [ownPrependInput], false); }),
|
|
90829
90969
|
getCanonicalFileName: host.getCanonicalFileName,
|
|
@@ -90839,7 +90979,7 @@ var ts;
|
|
|
90839
90979
|
getResolvedProjectReferenceToRedirect: ts.returnUndefined,
|
|
90840
90980
|
getProjectReferenceRedirect: ts.returnUndefined,
|
|
90841
90981
|
isSourceOfProjectReferenceRedirect: ts.returnFalse,
|
|
90842
|
-
writeFile: function (name, text, writeByteOrderMark) {
|
|
90982
|
+
writeFile: function (name, text, writeByteOrderMark, _onError, _sourceFiles, data) {
|
|
90843
90983
|
switch (name) {
|
|
90844
90984
|
case jsFilePath:
|
|
90845
90985
|
if (jsFileText === text)
|
|
@@ -90850,19 +90990,25 @@ var ts;
|
|
|
90850
90990
|
return;
|
|
90851
90991
|
break;
|
|
90852
90992
|
case buildInfoPath:
|
|
90853
|
-
var newBuildInfo =
|
|
90993
|
+
var newBuildInfo = data.buildInfo;
|
|
90854
90994
|
newBuildInfo.program = buildInfo.program;
|
|
90995
|
+
if (newBuildInfo.program && changedDtsText !== undefined && config.options.composite) {
|
|
90996
|
+
newBuildInfo.program.outSignature = ts.computeSignature(changedDtsText, changedDtsData, createHash);
|
|
90997
|
+
newBuildInfo.program.dtsChangeTime = ts.getCurrentTime(host).getTime();
|
|
90998
|
+
}
|
|
90855
90999
|
var _a = buildInfo.bundle, js = _a.js, dts = _a.dts, sourceFiles = _a.sourceFiles;
|
|
90856
91000
|
newBuildInfo.bundle.js.sources = js.sources;
|
|
90857
91001
|
if (dts) {
|
|
90858
91002
|
newBuildInfo.bundle.dts.sources = dts.sources;
|
|
90859
91003
|
}
|
|
90860
91004
|
newBuildInfo.bundle.sourceFiles = sourceFiles;
|
|
90861
|
-
outputFiles.push({ name: name, text: getBuildInfoText(newBuildInfo), writeByteOrderMark: writeByteOrderMark });
|
|
91005
|
+
outputFiles.push({ name: name, text: getBuildInfoText(newBuildInfo), writeByteOrderMark: writeByteOrderMark, buildInfo: newBuildInfo });
|
|
90862
91006
|
return;
|
|
90863
91007
|
case declarationFilePath:
|
|
90864
91008
|
if (declarationText === text)
|
|
90865
91009
|
return;
|
|
91010
|
+
changedDtsText = text;
|
|
91011
|
+
changedDtsData = data;
|
|
90866
91012
|
break;
|
|
90867
91013
|
case declarationMapPath:
|
|
90868
91014
|
if (declarationMapText === text)
|
|
@@ -90881,6 +91027,7 @@ var ts;
|
|
|
90881
91027
|
getSourceFileFromReference: ts.returnUndefined,
|
|
90882
91028
|
redirectTargetsMap: ts.createMultiMap(),
|
|
90883
91029
|
getFileIncludeReasons: ts.notImplemented,
|
|
91030
|
+
createHash: createHash,
|
|
90884
91031
|
};
|
|
90885
91032
|
emitFiles(ts.notImplementedResolver, emitHost, undefined, ts.getTransformers(config.options, customTransformers));
|
|
90886
91033
|
return outputFiles;
|
|
@@ -93529,8 +93676,8 @@ var ts;
|
|
|
93529
93676
|
bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: "reference", data: directive.fileName });
|
|
93530
93677
|
writeLine();
|
|
93531
93678
|
}
|
|
93532
|
-
for (var _d = 0,
|
|
93533
|
-
var directive =
|
|
93679
|
+
for (var _d = 0, types_23 = types; _d < types_23.length; _d++) {
|
|
93680
|
+
var directive = types_23[_d];
|
|
93534
93681
|
var pos = writer.getTextPos();
|
|
93535
93682
|
var resolutionMode = directive.resolutionMode && directive.resolutionMode !== (currentSourceFile === null || currentSourceFile === void 0 ? void 0 : currentSourceFile.impliedNodeFormat)
|
|
93536
93683
|
? "resolution-mode=\"" + (directive.resolutionMode === ts.ModuleKind.ESNext ? "import" : "require") + "\""
|
|
@@ -95505,7 +95652,6 @@ var ts;
|
|
|
95505
95652
|
if (system === void 0) { system = ts.sys; }
|
|
95506
95653
|
var existingDirectories = new ts.Map();
|
|
95507
95654
|
var getCanonicalFileName = ts.createGetCanonicalFileName(system.useCaseSensitiveFileNames);
|
|
95508
|
-
var computeHash = ts.maybeBind(system, system.createHash) || ts.generateDjb2Hash;
|
|
95509
95655
|
function getSourceFile(fileName, languageVersionOrOptions, onError) {
|
|
95510
95656
|
var text;
|
|
95511
95657
|
try {
|
|
@@ -95535,7 +95681,7 @@ var ts;
|
|
|
95535
95681
|
function writeFile(fileName, data, writeByteOrderMark, onError) {
|
|
95536
95682
|
try {
|
|
95537
95683
|
ts.performance.mark("beforeIOWrite");
|
|
95538
|
-
ts.writeFileEnsuringDirectories(fileName, data, writeByteOrderMark, function (path, data, writeByteOrderMark) { return
|
|
95684
|
+
ts.writeFileEnsuringDirectories(fileName, data, writeByteOrderMark, function (path, data, writeByteOrderMark) { return system.writeFile(path, data, writeByteOrderMark); }, function (path) { return (compilerHost.createDirectory || system.createDirectory)(path); }, function (path) { return directoryExists(path); });
|
|
95539
95685
|
ts.performance.mark("afterIOWrite");
|
|
95540
95686
|
ts.performance.measure("I/O Write", "beforeIOWrite", "afterIOWrite");
|
|
95541
95687
|
}
|
|
@@ -95545,34 +95691,6 @@ var ts;
|
|
|
95545
95691
|
}
|
|
95546
95692
|
}
|
|
95547
95693
|
}
|
|
95548
|
-
var outputFingerprints;
|
|
95549
|
-
function writeFileWorker(fileName, data, writeByteOrderMark) {
|
|
95550
|
-
if (!ts.isWatchSet(options) || !system.getModifiedTime) {
|
|
95551
|
-
system.writeFile(fileName, data, writeByteOrderMark);
|
|
95552
|
-
return;
|
|
95553
|
-
}
|
|
95554
|
-
if (!outputFingerprints) {
|
|
95555
|
-
outputFingerprints = new ts.Map();
|
|
95556
|
-
}
|
|
95557
|
-
var hash = computeHash(data);
|
|
95558
|
-
var mtimeBefore = system.getModifiedTime(fileName);
|
|
95559
|
-
if (mtimeBefore) {
|
|
95560
|
-
var fingerprint = outputFingerprints.get(fileName);
|
|
95561
|
-
if (fingerprint &&
|
|
95562
|
-
fingerprint.byteOrderMark === writeByteOrderMark &&
|
|
95563
|
-
fingerprint.hash === hash &&
|
|
95564
|
-
fingerprint.mtime.getTime() === mtimeBefore.getTime()) {
|
|
95565
|
-
return;
|
|
95566
|
-
}
|
|
95567
|
-
}
|
|
95568
|
-
system.writeFile(fileName, data, writeByteOrderMark);
|
|
95569
|
-
var mtimeAfter = system.getModifiedTime(fileName) || ts.missingFileModifiedTime;
|
|
95570
|
-
outputFingerprints.set(fileName, {
|
|
95571
|
-
hash: hash,
|
|
95572
|
-
byteOrderMark: writeByteOrderMark,
|
|
95573
|
-
mtime: mtimeAfter
|
|
95574
|
-
});
|
|
95575
|
-
}
|
|
95576
95694
|
function getDefaultLibLocation() {
|
|
95577
95695
|
return ts.getDirectoryPath(ts.normalizePath(system.getExecutingFilePath()));
|
|
95578
95696
|
}
|
|
@@ -96946,6 +97064,7 @@ var ts;
|
|
|
96946
97064
|
getSourceFileFromReference: function (file, ref) { return program.getSourceFileFromReference(file, ref); },
|
|
96947
97065
|
redirectTargetsMap: redirectTargetsMap,
|
|
96948
97066
|
getFileIncludeReasons: program.getFileIncludeReasons,
|
|
97067
|
+
createHash: ts.maybeBind(host, host.createHash),
|
|
96949
97068
|
};
|
|
96950
97069
|
}
|
|
96951
97070
|
function writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data) {
|
|
@@ -98852,13 +98971,9 @@ var ts;
|
|
|
98852
98971
|
function createManyToManyPathMap() {
|
|
98853
98972
|
function create(forward, reverse, deleted) {
|
|
98854
98973
|
var map = {
|
|
98855
|
-
clone: function () { return create(new ts.Map(forward), new ts.Map(reverse), deleted && new ts.Set(deleted)); },
|
|
98856
|
-
forEach: function (fn) { return forward.forEach(fn); },
|
|
98857
98974
|
getKeys: function (v) { return reverse.get(v); },
|
|
98858
98975
|
getValues: function (k) { return forward.get(k); },
|
|
98859
|
-
hasKey: function (k) { return forward.has(k); },
|
|
98860
98976
|
keys: function () { return forward.keys(); },
|
|
98861
|
-
deletedKeys: function () { return deleted; },
|
|
98862
98977
|
deleteKey: function (k) {
|
|
98863
98978
|
(deleted || (deleted = new ts.Set())).add(k);
|
|
98864
98979
|
var set = forward.get(k);
|
|
@@ -98885,11 +99000,6 @@ var ts;
|
|
|
98885
99000
|
});
|
|
98886
99001
|
return map;
|
|
98887
99002
|
},
|
|
98888
|
-
clear: function () {
|
|
98889
|
-
forward.clear();
|
|
98890
|
-
reverse.clear();
|
|
98891
|
-
deleted === null || deleted === void 0 ? void 0 : deleted.clear();
|
|
98892
|
-
}
|
|
98893
99003
|
};
|
|
98894
99004
|
return map;
|
|
98895
99005
|
}
|
|
@@ -98993,35 +99103,45 @@ var ts;
|
|
|
98993
99103
|
}
|
|
98994
99104
|
BuilderState.canReuseOldState = canReuseOldState;
|
|
98995
99105
|
function create(newProgram, getCanonicalFileName, oldState, disableUseFileVersionAsSignature) {
|
|
99106
|
+
var _a, _b, _c;
|
|
98996
99107
|
var fileInfos = new ts.Map();
|
|
98997
99108
|
var referencedMap = newProgram.getCompilerOptions().module !== ts.ModuleKind.None ? createManyToManyPathMap() : undefined;
|
|
98998
99109
|
var exportedModulesMap = referencedMap ? createManyToManyPathMap() : undefined;
|
|
98999
|
-
var hasCalledUpdateShapeSignature = new ts.Set();
|
|
99000
99110
|
var useOldState = canReuseOldState(referencedMap, oldState);
|
|
99001
99111
|
newProgram.getTypeChecker();
|
|
99002
|
-
for (var _i = 0,
|
|
99003
|
-
var sourceFile =
|
|
99112
|
+
for (var _i = 0, _d = newProgram.getSourceFiles(); _i < _d.length; _i++) {
|
|
99113
|
+
var sourceFile = _d[_i];
|
|
99004
99114
|
var version_2 = ts.Debug.checkDefined(sourceFile.version, "Program intended to be used with Builder should have source files with versions set");
|
|
99005
|
-
var
|
|
99115
|
+
var oldUncommitedSignature = useOldState ? (_a = oldState.oldSignatures) === null || _a === void 0 ? void 0 : _a.get(sourceFile.resolvedPath) : undefined;
|
|
99116
|
+
var signature = oldUncommitedSignature === undefined ?
|
|
99117
|
+
useOldState ? (_b = oldState.fileInfos.get(sourceFile.resolvedPath)) === null || _b === void 0 ? void 0 : _b.signature : undefined :
|
|
99118
|
+
oldUncommitedSignature || undefined;
|
|
99006
99119
|
if (referencedMap) {
|
|
99007
99120
|
var newReferences = getReferencedFiles(newProgram, sourceFile, getCanonicalFileName);
|
|
99008
99121
|
if (newReferences) {
|
|
99009
99122
|
referencedMap.set(sourceFile.resolvedPath, newReferences);
|
|
99010
99123
|
}
|
|
99011
99124
|
if (useOldState) {
|
|
99012
|
-
var
|
|
99125
|
+
var oldUncommitedExportedModules = (_c = oldState.oldExportedModulesMap) === null || _c === void 0 ? void 0 : _c.get(sourceFile.resolvedPath);
|
|
99126
|
+
var exportedModules = oldUncommitedExportedModules === undefined ?
|
|
99127
|
+
oldState.exportedModulesMap.getValues(sourceFile.resolvedPath) :
|
|
99128
|
+
oldUncommitedExportedModules || undefined;
|
|
99013
99129
|
if (exportedModules) {
|
|
99014
99130
|
exportedModulesMap.set(sourceFile.resolvedPath, exportedModules);
|
|
99015
99131
|
}
|
|
99016
99132
|
}
|
|
99017
99133
|
}
|
|
99018
|
-
fileInfos.set(sourceFile.resolvedPath, {
|
|
99134
|
+
fileInfos.set(sourceFile.resolvedPath, {
|
|
99135
|
+
version: version_2,
|
|
99136
|
+
signature: signature,
|
|
99137
|
+
affectsGlobalScope: isFileAffectingGlobalScope(sourceFile) || undefined,
|
|
99138
|
+
impliedFormat: sourceFile.impliedNodeFormat
|
|
99139
|
+
});
|
|
99019
99140
|
}
|
|
99020
99141
|
return {
|
|
99021
99142
|
fileInfos: fileInfos,
|
|
99022
99143
|
referencedMap: referencedMap,
|
|
99023
99144
|
exportedModulesMap: exportedModulesMap,
|
|
99024
|
-
hasCalledUpdateShapeSignature: hasCalledUpdateShapeSignature,
|
|
99025
99145
|
useFileVersionAsSignature: !disableUseFileVersionAsSignature && !useOldState
|
|
99026
99146
|
};
|
|
99027
99147
|
}
|
|
@@ -99031,52 +99151,36 @@ var ts;
|
|
|
99031
99151
|
state.allFileNames = undefined;
|
|
99032
99152
|
}
|
|
99033
99153
|
BuilderState.releaseCache = releaseCache;
|
|
99034
|
-
function
|
|
99154
|
+
function getFilesAffectedBy(state, programOfThisState, path, cancellationToken, computeHash) {
|
|
99035
99155
|
var _a, _b;
|
|
99036
|
-
|
|
99037
|
-
|
|
99038
|
-
|
|
99039
|
-
|
|
99040
|
-
hasCalledUpdateShapeSignature: new ts.Set(state.hasCalledUpdateShapeSignature),
|
|
99041
|
-
useFileVersionAsSignature: state.useFileVersionAsSignature,
|
|
99042
|
-
};
|
|
99156
|
+
var result = getFilesAffectedByWithOldState(state, programOfThisState, path, cancellationToken, computeHash);
|
|
99157
|
+
(_a = state.oldSignatures) === null || _a === void 0 ? void 0 : _a.clear();
|
|
99158
|
+
(_b = state.oldExportedModulesMap) === null || _b === void 0 ? void 0 : _b.clear();
|
|
99159
|
+
return result;
|
|
99043
99160
|
}
|
|
99044
|
-
BuilderState.
|
|
99045
|
-
function
|
|
99046
|
-
var signatureCache = cacheToUpdateSignature || new ts.Map();
|
|
99161
|
+
BuilderState.getFilesAffectedBy = getFilesAffectedBy;
|
|
99162
|
+
function getFilesAffectedByWithOldState(state, programOfThisState, path, cancellationToken, computeHash) {
|
|
99047
99163
|
var sourceFile = programOfThisState.getSourceFileByPath(path);
|
|
99048
99164
|
if (!sourceFile) {
|
|
99049
99165
|
return ts.emptyArray;
|
|
99050
99166
|
}
|
|
99051
|
-
if (!updateShapeSignature(state, programOfThisState, sourceFile,
|
|
99167
|
+
if (!updateShapeSignature(state, programOfThisState, sourceFile, cancellationToken, computeHash)) {
|
|
99052
99168
|
return [sourceFile];
|
|
99053
99169
|
}
|
|
99054
|
-
|
|
99055
|
-
if (!cacheToUpdateSignature) {
|
|
99056
|
-
updateSignaturesFromCache(state, signatureCache);
|
|
99057
|
-
}
|
|
99058
|
-
return result;
|
|
99170
|
+
return (state.referencedMap ? getFilesAffectedByUpdatedShapeWhenModuleEmit : getFilesAffectedByUpdatedShapeWhenNonModuleEmit)(state, programOfThisState, sourceFile, cancellationToken, computeHash);
|
|
99059
99171
|
}
|
|
99060
|
-
BuilderState.
|
|
99061
|
-
function updateSignaturesFromCache(state, signatureCache) {
|
|
99062
|
-
signatureCache.forEach(function (signature, path) { return updateSignatureOfFile(state, signature, path); });
|
|
99063
|
-
}
|
|
99064
|
-
BuilderState.updateSignaturesFromCache = updateSignaturesFromCache;
|
|
99172
|
+
BuilderState.getFilesAffectedByWithOldState = getFilesAffectedByWithOldState;
|
|
99065
99173
|
function updateSignatureOfFile(state, signature, path) {
|
|
99066
99174
|
state.fileInfos.get(path).signature = signature;
|
|
99067
|
-
state.hasCalledUpdateShapeSignature.add(path);
|
|
99175
|
+
(state.hasCalledUpdateShapeSignature || (state.hasCalledUpdateShapeSignature = new ts.Set())).add(path);
|
|
99068
99176
|
}
|
|
99069
99177
|
BuilderState.updateSignatureOfFile = updateSignatureOfFile;
|
|
99070
|
-
function updateShapeSignature(state, programOfThisState, sourceFile,
|
|
99178
|
+
function updateShapeSignature(state, programOfThisState, sourceFile, cancellationToken, computeHash, useFileVersionAsSignature) {
|
|
99179
|
+
var _a;
|
|
99071
99180
|
if (useFileVersionAsSignature === void 0) { useFileVersionAsSignature = state.useFileVersionAsSignature; }
|
|
99072
|
-
|
|
99073
|
-
ts.Debug.assert(!exportedModulesMapCache || !!state.exportedModulesMap, "Compute visible to outside map only if visibleToOutsideReferencedMap present in the state");
|
|
99074
|
-
if (state.hasCalledUpdateShapeSignature.has(sourceFile.resolvedPath) || cacheToUpdateSignature.has(sourceFile.resolvedPath)) {
|
|
99181
|
+
if ((_a = state.hasCalledUpdateShapeSignature) === null || _a === void 0 ? void 0 : _a.has(sourceFile.resolvedPath))
|
|
99075
99182
|
return false;
|
|
99076
|
-
}
|
|
99077
99183
|
var info = state.fileInfos.get(sourceFile.resolvedPath);
|
|
99078
|
-
if (!info)
|
|
99079
|
-
return ts.Debug.fail();
|
|
99080
99184
|
var prevSignature = info.signature;
|
|
99081
99185
|
var latestSignature;
|
|
99082
99186
|
if (!sourceFile.isDeclarationFile && !useFileVersionAsSignature) {
|
|
@@ -99084,40 +99188,50 @@ var ts;
|
|
|
99084
99188
|
var firstDts_1 = ts.firstOrUndefined(emitOutput_1.outputFiles);
|
|
99085
99189
|
if (firstDts_1) {
|
|
99086
99190
|
ts.Debug.assert(ts.isDeclarationFileName(firstDts_1.name), "File extension for signature expected to be dts", function () { return "Found: " + ts.getAnyExtensionFromPath(firstDts_1.name) + " for " + firstDts_1.name + ":: All output files: " + JSON.stringify(emitOutput_1.outputFiles.map(function (f) { return f.name; })); });
|
|
99087
|
-
latestSignature = (
|
|
99088
|
-
if (
|
|
99089
|
-
updateExportedModules(sourceFile, emitOutput_1.exportedModulesFromDeclarationEmit
|
|
99191
|
+
latestSignature = computeSignature(firstDts_1.text, computeHash);
|
|
99192
|
+
if (latestSignature !== prevSignature) {
|
|
99193
|
+
updateExportedModules(state, sourceFile, emitOutput_1.exportedModulesFromDeclarationEmit);
|
|
99090
99194
|
}
|
|
99091
99195
|
}
|
|
99092
99196
|
}
|
|
99093
99197
|
if (latestSignature === undefined) {
|
|
99094
99198
|
latestSignature = sourceFile.version;
|
|
99095
|
-
if (
|
|
99199
|
+
if (state.exportedModulesMap && latestSignature !== prevSignature) {
|
|
99200
|
+
(state.oldExportedModulesMap || (state.oldExportedModulesMap = new ts.Map())).set(sourceFile.resolvedPath, state.exportedModulesMap.getValues(sourceFile.resolvedPath) || false);
|
|
99096
99201
|
var references = state.referencedMap ? state.referencedMap.getValues(sourceFile.resolvedPath) : undefined;
|
|
99097
99202
|
if (references) {
|
|
99098
|
-
|
|
99203
|
+
state.exportedModulesMap.set(sourceFile.resolvedPath, references);
|
|
99099
99204
|
}
|
|
99100
99205
|
else {
|
|
99101
|
-
|
|
99206
|
+
state.exportedModulesMap.deleteKey(sourceFile.resolvedPath);
|
|
99102
99207
|
}
|
|
99103
99208
|
}
|
|
99104
99209
|
}
|
|
99105
|
-
|
|
99210
|
+
(state.oldSignatures || (state.oldSignatures = new ts.Map())).set(sourceFile.resolvedPath, prevSignature || false);
|
|
99211
|
+
(state.hasCalledUpdateShapeSignature || (state.hasCalledUpdateShapeSignature = new ts.Set())).add(sourceFile.resolvedPath);
|
|
99212
|
+
info.signature = latestSignature;
|
|
99106
99213
|
return latestSignature !== prevSignature;
|
|
99107
99214
|
}
|
|
99108
99215
|
BuilderState.updateShapeSignature = updateShapeSignature;
|
|
99109
|
-
function
|
|
99216
|
+
function computeSignature(text, computeHash) {
|
|
99217
|
+
return (computeHash || ts.generateDjb2Hash)(text);
|
|
99218
|
+
}
|
|
99219
|
+
BuilderState.computeSignature = computeSignature;
|
|
99220
|
+
function updateExportedModules(state, sourceFile, exportedModulesFromDeclarationEmit) {
|
|
99221
|
+
if (!state.exportedModulesMap)
|
|
99222
|
+
return;
|
|
99223
|
+
(state.oldExportedModulesMap || (state.oldExportedModulesMap = new ts.Map())).set(sourceFile.resolvedPath, state.exportedModulesMap.getValues(sourceFile.resolvedPath) || false);
|
|
99110
99224
|
if (!exportedModulesFromDeclarationEmit) {
|
|
99111
|
-
|
|
99225
|
+
state.exportedModulesMap.deleteKey(sourceFile.resolvedPath);
|
|
99112
99226
|
return;
|
|
99113
99227
|
}
|
|
99114
99228
|
var exportedModules;
|
|
99115
99229
|
exportedModulesFromDeclarationEmit.forEach(function (symbol) { return addExportedModule(getReferencedFilesFromImportedModuleSymbol(symbol)); });
|
|
99116
99230
|
if (exportedModules) {
|
|
99117
|
-
|
|
99231
|
+
state.exportedModulesMap.set(sourceFile.resolvedPath, exportedModules);
|
|
99118
99232
|
}
|
|
99119
99233
|
else {
|
|
99120
|
-
|
|
99234
|
+
state.exportedModulesMap.deleteKey(sourceFile.resolvedPath);
|
|
99121
99235
|
}
|
|
99122
99236
|
function addExportedModule(exportedModulePaths) {
|
|
99123
99237
|
if (exportedModulePaths === null || exportedModulePaths === void 0 ? void 0 : exportedModulePaths.length) {
|
|
@@ -99129,15 +99243,6 @@ var ts;
|
|
|
99129
99243
|
}
|
|
99130
99244
|
}
|
|
99131
99245
|
BuilderState.updateExportedModules = updateExportedModules;
|
|
99132
|
-
function updateExportedFilesMapFromCache(state, exportedModulesMapCache) {
|
|
99133
|
-
var _a;
|
|
99134
|
-
if (exportedModulesMapCache) {
|
|
99135
|
-
ts.Debug.assert(!!state.exportedModulesMap);
|
|
99136
|
-
(_a = exportedModulesMapCache.deletedKeys()) === null || _a === void 0 ? void 0 : _a.forEach(function (path) { return state.exportedModulesMap.deleteKey(path); });
|
|
99137
|
-
exportedModulesMapCache.forEach(function (exportedModules, path) { return state.exportedModulesMap.set(path, exportedModules); });
|
|
99138
|
-
}
|
|
99139
|
-
}
|
|
99140
|
-
BuilderState.updateExportedFilesMapFromCache = updateExportedFilesMapFromCache;
|
|
99141
99246
|
function getAllDependencies(state, programOfThisState, sourceFile) {
|
|
99142
99247
|
var compilerOptions = programOfThisState.getCompilerOptions();
|
|
99143
99248
|
if (ts.outFile(compilerOptions)) {
|
|
@@ -99221,7 +99326,7 @@ var ts;
|
|
|
99221
99326
|
}
|
|
99222
99327
|
return getAllFilesExcludingDefaultLibraryFile(state, programOfThisState, sourceFileWithUpdatedShape);
|
|
99223
99328
|
}
|
|
99224
|
-
function getFilesAffectedByUpdatedShapeWhenModuleEmit(state, programOfThisState, sourceFileWithUpdatedShape,
|
|
99329
|
+
function getFilesAffectedByUpdatedShapeWhenModuleEmit(state, programOfThisState, sourceFileWithUpdatedShape, cancellationToken, computeHash) {
|
|
99225
99330
|
if (isFileAffectingGlobalScope(sourceFileWithUpdatedShape)) {
|
|
99226
99331
|
return getAllFilesExcludingDefaultLibraryFile(state, programOfThisState, sourceFileWithUpdatedShape);
|
|
99227
99332
|
}
|
|
@@ -99237,7 +99342,7 @@ var ts;
|
|
|
99237
99342
|
if (!seenFileNamesMap.has(currentPath)) {
|
|
99238
99343
|
var currentSourceFile = programOfThisState.getSourceFileByPath(currentPath);
|
|
99239
99344
|
seenFileNamesMap.set(currentPath, currentSourceFile);
|
|
99240
|
-
if (currentSourceFile && updateShapeSignature(state, programOfThisState, currentSourceFile,
|
|
99345
|
+
if (currentSourceFile && updateShapeSignature(state, programOfThisState, currentSourceFile, cancellationToken, computeHash)) {
|
|
99241
99346
|
queue.push.apply(queue, getReferencedByPaths(state, currentSourceFile.resolvedPath));
|
|
99242
99347
|
}
|
|
99243
99348
|
}
|
|
@@ -99252,29 +99357,31 @@ var ts;
|
|
|
99252
99357
|
return map1 === map2 || map1 !== undefined && map2 !== undefined && map1.size === map2.size && !ts.forEachKey(map1, function (key) { return !map2.has(key); });
|
|
99253
99358
|
}
|
|
99254
99359
|
function createBuilderProgramState(newProgram, getCanonicalFileName, oldState, disableUseFileVersionAsSignature) {
|
|
99360
|
+
var _a, _b;
|
|
99255
99361
|
var state = ts.BuilderState.create(newProgram, getCanonicalFileName, oldState, disableUseFileVersionAsSignature);
|
|
99256
99362
|
state.program = newProgram;
|
|
99257
99363
|
var compilerOptions = newProgram.getCompilerOptions();
|
|
99258
99364
|
state.compilerOptions = compilerOptions;
|
|
99259
|
-
|
|
99365
|
+
var outFilePath = ts.outFile(compilerOptions);
|
|
99366
|
+
if (!outFilePath) {
|
|
99260
99367
|
state.semanticDiagnosticsPerFile = new ts.Map();
|
|
99261
99368
|
}
|
|
99369
|
+
else if (compilerOptions.composite && (oldState === null || oldState === void 0 ? void 0 : oldState.outSignature) && outFilePath === ts.outFile(oldState === null || oldState === void 0 ? void 0 : oldState.compilerOptions)) {
|
|
99370
|
+
state.outSignature = oldState === null || oldState === void 0 ? void 0 : oldState.outSignature;
|
|
99371
|
+
}
|
|
99262
99372
|
state.changedFilesSet = new ts.Set();
|
|
99373
|
+
state.dtsChangeTime = compilerOptions.composite ? oldState === null || oldState === void 0 ? void 0 : oldState.dtsChangeTime : undefined;
|
|
99263
99374
|
var useOldState = ts.BuilderState.canReuseOldState(state.referencedMap, oldState);
|
|
99264
99375
|
var oldCompilerOptions = useOldState ? oldState.compilerOptions : undefined;
|
|
99265
99376
|
var canCopySemanticDiagnostics = useOldState && oldState.semanticDiagnosticsPerFile && !!state.semanticDiagnosticsPerFile &&
|
|
99266
99377
|
!ts.compilerOptionsAffectSemanticDiagnostics(compilerOptions, oldCompilerOptions);
|
|
99378
|
+
var canCopyEmitSignatures = compilerOptions.composite &&
|
|
99379
|
+
(oldState === null || oldState === void 0 ? void 0 : oldState.emitSignatures) &&
|
|
99380
|
+
!outFilePath &&
|
|
99381
|
+
!ts.compilerOptionsAffectDeclarationPath(compilerOptions, oldCompilerOptions);
|
|
99267
99382
|
if (useOldState) {
|
|
99268
|
-
|
|
99269
|
-
|
|
99270
|
-
ts.Debug.assert(!oldState.affectedFiles && (!affectedSignatures || !affectedSignatures.size), "Cannot reuse if only few affected files of currentChangedFile were iterated");
|
|
99271
|
-
}
|
|
99272
|
-
var changedFilesSet = oldState.changedFilesSet;
|
|
99273
|
-
if (canCopySemanticDiagnostics) {
|
|
99274
|
-
ts.Debug.assert(!changedFilesSet || !ts.forEachKey(changedFilesSet, function (path) { return oldState.semanticDiagnosticsPerFile.has(path); }), "Semantic diagnostics shouldnt be available for changed files");
|
|
99275
|
-
}
|
|
99276
|
-
changedFilesSet === null || changedFilesSet === void 0 ? void 0 : changedFilesSet.forEach(function (value) { return state.changedFilesSet.add(value); });
|
|
99277
|
-
if (!ts.outFile(compilerOptions) && oldState.affectedFilesPendingEmit) {
|
|
99383
|
+
(_a = oldState.changedFilesSet) === null || _a === void 0 ? void 0 : _a.forEach(function (value) { return state.changedFilesSet.add(value); });
|
|
99384
|
+
if (!outFilePath && oldState.affectedFilesPendingEmit) {
|
|
99278
99385
|
state.affectedFilesPendingEmit = oldState.affectedFilesPendingEmit.slice();
|
|
99279
99386
|
state.affectedFilesPendingEmitKind = oldState.affectedFilesPendingEmitKind && new ts.Map(oldState.affectedFilesPendingEmitKind);
|
|
99280
99387
|
state.affectedFilesPendingEmitIndex = oldState.affectedFilesPendingEmitIndex;
|
|
@@ -99291,6 +99398,7 @@ var ts;
|
|
|
99291
99398
|
if (!useOldState ||
|
|
99292
99399
|
!(oldInfo = oldState.fileInfos.get(sourceFilePath)) ||
|
|
99293
99400
|
oldInfo.version !== info.version ||
|
|
99401
|
+
oldInfo.impliedFormat !== info.impliedFormat ||
|
|
99294
99402
|
!hasSameKeys(newReferences = referencedMap && referencedMap.getValues(sourceFilePath), oldReferencedMap && oldReferencedMap.getValues(sourceFilePath)) ||
|
|
99295
99403
|
newReferences && ts.forEachKey(newReferences, function (path) { return !state.fileInfos.has(path) && oldState.fileInfos.has(path); })) {
|
|
99296
99404
|
state.changedFilesSet.add(sourceFilePath);
|
|
@@ -99310,24 +99418,22 @@ var ts;
|
|
|
99310
99418
|
state.semanticDiagnosticsFromOldState.add(sourceFilePath);
|
|
99311
99419
|
}
|
|
99312
99420
|
}
|
|
99421
|
+
if (canCopyEmitSignatures) {
|
|
99422
|
+
var oldEmitSignature = oldState.emitSignatures.get(sourceFilePath);
|
|
99423
|
+
if (oldEmitSignature)
|
|
99424
|
+
(state.emitSignatures || (state.emitSignatures = new ts.Map())).set(sourceFilePath, oldEmitSignature);
|
|
99425
|
+
}
|
|
99313
99426
|
});
|
|
99314
99427
|
if (useOldState && ts.forEachEntry(oldState.fileInfos, function (info, sourceFilePath) { return info.affectsGlobalScope && !state.fileInfos.has(sourceFilePath); })) {
|
|
99315
99428
|
ts.BuilderState.getAllFilesExcludingDefaultLibraryFile(state, newProgram, undefined)
|
|
99316
99429
|
.forEach(function (file) { return state.changedFilesSet.add(file.resolvedPath); });
|
|
99317
99430
|
}
|
|
99318
|
-
else if (oldCompilerOptions && !
|
|
99431
|
+
else if (oldCompilerOptions && !outFilePath && ts.compilerOptionsAffectEmit(compilerOptions, oldCompilerOptions)) {
|
|
99319
99432
|
newProgram.getSourceFiles().forEach(function (f) { return addToAffectedFilesPendingEmit(state, f.resolvedPath, 1); });
|
|
99320
99433
|
ts.Debug.assert(!state.seenAffectedFiles || !state.seenAffectedFiles.size);
|
|
99321
99434
|
state.seenAffectedFiles = state.seenAffectedFiles || new ts.Set();
|
|
99322
99435
|
}
|
|
99323
|
-
|
|
99324
|
-
ts.forEachEntry(oldState.fileInfos, function (info, sourceFilePath) {
|
|
99325
|
-
if (state.fileInfos.has(sourceFilePath) && state.fileInfos.get(sourceFilePath).impliedFormat !== info.impliedFormat) {
|
|
99326
|
-
state.changedFilesSet.add(sourceFilePath);
|
|
99327
|
-
}
|
|
99328
|
-
});
|
|
99329
|
-
}
|
|
99330
|
-
state.buildInfoEmitPending = !!state.changedFilesSet.size;
|
|
99436
|
+
state.buildInfoEmitPending = !useOldState || state.changedFilesSet.size !== (((_b = oldState.changedFilesSet) === null || _b === void 0 ? void 0 : _b.size) || 0);
|
|
99331
99437
|
return state;
|
|
99332
99438
|
}
|
|
99333
99439
|
function convertToDiagnostics(diagnostics, newProgram, getCanonicalFileName) {
|
|
@@ -99360,33 +99466,40 @@ var ts;
|
|
|
99360
99466
|
ts.BuilderState.releaseCache(state);
|
|
99361
99467
|
state.program = undefined;
|
|
99362
99468
|
}
|
|
99363
|
-
function
|
|
99364
|
-
var
|
|
99365
|
-
|
|
99366
|
-
|
|
99367
|
-
|
|
99368
|
-
|
|
99369
|
-
|
|
99370
|
-
|
|
99371
|
-
|
|
99372
|
-
|
|
99373
|
-
|
|
99374
|
-
|
|
99375
|
-
|
|
99376
|
-
|
|
99377
|
-
|
|
99378
|
-
|
|
99379
|
-
|
|
99380
|
-
|
|
99381
|
-
|
|
99382
|
-
|
|
99383
|
-
|
|
99469
|
+
function backupEmitBuilderProgramState(state) {
|
|
99470
|
+
var outFilePath = ts.outFile(state.compilerOptions);
|
|
99471
|
+
ts.Debug.assert(!state.changedFilesSet.size || outFilePath);
|
|
99472
|
+
return {
|
|
99473
|
+
affectedFilesPendingEmit: state.affectedFilesPendingEmit && state.affectedFilesPendingEmit.slice(),
|
|
99474
|
+
affectedFilesPendingEmitKind: state.affectedFilesPendingEmitKind && new ts.Map(state.affectedFilesPendingEmitKind),
|
|
99475
|
+
affectedFilesPendingEmitIndex: state.affectedFilesPendingEmitIndex,
|
|
99476
|
+
seenEmittedFiles: state.seenEmittedFiles && new ts.Map(state.seenEmittedFiles),
|
|
99477
|
+
programEmitComplete: state.programEmitComplete,
|
|
99478
|
+
emitSignatures: state.emitSignatures && new ts.Map(state.emitSignatures),
|
|
99479
|
+
outSignature: state.outSignature,
|
|
99480
|
+
dtsChangeTime: state.dtsChangeTime,
|
|
99481
|
+
hasChangedEmitSignature: state.hasChangedEmitSignature,
|
|
99482
|
+
changedFilesSet: outFilePath ? new ts.Set(state.changedFilesSet) : undefined,
|
|
99483
|
+
};
|
|
99484
|
+
}
|
|
99485
|
+
function restoreEmitBuilderProgramState(state, backupEmitState) {
|
|
99486
|
+
state.affectedFilesPendingEmit = backupEmitState.affectedFilesPendingEmit;
|
|
99487
|
+
state.affectedFilesPendingEmitKind = backupEmitState.affectedFilesPendingEmitKind;
|
|
99488
|
+
state.affectedFilesPendingEmitIndex = backupEmitState.affectedFilesPendingEmitIndex;
|
|
99489
|
+
state.seenEmittedFiles = backupEmitState.seenEmittedFiles;
|
|
99490
|
+
state.programEmitComplete = backupEmitState.programEmitComplete;
|
|
99491
|
+
state.emitSignatures = backupEmitState.emitSignatures;
|
|
99492
|
+
state.outSignature = backupEmitState.outSignature;
|
|
99493
|
+
state.dtsChangeTime = backupEmitState.dtsChangeTime;
|
|
99494
|
+
state.hasChangedEmitSignature = backupEmitState.hasChangedEmitSignature;
|
|
99495
|
+
if (backupEmitState.changedFilesSet)
|
|
99496
|
+
state.changedFilesSet = backupEmitState.changedFilesSet;
|
|
99384
99497
|
}
|
|
99385
99498
|
function assertSourceFileOkWithoutNextAffectedCall(state, sourceFile) {
|
|
99386
99499
|
ts.Debug.assert(!sourceFile || !state.affectedFiles || state.affectedFiles[state.affectedFilesIndex - 1] !== sourceFile || !state.semanticDiagnosticsPerFile.has(sourceFile.resolvedPath));
|
|
99387
99500
|
}
|
|
99388
99501
|
function getNextAffectedFile(state, cancellationToken, computeHash, host) {
|
|
99389
|
-
var _a;
|
|
99502
|
+
var _a, _b;
|
|
99390
99503
|
while (true) {
|
|
99391
99504
|
var affectedFiles = state.affectedFiles;
|
|
99392
99505
|
if (affectedFiles) {
|
|
@@ -99403,10 +99516,8 @@ var ts;
|
|
|
99403
99516
|
}
|
|
99404
99517
|
state.changedFilesSet.delete(state.currentChangedFilePath);
|
|
99405
99518
|
state.currentChangedFilePath = undefined;
|
|
99406
|
-
|
|
99407
|
-
state.
|
|
99408
|
-
ts.BuilderState.updateExportedFilesMapFromCache(state, state.currentAffectedFilesExportedModulesMap);
|
|
99409
|
-
(_a = state.currentAffectedFilesExportedModulesMap) === null || _a === void 0 ? void 0 : _a.clear();
|
|
99519
|
+
(_a = state.oldSignatures) === null || _a === void 0 ? void 0 : _a.clear();
|
|
99520
|
+
(_b = state.oldExportedModulesMap) === null || _b === void 0 ? void 0 : _b.clear();
|
|
99410
99521
|
state.affectedFiles = undefined;
|
|
99411
99522
|
}
|
|
99412
99523
|
var nextKey = state.changedFilesSet.keys().next();
|
|
@@ -99419,12 +99530,7 @@ var ts;
|
|
|
99419
99530
|
ts.Debug.assert(!state.semanticDiagnosticsPerFile);
|
|
99420
99531
|
return program;
|
|
99421
99532
|
}
|
|
99422
|
-
|
|
99423
|
-
state.currentAffectedFilesSignatures = new ts.Map();
|
|
99424
|
-
if (state.exportedModulesMap) {
|
|
99425
|
-
state.currentAffectedFilesExportedModulesMap || (state.currentAffectedFilesExportedModulesMap = ts.BuilderState.createManyToManyPathMap());
|
|
99426
|
-
}
|
|
99427
|
-
state.affectedFiles = ts.BuilderState.getFilesAffectedBy(state, program, nextKey.value, cancellationToken, computeHash, state.currentAffectedFilesSignatures, state.currentAffectedFilesExportedModulesMap);
|
|
99533
|
+
state.affectedFiles = ts.BuilderState.getFilesAffectedByWithOldState(state, program, nextKey.value, cancellationToken, computeHash);
|
|
99428
99534
|
state.currentChangedFilePath = nextKey.value;
|
|
99429
99535
|
state.affectedFilesIndex = 0;
|
|
99430
99536
|
if (!state.seenAffectedFiles)
|
|
@@ -99468,14 +99574,12 @@ var ts;
|
|
|
99468
99574
|
}
|
|
99469
99575
|
}
|
|
99470
99576
|
function handleDtsMayChangeOfAffectedFile(state, affectedFile, cancellationToken, computeHash, host) {
|
|
99471
|
-
var _a;
|
|
99472
99577
|
removeSemanticDiagnosticsOf(state, affectedFile.resolvedPath);
|
|
99473
99578
|
if (state.allFilesExcludingDefaultLibraryFile === state.affectedFiles) {
|
|
99474
99579
|
removeDiagnosticsOfLibraryFiles(state);
|
|
99475
|
-
ts.BuilderState.updateShapeSignature(state, ts.Debug.checkDefined(state.program), affectedFile,
|
|
99580
|
+
ts.BuilderState.updateShapeSignature(state, ts.Debug.checkDefined(state.program), affectedFile, cancellationToken, computeHash);
|
|
99476
99581
|
return;
|
|
99477
99582
|
}
|
|
99478
|
-
ts.Debug.assert(state.hasCalledUpdateShapeSignature.has(affectedFile.resolvedPath) || ((_a = state.currentAffectedFilesSignatures) === null || _a === void 0 ? void 0 : _a.has(affectedFile.resolvedPath)), "Signature not updated for affected file: " + affectedFile.fileName);
|
|
99479
99583
|
if (state.compilerOptions.assumeChangesOnlyAffectDirectDependencies)
|
|
99480
99584
|
return;
|
|
99481
99585
|
handleDtsMayChangeOfReferencingExportOfAffectedFile(state, affectedFile, cancellationToken, computeHash, host);
|
|
@@ -99486,7 +99590,7 @@ var ts;
|
|
|
99486
99590
|
var program = ts.Debug.checkDefined(state.program);
|
|
99487
99591
|
var sourceFile = program.getSourceFileByPath(path);
|
|
99488
99592
|
if (sourceFile) {
|
|
99489
|
-
ts.BuilderState.updateShapeSignature(state, program, sourceFile,
|
|
99593
|
+
ts.BuilderState.updateShapeSignature(state, program, sourceFile, cancellationToken, computeHash, !host.disableUseFileVersionAsSignature);
|
|
99490
99594
|
if (ts.getEmitDeclarations(state.compilerOptions)) {
|
|
99491
99595
|
addToAffectedFilesPendingEmit(state, path, 0);
|
|
99492
99596
|
}
|
|
@@ -99502,24 +99606,10 @@ var ts;
|
|
|
99502
99606
|
return !state.semanticDiagnosticsFromOldState.size;
|
|
99503
99607
|
}
|
|
99504
99608
|
function isChangedSignature(state, path) {
|
|
99505
|
-
var
|
|
99506
|
-
var
|
|
99609
|
+
var oldSignature = ts.Debug.checkDefined(state.oldSignatures).get(path) || undefined;
|
|
99610
|
+
var newSignature = ts.Debug.checkDefined(state.fileInfos.get(path)).signature;
|
|
99507
99611
|
return newSignature !== oldSignature;
|
|
99508
99612
|
}
|
|
99509
|
-
function forEachKeyOfExportedModulesMap(state, filePath, fn) {
|
|
99510
|
-
var keys = state.currentAffectedFilesExportedModulesMap.getKeys(filePath);
|
|
99511
|
-
var result = keys && ts.forEachKey(keys, fn);
|
|
99512
|
-
if (result)
|
|
99513
|
-
return result;
|
|
99514
|
-
keys = state.exportedModulesMap.getKeys(filePath);
|
|
99515
|
-
return keys && ts.forEachKey(keys, function (exportedFromPath) {
|
|
99516
|
-
var _a;
|
|
99517
|
-
return !state.currentAffectedFilesExportedModulesMap.hasKey(exportedFromPath) &&
|
|
99518
|
-
!((_a = state.currentAffectedFilesExportedModulesMap.deletedKeys()) === null || _a === void 0 ? void 0 : _a.has(exportedFromPath)) ?
|
|
99519
|
-
fn(exportedFromPath) :
|
|
99520
|
-
undefined;
|
|
99521
|
-
});
|
|
99522
|
-
}
|
|
99523
99613
|
function handleDtsMayChangeOfGlobalScope(state, filePath, cancellationToken, computeHash, host) {
|
|
99524
99614
|
var _a;
|
|
99525
99615
|
if (!((_a = state.fileInfos.get(filePath)) === null || _a === void 0 ? void 0 : _a.affectsGlobalScope))
|
|
@@ -99530,6 +99620,7 @@ var ts;
|
|
|
99530
99620
|
return true;
|
|
99531
99621
|
}
|
|
99532
99622
|
function handleDtsMayChangeOfReferencingExportOfAffectedFile(state, affectedFile, cancellationToken, computeHash, host) {
|
|
99623
|
+
var _a;
|
|
99533
99624
|
if (!state.exportedModulesMap || !state.changedFilesSet.has(affectedFile.resolvedPath))
|
|
99534
99625
|
return;
|
|
99535
99626
|
if (!isChangedSignature(state, affectedFile.resolvedPath))
|
|
@@ -99552,9 +99643,8 @@ var ts;
|
|
|
99552
99643
|
}
|
|
99553
99644
|
}
|
|
99554
99645
|
}
|
|
99555
|
-
ts.Debug.assert(!!state.currentAffectedFilesExportedModulesMap);
|
|
99556
99646
|
var seenFileAndExportsOfFile = new ts.Set();
|
|
99557
|
-
|
|
99647
|
+
(_a = state.exportedModulesMap.getKeys(affectedFile.resolvedPath)) === null || _a === void 0 ? void 0 : _a.forEach(function (exportedFromPath) {
|
|
99558
99648
|
if (handleDtsMayChangeOfGlobalScope(state, exportedFromPath, cancellationToken, computeHash, host))
|
|
99559
99649
|
return true;
|
|
99560
99650
|
var references = state.referencedMap.getKeys(exportedFromPath);
|
|
@@ -99564,17 +99654,16 @@ var ts;
|
|
|
99564
99654
|
});
|
|
99565
99655
|
}
|
|
99566
99656
|
function handleDtsMayChangeOfFileAndExportsOfFile(state, filePath, seenFileAndExportsOfFile, cancellationToken, computeHash, host) {
|
|
99567
|
-
var _a;
|
|
99657
|
+
var _a, _b;
|
|
99568
99658
|
if (!ts.tryAddToSet(seenFileAndExportsOfFile, filePath))
|
|
99569
99659
|
return undefined;
|
|
99570
99660
|
if (handleDtsMayChangeOfGlobalScope(state, filePath, cancellationToken, computeHash, host))
|
|
99571
99661
|
return true;
|
|
99572
99662
|
handleDtsMayChangeOf(state, filePath, cancellationToken, computeHash, host);
|
|
99573
|
-
|
|
99574
|
-
forEachKeyOfExportedModulesMap(state, filePath, function (exportedFromPath) {
|
|
99663
|
+
(_a = state.exportedModulesMap.getKeys(filePath)) === null || _a === void 0 ? void 0 : _a.forEach(function (exportedFromPath) {
|
|
99575
99664
|
return handleDtsMayChangeOfFileAndExportsOfFile(state, exportedFromPath, seenFileAndExportsOfFile, cancellationToken, computeHash, host);
|
|
99576
99665
|
});
|
|
99577
|
-
(
|
|
99666
|
+
(_b = state.referencedMap.getKeys(filePath)) === null || _b === void 0 ? void 0 : _b.forEach(function (referencingFilePath) {
|
|
99578
99667
|
return !seenFileAndExportsOfFile.has(referencingFilePath) &&
|
|
99579
99668
|
handleDtsMayChangeOf(state, referencingFilePath, cancellationToken, computeHash, host);
|
|
99580
99669
|
});
|
|
@@ -99590,12 +99679,12 @@ var ts;
|
|
|
99590
99679
|
}
|
|
99591
99680
|
else {
|
|
99592
99681
|
state.seenAffectedFiles.add(affected.resolvedPath);
|
|
99682
|
+
state.buildInfoEmitPending = true;
|
|
99593
99683
|
if (emitKind !== undefined) {
|
|
99594
99684
|
(state.seenEmittedFiles || (state.seenEmittedFiles = new ts.Map())).set(affected.resolvedPath, emitKind);
|
|
99595
99685
|
}
|
|
99596
99686
|
if (isPendingEmit) {
|
|
99597
99687
|
state.affectedFilesPendingEmitIndex++;
|
|
99598
|
-
state.buildInfoEmitPending = true;
|
|
99599
99688
|
}
|
|
99600
99689
|
else {
|
|
99601
99690
|
state.affectedFilesIndex++;
|
|
@@ -99627,29 +99716,65 @@ var ts;
|
|
|
99627
99716
|
}
|
|
99628
99717
|
return ts.filterSemanticDiagnostics(diagnostics, state.compilerOptions);
|
|
99629
99718
|
}
|
|
99630
|
-
function
|
|
99631
|
-
|
|
99632
|
-
|
|
99719
|
+
function isProgramBundleEmitBuildInfo(info) {
|
|
99720
|
+
return !!ts.outFile(info.options || {});
|
|
99721
|
+
}
|
|
99722
|
+
ts.isProgramBundleEmitBuildInfo = isProgramBundleEmitBuildInfo;
|
|
99723
|
+
function getProgramBuildInfo(state, getCanonicalFileName, host) {
|
|
99724
|
+
var outFilePath = ts.outFile(state.compilerOptions);
|
|
99725
|
+
if (outFilePath && !state.compilerOptions.composite)
|
|
99726
|
+
return;
|
|
99633
99727
|
var currentDirectory = ts.Debug.checkDefined(state.program).getCurrentDirectory();
|
|
99634
99728
|
var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(ts.getTsBuildInfoEmitOutputFilePath(state.compilerOptions), currentDirectory));
|
|
99729
|
+
state.dtsChangeTime = state.hasChangedEmitSignature ? ts.getCurrentTime(host).getTime() : state.dtsChangeTime;
|
|
99730
|
+
if (outFilePath) {
|
|
99731
|
+
var fileNames_1 = [];
|
|
99732
|
+
var fileInfos_1 = [];
|
|
99733
|
+
state.program.getRootFileNames().forEach(function (f) {
|
|
99734
|
+
var sourceFile = state.program.getSourceFile(f);
|
|
99735
|
+
if (!sourceFile)
|
|
99736
|
+
return;
|
|
99737
|
+
fileNames_1.push(relativeToBuildInfo(sourceFile.resolvedPath));
|
|
99738
|
+
fileInfos_1.push(sourceFile.version);
|
|
99739
|
+
});
|
|
99740
|
+
var result_15 = {
|
|
99741
|
+
fileNames: fileNames_1,
|
|
99742
|
+
fileInfos: fileInfos_1,
|
|
99743
|
+
options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions, "affectsBundleEmitBuildInfo"),
|
|
99744
|
+
outSignature: state.outSignature,
|
|
99745
|
+
dtsChangeTime: state.dtsChangeTime,
|
|
99746
|
+
};
|
|
99747
|
+
return result_15;
|
|
99748
|
+
}
|
|
99635
99749
|
var fileNames = [];
|
|
99636
99750
|
var fileNameToFileId = new ts.Map();
|
|
99637
99751
|
var fileIdsList;
|
|
99638
99752
|
var fileNamesToFileIdListId;
|
|
99753
|
+
var emitSignatures;
|
|
99639
99754
|
var fileInfos = ts.arrayFrom(state.fileInfos.entries(), function (_a) {
|
|
99755
|
+
var _b, _c;
|
|
99640
99756
|
var key = _a[0], value = _a[1];
|
|
99641
99757
|
var fileId = toFileId(key);
|
|
99642
99758
|
ts.Debug.assert(fileNames[fileId - 1] === relativeToBuildInfo(key));
|
|
99643
|
-
var
|
|
99644
|
-
var actualSignature =
|
|
99759
|
+
var oldSignature = (_b = state.oldSignatures) === null || _b === void 0 ? void 0 : _b.get(key);
|
|
99760
|
+
var actualSignature = oldSignature !== undefined ? oldSignature || undefined : value.signature;
|
|
99761
|
+
if (state.compilerOptions.composite) {
|
|
99762
|
+
var file = state.program.getSourceFileByPath(key);
|
|
99763
|
+
if (!ts.isJsonSourceFile(file) && ts.sourceFileMayBeEmitted(file, state.program)) {
|
|
99764
|
+
var emitSignature = (_c = state.emitSignatures) === null || _c === void 0 ? void 0 : _c.get(key);
|
|
99765
|
+
if (emitSignature !== actualSignature) {
|
|
99766
|
+
(emitSignatures || (emitSignatures = [])).push(emitSignature === undefined ? fileId : [fileId, emitSignature]);
|
|
99767
|
+
}
|
|
99768
|
+
}
|
|
99769
|
+
}
|
|
99645
99770
|
return value.version === actualSignature ?
|
|
99646
99771
|
value.affectsGlobalScope || value.impliedFormat ?
|
|
99647
99772
|
{ version: value.version, signature: undefined, affectsGlobalScope: value.affectsGlobalScope, impliedFormat: value.impliedFormat } :
|
|
99648
99773
|
value.version :
|
|
99649
99774
|
actualSignature !== undefined ?
|
|
99650
|
-
|
|
99775
|
+
oldSignature === undefined ?
|
|
99651
99776
|
value :
|
|
99652
|
-
{ version: value.version, signature:
|
|
99777
|
+
{ version: value.version, signature: actualSignature, affectsGlobalScope: value.affectsGlobalScope, impliedFormat: value.impliedFormat } :
|
|
99653
99778
|
{ version: value.version, signature: false, affectsGlobalScope: value.affectsGlobalScope, impliedFormat: value.impliedFormat };
|
|
99654
99779
|
});
|
|
99655
99780
|
var referencedMap;
|
|
@@ -99663,16 +99788,12 @@ var ts;
|
|
|
99663
99788
|
if (state.exportedModulesMap) {
|
|
99664
99789
|
exportedModulesMap = ts.mapDefined(ts.arrayFrom(state.exportedModulesMap.keys()).sort(ts.compareStringsCaseSensitive), function (key) {
|
|
99665
99790
|
var _a;
|
|
99666
|
-
|
|
99667
|
-
|
|
99668
|
-
|
|
99669
|
-
|
|
99670
|
-
|
|
99671
|
-
|
|
99672
|
-
return [toFileId(key), toFileIdListId(newValue)];
|
|
99673
|
-
}
|
|
99674
|
-
}
|
|
99675
|
-
return [toFileId(key), toFileIdListId(state.exportedModulesMap.getValues(key))];
|
|
99791
|
+
var oldValue = (_a = state.oldExportedModulesMap) === null || _a === void 0 ? void 0 : _a.get(key);
|
|
99792
|
+
if (oldValue === undefined)
|
|
99793
|
+
return [toFileId(key), toFileIdListId(state.exportedModulesMap.getValues(key))];
|
|
99794
|
+
if (oldValue)
|
|
99795
|
+
return [toFileId(key), toFileIdListId(oldValue)];
|
|
99796
|
+
return undefined;
|
|
99676
99797
|
});
|
|
99677
99798
|
}
|
|
99678
99799
|
var semanticDiagnosticsPerFile;
|
|
@@ -99683,9 +99804,7 @@ var ts;
|
|
|
99683
99804
|
(semanticDiagnosticsPerFile || (semanticDiagnosticsPerFile = [])).push(value.length ?
|
|
99684
99805
|
[
|
|
99685
99806
|
toFileId(key),
|
|
99686
|
-
|
|
99687
|
-
value :
|
|
99688
|
-
convertToReusableDiagnostics(value, relativeToBuildInfo)
|
|
99807
|
+
convertToReusableDiagnostics(value, relativeToBuildInfo)
|
|
99689
99808
|
] :
|
|
99690
99809
|
toFileId(key));
|
|
99691
99810
|
}
|
|
@@ -99700,16 +99819,27 @@ var ts;
|
|
|
99700
99819
|
}
|
|
99701
99820
|
}
|
|
99702
99821
|
}
|
|
99703
|
-
|
|
99822
|
+
var changeFileSet;
|
|
99823
|
+
if (state.changedFilesSet.size) {
|
|
99824
|
+
for (var _d = 0, _e = ts.arrayFrom(state.changedFilesSet.keys()).sort(ts.compareStringsCaseSensitive); _d < _e.length; _d++) {
|
|
99825
|
+
var path = _e[_d];
|
|
99826
|
+
(changeFileSet || (changeFileSet = [])).push(toFileId(path));
|
|
99827
|
+
}
|
|
99828
|
+
}
|
|
99829
|
+
var result = {
|
|
99704
99830
|
fileNames: fileNames,
|
|
99705
99831
|
fileInfos: fileInfos,
|
|
99706
|
-
options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions,
|
|
99832
|
+
options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions, "affectsMultiFileEmitBuildInfo"),
|
|
99707
99833
|
fileIdsList: fileIdsList,
|
|
99708
99834
|
referencedMap: referencedMap,
|
|
99709
99835
|
exportedModulesMap: exportedModulesMap,
|
|
99710
99836
|
semanticDiagnosticsPerFile: semanticDiagnosticsPerFile,
|
|
99711
99837
|
affectedFilesPendingEmit: affectedFilesPendingEmit,
|
|
99838
|
+
changeFileSet: changeFileSet,
|
|
99839
|
+
emitSignatures: emitSignatures,
|
|
99840
|
+
dtsChangeTime: state.dtsChangeTime,
|
|
99712
99841
|
};
|
|
99842
|
+
return result;
|
|
99713
99843
|
function relativeToBuildInfoEnsuringAbsolutePath(path) {
|
|
99714
99844
|
return relativeToBuildInfo(ts.getNormalizedAbsolutePath(path, currentDirectory));
|
|
99715
99845
|
}
|
|
@@ -99734,21 +99864,18 @@ var ts;
|
|
|
99734
99864
|
}
|
|
99735
99865
|
return fileIdListId;
|
|
99736
99866
|
}
|
|
99737
|
-
|
|
99738
|
-
|
|
99739
|
-
|
|
99740
|
-
|
|
99741
|
-
|
|
99742
|
-
|
|
99743
|
-
|
|
99744
|
-
|
|
99745
|
-
|
|
99746
|
-
optionKey === "strict" ||
|
|
99747
|
-
optionKey === "skiplibcheck" || optionKey === "skipdefaultlibcheck") {
|
|
99748
|
-
(result || (result = {}))[name] = convertToReusableCompilerOptionValue(optionInfo, options[name], relativeToBuildInfo);
|
|
99867
|
+
function convertToProgramBuildInfoCompilerOptions(options, optionKey) {
|
|
99868
|
+
var result;
|
|
99869
|
+
var optionsNameMap = ts.getOptionsNameMap().optionsNameMap;
|
|
99870
|
+
for (var _i = 0, _a = ts.getOwnKeys(options).sort(ts.compareStringsCaseSensitive); _i < _a.length; _i++) {
|
|
99871
|
+
var name = _a[_i];
|
|
99872
|
+
var optionInfo = optionsNameMap.get(name.toLowerCase());
|
|
99873
|
+
if (optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo[optionKey]) {
|
|
99874
|
+
(result || (result = {}))[name] = convertToReusableCompilerOptionValue(optionInfo, options[name], relativeToBuildInfoEnsuringAbsolutePath);
|
|
99875
|
+
}
|
|
99749
99876
|
}
|
|
99877
|
+
return result;
|
|
99750
99878
|
}
|
|
99751
|
-
return result;
|
|
99752
99879
|
}
|
|
99753
99880
|
function convertToReusableCompilerOptionValue(option, value, relativeToBuildInfo) {
|
|
99754
99881
|
if (option) {
|
|
@@ -99822,6 +99949,10 @@ var ts;
|
|
|
99822
99949
|
return { host: host, newProgram: newProgram, oldProgram: oldProgram, configFileParsingDiagnostics: configFileParsingDiagnostics || ts.emptyArray };
|
|
99823
99950
|
}
|
|
99824
99951
|
ts.getBuilderCreationParameters = getBuilderCreationParameters;
|
|
99952
|
+
function computeSignature(text, data, computeHash) {
|
|
99953
|
+
return ts.BuilderState.computeSignature((data === null || data === void 0 ? void 0 : data.sourceMapUrlPos) !== undefined ? text.substring(0, data.sourceMapUrlPos) : text, computeHash);
|
|
99954
|
+
}
|
|
99955
|
+
ts.computeSignature = computeSignature;
|
|
99825
99956
|
function createBuilderProgram(kind, _a) {
|
|
99826
99957
|
var newProgram = _a.newProgram, host = _a.host, oldProgram = _a.oldProgram, configFileParsingDiagnostics = _a.configFileParsingDiagnostics;
|
|
99827
99958
|
var oldState = oldProgram && oldProgram.getState();
|
|
@@ -99833,28 +99964,28 @@ var ts;
|
|
|
99833
99964
|
var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames());
|
|
99834
99965
|
var computeHash = ts.maybeBind(host, host.createHash);
|
|
99835
99966
|
var state = createBuilderProgramState(newProgram, getCanonicalFileName, oldState, host.disableUseFileVersionAsSignature);
|
|
99836
|
-
var
|
|
99837
|
-
newProgram.getProgramBuildInfo = function () { return getProgramBuildInfo(state, getCanonicalFileName); };
|
|
99967
|
+
var backupEmitState;
|
|
99968
|
+
newProgram.getProgramBuildInfo = function () { return getProgramBuildInfo(state, getCanonicalFileName, host); };
|
|
99838
99969
|
newProgram = undefined;
|
|
99839
99970
|
oldProgram = undefined;
|
|
99840
99971
|
oldState = undefined;
|
|
99841
99972
|
var getState = function () { return state; };
|
|
99842
99973
|
var builderProgram = createRedirectedBuilderProgram(getState, configFileParsingDiagnostics);
|
|
99843
99974
|
builderProgram.getState = getState;
|
|
99844
|
-
builderProgram.
|
|
99845
|
-
ts.Debug.assert(
|
|
99846
|
-
|
|
99975
|
+
builderProgram.backupEmitState = function () {
|
|
99976
|
+
ts.Debug.assert(backupEmitState === undefined);
|
|
99977
|
+
backupEmitState = backupEmitBuilderProgramState(state);
|
|
99847
99978
|
};
|
|
99848
|
-
builderProgram.
|
|
99849
|
-
state
|
|
99850
|
-
|
|
99979
|
+
builderProgram.restoreEmitState = function () {
|
|
99980
|
+
restoreEmitBuilderProgramState(state, ts.Debug.checkDefined(backupEmitState));
|
|
99981
|
+
backupEmitState = undefined;
|
|
99851
99982
|
};
|
|
99852
99983
|
builderProgram.getAllDependencies = function (sourceFile) { return ts.BuilderState.getAllDependencies(state, ts.Debug.checkDefined(state.program), sourceFile); };
|
|
99853
99984
|
builderProgram.getSemanticDiagnostics = getSemanticDiagnostics;
|
|
99854
99985
|
builderProgram.emit = emit;
|
|
99855
99986
|
builderProgram.releaseProgram = function () {
|
|
99856
99987
|
releaseCache(state);
|
|
99857
|
-
|
|
99988
|
+
backupEmitState = undefined;
|
|
99858
99989
|
};
|
|
99859
99990
|
if (kind === BuilderProgramKind.SemanticDiagnosticsBuilderProgram) {
|
|
99860
99991
|
builderProgram.getSemanticDiagnosticsOfNextAffectedFile = getSemanticDiagnosticsOfNextAffectedFile;
|
|
@@ -99900,35 +100031,57 @@ var ts;
|
|
|
99900
100031
|
affected = program;
|
|
99901
100032
|
}
|
|
99902
100033
|
}
|
|
99903
|
-
return toAffectedFileEmitResult(state, ts.Debug.checkDefined(state.program).emit(affected === state.program ? undefined : affected,
|
|
99904
|
-
|
|
100034
|
+
return toAffectedFileEmitResult(state, ts.Debug.checkDefined(state.program).emit(affected === state.program ? undefined : affected, ts.getEmitDeclarations(state.compilerOptions) ?
|
|
100035
|
+
getWriteFileCallback(writeFile, customTransformers) :
|
|
99905
100036
|
writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles || emitKind === 0, customTransformers), affected, emitKind, isPendingEmitFile);
|
|
99906
100037
|
}
|
|
99907
|
-
function
|
|
100038
|
+
function getWriteFileCallback(writeFile, customTransformers) {
|
|
99908
100039
|
return function (fileName, text, writeByteOrderMark, onError, sourceFiles, data) {
|
|
99909
|
-
var _a;
|
|
100040
|
+
var _a, _b, _c;
|
|
99910
100041
|
if (ts.isDeclarationFileName(fileName)) {
|
|
99911
|
-
ts.
|
|
99912
|
-
|
|
99913
|
-
|
|
99914
|
-
|
|
99915
|
-
|
|
99916
|
-
|
|
99917
|
-
|
|
99918
|
-
|
|
99919
|
-
|
|
99920
|
-
|
|
99921
|
-
|
|
99922
|
-
|
|
99923
|
-
|
|
100042
|
+
if (!ts.outFile(state.compilerOptions)) {
|
|
100043
|
+
ts.Debug.assert((sourceFiles === null || sourceFiles === void 0 ? void 0 : sourceFiles.length) === 1);
|
|
100044
|
+
var newSignature = void 0;
|
|
100045
|
+
if (!customTransformers) {
|
|
100046
|
+
var file = sourceFiles[0];
|
|
100047
|
+
var info = state.fileInfos.get(file.resolvedPath);
|
|
100048
|
+
if (info.signature === file.version) {
|
|
100049
|
+
newSignature = computeSignature(text, data, computeHash);
|
|
100050
|
+
if (newSignature !== file.version) {
|
|
100051
|
+
if (host.storeFilesChangingSignatureDuringEmit)
|
|
100052
|
+
(state.filesChangingSignature || (state.filesChangingSignature = new ts.Set())).add(file.resolvedPath);
|
|
100053
|
+
if (state.exportedModulesMap)
|
|
100054
|
+
ts.BuilderState.updateExportedModules(state, file, file.exportedModulesFromDeclarationEmit);
|
|
100055
|
+
if (state.affectedFiles) {
|
|
100056
|
+
var existing = (_a = state.oldSignatures) === null || _a === void 0 ? void 0 : _a.get(file.resolvedPath);
|
|
100057
|
+
if (existing === undefined)
|
|
100058
|
+
(state.oldSignatures || (state.oldSignatures = new ts.Map())).set(file.resolvedPath, info.signature || false);
|
|
100059
|
+
info.signature = newSignature;
|
|
100060
|
+
}
|
|
100061
|
+
else {
|
|
100062
|
+
info.signature = newSignature;
|
|
100063
|
+
(_b = state.oldExportedModulesMap) === null || _b === void 0 ? void 0 : _b.clear();
|
|
100064
|
+
}
|
|
100065
|
+
}
|
|
99924
100066
|
}
|
|
99925
|
-
|
|
99926
|
-
|
|
99927
|
-
|
|
99928
|
-
|
|
100067
|
+
}
|
|
100068
|
+
if (state.compilerOptions.composite) {
|
|
100069
|
+
var filePath = sourceFiles[0].resolvedPath;
|
|
100070
|
+
var oldSignature = (_c = state.emitSignatures) === null || _c === void 0 ? void 0 : _c.get(filePath);
|
|
100071
|
+
newSignature || (newSignature = computeSignature(text, data, computeHash));
|
|
100072
|
+
if (newSignature !== oldSignature) {
|
|
100073
|
+
(state.emitSignatures || (state.emitSignatures = new ts.Map())).set(filePath, newSignature);
|
|
100074
|
+
state.hasChangedEmitSignature = true;
|
|
99929
100075
|
}
|
|
99930
100076
|
}
|
|
99931
100077
|
}
|
|
100078
|
+
else if (state.compilerOptions.composite) {
|
|
100079
|
+
var newSignature = computeSignature(text, data, computeHash);
|
|
100080
|
+
if (newSignature !== state.outSignature) {
|
|
100081
|
+
state.outSignature = newSignature;
|
|
100082
|
+
state.hasChangedEmitSignature = true;
|
|
100083
|
+
}
|
|
100084
|
+
}
|
|
99932
100085
|
}
|
|
99933
100086
|
if (writeFile)
|
|
99934
100087
|
writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data);
|
|
@@ -99977,8 +100130,8 @@ var ts;
|
|
|
99977
100130
|
}
|
|
99978
100131
|
}
|
|
99979
100132
|
}
|
|
99980
|
-
return ts.Debug.checkDefined(state.program).emit(targetSourceFile,
|
|
99981
|
-
|
|
100133
|
+
return ts.Debug.checkDefined(state.program).emit(targetSourceFile, ts.getEmitDeclarations(state.compilerOptions) ?
|
|
100134
|
+
getWriteFileCallback(writeFile, customTransformers) :
|
|
99982
100135
|
writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles, customTransformers);
|
|
99983
100136
|
}
|
|
99984
100137
|
function getSemanticDiagnosticsOfNextAffectedFile(cancellationToken, ignoreSourceFile) {
|
|
@@ -100041,29 +100194,58 @@ var ts;
|
|
|
100041
100194
|
{ version: fileInfo.version, signature: fileInfo.signature === false ? undefined : fileInfo.version, affectsGlobalScope: fileInfo.affectsGlobalScope, impliedFormat: fileInfo.impliedFormat };
|
|
100042
100195
|
}
|
|
100043
100196
|
ts.toBuilderStateFileInfo = toBuilderStateFileInfo;
|
|
100044
|
-
function
|
|
100045
|
-
var _a;
|
|
100197
|
+
function createBuilderProgramUsingProgramBuildInfo(program, buildInfoPath, host) {
|
|
100198
|
+
var _a, _b, _c, _d;
|
|
100046
100199
|
var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));
|
|
100047
100200
|
var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames());
|
|
100048
|
-
var
|
|
100049
|
-
var
|
|
100050
|
-
var
|
|
100051
|
-
|
|
100052
|
-
|
|
100053
|
-
|
|
100054
|
-
|
|
100055
|
-
|
|
100056
|
-
|
|
100057
|
-
|
|
100058
|
-
|
|
100059
|
-
|
|
100060
|
-
|
|
100061
|
-
|
|
100062
|
-
|
|
100201
|
+
var state;
|
|
100202
|
+
var filePaths;
|
|
100203
|
+
var filePathsSetList;
|
|
100204
|
+
if (isProgramBundleEmitBuildInfo(program)) {
|
|
100205
|
+
state = {
|
|
100206
|
+
fileInfos: new ts.Map(),
|
|
100207
|
+
compilerOptions: program.options ? ts.convertToOptionsWithAbsolutePaths(program.options, toAbsolutePath) : {},
|
|
100208
|
+
dtsChangeTime: program.dtsChangeTime,
|
|
100209
|
+
outSignature: program.outSignature,
|
|
100210
|
+
};
|
|
100211
|
+
}
|
|
100212
|
+
else {
|
|
100213
|
+
filePaths = (_a = program.fileNames) === null || _a === void 0 ? void 0 : _a.map(toPath);
|
|
100214
|
+
filePathsSetList = (_b = program.fileIdsList) === null || _b === void 0 ? void 0 : _b.map(function (fileIds) { return new ts.Set(fileIds.map(toFilePath)); });
|
|
100215
|
+
var fileInfos_2 = new ts.Map();
|
|
100216
|
+
var emitSignatures_1 = ((_c = program.options) === null || _c === void 0 ? void 0 : _c.composite) && !ts.outFile(program.options) ? new ts.Map() : undefined;
|
|
100217
|
+
program.fileInfos.forEach(function (fileInfo, index) {
|
|
100218
|
+
var path = toFilePath(index + 1);
|
|
100219
|
+
var stateFileInfo = toBuilderStateFileInfo(fileInfo);
|
|
100220
|
+
fileInfos_2.set(path, stateFileInfo);
|
|
100221
|
+
if (emitSignatures_1 && stateFileInfo.signature)
|
|
100222
|
+
emitSignatures_1.set(path, stateFileInfo.signature);
|
|
100223
|
+
});
|
|
100224
|
+
(_d = program.emitSignatures) === null || _d === void 0 ? void 0 : _d.forEach(function (value) {
|
|
100225
|
+
if (ts.isNumber(value))
|
|
100226
|
+
emitSignatures_1.delete(toFilePath(value));
|
|
100227
|
+
else
|
|
100228
|
+
emitSignatures_1.set(toFilePath(value[0]), value[1]);
|
|
100229
|
+
});
|
|
100230
|
+
state = {
|
|
100231
|
+
fileInfos: fileInfos_2,
|
|
100232
|
+
compilerOptions: program.options ? ts.convertToOptionsWithAbsolutePaths(program.options, toAbsolutePath) : {},
|
|
100233
|
+
referencedMap: toManyToManyPathMap(program.referencedMap),
|
|
100234
|
+
exportedModulesMap: toManyToManyPathMap(program.exportedModulesMap),
|
|
100235
|
+
semanticDiagnosticsPerFile: program.semanticDiagnosticsPerFile && ts.arrayToMap(program.semanticDiagnosticsPerFile, function (value) { return toFilePath(ts.isNumber(value) ? value : value[0]); }, function (value) { return ts.isNumber(value) ? ts.emptyArray : value[1]; }),
|
|
100236
|
+
hasReusableDiagnostic: true,
|
|
100237
|
+
affectedFilesPendingEmit: ts.map(program.affectedFilesPendingEmit, function (value) { return toFilePath(value[0]); }),
|
|
100238
|
+
affectedFilesPendingEmitKind: program.affectedFilesPendingEmit && ts.arrayToMap(program.affectedFilesPendingEmit, function (value) { return toFilePath(value[0]); }, function (value) { return value[1]; }),
|
|
100239
|
+
affectedFilesPendingEmitIndex: program.affectedFilesPendingEmit && 0,
|
|
100240
|
+
changedFilesSet: new ts.Set(ts.map(program.changeFileSet, toFilePath)),
|
|
100241
|
+
dtsChangeTime: program.dtsChangeTime,
|
|
100242
|
+
emitSignatures: (emitSignatures_1 === null || emitSignatures_1 === void 0 ? void 0 : emitSignatures_1.size) ? emitSignatures_1 : undefined,
|
|
100243
|
+
};
|
|
100244
|
+
}
|
|
100063
100245
|
return {
|
|
100064
100246
|
getState: function () { return state; },
|
|
100065
|
-
|
|
100066
|
-
|
|
100247
|
+
backupEmitState: ts.noop,
|
|
100248
|
+
restoreEmitState: ts.noop,
|
|
100067
100249
|
getProgram: ts.notImplemented,
|
|
100068
100250
|
getProgramOrUndefined: ts.returnUndefined,
|
|
100069
100251
|
releaseProgram: ts.noop,
|
|
@@ -100108,12 +100290,24 @@ var ts;
|
|
|
100108
100290
|
return map;
|
|
100109
100291
|
}
|
|
100110
100292
|
}
|
|
100111
|
-
ts.
|
|
100293
|
+
ts.createBuilderProgramUsingProgramBuildInfo = createBuilderProgramUsingProgramBuildInfo;
|
|
100294
|
+
function getBuildInfoFileVersionMap(program, buildInfoPath, host) {
|
|
100295
|
+
var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));
|
|
100296
|
+
var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames());
|
|
100297
|
+
var fileInfos = new ts.Map();
|
|
100298
|
+
program.fileInfos.forEach(function (fileInfo, index) {
|
|
100299
|
+
var path = ts.toPath(program.fileNames[index], buildInfoDirectory, getCanonicalFileName);
|
|
100300
|
+
var version = ts.isString(fileInfo) ? fileInfo : fileInfo.version;
|
|
100301
|
+
fileInfos.set(path, version);
|
|
100302
|
+
});
|
|
100303
|
+
return fileInfos;
|
|
100304
|
+
}
|
|
100305
|
+
ts.getBuildInfoFileVersionMap = getBuildInfoFileVersionMap;
|
|
100112
100306
|
function createRedirectedBuilderProgram(getState, configFileParsingDiagnostics) {
|
|
100113
100307
|
return {
|
|
100114
100308
|
getState: ts.notImplemented,
|
|
100115
|
-
|
|
100116
|
-
|
|
100309
|
+
backupEmitState: ts.noop,
|
|
100310
|
+
restoreEmitState: ts.noop,
|
|
100117
100311
|
getProgram: getProgram,
|
|
100118
100312
|
getProgramOrUndefined: function () { return getState().program; },
|
|
100119
100313
|
releaseProgram: function () { return getState().program = undefined; },
|
|
@@ -101064,9 +101258,9 @@ var ts;
|
|
|
101064
101258
|
var targets = importedFileNames.map(function (f) { return ts.getNormalizedAbsolutePath(f, cwd); });
|
|
101065
101259
|
var shouldFilterIgnoredPaths = !ts.every(targets, ts.containsIgnoredPath);
|
|
101066
101260
|
if (!preferSymlinks) {
|
|
101067
|
-
var
|
|
101068
|
-
if (
|
|
101069
|
-
return
|
|
101261
|
+
var result_16 = ts.forEach(targets, function (p) { return !(shouldFilterIgnoredPaths && ts.containsIgnoredPath(p)) && cb(p, referenceRedirect === p); });
|
|
101262
|
+
if (result_16)
|
|
101263
|
+
return result_16;
|
|
101070
101264
|
}
|
|
101071
101265
|
var symlinkedDirectories = (_a = host.getSymlinkCache) === null || _a === void 0 ? void 0 : _a.call(host).getSymlinkedDirectoriesByRealpath();
|
|
101072
101266
|
var fullImportedFileName = ts.getNormalizedAbsolutePath(importedFileName, cwd);
|
|
@@ -101085,10 +101279,10 @@ var ts;
|
|
|
101085
101279
|
for (var _i = 0, symlinkDirectories_1 = symlinkDirectories; _i < symlinkDirectories_1.length; _i++) {
|
|
101086
101280
|
var symlinkDirectory = symlinkDirectories_1[_i];
|
|
101087
101281
|
var option = ts.resolvePath(symlinkDirectory, relative);
|
|
101088
|
-
var
|
|
101282
|
+
var result_17 = cb(option, target === referenceRedirect);
|
|
101089
101283
|
shouldFilterIgnoredPaths = true;
|
|
101090
|
-
if (
|
|
101091
|
-
return
|
|
101284
|
+
if (result_17)
|
|
101285
|
+
return result_17;
|
|
101092
101286
|
}
|
|
101093
101287
|
});
|
|
101094
101288
|
});
|
|
@@ -101123,7 +101317,7 @@ var ts;
|
|
|
101123
101317
|
importedFileFromNodeModules = importedFileFromNodeModules || isInNodeModules;
|
|
101124
101318
|
});
|
|
101125
101319
|
var sortedPaths = [];
|
|
101126
|
-
var
|
|
101320
|
+
var _loop_34 = function (directory) {
|
|
101127
101321
|
var directoryStart = ts.ensureTrailingDirectorySeparator(directory);
|
|
101128
101322
|
var pathsInDirectory;
|
|
101129
101323
|
allFileNames.forEach(function (_a, fileName) {
|
|
@@ -101147,9 +101341,9 @@ var ts;
|
|
|
101147
101341
|
};
|
|
101148
101342
|
var out_directory_1;
|
|
101149
101343
|
for (var directory = ts.getDirectoryPath(importingFileName); allFileNames.size !== 0;) {
|
|
101150
|
-
var
|
|
101344
|
+
var state_11 = _loop_34(directory);
|
|
101151
101345
|
directory = out_directory_1;
|
|
101152
|
-
if (
|
|
101346
|
+
if (state_11 === "break")
|
|
101153
101347
|
break;
|
|
101154
101348
|
}
|
|
101155
101349
|
if (allFileNames.size) {
|
|
@@ -101497,6 +101691,7 @@ var ts;
|
|
|
101497
101691
|
if (system.clearScreen &&
|
|
101498
101692
|
!options.preserveWatchOutput &&
|
|
101499
101693
|
!options.extendedDiagnostics &&
|
|
101694
|
+
!options.solutionDiagnostics &&
|
|
101500
101695
|
!options.diagnostics &&
|
|
101501
101696
|
ts.contains(ts.screenStartingMessageCodes, diagnostic.code)) {
|
|
101502
101697
|
system.clearScreen();
|
|
@@ -101920,6 +102115,7 @@ var ts;
|
|
|
101920
102115
|
readDirectory: ts.maybeBind(host, host.readDirectory),
|
|
101921
102116
|
disableUseFileVersionAsSignature: host.disableUseFileVersionAsSignature,
|
|
101922
102117
|
storeFilesChangingSignatureDuringEmit: host.storeFilesChangingSignatureDuringEmit,
|
|
102118
|
+
now: ts.maybeBind(host, host.now),
|
|
101923
102119
|
};
|
|
101924
102120
|
function writeFile(fileName, text, writeByteOrderMark, onError) {
|
|
101925
102121
|
try {
|
|
@@ -101974,6 +102170,7 @@ var ts;
|
|
|
101974
102170
|
createProgram: createProgram || ts.createEmitAndSemanticDiagnosticsBuilderProgram,
|
|
101975
102171
|
disableUseFileVersionAsSignature: system.disableUseFileVersionAsSignature,
|
|
101976
102172
|
storeFilesChangingSignatureDuringEmit: system.storeFilesChangingSignatureDuringEmit,
|
|
102173
|
+
now: ts.maybeBind(system, system.now),
|
|
101977
102174
|
};
|
|
101978
102175
|
}
|
|
101979
102176
|
ts.createProgramHost = createProgramHost;
|
|
@@ -102029,20 +102226,26 @@ var ts;
|
|
|
102029
102226
|
var ts;
|
|
102030
102227
|
(function (ts) {
|
|
102031
102228
|
function readBuilderProgram(compilerOptions, host) {
|
|
102032
|
-
if (ts.outFile(compilerOptions))
|
|
102033
|
-
return undefined;
|
|
102034
102229
|
var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(compilerOptions);
|
|
102035
102230
|
if (!buildInfoPath)
|
|
102036
102231
|
return undefined;
|
|
102037
|
-
var
|
|
102038
|
-
if (
|
|
102039
|
-
|
|
102040
|
-
|
|
102232
|
+
var buildInfo;
|
|
102233
|
+
if (host.getBuildInfo) {
|
|
102234
|
+
buildInfo = host.getBuildInfo(buildInfoPath, compilerOptions.configFilePath);
|
|
102235
|
+
if (!buildInfo)
|
|
102236
|
+
return undefined;
|
|
102237
|
+
}
|
|
102238
|
+
else {
|
|
102239
|
+
var content = host.readFile(buildInfoPath);
|
|
102240
|
+
if (!content)
|
|
102241
|
+
return undefined;
|
|
102242
|
+
buildInfo = ts.getBuildInfo(content);
|
|
102243
|
+
}
|
|
102041
102244
|
if (buildInfo.version !== ts.version)
|
|
102042
102245
|
return undefined;
|
|
102043
102246
|
if (!buildInfo.program)
|
|
102044
102247
|
return undefined;
|
|
102045
|
-
return ts.
|
|
102248
|
+
return ts.createBuilderProgramUsingProgramBuildInfo(buildInfo.program, buildInfoPath, host);
|
|
102046
102249
|
}
|
|
102047
102250
|
ts.readBuilderProgram = readBuilderProgram;
|
|
102048
102251
|
function createIncrementalCompilerHost(options, system) {
|
|
@@ -102051,6 +102254,7 @@ var ts;
|
|
|
102051
102254
|
host.createHash = ts.maybeBind(system, system.createHash);
|
|
102052
102255
|
host.disableUseFileVersionAsSignature = system.disableUseFileVersionAsSignature;
|
|
102053
102256
|
host.storeFilesChangingSignatureDuringEmit = system.storeFilesChangingSignatureDuringEmit;
|
|
102257
|
+
host.now = ts.maybeBind(system, system.now);
|
|
102054
102258
|
ts.setGetSourceFileAsHashVersioned(host, system);
|
|
102055
102259
|
ts.changeCompilerHostLikeToUseCache(host, function (fileName) { return ts.toPath(fileName, host.getCurrentDirectory(), host.getCanonicalFileName); });
|
|
102056
102260
|
return host;
|
|
@@ -102714,11 +102918,14 @@ var ts;
|
|
|
102714
102918
|
UpToDateStatusType[UpToDateStatusType["OutputMissing"] = 4] = "OutputMissing";
|
|
102715
102919
|
UpToDateStatusType[UpToDateStatusType["OutOfDateWithSelf"] = 5] = "OutOfDateWithSelf";
|
|
102716
102920
|
UpToDateStatusType[UpToDateStatusType["OutOfDateWithUpstream"] = 6] = "OutOfDateWithUpstream";
|
|
102717
|
-
UpToDateStatusType[UpToDateStatusType["
|
|
102718
|
-
UpToDateStatusType[UpToDateStatusType["
|
|
102719
|
-
UpToDateStatusType[UpToDateStatusType["
|
|
102720
|
-
UpToDateStatusType[UpToDateStatusType["
|
|
102721
|
-
UpToDateStatusType[UpToDateStatusType["
|
|
102921
|
+
UpToDateStatusType[UpToDateStatusType["OutOfDateBuildInfo"] = 7] = "OutOfDateBuildInfo";
|
|
102922
|
+
UpToDateStatusType[UpToDateStatusType["UpstreamOutOfDate"] = 8] = "UpstreamOutOfDate";
|
|
102923
|
+
UpToDateStatusType[UpToDateStatusType["UpstreamBlocked"] = 9] = "UpstreamBlocked";
|
|
102924
|
+
UpToDateStatusType[UpToDateStatusType["ComputingUpstream"] = 10] = "ComputingUpstream";
|
|
102925
|
+
UpToDateStatusType[UpToDateStatusType["TsVersionOutputOfDate"] = 11] = "TsVersionOutputOfDate";
|
|
102926
|
+
UpToDateStatusType[UpToDateStatusType["UpToDateWithInputFileText"] = 12] = "UpToDateWithInputFileText";
|
|
102927
|
+
UpToDateStatusType[UpToDateStatusType["ContainerOnly"] = 13] = "ContainerOnly";
|
|
102928
|
+
UpToDateStatusType[UpToDateStatusType["ForceBuild"] = 14] = "ForceBuild";
|
|
102722
102929
|
})(UpToDateStatusType = ts.UpToDateStatusType || (ts.UpToDateStatusType = {}));
|
|
102723
102930
|
function resolveConfigFileProjectName(project) {
|
|
102724
102931
|
if (ts.fileExtensionIs(project, ".json")) {
|
|
@@ -102756,9 +102963,10 @@ var ts;
|
|
|
102756
102963
|
function getOrCreateValueMapFromConfigFileMap(configFileMap, resolved) {
|
|
102757
102964
|
return getOrCreateValueFromConfigFileMap(configFileMap, resolved, function () { return new ts.Map(); });
|
|
102758
102965
|
}
|
|
102759
|
-
function
|
|
102760
|
-
return
|
|
102966
|
+
function getCurrentTime(host) {
|
|
102967
|
+
return host.now ? host.now() : new Date();
|
|
102761
102968
|
}
|
|
102969
|
+
ts.getCurrentTime = getCurrentTime;
|
|
102762
102970
|
function isCircularBuildOrder(buildOrder) {
|
|
102763
102971
|
return !!buildOrder && !!buildOrder.buildOrder;
|
|
102764
102972
|
}
|
|
@@ -102806,6 +103014,8 @@ var ts;
|
|
|
102806
103014
|
if (ts.hasProperty(buildOptions, option.name))
|
|
102807
103015
|
result[option.name] = buildOptions[option.name];
|
|
102808
103016
|
});
|
|
103017
|
+
if (buildOptions.solutionDiagnostics)
|
|
103018
|
+
result.solutionDiagnostics = true;
|
|
102809
103019
|
return result;
|
|
102810
103020
|
}
|
|
102811
103021
|
function createSolutionBuilder(host, rootNames, defaultOptions) {
|
|
@@ -102842,6 +103052,7 @@ var ts;
|
|
|
102842
103052
|
return ts.loadWithTypeDirectiveCache(ts.Debug.checkEachDefined(typeReferenceDirectiveNames), containingFile, redirectedReference, containingFileMode, loader_4);
|
|
102843
103053
|
};
|
|
102844
103054
|
}
|
|
103055
|
+
compilerHost.getBuildInfo = function (fileName, configFilePath) { return getBuildInfo(state, fileName, toResolvedConfigFilePath(state, configFilePath), undefined); };
|
|
102845
103056
|
var _a = ts.createWatchFactory(hostWithWatch, options), watchFile = _a.watchFile, watchDirectory = _a.watchDirectory, writeLog = _a.writeLog;
|
|
102846
103057
|
var state = {
|
|
102847
103058
|
host: host,
|
|
@@ -102857,8 +103068,9 @@ var ts;
|
|
|
102857
103068
|
resolvedConfigFilePaths: new ts.Map(),
|
|
102858
103069
|
configFileCache: new ts.Map(),
|
|
102859
103070
|
projectStatus: new ts.Map(),
|
|
102860
|
-
buildInfoChecked: new ts.Map(),
|
|
102861
103071
|
extendedConfigCache: new ts.Map(),
|
|
103072
|
+
buildInfoCache: new ts.Map(),
|
|
103073
|
+
outputTimeStamps: new ts.Map(),
|
|
102862
103074
|
builderPrograms: new ts.Map(),
|
|
102863
103075
|
diagnostics: new ts.Map(),
|
|
102864
103076
|
projectPendingBuild: new ts.Map(),
|
|
@@ -102879,6 +103091,7 @@ var ts;
|
|
|
102879
103091
|
allWatchedConfigFiles: new ts.Map(),
|
|
102880
103092
|
allWatchedExtendedConfigFiles: new ts.Map(),
|
|
102881
103093
|
allWatchedPackageJsonFiles: new ts.Map(),
|
|
103094
|
+
filesWatched: new ts.Map(),
|
|
102882
103095
|
lastCachedPackageJsonLookups: new ts.Map(),
|
|
102883
103096
|
timerToBuildInvalidatedProject: undefined,
|
|
102884
103097
|
reportFileChangeDetected: false,
|
|
@@ -102984,11 +103197,12 @@ var ts;
|
|
|
102984
103197
|
var noopOnDelete = { onDeleteValue: ts.noop };
|
|
102985
103198
|
ts.mutateMapSkippingNewValues(state.configFileCache, currentProjects, noopOnDelete);
|
|
102986
103199
|
ts.mutateMapSkippingNewValues(state.projectStatus, currentProjects, noopOnDelete);
|
|
102987
|
-
ts.mutateMapSkippingNewValues(state.buildInfoChecked, currentProjects, noopOnDelete);
|
|
102988
103200
|
ts.mutateMapSkippingNewValues(state.builderPrograms, currentProjects, noopOnDelete);
|
|
102989
103201
|
ts.mutateMapSkippingNewValues(state.diagnostics, currentProjects, noopOnDelete);
|
|
102990
103202
|
ts.mutateMapSkippingNewValues(state.projectPendingBuild, currentProjects, noopOnDelete);
|
|
102991
103203
|
ts.mutateMapSkippingNewValues(state.projectErrorsReported, currentProjects, noopOnDelete);
|
|
103204
|
+
ts.mutateMapSkippingNewValues(state.buildInfoCache, currentProjects, noopOnDelete);
|
|
103205
|
+
ts.mutateMapSkippingNewValues(state.outputTimeStamps, currentProjects, noopOnDelete);
|
|
102992
103206
|
if (state.watch) {
|
|
102993
103207
|
ts.mutateMapSkippingNewValues(state.allWatchedConfigFiles, currentProjects, { onDeleteValue: ts.closeFileWatcher });
|
|
102994
103208
|
state.allWatchedExtendedConfigFiles.forEach(function (watcher) {
|
|
@@ -103280,16 +103494,16 @@ var ts;
|
|
|
103280
103494
|
}
|
|
103281
103495
|
function emit(writeFileCallback, cancellationToken, customTransformers) {
|
|
103282
103496
|
var _a;
|
|
103283
|
-
var _b, _c;
|
|
103497
|
+
var _b, _c, _d;
|
|
103284
103498
|
ts.Debug.assertIsDefined(program);
|
|
103285
103499
|
ts.Debug.assert(step === BuildStep.Emit);
|
|
103286
|
-
program.
|
|
103500
|
+
program.backupEmitState();
|
|
103287
103501
|
var declDiagnostics;
|
|
103288
103502
|
var reportDeclarationDiagnostics = function (d) { return (declDiagnostics || (declDiagnostics = [])).push(d); };
|
|
103289
103503
|
var outputFiles = [];
|
|
103290
|
-
var emitResult = ts.emitFilesAndReportErrors(program, reportDeclarationDiagnostics, undefined, undefined, function (name, text, writeByteOrderMark) { return outputFiles.push({ name: name, text: text, writeByteOrderMark: writeByteOrderMark }); }, cancellationToken, false, customTransformers || ((_c = (_b = state.host).getCustomTransformers) === null || _c === void 0 ? void 0 : _c.call(_b, project))).emitResult;
|
|
103504
|
+
var emitResult = ts.emitFilesAndReportErrors(program, reportDeclarationDiagnostics, undefined, undefined, function (name, text, writeByteOrderMark, _onError, _sourceFiles, data) { return outputFiles.push({ name: name, text: text, writeByteOrderMark: writeByteOrderMark, buildInfo: data === null || data === void 0 ? void 0 : data.buildInfo }); }, cancellationToken, false, customTransformers || ((_c = (_b = state.host).getCustomTransformers) === null || _c === void 0 ? void 0 : _c.call(_b, project))).emitResult;
|
|
103291
103505
|
if (declDiagnostics) {
|
|
103292
|
-
program.
|
|
103506
|
+
program.restoreEmitState();
|
|
103293
103507
|
(_a = buildErrors(state, projectPath, program, config, declDiagnostics, BuildResultFlags.DeclarationEmitErrors, "Declaration file"), buildResult = _a.buildResult, step = _a.step);
|
|
103294
103508
|
return {
|
|
103295
103509
|
emitSkipped: true,
|
|
@@ -103298,38 +103512,46 @@ var ts;
|
|
|
103298
103512
|
}
|
|
103299
103513
|
var host = state.host, compilerHost = state.compilerHost;
|
|
103300
103514
|
var resultFlags = BuildResultFlags.DeclarationOutputUnchanged;
|
|
103301
|
-
var
|
|
103302
|
-
var anyDtsChanged = false;
|
|
103515
|
+
var existingBuildInfo = ((_d = state.buildInfoCache.get(projectPath)) === null || _d === void 0 ? void 0 : _d.buildInfo) || undefined;
|
|
103303
103516
|
var emitterDiagnostics = ts.createDiagnosticCollection();
|
|
103304
103517
|
var emittedOutputs = new ts.Map();
|
|
103518
|
+
var options = program.getCompilerOptions();
|
|
103519
|
+
var isIncremental = ts.isIncrementalCompilation(options);
|
|
103520
|
+
var outputTimeStampMap;
|
|
103521
|
+
var now;
|
|
103305
103522
|
ts.solutionPerformance.mark("beforeOutputFilesWrite");
|
|
103306
103523
|
outputFiles.forEach(function (_a) {
|
|
103307
|
-
var
|
|
103308
|
-
var
|
|
103309
|
-
|
|
103310
|
-
|
|
103311
|
-
|
|
103312
|
-
|
|
103313
|
-
|
|
103524
|
+
var _b, _c;
|
|
103525
|
+
var name = _a.name, text = _a.text, writeByteOrderMark = _a.writeByteOrderMark, buildInfo = _a.buildInfo;
|
|
103526
|
+
var path = toPath(state, name);
|
|
103527
|
+
emittedOutputs.set(toPath(state, name), name);
|
|
103528
|
+
if (buildInfo) {
|
|
103529
|
+
setBuildInfo(state, buildInfo, projectPath, options);
|
|
103530
|
+
if (((_b = buildInfo.program) === null || _b === void 0 ? void 0 : _b.dtsChangeTime) !== ((_c = existingBuildInfo === null || existingBuildInfo === void 0 ? void 0 : existingBuildInfo.program) === null || _c === void 0 ? void 0 : _c.dtsChangeTime)) {
|
|
103314
103531
|
resultFlags &= ~BuildResultFlags.DeclarationOutputUnchanged;
|
|
103315
|
-
anyDtsChanged = true;
|
|
103316
103532
|
}
|
|
103317
103533
|
}
|
|
103318
|
-
emittedOutputs.set(toPath(state, name), name);
|
|
103319
103534
|
ts.writeFile(writeFileCallback ? { writeFile: writeFileCallback } : compilerHost, emitterDiagnostics, name, text, writeByteOrderMark);
|
|
103320
|
-
if (
|
|
103321
|
-
|
|
103535
|
+
if (!isIncremental && state.watch) {
|
|
103536
|
+
(outputTimeStampMap || (outputTimeStampMap = getOutputTimeStampMap(state, projectPath))).set(path, now || (now = getCurrentTime(state.host)));
|
|
103322
103537
|
}
|
|
103323
103538
|
});
|
|
103324
103539
|
ts.solutionPerformance.mark("afterOutputFilesWrite");
|
|
103325
103540
|
ts.solutionPerformance.measure("OutputFilesWrite", "beforeOutputFilesWrite", "afterOutputFilesWrite");
|
|
103326
|
-
finishEmit(emitterDiagnostics, emittedOutputs,
|
|
103541
|
+
finishEmit(emitterDiagnostics, emittedOutputs, outputFiles.length ? outputFiles[0].name : ts.getFirstProjectOutput(config, !host.useCaseSensitiveFileNames()), resultFlags);
|
|
103327
103542
|
return emitResult;
|
|
103328
103543
|
}
|
|
103329
103544
|
function emitBuildInfo(writeFileCallback, cancellationToken) {
|
|
103330
103545
|
ts.Debug.assertIsDefined(program);
|
|
103331
103546
|
ts.Debug.assert(step === BuildStep.EmitBuildInfo);
|
|
103332
|
-
var emitResult = program.emitBuildInfo(
|
|
103547
|
+
var emitResult = program.emitBuildInfo(function (name, text, writeByteOrderMark, onError, sourceFiles, data) {
|
|
103548
|
+
if (data === null || data === void 0 ? void 0 : data.buildInfo)
|
|
103549
|
+
setBuildInfo(state, data.buildInfo, projectPath, program.getCompilerOptions());
|
|
103550
|
+
if (writeFileCallback)
|
|
103551
|
+
writeFileCallback(name, text, writeByteOrderMark, onError, sourceFiles, data);
|
|
103552
|
+
else
|
|
103553
|
+
state.compilerHost.writeFile(name, text, writeByteOrderMark, onError, sourceFiles, data);
|
|
103554
|
+
}, cancellationToken);
|
|
103333
103555
|
if (emitResult.diagnostics.length) {
|
|
103334
103556
|
reportErrors(state, emitResult.diagnostics);
|
|
103335
103557
|
state.diagnostics.set(projectPath, __spreadArray(__spreadArray([], state.diagnostics.get(projectPath), true), emitResult.diagnostics, true));
|
|
@@ -103342,7 +103564,7 @@ var ts;
|
|
|
103342
103564
|
step = BuildStep.QueueReferencingProjects;
|
|
103343
103565
|
return emitResult;
|
|
103344
103566
|
}
|
|
103345
|
-
function finishEmit(emitterDiagnostics, emittedOutputs,
|
|
103567
|
+
function finishEmit(emitterDiagnostics, emittedOutputs, oldestOutputFileName, resultFlags) {
|
|
103346
103568
|
var _a;
|
|
103347
103569
|
var emitDiagnostics = emitterDiagnostics.getDiagnostics();
|
|
103348
103570
|
if (emitDiagnostics.length) {
|
|
@@ -103352,13 +103574,11 @@ var ts;
|
|
|
103352
103574
|
if (state.write) {
|
|
103353
103575
|
emittedOutputs.forEach(function (name) { return listEmittedFile(state, config, name); });
|
|
103354
103576
|
}
|
|
103355
|
-
|
|
103577
|
+
updateOutputTimestampsWorker(state, config, projectPath, ts.Diagnostics.Updating_unchanged_output_timestamps_of_project_0, emittedOutputs);
|
|
103356
103578
|
state.diagnostics.delete(projectPath);
|
|
103357
103579
|
state.projectStatus.set(projectPath, {
|
|
103358
103580
|
type: ts.UpToDateStatusType.UpToDate,
|
|
103359
|
-
newestDeclarationFileContentChangedTime:
|
|
103360
|
-
maximumDate :
|
|
103361
|
-
newestDeclarationFileContentChangedTime,
|
|
103581
|
+
newestDeclarationFileContentChangedTime: getDtsChangeTime(state, config.options, projectPath),
|
|
103362
103582
|
oldestOutputFileName: oldestOutputFileName
|
|
103363
103583
|
});
|
|
103364
103584
|
afterProgramDone(state, program, config);
|
|
@@ -103391,12 +103611,21 @@ var ts;
|
|
|
103391
103611
|
ts.Debug.assert(!!outputFiles.length);
|
|
103392
103612
|
var emitterDiagnostics = ts.createDiagnosticCollection();
|
|
103393
103613
|
var emittedOutputs = new ts.Map();
|
|
103614
|
+
var resultFlags = BuildResultFlags.DeclarationOutputUnchanged;
|
|
103615
|
+
var existingBuildInfo = state.buildInfoCache.get(projectPath).buildInfo;
|
|
103394
103616
|
outputFiles.forEach(function (_a) {
|
|
103395
|
-
var
|
|
103617
|
+
var _b, _c;
|
|
103618
|
+
var name = _a.name, text = _a.text, writeByteOrderMark = _a.writeByteOrderMark, buildInfo = _a.buildInfo;
|
|
103396
103619
|
emittedOutputs.set(toPath(state, name), name);
|
|
103620
|
+
if (buildInfo) {
|
|
103621
|
+
setBuildInfo(state, buildInfo, projectPath, config.options);
|
|
103622
|
+
if (((_b = buildInfo.program) === null || _b === void 0 ? void 0 : _b.dtsChangeTime) !== ((_c = existingBuildInfo.program) === null || _c === void 0 ? void 0 : _c.dtsChangeTime)) {
|
|
103623
|
+
resultFlags &= ~BuildResultFlags.DeclarationOutputUnchanged;
|
|
103624
|
+
}
|
|
103625
|
+
}
|
|
103397
103626
|
ts.writeFile(writeFileCallback ? { writeFile: writeFileCallback } : compilerHost, emitterDiagnostics, name, text, writeByteOrderMark);
|
|
103398
103627
|
});
|
|
103399
|
-
var emitDiagnostics = finishEmit(emitterDiagnostics, emittedOutputs,
|
|
103628
|
+
var emitDiagnostics = finishEmit(emitterDiagnostics, emittedOutputs, outputFiles[0].name, resultFlags);
|
|
103400
103629
|
return { emitSkipped: false, diagnostics: emitDiagnostics };
|
|
103401
103630
|
}
|
|
103402
103631
|
function executeSteps(till, cancellationToken, writeFile, customTransformers) {
|
|
@@ -103498,7 +103727,7 @@ var ts;
|
|
|
103498
103727
|
}
|
|
103499
103728
|
continue;
|
|
103500
103729
|
}
|
|
103501
|
-
if (status.type === ts.UpToDateStatusType.UpToDateWithUpstreamTypes) {
|
|
103730
|
+
if (status.type === ts.UpToDateStatusType.UpToDateWithUpstreamTypes || status.type === ts.UpToDateStatusType.UpToDateWithInputFileText) {
|
|
103502
103731
|
reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config));
|
|
103503
103732
|
return {
|
|
103504
103733
|
kind: InvalidatedProjectKind.UpdateOutputFileStamps,
|
|
@@ -103583,7 +103812,7 @@ var ts;
|
|
|
103583
103812
|
state.projectCompilerOptions = state.baseCompilerOptions;
|
|
103584
103813
|
}
|
|
103585
103814
|
function buildErrors(state, resolvedPath, program, config, diagnostics, buildResult, errorType) {
|
|
103586
|
-
var canEmitBuildInfo =
|
|
103815
|
+
var canEmitBuildInfo = program && !ts.outFile(program.getCompilerOptions());
|
|
103587
103816
|
reportAndStoreErrors(state, resolvedPath, diagnostics);
|
|
103588
103817
|
state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.Unbuildable, reason: errorType + " errors" });
|
|
103589
103818
|
if (canEmitBuildInfo)
|
|
@@ -103591,8 +103820,100 @@ var ts;
|
|
|
103591
103820
|
afterProgramDone(state, program, config);
|
|
103592
103821
|
return { buildResult: buildResult, step: BuildStep.QueueReferencingProjects };
|
|
103593
103822
|
}
|
|
103823
|
+
function isFileWatcherWithModifiedTime(value) {
|
|
103824
|
+
return !!value.watcher;
|
|
103825
|
+
}
|
|
103826
|
+
function getModifiedTime(state, fileName) {
|
|
103827
|
+
var path = toPath(state, fileName);
|
|
103828
|
+
var existing = state.filesWatched.get(path);
|
|
103829
|
+
if (state.watch && !!existing) {
|
|
103830
|
+
if (!isFileWatcherWithModifiedTime(existing))
|
|
103831
|
+
return existing;
|
|
103832
|
+
if (existing.modifiedTime)
|
|
103833
|
+
return existing.modifiedTime;
|
|
103834
|
+
}
|
|
103835
|
+
var result = ts.getModifiedTime(state.host, fileName);
|
|
103836
|
+
if (state.watch) {
|
|
103837
|
+
if (existing)
|
|
103838
|
+
existing.modifiedTime = result;
|
|
103839
|
+
else
|
|
103840
|
+
state.filesWatched.set(path, result);
|
|
103841
|
+
}
|
|
103842
|
+
return result;
|
|
103843
|
+
}
|
|
103844
|
+
function watchFile(state, file, callback, pollingInterval, options, watchType, project) {
|
|
103845
|
+
var path = toPath(state, file);
|
|
103846
|
+
var existing = state.filesWatched.get(path);
|
|
103847
|
+
if (existing && isFileWatcherWithModifiedTime(existing)) {
|
|
103848
|
+
existing.callbacks.push(callback);
|
|
103849
|
+
}
|
|
103850
|
+
else {
|
|
103851
|
+
var watcher = state.watchFile(file, function (fileName, eventKind, modifiedTime) {
|
|
103852
|
+
var existing = ts.Debug.checkDefined(state.filesWatched.get(path));
|
|
103853
|
+
ts.Debug.assert(isFileWatcherWithModifiedTime(existing));
|
|
103854
|
+
existing.modifiedTime = modifiedTime;
|
|
103855
|
+
existing.callbacks.forEach(function (cb) { return cb(fileName, eventKind, modifiedTime); });
|
|
103856
|
+
}, pollingInterval, options, watchType, project);
|
|
103857
|
+
state.filesWatched.set(path, { callbacks: [callback], watcher: watcher, modifiedTime: existing });
|
|
103858
|
+
}
|
|
103859
|
+
return {
|
|
103860
|
+
close: function () {
|
|
103861
|
+
var existing = ts.Debug.checkDefined(state.filesWatched.get(path));
|
|
103862
|
+
ts.Debug.assert(isFileWatcherWithModifiedTime(existing));
|
|
103863
|
+
if (existing.callbacks.length === 1) {
|
|
103864
|
+
state.filesWatched.delete(path);
|
|
103865
|
+
ts.closeFileWatcherOf(existing);
|
|
103866
|
+
}
|
|
103867
|
+
else {
|
|
103868
|
+
ts.unorderedRemoveItem(existing.callbacks, callback);
|
|
103869
|
+
}
|
|
103870
|
+
}
|
|
103871
|
+
};
|
|
103872
|
+
}
|
|
103873
|
+
function getOutputTimeStampMap(state, resolvedConfigFilePath) {
|
|
103874
|
+
if (!state.watch)
|
|
103875
|
+
return undefined;
|
|
103876
|
+
var result = state.outputTimeStamps.get(resolvedConfigFilePath);
|
|
103877
|
+
if (!result)
|
|
103878
|
+
state.outputTimeStamps.set(resolvedConfigFilePath, result = new ts.Map());
|
|
103879
|
+
return result;
|
|
103880
|
+
}
|
|
103881
|
+
function setBuildInfo(state, buildInfo, resolvedConfigPath, options) {
|
|
103882
|
+
var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(options);
|
|
103883
|
+
var existing = getBuildInfoCacheEntry(state, buildInfoPath, resolvedConfigPath);
|
|
103884
|
+
if (existing) {
|
|
103885
|
+
existing.buildInfo = buildInfo;
|
|
103886
|
+
existing.modifiedTime = getCurrentTime(state.host);
|
|
103887
|
+
}
|
|
103888
|
+
else {
|
|
103889
|
+
state.buildInfoCache.set(resolvedConfigPath, { path: toPath(state, buildInfoPath), buildInfo: buildInfo, modifiedTime: getCurrentTime(state.host) });
|
|
103890
|
+
}
|
|
103891
|
+
}
|
|
103892
|
+
function getBuildInfoCacheEntry(state, buildInfoPath, resolvedConfigPath) {
|
|
103893
|
+
var path = toPath(state, buildInfoPath);
|
|
103894
|
+
var existing = state.buildInfoCache.get(resolvedConfigPath);
|
|
103895
|
+
return (existing === null || existing === void 0 ? void 0 : existing.path) === path ? existing : undefined;
|
|
103896
|
+
}
|
|
103897
|
+
function getBuildInfo(state, buildInfoPath, resolvedConfigPath, modifiedTime) {
|
|
103898
|
+
var path = toPath(state, buildInfoPath);
|
|
103899
|
+
var existing = state.buildInfoCache.get(resolvedConfigPath);
|
|
103900
|
+
if (existing !== undefined && existing.path === path) {
|
|
103901
|
+
return existing.buildInfo || undefined;
|
|
103902
|
+
}
|
|
103903
|
+
ts.solutionPerformance.mark("beforeGetBuildInfo");
|
|
103904
|
+
ts.solutionPerformance.mark("beforeBuildInfoRead");
|
|
103905
|
+
var value = state.readFileWithCache(buildInfoPath);
|
|
103906
|
+
ts.solutionPerformance.mark("afterBuildInfoRead");
|
|
103907
|
+
ts.solutionPerformance.measure("BuildInfoRead", "beforeBuildInfoRead", "afterBuildInfoRead");
|
|
103908
|
+
var buildInfo = value ? ts.getBuildInfo(value) : undefined;
|
|
103909
|
+
ts.Debug.assert(modifiedTime || !buildInfo);
|
|
103910
|
+
state.buildInfoCache.set(resolvedConfigPath, { path: path, buildInfo: buildInfo || false, modifiedTime: modifiedTime || ts.missingFileModifiedTime });
|
|
103911
|
+
ts.solutionPerformance.mark("afterGetBuildInfo");
|
|
103912
|
+
ts.solutionPerformance.measure("GetBuildInfo", "beforeGetBuildInfo", "afterGetBuildInfo");
|
|
103913
|
+
return buildInfo;
|
|
103914
|
+
}
|
|
103594
103915
|
function checkConfigFileUpToDateStatus(state, configFile, oldestOutputFileTime, oldestOutputFileName) {
|
|
103595
|
-
var tsconfigTime =
|
|
103916
|
+
var tsconfigTime = getModifiedTime(state, configFile);
|
|
103596
103917
|
if (oldestOutputFileTime < tsconfigTime) {
|
|
103597
103918
|
return {
|
|
103598
103919
|
type: ts.UpToDateStatusType.OutOfDateWithSelf,
|
|
@@ -103602,76 +103923,22 @@ var ts;
|
|
|
103602
103923
|
}
|
|
103603
103924
|
}
|
|
103604
103925
|
function getUpToDateStatusWorker(state, project, resolvedPath) {
|
|
103605
|
-
var
|
|
103606
|
-
var newestInputFileName = undefined;
|
|
103607
|
-
var newestInputFileTime = minimumDate;
|
|
103608
|
-
var host = state.host;
|
|
103609
|
-
for (var _i = 0, _a = project.fileNames; _i < _a.length; _i++) {
|
|
103610
|
-
var inputFile = _a[_i];
|
|
103611
|
-
if (!host.fileExists(inputFile)) {
|
|
103612
|
-
return {
|
|
103613
|
-
type: ts.UpToDateStatusType.Unbuildable,
|
|
103614
|
-
reason: inputFile + " does not exist"
|
|
103615
|
-
};
|
|
103616
|
-
}
|
|
103617
|
-
if (!force) {
|
|
103618
|
-
var inputTime = ts.getModifiedTime(host, inputFile);
|
|
103619
|
-
if (inputTime > newestInputFileTime) {
|
|
103620
|
-
newestInputFileName = inputFile;
|
|
103621
|
-
newestInputFileTime = inputTime;
|
|
103622
|
-
}
|
|
103623
|
-
}
|
|
103624
|
-
}
|
|
103926
|
+
var _a, _b, _c;
|
|
103625
103927
|
if (!project.fileNames.length && !ts.canJsonReportNoInputFiles(project.raw)) {
|
|
103626
103928
|
return {
|
|
103627
103929
|
type: ts.UpToDateStatusType.ContainerOnly
|
|
103628
103930
|
};
|
|
103629
103931
|
}
|
|
103630
|
-
var
|
|
103631
|
-
var
|
|
103632
|
-
var oldestOutputFileTime = maximumDate;
|
|
103633
|
-
var newestOutputFileName = "(none)";
|
|
103634
|
-
var newestOutputFileTime = minimumDate;
|
|
103635
|
-
var missingOutputFileName;
|
|
103636
|
-
var newestDeclarationFileContentChangedTime = minimumDate;
|
|
103637
|
-
var isOutOfDateWithInputs = false;
|
|
103638
|
-
if (!force) {
|
|
103639
|
-
for (var _b = 0, outputs_1 = outputs; _b < outputs_1.length; _b++) {
|
|
103640
|
-
var output = outputs_1[_b];
|
|
103641
|
-
if (!host.fileExists(output)) {
|
|
103642
|
-
missingOutputFileName = output;
|
|
103643
|
-
break;
|
|
103644
|
-
}
|
|
103645
|
-
var outputTime = ts.getModifiedTime(host, output);
|
|
103646
|
-
if (outputTime < oldestOutputFileTime) {
|
|
103647
|
-
oldestOutputFileTime = outputTime;
|
|
103648
|
-
oldestOutputFileName = output;
|
|
103649
|
-
}
|
|
103650
|
-
if (outputTime < newestInputFileTime) {
|
|
103651
|
-
isOutOfDateWithInputs = true;
|
|
103652
|
-
break;
|
|
103653
|
-
}
|
|
103654
|
-
if (outputTime > newestOutputFileTime) {
|
|
103655
|
-
newestOutputFileTime = outputTime;
|
|
103656
|
-
newestOutputFileName = output;
|
|
103657
|
-
}
|
|
103658
|
-
if (ts.isDeclarationFileName(output)) {
|
|
103659
|
-
var outputModifiedTime = ts.getModifiedTime(host, output);
|
|
103660
|
-
newestDeclarationFileContentChangedTime = newer(newestDeclarationFileContentChangedTime, outputModifiedTime);
|
|
103661
|
-
}
|
|
103662
|
-
}
|
|
103663
|
-
}
|
|
103664
|
-
var pseudoUpToDate = false;
|
|
103665
|
-
var usesPrepend = false;
|
|
103666
|
-
var upstreamChangedProject;
|
|
103932
|
+
var referenceStatuses;
|
|
103933
|
+
var force = !!state.options.force;
|
|
103667
103934
|
if (project.projectReferences) {
|
|
103668
103935
|
state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.ComputingUpstream });
|
|
103669
|
-
for (var
|
|
103670
|
-
var ref = _d[
|
|
103671
|
-
usesPrepend = usesPrepend || !!(ref.prepend);
|
|
103936
|
+
for (var _i = 0, _d = project.projectReferences; _i < _d.length; _i++) {
|
|
103937
|
+
var ref = _d[_i];
|
|
103672
103938
|
var resolvedRef = ts.resolveProjectReferencePath(ref);
|
|
103673
103939
|
var resolvedRefPath = toResolvedConfigFilePath(state, resolvedRef);
|
|
103674
|
-
var
|
|
103940
|
+
var resolvedConfig = parseConfigFile(state, resolvedRef, resolvedRefPath);
|
|
103941
|
+
var refStatus = getUpToDateStatus(state, resolvedConfig, resolvedRefPath);
|
|
103675
103942
|
if (refStatus.type === ts.UpToDateStatusType.ComputingUpstream ||
|
|
103676
103943
|
refStatus.type === ts.UpToDateStatusType.ContainerOnly) {
|
|
103677
103944
|
continue;
|
|
@@ -103690,68 +103957,169 @@ var ts;
|
|
|
103690
103957
|
upstreamProjectName: ref.path
|
|
103691
103958
|
};
|
|
103692
103959
|
}
|
|
103693
|
-
if (!force
|
|
103694
|
-
|
|
103695
|
-
|
|
103696
|
-
|
|
103697
|
-
|
|
103698
|
-
|
|
103699
|
-
|
|
103700
|
-
|
|
103701
|
-
|
|
103702
|
-
|
|
103960
|
+
if (!force)
|
|
103961
|
+
(referenceStatuses || (referenceStatuses = [])).push({ ref: ref, refStatus: refStatus, resolvedRefPath: resolvedRefPath, resolvedConfig: resolvedConfig });
|
|
103962
|
+
}
|
|
103963
|
+
}
|
|
103964
|
+
if (force)
|
|
103965
|
+
return { type: ts.UpToDateStatusType.ForceBuild };
|
|
103966
|
+
var host = state.host;
|
|
103967
|
+
var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(project.options);
|
|
103968
|
+
var oldestOutputFileName = "(none)";
|
|
103969
|
+
var oldestOutputFileTime = maximumDate;
|
|
103970
|
+
var buildInfoTime;
|
|
103971
|
+
var buildInfoProgram;
|
|
103972
|
+
var buildInfoVersionMap;
|
|
103973
|
+
var newestDeclarationFileContentChangedTime;
|
|
103974
|
+
if (buildInfoPath) {
|
|
103975
|
+
var buildInfoCacheEntry_1 = getBuildInfoCacheEntry(state, buildInfoPath, resolvedPath);
|
|
103976
|
+
buildInfoTime = (buildInfoCacheEntry_1 === null || buildInfoCacheEntry_1 === void 0 ? void 0 : buildInfoCacheEntry_1.modifiedTime) || ts.getModifiedTime(host, buildInfoPath);
|
|
103977
|
+
if (buildInfoTime === ts.missingFileModifiedTime) {
|
|
103978
|
+
if (!buildInfoCacheEntry_1) {
|
|
103979
|
+
state.buildInfoCache.set(resolvedPath, {
|
|
103980
|
+
path: toPath(state, buildInfoPath),
|
|
103981
|
+
buildInfo: false,
|
|
103982
|
+
modifiedTime: buildInfoTime
|
|
103983
|
+
});
|
|
103984
|
+
}
|
|
103985
|
+
return {
|
|
103986
|
+
type: ts.UpToDateStatusType.OutputMissing,
|
|
103987
|
+
missingOutputFileName: buildInfoPath
|
|
103988
|
+
};
|
|
103989
|
+
}
|
|
103990
|
+
var buildInfo = ts.Debug.checkDefined(getBuildInfo(state, buildInfoPath, resolvedPath, buildInfoTime));
|
|
103991
|
+
if ((buildInfo.bundle || buildInfo.program) && buildInfo.version !== ts.version) {
|
|
103992
|
+
return {
|
|
103993
|
+
type: ts.UpToDateStatusType.TsVersionOutputOfDate,
|
|
103994
|
+
version: buildInfo.version
|
|
103995
|
+
};
|
|
103996
|
+
}
|
|
103997
|
+
if (buildInfo.program) {
|
|
103998
|
+
if (((_a = buildInfo.program.changeFileSet) === null || _a === void 0 ? void 0 : _a.length) ||
|
|
103999
|
+
(!project.options.noEmit && ((_b = buildInfo.program.affectedFilesPendingEmit) === null || _b === void 0 ? void 0 : _b.length))) {
|
|
103703
104000
|
return {
|
|
103704
|
-
type: ts.UpToDateStatusType.
|
|
103705
|
-
|
|
103706
|
-
newerProjectName: ref.path
|
|
104001
|
+
type: ts.UpToDateStatusType.OutOfDateBuildInfo,
|
|
104002
|
+
buildInfoFile: buildInfoPath
|
|
103707
104003
|
};
|
|
103708
104004
|
}
|
|
104005
|
+
buildInfoProgram = buildInfo.program;
|
|
103709
104006
|
}
|
|
104007
|
+
oldestOutputFileTime = buildInfoTime;
|
|
104008
|
+
oldestOutputFileName = buildInfoPath;
|
|
104009
|
+
newestDeclarationFileContentChangedTime = ((_c = buildInfo.program) === null || _c === void 0 ? void 0 : _c.dtsChangeTime) ? new Date(buildInfo.program.dtsChangeTime) : undefined;
|
|
103710
104010
|
}
|
|
103711
|
-
|
|
103712
|
-
|
|
103713
|
-
|
|
103714
|
-
|
|
103715
|
-
|
|
104011
|
+
var newestInputFileName = undefined;
|
|
104012
|
+
var newestInputFileTime = minimumDate;
|
|
104013
|
+
var pseudoInputUptodate = false;
|
|
104014
|
+
for (var _e = 0, _f = project.fileNames; _e < _f.length; _e++) {
|
|
104015
|
+
var inputFile = _f[_e];
|
|
104016
|
+
var inputTime = getModifiedTime(state, inputFile);
|
|
104017
|
+
if (inputTime === ts.missingFileModifiedTime) {
|
|
104018
|
+
return {
|
|
104019
|
+
type: ts.UpToDateStatusType.Unbuildable,
|
|
104020
|
+
reason: inputFile + " does not exist"
|
|
104021
|
+
};
|
|
104022
|
+
}
|
|
104023
|
+
if (buildInfoTime && buildInfoTime < inputTime) {
|
|
104024
|
+
var version_3 = void 0;
|
|
104025
|
+
var currentVersion = void 0;
|
|
104026
|
+
if (buildInfoProgram) {
|
|
104027
|
+
if (!buildInfoVersionMap)
|
|
104028
|
+
buildInfoVersionMap = ts.getBuildInfoFileVersionMap(buildInfoProgram, buildInfoPath, host);
|
|
104029
|
+
version_3 = buildInfoVersionMap.get(toPath(state, inputFile));
|
|
104030
|
+
var text = version_3 ? state.readFileWithCache(inputFile) : undefined;
|
|
104031
|
+
currentVersion = text && (host.createHash || ts.generateDjb2Hash)(text);
|
|
104032
|
+
if (version_3 && version_3 === currentVersion)
|
|
104033
|
+
pseudoInputUptodate = true;
|
|
104034
|
+
}
|
|
104035
|
+
if (!version_3 || version_3 !== currentVersion) {
|
|
104036
|
+
return {
|
|
104037
|
+
type: ts.UpToDateStatusType.OutOfDateWithSelf,
|
|
104038
|
+
outOfDateOutputFileName: buildInfoPath,
|
|
104039
|
+
newerInputFileName: inputFile
|
|
104040
|
+
};
|
|
104041
|
+
}
|
|
104042
|
+
}
|
|
104043
|
+
if (inputTime > newestInputFileTime) {
|
|
104044
|
+
newestInputFileName = inputFile;
|
|
104045
|
+
newestInputFileTime = inputTime;
|
|
104046
|
+
}
|
|
103716
104047
|
}
|
|
103717
|
-
if (
|
|
103718
|
-
|
|
103719
|
-
|
|
103720
|
-
|
|
103721
|
-
|
|
103722
|
-
|
|
104048
|
+
if (!buildInfoPath) {
|
|
104049
|
+
var outputs = ts.getAllProjectOutputs(project, !host.useCaseSensitiveFileNames());
|
|
104050
|
+
var outputTimeStampMap = getOutputTimeStampMap(state, resolvedPath);
|
|
104051
|
+
for (var _g = 0, outputs_1 = outputs; _g < outputs_1.length; _g++) {
|
|
104052
|
+
var output = outputs_1[_g];
|
|
104053
|
+
var path = toPath(state, output);
|
|
104054
|
+
var outputTime = outputTimeStampMap === null || outputTimeStampMap === void 0 ? void 0 : outputTimeStampMap.get(path);
|
|
104055
|
+
if (!outputTime) {
|
|
104056
|
+
outputTime = ts.getModifiedTime(state.host, output);
|
|
104057
|
+
outputTimeStampMap === null || outputTimeStampMap === void 0 ? void 0 : outputTimeStampMap.set(path, outputTime);
|
|
104058
|
+
}
|
|
104059
|
+
if (outputTime === ts.missingFileModifiedTime) {
|
|
104060
|
+
return {
|
|
104061
|
+
type: ts.UpToDateStatusType.OutputMissing,
|
|
104062
|
+
missingOutputFileName: output
|
|
104063
|
+
};
|
|
104064
|
+
}
|
|
104065
|
+
if (outputTime < oldestOutputFileTime) {
|
|
104066
|
+
oldestOutputFileTime = outputTime;
|
|
104067
|
+
oldestOutputFileName = output;
|
|
104068
|
+
}
|
|
104069
|
+
if (outputTime < newestInputFileTime) {
|
|
104070
|
+
return {
|
|
104071
|
+
type: ts.UpToDateStatusType.OutOfDateWithSelf,
|
|
104072
|
+
outOfDateOutputFileName: oldestOutputFileName,
|
|
104073
|
+
newerInputFileName: newestInputFileName
|
|
104074
|
+
};
|
|
104075
|
+
}
|
|
104076
|
+
}
|
|
103723
104077
|
}
|
|
103724
|
-
|
|
103725
|
-
|
|
103726
|
-
|
|
103727
|
-
|
|
103728
|
-
|
|
103729
|
-
|
|
103730
|
-
|
|
103731
|
-
var
|
|
103732
|
-
var
|
|
103733
|
-
|
|
103734
|
-
|
|
103735
|
-
|
|
103736
|
-
|
|
103737
|
-
|
|
103738
|
-
if (!force && !state.buildInfoChecked.has(resolvedPath)) {
|
|
103739
|
-
state.buildInfoChecked.set(resolvedPath, true);
|
|
103740
|
-
var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(project.options);
|
|
103741
|
-
if (buildInfoPath) {
|
|
103742
|
-
ts.solutionPerformance.mark("beforeBuildInfoRead");
|
|
103743
|
-
var value = state.readFileWithCache(buildInfoPath);
|
|
103744
|
-
ts.solutionPerformance.mark("afterBuildInfoRead");
|
|
103745
|
-
ts.solutionPerformance.measure("BuildInfoRead", "beforeBuildInfoRead", "afterBuildInfoRead");
|
|
103746
|
-
var buildInfo = value && ts.getBuildInfo(value);
|
|
103747
|
-
if (buildInfo && (buildInfo.bundle || buildInfo.program) && buildInfo.version !== ts.version) {
|
|
104078
|
+
var seenRefs = buildInfoPath ? new ts.Set() : undefined;
|
|
104079
|
+
var buildInfoCacheEntry = state.buildInfoCache.get(resolvedPath);
|
|
104080
|
+
seenRefs === null || seenRefs === void 0 ? void 0 : seenRefs.add(resolvedPath);
|
|
104081
|
+
var pseudoUpToDate = false;
|
|
104082
|
+
var usesPrepend = false;
|
|
104083
|
+
var upstreamChangedProject;
|
|
104084
|
+
if (referenceStatuses) {
|
|
104085
|
+
for (var _h = 0, referenceStatuses_1 = referenceStatuses; _h < referenceStatuses_1.length; _h++) {
|
|
104086
|
+
var _j = referenceStatuses_1[_h], ref = _j.ref, refStatus = _j.refStatus, resolvedConfig = _j.resolvedConfig, resolvedRefPath = _j.resolvedRefPath;
|
|
104087
|
+
usesPrepend = usesPrepend || !!(ref.prepend);
|
|
104088
|
+
if (refStatus.newestInputFileTime && refStatus.newestInputFileTime <= oldestOutputFileTime) {
|
|
104089
|
+
continue;
|
|
104090
|
+
}
|
|
104091
|
+
if (buildInfoCacheEntry && hasSameBuildInfo(state, buildInfoCacheEntry, seenRefs, resolvedConfig, resolvedRefPath)) {
|
|
103748
104092
|
return {
|
|
103749
|
-
type: ts.UpToDateStatusType.
|
|
103750
|
-
|
|
104093
|
+
type: ts.UpToDateStatusType.OutOfDateWithUpstream,
|
|
104094
|
+
outOfDateOutputFileName: buildInfoPath,
|
|
104095
|
+
newerProjectName: ref.path
|
|
103751
104096
|
};
|
|
103752
104097
|
}
|
|
104098
|
+
if (refStatus.newestDeclarationFileContentChangedTime && refStatus.newestDeclarationFileContentChangedTime <= oldestOutputFileTime) {
|
|
104099
|
+
pseudoUpToDate = true;
|
|
104100
|
+
upstreamChangedProject = ref.path;
|
|
104101
|
+
continue;
|
|
104102
|
+
}
|
|
104103
|
+
ts.Debug.assert(oldestOutputFileName !== undefined, "Should have an oldest output filename here");
|
|
104104
|
+
return {
|
|
104105
|
+
type: ts.UpToDateStatusType.OutOfDateWithUpstream,
|
|
104106
|
+
outOfDateOutputFileName: oldestOutputFileName,
|
|
104107
|
+
newerProjectName: ref.path
|
|
104108
|
+
};
|
|
103753
104109
|
}
|
|
103754
104110
|
}
|
|
104111
|
+
var configStatus = checkConfigFileUpToDateStatus(state, project.options.configFilePath, oldestOutputFileTime, oldestOutputFileName);
|
|
104112
|
+
if (configStatus)
|
|
104113
|
+
return configStatus;
|
|
104114
|
+
var extendedConfigStatus = ts.forEach(project.options.configFile.extendedSourceFiles || ts.emptyArray, function (configFile) { return checkConfigFileUpToDateStatus(state, configFile, oldestOutputFileTime, oldestOutputFileName); });
|
|
104115
|
+
if (extendedConfigStatus)
|
|
104116
|
+
return extendedConfigStatus;
|
|
104117
|
+
var dependentPackageFileStatus = ts.forEach(state.lastCachedPackageJsonLookups.get(resolvedPath) || ts.emptyArray, function (_a) {
|
|
104118
|
+
var path = _a[0];
|
|
104119
|
+
return checkConfigFileUpToDateStatus(state, path, oldestOutputFileTime, oldestOutputFileName);
|
|
104120
|
+
});
|
|
104121
|
+
if (dependentPackageFileStatus)
|
|
104122
|
+
return dependentPackageFileStatus;
|
|
103755
104123
|
if (usesPrepend && pseudoUpToDate) {
|
|
103756
104124
|
return {
|
|
103757
104125
|
type: ts.UpToDateStatusType.OutOfDateWithPrepend,
|
|
@@ -103760,15 +104128,36 @@ var ts;
|
|
|
103760
104128
|
};
|
|
103761
104129
|
}
|
|
103762
104130
|
return {
|
|
103763
|
-
type: pseudoUpToDate ?
|
|
104131
|
+
type: pseudoUpToDate ?
|
|
104132
|
+
ts.UpToDateStatusType.UpToDateWithUpstreamTypes :
|
|
104133
|
+
pseudoInputUptodate ?
|
|
104134
|
+
ts.UpToDateStatusType.UpToDateWithInputFileText :
|
|
104135
|
+
ts.UpToDateStatusType.UpToDate,
|
|
103764
104136
|
newestDeclarationFileContentChangedTime: newestDeclarationFileContentChangedTime,
|
|
103765
104137
|
newestInputFileTime: newestInputFileTime,
|
|
103766
|
-
newestOutputFileTime: newestOutputFileTime,
|
|
103767
104138
|
newestInputFileName: newestInputFileName,
|
|
103768
|
-
newestOutputFileName: newestOutputFileName,
|
|
103769
104139
|
oldestOutputFileName: oldestOutputFileName
|
|
103770
104140
|
};
|
|
103771
104141
|
}
|
|
104142
|
+
function hasSameBuildInfo(state, buildInfoCacheEntry, seenRefs, resolvedConfig, resolvedRefPath) {
|
|
104143
|
+
if (seenRefs.has(resolvedRefPath))
|
|
104144
|
+
return false;
|
|
104145
|
+
seenRefs.add(resolvedRefPath);
|
|
104146
|
+
var refBuildInfo = state.buildInfoCache.get(resolvedRefPath);
|
|
104147
|
+
if (refBuildInfo.path === buildInfoCacheEntry.path)
|
|
104148
|
+
return true;
|
|
104149
|
+
if (resolvedConfig.projectReferences) {
|
|
104150
|
+
for (var _i = 0, _a = resolvedConfig.projectReferences; _i < _a.length; _i++) {
|
|
104151
|
+
var ref = _a[_i];
|
|
104152
|
+
var resolvedRef = ts.resolveProjectReferencePath(ref);
|
|
104153
|
+
var resolvedRefPath_1 = toResolvedConfigFilePath(state, resolvedRef);
|
|
104154
|
+
var resolvedConfig_1 = parseConfigFile(state, resolvedRef, resolvedRefPath_1);
|
|
104155
|
+
if (hasSameBuildInfo(state, buildInfoCacheEntry, seenRefs, resolvedConfig_1, resolvedRefPath_1))
|
|
104156
|
+
return true;
|
|
104157
|
+
}
|
|
104158
|
+
}
|
|
104159
|
+
return false;
|
|
104160
|
+
}
|
|
103772
104161
|
function getUpToDateStatus(state, project, resolvedPath) {
|
|
103773
104162
|
if (project === undefined) {
|
|
103774
104163
|
return { type: ts.UpToDateStatusType.Unbuildable, reason: "File deleted mid-build" };
|
|
@@ -103784,42 +104173,68 @@ var ts;
|
|
|
103784
104173
|
state.projectStatus.set(resolvedPath, actual);
|
|
103785
104174
|
return actual;
|
|
103786
104175
|
}
|
|
103787
|
-
function updateOutputTimestampsWorker(state, proj,
|
|
104176
|
+
function updateOutputTimestampsWorker(state, proj, projectPath, verboseMessage, skipOutputs) {
|
|
103788
104177
|
if (proj.options.noEmit)
|
|
103789
|
-
return
|
|
104178
|
+
return;
|
|
104179
|
+
var now;
|
|
103790
104180
|
ts.solutionPerformance.mark("beforeUpdateOutputTimestamps");
|
|
103791
|
-
var
|
|
103792
|
-
|
|
103793
|
-
|
|
103794
|
-
|
|
103795
|
-
var now = host.now ? host.now() : new Date();
|
|
103796
|
-
for (var _i = 0, outputs_2 = outputs; _i < outputs_2.length; _i++) {
|
|
103797
|
-
var file = outputs_2[_i];
|
|
103798
|
-
if (skipOutputs && skipOutputs.has(toPath(state, file))) {
|
|
103799
|
-
continue;
|
|
103800
|
-
}
|
|
103801
|
-
if (reportVerbose) {
|
|
103802
|
-
reportVerbose = false;
|
|
104181
|
+
var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(proj.options);
|
|
104182
|
+
if (buildInfoPath) {
|
|
104183
|
+
if (!(skipOutputs === null || skipOutputs === void 0 ? void 0 : skipOutputs.has(toPath(state, buildInfoPath)))) {
|
|
104184
|
+
if (!!state.options.verbose)
|
|
103803
104185
|
reportStatus(state, verboseMessage, proj.options.configFilePath);
|
|
104186
|
+
state.host.setModifiedTime(buildInfoPath, now = getCurrentTime(state.host));
|
|
104187
|
+
getBuildInfoCacheEntry(state, buildInfoPath, projectPath).modifiedTime = now;
|
|
104188
|
+
}
|
|
104189
|
+
state.outputTimeStamps.delete(projectPath);
|
|
104190
|
+
}
|
|
104191
|
+
else {
|
|
104192
|
+
var host = state.host;
|
|
104193
|
+
var outputs = ts.getAllProjectOutputs(proj, !host.useCaseSensitiveFileNames());
|
|
104194
|
+
var outputTimeStampMap_1 = getOutputTimeStampMap(state, projectPath);
|
|
104195
|
+
var modifiedOutputs_1 = outputTimeStampMap_1 ? new ts.Set() : undefined;
|
|
104196
|
+
if (!skipOutputs || outputs.length !== skipOutputs.size) {
|
|
104197
|
+
var reportVerbose = !!state.options.verbose;
|
|
104198
|
+
for (var _i = 0, outputs_2 = outputs; _i < outputs_2.length; _i++) {
|
|
104199
|
+
var file = outputs_2[_i];
|
|
104200
|
+
var path = toPath(state, file);
|
|
104201
|
+
if (skipOutputs === null || skipOutputs === void 0 ? void 0 : skipOutputs.has(path))
|
|
104202
|
+
continue;
|
|
104203
|
+
if (reportVerbose) {
|
|
104204
|
+
reportVerbose = false;
|
|
104205
|
+
reportStatus(state, verboseMessage, proj.options.configFilePath);
|
|
104206
|
+
}
|
|
104207
|
+
host.setModifiedTime(file, now || (now = getCurrentTime(state.host)));
|
|
104208
|
+
if (outputTimeStampMap_1) {
|
|
104209
|
+
outputTimeStampMap_1.set(path, now);
|
|
104210
|
+
modifiedOutputs_1.add(path);
|
|
104211
|
+
}
|
|
103804
104212
|
}
|
|
103805
|
-
if (ts.isDeclarationFileName(file)) {
|
|
103806
|
-
priorNewestUpdateTime = newer(priorNewestUpdateTime, ts.getModifiedTime(host, file));
|
|
103807
|
-
}
|
|
103808
|
-
host.setModifiedTime(file, now);
|
|
103809
104213
|
}
|
|
104214
|
+
outputTimeStampMap_1 === null || outputTimeStampMap_1 === void 0 ? void 0 : outputTimeStampMap_1.forEach(function (_value, key) {
|
|
104215
|
+
if (!(skipOutputs === null || skipOutputs === void 0 ? void 0 : skipOutputs.has(key)) && !modifiedOutputs_1.has(key))
|
|
104216
|
+
outputTimeStampMap_1.delete(key);
|
|
104217
|
+
});
|
|
103810
104218
|
}
|
|
103811
104219
|
ts.solutionPerformance.mark("afterUpdateOutputTimestamps");
|
|
103812
104220
|
ts.solutionPerformance.measure("UpdateOutputTimestamps", "beforeUpdateOutputTimestamps", "afterUpdateOutputTimestamps");
|
|
103813
|
-
|
|
104221
|
+
}
|
|
104222
|
+
function getDtsChangeTime(state, options, resolvedConfigPath) {
|
|
104223
|
+
var _a;
|
|
104224
|
+
if (!options.composite)
|
|
104225
|
+
return undefined;
|
|
104226
|
+
var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(options);
|
|
104227
|
+
var buildInfo = getBuildInfo(state, buildInfoPath, resolvedConfigPath, undefined);
|
|
104228
|
+
return ((_a = buildInfo === null || buildInfo === void 0 ? void 0 : buildInfo.program) === null || _a === void 0 ? void 0 : _a.dtsChangeTime) ? new Date(buildInfo.program.dtsChangeTime) : undefined;
|
|
103814
104229
|
}
|
|
103815
104230
|
function updateOutputTimestamps(state, proj, resolvedPath) {
|
|
103816
104231
|
if (state.options.dry) {
|
|
103817
104232
|
return reportStatus(state, ts.Diagnostics.A_non_dry_build_would_update_timestamps_for_output_of_project_0, proj.options.configFilePath);
|
|
103818
104233
|
}
|
|
103819
|
-
|
|
104234
|
+
updateOutputTimestampsWorker(state, proj, resolvedPath, ts.Diagnostics.Updating_output_timestamps_of_project_0);
|
|
103820
104235
|
state.projectStatus.set(resolvedPath, {
|
|
103821
104236
|
type: ts.UpToDateStatusType.UpToDate,
|
|
103822
|
-
newestDeclarationFileContentChangedTime:
|
|
104237
|
+
newestDeclarationFileContentChangedTime: getDtsChangeTime(state, proj.options, resolvedPath),
|
|
103823
104238
|
oldestOutputFileName: ts.getFirstProjectOutput(proj, !state.host.useCaseSensitiveFileNames())
|
|
103824
104239
|
});
|
|
103825
104240
|
}
|
|
@@ -103858,6 +104273,7 @@ var ts;
|
|
|
103858
104273
|
}
|
|
103859
104274
|
break;
|
|
103860
104275
|
}
|
|
104276
|
+
case ts.UpToDateStatusType.UpToDateWithInputFileText:
|
|
103861
104277
|
case ts.UpToDateStatusType.UpToDateWithUpstreamTypes:
|
|
103862
104278
|
case ts.UpToDateStatusType.OutOfDateWithPrepend:
|
|
103863
104279
|
if (!(buildResult & BuildResultFlags.DeclarationOutputUnchanged)) {
|
|
@@ -103918,6 +104334,13 @@ var ts;
|
|
|
103918
104334
|
: ts.ExitStatus.DiagnosticsPresent_OutputsSkipped;
|
|
103919
104335
|
}
|
|
103920
104336
|
function clean(state, project, onlyReferences) {
|
|
104337
|
+
ts.solutionPerformance.mark("beforeClean");
|
|
104338
|
+
var result = cleanWorker(state, project, onlyReferences);
|
|
104339
|
+
ts.solutionPerformance.mark("afterClean");
|
|
104340
|
+
ts.solutionPerformance.measure("Clean", "beforeClean", "afterClean");
|
|
104341
|
+
return result;
|
|
104342
|
+
}
|
|
104343
|
+
function cleanWorker(state, project, onlyReferences) {
|
|
103921
104344
|
var buildOrder = getBuildOrderFor(state, project, onlyReferences);
|
|
103922
104345
|
if (!buildOrder)
|
|
103923
104346
|
return ts.ExitStatus.InvalidProject_OutputsSkipped;
|
|
@@ -104036,12 +104459,10 @@ var ts;
|
|
|
104036
104459
|
function watchConfigFile(state, resolved, resolvedPath, parsed) {
|
|
104037
104460
|
if (!state.watch || state.allWatchedConfigFiles.has(resolvedPath))
|
|
104038
104461
|
return;
|
|
104039
|
-
state.allWatchedConfigFiles.set(resolvedPath,
|
|
104040
|
-
invalidateProjectAndScheduleBuilds(state, resolvedPath, ts.ConfigFileProgramReloadLevel.Full);
|
|
104041
|
-
}, ts.PollingInterval.High, parsed === null || parsed === void 0 ? void 0 : parsed.watchOptions, ts.WatchType.ConfigFile, resolved));
|
|
104462
|
+
state.allWatchedConfigFiles.set(resolvedPath, watchFile(state, resolved, function () { return invalidateProjectAndScheduleBuilds(state, resolvedPath, ts.ConfigFileProgramReloadLevel.Full); }, ts.PollingInterval.High, parsed === null || parsed === void 0 ? void 0 : parsed.watchOptions, ts.WatchType.ConfigFile, resolved));
|
|
104042
104463
|
}
|
|
104043
104464
|
function watchExtendedConfigFiles(state, resolvedPath, parsed) {
|
|
104044
|
-
ts.updateSharedExtendedConfigFileWatcher(resolvedPath, parsed === null || parsed === void 0 ? void 0 : parsed.options, state.allWatchedExtendedConfigFiles, function (extendedConfigFileName, extendedConfigFilePath) { return
|
|
104465
|
+
ts.updateSharedExtendedConfigFileWatcher(resolvedPath, parsed === null || parsed === void 0 ? void 0 : parsed.options, state.allWatchedExtendedConfigFiles, function (extendedConfigFileName, extendedConfigFilePath) { return watchFile(state, extendedConfigFileName, function () {
|
|
104045
104466
|
var _a;
|
|
104046
104467
|
return (_a = state.allWatchedExtendedConfigFiles.get(extendedConfigFilePath)) === null || _a === void 0 ? void 0 : _a.projects.forEach(function (projectConfigFilePath) {
|
|
104047
104468
|
return invalidateProjectAndScheduleBuilds(state, projectConfigFilePath, ts.ConfigFileProgramReloadLevel.Full);
|
|
@@ -104073,7 +104494,7 @@ var ts;
|
|
|
104073
104494
|
if (!state.watch)
|
|
104074
104495
|
return;
|
|
104075
104496
|
ts.mutateMap(getOrCreateValueMapFromConfigFileMap(state.allWatchedInputFiles, resolvedPath), ts.arrayToMap(parsed.fileNames, function (fileName) { return toPath(state, fileName); }), {
|
|
104076
|
-
createNewValue: function (_path, input) { return
|
|
104497
|
+
createNewValue: function (_path, input) { return watchFile(state, input, function () { return invalidateProjectAndScheduleBuilds(state, resolvedPath, ts.ConfigFileProgramReloadLevel.None); }, ts.PollingInterval.Low, parsed === null || parsed === void 0 ? void 0 : parsed.watchOptions, ts.WatchType.SourceFile, resolved); },
|
|
104077
104498
|
onDeleteValue: ts.closeFileWatcher,
|
|
104078
104499
|
});
|
|
104079
104500
|
}
|
|
@@ -104081,7 +104502,7 @@ var ts;
|
|
|
104081
104502
|
if (!state.watch || !state.lastCachedPackageJsonLookups)
|
|
104082
104503
|
return;
|
|
104083
104504
|
ts.mutateMap(getOrCreateValueMapFromConfigFileMap(state.allWatchedPackageJsonFiles, resolvedPath), new ts.Map(state.lastCachedPackageJsonLookups.get(resolvedPath)), {
|
|
104084
|
-
createNewValue: function (path, _input) { return
|
|
104505
|
+
createNewValue: function (path, _input) { return watchFile(state, path, function () { return invalidateProjectAndScheduleBuilds(state, resolvedPath, ts.ConfigFileProgramReloadLevel.None); }, ts.PollingInterval.High, parsed === null || parsed === void 0 ? void 0 : parsed.watchOptions, ts.WatchType.PackageJson, resolved); },
|
|
104085
104506
|
onDeleteValue: ts.closeFileWatcher,
|
|
104086
104507
|
});
|
|
104087
104508
|
}
|
|
@@ -104206,25 +104627,26 @@ var ts;
|
|
|
104206
104627
|
}
|
|
104207
104628
|
}
|
|
104208
104629
|
function reportUpToDateStatus(state, configFileName, status) {
|
|
104209
|
-
if (state.options.force && (status.type === ts.UpToDateStatusType.UpToDate || status.type === ts.UpToDateStatusType.UpToDateWithUpstreamTypes)) {
|
|
104210
|
-
return reportStatus(state, ts.Diagnostics.Project_0_is_being_forcibly_rebuilt, relName(state, configFileName));
|
|
104211
|
-
}
|
|
104212
104630
|
switch (status.type) {
|
|
104213
104631
|
case ts.UpToDateStatusType.OutOfDateWithSelf:
|
|
104214
|
-
return reportStatus(state, ts.Diagnostics.
|
|
104632
|
+
return reportStatus(state, ts.Diagnostics.Project_0_is_out_of_date_because_output_1_is_older_than_input_2, relName(state, configFileName), relName(state, status.outOfDateOutputFileName), relName(state, status.newerInputFileName));
|
|
104215
104633
|
case ts.UpToDateStatusType.OutOfDateWithUpstream:
|
|
104216
|
-
return reportStatus(state, ts.Diagnostics.
|
|
104634
|
+
return reportStatus(state, ts.Diagnostics.Project_0_is_out_of_date_because_output_1_is_older_than_input_2, relName(state, configFileName), relName(state, status.outOfDateOutputFileName), relName(state, status.newerProjectName));
|
|
104217
104635
|
case ts.UpToDateStatusType.OutputMissing:
|
|
104218
104636
|
return reportStatus(state, ts.Diagnostics.Project_0_is_out_of_date_because_output_file_1_does_not_exist, relName(state, configFileName), relName(state, status.missingOutputFileName));
|
|
104637
|
+
case ts.UpToDateStatusType.OutOfDateBuildInfo:
|
|
104638
|
+
return reportStatus(state, ts.Diagnostics.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_are_not_emitted, relName(state, configFileName), relName(state, status.buildInfoFile));
|
|
104219
104639
|
case ts.UpToDateStatusType.UpToDate:
|
|
104220
104640
|
if (status.newestInputFileTime !== undefined) {
|
|
104221
|
-
return reportStatus(state, ts.Diagnostics.
|
|
104641
|
+
return reportStatus(state, ts.Diagnostics.Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2, relName(state, configFileName), relName(state, status.newestInputFileName || ""), relName(state, status.oldestOutputFileName || ""));
|
|
104222
104642
|
}
|
|
104223
104643
|
break;
|
|
104224
104644
|
case ts.UpToDateStatusType.OutOfDateWithPrepend:
|
|
104225
104645
|
return reportStatus(state, ts.Diagnostics.Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed, relName(state, configFileName), relName(state, status.newerProjectName));
|
|
104226
104646
|
case ts.UpToDateStatusType.UpToDateWithUpstreamTypes:
|
|
104227
104647
|
return reportStatus(state, ts.Diagnostics.Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies, relName(state, configFileName));
|
|
104648
|
+
case ts.UpToDateStatusType.UpToDateWithInputFileText:
|
|
104649
|
+
return reportStatus(state, ts.Diagnostics.Project_0_is_up_to_date_but_needs_update_to_timestamps_of_output_files_that_are_older_than_input_files, relName(state, configFileName));
|
|
104228
104650
|
case ts.UpToDateStatusType.UpstreamOutOfDate:
|
|
104229
104651
|
return reportStatus(state, ts.Diagnostics.Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date, relName(state, configFileName), relName(state, status.upstreamProjectName));
|
|
104230
104652
|
case ts.UpToDateStatusType.UpstreamBlocked:
|
|
@@ -104235,6 +104657,8 @@ var ts;
|
|
|
104235
104657
|
return reportStatus(state, ts.Diagnostics.Failed_to_parse_file_0_Colon_1, relName(state, configFileName), status.reason);
|
|
104236
104658
|
case ts.UpToDateStatusType.TsVersionOutputOfDate:
|
|
104237
104659
|
return reportStatus(state, ts.Diagnostics.Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2, relName(state, configFileName), status.version, ts.version);
|
|
104660
|
+
case ts.UpToDateStatusType.ForceBuild:
|
|
104661
|
+
return reportStatus(state, ts.Diagnostics.Project_0_is_being_forcibly_rebuilt, relName(state, configFileName));
|
|
104238
104662
|
case ts.UpToDateStatusType.ContainerOnly:
|
|
104239
104663
|
case ts.UpToDateStatusType.ComputingUpstream:
|
|
104240
104664
|
break;
|
|
@@ -104824,14 +105248,14 @@ var ts;
|
|
|
104824
105248
|
return;
|
|
104825
105249
|
if (d.code === ts.Diagnostics.Found_0_errors_Watching_for_file_changes.code ||
|
|
104826
105250
|
d.code === ts.Diagnostics.Found_1_error_Watching_for_file_changes.code) {
|
|
104827
|
-
reportSolutionBuilderTimes(sys, builder_1, buildHost_1);
|
|
105251
|
+
reportSolutionBuilderTimes(sys, buildOptions, builder_1, buildHost_1);
|
|
104828
105252
|
}
|
|
104829
105253
|
};
|
|
104830
105254
|
updateSolutionBuilderHost(sys, cb, buildHost_1);
|
|
104831
105255
|
enableSolutionPerformance(sys, buildOptions);
|
|
104832
105256
|
var builder_1 = ts.createSolutionBuilderWithWatch(buildHost_1, projects, buildOptions, watchOptions);
|
|
104833
105257
|
builder_1.build();
|
|
104834
|
-
reportSolutionBuilderTimes(sys, builder_1, buildHost_1);
|
|
105258
|
+
reportSolutionBuilderTimes(sys, buildOptions, builder_1, buildHost_1);
|
|
104835
105259
|
reportWatchStatistics_1 = true;
|
|
104836
105260
|
return builder_1;
|
|
104837
105261
|
}
|
|
@@ -104840,25 +105264,29 @@ var ts;
|
|
|
104840
105264
|
enableSolutionPerformance(sys, buildOptions);
|
|
104841
105265
|
var builder = ts.createSolutionBuilder(buildHost, projects, buildOptions);
|
|
104842
105266
|
var exitStatus = buildOptions.clean ? builder.clean() : builder.build();
|
|
104843
|
-
reportSolutionBuilderTimes(sys, builder, buildHost);
|
|
105267
|
+
reportSolutionBuilderTimes(sys, buildOptions, builder, buildHost);
|
|
104844
105268
|
ts.dumpTracingLegend();
|
|
104845
105269
|
return sys.exit(exitStatus);
|
|
104846
105270
|
}
|
|
104847
105271
|
function enableSolutionPerformance(system, options) {
|
|
104848
|
-
if (system === ts.sys &&
|
|
105272
|
+
if (system === ts.sys && options.solutionDiagnostics)
|
|
104849
105273
|
ts.solutionPerformance.enable();
|
|
104850
105274
|
}
|
|
104851
|
-
function reportSolutionBuilderTimes(system, builder, buildHost) {
|
|
104852
|
-
if (system !== ts.sys)
|
|
105275
|
+
function reportSolutionBuilderTimes(system, buildOptions, builder, buildHost) {
|
|
105276
|
+
if (system !== ts.sys || !buildOptions.solutionDiagnostics)
|
|
104853
105277
|
return;
|
|
104854
105278
|
if (ts.solutionPerformance.isEnabled()) {
|
|
104855
105279
|
var solutionStatistics_1 = [];
|
|
105280
|
+
solutionStatistics_1.push({ name: "Projects", value: ts.getBuildOrderFromAnyBuildOrder(builder.getBuildOrder()).length, type: StatisticType.count });
|
|
105281
|
+
ts.solutionPerformance.forEachCount(function (name, count) { return solutionStatistics_1.push({ name: name, value: count, type: StatisticType.count }); });
|
|
104856
105282
|
ts.solutionPerformance.forEachMeasure(function (name, duration) { return solutionStatistics_1.push({ name: name + " time", value: duration, type: StatisticType.time }); });
|
|
104857
|
-
solutionStatistics_1.push({ name: "projectsBuilt", value: ts.solutionPerformance.getCount("projectsBuilt"), type: StatisticType.count }, { name: "timestampUpdated", value: ts.solutionPerformance.getCount("timestampUpdated"), type: StatisticType.count }, { name: "bundlesUpdated", value: ts.solutionPerformance.getCount("bundlesUpdated"), type: StatisticType.count }, { name: "projects", value: ts.getBuildOrderFromAnyBuildOrder(builder.getBuildOrder()).length, type: StatisticType.count });
|
|
104858
105283
|
buildHost.statistics = ts.append(buildHost.statistics, solutionStatistics_1);
|
|
104859
105284
|
ts.solutionPerformance.disable();
|
|
104860
105285
|
ts.solutionPerformance.enable();
|
|
104861
105286
|
}
|
|
105287
|
+
else {
|
|
105288
|
+
ts.sys.write(ts.Diagnostics.Performance_timings_for_diagnostics_or_extendedDiagnostics_or_solutionDiagnostics_are_not_available_in_this_session_A_native_implementation_of_the_Web_Performance_API_could_not_be_found.message + "\n");
|
|
105289
|
+
}
|
|
104862
105290
|
if (!buildHost.statistics)
|
|
104863
105291
|
return;
|
|
104864
105292
|
var statistics = [];
|
|
@@ -104987,14 +105415,14 @@ var ts;
|
|
|
104987
105415
|
updateWatchCompilationHost(system, cb, watchCompilerHost);
|
|
104988
105416
|
return ts.createWatchProgram(watchCompilerHost);
|
|
104989
105417
|
}
|
|
104990
|
-
function
|
|
104991
|
-
return system === ts.sys && (compilerOptions.diagnostics || compilerOptions.extendedDiagnostics);
|
|
105418
|
+
function canGenerateStatistics(system, compilerOptions) {
|
|
105419
|
+
return system === ts.sys && (compilerOptions.diagnostics || compilerOptions.extendedDiagnostics || compilerOptions.solutionDiagnostics);
|
|
104992
105420
|
}
|
|
104993
105421
|
function canTrace(system, compilerOptions) {
|
|
104994
105422
|
return system === ts.sys && compilerOptions.generateTrace;
|
|
104995
105423
|
}
|
|
104996
105424
|
function enableStatisticsAndTracing(system, compilerOptions, isBuildMode) {
|
|
104997
|
-
if (
|
|
105425
|
+
if (canGenerateStatistics(system, compilerOptions)) {
|
|
104998
105426
|
ts.performance.enable(system);
|
|
104999
105427
|
}
|
|
105000
105428
|
if (canTrace(system, compilerOptions)) {
|
|
@@ -105012,14 +105440,14 @@ var ts;
|
|
|
105012
105440
|
ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.stopTracing();
|
|
105013
105441
|
}
|
|
105014
105442
|
var statistics;
|
|
105015
|
-
if (
|
|
105443
|
+
if (canGenerateStatistics(sys, compilerOptions)) {
|
|
105016
105444
|
statistics = [];
|
|
105017
105445
|
var memoryUsed = sys.getMemoryUsage ? sys.getMemoryUsage() : -1;
|
|
105018
105446
|
if (program) {
|
|
105019
105447
|
reportCountStatistic("Files", program.getSourceFiles().length);
|
|
105020
105448
|
var lineCounts = countLines(program);
|
|
105021
105449
|
var nodeCounts = countNodes(program);
|
|
105022
|
-
if (compilerOptions.extendedDiagnostics) {
|
|
105450
|
+
if (compilerOptions.extendedDiagnostics || compilerOptions.solutionDiagnostics) {
|
|
105023
105451
|
for (var _i = 0, _a = ts.arrayFrom(lineCounts.keys()); _i < _a.length; _i++) {
|
|
105024
105452
|
var key = _a[_i];
|
|
105025
105453
|
reportCountStatistic("Lines of " + key, lineCounts.get(key));
|
|
@@ -105046,7 +105474,7 @@ var ts;
|
|
|
105046
105474
|
var bindTime = isPerformanceEnabled ? ts.performance.getDuration("Bind") : 0;
|
|
105047
105475
|
var checkTime = isPerformanceEnabled ? ts.performance.getDuration("Check") : 0;
|
|
105048
105476
|
var emitTime = isPerformanceEnabled ? ts.performance.getDuration("Emit") : 0;
|
|
105049
|
-
if (compilerOptions.extendedDiagnostics) {
|
|
105477
|
+
if (compilerOptions.extendedDiagnostics || compilerOptions.solutionDiagnostics) {
|
|
105050
105478
|
if (program) {
|
|
105051
105479
|
var caches = program.getRelationCacheSizes();
|
|
105052
105480
|
reportCountStatistic("Assignability cache size", caches.assignable);
|
|
@@ -105069,9 +105497,10 @@ var ts;
|
|
|
105069
105497
|
if (isPerformanceEnabled) {
|
|
105070
105498
|
reportTimeStatistic("Total time", programTime + bindTime + checkTime + emitTime);
|
|
105071
105499
|
}
|
|
105072
|
-
|
|
105500
|
+
if (compilerOptions.diagnostics || compilerOptions.extendedDiagnostics)
|
|
105501
|
+
reportAllStatistics(sys, statistics);
|
|
105073
105502
|
if (!isPerformanceEnabled) {
|
|
105074
|
-
sys.write(ts.Diagnostics.
|
|
105503
|
+
sys.write(ts.Diagnostics.Performance_timings_for_diagnostics_or_extendedDiagnostics_or_solutionDiagnostics_are_not_available_in_this_session_A_native_implementation_of_the_Web_Performance_API_could_not_be_found.message + "\n");
|
|
105075
105504
|
}
|
|
105076
105505
|
else {
|
|
105077
105506
|
ts.performance.disable();
|