@typescript-deploys/pr-build 4.7.0-pr-47461-10 → 4.7.0-pr-48784-4
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 +867 -523
- package/lib/tsserver.js +913 -582
- package/lib/tsserverlibrary.d.ts +1 -1
- package/lib/tsserverlibrary.js +913 -582
- package/lib/typescript.d.ts +1 -1
- package/lib/typescript.js +913 -582
- package/lib/typescriptServices.d.ts +1 -1
- package/lib/typescriptServices.js +913 -582
- package/lib/typingsInstaller.js +912 -582
- 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.7";
|
|
72
|
-
ts.version = ts.versionMajorMinor + ".0-insiders.
|
|
72
|
+
ts.version = ts.versionMajorMinor + ".0-insiders.20220427";
|
|
73
73
|
var NativeCollections;
|
|
74
74
|
(function (NativeCollections) {
|
|
75
75
|
var globals = typeof globalThis !== "undefined" ? globalThis :
|
|
@@ -3745,7 +3745,7 @@ var ts;
|
|
|
3745
3745
|
};
|
|
3746
3746
|
}
|
|
3747
3747
|
function createDirectoryWatcher(dirName, dirPath, fallbackOptions) {
|
|
3748
|
-
var watcher = fsWatch(dirName, 1, function (_eventName, relativeFileName) {
|
|
3748
|
+
var watcher = fsWatch(dirName, 1, function (_eventName, relativeFileName, modifiedTime) {
|
|
3749
3749
|
if (!ts.isString(relativeFileName))
|
|
3750
3750
|
return;
|
|
3751
3751
|
var fileName = ts.getNormalizedAbsolutePath(relativeFileName, dirName);
|
|
@@ -3753,7 +3753,7 @@ var ts;
|
|
|
3753
3753
|
if (callbacks) {
|
|
3754
3754
|
for (var _i = 0, callbacks_1 = callbacks; _i < callbacks_1.length; _i++) {
|
|
3755
3755
|
var fileCallback = callbacks_1[_i];
|
|
3756
|
-
fileCallback(fileName, FileWatcherEventKind.Changed);
|
|
3756
|
+
fileCallback(fileName, FileWatcherEventKind.Changed, modifiedTime);
|
|
3757
3757
|
}
|
|
3758
3758
|
}
|
|
3759
3759
|
}, false, PollingInterval.Medium, fallbackOptions);
|
|
@@ -3805,7 +3805,7 @@ var ts;
|
|
|
3805
3805
|
}
|
|
3806
3806
|
else {
|
|
3807
3807
|
cache.set(path, {
|
|
3808
|
-
watcher: watchFile(fileName, function (fileName, eventKind) { return ts.forEach(callbacksCache.get(path), function (cb) { return cb(fileName, eventKind); }); }, pollingInterval, options),
|
|
3808
|
+
watcher: watchFile(fileName, function (fileName, eventKind, modifiedTime) { return ts.forEach(callbacksCache.get(path), function (cb) { return cb(fileName, eventKind, modifiedTime); }); }, pollingInterval, options),
|
|
3809
3809
|
refCount: 1
|
|
3810
3810
|
});
|
|
3811
3811
|
}
|
|
@@ -3829,7 +3829,7 @@ var ts;
|
|
|
3829
3829
|
var newTime = modifiedTime.getTime();
|
|
3830
3830
|
if (oldTime !== newTime) {
|
|
3831
3831
|
watchedFile.mtime = modifiedTime;
|
|
3832
|
-
watchedFile.callback(watchedFile.fileName, getFileWatcherEventKind(oldTime, newTime));
|
|
3832
|
+
watchedFile.callback(watchedFile.fileName, getFileWatcherEventKind(oldTime, newTime), modifiedTime);
|
|
3833
3833
|
return true;
|
|
3834
3834
|
}
|
|
3835
3835
|
return false;
|
|
@@ -4043,16 +4043,17 @@ var ts;
|
|
|
4043
4043
|
}
|
|
4044
4044
|
ts.createDirectoryWatcherSupportingRecursive = createDirectoryWatcherSupportingRecursive;
|
|
4045
4045
|
function createFileWatcherCallback(callback) {
|
|
4046
|
-
return function (_fileName, eventKind) { return callback(eventKind === FileWatcherEventKind.Changed ? "change" : "rename", ""); };
|
|
4046
|
+
return function (_fileName, eventKind, modifiedTime) { return callback(eventKind === FileWatcherEventKind.Changed ? "change" : "rename", "", modifiedTime); };
|
|
4047
4047
|
}
|
|
4048
4048
|
ts.createFileWatcherCallback = createFileWatcherCallback;
|
|
4049
|
-
function createFsWatchCallbackForFileWatcherCallback(fileName, callback,
|
|
4050
|
-
return function (eventName) {
|
|
4049
|
+
function createFsWatchCallbackForFileWatcherCallback(fileName, callback, getModifiedTime) {
|
|
4050
|
+
return function (eventName, _relativeFileName, modifiedTime) {
|
|
4051
4051
|
if (eventName === "rename") {
|
|
4052
|
-
|
|
4052
|
+
modifiedTime || (modifiedTime = getModifiedTime(fileName) || ts.missingFileModifiedTime);
|
|
4053
|
+
callback(fileName, modifiedTime !== ts.missingFileModifiedTime ? FileWatcherEventKind.Created : FileWatcherEventKind.Deleted, modifiedTime);
|
|
4053
4054
|
}
|
|
4054
4055
|
else {
|
|
4055
|
-
callback(fileName, FileWatcherEventKind.Changed);
|
|
4056
|
+
callback(fileName, FileWatcherEventKind.Changed, modifiedTime);
|
|
4056
4057
|
}
|
|
4057
4058
|
};
|
|
4058
4059
|
}
|
|
@@ -4071,7 +4072,7 @@ var ts;
|
|
|
4071
4072
|
};
|
|
4072
4073
|
}
|
|
4073
4074
|
function createSystemWatchFunctions(_a) {
|
|
4074
|
-
var pollingWatchFile = _a.pollingWatchFile, getModifiedTime = _a.getModifiedTime, setTimeout = _a.setTimeout, clearTimeout = _a.clearTimeout, fsWatch = _a.fsWatch,
|
|
4075
|
+
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;
|
|
4075
4076
|
var dynamicPollingWatchFile;
|
|
4076
4077
|
var fixedChunkSizePollingWatchFile;
|
|
4077
4078
|
var nonPollingWatchFile;
|
|
@@ -4093,7 +4094,7 @@ var ts;
|
|
|
4093
4094
|
case ts.WatchFileKind.FixedChunkSizePolling:
|
|
4094
4095
|
return ensureFixedChunkSizePollingWatchFile()(fileName, callback, undefined, undefined);
|
|
4095
4096
|
case ts.WatchFileKind.UseFsEvents:
|
|
4096
|
-
return fsWatch(fileName, 0, createFsWatchCallbackForFileWatcherCallback(fileName, callback,
|
|
4097
|
+
return fsWatch(fileName, 0, createFsWatchCallbackForFileWatcherCallback(fileName, callback, getModifiedTime), false, pollingInterval, ts.getFallbackOptions(options));
|
|
4097
4098
|
case ts.WatchFileKind.UseFsEventsOnParentDirectory:
|
|
4098
4099
|
if (!nonPollingWatchFile) {
|
|
4099
4100
|
nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames);
|
|
@@ -4250,7 +4251,6 @@ var ts;
|
|
|
4250
4251
|
fsWatch: fsWatch,
|
|
4251
4252
|
useCaseSensitiveFileNames: useCaseSensitiveFileNames,
|
|
4252
4253
|
getCurrentDirectory: getCurrentDirectory,
|
|
4253
|
-
fileExists: fileExists,
|
|
4254
4254
|
fsSupportsRecursiveFsWatch: fsSupportsRecursiveFsWatch,
|
|
4255
4255
|
directoryExists: directoryExists,
|
|
4256
4256
|
getAccessibleSortedChildDirectories: function (path) { return getAccessibleFileSystemEntries(path).directories; },
|
|
@@ -4478,7 +4478,7 @@ var ts;
|
|
|
4478
4478
|
else {
|
|
4479
4479
|
eventKind = FileWatcherEventKind.Changed;
|
|
4480
4480
|
}
|
|
4481
|
-
callback(fileName, eventKind);
|
|
4481
|
+
callback(fileName, eventKind, curr.mtime);
|
|
4482
4482
|
}
|
|
4483
4483
|
}
|
|
4484
4484
|
function fsWatch(fileOrDirectory, entryKind, callback, recursive, fallbackPollingInterval, fallbackOptions) {
|
|
@@ -4498,9 +4498,9 @@ var ts;
|
|
|
4498
4498
|
watcher = undefined;
|
|
4499
4499
|
}
|
|
4500
4500
|
};
|
|
4501
|
-
function invokeCallbackAndUpdateWatcher(createWatcher) {
|
|
4501
|
+
function invokeCallbackAndUpdateWatcher(createWatcher, modifiedTime) {
|
|
4502
4502
|
sysLog("sysLog:: " + fileOrDirectory + ":: Changing watcher to " + (createWatcher === watchPresentFileSystemEntry ? "Present" : "Missing") + "FileSystemEntryWatcher");
|
|
4503
|
-
callback("rename", "");
|
|
4503
|
+
callback("rename", "", modifiedTime);
|
|
4504
4504
|
if (watcher) {
|
|
4505
4505
|
watcher.close();
|
|
4506
4506
|
watcher = createWatcher();
|
|
@@ -4533,21 +4533,25 @@ var ts;
|
|
|
4533
4533
|
}
|
|
4534
4534
|
}
|
|
4535
4535
|
function callbackChangingToMissingFileSystemEntry(event, relativeName) {
|
|
4536
|
+
var modifiedTime = getModifiedTime(fileOrDirectory) || ts.missingFileModifiedTime;
|
|
4536
4537
|
return event === "rename" &&
|
|
4537
4538
|
(!relativeName ||
|
|
4538
4539
|
relativeName === lastDirectoryPart ||
|
|
4539
4540
|
(relativeName.lastIndexOf(lastDirectoryPartWithDirectorySeparator) !== -1 && relativeName.lastIndexOf(lastDirectoryPartWithDirectorySeparator) === relativeName.length - lastDirectoryPartWithDirectorySeparator.length)) &&
|
|
4540
|
-
|
|
4541
|
-
invokeCallbackAndUpdateWatcher(watchMissingFileSystemEntry) :
|
|
4542
|
-
callback(event, relativeName);
|
|
4541
|
+
modifiedTime === ts.missingFileModifiedTime ?
|
|
4542
|
+
invokeCallbackAndUpdateWatcher(watchMissingFileSystemEntry, modifiedTime) :
|
|
4543
|
+
callback(event, relativeName, modifiedTime);
|
|
4543
4544
|
}
|
|
4544
4545
|
function watchPresentFileSystemEntryWithFsWatchFile() {
|
|
4545
4546
|
return watchFile(fileOrDirectory, createFileWatcherCallback(callback), fallbackPollingInterval, fallbackOptions);
|
|
4546
4547
|
}
|
|
4547
4548
|
function watchMissingFileSystemEntry() {
|
|
4548
|
-
return watchFile(fileOrDirectory, function (_fileName, eventKind) {
|
|
4549
|
-
if (eventKind === FileWatcherEventKind.Created
|
|
4550
|
-
|
|
4549
|
+
return watchFile(fileOrDirectory, function (_fileName, eventKind, modifiedTime) {
|
|
4550
|
+
if (eventKind === FileWatcherEventKind.Created) {
|
|
4551
|
+
modifiedTime || (modifiedTime = getModifiedTime(fileOrDirectory) || ts.missingFileModifiedTime);
|
|
4552
|
+
if (modifiedTime !== ts.missingFileModifiedTime) {
|
|
4553
|
+
invokeCallbackAndUpdateWatcher(watchPresentFileSystemEntry, modifiedTime);
|
|
4554
|
+
}
|
|
4551
4555
|
}
|
|
4552
4556
|
}, fallbackPollingInterval, fallbackOptions);
|
|
4553
4557
|
}
|
|
@@ -4686,12 +4690,17 @@ var ts;
|
|
|
4686
4690
|
}
|
|
4687
4691
|
function getModifiedTime(path) {
|
|
4688
4692
|
var _a;
|
|
4693
|
+
var originalStackTraceLimit = Error.stackTraceLimit;
|
|
4694
|
+
Error.stackTraceLimit = 0;
|
|
4689
4695
|
try {
|
|
4690
4696
|
return (_a = statSync(path)) === null || _a === void 0 ? void 0 : _a.mtime;
|
|
4691
4697
|
}
|
|
4692
4698
|
catch (e) {
|
|
4693
4699
|
return undefined;
|
|
4694
4700
|
}
|
|
4701
|
+
finally {
|
|
4702
|
+
Error.stackTraceLimit = originalStackTraceLimit;
|
|
4703
|
+
}
|
|
4695
4704
|
}
|
|
4696
4705
|
function setModifiedTime(path, time) {
|
|
4697
4706
|
try {
|
|
@@ -6057,6 +6066,7 @@ var ts;
|
|
|
6057
6066
|
This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0: diag(2807, ts.DiagnosticCategory.Error, "This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_o_2807", "This syntax requires an imported helper named '{1}' with {2} parameters, which is not compatible with the one in '{0}'. Consider upgrading your version of '{0}'."),
|
|
6058
6067
|
A_get_accessor_must_be_at_least_as_accessible_as_the_setter: diag(2808, ts.DiagnosticCategory.Error, "A_get_accessor_must_be_at_least_as_accessible_as_the_setter_2808", "A get accessor must be at least as accessible as the setter"),
|
|
6059
6068
|
Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_the_whole_assignment_in_parentheses: diag(2809, ts.DiagnosticCategory.Error, "Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_d_2809", "Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the the whole assignment in parentheses."),
|
|
6069
|
+
Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments: diag(2810, ts.DiagnosticCategory.Error, "Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_2810", "Expected 1 argument, but got 0. 'new Promise()' needs a JSDoc hint to produce a 'resolve' that can be called without arguments."),
|
|
6060
6070
|
Initializer_for_property_0: diag(2811, ts.DiagnosticCategory.Error, "Initializer_for_property_0_2811", "Initializer for property '{0}'"),
|
|
6061
6071
|
Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom: diag(2812, ts.DiagnosticCategory.Error, "Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom_2812", "Property '{0}' does not exist on type '{1}'. Try changing the 'lib' compiler option to include 'dom'."),
|
|
6062
6072
|
Class_declaration_cannot_implement_overload_list_for_0: diag(2813, ts.DiagnosticCategory.Error, "Class_declaration_cannot_implement_overload_list_for_0_2813", "Class declaration cannot implement overload list for '{0}'."),
|
|
@@ -6484,8 +6494,8 @@ var ts;
|
|
|
6484
6494
|
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"),
|
|
6485
6495
|
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"),
|
|
6486
6496
|
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."),
|
|
6487
|
-
|
|
6488
|
-
|
|
6497
|
+
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}'"),
|
|
6498
|
+
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}'"),
|
|
6489
6499
|
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"),
|
|
6490
6500
|
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"),
|
|
6491
6501
|
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,6 +6539,7 @@ var ts;
|
|
|
6529
6539
|
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}'."),
|
|
6530
6540
|
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}'."),
|
|
6531
6541
|
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."),
|
|
6542
|
+
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"),
|
|
6532
6543
|
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}'"),
|
|
6533
6544
|
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."),
|
|
6534
6545
|
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."),
|
|
@@ -13561,19 +13572,11 @@ var ts;
|
|
|
13561
13572
|
return !!name && isDynamicName(name);
|
|
13562
13573
|
}
|
|
13563
13574
|
ts.hasDynamicName = hasDynamicName;
|
|
13564
|
-
function getComputedPropertyNameExpression(name) {
|
|
13565
|
-
return ts.isElementAccessExpression(name.expression)
|
|
13566
|
-
? skipParentheses(name.expression.argumentExpression)
|
|
13567
|
-
: name.expression;
|
|
13568
|
-
}
|
|
13569
|
-
ts.getComputedPropertyNameExpression = getComputedPropertyNameExpression;
|
|
13570
13575
|
function isDynamicName(name) {
|
|
13571
13576
|
if (!(name.kind === 162 || name.kind === 207)) {
|
|
13572
13577
|
return false;
|
|
13573
13578
|
}
|
|
13574
|
-
var expr = ts.isElementAccessExpression(name)
|
|
13575
|
-
? skipParentheses(name.argumentExpression)
|
|
13576
|
-
: getComputedPropertyNameExpression(name);
|
|
13579
|
+
var expr = ts.isElementAccessExpression(name) ? skipParentheses(name.argumentExpression) : name.expression;
|
|
13577
13580
|
return !isStringOrNumericLiteralLike(expr) &&
|
|
13578
13581
|
!isSignedNumericLiteral(expr);
|
|
13579
13582
|
}
|
|
@@ -13587,7 +13590,7 @@ var ts;
|
|
|
13587
13590
|
case 8:
|
|
13588
13591
|
return ts.escapeLeadingUnderscores(name.text);
|
|
13589
13592
|
case 162:
|
|
13590
|
-
var nameExpression =
|
|
13593
|
+
var nameExpression = name.expression;
|
|
13591
13594
|
if (isStringOrNumericLiteralLike(nameExpression)) {
|
|
13592
13595
|
return ts.escapeLeadingUnderscores(nameExpression.text);
|
|
13593
13596
|
}
|
|
@@ -15983,6 +15986,10 @@ var ts;
|
|
|
15983
15986
|
return optionsHaveChanges(oldOptions, newOptions, ts.affectsEmitOptionDeclarations);
|
|
15984
15987
|
}
|
|
15985
15988
|
ts.compilerOptionsAffectEmit = compilerOptionsAffectEmit;
|
|
15989
|
+
function compilerOptionsAffectDeclarationPath(newOptions, oldOptions) {
|
|
15990
|
+
return optionsHaveChanges(oldOptions, newOptions, ts.affectsDeclarationPathOptionDeclarations);
|
|
15991
|
+
}
|
|
15992
|
+
ts.compilerOptionsAffectDeclarationPath = compilerOptionsAffectDeclarationPath;
|
|
15986
15993
|
function getCompilerOptionValue(options, option) {
|
|
15987
15994
|
return option.strictFlag ? getStrictOptionValue(options, option.name) : options[option.name];
|
|
15988
15995
|
}
|
|
@@ -30695,7 +30702,8 @@ var ts;
|
|
|
30695
30702
|
if (!comment) {
|
|
30696
30703
|
comment = parseTrailingTagComments(start, getNodePos(), indent, indentText);
|
|
30697
30704
|
}
|
|
30698
|
-
|
|
30705
|
+
var end = comment !== undefined ? getNodePos() : typeExpression.end;
|
|
30706
|
+
return finishNode(factory.createJSDocCallbackTag(tagName, typeExpression, fullName, comment), start, end);
|
|
30699
30707
|
}
|
|
30700
30708
|
function escapedTextsEqual(a, b) {
|
|
30701
30709
|
while (!ts.isIdentifier(a) || !ts.isIdentifier(b)) {
|
|
@@ -31676,6 +31684,7 @@ var ts;
|
|
|
31676
31684
|
type: "boolean",
|
|
31677
31685
|
affectsSemanticDiagnostics: true,
|
|
31678
31686
|
affectsEmit: true,
|
|
31687
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31679
31688
|
category: ts.Diagnostics.Watch_and_Build_Modes,
|
|
31680
31689
|
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,
|
|
31681
31690
|
defaultValueDescription: false,
|
|
@@ -31709,12 +31718,39 @@ var ts;
|
|
|
31709
31718
|
affectsSourceFile: true,
|
|
31710
31719
|
affectsModuleResolution: true,
|
|
31711
31720
|
affectsEmit: true,
|
|
31721
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31712
31722
|
paramType: ts.Diagnostics.VERSION,
|
|
31713
31723
|
showInSimplifiedHelpView: true,
|
|
31714
31724
|
category: ts.Diagnostics.Language_and_Environment,
|
|
31715
31725
|
description: ts.Diagnostics.Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations,
|
|
31716
31726
|
defaultValueDescription: 0,
|
|
31717
31727
|
};
|
|
31728
|
+
ts.moduleOptionDeclaration = {
|
|
31729
|
+
name: "module",
|
|
31730
|
+
shortName: "m",
|
|
31731
|
+
type: new ts.Map(ts.getEntries({
|
|
31732
|
+
none: ts.ModuleKind.None,
|
|
31733
|
+
commonjs: ts.ModuleKind.CommonJS,
|
|
31734
|
+
amd: ts.ModuleKind.AMD,
|
|
31735
|
+
system: ts.ModuleKind.System,
|
|
31736
|
+
umd: ts.ModuleKind.UMD,
|
|
31737
|
+
es6: ts.ModuleKind.ES2015,
|
|
31738
|
+
es2015: ts.ModuleKind.ES2015,
|
|
31739
|
+
es2020: ts.ModuleKind.ES2020,
|
|
31740
|
+
es2022: ts.ModuleKind.ES2022,
|
|
31741
|
+
esnext: ts.ModuleKind.ESNext,
|
|
31742
|
+
node12: ts.ModuleKind.Node12,
|
|
31743
|
+
nodenext: ts.ModuleKind.NodeNext,
|
|
31744
|
+
})),
|
|
31745
|
+
affectsModuleResolution: true,
|
|
31746
|
+
affectsEmit: true,
|
|
31747
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31748
|
+
paramType: ts.Diagnostics.KIND,
|
|
31749
|
+
showInSimplifiedHelpView: true,
|
|
31750
|
+
category: ts.Diagnostics.Modules,
|
|
31751
|
+
description: ts.Diagnostics.Specify_what_module_code_is_generated,
|
|
31752
|
+
defaultValueDescription: undefined,
|
|
31753
|
+
};
|
|
31718
31754
|
var commandOptionsWithoutBuild = [
|
|
31719
31755
|
{
|
|
31720
31756
|
name: "all",
|
|
@@ -31775,36 +31811,13 @@ var ts;
|
|
|
31775
31811
|
category: ts.Diagnostics.Command_line_Options,
|
|
31776
31812
|
affectsSemanticDiagnostics: true,
|
|
31777
31813
|
affectsEmit: true,
|
|
31814
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31778
31815
|
isCommandLineOnly: true,
|
|
31779
31816
|
description: ts.Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing,
|
|
31780
31817
|
defaultValueDescription: false,
|
|
31781
31818
|
},
|
|
31782
31819
|
ts.targetOptionDeclaration,
|
|
31783
|
-
|
|
31784
|
-
name: "module",
|
|
31785
|
-
shortName: "m",
|
|
31786
|
-
type: new ts.Map(ts.getEntries({
|
|
31787
|
-
none: ts.ModuleKind.None,
|
|
31788
|
-
commonjs: ts.ModuleKind.CommonJS,
|
|
31789
|
-
amd: ts.ModuleKind.AMD,
|
|
31790
|
-
system: ts.ModuleKind.System,
|
|
31791
|
-
umd: ts.ModuleKind.UMD,
|
|
31792
|
-
es6: ts.ModuleKind.ES2015,
|
|
31793
|
-
es2015: ts.ModuleKind.ES2015,
|
|
31794
|
-
es2020: ts.ModuleKind.ES2020,
|
|
31795
|
-
es2022: ts.ModuleKind.ES2022,
|
|
31796
|
-
esnext: ts.ModuleKind.ESNext,
|
|
31797
|
-
node12: ts.ModuleKind.Node12,
|
|
31798
|
-
nodenext: ts.ModuleKind.NodeNext,
|
|
31799
|
-
})),
|
|
31800
|
-
affectsModuleResolution: true,
|
|
31801
|
-
affectsEmit: true,
|
|
31802
|
-
paramType: ts.Diagnostics.KIND,
|
|
31803
|
-
showInSimplifiedHelpView: true,
|
|
31804
|
-
category: ts.Diagnostics.Modules,
|
|
31805
|
-
description: ts.Diagnostics.Specify_what_module_code_is_generated,
|
|
31806
|
-
defaultValueDescription: undefined,
|
|
31807
|
-
},
|
|
31820
|
+
ts.moduleOptionDeclaration,
|
|
31808
31821
|
{
|
|
31809
31822
|
name: "lib",
|
|
31810
31823
|
type: "list",
|
|
@@ -31841,6 +31854,7 @@ var ts;
|
|
|
31841
31854
|
type: jsxOptionMap,
|
|
31842
31855
|
affectsSourceFile: true,
|
|
31843
31856
|
affectsEmit: true,
|
|
31857
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31844
31858
|
affectsModuleResolution: true,
|
|
31845
31859
|
paramType: ts.Diagnostics.KIND,
|
|
31846
31860
|
showInSimplifiedHelpView: true,
|
|
@@ -31853,6 +31867,7 @@ var ts;
|
|
|
31853
31867
|
shortName: "d",
|
|
31854
31868
|
type: "boolean",
|
|
31855
31869
|
affectsEmit: true,
|
|
31870
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31856
31871
|
showInSimplifiedHelpView: true,
|
|
31857
31872
|
category: ts.Diagnostics.Emit,
|
|
31858
31873
|
transpileOptionValue: undefined,
|
|
@@ -31863,6 +31878,7 @@ var ts;
|
|
|
31863
31878
|
name: "declarationMap",
|
|
31864
31879
|
type: "boolean",
|
|
31865
31880
|
affectsEmit: true,
|
|
31881
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31866
31882
|
showInSimplifiedHelpView: true,
|
|
31867
31883
|
category: ts.Diagnostics.Emit,
|
|
31868
31884
|
transpileOptionValue: undefined,
|
|
@@ -31873,6 +31889,7 @@ var ts;
|
|
|
31873
31889
|
name: "emitDeclarationOnly",
|
|
31874
31890
|
type: "boolean",
|
|
31875
31891
|
affectsEmit: true,
|
|
31892
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31876
31893
|
showInSimplifiedHelpView: true,
|
|
31877
31894
|
category: ts.Diagnostics.Emit,
|
|
31878
31895
|
description: ts.Diagnostics.Only_output_d_ts_files_and_not_JavaScript_files,
|
|
@@ -31883,6 +31900,7 @@ var ts;
|
|
|
31883
31900
|
name: "sourceMap",
|
|
31884
31901
|
type: "boolean",
|
|
31885
31902
|
affectsEmit: true,
|
|
31903
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31886
31904
|
showInSimplifiedHelpView: true,
|
|
31887
31905
|
category: ts.Diagnostics.Emit,
|
|
31888
31906
|
defaultValueDescription: false,
|
|
@@ -31892,6 +31910,9 @@ var ts;
|
|
|
31892
31910
|
name: "outFile",
|
|
31893
31911
|
type: "string",
|
|
31894
31912
|
affectsEmit: true,
|
|
31913
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31914
|
+
affectsDeclarationPath: true,
|
|
31915
|
+
affectsBundleEmitBuildInfo: true,
|
|
31895
31916
|
isFilePath: true,
|
|
31896
31917
|
paramType: ts.Diagnostics.FILE,
|
|
31897
31918
|
showInSimplifiedHelpView: true,
|
|
@@ -31903,6 +31924,8 @@ var ts;
|
|
|
31903
31924
|
name: "outDir",
|
|
31904
31925
|
type: "string",
|
|
31905
31926
|
affectsEmit: true,
|
|
31927
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31928
|
+
affectsDeclarationPath: true,
|
|
31906
31929
|
isFilePath: true,
|
|
31907
31930
|
paramType: ts.Diagnostics.DIRECTORY,
|
|
31908
31931
|
showInSimplifiedHelpView: true,
|
|
@@ -31913,6 +31936,8 @@ var ts;
|
|
|
31913
31936
|
name: "rootDir",
|
|
31914
31937
|
type: "string",
|
|
31915
31938
|
affectsEmit: true,
|
|
31939
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31940
|
+
affectsDeclarationPath: true,
|
|
31916
31941
|
isFilePath: true,
|
|
31917
31942
|
paramType: ts.Diagnostics.LOCATION,
|
|
31918
31943
|
category: ts.Diagnostics.Modules,
|
|
@@ -31923,6 +31948,8 @@ var ts;
|
|
|
31923
31948
|
name: "composite",
|
|
31924
31949
|
type: "boolean",
|
|
31925
31950
|
affectsEmit: true,
|
|
31951
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31952
|
+
affectsBundleEmitBuildInfo: true,
|
|
31926
31953
|
isTSConfigOnly: true,
|
|
31927
31954
|
category: ts.Diagnostics.Projects,
|
|
31928
31955
|
transpileOptionValue: undefined,
|
|
@@ -31933,6 +31960,8 @@ var ts;
|
|
|
31933
31960
|
name: "tsBuildInfoFile",
|
|
31934
31961
|
type: "string",
|
|
31935
31962
|
affectsEmit: true,
|
|
31963
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31964
|
+
affectsBundleEmitBuildInfo: true,
|
|
31936
31965
|
isFilePath: true,
|
|
31937
31966
|
paramType: ts.Diagnostics.FILE,
|
|
31938
31967
|
category: ts.Diagnostics.Projects,
|
|
@@ -31944,6 +31973,7 @@ var ts;
|
|
|
31944
31973
|
name: "removeComments",
|
|
31945
31974
|
type: "boolean",
|
|
31946
31975
|
affectsEmit: true,
|
|
31976
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31947
31977
|
showInSimplifiedHelpView: true,
|
|
31948
31978
|
category: ts.Diagnostics.Emit,
|
|
31949
31979
|
defaultValueDescription: false,
|
|
@@ -31962,6 +31992,7 @@ var ts;
|
|
|
31962
31992
|
name: "importHelpers",
|
|
31963
31993
|
type: "boolean",
|
|
31964
31994
|
affectsEmit: true,
|
|
31995
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31965
31996
|
category: ts.Diagnostics.Emit,
|
|
31966
31997
|
description: ts.Diagnostics.Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file,
|
|
31967
31998
|
defaultValueDescription: false,
|
|
@@ -31975,6 +32006,7 @@ var ts;
|
|
|
31975
32006
|
})),
|
|
31976
32007
|
affectsEmit: true,
|
|
31977
32008
|
affectsSemanticDiagnostics: true,
|
|
32009
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31978
32010
|
category: ts.Diagnostics.Emit,
|
|
31979
32011
|
description: ts.Diagnostics.Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types,
|
|
31980
32012
|
defaultValueDescription: 0,
|
|
@@ -31983,6 +32015,7 @@ var ts;
|
|
|
31983
32015
|
name: "downlevelIteration",
|
|
31984
32016
|
type: "boolean",
|
|
31985
32017
|
affectsEmit: true,
|
|
32018
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31986
32019
|
category: ts.Diagnostics.Emit,
|
|
31987
32020
|
description: ts.Diagnostics.Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration,
|
|
31988
32021
|
defaultValueDescription: false,
|
|
@@ -31998,6 +32031,7 @@ var ts;
|
|
|
31998
32031
|
{
|
|
31999
32032
|
name: "strict",
|
|
32000
32033
|
type: "boolean",
|
|
32034
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32001
32035
|
showInSimplifiedHelpView: true,
|
|
32002
32036
|
category: ts.Diagnostics.Type_Checking,
|
|
32003
32037
|
description: ts.Diagnostics.Enable_all_strict_type_checking_options,
|
|
@@ -32007,6 +32041,7 @@ var ts;
|
|
|
32007
32041
|
name: "noImplicitAny",
|
|
32008
32042
|
type: "boolean",
|
|
32009
32043
|
affectsSemanticDiagnostics: true,
|
|
32044
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32010
32045
|
strictFlag: true,
|
|
32011
32046
|
category: ts.Diagnostics.Type_Checking,
|
|
32012
32047
|
description: ts.Diagnostics.Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type,
|
|
@@ -32016,6 +32051,7 @@ var ts;
|
|
|
32016
32051
|
name: "strictNullChecks",
|
|
32017
32052
|
type: "boolean",
|
|
32018
32053
|
affectsSemanticDiagnostics: true,
|
|
32054
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32019
32055
|
strictFlag: true,
|
|
32020
32056
|
category: ts.Diagnostics.Type_Checking,
|
|
32021
32057
|
description: ts.Diagnostics.When_type_checking_take_into_account_null_and_undefined,
|
|
@@ -32024,6 +32060,8 @@ var ts;
|
|
|
32024
32060
|
{
|
|
32025
32061
|
name: "strictFunctionTypes",
|
|
32026
32062
|
type: "boolean",
|
|
32063
|
+
affectsSemanticDiagnostics: true,
|
|
32064
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32027
32065
|
strictFlag: true,
|
|
32028
32066
|
category: ts.Diagnostics.Type_Checking,
|
|
32029
32067
|
description: ts.Diagnostics.When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible,
|
|
@@ -32032,6 +32070,8 @@ var ts;
|
|
|
32032
32070
|
{
|
|
32033
32071
|
name: "strictBindCallApply",
|
|
32034
32072
|
type: "boolean",
|
|
32073
|
+
affectsSemanticDiagnostics: true,
|
|
32074
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32035
32075
|
strictFlag: true,
|
|
32036
32076
|
category: ts.Diagnostics.Type_Checking,
|
|
32037
32077
|
description: ts.Diagnostics.Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function,
|
|
@@ -32041,6 +32081,7 @@ var ts;
|
|
|
32041
32081
|
name: "strictPropertyInitialization",
|
|
32042
32082
|
type: "boolean",
|
|
32043
32083
|
affectsSemanticDiagnostics: true,
|
|
32084
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32044
32085
|
strictFlag: true,
|
|
32045
32086
|
category: ts.Diagnostics.Type_Checking,
|
|
32046
32087
|
description: ts.Diagnostics.Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor,
|
|
@@ -32050,6 +32091,7 @@ var ts;
|
|
|
32050
32091
|
name: "noImplicitThis",
|
|
32051
32092
|
type: "boolean",
|
|
32052
32093
|
affectsSemanticDiagnostics: true,
|
|
32094
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32053
32095
|
strictFlag: true,
|
|
32054
32096
|
category: ts.Diagnostics.Type_Checking,
|
|
32055
32097
|
description: ts.Diagnostics.Enable_error_reporting_when_this_is_given_the_type_any,
|
|
@@ -32059,6 +32101,7 @@ var ts;
|
|
|
32059
32101
|
name: "useUnknownInCatchVariables",
|
|
32060
32102
|
type: "boolean",
|
|
32061
32103
|
affectsSemanticDiagnostics: true,
|
|
32104
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32062
32105
|
strictFlag: true,
|
|
32063
32106
|
category: ts.Diagnostics.Type_Checking,
|
|
32064
32107
|
description: ts.Diagnostics.Default_catch_clause_variables_as_unknown_instead_of_any,
|
|
@@ -32068,6 +32111,8 @@ var ts;
|
|
|
32068
32111
|
name: "alwaysStrict",
|
|
32069
32112
|
type: "boolean",
|
|
32070
32113
|
affectsSourceFile: true,
|
|
32114
|
+
affectsEmit: true,
|
|
32115
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32071
32116
|
strictFlag: true,
|
|
32072
32117
|
category: ts.Diagnostics.Type_Checking,
|
|
32073
32118
|
description: ts.Diagnostics.Ensure_use_strict_is_always_emitted,
|
|
@@ -32077,6 +32122,7 @@ var ts;
|
|
|
32077
32122
|
name: "noUnusedLocals",
|
|
32078
32123
|
type: "boolean",
|
|
32079
32124
|
affectsSemanticDiagnostics: true,
|
|
32125
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32080
32126
|
category: ts.Diagnostics.Type_Checking,
|
|
32081
32127
|
description: ts.Diagnostics.Enable_error_reporting_when_local_variables_aren_t_read,
|
|
32082
32128
|
defaultValueDescription: false,
|
|
@@ -32085,6 +32131,7 @@ var ts;
|
|
|
32085
32131
|
name: "noUnusedParameters",
|
|
32086
32132
|
type: "boolean",
|
|
32087
32133
|
affectsSemanticDiagnostics: true,
|
|
32134
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32088
32135
|
category: ts.Diagnostics.Type_Checking,
|
|
32089
32136
|
description: ts.Diagnostics.Raise_an_error_when_a_function_parameter_isn_t_read,
|
|
32090
32137
|
defaultValueDescription: false,
|
|
@@ -32093,6 +32140,7 @@ var ts;
|
|
|
32093
32140
|
name: "exactOptionalPropertyTypes",
|
|
32094
32141
|
type: "boolean",
|
|
32095
32142
|
affectsSemanticDiagnostics: true,
|
|
32143
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32096
32144
|
category: ts.Diagnostics.Type_Checking,
|
|
32097
32145
|
description: ts.Diagnostics.Interpret_optional_property_types_as_written_rather_than_adding_undefined,
|
|
32098
32146
|
defaultValueDescription: false,
|
|
@@ -32101,6 +32149,7 @@ var ts;
|
|
|
32101
32149
|
name: "noImplicitReturns",
|
|
32102
32150
|
type: "boolean",
|
|
32103
32151
|
affectsSemanticDiagnostics: true,
|
|
32152
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32104
32153
|
category: ts.Diagnostics.Type_Checking,
|
|
32105
32154
|
description: ts.Diagnostics.Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function,
|
|
32106
32155
|
defaultValueDescription: false,
|
|
@@ -32110,6 +32159,7 @@ var ts;
|
|
|
32110
32159
|
type: "boolean",
|
|
32111
32160
|
affectsBindDiagnostics: true,
|
|
32112
32161
|
affectsSemanticDiagnostics: true,
|
|
32162
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32113
32163
|
category: ts.Diagnostics.Type_Checking,
|
|
32114
32164
|
description: ts.Diagnostics.Enable_error_reporting_for_fallthrough_cases_in_switch_statements,
|
|
32115
32165
|
defaultValueDescription: false,
|
|
@@ -32118,6 +32168,7 @@ var ts;
|
|
|
32118
32168
|
name: "noUncheckedIndexedAccess",
|
|
32119
32169
|
type: "boolean",
|
|
32120
32170
|
affectsSemanticDiagnostics: true,
|
|
32171
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32121
32172
|
category: ts.Diagnostics.Type_Checking,
|
|
32122
32173
|
description: ts.Diagnostics.Add_undefined_to_a_type_when_accessed_using_an_index,
|
|
32123
32174
|
defaultValueDescription: false,
|
|
@@ -32126,6 +32177,7 @@ var ts;
|
|
|
32126
32177
|
name: "noImplicitOverride",
|
|
32127
32178
|
type: "boolean",
|
|
32128
32179
|
affectsSemanticDiagnostics: true,
|
|
32180
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32129
32181
|
category: ts.Diagnostics.Type_Checking,
|
|
32130
32182
|
description: ts.Diagnostics.Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier,
|
|
32131
32183
|
defaultValueDescription: false,
|
|
@@ -32133,6 +32185,8 @@ var ts;
|
|
|
32133
32185
|
{
|
|
32134
32186
|
name: "noPropertyAccessFromIndexSignature",
|
|
32135
32187
|
type: "boolean",
|
|
32188
|
+
affectsSemanticDiagnostics: true,
|
|
32189
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32136
32190
|
showInSimplifiedHelpView: false,
|
|
32137
32191
|
category: ts.Diagnostics.Type_Checking,
|
|
32138
32192
|
description: ts.Diagnostics.Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type,
|
|
@@ -32213,6 +32267,7 @@ var ts;
|
|
|
32213
32267
|
name: "allowSyntheticDefaultImports",
|
|
32214
32268
|
type: "boolean",
|
|
32215
32269
|
affectsSemanticDiagnostics: true,
|
|
32270
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32216
32271
|
category: ts.Diagnostics.Interop_Constraints,
|
|
32217
32272
|
description: ts.Diagnostics.Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export,
|
|
32218
32273
|
defaultValueDescription: ts.Diagnostics.module_system_or_esModuleInterop
|
|
@@ -32222,6 +32277,7 @@ var ts;
|
|
|
32222
32277
|
type: "boolean",
|
|
32223
32278
|
affectsSemanticDiagnostics: true,
|
|
32224
32279
|
affectsEmit: true,
|
|
32280
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32225
32281
|
showInSimplifiedHelpView: true,
|
|
32226
32282
|
category: ts.Diagnostics.Interop_Constraints,
|
|
32227
32283
|
description: ts.Diagnostics.Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility,
|
|
@@ -32238,6 +32294,7 @@ var ts;
|
|
|
32238
32294
|
name: "allowUmdGlobalAccess",
|
|
32239
32295
|
type: "boolean",
|
|
32240
32296
|
affectsSemanticDiagnostics: true,
|
|
32297
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32241
32298
|
category: ts.Diagnostics.Modules,
|
|
32242
32299
|
description: ts.Diagnostics.Allow_accessing_UMD_globals_from_modules,
|
|
32243
32300
|
defaultValueDescription: false,
|
|
@@ -32258,6 +32315,7 @@ var ts;
|
|
|
32258
32315
|
name: "sourceRoot",
|
|
32259
32316
|
type: "string",
|
|
32260
32317
|
affectsEmit: true,
|
|
32318
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32261
32319
|
paramType: ts.Diagnostics.LOCATION,
|
|
32262
32320
|
category: ts.Diagnostics.Emit,
|
|
32263
32321
|
description: ts.Diagnostics.Specify_the_root_path_for_debuggers_to_find_the_reference_source_code,
|
|
@@ -32266,6 +32324,7 @@ var ts;
|
|
|
32266
32324
|
name: "mapRoot",
|
|
32267
32325
|
type: "string",
|
|
32268
32326
|
affectsEmit: true,
|
|
32327
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32269
32328
|
paramType: ts.Diagnostics.LOCATION,
|
|
32270
32329
|
category: ts.Diagnostics.Emit,
|
|
32271
32330
|
description: ts.Diagnostics.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations,
|
|
@@ -32274,6 +32333,7 @@ var ts;
|
|
|
32274
32333
|
name: "inlineSourceMap",
|
|
32275
32334
|
type: "boolean",
|
|
32276
32335
|
affectsEmit: true,
|
|
32336
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32277
32337
|
category: ts.Diagnostics.Emit,
|
|
32278
32338
|
description: ts.Diagnostics.Include_sourcemap_files_inside_the_emitted_JavaScript,
|
|
32279
32339
|
defaultValueDescription: false,
|
|
@@ -32282,6 +32342,7 @@ var ts;
|
|
|
32282
32342
|
name: "inlineSources",
|
|
32283
32343
|
type: "boolean",
|
|
32284
32344
|
affectsEmit: true,
|
|
32345
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32285
32346
|
category: ts.Diagnostics.Emit,
|
|
32286
32347
|
description: ts.Diagnostics.Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript,
|
|
32287
32348
|
defaultValueDescription: false,
|
|
@@ -32290,6 +32351,7 @@ var ts;
|
|
|
32290
32351
|
name: "experimentalDecorators",
|
|
32291
32352
|
type: "boolean",
|
|
32292
32353
|
affectsSemanticDiagnostics: true,
|
|
32354
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32293
32355
|
category: ts.Diagnostics.Language_and_Environment,
|
|
32294
32356
|
description: ts.Diagnostics.Enable_experimental_support_for_TC39_stage_2_draft_decorators,
|
|
32295
32357
|
defaultValueDescription: false,
|
|
@@ -32299,6 +32361,7 @@ var ts;
|
|
|
32299
32361
|
type: "boolean",
|
|
32300
32362
|
affectsSemanticDiagnostics: true,
|
|
32301
32363
|
affectsEmit: true,
|
|
32364
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32302
32365
|
category: ts.Diagnostics.Language_and_Environment,
|
|
32303
32366
|
description: ts.Diagnostics.Emit_design_type_metadata_for_decorated_declarations_in_source_files,
|
|
32304
32367
|
defaultValueDescription: false,
|
|
@@ -32322,6 +32385,7 @@ var ts;
|
|
|
32322
32385
|
type: "string",
|
|
32323
32386
|
affectsSemanticDiagnostics: true,
|
|
32324
32387
|
affectsEmit: true,
|
|
32388
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32325
32389
|
affectsModuleResolution: true,
|
|
32326
32390
|
category: ts.Diagnostics.Language_and_Environment,
|
|
32327
32391
|
description: ts.Diagnostics.Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk,
|
|
@@ -32339,6 +32403,9 @@ var ts;
|
|
|
32339
32403
|
name: "out",
|
|
32340
32404
|
type: "string",
|
|
32341
32405
|
affectsEmit: true,
|
|
32406
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32407
|
+
affectsDeclarationPath: true,
|
|
32408
|
+
affectsBundleEmitBuildInfo: true,
|
|
32342
32409
|
isFilePath: false,
|
|
32343
32410
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
32344
32411
|
paramType: ts.Diagnostics.FILE,
|
|
@@ -32349,6 +32416,7 @@ var ts;
|
|
|
32349
32416
|
name: "reactNamespace",
|
|
32350
32417
|
type: "string",
|
|
32351
32418
|
affectsEmit: true,
|
|
32419
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32352
32420
|
category: ts.Diagnostics.Language_and_Environment,
|
|
32353
32421
|
description: ts.Diagnostics.Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit,
|
|
32354
32422
|
defaultValueDescription: "`React`",
|
|
@@ -32356,6 +32424,7 @@ var ts;
|
|
|
32356
32424
|
{
|
|
32357
32425
|
name: "skipDefaultLibCheck",
|
|
32358
32426
|
type: "boolean",
|
|
32427
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32359
32428
|
category: ts.Diagnostics.Completeness,
|
|
32360
32429
|
description: ts.Diagnostics.Skip_type_checking_d_ts_files_that_are_included_with_TypeScript,
|
|
32361
32430
|
defaultValueDescription: false,
|
|
@@ -32371,6 +32440,7 @@ var ts;
|
|
|
32371
32440
|
name: "emitBOM",
|
|
32372
32441
|
type: "boolean",
|
|
32373
32442
|
affectsEmit: true,
|
|
32443
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32374
32444
|
category: ts.Diagnostics.Emit,
|
|
32375
32445
|
description: ts.Diagnostics.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files,
|
|
32376
32446
|
defaultValueDescription: false,
|
|
@@ -32382,6 +32452,7 @@ var ts;
|
|
|
32382
32452
|
lf: 1
|
|
32383
32453
|
})),
|
|
32384
32454
|
affectsEmit: true,
|
|
32455
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32385
32456
|
paramType: ts.Diagnostics.NEWLINE,
|
|
32386
32457
|
category: ts.Diagnostics.Emit,
|
|
32387
32458
|
description: ts.Diagnostics.Set_the_newline_character_for_emitting_files,
|
|
@@ -32391,6 +32462,7 @@ var ts;
|
|
|
32391
32462
|
name: "noErrorTruncation",
|
|
32392
32463
|
type: "boolean",
|
|
32393
32464
|
affectsSemanticDiagnostics: true,
|
|
32465
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32394
32466
|
category: ts.Diagnostics.Output_Formatting,
|
|
32395
32467
|
description: ts.Diagnostics.Disable_truncating_types_in_error_messages,
|
|
32396
32468
|
defaultValueDescription: false,
|
|
@@ -32417,6 +32489,7 @@ var ts;
|
|
|
32417
32489
|
name: "stripInternal",
|
|
32418
32490
|
type: "boolean",
|
|
32419
32491
|
affectsEmit: true,
|
|
32492
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32420
32493
|
category: ts.Diagnostics.Emit,
|
|
32421
32494
|
description: ts.Diagnostics.Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments,
|
|
32422
32495
|
defaultValueDescription: false,
|
|
@@ -32457,6 +32530,7 @@ var ts;
|
|
|
32457
32530
|
name: "noImplicitUseStrict",
|
|
32458
32531
|
type: "boolean",
|
|
32459
32532
|
affectsSemanticDiagnostics: true,
|
|
32533
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32460
32534
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
32461
32535
|
description: ts.Diagnostics.Disable_adding_use_strict_directives_in_emitted_JavaScript_files,
|
|
32462
32536
|
defaultValueDescription: false,
|
|
@@ -32465,6 +32539,7 @@ var ts;
|
|
|
32465
32539
|
name: "noEmitHelpers",
|
|
32466
32540
|
type: "boolean",
|
|
32467
32541
|
affectsEmit: true,
|
|
32542
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32468
32543
|
category: ts.Diagnostics.Emit,
|
|
32469
32544
|
description: ts.Diagnostics.Disable_generating_custom_helper_functions_like_extends_in_compiled_output,
|
|
32470
32545
|
defaultValueDescription: false,
|
|
@@ -32473,6 +32548,7 @@ var ts;
|
|
|
32473
32548
|
name: "noEmitOnError",
|
|
32474
32549
|
type: "boolean",
|
|
32475
32550
|
affectsEmit: true,
|
|
32551
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32476
32552
|
category: ts.Diagnostics.Emit,
|
|
32477
32553
|
transpileOptionValue: undefined,
|
|
32478
32554
|
description: ts.Diagnostics.Disable_emitting_files_if_any_type_checking_errors_are_reported,
|
|
@@ -32482,6 +32558,7 @@ var ts;
|
|
|
32482
32558
|
name: "preserveConstEnums",
|
|
32483
32559
|
type: "boolean",
|
|
32484
32560
|
affectsEmit: true,
|
|
32561
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32485
32562
|
category: ts.Diagnostics.Emit,
|
|
32486
32563
|
description: ts.Diagnostics.Disable_erasing_const_enum_declarations_in_generated_code,
|
|
32487
32564
|
defaultValueDescription: false,
|
|
@@ -32490,6 +32567,8 @@ var ts;
|
|
|
32490
32567
|
name: "declarationDir",
|
|
32491
32568
|
type: "string",
|
|
32492
32569
|
affectsEmit: true,
|
|
32570
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32571
|
+
affectsDeclarationPath: true,
|
|
32493
32572
|
isFilePath: true,
|
|
32494
32573
|
paramType: ts.Diagnostics.DIRECTORY,
|
|
32495
32574
|
category: ts.Diagnostics.Emit,
|
|
@@ -32499,6 +32578,7 @@ var ts;
|
|
|
32499
32578
|
{
|
|
32500
32579
|
name: "skipLibCheck",
|
|
32501
32580
|
type: "boolean",
|
|
32581
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32502
32582
|
category: ts.Diagnostics.Completeness,
|
|
32503
32583
|
description: ts.Diagnostics.Skip_type_checking_all_d_ts_files,
|
|
32504
32584
|
defaultValueDescription: false,
|
|
@@ -32508,6 +32588,7 @@ var ts;
|
|
|
32508
32588
|
type: "boolean",
|
|
32509
32589
|
affectsBindDiagnostics: true,
|
|
32510
32590
|
affectsSemanticDiagnostics: true,
|
|
32591
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32511
32592
|
category: ts.Diagnostics.Type_Checking,
|
|
32512
32593
|
description: ts.Diagnostics.Disable_error_reporting_for_unused_labels,
|
|
32513
32594
|
defaultValueDescription: undefined,
|
|
@@ -32517,6 +32598,7 @@ var ts;
|
|
|
32517
32598
|
type: "boolean",
|
|
32518
32599
|
affectsBindDiagnostics: true,
|
|
32519
32600
|
affectsSemanticDiagnostics: true,
|
|
32601
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32520
32602
|
category: ts.Diagnostics.Type_Checking,
|
|
32521
32603
|
description: ts.Diagnostics.Disable_error_reporting_for_unreachable_code,
|
|
32522
32604
|
defaultValueDescription: undefined,
|
|
@@ -32525,6 +32607,7 @@ var ts;
|
|
|
32525
32607
|
name: "suppressExcessPropertyErrors",
|
|
32526
32608
|
type: "boolean",
|
|
32527
32609
|
affectsSemanticDiagnostics: true,
|
|
32610
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32528
32611
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
32529
32612
|
description: ts.Diagnostics.Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals,
|
|
32530
32613
|
defaultValueDescription: false,
|
|
@@ -32533,6 +32616,7 @@ var ts;
|
|
|
32533
32616
|
name: "suppressImplicitAnyIndexErrors",
|
|
32534
32617
|
type: "boolean",
|
|
32535
32618
|
affectsSemanticDiagnostics: true,
|
|
32619
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32536
32620
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
32537
32621
|
description: ts.Diagnostics.Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures,
|
|
32538
32622
|
defaultValueDescription: false,
|
|
@@ -32557,6 +32641,7 @@ var ts;
|
|
|
32557
32641
|
name: "noStrictGenericChecks",
|
|
32558
32642
|
type: "boolean",
|
|
32559
32643
|
affectsSemanticDiagnostics: true,
|
|
32644
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32560
32645
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
32561
32646
|
description: ts.Diagnostics.Disable_strict_checking_of_generic_signatures_in_function_types,
|
|
32562
32647
|
defaultValueDescription: false,
|
|
@@ -32566,6 +32651,7 @@ var ts;
|
|
|
32566
32651
|
type: "boolean",
|
|
32567
32652
|
affectsSemanticDiagnostics: true,
|
|
32568
32653
|
affectsEmit: true,
|
|
32654
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32569
32655
|
category: ts.Diagnostics.Language_and_Environment,
|
|
32570
32656
|
description: ts.Diagnostics.Emit_ECMAScript_standard_compliant_class_fields,
|
|
32571
32657
|
defaultValueDescription: ts.Diagnostics.true_for_ES2022_and_above_including_ESNext
|
|
@@ -32574,6 +32660,7 @@ var ts;
|
|
|
32574
32660
|
name: "preserveValueImports",
|
|
32575
32661
|
type: "boolean",
|
|
32576
32662
|
affectsEmit: true,
|
|
32663
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32577
32664
|
category: ts.Diagnostics.Emit,
|
|
32578
32665
|
description: ts.Diagnostics.Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed,
|
|
32579
32666
|
defaultValueDescription: false,
|
|
@@ -32612,6 +32699,7 @@ var ts;
|
|
|
32612
32699
|
ts.optionDeclarations = __spreadArray(__spreadArray([], ts.commonOptionsWithBuild, true), commandOptionsWithoutBuild, true);
|
|
32613
32700
|
ts.semanticDiagnosticsOptionDeclarations = ts.optionDeclarations.filter(function (option) { return !!option.affectsSemanticDiagnostics; });
|
|
32614
32701
|
ts.affectsEmitOptionDeclarations = ts.optionDeclarations.filter(function (option) { return !!option.affectsEmit; });
|
|
32702
|
+
ts.affectsDeclarationPathOptionDeclarations = ts.optionDeclarations.filter(function (option) { return !!option.affectsDeclarationPath; });
|
|
32615
32703
|
ts.moduleResolutionOptionDeclarations = ts.optionDeclarations.filter(function (option) { return !!option.affectsModuleResolution; });
|
|
32616
32704
|
ts.sourceFileAffectingCompilerOptions = ts.optionDeclarations.filter(function (option) {
|
|
32617
32705
|
return !!option.affectsSourceFile || !!option.affectsModuleResolution || !!option.affectsBindDiagnostics;
|
|
@@ -33391,6 +33479,7 @@ var ts;
|
|
|
33391
33479
|
}
|
|
33392
33480
|
});
|
|
33393
33481
|
}
|
|
33482
|
+
ts.getNameOfCompilerOptionValue = getNameOfCompilerOptionValue;
|
|
33394
33483
|
function serializeCompilerOptions(options, pathOptions) {
|
|
33395
33484
|
return serializeOptionBaseObject(options, getOptionsNameMap(), pathOptions);
|
|
33396
33485
|
}
|
|
@@ -36345,7 +36434,7 @@ var ts;
|
|
|
36345
36434
|
return (ts.isGlobalScopeAugmentation(node) ? "__global" : "\"" + moduleName + "\"");
|
|
36346
36435
|
}
|
|
36347
36436
|
if (name.kind === 162) {
|
|
36348
|
-
var nameExpression =
|
|
36437
|
+
var nameExpression = name.expression;
|
|
36349
36438
|
if (ts.isStringOrNumericLiteralLike(nameExpression)) {
|
|
36350
36439
|
return ts.escapeLeadingUnderscores(nameExpression.text);
|
|
36351
36440
|
}
|
|
@@ -39576,6 +39665,7 @@ var ts;
|
|
|
39576
39665
|
var keyofConstraintType = keyofStringsOnly ? stringType : stringNumberSymbolType;
|
|
39577
39666
|
var numberOrBigIntType = getUnionType([numberType, bigintType]);
|
|
39578
39667
|
var templateConstraintType = getUnionType([stringType, numberType, booleanType, bigintType, nullType, undefinedType]);
|
|
39668
|
+
var numericStringType = getTemplateLiteralType(["", ""], [numberType]);
|
|
39579
39669
|
var restrictiveMapper = makeFunctionTypeMapper(function (t) { return t.flags & 262144 ? getRestrictiveTypeParameter(t) : t; });
|
|
39580
39670
|
var permissiveMapper = makeFunctionTypeMapper(function (t) { return t.flags & 262144 ? wildcardType : t; });
|
|
39581
39671
|
var uniqueLiteralType = createIntrinsicType(131072, "never");
|
|
@@ -42170,7 +42260,7 @@ var ts;
|
|
|
42170
42260
|
}
|
|
42171
42261
|
}
|
|
42172
42262
|
function getExportSymbolOfValueSymbolIfExported(symbol) {
|
|
42173
|
-
return getMergedSymbol(symbol && (symbol.flags & 1048576) !== 0
|
|
42263
|
+
return getMergedSymbol(symbol && (symbol.flags & 1048576) !== 0 && symbol.exportSymbol || symbol);
|
|
42174
42264
|
}
|
|
42175
42265
|
function symbolIsValue(symbol) {
|
|
42176
42266
|
return !!(symbol.flags & 111551 || symbol.flags & 2097152 && resolveAlias(symbol).flags & 111551 && !getTypeOnlyAliasDeclaration(symbol));
|
|
@@ -48565,7 +48655,7 @@ var ts;
|
|
|
48565
48655
|
var typeVariable = getHomomorphicTypeVariable(type);
|
|
48566
48656
|
if (typeVariable && !type.declaration.nameType) {
|
|
48567
48657
|
var constraint = getConstraintOfTypeParameter(typeVariable);
|
|
48568
|
-
if (constraint && (
|
|
48658
|
+
if (constraint && isArrayOrTupleType(constraint)) {
|
|
48569
48659
|
return instantiateType(type, prependTypeMapping(typeVariable, constraint, type.mapper));
|
|
48570
48660
|
}
|
|
48571
48661
|
}
|
|
@@ -48874,7 +48964,7 @@ var ts;
|
|
|
48874
48964
|
function isApplicableIndexType(source, target) {
|
|
48875
48965
|
return isTypeAssignableTo(source, target) ||
|
|
48876
48966
|
target === stringType && isTypeAssignableTo(source, numberType) ||
|
|
48877
|
-
target === numberType && !!(source.flags & 128) && ts.isNumericLiteralName(source.value);
|
|
48967
|
+
target === numberType && (source === numericStringType || !!(source.flags & 128) && ts.isNumericLiteralName(source.value));
|
|
48878
48968
|
}
|
|
48879
48969
|
function getIndexInfosOfStructuredType(type) {
|
|
48880
48970
|
if (type.flags & 3670016) {
|
|
@@ -49780,6 +49870,18 @@ var ts;
|
|
|
49780
49870
|
constraints = ts.append(constraints, constraint);
|
|
49781
49871
|
}
|
|
49782
49872
|
}
|
|
49873
|
+
else if (type.flags & 262144 && parent.kind === 195 && node === parent.type) {
|
|
49874
|
+
var mappedType = getTypeFromTypeNode(parent);
|
|
49875
|
+
if (getTypeParameterFromMappedType(mappedType) === getActualTypeVariable(type)) {
|
|
49876
|
+
var typeParameter = getHomomorphicTypeVariable(mappedType);
|
|
49877
|
+
if (typeParameter) {
|
|
49878
|
+
var constraint = getConstraintOfTypeParameter(typeParameter);
|
|
49879
|
+
if (constraint && everyType(constraint, isArrayOrTupleType)) {
|
|
49880
|
+
constraints = ts.append(constraints, getUnionType([numberType, numericStringType]));
|
|
49881
|
+
}
|
|
49882
|
+
}
|
|
49883
|
+
}
|
|
49884
|
+
}
|
|
49783
49885
|
node = parent;
|
|
49784
49886
|
}
|
|
49785
49887
|
return constraints ? getSubstitutionType(type, getIntersectionType(ts.append(constraints, type))) : type;
|
|
@@ -50666,7 +50768,7 @@ var ts;
|
|
|
50666
50768
|
while (i > 0) {
|
|
50667
50769
|
i--;
|
|
50668
50770
|
var t = types[i];
|
|
50669
|
-
var remove = t.flags & 4 && includes & 128 ||
|
|
50771
|
+
var remove = t.flags & 4 && includes & (128 | 134217728 | 268435456) ||
|
|
50670
50772
|
t.flags & 8 && includes & 256 ||
|
|
50671
50773
|
t.flags & 64 && includes & 2048 ||
|
|
50672
50774
|
t.flags & 4096 && includes & 8192;
|
|
@@ -50789,7 +50891,7 @@ var ts;
|
|
|
50789
50891
|
if (!strictNullChecks && includes & 98304) {
|
|
50790
50892
|
return includes & 32768 ? undefinedType : nullType;
|
|
50791
50893
|
}
|
|
50792
|
-
if (includes & 4 && includes & 128 ||
|
|
50894
|
+
if (includes & 4 && includes & (128 | 134217728 | 268435456) ||
|
|
50793
50895
|
includes & 8 && includes & 256 ||
|
|
50794
50896
|
includes & 64 && includes & 2048 ||
|
|
50795
50897
|
includes & 4096 && includes & 8192) {
|
|
@@ -52457,7 +52559,7 @@ var ts;
|
|
|
52457
52559
|
if (!type.declaration.nameType) {
|
|
52458
52560
|
var constraint = void 0;
|
|
52459
52561
|
if (isArrayType(t) || t.flags & 1 && findResolutionCycleStartIndex(typeVariable, 4) < 0 &&
|
|
52460
|
-
(constraint = getConstraintOfTypeParameter(typeVariable)) && everyType(constraint,
|
|
52562
|
+
(constraint = getConstraintOfTypeParameter(typeVariable)) && everyType(constraint, isArrayOrTupleType)) {
|
|
52461
52563
|
return instantiateMappedArrayType(t, type, prependTypeMapping(typeVariable, t, mapper));
|
|
52462
52564
|
}
|
|
52463
52565
|
if (isGenericTupleType(t)) {
|
|
@@ -53752,7 +53854,7 @@ var ts;
|
|
|
53752
53854
|
}
|
|
53753
53855
|
return false;
|
|
53754
53856
|
}
|
|
53755
|
-
return
|
|
53857
|
+
return isArrayOrTupleType(target);
|
|
53756
53858
|
}
|
|
53757
53859
|
if (isReadonlyArrayType(source) && isMutableArrayOrTuple(target)) {
|
|
53758
53860
|
if (reportErrors) {
|
|
@@ -53848,7 +53950,7 @@ var ts;
|
|
|
53848
53950
|
unionOrIntersectionRelatedTo(source, target, reportErrors, intersectionState) :
|
|
53849
53951
|
recursiveTypeRelatedTo(source, target, reportErrors, intersectionState, recursionFlags);
|
|
53850
53952
|
if (result_7 && !inPropertyCheck && (target.flags & 2097152 && (isPerformingExcessPropertyChecks || isPerformingCommonPropertyChecks) ||
|
|
53851
|
-
isNonGenericObjectType(target) && !
|
|
53953
|
+
isNonGenericObjectType(target) && !isArrayOrTupleType(target) && source.flags & 2097152 && getApparentType(source).flags & 3670016 && !ts.some(source.types, function (t) { return !!(ts.getObjectFlags(t) & 262144); }))) {
|
|
53852
53954
|
inPropertyCheck = true;
|
|
53853
53955
|
result_7 &= recursiveTypeRelatedTo(source, target, reportErrors, 4, recursionFlags);
|
|
53854
53956
|
inPropertyCheck = false;
|
|
@@ -54667,7 +54769,7 @@ var ts;
|
|
|
54667
54769
|
return varianceResult;
|
|
54668
54770
|
}
|
|
54669
54771
|
}
|
|
54670
|
-
else if (isReadonlyArrayType(target) ?
|
|
54772
|
+
else if (isReadonlyArrayType(target) ? isArrayOrTupleType(source) : isArrayType(target) && isTupleType(source) && !source.target.readonly) {
|
|
54671
54773
|
if (relation !== identityRelation) {
|
|
54672
54774
|
return isRelatedTo(getIndexTypeOfType(source, numberType) || anyType, getIndexTypeOfType(target, numberType) || anyType, 3, reportErrors);
|
|
54673
54775
|
}
|
|
@@ -54961,7 +55063,7 @@ var ts;
|
|
|
54961
55063
|
}
|
|
54962
55064
|
var result = -1;
|
|
54963
55065
|
if (isTupleType(target)) {
|
|
54964
|
-
if (
|
|
55066
|
+
if (isArrayOrTupleType(source)) {
|
|
54965
55067
|
if (!target.target.readonly && (isReadonlyArrayType(source) || isTupleType(source) && source.target.readonly)) {
|
|
54966
55068
|
return 0;
|
|
54967
55069
|
}
|
|
@@ -55808,6 +55910,9 @@ var ts;
|
|
|
55808
55910
|
function isReadonlyArrayType(type) {
|
|
55809
55911
|
return !!(ts.getObjectFlags(type) & 4) && type.target === globalReadonlyArrayType;
|
|
55810
55912
|
}
|
|
55913
|
+
function isArrayOrTupleType(type) {
|
|
55914
|
+
return isArrayType(type) || isTupleType(type);
|
|
55915
|
+
}
|
|
55811
55916
|
function isMutableArrayOrTuple(type) {
|
|
55812
55917
|
return isArrayType(type) && !isReadonlyArrayType(type) || isTupleType(type) && !type.target.readonly;
|
|
55813
55918
|
}
|
|
@@ -56205,7 +56310,7 @@ var ts;
|
|
|
56205
56310
|
else if (type.flags & 2097152) {
|
|
56206
56311
|
result = getIntersectionType(ts.sameMap(type.types, getWidenedType));
|
|
56207
56312
|
}
|
|
56208
|
-
else if (
|
|
56313
|
+
else if (isArrayOrTupleType(type)) {
|
|
56209
56314
|
result = createTypeReference(type.target, ts.sameMap(getTypeArguments(type), getWidenedType));
|
|
56210
56315
|
}
|
|
56211
56316
|
if (result && context === undefined) {
|
|
@@ -56231,7 +56336,7 @@ var ts;
|
|
|
56231
56336
|
}
|
|
56232
56337
|
}
|
|
56233
56338
|
}
|
|
56234
|
-
if (
|
|
56339
|
+
if (isArrayOrTupleType(type)) {
|
|
56235
56340
|
for (var _b = 0, _c = getTypeArguments(type); _b < _c.length; _b++) {
|
|
56236
56341
|
var t = _c[_b];
|
|
56237
56342
|
if (reportWideningErrorsInType(t)) {
|
|
@@ -57133,7 +57238,7 @@ var ts;
|
|
|
57133
57238
|
}
|
|
57134
57239
|
}
|
|
57135
57240
|
if (!typesDefinitelyUnrelated(source, target)) {
|
|
57136
|
-
if (
|
|
57241
|
+
if (isArrayOrTupleType(source)) {
|
|
57137
57242
|
if (isTupleType(target)) {
|
|
57138
57243
|
var sourceArity = getTypeReferenceArity(source);
|
|
57139
57244
|
var targetArity = getTypeReferenceArity(target);
|
|
@@ -63138,8 +63243,14 @@ var ts;
|
|
|
63138
63243
|
var parameterRange = hasRestParameter ? min
|
|
63139
63244
|
: min < max ? min + "-" + max
|
|
63140
63245
|
: min;
|
|
63141
|
-
var
|
|
63142
|
-
|
|
63246
|
+
var isVoidPromiseError = !hasRestParameter && parameterRange === 1 && args.length === 0 && isPromiseResolveArityError(node);
|
|
63247
|
+
if (isVoidPromiseError && ts.isInJSFile(node)) {
|
|
63248
|
+
return getDiagnosticForCallNode(node, ts.Diagnostics.Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments);
|
|
63249
|
+
}
|
|
63250
|
+
var error = hasRestParameter
|
|
63251
|
+
? ts.Diagnostics.Expected_at_least_0_arguments_but_got_1
|
|
63252
|
+
: isVoidPromiseError
|
|
63253
|
+
? ts.Diagnostics.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise
|
|
63143
63254
|
: ts.Diagnostics.Expected_0_arguments_but_got_1;
|
|
63144
63255
|
if (min < args.length && args.length < max) {
|
|
63145
63256
|
return getDiagnosticForCallNode(node, ts.Diagnostics.No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments, args.length, maxBelow, minAbove);
|
|
@@ -90100,7 +90211,8 @@ var ts;
|
|
|
90100
90211
|
return;
|
|
90101
90212
|
}
|
|
90102
90213
|
var version = ts.version;
|
|
90103
|
-
|
|
90214
|
+
var buildInfo = { bundle: bundle, program: program, version: version };
|
|
90215
|
+
ts.writeFile(host, emitterDiagnostics, buildInfoPath, getBuildInfoText(buildInfo), false, undefined, { buildInfo: buildInfo });
|
|
90104
90216
|
}
|
|
90105
90217
|
function emitJsFileOrBundle(sourceFileOrBundle, jsFilePath, sourceMapFilePath, relativeToBuildInfo) {
|
|
90106
90218
|
if (!sourceFileOrBundle || emitOnlyDtsFiles || !jsFilePath) {
|
|
@@ -90241,12 +90353,17 @@ var ts;
|
|
|
90241
90353
|
if (sourceMapFilePath) {
|
|
90242
90354
|
var sourceMap = sourceMapGenerator.toString();
|
|
90243
90355
|
ts.writeFile(host, emitterDiagnostics, sourceMapFilePath, sourceMap, false, sourceFiles);
|
|
90356
|
+
if (printer.bundleFileInfo)
|
|
90357
|
+
printer.bundleFileInfo.mapHash = ts.BuilderState.computeSignature(sourceMap, ts.maybeBind(host, host.createHash));
|
|
90244
90358
|
}
|
|
90245
90359
|
}
|
|
90246
90360
|
else {
|
|
90247
90361
|
writer.writeLine();
|
|
90248
90362
|
}
|
|
90249
|
-
|
|
90363
|
+
var text = writer.getText();
|
|
90364
|
+
ts.writeFile(host, emitterDiagnostics, jsFilePath, text, !!compilerOptions.emitBOM, sourceFiles, { sourceMapUrlPos: sourceMapUrlPos });
|
|
90365
|
+
if (printer.bundleFileInfo)
|
|
90366
|
+
printer.bundleFileInfo.hash = ts.BuilderState.computeSignature(text, ts.maybeBind(host, host.createHash));
|
|
90250
90367
|
writer.clear();
|
|
90251
90368
|
}
|
|
90252
90369
|
function shouldEmitSourceMaps(mapOptions, sourceFileOrBundle) {
|
|
@@ -90371,30 +90488,50 @@ var ts;
|
|
|
90371
90488
|
});
|
|
90372
90489
|
}
|
|
90373
90490
|
function emitUsingBuildInfo(config, host, getCommandLine, customTransformers) {
|
|
90491
|
+
var createHash = ts.maybeBind(host, host.createHash);
|
|
90374
90492
|
var _a = getOutputPathsForBundle(config.options, false), buildInfoPath = _a.buildInfoPath, jsFilePath = _a.jsFilePath, sourceMapFilePath = _a.sourceMapFilePath, declarationFilePath = _a.declarationFilePath, declarationMapPath = _a.declarationMapPath;
|
|
90375
|
-
var
|
|
90376
|
-
if (
|
|
90493
|
+
var buildInfo;
|
|
90494
|
+
if (host.getBuildInfo) {
|
|
90495
|
+
var hostBuildInfo = host.getBuildInfo(buildInfoPath, config.options.configFilePath);
|
|
90496
|
+
if (!hostBuildInfo)
|
|
90497
|
+
return buildInfoPath;
|
|
90498
|
+
buildInfo = hostBuildInfo;
|
|
90499
|
+
}
|
|
90500
|
+
else {
|
|
90501
|
+
var buildInfoText = host.readFile(buildInfoPath);
|
|
90502
|
+
if (!buildInfoText)
|
|
90503
|
+
return buildInfoPath;
|
|
90504
|
+
buildInfo = getBuildInfo(buildInfoText);
|
|
90505
|
+
}
|
|
90506
|
+
if (!buildInfo.bundle || !buildInfo.bundle.js || (declarationFilePath && !buildInfo.bundle.dts))
|
|
90377
90507
|
return buildInfoPath;
|
|
90378
90508
|
var jsFileText = host.readFile(ts.Debug.checkDefined(jsFilePath));
|
|
90379
90509
|
if (!jsFileText)
|
|
90380
90510
|
return jsFilePath;
|
|
90511
|
+
if (ts.BuilderState.computeSignature(jsFileText, createHash) !== buildInfo.bundle.js.hash)
|
|
90512
|
+
return jsFilePath;
|
|
90381
90513
|
var sourceMapText = sourceMapFilePath && host.readFile(sourceMapFilePath);
|
|
90382
90514
|
if ((sourceMapFilePath && !sourceMapText) || config.options.inlineSourceMap)
|
|
90383
90515
|
return sourceMapFilePath || "inline sourcemap decoding";
|
|
90516
|
+
if (sourceMapFilePath && ts.BuilderState.computeSignature(sourceMapText, createHash) !== buildInfo.bundle.js.mapHash)
|
|
90517
|
+
return sourceMapFilePath;
|
|
90384
90518
|
var declarationText = declarationFilePath && host.readFile(declarationFilePath);
|
|
90385
90519
|
if (declarationFilePath && !declarationText)
|
|
90386
90520
|
return declarationFilePath;
|
|
90521
|
+
if (declarationFilePath && ts.BuilderState.computeSignature(declarationText, createHash) !== buildInfo.bundle.dts.hash)
|
|
90522
|
+
return declarationFilePath;
|
|
90387
90523
|
var declarationMapText = declarationMapPath && host.readFile(declarationMapPath);
|
|
90388
90524
|
if ((declarationMapPath && !declarationMapText) || config.options.inlineSourceMap)
|
|
90389
90525
|
return declarationMapPath || "inline sourcemap decoding";
|
|
90390
|
-
|
|
90391
|
-
|
|
90392
|
-
return buildInfoPath;
|
|
90526
|
+
if (declarationMapPath && ts.BuilderState.computeSignature(declarationMapText, createHash) !== buildInfo.bundle.dts.mapHash)
|
|
90527
|
+
return declarationMapPath;
|
|
90393
90528
|
var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));
|
|
90394
90529
|
var ownPrependInput = ts.createInputFiles(jsFileText, declarationText, sourceMapFilePath, sourceMapText, declarationMapPath, declarationMapText, jsFilePath, declarationFilePath, buildInfoPath, buildInfo, true);
|
|
90395
90530
|
var outputFiles = [];
|
|
90396
90531
|
var prependNodes = ts.createPrependNodes(config.projectReferences, getCommandLine, function (f) { return host.readFile(f); });
|
|
90397
90532
|
var sourceFilesForJsEmit = createSourceFilesFromBundleBuildInfo(buildInfo.bundle, buildInfoDirectory, host);
|
|
90533
|
+
var changedDtsText;
|
|
90534
|
+
var changedDtsData;
|
|
90398
90535
|
var emitHost = {
|
|
90399
90536
|
getPrependNodes: ts.memoize(function () { return __spreadArray(__spreadArray([], prependNodes, true), [ownPrependInput], false); }),
|
|
90400
90537
|
getCanonicalFileName: host.getCanonicalFileName,
|
|
@@ -90410,7 +90547,7 @@ var ts;
|
|
|
90410
90547
|
getResolvedProjectReferenceToRedirect: ts.returnUndefined,
|
|
90411
90548
|
getProjectReferenceRedirect: ts.returnUndefined,
|
|
90412
90549
|
isSourceOfProjectReferenceRedirect: ts.returnFalse,
|
|
90413
|
-
writeFile: function (name, text, writeByteOrderMark) {
|
|
90550
|
+
writeFile: function (name, text, writeByteOrderMark, _onError, _sourceFiles, data) {
|
|
90414
90551
|
switch (name) {
|
|
90415
90552
|
case jsFilePath:
|
|
90416
90553
|
if (jsFileText === text)
|
|
@@ -90421,19 +90558,25 @@ var ts;
|
|
|
90421
90558
|
return;
|
|
90422
90559
|
break;
|
|
90423
90560
|
case buildInfoPath:
|
|
90424
|
-
var newBuildInfo =
|
|
90561
|
+
var newBuildInfo = data.buildInfo;
|
|
90425
90562
|
newBuildInfo.program = buildInfo.program;
|
|
90563
|
+
if (newBuildInfo.program && changedDtsText !== undefined && config.options.composite) {
|
|
90564
|
+
newBuildInfo.program.outSignature = ts.computeSignature(changedDtsText, changedDtsData, createHash);
|
|
90565
|
+
newBuildInfo.program.dtsChangeTime = ts.getCurrentTime(host).getTime();
|
|
90566
|
+
}
|
|
90426
90567
|
var _a = buildInfo.bundle, js = _a.js, dts = _a.dts, sourceFiles = _a.sourceFiles;
|
|
90427
90568
|
newBuildInfo.bundle.js.sources = js.sources;
|
|
90428
90569
|
if (dts) {
|
|
90429
90570
|
newBuildInfo.bundle.dts.sources = dts.sources;
|
|
90430
90571
|
}
|
|
90431
90572
|
newBuildInfo.bundle.sourceFiles = sourceFiles;
|
|
90432
|
-
outputFiles.push({ name: name, text: getBuildInfoText(newBuildInfo), writeByteOrderMark: writeByteOrderMark });
|
|
90573
|
+
outputFiles.push({ name: name, text: getBuildInfoText(newBuildInfo), writeByteOrderMark: writeByteOrderMark, buildInfo: newBuildInfo });
|
|
90433
90574
|
return;
|
|
90434
90575
|
case declarationFilePath:
|
|
90435
90576
|
if (declarationText === text)
|
|
90436
90577
|
return;
|
|
90578
|
+
changedDtsText = text;
|
|
90579
|
+
changedDtsData = data;
|
|
90437
90580
|
break;
|
|
90438
90581
|
case declarationMapPath:
|
|
90439
90582
|
if (declarationMapText === text)
|
|
@@ -90452,6 +90595,7 @@ var ts;
|
|
|
90452
90595
|
getSourceFileFromReference: ts.returnUndefined,
|
|
90453
90596
|
redirectTargetsMap: ts.createMultiMap(),
|
|
90454
90597
|
getFileIncludeReasons: ts.notImplemented,
|
|
90598
|
+
createHash: createHash,
|
|
90455
90599
|
};
|
|
90456
90600
|
emitFiles(ts.notImplementedResolver, emitHost, undefined, ts.getTransformers(config.options, customTransformers));
|
|
90457
90601
|
return outputFiles;
|
|
@@ -95076,7 +95220,6 @@ var ts;
|
|
|
95076
95220
|
if (system === void 0) { system = ts.sys; }
|
|
95077
95221
|
var existingDirectories = new ts.Map();
|
|
95078
95222
|
var getCanonicalFileName = ts.createGetCanonicalFileName(system.useCaseSensitiveFileNames);
|
|
95079
|
-
var computeHash = ts.maybeBind(system, system.createHash) || ts.generateDjb2Hash;
|
|
95080
95223
|
function getSourceFile(fileName, languageVersionOrOptions, onError) {
|
|
95081
95224
|
var text;
|
|
95082
95225
|
try {
|
|
@@ -95106,7 +95249,7 @@ var ts;
|
|
|
95106
95249
|
function writeFile(fileName, data, writeByteOrderMark, onError) {
|
|
95107
95250
|
try {
|
|
95108
95251
|
ts.performance.mark("beforeIOWrite");
|
|
95109
|
-
ts.writeFileEnsuringDirectories(fileName, data, writeByteOrderMark, function (path, data, writeByteOrderMark) { return
|
|
95252
|
+
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); });
|
|
95110
95253
|
ts.performance.mark("afterIOWrite");
|
|
95111
95254
|
ts.performance.measure("I/O Write", "beforeIOWrite", "afterIOWrite");
|
|
95112
95255
|
}
|
|
@@ -95116,34 +95259,6 @@ var ts;
|
|
|
95116
95259
|
}
|
|
95117
95260
|
}
|
|
95118
95261
|
}
|
|
95119
|
-
var outputFingerprints;
|
|
95120
|
-
function writeFileWorker(fileName, data, writeByteOrderMark) {
|
|
95121
|
-
if (!ts.isWatchSet(options) || !system.getModifiedTime) {
|
|
95122
|
-
system.writeFile(fileName, data, writeByteOrderMark);
|
|
95123
|
-
return;
|
|
95124
|
-
}
|
|
95125
|
-
if (!outputFingerprints) {
|
|
95126
|
-
outputFingerprints = new ts.Map();
|
|
95127
|
-
}
|
|
95128
|
-
var hash = computeHash(data);
|
|
95129
|
-
var mtimeBefore = system.getModifiedTime(fileName);
|
|
95130
|
-
if (mtimeBefore) {
|
|
95131
|
-
var fingerprint = outputFingerprints.get(fileName);
|
|
95132
|
-
if (fingerprint &&
|
|
95133
|
-
fingerprint.byteOrderMark === writeByteOrderMark &&
|
|
95134
|
-
fingerprint.hash === hash &&
|
|
95135
|
-
fingerprint.mtime.getTime() === mtimeBefore.getTime()) {
|
|
95136
|
-
return;
|
|
95137
|
-
}
|
|
95138
|
-
}
|
|
95139
|
-
system.writeFile(fileName, data, writeByteOrderMark);
|
|
95140
|
-
var mtimeAfter = system.getModifiedTime(fileName) || ts.missingFileModifiedTime;
|
|
95141
|
-
outputFingerprints.set(fileName, {
|
|
95142
|
-
hash: hash,
|
|
95143
|
-
byteOrderMark: writeByteOrderMark,
|
|
95144
|
-
mtime: mtimeAfter
|
|
95145
|
-
});
|
|
95146
|
-
}
|
|
95147
95262
|
function getDefaultLibLocation() {
|
|
95148
95263
|
return ts.getDirectoryPath(ts.normalizePath(system.getExecutingFilePath()));
|
|
95149
95264
|
}
|
|
@@ -96485,6 +96600,7 @@ var ts;
|
|
|
96485
96600
|
getSourceFileFromReference: function (file, ref) { return program.getSourceFileFromReference(file, ref); },
|
|
96486
96601
|
redirectTargetsMap: redirectTargetsMap,
|
|
96487
96602
|
getFileIncludeReasons: program.getFileIncludeReasons,
|
|
96603
|
+
createHash: ts.maybeBind(host, host.createHash),
|
|
96488
96604
|
};
|
|
96489
96605
|
}
|
|
96490
96606
|
function writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data) {
|
|
@@ -98391,13 +98507,9 @@ var ts;
|
|
|
98391
98507
|
function createManyToManyPathMap() {
|
|
98392
98508
|
function create(forward, reverse, deleted) {
|
|
98393
98509
|
var map = {
|
|
98394
|
-
clone: function () { return create(new ts.Map(forward), new ts.Map(reverse), deleted && new ts.Set(deleted)); },
|
|
98395
|
-
forEach: function (fn) { return forward.forEach(fn); },
|
|
98396
98510
|
getKeys: function (v) { return reverse.get(v); },
|
|
98397
98511
|
getValues: function (k) { return forward.get(k); },
|
|
98398
|
-
hasKey: function (k) { return forward.has(k); },
|
|
98399
98512
|
keys: function () { return forward.keys(); },
|
|
98400
|
-
deletedKeys: function () { return deleted; },
|
|
98401
98513
|
deleteKey: function (k) {
|
|
98402
98514
|
(deleted || (deleted = new ts.Set())).add(k);
|
|
98403
98515
|
var set = forward.get(k);
|
|
@@ -98424,11 +98536,6 @@ var ts;
|
|
|
98424
98536
|
});
|
|
98425
98537
|
return map;
|
|
98426
98538
|
},
|
|
98427
|
-
clear: function () {
|
|
98428
|
-
forward.clear();
|
|
98429
|
-
reverse.clear();
|
|
98430
|
-
deleted === null || deleted === void 0 ? void 0 : deleted.clear();
|
|
98431
|
-
}
|
|
98432
98539
|
};
|
|
98433
98540
|
return map;
|
|
98434
98541
|
}
|
|
@@ -98532,35 +98639,45 @@ var ts;
|
|
|
98532
98639
|
}
|
|
98533
98640
|
BuilderState.canReuseOldState = canReuseOldState;
|
|
98534
98641
|
function create(newProgram, getCanonicalFileName, oldState, disableUseFileVersionAsSignature) {
|
|
98642
|
+
var _a, _b, _c;
|
|
98535
98643
|
var fileInfos = new ts.Map();
|
|
98536
98644
|
var referencedMap = newProgram.getCompilerOptions().module !== ts.ModuleKind.None ? createManyToManyPathMap() : undefined;
|
|
98537
98645
|
var exportedModulesMap = referencedMap ? createManyToManyPathMap() : undefined;
|
|
98538
|
-
var hasCalledUpdateShapeSignature = new ts.Set();
|
|
98539
98646
|
var useOldState = canReuseOldState(referencedMap, oldState);
|
|
98540
98647
|
newProgram.getTypeChecker();
|
|
98541
|
-
for (var _i = 0,
|
|
98542
|
-
var sourceFile =
|
|
98648
|
+
for (var _i = 0, _d = newProgram.getSourceFiles(); _i < _d.length; _i++) {
|
|
98649
|
+
var sourceFile = _d[_i];
|
|
98543
98650
|
var version_2 = ts.Debug.checkDefined(sourceFile.version, "Program intended to be used with Builder should have source files with versions set");
|
|
98544
|
-
var
|
|
98651
|
+
var oldUncommitedSignature = useOldState ? (_a = oldState.oldSignatures) === null || _a === void 0 ? void 0 : _a.get(sourceFile.resolvedPath) : undefined;
|
|
98652
|
+
var signature = oldUncommitedSignature === undefined ?
|
|
98653
|
+
useOldState ? (_b = oldState.fileInfos.get(sourceFile.resolvedPath)) === null || _b === void 0 ? void 0 : _b.signature : undefined :
|
|
98654
|
+
oldUncommitedSignature || undefined;
|
|
98545
98655
|
if (referencedMap) {
|
|
98546
98656
|
var newReferences = getReferencedFiles(newProgram, sourceFile, getCanonicalFileName);
|
|
98547
98657
|
if (newReferences) {
|
|
98548
98658
|
referencedMap.set(sourceFile.resolvedPath, newReferences);
|
|
98549
98659
|
}
|
|
98550
98660
|
if (useOldState) {
|
|
98551
|
-
var
|
|
98661
|
+
var oldUncommitedExportedModules = (_c = oldState.oldExportedModulesMap) === null || _c === void 0 ? void 0 : _c.get(sourceFile.resolvedPath);
|
|
98662
|
+
var exportedModules = oldUncommitedExportedModules === undefined ?
|
|
98663
|
+
oldState.exportedModulesMap.getValues(sourceFile.resolvedPath) :
|
|
98664
|
+
oldUncommitedExportedModules || undefined;
|
|
98552
98665
|
if (exportedModules) {
|
|
98553
98666
|
exportedModulesMap.set(sourceFile.resolvedPath, exportedModules);
|
|
98554
98667
|
}
|
|
98555
98668
|
}
|
|
98556
98669
|
}
|
|
98557
|
-
fileInfos.set(sourceFile.resolvedPath, {
|
|
98670
|
+
fileInfos.set(sourceFile.resolvedPath, {
|
|
98671
|
+
version: version_2,
|
|
98672
|
+
signature: signature,
|
|
98673
|
+
affectsGlobalScope: isFileAffectingGlobalScope(sourceFile) || undefined,
|
|
98674
|
+
impliedFormat: sourceFile.impliedNodeFormat
|
|
98675
|
+
});
|
|
98558
98676
|
}
|
|
98559
98677
|
return {
|
|
98560
98678
|
fileInfos: fileInfos,
|
|
98561
98679
|
referencedMap: referencedMap,
|
|
98562
98680
|
exportedModulesMap: exportedModulesMap,
|
|
98563
|
-
hasCalledUpdateShapeSignature: hasCalledUpdateShapeSignature,
|
|
98564
98681
|
useFileVersionAsSignature: !disableUseFileVersionAsSignature && !useOldState
|
|
98565
98682
|
};
|
|
98566
98683
|
}
|
|
@@ -98570,52 +98687,36 @@ var ts;
|
|
|
98570
98687
|
state.allFileNames = undefined;
|
|
98571
98688
|
}
|
|
98572
98689
|
BuilderState.releaseCache = releaseCache;
|
|
98573
|
-
function
|
|
98690
|
+
function getFilesAffectedBy(state, programOfThisState, path, cancellationToken, computeHash) {
|
|
98574
98691
|
var _a, _b;
|
|
98575
|
-
|
|
98576
|
-
|
|
98577
|
-
|
|
98578
|
-
|
|
98579
|
-
hasCalledUpdateShapeSignature: new ts.Set(state.hasCalledUpdateShapeSignature),
|
|
98580
|
-
useFileVersionAsSignature: state.useFileVersionAsSignature,
|
|
98581
|
-
};
|
|
98692
|
+
var result = getFilesAffectedByWithOldState(state, programOfThisState, path, cancellationToken, computeHash);
|
|
98693
|
+
(_a = state.oldSignatures) === null || _a === void 0 ? void 0 : _a.clear();
|
|
98694
|
+
(_b = state.oldExportedModulesMap) === null || _b === void 0 ? void 0 : _b.clear();
|
|
98695
|
+
return result;
|
|
98582
98696
|
}
|
|
98583
|
-
BuilderState.
|
|
98584
|
-
function
|
|
98585
|
-
var signatureCache = cacheToUpdateSignature || new ts.Map();
|
|
98697
|
+
BuilderState.getFilesAffectedBy = getFilesAffectedBy;
|
|
98698
|
+
function getFilesAffectedByWithOldState(state, programOfThisState, path, cancellationToken, computeHash) {
|
|
98586
98699
|
var sourceFile = programOfThisState.getSourceFileByPath(path);
|
|
98587
98700
|
if (!sourceFile) {
|
|
98588
98701
|
return ts.emptyArray;
|
|
98589
98702
|
}
|
|
98590
|
-
if (!updateShapeSignature(state, programOfThisState, sourceFile,
|
|
98703
|
+
if (!updateShapeSignature(state, programOfThisState, sourceFile, cancellationToken, computeHash)) {
|
|
98591
98704
|
return [sourceFile];
|
|
98592
98705
|
}
|
|
98593
|
-
|
|
98594
|
-
if (!cacheToUpdateSignature) {
|
|
98595
|
-
updateSignaturesFromCache(state, signatureCache);
|
|
98596
|
-
}
|
|
98597
|
-
return result;
|
|
98598
|
-
}
|
|
98599
|
-
BuilderState.getFilesAffectedBy = getFilesAffectedBy;
|
|
98600
|
-
function updateSignaturesFromCache(state, signatureCache) {
|
|
98601
|
-
signatureCache.forEach(function (signature, path) { return updateSignatureOfFile(state, signature, path); });
|
|
98706
|
+
return (state.referencedMap ? getFilesAffectedByUpdatedShapeWhenModuleEmit : getFilesAffectedByUpdatedShapeWhenNonModuleEmit)(state, programOfThisState, sourceFile, cancellationToken, computeHash);
|
|
98602
98707
|
}
|
|
98603
|
-
BuilderState.
|
|
98708
|
+
BuilderState.getFilesAffectedByWithOldState = getFilesAffectedByWithOldState;
|
|
98604
98709
|
function updateSignatureOfFile(state, signature, path) {
|
|
98605
98710
|
state.fileInfos.get(path).signature = signature;
|
|
98606
|
-
state.hasCalledUpdateShapeSignature.add(path);
|
|
98711
|
+
(state.hasCalledUpdateShapeSignature || (state.hasCalledUpdateShapeSignature = new ts.Set())).add(path);
|
|
98607
98712
|
}
|
|
98608
98713
|
BuilderState.updateSignatureOfFile = updateSignatureOfFile;
|
|
98609
|
-
function updateShapeSignature(state, programOfThisState, sourceFile,
|
|
98714
|
+
function updateShapeSignature(state, programOfThisState, sourceFile, cancellationToken, computeHash, useFileVersionAsSignature) {
|
|
98715
|
+
var _a;
|
|
98610
98716
|
if (useFileVersionAsSignature === void 0) { useFileVersionAsSignature = state.useFileVersionAsSignature; }
|
|
98611
|
-
|
|
98612
|
-
ts.Debug.assert(!exportedModulesMapCache || !!state.exportedModulesMap, "Compute visible to outside map only if visibleToOutsideReferencedMap present in the state");
|
|
98613
|
-
if (state.hasCalledUpdateShapeSignature.has(sourceFile.resolvedPath) || cacheToUpdateSignature.has(sourceFile.resolvedPath)) {
|
|
98717
|
+
if ((_a = state.hasCalledUpdateShapeSignature) === null || _a === void 0 ? void 0 : _a.has(sourceFile.resolvedPath))
|
|
98614
98718
|
return false;
|
|
98615
|
-
}
|
|
98616
98719
|
var info = state.fileInfos.get(sourceFile.resolvedPath);
|
|
98617
|
-
if (!info)
|
|
98618
|
-
return ts.Debug.fail();
|
|
98619
98720
|
var prevSignature = info.signature;
|
|
98620
98721
|
var latestSignature;
|
|
98621
98722
|
if (!sourceFile.isDeclarationFile && !useFileVersionAsSignature) {
|
|
@@ -98623,40 +98724,50 @@ var ts;
|
|
|
98623
98724
|
var firstDts_1 = ts.firstOrUndefined(emitOutput_1.outputFiles);
|
|
98624
98725
|
if (firstDts_1) {
|
|
98625
98726
|
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; })); });
|
|
98626
|
-
latestSignature = (
|
|
98627
|
-
if (
|
|
98628
|
-
updateExportedModules(sourceFile, emitOutput_1.exportedModulesFromDeclarationEmit
|
|
98727
|
+
latestSignature = computeSignature(firstDts_1.text, computeHash);
|
|
98728
|
+
if (latestSignature !== prevSignature) {
|
|
98729
|
+
updateExportedModules(state, sourceFile, emitOutput_1.exportedModulesFromDeclarationEmit);
|
|
98629
98730
|
}
|
|
98630
98731
|
}
|
|
98631
98732
|
}
|
|
98632
98733
|
if (latestSignature === undefined) {
|
|
98633
98734
|
latestSignature = sourceFile.version;
|
|
98634
|
-
if (
|
|
98735
|
+
if (state.exportedModulesMap && latestSignature !== prevSignature) {
|
|
98736
|
+
(state.oldExportedModulesMap || (state.oldExportedModulesMap = new ts.Map())).set(sourceFile.resolvedPath, state.exportedModulesMap.getValues(sourceFile.resolvedPath) || false);
|
|
98635
98737
|
var references = state.referencedMap ? state.referencedMap.getValues(sourceFile.resolvedPath) : undefined;
|
|
98636
98738
|
if (references) {
|
|
98637
|
-
|
|
98739
|
+
state.exportedModulesMap.set(sourceFile.resolvedPath, references);
|
|
98638
98740
|
}
|
|
98639
98741
|
else {
|
|
98640
|
-
|
|
98742
|
+
state.exportedModulesMap.deleteKey(sourceFile.resolvedPath);
|
|
98641
98743
|
}
|
|
98642
98744
|
}
|
|
98643
98745
|
}
|
|
98644
|
-
|
|
98746
|
+
(state.oldSignatures || (state.oldSignatures = new ts.Map())).set(sourceFile.resolvedPath, prevSignature || false);
|
|
98747
|
+
(state.hasCalledUpdateShapeSignature || (state.hasCalledUpdateShapeSignature = new ts.Set())).add(sourceFile.resolvedPath);
|
|
98748
|
+
info.signature = latestSignature;
|
|
98645
98749
|
return latestSignature !== prevSignature;
|
|
98646
98750
|
}
|
|
98647
98751
|
BuilderState.updateShapeSignature = updateShapeSignature;
|
|
98648
|
-
function
|
|
98752
|
+
function computeSignature(text, computeHash) {
|
|
98753
|
+
return (computeHash || ts.generateDjb2Hash)(text);
|
|
98754
|
+
}
|
|
98755
|
+
BuilderState.computeSignature = computeSignature;
|
|
98756
|
+
function updateExportedModules(state, sourceFile, exportedModulesFromDeclarationEmit) {
|
|
98757
|
+
if (!state.exportedModulesMap)
|
|
98758
|
+
return;
|
|
98759
|
+
(state.oldExportedModulesMap || (state.oldExportedModulesMap = new ts.Map())).set(sourceFile.resolvedPath, state.exportedModulesMap.getValues(sourceFile.resolvedPath) || false);
|
|
98649
98760
|
if (!exportedModulesFromDeclarationEmit) {
|
|
98650
|
-
|
|
98761
|
+
state.exportedModulesMap.deleteKey(sourceFile.resolvedPath);
|
|
98651
98762
|
return;
|
|
98652
98763
|
}
|
|
98653
98764
|
var exportedModules;
|
|
98654
98765
|
exportedModulesFromDeclarationEmit.forEach(function (symbol) { return addExportedModule(getReferencedFilesFromImportedModuleSymbol(symbol)); });
|
|
98655
98766
|
if (exportedModules) {
|
|
98656
|
-
|
|
98767
|
+
state.exportedModulesMap.set(sourceFile.resolvedPath, exportedModules);
|
|
98657
98768
|
}
|
|
98658
98769
|
else {
|
|
98659
|
-
|
|
98770
|
+
state.exportedModulesMap.deleteKey(sourceFile.resolvedPath);
|
|
98660
98771
|
}
|
|
98661
98772
|
function addExportedModule(exportedModulePaths) {
|
|
98662
98773
|
if (exportedModulePaths === null || exportedModulePaths === void 0 ? void 0 : exportedModulePaths.length) {
|
|
@@ -98668,15 +98779,6 @@ var ts;
|
|
|
98668
98779
|
}
|
|
98669
98780
|
}
|
|
98670
98781
|
BuilderState.updateExportedModules = updateExportedModules;
|
|
98671
|
-
function updateExportedFilesMapFromCache(state, exportedModulesMapCache) {
|
|
98672
|
-
var _a;
|
|
98673
|
-
if (exportedModulesMapCache) {
|
|
98674
|
-
ts.Debug.assert(!!state.exportedModulesMap);
|
|
98675
|
-
(_a = exportedModulesMapCache.deletedKeys()) === null || _a === void 0 ? void 0 : _a.forEach(function (path) { return state.exportedModulesMap.deleteKey(path); });
|
|
98676
|
-
exportedModulesMapCache.forEach(function (exportedModules, path) { return state.exportedModulesMap.set(path, exportedModules); });
|
|
98677
|
-
}
|
|
98678
|
-
}
|
|
98679
|
-
BuilderState.updateExportedFilesMapFromCache = updateExportedFilesMapFromCache;
|
|
98680
98782
|
function getAllDependencies(state, programOfThisState, sourceFile) {
|
|
98681
98783
|
var compilerOptions = programOfThisState.getCompilerOptions();
|
|
98682
98784
|
if (ts.outFile(compilerOptions)) {
|
|
@@ -98760,7 +98862,7 @@ var ts;
|
|
|
98760
98862
|
}
|
|
98761
98863
|
return getAllFilesExcludingDefaultLibraryFile(state, programOfThisState, sourceFileWithUpdatedShape);
|
|
98762
98864
|
}
|
|
98763
|
-
function getFilesAffectedByUpdatedShapeWhenModuleEmit(state, programOfThisState, sourceFileWithUpdatedShape,
|
|
98865
|
+
function getFilesAffectedByUpdatedShapeWhenModuleEmit(state, programOfThisState, sourceFileWithUpdatedShape, cancellationToken, computeHash) {
|
|
98764
98866
|
if (isFileAffectingGlobalScope(sourceFileWithUpdatedShape)) {
|
|
98765
98867
|
return getAllFilesExcludingDefaultLibraryFile(state, programOfThisState, sourceFileWithUpdatedShape);
|
|
98766
98868
|
}
|
|
@@ -98776,7 +98878,7 @@ var ts;
|
|
|
98776
98878
|
if (!seenFileNamesMap.has(currentPath)) {
|
|
98777
98879
|
var currentSourceFile = programOfThisState.getSourceFileByPath(currentPath);
|
|
98778
98880
|
seenFileNamesMap.set(currentPath, currentSourceFile);
|
|
98779
|
-
if (currentSourceFile && updateShapeSignature(state, programOfThisState, currentSourceFile,
|
|
98881
|
+
if (currentSourceFile && updateShapeSignature(state, programOfThisState, currentSourceFile, cancellationToken, computeHash)) {
|
|
98780
98882
|
queue.push.apply(queue, getReferencedByPaths(state, currentSourceFile.resolvedPath));
|
|
98781
98883
|
}
|
|
98782
98884
|
}
|
|
@@ -98791,29 +98893,31 @@ var ts;
|
|
|
98791
98893
|
return map1 === map2 || map1 !== undefined && map2 !== undefined && map1.size === map2.size && !ts.forEachKey(map1, function (key) { return !map2.has(key); });
|
|
98792
98894
|
}
|
|
98793
98895
|
function createBuilderProgramState(newProgram, getCanonicalFileName, oldState, disableUseFileVersionAsSignature) {
|
|
98896
|
+
var _a, _b;
|
|
98794
98897
|
var state = ts.BuilderState.create(newProgram, getCanonicalFileName, oldState, disableUseFileVersionAsSignature);
|
|
98795
98898
|
state.program = newProgram;
|
|
98796
98899
|
var compilerOptions = newProgram.getCompilerOptions();
|
|
98797
98900
|
state.compilerOptions = compilerOptions;
|
|
98798
|
-
|
|
98901
|
+
var outFilePath = ts.outFile(compilerOptions);
|
|
98902
|
+
if (!outFilePath) {
|
|
98799
98903
|
state.semanticDiagnosticsPerFile = new ts.Map();
|
|
98800
98904
|
}
|
|
98905
|
+
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)) {
|
|
98906
|
+
state.outSignature = oldState === null || oldState === void 0 ? void 0 : oldState.outSignature;
|
|
98907
|
+
}
|
|
98801
98908
|
state.changedFilesSet = new ts.Set();
|
|
98909
|
+
state.dtsChangeTime = compilerOptions.composite ? oldState === null || oldState === void 0 ? void 0 : oldState.dtsChangeTime : undefined;
|
|
98802
98910
|
var useOldState = ts.BuilderState.canReuseOldState(state.referencedMap, oldState);
|
|
98803
98911
|
var oldCompilerOptions = useOldState ? oldState.compilerOptions : undefined;
|
|
98804
98912
|
var canCopySemanticDiagnostics = useOldState && oldState.semanticDiagnosticsPerFile && !!state.semanticDiagnosticsPerFile &&
|
|
98805
98913
|
!ts.compilerOptionsAffectSemanticDiagnostics(compilerOptions, oldCompilerOptions);
|
|
98914
|
+
var canCopyEmitSignatures = compilerOptions.composite &&
|
|
98915
|
+
(oldState === null || oldState === void 0 ? void 0 : oldState.emitSignatures) &&
|
|
98916
|
+
!outFilePath &&
|
|
98917
|
+
!ts.compilerOptionsAffectDeclarationPath(compilerOptions, oldCompilerOptions);
|
|
98806
98918
|
if (useOldState) {
|
|
98807
|
-
|
|
98808
|
-
|
|
98809
|
-
ts.Debug.assert(!oldState.affectedFiles && (!affectedSignatures || !affectedSignatures.size), "Cannot reuse if only few affected files of currentChangedFile were iterated");
|
|
98810
|
-
}
|
|
98811
|
-
var changedFilesSet = oldState.changedFilesSet;
|
|
98812
|
-
if (canCopySemanticDiagnostics) {
|
|
98813
|
-
ts.Debug.assert(!changedFilesSet || !ts.forEachKey(changedFilesSet, function (path) { return oldState.semanticDiagnosticsPerFile.has(path); }), "Semantic diagnostics shouldnt be available for changed files");
|
|
98814
|
-
}
|
|
98815
|
-
changedFilesSet === null || changedFilesSet === void 0 ? void 0 : changedFilesSet.forEach(function (value) { return state.changedFilesSet.add(value); });
|
|
98816
|
-
if (!ts.outFile(compilerOptions) && oldState.affectedFilesPendingEmit) {
|
|
98919
|
+
(_a = oldState.changedFilesSet) === null || _a === void 0 ? void 0 : _a.forEach(function (value) { return state.changedFilesSet.add(value); });
|
|
98920
|
+
if (!outFilePath && oldState.affectedFilesPendingEmit) {
|
|
98817
98921
|
state.affectedFilesPendingEmit = oldState.affectedFilesPendingEmit.slice();
|
|
98818
98922
|
state.affectedFilesPendingEmitKind = oldState.affectedFilesPendingEmitKind && new ts.Map(oldState.affectedFilesPendingEmitKind);
|
|
98819
98923
|
state.affectedFilesPendingEmitIndex = oldState.affectedFilesPendingEmitIndex;
|
|
@@ -98830,6 +98934,7 @@ var ts;
|
|
|
98830
98934
|
if (!useOldState ||
|
|
98831
98935
|
!(oldInfo = oldState.fileInfos.get(sourceFilePath)) ||
|
|
98832
98936
|
oldInfo.version !== info.version ||
|
|
98937
|
+
oldInfo.impliedFormat !== info.impliedFormat ||
|
|
98833
98938
|
!hasSameKeys(newReferences = referencedMap && referencedMap.getValues(sourceFilePath), oldReferencedMap && oldReferencedMap.getValues(sourceFilePath)) ||
|
|
98834
98939
|
newReferences && ts.forEachKey(newReferences, function (path) { return !state.fileInfos.has(path) && oldState.fileInfos.has(path); })) {
|
|
98835
98940
|
state.changedFilesSet.add(sourceFilePath);
|
|
@@ -98849,24 +98954,22 @@ var ts;
|
|
|
98849
98954
|
state.semanticDiagnosticsFromOldState.add(sourceFilePath);
|
|
98850
98955
|
}
|
|
98851
98956
|
}
|
|
98957
|
+
if (canCopyEmitSignatures) {
|
|
98958
|
+
var oldEmitSignature = oldState.emitSignatures.get(sourceFilePath);
|
|
98959
|
+
if (oldEmitSignature)
|
|
98960
|
+
(state.emitSignatures || (state.emitSignatures = new ts.Map())).set(sourceFilePath, oldEmitSignature);
|
|
98961
|
+
}
|
|
98852
98962
|
});
|
|
98853
98963
|
if (useOldState && ts.forEachEntry(oldState.fileInfos, function (info, sourceFilePath) { return info.affectsGlobalScope && !state.fileInfos.has(sourceFilePath); })) {
|
|
98854
98964
|
ts.BuilderState.getAllFilesExcludingDefaultLibraryFile(state, newProgram, undefined)
|
|
98855
98965
|
.forEach(function (file) { return state.changedFilesSet.add(file.resolvedPath); });
|
|
98856
98966
|
}
|
|
98857
|
-
else if (oldCompilerOptions && !
|
|
98967
|
+
else if (oldCompilerOptions && !outFilePath && ts.compilerOptionsAffectEmit(compilerOptions, oldCompilerOptions)) {
|
|
98858
98968
|
newProgram.getSourceFiles().forEach(function (f) { return addToAffectedFilesPendingEmit(state, f.resolvedPath, 1); });
|
|
98859
98969
|
ts.Debug.assert(!state.seenAffectedFiles || !state.seenAffectedFiles.size);
|
|
98860
98970
|
state.seenAffectedFiles = state.seenAffectedFiles || new ts.Set();
|
|
98861
98971
|
}
|
|
98862
|
-
|
|
98863
|
-
ts.forEachEntry(oldState.fileInfos, function (info, sourceFilePath) {
|
|
98864
|
-
if (state.fileInfos.has(sourceFilePath) && state.fileInfos.get(sourceFilePath).impliedFormat !== info.impliedFormat) {
|
|
98865
|
-
state.changedFilesSet.add(sourceFilePath);
|
|
98866
|
-
}
|
|
98867
|
-
});
|
|
98868
|
-
}
|
|
98869
|
-
state.buildInfoEmitPending = !!state.changedFilesSet.size;
|
|
98972
|
+
state.buildInfoEmitPending = !useOldState || state.changedFilesSet.size !== (((_b = oldState.changedFilesSet) === null || _b === void 0 ? void 0 : _b.size) || 0);
|
|
98870
98973
|
return state;
|
|
98871
98974
|
}
|
|
98872
98975
|
function convertToDiagnostics(diagnostics, newProgram, getCanonicalFileName) {
|
|
@@ -98899,33 +99002,40 @@ var ts;
|
|
|
98899
99002
|
ts.BuilderState.releaseCache(state);
|
|
98900
99003
|
state.program = undefined;
|
|
98901
99004
|
}
|
|
98902
|
-
function
|
|
98903
|
-
var
|
|
98904
|
-
|
|
98905
|
-
|
|
98906
|
-
|
|
98907
|
-
|
|
98908
|
-
|
|
98909
|
-
|
|
98910
|
-
|
|
98911
|
-
|
|
98912
|
-
|
|
98913
|
-
|
|
98914
|
-
|
|
98915
|
-
|
|
98916
|
-
|
|
98917
|
-
|
|
98918
|
-
|
|
98919
|
-
|
|
98920
|
-
|
|
98921
|
-
|
|
98922
|
-
|
|
99005
|
+
function backupEmitBuilderProgramState(state) {
|
|
99006
|
+
var outFilePath = ts.outFile(state.compilerOptions);
|
|
99007
|
+
ts.Debug.assert(!state.changedFilesSet.size || outFilePath);
|
|
99008
|
+
return {
|
|
99009
|
+
affectedFilesPendingEmit: state.affectedFilesPendingEmit && state.affectedFilesPendingEmit.slice(),
|
|
99010
|
+
affectedFilesPendingEmitKind: state.affectedFilesPendingEmitKind && new ts.Map(state.affectedFilesPendingEmitKind),
|
|
99011
|
+
affectedFilesPendingEmitIndex: state.affectedFilesPendingEmitIndex,
|
|
99012
|
+
seenEmittedFiles: state.seenEmittedFiles && new ts.Map(state.seenEmittedFiles),
|
|
99013
|
+
programEmitComplete: state.programEmitComplete,
|
|
99014
|
+
emitSignatures: state.emitSignatures && new ts.Map(state.emitSignatures),
|
|
99015
|
+
outSignature: state.outSignature,
|
|
99016
|
+
dtsChangeTime: state.dtsChangeTime,
|
|
99017
|
+
hasChangedEmitSignature: state.hasChangedEmitSignature,
|
|
99018
|
+
changedFilesSet: outFilePath ? new ts.Set(state.changedFilesSet) : undefined,
|
|
99019
|
+
};
|
|
99020
|
+
}
|
|
99021
|
+
function restoreEmitBuilderProgramState(state, backupEmitState) {
|
|
99022
|
+
state.affectedFilesPendingEmit = backupEmitState.affectedFilesPendingEmit;
|
|
99023
|
+
state.affectedFilesPendingEmitKind = backupEmitState.affectedFilesPendingEmitKind;
|
|
99024
|
+
state.affectedFilesPendingEmitIndex = backupEmitState.affectedFilesPendingEmitIndex;
|
|
99025
|
+
state.seenEmittedFiles = backupEmitState.seenEmittedFiles;
|
|
99026
|
+
state.programEmitComplete = backupEmitState.programEmitComplete;
|
|
99027
|
+
state.emitSignatures = backupEmitState.emitSignatures;
|
|
99028
|
+
state.outSignature = backupEmitState.outSignature;
|
|
99029
|
+
state.dtsChangeTime = backupEmitState.dtsChangeTime;
|
|
99030
|
+
state.hasChangedEmitSignature = backupEmitState.hasChangedEmitSignature;
|
|
99031
|
+
if (backupEmitState.changedFilesSet)
|
|
99032
|
+
state.changedFilesSet = backupEmitState.changedFilesSet;
|
|
98923
99033
|
}
|
|
98924
99034
|
function assertSourceFileOkWithoutNextAffectedCall(state, sourceFile) {
|
|
98925
99035
|
ts.Debug.assert(!sourceFile || !state.affectedFiles || state.affectedFiles[state.affectedFilesIndex - 1] !== sourceFile || !state.semanticDiagnosticsPerFile.has(sourceFile.resolvedPath));
|
|
98926
99036
|
}
|
|
98927
99037
|
function getNextAffectedFile(state, cancellationToken, computeHash, host) {
|
|
98928
|
-
var _a;
|
|
99038
|
+
var _a, _b;
|
|
98929
99039
|
while (true) {
|
|
98930
99040
|
var affectedFiles = state.affectedFiles;
|
|
98931
99041
|
if (affectedFiles) {
|
|
@@ -98942,10 +99052,8 @@ var ts;
|
|
|
98942
99052
|
}
|
|
98943
99053
|
state.changedFilesSet.delete(state.currentChangedFilePath);
|
|
98944
99054
|
state.currentChangedFilePath = undefined;
|
|
98945
|
-
|
|
98946
|
-
state.
|
|
98947
|
-
ts.BuilderState.updateExportedFilesMapFromCache(state, state.currentAffectedFilesExportedModulesMap);
|
|
98948
|
-
(_a = state.currentAffectedFilesExportedModulesMap) === null || _a === void 0 ? void 0 : _a.clear();
|
|
99055
|
+
(_a = state.oldSignatures) === null || _a === void 0 ? void 0 : _a.clear();
|
|
99056
|
+
(_b = state.oldExportedModulesMap) === null || _b === void 0 ? void 0 : _b.clear();
|
|
98949
99057
|
state.affectedFiles = undefined;
|
|
98950
99058
|
}
|
|
98951
99059
|
var nextKey = state.changedFilesSet.keys().next();
|
|
@@ -98958,12 +99066,7 @@ var ts;
|
|
|
98958
99066
|
ts.Debug.assert(!state.semanticDiagnosticsPerFile);
|
|
98959
99067
|
return program;
|
|
98960
99068
|
}
|
|
98961
|
-
|
|
98962
|
-
state.currentAffectedFilesSignatures = new ts.Map();
|
|
98963
|
-
if (state.exportedModulesMap) {
|
|
98964
|
-
state.currentAffectedFilesExportedModulesMap || (state.currentAffectedFilesExportedModulesMap = ts.BuilderState.createManyToManyPathMap());
|
|
98965
|
-
}
|
|
98966
|
-
state.affectedFiles = ts.BuilderState.getFilesAffectedBy(state, program, nextKey.value, cancellationToken, computeHash, state.currentAffectedFilesSignatures, state.currentAffectedFilesExportedModulesMap);
|
|
99069
|
+
state.affectedFiles = ts.BuilderState.getFilesAffectedByWithOldState(state, program, nextKey.value, cancellationToken, computeHash);
|
|
98967
99070
|
state.currentChangedFilePath = nextKey.value;
|
|
98968
99071
|
state.affectedFilesIndex = 0;
|
|
98969
99072
|
if (!state.seenAffectedFiles)
|
|
@@ -99007,14 +99110,12 @@ var ts;
|
|
|
99007
99110
|
}
|
|
99008
99111
|
}
|
|
99009
99112
|
function handleDtsMayChangeOfAffectedFile(state, affectedFile, cancellationToken, computeHash, host) {
|
|
99010
|
-
var _a;
|
|
99011
99113
|
removeSemanticDiagnosticsOf(state, affectedFile.resolvedPath);
|
|
99012
99114
|
if (state.allFilesExcludingDefaultLibraryFile === state.affectedFiles) {
|
|
99013
99115
|
removeDiagnosticsOfLibraryFiles(state);
|
|
99014
|
-
ts.BuilderState.updateShapeSignature(state, ts.Debug.checkDefined(state.program), affectedFile,
|
|
99116
|
+
ts.BuilderState.updateShapeSignature(state, ts.Debug.checkDefined(state.program), affectedFile, cancellationToken, computeHash);
|
|
99015
99117
|
return;
|
|
99016
99118
|
}
|
|
99017
|
-
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);
|
|
99018
99119
|
if (state.compilerOptions.assumeChangesOnlyAffectDirectDependencies)
|
|
99019
99120
|
return;
|
|
99020
99121
|
handleDtsMayChangeOfReferencingExportOfAffectedFile(state, affectedFile, cancellationToken, computeHash, host);
|
|
@@ -99025,7 +99126,7 @@ var ts;
|
|
|
99025
99126
|
var program = ts.Debug.checkDefined(state.program);
|
|
99026
99127
|
var sourceFile = program.getSourceFileByPath(path);
|
|
99027
99128
|
if (sourceFile) {
|
|
99028
|
-
ts.BuilderState.updateShapeSignature(state, program, sourceFile,
|
|
99129
|
+
ts.BuilderState.updateShapeSignature(state, program, sourceFile, cancellationToken, computeHash, !host.disableUseFileVersionAsSignature);
|
|
99029
99130
|
if (ts.getEmitDeclarations(state.compilerOptions)) {
|
|
99030
99131
|
addToAffectedFilesPendingEmit(state, path, 0);
|
|
99031
99132
|
}
|
|
@@ -99041,24 +99142,10 @@ var ts;
|
|
|
99041
99142
|
return !state.semanticDiagnosticsFromOldState.size;
|
|
99042
99143
|
}
|
|
99043
99144
|
function isChangedSignature(state, path) {
|
|
99044
|
-
var
|
|
99045
|
-
var
|
|
99145
|
+
var oldSignature = ts.Debug.checkDefined(state.oldSignatures).get(path) || undefined;
|
|
99146
|
+
var newSignature = ts.Debug.checkDefined(state.fileInfos.get(path)).signature;
|
|
99046
99147
|
return newSignature !== oldSignature;
|
|
99047
99148
|
}
|
|
99048
|
-
function forEachKeyOfExportedModulesMap(state, filePath, fn) {
|
|
99049
|
-
var keys = state.currentAffectedFilesExportedModulesMap.getKeys(filePath);
|
|
99050
|
-
var result = keys && ts.forEachKey(keys, fn);
|
|
99051
|
-
if (result)
|
|
99052
|
-
return result;
|
|
99053
|
-
keys = state.exportedModulesMap.getKeys(filePath);
|
|
99054
|
-
return keys && ts.forEachKey(keys, function (exportedFromPath) {
|
|
99055
|
-
var _a;
|
|
99056
|
-
return !state.currentAffectedFilesExportedModulesMap.hasKey(exportedFromPath) &&
|
|
99057
|
-
!((_a = state.currentAffectedFilesExportedModulesMap.deletedKeys()) === null || _a === void 0 ? void 0 : _a.has(exportedFromPath)) ?
|
|
99058
|
-
fn(exportedFromPath) :
|
|
99059
|
-
undefined;
|
|
99060
|
-
});
|
|
99061
|
-
}
|
|
99062
99149
|
function handleDtsMayChangeOfGlobalScope(state, filePath, cancellationToken, computeHash, host) {
|
|
99063
99150
|
var _a;
|
|
99064
99151
|
if (!((_a = state.fileInfos.get(filePath)) === null || _a === void 0 ? void 0 : _a.affectsGlobalScope))
|
|
@@ -99069,6 +99156,7 @@ var ts;
|
|
|
99069
99156
|
return true;
|
|
99070
99157
|
}
|
|
99071
99158
|
function handleDtsMayChangeOfReferencingExportOfAffectedFile(state, affectedFile, cancellationToken, computeHash, host) {
|
|
99159
|
+
var _a;
|
|
99072
99160
|
if (!state.exportedModulesMap || !state.changedFilesSet.has(affectedFile.resolvedPath))
|
|
99073
99161
|
return;
|
|
99074
99162
|
if (!isChangedSignature(state, affectedFile.resolvedPath))
|
|
@@ -99091,9 +99179,8 @@ var ts;
|
|
|
99091
99179
|
}
|
|
99092
99180
|
}
|
|
99093
99181
|
}
|
|
99094
|
-
ts.Debug.assert(!!state.currentAffectedFilesExportedModulesMap);
|
|
99095
99182
|
var seenFileAndExportsOfFile = new ts.Set();
|
|
99096
|
-
|
|
99183
|
+
(_a = state.exportedModulesMap.getKeys(affectedFile.resolvedPath)) === null || _a === void 0 ? void 0 : _a.forEach(function (exportedFromPath) {
|
|
99097
99184
|
if (handleDtsMayChangeOfGlobalScope(state, exportedFromPath, cancellationToken, computeHash, host))
|
|
99098
99185
|
return true;
|
|
99099
99186
|
var references = state.referencedMap.getKeys(exportedFromPath);
|
|
@@ -99103,17 +99190,16 @@ var ts;
|
|
|
99103
99190
|
});
|
|
99104
99191
|
}
|
|
99105
99192
|
function handleDtsMayChangeOfFileAndExportsOfFile(state, filePath, seenFileAndExportsOfFile, cancellationToken, computeHash, host) {
|
|
99106
|
-
var _a;
|
|
99193
|
+
var _a, _b;
|
|
99107
99194
|
if (!ts.tryAddToSet(seenFileAndExportsOfFile, filePath))
|
|
99108
99195
|
return undefined;
|
|
99109
99196
|
if (handleDtsMayChangeOfGlobalScope(state, filePath, cancellationToken, computeHash, host))
|
|
99110
99197
|
return true;
|
|
99111
99198
|
handleDtsMayChangeOf(state, filePath, cancellationToken, computeHash, host);
|
|
99112
|
-
|
|
99113
|
-
forEachKeyOfExportedModulesMap(state, filePath, function (exportedFromPath) {
|
|
99199
|
+
(_a = state.exportedModulesMap.getKeys(filePath)) === null || _a === void 0 ? void 0 : _a.forEach(function (exportedFromPath) {
|
|
99114
99200
|
return handleDtsMayChangeOfFileAndExportsOfFile(state, exportedFromPath, seenFileAndExportsOfFile, cancellationToken, computeHash, host);
|
|
99115
99201
|
});
|
|
99116
|
-
(
|
|
99202
|
+
(_b = state.referencedMap.getKeys(filePath)) === null || _b === void 0 ? void 0 : _b.forEach(function (referencingFilePath) {
|
|
99117
99203
|
return !seenFileAndExportsOfFile.has(referencingFilePath) &&
|
|
99118
99204
|
handleDtsMayChangeOf(state, referencingFilePath, cancellationToken, computeHash, host);
|
|
99119
99205
|
});
|
|
@@ -99129,12 +99215,12 @@ var ts;
|
|
|
99129
99215
|
}
|
|
99130
99216
|
else {
|
|
99131
99217
|
state.seenAffectedFiles.add(affected.resolvedPath);
|
|
99218
|
+
state.buildInfoEmitPending = true;
|
|
99132
99219
|
if (emitKind !== undefined) {
|
|
99133
99220
|
(state.seenEmittedFiles || (state.seenEmittedFiles = new ts.Map())).set(affected.resolvedPath, emitKind);
|
|
99134
99221
|
}
|
|
99135
99222
|
if (isPendingEmit) {
|
|
99136
99223
|
state.affectedFilesPendingEmitIndex++;
|
|
99137
|
-
state.buildInfoEmitPending = true;
|
|
99138
99224
|
}
|
|
99139
99225
|
else {
|
|
99140
99226
|
state.affectedFilesIndex++;
|
|
@@ -99166,29 +99252,50 @@ var ts;
|
|
|
99166
99252
|
}
|
|
99167
99253
|
return ts.filterSemanticDiagnostics(diagnostics, state.compilerOptions);
|
|
99168
99254
|
}
|
|
99169
|
-
function getProgramBuildInfo(state, getCanonicalFileName) {
|
|
99170
|
-
|
|
99171
|
-
|
|
99255
|
+
function getProgramBuildInfo(state, getCanonicalFileName, host) {
|
|
99256
|
+
var outFilePath = ts.outFile(state.compilerOptions);
|
|
99257
|
+
if (outFilePath && !state.compilerOptions.composite)
|
|
99258
|
+
return;
|
|
99172
99259
|
var currentDirectory = ts.Debug.checkDefined(state.program).getCurrentDirectory();
|
|
99173
99260
|
var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(ts.getTsBuildInfoEmitOutputFilePath(state.compilerOptions), currentDirectory));
|
|
99261
|
+
state.dtsChangeTime = state.hasChangedEmitSignature ? ts.getCurrentTime(host).getTime() : state.dtsChangeTime;
|
|
99262
|
+
if (outFilePath) {
|
|
99263
|
+
var result_15 = {
|
|
99264
|
+
options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions, "affectsBundleEmitBuildInfo"),
|
|
99265
|
+
outSignature: state.outSignature,
|
|
99266
|
+
dtsChangeTime: state.dtsChangeTime,
|
|
99267
|
+
};
|
|
99268
|
+
return result_15;
|
|
99269
|
+
}
|
|
99174
99270
|
var fileNames = [];
|
|
99175
99271
|
var fileNameToFileId = new ts.Map();
|
|
99176
99272
|
var fileIdsList;
|
|
99177
99273
|
var fileNamesToFileIdListId;
|
|
99274
|
+
var emitSignatures;
|
|
99178
99275
|
var fileInfos = ts.arrayFrom(state.fileInfos.entries(), function (_a) {
|
|
99276
|
+
var _b, _c;
|
|
99179
99277
|
var key = _a[0], value = _a[1];
|
|
99180
99278
|
var fileId = toFileId(key);
|
|
99181
99279
|
ts.Debug.assert(fileNames[fileId - 1] === relativeToBuildInfo(key));
|
|
99182
|
-
var
|
|
99183
|
-
var actualSignature =
|
|
99280
|
+
var oldSignature = (_b = state.oldSignatures) === null || _b === void 0 ? void 0 : _b.get(key);
|
|
99281
|
+
var actualSignature = oldSignature !== undefined ? oldSignature || undefined : value.signature;
|
|
99282
|
+
if (state.compilerOptions.composite) {
|
|
99283
|
+
var file = state.program.getSourceFileByPath(key);
|
|
99284
|
+
if (!ts.isJsonSourceFile(file) && ts.sourceFileMayBeEmitted(file, state.program)) {
|
|
99285
|
+
var emitSignature = (_c = state.emitSignatures) === null || _c === void 0 ? void 0 : _c.get(key);
|
|
99286
|
+
if (emitSignature !== actualSignature) {
|
|
99287
|
+
(emitSignatures || (emitSignatures = [])).push(emitSignature === undefined ? fileId : [fileId, emitSignature]);
|
|
99288
|
+
}
|
|
99289
|
+
}
|
|
99290
|
+
}
|
|
99184
99291
|
return value.version === actualSignature ?
|
|
99185
99292
|
value.affectsGlobalScope || value.impliedFormat ?
|
|
99186
99293
|
{ version: value.version, signature: undefined, affectsGlobalScope: value.affectsGlobalScope, impliedFormat: value.impliedFormat } :
|
|
99187
99294
|
value.version :
|
|
99188
99295
|
actualSignature !== undefined ?
|
|
99189
|
-
|
|
99296
|
+
oldSignature === undefined ?
|
|
99190
99297
|
value :
|
|
99191
|
-
{ version: value.version, signature:
|
|
99298
|
+
{ version: value.version, signature: actualSignature, affectsGlobalScope: value.affectsGlobalScope, impliedFormat: value.impliedFormat } :
|
|
99192
99299
|
{ version: value.version, signature: false, affectsGlobalScope: value.affectsGlobalScope, impliedFormat: value.impliedFormat };
|
|
99193
99300
|
});
|
|
99194
99301
|
var referencedMap;
|
|
@@ -99202,16 +99309,12 @@ var ts;
|
|
|
99202
99309
|
if (state.exportedModulesMap) {
|
|
99203
99310
|
exportedModulesMap = ts.mapDefined(ts.arrayFrom(state.exportedModulesMap.keys()).sort(ts.compareStringsCaseSensitive), function (key) {
|
|
99204
99311
|
var _a;
|
|
99205
|
-
|
|
99206
|
-
|
|
99207
|
-
|
|
99208
|
-
|
|
99209
|
-
|
|
99210
|
-
|
|
99211
|
-
return [toFileId(key), toFileIdListId(newValue)];
|
|
99212
|
-
}
|
|
99213
|
-
}
|
|
99214
|
-
return [toFileId(key), toFileIdListId(state.exportedModulesMap.getValues(key))];
|
|
99312
|
+
var oldValue = (_a = state.oldExportedModulesMap) === null || _a === void 0 ? void 0 : _a.get(key);
|
|
99313
|
+
if (oldValue === undefined)
|
|
99314
|
+
return [toFileId(key), toFileIdListId(state.exportedModulesMap.getValues(key))];
|
|
99315
|
+
if (oldValue)
|
|
99316
|
+
return [toFileId(key), toFileIdListId(oldValue)];
|
|
99317
|
+
return undefined;
|
|
99215
99318
|
});
|
|
99216
99319
|
}
|
|
99217
99320
|
var semanticDiagnosticsPerFile;
|
|
@@ -99222,9 +99325,7 @@ var ts;
|
|
|
99222
99325
|
(semanticDiagnosticsPerFile || (semanticDiagnosticsPerFile = [])).push(value.length ?
|
|
99223
99326
|
[
|
|
99224
99327
|
toFileId(key),
|
|
99225
|
-
|
|
99226
|
-
value :
|
|
99227
|
-
convertToReusableDiagnostics(value, relativeToBuildInfo)
|
|
99328
|
+
convertToReusableDiagnostics(value, relativeToBuildInfo)
|
|
99228
99329
|
] :
|
|
99229
99330
|
toFileId(key));
|
|
99230
99331
|
}
|
|
@@ -99239,16 +99340,27 @@ var ts;
|
|
|
99239
99340
|
}
|
|
99240
99341
|
}
|
|
99241
99342
|
}
|
|
99242
|
-
|
|
99343
|
+
var changeFileSet;
|
|
99344
|
+
if (state.changedFilesSet.size) {
|
|
99345
|
+
for (var _d = 0, _e = ts.arrayFrom(state.changedFilesSet.keys()).sort(ts.compareStringsCaseSensitive); _d < _e.length; _d++) {
|
|
99346
|
+
var path = _e[_d];
|
|
99347
|
+
(changeFileSet || (changeFileSet = [])).push(toFileId(path));
|
|
99348
|
+
}
|
|
99349
|
+
}
|
|
99350
|
+
var result = {
|
|
99243
99351
|
fileNames: fileNames,
|
|
99244
99352
|
fileInfos: fileInfos,
|
|
99245
|
-
options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions,
|
|
99353
|
+
options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions, "affectsMultiFileEmitBuildInfo"),
|
|
99246
99354
|
fileIdsList: fileIdsList,
|
|
99247
99355
|
referencedMap: referencedMap,
|
|
99248
99356
|
exportedModulesMap: exportedModulesMap,
|
|
99249
99357
|
semanticDiagnosticsPerFile: semanticDiagnosticsPerFile,
|
|
99250
99358
|
affectedFilesPendingEmit: affectedFilesPendingEmit,
|
|
99359
|
+
changeFileSet: changeFileSet,
|
|
99360
|
+
emitSignatures: emitSignatures,
|
|
99361
|
+
dtsChangeTime: state.dtsChangeTime,
|
|
99251
99362
|
};
|
|
99363
|
+
return result;
|
|
99252
99364
|
function relativeToBuildInfoEnsuringAbsolutePath(path) {
|
|
99253
99365
|
return relativeToBuildInfo(ts.getNormalizedAbsolutePath(path, currentDirectory));
|
|
99254
99366
|
}
|
|
@@ -99273,21 +99385,18 @@ var ts;
|
|
|
99273
99385
|
}
|
|
99274
99386
|
return fileIdListId;
|
|
99275
99387
|
}
|
|
99276
|
-
|
|
99277
|
-
|
|
99278
|
-
|
|
99279
|
-
|
|
99280
|
-
|
|
99281
|
-
|
|
99282
|
-
|
|
99283
|
-
|
|
99284
|
-
|
|
99285
|
-
optionKey === "strict" ||
|
|
99286
|
-
optionKey === "skiplibcheck" || optionKey === "skipdefaultlibcheck") {
|
|
99287
|
-
(result || (result = {}))[name] = convertToReusableCompilerOptionValue(optionInfo, options[name], relativeToBuildInfo);
|
|
99388
|
+
function convertToProgramBuildInfoCompilerOptions(options, optionKey) {
|
|
99389
|
+
var result;
|
|
99390
|
+
var optionsNameMap = ts.getOptionsNameMap().optionsNameMap;
|
|
99391
|
+
for (var _i = 0, _a = ts.getOwnKeys(options).sort(ts.compareStringsCaseSensitive); _i < _a.length; _i++) {
|
|
99392
|
+
var name = _a[_i];
|
|
99393
|
+
var optionInfo = optionsNameMap.get(name.toLowerCase());
|
|
99394
|
+
if (optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo[optionKey]) {
|
|
99395
|
+
(result || (result = {}))[name] = convertToReusableCompilerOptionValue(optionInfo, options[name], relativeToBuildInfoEnsuringAbsolutePath);
|
|
99396
|
+
}
|
|
99288
99397
|
}
|
|
99398
|
+
return result;
|
|
99289
99399
|
}
|
|
99290
|
-
return result;
|
|
99291
99400
|
}
|
|
99292
99401
|
function convertToReusableCompilerOptionValue(option, value, relativeToBuildInfo) {
|
|
99293
99402
|
if (option) {
|
|
@@ -99361,6 +99470,10 @@ var ts;
|
|
|
99361
99470
|
return { host: host, newProgram: newProgram, oldProgram: oldProgram, configFileParsingDiagnostics: configFileParsingDiagnostics || ts.emptyArray };
|
|
99362
99471
|
}
|
|
99363
99472
|
ts.getBuilderCreationParameters = getBuilderCreationParameters;
|
|
99473
|
+
function computeSignature(text, data, computeHash) {
|
|
99474
|
+
return ts.BuilderState.computeSignature((data === null || data === void 0 ? void 0 : data.sourceMapUrlPos) !== undefined ? text.substring(0, data.sourceMapUrlPos) : text, computeHash);
|
|
99475
|
+
}
|
|
99476
|
+
ts.computeSignature = computeSignature;
|
|
99364
99477
|
function createBuilderProgram(kind, _a) {
|
|
99365
99478
|
var newProgram = _a.newProgram, host = _a.host, oldProgram = _a.oldProgram, configFileParsingDiagnostics = _a.configFileParsingDiagnostics;
|
|
99366
99479
|
var oldState = oldProgram && oldProgram.getState();
|
|
@@ -99372,28 +99485,28 @@ var ts;
|
|
|
99372
99485
|
var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames());
|
|
99373
99486
|
var computeHash = ts.maybeBind(host, host.createHash);
|
|
99374
99487
|
var state = createBuilderProgramState(newProgram, getCanonicalFileName, oldState, host.disableUseFileVersionAsSignature);
|
|
99375
|
-
var
|
|
99376
|
-
newProgram.getProgramBuildInfo = function () { return getProgramBuildInfo(state, getCanonicalFileName); };
|
|
99488
|
+
var backupEmitState;
|
|
99489
|
+
newProgram.getProgramBuildInfo = function () { return getProgramBuildInfo(state, getCanonicalFileName, host); };
|
|
99377
99490
|
newProgram = undefined;
|
|
99378
99491
|
oldProgram = undefined;
|
|
99379
99492
|
oldState = undefined;
|
|
99380
99493
|
var getState = function () { return state; };
|
|
99381
99494
|
var builderProgram = createRedirectedBuilderProgram(getState, configFileParsingDiagnostics);
|
|
99382
99495
|
builderProgram.getState = getState;
|
|
99383
|
-
builderProgram.
|
|
99384
|
-
ts.Debug.assert(
|
|
99385
|
-
|
|
99496
|
+
builderProgram.backupEmitState = function () {
|
|
99497
|
+
ts.Debug.assert(backupEmitState === undefined);
|
|
99498
|
+
backupEmitState = backupEmitBuilderProgramState(state);
|
|
99386
99499
|
};
|
|
99387
|
-
builderProgram.
|
|
99388
|
-
state
|
|
99389
|
-
|
|
99500
|
+
builderProgram.restoreEmitState = function () {
|
|
99501
|
+
restoreEmitBuilderProgramState(state, ts.Debug.checkDefined(backupEmitState));
|
|
99502
|
+
backupEmitState = undefined;
|
|
99390
99503
|
};
|
|
99391
99504
|
builderProgram.getAllDependencies = function (sourceFile) { return ts.BuilderState.getAllDependencies(state, ts.Debug.checkDefined(state.program), sourceFile); };
|
|
99392
99505
|
builderProgram.getSemanticDiagnostics = getSemanticDiagnostics;
|
|
99393
99506
|
builderProgram.emit = emit;
|
|
99394
99507
|
builderProgram.releaseProgram = function () {
|
|
99395
99508
|
releaseCache(state);
|
|
99396
|
-
|
|
99509
|
+
backupEmitState = undefined;
|
|
99397
99510
|
};
|
|
99398
99511
|
if (kind === BuilderProgramKind.SemanticDiagnosticsBuilderProgram) {
|
|
99399
99512
|
builderProgram.getSemanticDiagnosticsOfNextAffectedFile = getSemanticDiagnosticsOfNextAffectedFile;
|
|
@@ -99439,35 +99552,57 @@ var ts;
|
|
|
99439
99552
|
affected = program;
|
|
99440
99553
|
}
|
|
99441
99554
|
}
|
|
99442
|
-
return toAffectedFileEmitResult(state, ts.Debug.checkDefined(state.program).emit(affected === state.program ? undefined : affected,
|
|
99443
|
-
|
|
99555
|
+
return toAffectedFileEmitResult(state, ts.Debug.checkDefined(state.program).emit(affected === state.program ? undefined : affected, ts.getEmitDeclarations(state.compilerOptions) ?
|
|
99556
|
+
getWriteFileCallback(writeFile, customTransformers) :
|
|
99444
99557
|
writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles || emitKind === 0, customTransformers), affected, emitKind, isPendingEmitFile);
|
|
99445
99558
|
}
|
|
99446
|
-
function
|
|
99559
|
+
function getWriteFileCallback(writeFile, customTransformers) {
|
|
99447
99560
|
return function (fileName, text, writeByteOrderMark, onError, sourceFiles, data) {
|
|
99448
|
-
var _a;
|
|
99561
|
+
var _a, _b, _c;
|
|
99449
99562
|
if (ts.isDeclarationFileName(fileName)) {
|
|
99450
|
-
ts.
|
|
99451
|
-
|
|
99452
|
-
|
|
99453
|
-
|
|
99454
|
-
|
|
99455
|
-
|
|
99456
|
-
|
|
99457
|
-
|
|
99458
|
-
|
|
99459
|
-
|
|
99460
|
-
|
|
99461
|
-
|
|
99462
|
-
|
|
99563
|
+
if (!ts.outFile(state.compilerOptions)) {
|
|
99564
|
+
ts.Debug.assert((sourceFiles === null || sourceFiles === void 0 ? void 0 : sourceFiles.length) === 1);
|
|
99565
|
+
var newSignature = void 0;
|
|
99566
|
+
if (!customTransformers) {
|
|
99567
|
+
var file = sourceFiles[0];
|
|
99568
|
+
var info = state.fileInfos.get(file.resolvedPath);
|
|
99569
|
+
if (info.signature === file.version) {
|
|
99570
|
+
newSignature = computeSignature(text, data, computeHash);
|
|
99571
|
+
if (newSignature !== file.version) {
|
|
99572
|
+
if (host.storeFilesChangingSignatureDuringEmit)
|
|
99573
|
+
(state.filesChangingSignature || (state.filesChangingSignature = new ts.Set())).add(file.resolvedPath);
|
|
99574
|
+
if (state.exportedModulesMap)
|
|
99575
|
+
ts.BuilderState.updateExportedModules(state, file, file.exportedModulesFromDeclarationEmit);
|
|
99576
|
+
if (state.affectedFiles) {
|
|
99577
|
+
var existing = (_a = state.oldSignatures) === null || _a === void 0 ? void 0 : _a.get(file.resolvedPath);
|
|
99578
|
+
if (existing === undefined)
|
|
99579
|
+
(state.oldSignatures || (state.oldSignatures = new ts.Map())).set(file.resolvedPath, info.signature || false);
|
|
99580
|
+
info.signature = newSignature;
|
|
99581
|
+
}
|
|
99582
|
+
else {
|
|
99583
|
+
info.signature = newSignature;
|
|
99584
|
+
(_b = state.oldExportedModulesMap) === null || _b === void 0 ? void 0 : _b.clear();
|
|
99585
|
+
}
|
|
99586
|
+
}
|
|
99463
99587
|
}
|
|
99464
|
-
|
|
99465
|
-
|
|
99466
|
-
|
|
99467
|
-
|
|
99588
|
+
}
|
|
99589
|
+
if (state.compilerOptions.composite) {
|
|
99590
|
+
var filePath = sourceFiles[0].resolvedPath;
|
|
99591
|
+
var oldSignature = (_c = state.emitSignatures) === null || _c === void 0 ? void 0 : _c.get(filePath);
|
|
99592
|
+
newSignature || (newSignature = computeSignature(text, data, computeHash));
|
|
99593
|
+
if (newSignature !== oldSignature) {
|
|
99594
|
+
(state.emitSignatures || (state.emitSignatures = new ts.Map())).set(filePath, newSignature);
|
|
99595
|
+
state.hasChangedEmitSignature = true;
|
|
99468
99596
|
}
|
|
99469
99597
|
}
|
|
99470
99598
|
}
|
|
99599
|
+
else if (state.compilerOptions.composite) {
|
|
99600
|
+
var newSignature = computeSignature(text, data, computeHash);
|
|
99601
|
+
if (newSignature !== state.outSignature) {
|
|
99602
|
+
state.outSignature = newSignature;
|
|
99603
|
+
state.hasChangedEmitSignature = true;
|
|
99604
|
+
}
|
|
99605
|
+
}
|
|
99471
99606
|
}
|
|
99472
99607
|
if (writeFile)
|
|
99473
99608
|
writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data);
|
|
@@ -99516,8 +99651,8 @@ var ts;
|
|
|
99516
99651
|
}
|
|
99517
99652
|
}
|
|
99518
99653
|
}
|
|
99519
|
-
return ts.Debug.checkDefined(state.program).emit(targetSourceFile,
|
|
99520
|
-
|
|
99654
|
+
return ts.Debug.checkDefined(state.program).emit(targetSourceFile, ts.getEmitDeclarations(state.compilerOptions) ?
|
|
99655
|
+
getWriteFileCallback(writeFile, customTransformers) :
|
|
99521
99656
|
writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles, customTransformers);
|
|
99522
99657
|
}
|
|
99523
99658
|
function getSemanticDiagnosticsOfNextAffectedFile(cancellationToken, ignoreSourceFile) {
|
|
@@ -99580,14 +99715,28 @@ var ts;
|
|
|
99580
99715
|
{ version: fileInfo.version, signature: fileInfo.signature === false ? undefined : fileInfo.version, affectsGlobalScope: fileInfo.affectsGlobalScope, impliedFormat: fileInfo.impliedFormat };
|
|
99581
99716
|
}
|
|
99582
99717
|
ts.toBuilderStateFileInfo = toBuilderStateFileInfo;
|
|
99583
|
-
function
|
|
99584
|
-
var _a;
|
|
99718
|
+
function createBuilderProgramUsingProgramBuildInfo(programFromBuildInfo, buildInfoPath, host) {
|
|
99719
|
+
var _a, _b, _c, _d, _e;
|
|
99585
99720
|
var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));
|
|
99586
99721
|
var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames());
|
|
99587
|
-
var
|
|
99588
|
-
var
|
|
99722
|
+
var program = programFromBuildInfo;
|
|
99723
|
+
var filePaths = (_a = program.fileNames) === null || _a === void 0 ? void 0 : _a.map(toPath);
|
|
99724
|
+
var filePathsSetList = (_b = program.fileIdsList) === null || _b === void 0 ? void 0 : _b.map(function (fileIds) { return new ts.Set(fileIds.map(toFilePath)); });
|
|
99589
99725
|
var fileInfos = new ts.Map();
|
|
99590
|
-
|
|
99726
|
+
var emitSignatures = ((_c = program.options) === null || _c === void 0 ? void 0 : _c.composite) && !ts.outFile(program.options) ? new ts.Map() : undefined;
|
|
99727
|
+
(_d = program.fileInfos) === null || _d === void 0 ? void 0 : _d.forEach(function (fileInfo, index) {
|
|
99728
|
+
var path = toFilePath(index + 1);
|
|
99729
|
+
var stateFileInfo = toBuilderStateFileInfo(fileInfo);
|
|
99730
|
+
fileInfos.set(path, stateFileInfo);
|
|
99731
|
+
if (emitSignatures && stateFileInfo.signature)
|
|
99732
|
+
emitSignatures.set(path, stateFileInfo.signature);
|
|
99733
|
+
});
|
|
99734
|
+
(_e = program.emitSignatures) === null || _e === void 0 ? void 0 : _e.forEach(function (value) {
|
|
99735
|
+
if (ts.isNumber(value))
|
|
99736
|
+
emitSignatures.delete(toFilePath(value));
|
|
99737
|
+
else
|
|
99738
|
+
emitSignatures.set(toFilePath(value[0]), value[1]);
|
|
99739
|
+
});
|
|
99591
99740
|
var state = {
|
|
99592
99741
|
fileInfos: fileInfos,
|
|
99593
99742
|
compilerOptions: program.options ? ts.convertToOptionsWithAbsolutePaths(program.options, toAbsolutePath) : {},
|
|
@@ -99598,11 +99747,15 @@ var ts;
|
|
|
99598
99747
|
affectedFilesPendingEmit: ts.map(program.affectedFilesPendingEmit, function (value) { return toFilePath(value[0]); }),
|
|
99599
99748
|
affectedFilesPendingEmitKind: program.affectedFilesPendingEmit && ts.arrayToMap(program.affectedFilesPendingEmit, function (value) { return toFilePath(value[0]); }, function (value) { return value[1]; }),
|
|
99600
99749
|
affectedFilesPendingEmitIndex: program.affectedFilesPendingEmit && 0,
|
|
99750
|
+
changedFilesSet: new ts.Set(ts.map(program.changeFileSet, toFilePath)),
|
|
99751
|
+
dtsChangeTime: program.dtsChangeTime,
|
|
99752
|
+
emitSignatures: (emitSignatures === null || emitSignatures === void 0 ? void 0 : emitSignatures.size) ? emitSignatures : undefined,
|
|
99753
|
+
outSignature: program.outSignature,
|
|
99601
99754
|
};
|
|
99602
99755
|
return {
|
|
99603
99756
|
getState: function () { return state; },
|
|
99604
|
-
|
|
99605
|
-
|
|
99757
|
+
backupEmitState: ts.noop,
|
|
99758
|
+
restoreEmitState: ts.noop,
|
|
99606
99759
|
getProgram: ts.notImplemented,
|
|
99607
99760
|
getProgramOrUndefined: ts.returnUndefined,
|
|
99608
99761
|
releaseProgram: ts.noop,
|
|
@@ -99647,12 +99800,12 @@ var ts;
|
|
|
99647
99800
|
return map;
|
|
99648
99801
|
}
|
|
99649
99802
|
}
|
|
99650
|
-
ts.
|
|
99803
|
+
ts.createBuilderProgramUsingProgramBuildInfo = createBuilderProgramUsingProgramBuildInfo;
|
|
99651
99804
|
function createRedirectedBuilderProgram(getState, configFileParsingDiagnostics) {
|
|
99652
99805
|
return {
|
|
99653
99806
|
getState: ts.notImplemented,
|
|
99654
|
-
|
|
99655
|
-
|
|
99807
|
+
backupEmitState: ts.noop,
|
|
99808
|
+
restoreEmitState: ts.noop,
|
|
99656
99809
|
getProgram: getProgram,
|
|
99657
99810
|
getProgramOrUndefined: function () { return getState().program; },
|
|
99658
99811
|
releaseProgram: function () { return getState().program = undefined; },
|
|
@@ -100603,9 +100756,9 @@ var ts;
|
|
|
100603
100756
|
var targets = importedFileNames.map(function (f) { return ts.getNormalizedAbsolutePath(f, cwd); });
|
|
100604
100757
|
var shouldFilterIgnoredPaths = !ts.every(targets, ts.containsIgnoredPath);
|
|
100605
100758
|
if (!preferSymlinks) {
|
|
100606
|
-
var
|
|
100607
|
-
if (
|
|
100608
|
-
return
|
|
100759
|
+
var result_16 = ts.forEach(targets, function (p) { return !(shouldFilterIgnoredPaths && ts.containsIgnoredPath(p)) && cb(p, referenceRedirect === p); });
|
|
100760
|
+
if (result_16)
|
|
100761
|
+
return result_16;
|
|
100609
100762
|
}
|
|
100610
100763
|
var symlinkedDirectories = (_a = host.getSymlinkCache) === null || _a === void 0 ? void 0 : _a.call(host).getSymlinkedDirectoriesByRealpath();
|
|
100611
100764
|
var fullImportedFileName = ts.getNormalizedAbsolutePath(importedFileName, cwd);
|
|
@@ -100624,10 +100777,10 @@ var ts;
|
|
|
100624
100777
|
for (var _i = 0, symlinkDirectories_1 = symlinkDirectories; _i < symlinkDirectories_1.length; _i++) {
|
|
100625
100778
|
var symlinkDirectory = symlinkDirectories_1[_i];
|
|
100626
100779
|
var option = ts.resolvePath(symlinkDirectory, relative);
|
|
100627
|
-
var
|
|
100780
|
+
var result_17 = cb(option, target === referenceRedirect);
|
|
100628
100781
|
shouldFilterIgnoredPaths = true;
|
|
100629
|
-
if (
|
|
100630
|
-
return
|
|
100782
|
+
if (result_17)
|
|
100783
|
+
return result_17;
|
|
100631
100784
|
}
|
|
100632
100785
|
});
|
|
100633
100786
|
});
|
|
@@ -101442,6 +101595,7 @@ var ts;
|
|
|
101442
101595
|
readDirectory: ts.maybeBind(host, host.readDirectory),
|
|
101443
101596
|
disableUseFileVersionAsSignature: host.disableUseFileVersionAsSignature,
|
|
101444
101597
|
storeFilesChangingSignatureDuringEmit: host.storeFilesChangingSignatureDuringEmit,
|
|
101598
|
+
now: ts.maybeBind(host, host.now),
|
|
101445
101599
|
};
|
|
101446
101600
|
function writeFile(fileName, text, writeByteOrderMark, onError) {
|
|
101447
101601
|
try {
|
|
@@ -101496,6 +101650,7 @@ var ts;
|
|
|
101496
101650
|
createProgram: createProgram || ts.createEmitAndSemanticDiagnosticsBuilderProgram,
|
|
101497
101651
|
disableUseFileVersionAsSignature: system.disableUseFileVersionAsSignature,
|
|
101498
101652
|
storeFilesChangingSignatureDuringEmit: system.storeFilesChangingSignatureDuringEmit,
|
|
101653
|
+
now: ts.maybeBind(system, system.now),
|
|
101499
101654
|
};
|
|
101500
101655
|
}
|
|
101501
101656
|
ts.createProgramHost = createProgramHost;
|
|
@@ -101551,20 +101706,26 @@ var ts;
|
|
|
101551
101706
|
var ts;
|
|
101552
101707
|
(function (ts) {
|
|
101553
101708
|
function readBuilderProgram(compilerOptions, host) {
|
|
101554
|
-
if (ts.outFile(compilerOptions))
|
|
101555
|
-
return undefined;
|
|
101556
101709
|
var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(compilerOptions);
|
|
101557
101710
|
if (!buildInfoPath)
|
|
101558
101711
|
return undefined;
|
|
101559
|
-
var
|
|
101560
|
-
if (
|
|
101561
|
-
|
|
101562
|
-
|
|
101712
|
+
var buildInfo;
|
|
101713
|
+
if (host.getBuildInfo) {
|
|
101714
|
+
buildInfo = host.getBuildInfo(buildInfoPath, compilerOptions.configFilePath);
|
|
101715
|
+
if (!buildInfo)
|
|
101716
|
+
return undefined;
|
|
101717
|
+
}
|
|
101718
|
+
else {
|
|
101719
|
+
var content = host.readFile(buildInfoPath);
|
|
101720
|
+
if (!content)
|
|
101721
|
+
return undefined;
|
|
101722
|
+
buildInfo = ts.getBuildInfo(content);
|
|
101723
|
+
}
|
|
101563
101724
|
if (buildInfo.version !== ts.version)
|
|
101564
101725
|
return undefined;
|
|
101565
101726
|
if (!buildInfo.program)
|
|
101566
101727
|
return undefined;
|
|
101567
|
-
return ts.
|
|
101728
|
+
return ts.createBuilderProgramUsingProgramBuildInfo(buildInfo.program, buildInfoPath, host);
|
|
101568
101729
|
}
|
|
101569
101730
|
ts.readBuilderProgram = readBuilderProgram;
|
|
101570
101731
|
function createIncrementalCompilerHost(options, system) {
|
|
@@ -101573,6 +101734,7 @@ var ts;
|
|
|
101573
101734
|
host.createHash = ts.maybeBind(system, system.createHash);
|
|
101574
101735
|
host.disableUseFileVersionAsSignature = system.disableUseFileVersionAsSignature;
|
|
101575
101736
|
host.storeFilesChangingSignatureDuringEmit = system.storeFilesChangingSignatureDuringEmit;
|
|
101737
|
+
host.now = ts.maybeBind(system, system.now);
|
|
101576
101738
|
ts.setGetSourceFileAsHashVersioned(host, system);
|
|
101577
101739
|
ts.changeCompilerHostLikeToUseCache(host, function (fileName) { return ts.toPath(fileName, host.getCurrentDirectory(), host.getCanonicalFileName); });
|
|
101578
101740
|
return host;
|
|
@@ -102235,11 +102397,13 @@ var ts;
|
|
|
102235
102397
|
UpToDateStatusType[UpToDateStatusType["OutputMissing"] = 4] = "OutputMissing";
|
|
102236
102398
|
UpToDateStatusType[UpToDateStatusType["OutOfDateWithSelf"] = 5] = "OutOfDateWithSelf";
|
|
102237
102399
|
UpToDateStatusType[UpToDateStatusType["OutOfDateWithUpstream"] = 6] = "OutOfDateWithUpstream";
|
|
102238
|
-
UpToDateStatusType[UpToDateStatusType["
|
|
102239
|
-
UpToDateStatusType[UpToDateStatusType["
|
|
102240
|
-
UpToDateStatusType[UpToDateStatusType["
|
|
102241
|
-
UpToDateStatusType[UpToDateStatusType["
|
|
102242
|
-
UpToDateStatusType[UpToDateStatusType["
|
|
102400
|
+
UpToDateStatusType[UpToDateStatusType["OutOfDateBuildInfo"] = 7] = "OutOfDateBuildInfo";
|
|
102401
|
+
UpToDateStatusType[UpToDateStatusType["UpstreamOutOfDate"] = 8] = "UpstreamOutOfDate";
|
|
102402
|
+
UpToDateStatusType[UpToDateStatusType["UpstreamBlocked"] = 9] = "UpstreamBlocked";
|
|
102403
|
+
UpToDateStatusType[UpToDateStatusType["ComputingUpstream"] = 10] = "ComputingUpstream";
|
|
102404
|
+
UpToDateStatusType[UpToDateStatusType["TsVersionOutputOfDate"] = 11] = "TsVersionOutputOfDate";
|
|
102405
|
+
UpToDateStatusType[UpToDateStatusType["ContainerOnly"] = 12] = "ContainerOnly";
|
|
102406
|
+
UpToDateStatusType[UpToDateStatusType["ForceBuild"] = 13] = "ForceBuild";
|
|
102243
102407
|
})(UpToDateStatusType = ts.UpToDateStatusType || (ts.UpToDateStatusType = {}));
|
|
102244
102408
|
function resolveConfigFileProjectName(project) {
|
|
102245
102409
|
if (ts.fileExtensionIs(project, ".json")) {
|
|
@@ -102277,9 +102441,10 @@ var ts;
|
|
|
102277
102441
|
function getOrCreateValueMapFromConfigFileMap(configFileMap, resolved) {
|
|
102278
102442
|
return getOrCreateValueFromConfigFileMap(configFileMap, resolved, function () { return new ts.Map(); });
|
|
102279
102443
|
}
|
|
102280
|
-
function
|
|
102281
|
-
return
|
|
102444
|
+
function getCurrentTime(host) {
|
|
102445
|
+
return host.now ? host.now() : new Date();
|
|
102282
102446
|
}
|
|
102447
|
+
ts.getCurrentTime = getCurrentTime;
|
|
102283
102448
|
function isCircularBuildOrder(buildOrder) {
|
|
102284
102449
|
return !!buildOrder && !!buildOrder.buildOrder;
|
|
102285
102450
|
}
|
|
@@ -102363,6 +102528,7 @@ var ts;
|
|
|
102363
102528
|
return ts.loadWithTypeDirectiveCache(ts.Debug.checkEachDefined(typeReferenceDirectiveNames), containingFile, redirectedReference, containingFileMode, loader_4);
|
|
102364
102529
|
};
|
|
102365
102530
|
}
|
|
102531
|
+
compilerHost.getBuildInfo = function (fileName, configFilePath) { return getBuildInfo(state, fileName, toResolvedConfigFilePath(state, configFilePath), undefined); };
|
|
102366
102532
|
var _a = ts.createWatchFactory(hostWithWatch, options), watchFile = _a.watchFile, watchDirectory = _a.watchDirectory, writeLog = _a.writeLog;
|
|
102367
102533
|
var state = {
|
|
102368
102534
|
host: host,
|
|
@@ -102378,8 +102544,9 @@ var ts;
|
|
|
102378
102544
|
resolvedConfigFilePaths: new ts.Map(),
|
|
102379
102545
|
configFileCache: new ts.Map(),
|
|
102380
102546
|
projectStatus: new ts.Map(),
|
|
102381
|
-
buildInfoChecked: new ts.Map(),
|
|
102382
102547
|
extendedConfigCache: new ts.Map(),
|
|
102548
|
+
buildInfoCache: new ts.Map(),
|
|
102549
|
+
outputTimeStamps: new ts.Map(),
|
|
102383
102550
|
builderPrograms: new ts.Map(),
|
|
102384
102551
|
diagnostics: new ts.Map(),
|
|
102385
102552
|
projectPendingBuild: new ts.Map(),
|
|
@@ -102401,6 +102568,7 @@ var ts;
|
|
|
102401
102568
|
allWatchedConfigFiles: new ts.Map(),
|
|
102402
102569
|
allWatchedExtendedConfigFiles: new ts.Map(),
|
|
102403
102570
|
allWatchedPackageJsonFiles: new ts.Map(),
|
|
102571
|
+
filesWatched: new ts.Map(),
|
|
102404
102572
|
lastCachedPackageJsonLookups: new ts.Map(),
|
|
102405
102573
|
timerToBuildInvalidatedProject: undefined,
|
|
102406
102574
|
reportFileChangeDetected: false,
|
|
@@ -102502,11 +102670,12 @@ var ts;
|
|
|
102502
102670
|
var noopOnDelete = { onDeleteValue: ts.noop };
|
|
102503
102671
|
ts.mutateMapSkippingNewValues(state.configFileCache, currentProjects, noopOnDelete);
|
|
102504
102672
|
ts.mutateMapSkippingNewValues(state.projectStatus, currentProjects, noopOnDelete);
|
|
102505
|
-
ts.mutateMapSkippingNewValues(state.buildInfoChecked, currentProjects, noopOnDelete);
|
|
102506
102673
|
ts.mutateMapSkippingNewValues(state.builderPrograms, currentProjects, noopOnDelete);
|
|
102507
102674
|
ts.mutateMapSkippingNewValues(state.diagnostics, currentProjects, noopOnDelete);
|
|
102508
102675
|
ts.mutateMapSkippingNewValues(state.projectPendingBuild, currentProjects, noopOnDelete);
|
|
102509
102676
|
ts.mutateMapSkippingNewValues(state.projectErrorsReported, currentProjects, noopOnDelete);
|
|
102677
|
+
ts.mutateMapSkippingNewValues(state.buildInfoCache, currentProjects, noopOnDelete);
|
|
102678
|
+
ts.mutateMapSkippingNewValues(state.outputTimeStamps, currentProjects, noopOnDelete);
|
|
102510
102679
|
if (state.watch) {
|
|
102511
102680
|
ts.mutateMapSkippingNewValues(state.allWatchedConfigFiles, currentProjects, { onDeleteValue: ts.closeFileWatcher });
|
|
102512
102681
|
state.allWatchedExtendedConfigFiles.forEach(function (watcher) {
|
|
@@ -102792,16 +102961,16 @@ var ts;
|
|
|
102792
102961
|
}
|
|
102793
102962
|
function emit(writeFileCallback, cancellationToken, customTransformers) {
|
|
102794
102963
|
var _a;
|
|
102795
|
-
var _b, _c;
|
|
102964
|
+
var _b, _c, _d;
|
|
102796
102965
|
ts.Debug.assertIsDefined(program);
|
|
102797
102966
|
ts.Debug.assert(step === BuildStep.Emit);
|
|
102798
|
-
program.
|
|
102967
|
+
program.backupEmitState();
|
|
102799
102968
|
var declDiagnostics;
|
|
102800
102969
|
var reportDeclarationDiagnostics = function (d) { return (declDiagnostics || (declDiagnostics = [])).push(d); };
|
|
102801
102970
|
var outputFiles = [];
|
|
102802
|
-
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;
|
|
102971
|
+
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;
|
|
102803
102972
|
if (declDiagnostics) {
|
|
102804
|
-
program.
|
|
102973
|
+
program.restoreEmitState();
|
|
102805
102974
|
(_a = buildErrors(state, projectPath, program, config, declDiagnostics, BuildResultFlags.DeclarationEmitErrors, "Declaration file"), buildResult = _a.buildResult, step = _a.step);
|
|
102806
102975
|
return {
|
|
102807
102976
|
emitSkipped: true,
|
|
@@ -102810,35 +102979,43 @@ var ts;
|
|
|
102810
102979
|
}
|
|
102811
102980
|
var host = state.host, compilerHost = state.compilerHost;
|
|
102812
102981
|
var resultFlags = BuildResultFlags.DeclarationOutputUnchanged;
|
|
102813
|
-
var
|
|
102814
|
-
var anyDtsChanged = false;
|
|
102982
|
+
var existingBuildInfo = ((_d = state.buildInfoCache.get(projectPath)) === null || _d === void 0 ? void 0 : _d.buildInfo) || undefined;
|
|
102815
102983
|
var emitterDiagnostics = ts.createDiagnosticCollection();
|
|
102816
102984
|
var emittedOutputs = new ts.Map();
|
|
102985
|
+
var options = program.getCompilerOptions();
|
|
102986
|
+
var isIncremental = ts.isIncrementalCompilation(options);
|
|
102987
|
+
var outputTimeStampMap;
|
|
102988
|
+
var now;
|
|
102817
102989
|
outputFiles.forEach(function (_a) {
|
|
102818
|
-
var
|
|
102819
|
-
var
|
|
102820
|
-
|
|
102821
|
-
|
|
102822
|
-
|
|
102823
|
-
|
|
102824
|
-
|
|
102990
|
+
var _b, _c;
|
|
102991
|
+
var name = _a.name, text = _a.text, writeByteOrderMark = _a.writeByteOrderMark, buildInfo = _a.buildInfo;
|
|
102992
|
+
var path = toPath(state, name);
|
|
102993
|
+
emittedOutputs.set(toPath(state, name), name);
|
|
102994
|
+
if (buildInfo) {
|
|
102995
|
+
setBuildInfo(state, buildInfo, projectPath, options);
|
|
102996
|
+
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)) {
|
|
102825
102997
|
resultFlags &= ~BuildResultFlags.DeclarationOutputUnchanged;
|
|
102826
|
-
anyDtsChanged = true;
|
|
102827
102998
|
}
|
|
102828
102999
|
}
|
|
102829
|
-
emittedOutputs.set(toPath(state, name), name);
|
|
102830
103000
|
ts.writeFile(writeFileCallback ? { writeFile: writeFileCallback } : compilerHost, emitterDiagnostics, name, text, writeByteOrderMark);
|
|
102831
|
-
if (
|
|
102832
|
-
|
|
103001
|
+
if (!isIncremental && state.watch) {
|
|
103002
|
+
(outputTimeStampMap || (outputTimeStampMap = getOutputTimeStampMap(state, projectPath))).set(path, now || (now = getCurrentTime(state.host)));
|
|
102833
103003
|
}
|
|
102834
103004
|
});
|
|
102835
|
-
finishEmit(emitterDiagnostics, emittedOutputs,
|
|
103005
|
+
finishEmit(emitterDiagnostics, emittedOutputs, outputFiles.length ? outputFiles[0].name : ts.getFirstProjectOutput(config, !host.useCaseSensitiveFileNames()), resultFlags);
|
|
102836
103006
|
return emitResult;
|
|
102837
103007
|
}
|
|
102838
103008
|
function emitBuildInfo(writeFileCallback, cancellationToken) {
|
|
102839
103009
|
ts.Debug.assertIsDefined(program);
|
|
102840
103010
|
ts.Debug.assert(step === BuildStep.EmitBuildInfo);
|
|
102841
|
-
var emitResult = program.emitBuildInfo(
|
|
103011
|
+
var emitResult = program.emitBuildInfo(function (name, text, writeByteOrderMark, onError, sourceFiles, data) {
|
|
103012
|
+
if (data === null || data === void 0 ? void 0 : data.buildInfo)
|
|
103013
|
+
setBuildInfo(state, data.buildInfo, projectPath, program.getCompilerOptions());
|
|
103014
|
+
if (writeFileCallback)
|
|
103015
|
+
writeFileCallback(name, text, writeByteOrderMark, onError, sourceFiles, data);
|
|
103016
|
+
else
|
|
103017
|
+
state.compilerHost.writeFile(name, text, writeByteOrderMark, onError, sourceFiles, data);
|
|
103018
|
+
}, cancellationToken);
|
|
102842
103019
|
if (emitResult.diagnostics.length) {
|
|
102843
103020
|
reportErrors(state, emitResult.diagnostics);
|
|
102844
103021
|
state.diagnostics.set(projectPath, __spreadArray(__spreadArray([], state.diagnostics.get(projectPath), true), emitResult.diagnostics, true));
|
|
@@ -102851,7 +103028,7 @@ var ts;
|
|
|
102851
103028
|
step = BuildStep.QueueReferencingProjects;
|
|
102852
103029
|
return emitResult;
|
|
102853
103030
|
}
|
|
102854
|
-
function finishEmit(emitterDiagnostics, emittedOutputs,
|
|
103031
|
+
function finishEmit(emitterDiagnostics, emittedOutputs, oldestOutputFileName, resultFlags) {
|
|
102855
103032
|
var _a;
|
|
102856
103033
|
var emitDiagnostics = emitterDiagnostics.getDiagnostics();
|
|
102857
103034
|
if (emitDiagnostics.length) {
|
|
@@ -102861,13 +103038,11 @@ var ts;
|
|
|
102861
103038
|
if (state.write) {
|
|
102862
103039
|
emittedOutputs.forEach(function (name) { return listEmittedFile(state, config, name); });
|
|
102863
103040
|
}
|
|
102864
|
-
|
|
103041
|
+
updateOutputTimestampsWorker(state, config, projectPath, ts.Diagnostics.Updating_unchanged_output_timestamps_of_project_0, emittedOutputs);
|
|
102865
103042
|
state.diagnostics.delete(projectPath);
|
|
102866
103043
|
state.projectStatus.set(projectPath, {
|
|
102867
103044
|
type: ts.UpToDateStatusType.UpToDate,
|
|
102868
|
-
newestDeclarationFileContentChangedTime:
|
|
102869
|
-
maximumDate :
|
|
102870
|
-
newestDeclarationFileContentChangedTime,
|
|
103045
|
+
newestDeclarationFileContentChangedTime: getDtsChangeTime(state, config.options, projectPath),
|
|
102871
103046
|
oldestOutputFileName: oldestOutputFileName
|
|
102872
103047
|
});
|
|
102873
103048
|
afterProgramDone(state, program, config);
|
|
@@ -102900,12 +103075,21 @@ var ts;
|
|
|
102900
103075
|
ts.Debug.assert(!!outputFiles.length);
|
|
102901
103076
|
var emitterDiagnostics = ts.createDiagnosticCollection();
|
|
102902
103077
|
var emittedOutputs = new ts.Map();
|
|
103078
|
+
var resultFlags = BuildResultFlags.DeclarationOutputUnchanged;
|
|
103079
|
+
var existingBuildInfo = state.buildInfoCache.get(projectPath).buildInfo;
|
|
102903
103080
|
outputFiles.forEach(function (_a) {
|
|
102904
|
-
var
|
|
103081
|
+
var _b, _c;
|
|
103082
|
+
var name = _a.name, text = _a.text, writeByteOrderMark = _a.writeByteOrderMark, buildInfo = _a.buildInfo;
|
|
102905
103083
|
emittedOutputs.set(toPath(state, name), name);
|
|
103084
|
+
if (buildInfo) {
|
|
103085
|
+
setBuildInfo(state, buildInfo, projectPath, config.options);
|
|
103086
|
+
if (((_b = buildInfo.program) === null || _b === void 0 ? void 0 : _b.dtsChangeTime) !== ((_c = existingBuildInfo.program) === null || _c === void 0 ? void 0 : _c.dtsChangeTime)) {
|
|
103087
|
+
resultFlags &= ~BuildResultFlags.DeclarationOutputUnchanged;
|
|
103088
|
+
}
|
|
103089
|
+
}
|
|
102906
103090
|
ts.writeFile(writeFileCallback ? { writeFile: writeFileCallback } : compilerHost, emitterDiagnostics, name, text, writeByteOrderMark);
|
|
102907
103091
|
});
|
|
102908
|
-
var emitDiagnostics = finishEmit(emitterDiagnostics, emittedOutputs,
|
|
103092
|
+
var emitDiagnostics = finishEmit(emitterDiagnostics, emittedOutputs, outputFiles[0].name, resultFlags);
|
|
102909
103093
|
return { emitSkipped: false, diagnostics: emitDiagnostics };
|
|
102910
103094
|
}
|
|
102911
103095
|
function executeSteps(till, cancellationToken, writeFile, customTransformers) {
|
|
@@ -103061,7 +103245,7 @@ var ts;
|
|
|
103061
103245
|
state.projectCompilerOptions = state.baseCompilerOptions;
|
|
103062
103246
|
}
|
|
103063
103247
|
function buildErrors(state, resolvedPath, program, config, diagnostics, buildResult, errorType) {
|
|
103064
|
-
var canEmitBuildInfo =
|
|
103248
|
+
var canEmitBuildInfo = program && !ts.outFile(program.getCompilerOptions());
|
|
103065
103249
|
reportAndStoreErrors(state, resolvedPath, diagnostics);
|
|
103066
103250
|
state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.Unbuildable, reason: errorType + " errors" });
|
|
103067
103251
|
if (canEmitBuildInfo)
|
|
@@ -103069,8 +103253,94 @@ var ts;
|
|
|
103069
103253
|
afterProgramDone(state, program, config);
|
|
103070
103254
|
return { buildResult: buildResult, step: BuildStep.QueueReferencingProjects };
|
|
103071
103255
|
}
|
|
103256
|
+
function isFileWatcherWithModifiedTime(value) {
|
|
103257
|
+
return !!value.watcher;
|
|
103258
|
+
}
|
|
103259
|
+
function getModifiedTime(state, fileName) {
|
|
103260
|
+
var path = toPath(state, fileName);
|
|
103261
|
+
var existing = state.filesWatched.get(path);
|
|
103262
|
+
if (state.watch && !!existing) {
|
|
103263
|
+
if (!isFileWatcherWithModifiedTime(existing))
|
|
103264
|
+
return existing;
|
|
103265
|
+
if (existing.modifiedTime)
|
|
103266
|
+
return existing.modifiedTime;
|
|
103267
|
+
}
|
|
103268
|
+
var result = ts.getModifiedTime(state.host, fileName);
|
|
103269
|
+
if (state.watch) {
|
|
103270
|
+
if (existing)
|
|
103271
|
+
existing.modifiedTime = result;
|
|
103272
|
+
else
|
|
103273
|
+
state.filesWatched.set(path, result);
|
|
103274
|
+
}
|
|
103275
|
+
return result;
|
|
103276
|
+
}
|
|
103277
|
+
function watchFile(state, file, callback, pollingInterval, options, watchType, project) {
|
|
103278
|
+
var path = toPath(state, file);
|
|
103279
|
+
var existing = state.filesWatched.get(path);
|
|
103280
|
+
if (existing && isFileWatcherWithModifiedTime(existing)) {
|
|
103281
|
+
existing.callbacks.push(callback);
|
|
103282
|
+
}
|
|
103283
|
+
else {
|
|
103284
|
+
var watcher = state.watchFile(file, function (fileName, eventKind, modifiedTime) {
|
|
103285
|
+
var existing = ts.Debug.checkDefined(state.filesWatched.get(path));
|
|
103286
|
+
ts.Debug.assert(isFileWatcherWithModifiedTime(existing));
|
|
103287
|
+
existing.modifiedTime = modifiedTime;
|
|
103288
|
+
existing.callbacks.forEach(function (cb) { return cb(fileName, eventKind, modifiedTime); });
|
|
103289
|
+
}, pollingInterval, options, watchType, project);
|
|
103290
|
+
state.filesWatched.set(path, { callbacks: [callback], watcher: watcher, modifiedTime: existing });
|
|
103291
|
+
}
|
|
103292
|
+
return {
|
|
103293
|
+
close: function () {
|
|
103294
|
+
var existing = ts.Debug.checkDefined(state.filesWatched.get(path));
|
|
103295
|
+
ts.Debug.assert(isFileWatcherWithModifiedTime(existing));
|
|
103296
|
+
if (existing.callbacks.length === 1) {
|
|
103297
|
+
state.filesWatched.delete(path);
|
|
103298
|
+
ts.closeFileWatcherOf(existing);
|
|
103299
|
+
}
|
|
103300
|
+
else {
|
|
103301
|
+
ts.unorderedRemoveItem(existing.callbacks, callback);
|
|
103302
|
+
}
|
|
103303
|
+
}
|
|
103304
|
+
};
|
|
103305
|
+
}
|
|
103306
|
+
function getOutputTimeStampMap(state, resolvedConfigFilePath) {
|
|
103307
|
+
if (!state.watch)
|
|
103308
|
+
return undefined;
|
|
103309
|
+
var result = state.outputTimeStamps.get(resolvedConfigFilePath);
|
|
103310
|
+
if (!result)
|
|
103311
|
+
state.outputTimeStamps.set(resolvedConfigFilePath, result = new ts.Map());
|
|
103312
|
+
return result;
|
|
103313
|
+
}
|
|
103314
|
+
function setBuildInfo(state, buildInfo, resolvedConfigPath, options) {
|
|
103315
|
+
var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(options);
|
|
103316
|
+
var existing = getBuildInfoCacheEntry(state, buildInfoPath, resolvedConfigPath);
|
|
103317
|
+
if (existing) {
|
|
103318
|
+
existing.buildInfo = buildInfo;
|
|
103319
|
+
existing.modifiedTime = getCurrentTime(state.host);
|
|
103320
|
+
}
|
|
103321
|
+
else {
|
|
103322
|
+
state.buildInfoCache.set(resolvedConfigPath, { path: toPath(state, buildInfoPath), buildInfo: buildInfo, modifiedTime: getCurrentTime(state.host) });
|
|
103323
|
+
}
|
|
103324
|
+
}
|
|
103325
|
+
function getBuildInfoCacheEntry(state, buildInfoPath, resolvedConfigPath) {
|
|
103326
|
+
var path = toPath(state, buildInfoPath);
|
|
103327
|
+
var existing = state.buildInfoCache.get(resolvedConfigPath);
|
|
103328
|
+
return (existing === null || existing === void 0 ? void 0 : existing.path) === path ? existing : undefined;
|
|
103329
|
+
}
|
|
103330
|
+
function getBuildInfo(state, buildInfoPath, resolvedConfigPath, modifiedTime) {
|
|
103331
|
+
var path = toPath(state, buildInfoPath);
|
|
103332
|
+
var existing = state.buildInfoCache.get(resolvedConfigPath);
|
|
103333
|
+
if (existing !== undefined && existing.path === path) {
|
|
103334
|
+
return existing.buildInfo || undefined;
|
|
103335
|
+
}
|
|
103336
|
+
var value = state.readFileWithCache(buildInfoPath);
|
|
103337
|
+
var buildInfo = value ? ts.getBuildInfo(value) : undefined;
|
|
103338
|
+
ts.Debug.assert(modifiedTime || !buildInfo);
|
|
103339
|
+
state.buildInfoCache.set(resolvedConfigPath, { path: path, buildInfo: buildInfo || false, modifiedTime: modifiedTime || ts.missingFileModifiedTime });
|
|
103340
|
+
return buildInfo;
|
|
103341
|
+
}
|
|
103072
103342
|
function checkConfigFileUpToDateStatus(state, configFile, oldestOutputFileTime, oldestOutputFileName) {
|
|
103073
|
-
var tsconfigTime =
|
|
103343
|
+
var tsconfigTime = getModifiedTime(state, configFile);
|
|
103074
103344
|
if (oldestOutputFileTime < tsconfigTime) {
|
|
103075
103345
|
return {
|
|
103076
103346
|
type: ts.UpToDateStatusType.OutOfDateWithSelf,
|
|
@@ -103080,76 +103350,22 @@ var ts;
|
|
|
103080
103350
|
}
|
|
103081
103351
|
}
|
|
103082
103352
|
function getUpToDateStatusWorker(state, project, resolvedPath) {
|
|
103083
|
-
var
|
|
103084
|
-
var newestInputFileName = undefined;
|
|
103085
|
-
var newestInputFileTime = minimumDate;
|
|
103086
|
-
var host = state.host;
|
|
103087
|
-
for (var _i = 0, _a = project.fileNames; _i < _a.length; _i++) {
|
|
103088
|
-
var inputFile = _a[_i];
|
|
103089
|
-
if (!host.fileExists(inputFile)) {
|
|
103090
|
-
return {
|
|
103091
|
-
type: ts.UpToDateStatusType.Unbuildable,
|
|
103092
|
-
reason: inputFile + " does not exist"
|
|
103093
|
-
};
|
|
103094
|
-
}
|
|
103095
|
-
if (!force) {
|
|
103096
|
-
var inputTime = ts.getModifiedTime(host, inputFile);
|
|
103097
|
-
if (inputTime > newestInputFileTime) {
|
|
103098
|
-
newestInputFileName = inputFile;
|
|
103099
|
-
newestInputFileTime = inputTime;
|
|
103100
|
-
}
|
|
103101
|
-
}
|
|
103102
|
-
}
|
|
103353
|
+
var _a, _b, _c;
|
|
103103
103354
|
if (!project.fileNames.length && !ts.canJsonReportNoInputFiles(project.raw)) {
|
|
103104
103355
|
return {
|
|
103105
103356
|
type: ts.UpToDateStatusType.ContainerOnly
|
|
103106
103357
|
};
|
|
103107
103358
|
}
|
|
103108
|
-
var
|
|
103109
|
-
var
|
|
103110
|
-
var oldestOutputFileTime = maximumDate;
|
|
103111
|
-
var newestOutputFileName = "(none)";
|
|
103112
|
-
var newestOutputFileTime = minimumDate;
|
|
103113
|
-
var missingOutputFileName;
|
|
103114
|
-
var newestDeclarationFileContentChangedTime = minimumDate;
|
|
103115
|
-
var isOutOfDateWithInputs = false;
|
|
103116
|
-
if (!force) {
|
|
103117
|
-
for (var _b = 0, outputs_1 = outputs; _b < outputs_1.length; _b++) {
|
|
103118
|
-
var output = outputs_1[_b];
|
|
103119
|
-
if (!host.fileExists(output)) {
|
|
103120
|
-
missingOutputFileName = output;
|
|
103121
|
-
break;
|
|
103122
|
-
}
|
|
103123
|
-
var outputTime = ts.getModifiedTime(host, output);
|
|
103124
|
-
if (outputTime < oldestOutputFileTime) {
|
|
103125
|
-
oldestOutputFileTime = outputTime;
|
|
103126
|
-
oldestOutputFileName = output;
|
|
103127
|
-
}
|
|
103128
|
-
if (outputTime < newestInputFileTime) {
|
|
103129
|
-
isOutOfDateWithInputs = true;
|
|
103130
|
-
break;
|
|
103131
|
-
}
|
|
103132
|
-
if (outputTime > newestOutputFileTime) {
|
|
103133
|
-
newestOutputFileTime = outputTime;
|
|
103134
|
-
newestOutputFileName = output;
|
|
103135
|
-
}
|
|
103136
|
-
if (ts.isDeclarationFileName(output)) {
|
|
103137
|
-
var outputModifiedTime = ts.getModifiedTime(host, output);
|
|
103138
|
-
newestDeclarationFileContentChangedTime = newer(newestDeclarationFileContentChangedTime, outputModifiedTime);
|
|
103139
|
-
}
|
|
103140
|
-
}
|
|
103141
|
-
}
|
|
103142
|
-
var pseudoUpToDate = false;
|
|
103143
|
-
var usesPrepend = false;
|
|
103144
|
-
var upstreamChangedProject;
|
|
103359
|
+
var referenceStatuses;
|
|
103360
|
+
var force = !!state.options.force;
|
|
103145
103361
|
if (project.projectReferences) {
|
|
103146
103362
|
state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.ComputingUpstream });
|
|
103147
|
-
for (var
|
|
103148
|
-
var ref = _d[
|
|
103149
|
-
usesPrepend = usesPrepend || !!(ref.prepend);
|
|
103363
|
+
for (var _i = 0, _d = project.projectReferences; _i < _d.length; _i++) {
|
|
103364
|
+
var ref = _d[_i];
|
|
103150
103365
|
var resolvedRef = ts.resolveProjectReferencePath(ref);
|
|
103151
103366
|
var resolvedRefPath = toResolvedConfigFilePath(state, resolvedRef);
|
|
103152
|
-
var
|
|
103367
|
+
var resolvedConfig = parseConfigFile(state, resolvedRef, resolvedRefPath);
|
|
103368
|
+
var refStatus = getUpToDateStatus(state, resolvedConfig, resolvedRefPath);
|
|
103153
103369
|
if (refStatus.type === ts.UpToDateStatusType.ComputingUpstream ||
|
|
103154
103370
|
refStatus.type === ts.UpToDateStatusType.ContainerOnly) {
|
|
103155
103371
|
continue;
|
|
@@ -103168,65 +103384,152 @@ var ts;
|
|
|
103168
103384
|
upstreamProjectName: ref.path
|
|
103169
103385
|
};
|
|
103170
103386
|
}
|
|
103171
|
-
if (!force
|
|
103172
|
-
|
|
103173
|
-
|
|
103174
|
-
|
|
103175
|
-
|
|
103176
|
-
|
|
103177
|
-
|
|
103178
|
-
|
|
103179
|
-
|
|
103180
|
-
|
|
103387
|
+
if (!force)
|
|
103388
|
+
(referenceStatuses || (referenceStatuses = [])).push({ ref: ref, refStatus: refStatus, resolvedRefPath: resolvedRefPath, resolvedConfig: resolvedConfig });
|
|
103389
|
+
}
|
|
103390
|
+
}
|
|
103391
|
+
if (force)
|
|
103392
|
+
return { type: ts.UpToDateStatusType.ForceBuild };
|
|
103393
|
+
var host = state.host;
|
|
103394
|
+
var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(project.options);
|
|
103395
|
+
var oldestOutputFileName = "(none)";
|
|
103396
|
+
var oldestOutputFileTime = maximumDate;
|
|
103397
|
+
var buildInfoTime;
|
|
103398
|
+
var newestDeclarationFileContentChangedTime;
|
|
103399
|
+
if (buildInfoPath) {
|
|
103400
|
+
var buildInfoCacheEntry_1 = getBuildInfoCacheEntry(state, buildInfoPath, resolvedPath);
|
|
103401
|
+
buildInfoTime = (buildInfoCacheEntry_1 === null || buildInfoCacheEntry_1 === void 0 ? void 0 : buildInfoCacheEntry_1.modifiedTime) || ts.getModifiedTime(host, buildInfoPath);
|
|
103402
|
+
if (buildInfoTime === ts.missingFileModifiedTime) {
|
|
103403
|
+
if (!buildInfoCacheEntry_1) {
|
|
103404
|
+
state.buildInfoCache.set(resolvedPath, {
|
|
103405
|
+
path: toPath(state, buildInfoPath),
|
|
103406
|
+
buildInfo: false,
|
|
103407
|
+
modifiedTime: buildInfoTime
|
|
103408
|
+
});
|
|
103409
|
+
}
|
|
103410
|
+
return {
|
|
103411
|
+
type: ts.UpToDateStatusType.OutputMissing,
|
|
103412
|
+
missingOutputFileName: buildInfoPath
|
|
103413
|
+
};
|
|
103414
|
+
}
|
|
103415
|
+
var buildInfo = ts.Debug.checkDefined(getBuildInfo(state, buildInfoPath, resolvedPath, buildInfoTime));
|
|
103416
|
+
if ((buildInfo.bundle || buildInfo.program) && buildInfo.version !== ts.version) {
|
|
103417
|
+
return {
|
|
103418
|
+
type: ts.UpToDateStatusType.TsVersionOutputOfDate,
|
|
103419
|
+
version: buildInfo.version
|
|
103420
|
+
};
|
|
103421
|
+
}
|
|
103422
|
+
if (buildInfo.program) {
|
|
103423
|
+
if (((_a = buildInfo.program.changeFileSet) === null || _a === void 0 ? void 0 : _a.length) ||
|
|
103424
|
+
(!project.options.noEmit && ((_b = buildInfo.program.affectedFilesPendingEmit) === null || _b === void 0 ? void 0 : _b.length))) {
|
|
103181
103425
|
return {
|
|
103182
|
-
type: ts.UpToDateStatusType.
|
|
103183
|
-
|
|
103184
|
-
newerProjectName: ref.path
|
|
103426
|
+
type: ts.UpToDateStatusType.OutOfDateBuildInfo,
|
|
103427
|
+
buildInfoFile: buildInfoPath
|
|
103185
103428
|
};
|
|
103186
103429
|
}
|
|
103187
103430
|
}
|
|
103431
|
+
oldestOutputFileTime = buildInfoTime;
|
|
103432
|
+
oldestOutputFileName = buildInfoPath;
|
|
103433
|
+
newestDeclarationFileContentChangedTime = ((_c = buildInfo.program) === null || _c === void 0 ? void 0 : _c.dtsChangeTime) ? new Date(buildInfo.program.dtsChangeTime) : undefined;
|
|
103188
103434
|
}
|
|
103189
|
-
|
|
103190
|
-
|
|
103191
|
-
|
|
103192
|
-
|
|
103193
|
-
|
|
103435
|
+
var newestInputFileName = undefined;
|
|
103436
|
+
var newestInputFileTime = minimumDate;
|
|
103437
|
+
for (var _e = 0, _f = project.fileNames; _e < _f.length; _e++) {
|
|
103438
|
+
var inputFile = _f[_e];
|
|
103439
|
+
var inputTime = getModifiedTime(state, inputFile);
|
|
103440
|
+
if (inputTime === ts.missingFileModifiedTime) {
|
|
103441
|
+
return {
|
|
103442
|
+
type: ts.UpToDateStatusType.Unbuildable,
|
|
103443
|
+
reason: inputFile + " does not exist"
|
|
103444
|
+
};
|
|
103445
|
+
}
|
|
103446
|
+
if (buildInfoTime && buildInfoTime < inputTime) {
|
|
103447
|
+
return {
|
|
103448
|
+
type: ts.UpToDateStatusType.OutOfDateWithSelf,
|
|
103449
|
+
outOfDateOutputFileName: buildInfoPath,
|
|
103450
|
+
newerInputFileName: inputFile
|
|
103451
|
+
};
|
|
103452
|
+
}
|
|
103453
|
+
if (inputTime > newestInputFileTime) {
|
|
103454
|
+
newestInputFileName = inputFile;
|
|
103455
|
+
newestInputFileTime = inputTime;
|
|
103456
|
+
}
|
|
103194
103457
|
}
|
|
103195
|
-
if (
|
|
103196
|
-
|
|
103197
|
-
|
|
103198
|
-
|
|
103199
|
-
|
|
103200
|
-
|
|
103458
|
+
if (!buildInfoPath) {
|
|
103459
|
+
var outputs = ts.getAllProjectOutputs(project, !host.useCaseSensitiveFileNames());
|
|
103460
|
+
var outputTimeStampMap = getOutputTimeStampMap(state, resolvedPath);
|
|
103461
|
+
for (var _g = 0, outputs_1 = outputs; _g < outputs_1.length; _g++) {
|
|
103462
|
+
var output = outputs_1[_g];
|
|
103463
|
+
var path = toPath(state, output);
|
|
103464
|
+
var outputTime = outputTimeStampMap === null || outputTimeStampMap === void 0 ? void 0 : outputTimeStampMap.get(path);
|
|
103465
|
+
if (!outputTime) {
|
|
103466
|
+
outputTime = ts.getModifiedTime(state.host, output);
|
|
103467
|
+
outputTimeStampMap === null || outputTimeStampMap === void 0 ? void 0 : outputTimeStampMap.set(path, outputTime);
|
|
103468
|
+
}
|
|
103469
|
+
if (outputTime === ts.missingFileModifiedTime) {
|
|
103470
|
+
return {
|
|
103471
|
+
type: ts.UpToDateStatusType.OutputMissing,
|
|
103472
|
+
missingOutputFileName: output
|
|
103473
|
+
};
|
|
103474
|
+
}
|
|
103475
|
+
if (outputTime < oldestOutputFileTime) {
|
|
103476
|
+
oldestOutputFileTime = outputTime;
|
|
103477
|
+
oldestOutputFileName = output;
|
|
103478
|
+
}
|
|
103479
|
+
if (outputTime < newestInputFileTime) {
|
|
103480
|
+
return {
|
|
103481
|
+
type: ts.UpToDateStatusType.OutOfDateWithSelf,
|
|
103482
|
+
outOfDateOutputFileName: oldestOutputFileName,
|
|
103483
|
+
newerInputFileName: newestInputFileName
|
|
103484
|
+
};
|
|
103485
|
+
}
|
|
103486
|
+
}
|
|
103201
103487
|
}
|
|
103202
|
-
|
|
103203
|
-
|
|
103204
|
-
|
|
103205
|
-
|
|
103206
|
-
|
|
103207
|
-
|
|
103208
|
-
|
|
103209
|
-
var
|
|
103210
|
-
var
|
|
103211
|
-
|
|
103212
|
-
|
|
103213
|
-
|
|
103214
|
-
|
|
103215
|
-
|
|
103216
|
-
if (!force && !state.buildInfoChecked.has(resolvedPath)) {
|
|
103217
|
-
state.buildInfoChecked.set(resolvedPath, true);
|
|
103218
|
-
var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(project.options);
|
|
103219
|
-
if (buildInfoPath) {
|
|
103220
|
-
var value = state.readFileWithCache(buildInfoPath);
|
|
103221
|
-
var buildInfo = value && ts.getBuildInfo(value);
|
|
103222
|
-
if (buildInfo && (buildInfo.bundle || buildInfo.program) && buildInfo.version !== ts.version) {
|
|
103488
|
+
var seenRefs = buildInfoPath ? new ts.Set() : undefined;
|
|
103489
|
+
var buildInfoCacheEntry = state.buildInfoCache.get(resolvedPath);
|
|
103490
|
+
seenRefs === null || seenRefs === void 0 ? void 0 : seenRefs.add(resolvedPath);
|
|
103491
|
+
var pseudoUpToDate = false;
|
|
103492
|
+
var usesPrepend = false;
|
|
103493
|
+
var upstreamChangedProject;
|
|
103494
|
+
if (referenceStatuses) {
|
|
103495
|
+
for (var _h = 0, referenceStatuses_1 = referenceStatuses; _h < referenceStatuses_1.length; _h++) {
|
|
103496
|
+
var _j = referenceStatuses_1[_h], ref = _j.ref, refStatus = _j.refStatus, resolvedConfig = _j.resolvedConfig, resolvedRefPath = _j.resolvedRefPath;
|
|
103497
|
+
usesPrepend = usesPrepend || !!(ref.prepend);
|
|
103498
|
+
if (refStatus.newestInputFileTime && refStatus.newestInputFileTime <= oldestOutputFileTime) {
|
|
103499
|
+
continue;
|
|
103500
|
+
}
|
|
103501
|
+
if (buildInfoCacheEntry && hasSameBuildInfo(state, buildInfoCacheEntry, seenRefs, resolvedConfig, resolvedRefPath)) {
|
|
103223
103502
|
return {
|
|
103224
|
-
type: ts.UpToDateStatusType.
|
|
103225
|
-
|
|
103503
|
+
type: ts.UpToDateStatusType.OutOfDateWithUpstream,
|
|
103504
|
+
outOfDateOutputFileName: buildInfoPath,
|
|
103505
|
+
newerProjectName: ref.path
|
|
103226
103506
|
};
|
|
103227
103507
|
}
|
|
103508
|
+
if (refStatus.newestDeclarationFileContentChangedTime && refStatus.newestDeclarationFileContentChangedTime <= oldestOutputFileTime) {
|
|
103509
|
+
pseudoUpToDate = true;
|
|
103510
|
+
upstreamChangedProject = ref.path;
|
|
103511
|
+
continue;
|
|
103512
|
+
}
|
|
103513
|
+
ts.Debug.assert(oldestOutputFileName !== undefined, "Should have an oldest output filename here");
|
|
103514
|
+
return {
|
|
103515
|
+
type: ts.UpToDateStatusType.OutOfDateWithUpstream,
|
|
103516
|
+
outOfDateOutputFileName: oldestOutputFileName,
|
|
103517
|
+
newerProjectName: ref.path
|
|
103518
|
+
};
|
|
103228
103519
|
}
|
|
103229
103520
|
}
|
|
103521
|
+
var configStatus = checkConfigFileUpToDateStatus(state, project.options.configFilePath, oldestOutputFileTime, oldestOutputFileName);
|
|
103522
|
+
if (configStatus)
|
|
103523
|
+
return configStatus;
|
|
103524
|
+
var extendedConfigStatus = ts.forEach(project.options.configFile.extendedSourceFiles || ts.emptyArray, function (configFile) { return checkConfigFileUpToDateStatus(state, configFile, oldestOutputFileTime, oldestOutputFileName); });
|
|
103525
|
+
if (extendedConfigStatus)
|
|
103526
|
+
return extendedConfigStatus;
|
|
103527
|
+
var dependentPackageFileStatus = ts.forEach(state.lastCachedPackageJsonLookups.get(resolvedPath) || ts.emptyArray, function (_a) {
|
|
103528
|
+
var path = _a[0];
|
|
103529
|
+
return checkConfigFileUpToDateStatus(state, path, oldestOutputFileTime, oldestOutputFileName);
|
|
103530
|
+
});
|
|
103531
|
+
if (dependentPackageFileStatus)
|
|
103532
|
+
return dependentPackageFileStatus;
|
|
103230
103533
|
if (usesPrepend && pseudoUpToDate) {
|
|
103231
103534
|
return {
|
|
103232
103535
|
type: ts.UpToDateStatusType.OutOfDateWithPrepend,
|
|
@@ -103238,12 +103541,29 @@ var ts;
|
|
|
103238
103541
|
type: pseudoUpToDate ? ts.UpToDateStatusType.UpToDateWithUpstreamTypes : ts.UpToDateStatusType.UpToDate,
|
|
103239
103542
|
newestDeclarationFileContentChangedTime: newestDeclarationFileContentChangedTime,
|
|
103240
103543
|
newestInputFileTime: newestInputFileTime,
|
|
103241
|
-
newestOutputFileTime: newestOutputFileTime,
|
|
103242
103544
|
newestInputFileName: newestInputFileName,
|
|
103243
|
-
newestOutputFileName: newestOutputFileName,
|
|
103244
103545
|
oldestOutputFileName: oldestOutputFileName
|
|
103245
103546
|
};
|
|
103246
103547
|
}
|
|
103548
|
+
function hasSameBuildInfo(state, buildInfoCacheEntry, seenRefs, resolvedConfig, resolvedRefPath) {
|
|
103549
|
+
if (seenRefs.has(resolvedRefPath))
|
|
103550
|
+
return false;
|
|
103551
|
+
seenRefs.add(resolvedRefPath);
|
|
103552
|
+
var refBuildInfo = state.buildInfoCache.get(resolvedRefPath);
|
|
103553
|
+
if (refBuildInfo.path === buildInfoCacheEntry.path)
|
|
103554
|
+
return true;
|
|
103555
|
+
if (resolvedConfig.projectReferences) {
|
|
103556
|
+
for (var _i = 0, _a = resolvedConfig.projectReferences; _i < _a.length; _i++) {
|
|
103557
|
+
var ref = _a[_i];
|
|
103558
|
+
var resolvedRef = ts.resolveProjectReferencePath(ref);
|
|
103559
|
+
var resolvedRefPath_1 = toResolvedConfigFilePath(state, resolvedRef);
|
|
103560
|
+
var resolvedConfig_1 = parseConfigFile(state, resolvedRef, resolvedRefPath_1);
|
|
103561
|
+
if (hasSameBuildInfo(state, buildInfoCacheEntry, seenRefs, resolvedConfig_1, resolvedRefPath_1))
|
|
103562
|
+
return true;
|
|
103563
|
+
}
|
|
103564
|
+
}
|
|
103565
|
+
return false;
|
|
103566
|
+
}
|
|
103247
103567
|
function getUpToDateStatus(state, project, resolvedPath) {
|
|
103248
103568
|
if (project === undefined) {
|
|
103249
103569
|
return { type: ts.UpToDateStatusType.Unbuildable, reason: "File deleted mid-build" };
|
|
@@ -103256,39 +103576,64 @@ var ts;
|
|
|
103256
103576
|
state.projectStatus.set(resolvedPath, actual);
|
|
103257
103577
|
return actual;
|
|
103258
103578
|
}
|
|
103259
|
-
function updateOutputTimestampsWorker(state, proj,
|
|
103579
|
+
function updateOutputTimestampsWorker(state, proj, projectPath, verboseMessage, skipOutputs) {
|
|
103260
103580
|
if (proj.options.noEmit)
|
|
103261
|
-
return
|
|
103581
|
+
return;
|
|
103582
|
+
var now;
|
|
103583
|
+
var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(proj.options);
|
|
103584
|
+
if (buildInfoPath) {
|
|
103585
|
+
if (!(skipOutputs === null || skipOutputs === void 0 ? void 0 : skipOutputs.has(toPath(state, buildInfoPath)))) {
|
|
103586
|
+
if (!!state.options.verbose)
|
|
103587
|
+
reportStatus(state, verboseMessage, proj.options.configFilePath);
|
|
103588
|
+
state.host.setModifiedTime(buildInfoPath, now = getCurrentTime(state.host));
|
|
103589
|
+
getBuildInfoCacheEntry(state, buildInfoPath, projectPath).modifiedTime = now;
|
|
103590
|
+
}
|
|
103591
|
+
state.outputTimeStamps.delete(projectPath);
|
|
103592
|
+
return;
|
|
103593
|
+
}
|
|
103262
103594
|
var host = state.host;
|
|
103263
103595
|
var outputs = ts.getAllProjectOutputs(proj, !host.useCaseSensitiveFileNames());
|
|
103596
|
+
var outputTimeStampMap = getOutputTimeStampMap(state, projectPath);
|
|
103597
|
+
var modifiedOutputs = outputTimeStampMap ? new ts.Set() : undefined;
|
|
103264
103598
|
if (!skipOutputs || outputs.length !== skipOutputs.size) {
|
|
103265
103599
|
var reportVerbose = !!state.options.verbose;
|
|
103266
|
-
var now = host.now ? host.now() : new Date();
|
|
103267
103600
|
for (var _i = 0, outputs_2 = outputs; _i < outputs_2.length; _i++) {
|
|
103268
103601
|
var file = outputs_2[_i];
|
|
103269
|
-
|
|
103602
|
+
var path = toPath(state, file);
|
|
103603
|
+
if (skipOutputs === null || skipOutputs === void 0 ? void 0 : skipOutputs.has(path))
|
|
103270
103604
|
continue;
|
|
103271
|
-
}
|
|
103272
103605
|
if (reportVerbose) {
|
|
103273
103606
|
reportVerbose = false;
|
|
103274
103607
|
reportStatus(state, verboseMessage, proj.options.configFilePath);
|
|
103275
103608
|
}
|
|
103276
|
-
|
|
103277
|
-
|
|
103609
|
+
host.setModifiedTime(file, now || (now = getCurrentTime(state.host)));
|
|
103610
|
+
if (outputTimeStampMap) {
|
|
103611
|
+
outputTimeStampMap.set(path, now);
|
|
103612
|
+
modifiedOutputs.add(path);
|
|
103278
103613
|
}
|
|
103279
|
-
host.setModifiedTime(file, now);
|
|
103280
103614
|
}
|
|
103281
103615
|
}
|
|
103282
|
-
|
|
103616
|
+
outputTimeStampMap === null || outputTimeStampMap === void 0 ? void 0 : outputTimeStampMap.forEach(function (_value, key) {
|
|
103617
|
+
if (!(skipOutputs === null || skipOutputs === void 0 ? void 0 : skipOutputs.has(key)) && !modifiedOutputs.has(key))
|
|
103618
|
+
outputTimeStampMap.delete(key);
|
|
103619
|
+
});
|
|
103620
|
+
}
|
|
103621
|
+
function getDtsChangeTime(state, options, resolvedConfigPath) {
|
|
103622
|
+
var _a;
|
|
103623
|
+
if (!options.composite)
|
|
103624
|
+
return undefined;
|
|
103625
|
+
var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(options);
|
|
103626
|
+
var buildInfo = getBuildInfo(state, buildInfoPath, resolvedConfigPath, undefined);
|
|
103627
|
+
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;
|
|
103283
103628
|
}
|
|
103284
103629
|
function updateOutputTimestamps(state, proj, resolvedPath) {
|
|
103285
103630
|
if (state.options.dry) {
|
|
103286
103631
|
return reportStatus(state, ts.Diagnostics.A_non_dry_build_would_update_timestamps_for_output_of_project_0, proj.options.configFilePath);
|
|
103287
103632
|
}
|
|
103288
|
-
|
|
103633
|
+
updateOutputTimestampsWorker(state, proj, resolvedPath, ts.Diagnostics.Updating_output_timestamps_of_project_0);
|
|
103289
103634
|
state.projectStatus.set(resolvedPath, {
|
|
103290
103635
|
type: ts.UpToDateStatusType.UpToDate,
|
|
103291
|
-
newestDeclarationFileContentChangedTime:
|
|
103636
|
+
newestDeclarationFileContentChangedTime: getDtsChangeTime(state, proj.options, resolvedPath),
|
|
103292
103637
|
oldestOutputFileName: ts.getFirstProjectOutput(proj, !state.host.useCaseSensitiveFileNames())
|
|
103293
103638
|
});
|
|
103294
103639
|
}
|
|
@@ -103470,12 +103815,10 @@ var ts;
|
|
|
103470
103815
|
function watchConfigFile(state, resolved, resolvedPath, parsed) {
|
|
103471
103816
|
if (!state.watch || state.allWatchedConfigFiles.has(resolvedPath))
|
|
103472
103817
|
return;
|
|
103473
|
-
state.allWatchedConfigFiles.set(resolvedPath,
|
|
103474
|
-
invalidateProjectAndScheduleBuilds(state, resolvedPath, ts.ConfigFileProgramReloadLevel.Full);
|
|
103475
|
-
}, ts.PollingInterval.High, parsed === null || parsed === void 0 ? void 0 : parsed.watchOptions, ts.WatchType.ConfigFile, resolved));
|
|
103818
|
+
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));
|
|
103476
103819
|
}
|
|
103477
103820
|
function watchExtendedConfigFiles(state, resolvedPath, parsed) {
|
|
103478
|
-
ts.updateSharedExtendedConfigFileWatcher(resolvedPath, parsed === null || parsed === void 0 ? void 0 : parsed.options, state.allWatchedExtendedConfigFiles, function (extendedConfigFileName, extendedConfigFilePath) { return
|
|
103821
|
+
ts.updateSharedExtendedConfigFileWatcher(resolvedPath, parsed === null || parsed === void 0 ? void 0 : parsed.options, state.allWatchedExtendedConfigFiles, function (extendedConfigFileName, extendedConfigFilePath) { return watchFile(state, extendedConfigFileName, function () {
|
|
103479
103822
|
var _a;
|
|
103480
103823
|
return (_a = state.allWatchedExtendedConfigFiles.get(extendedConfigFilePath)) === null || _a === void 0 ? void 0 : _a.projects.forEach(function (projectConfigFilePath) {
|
|
103481
103824
|
return invalidateProjectAndScheduleBuilds(state, projectConfigFilePath, ts.ConfigFileProgramReloadLevel.Full);
|
|
@@ -103507,7 +103850,7 @@ var ts;
|
|
|
103507
103850
|
if (!state.watch)
|
|
103508
103851
|
return;
|
|
103509
103852
|
ts.mutateMap(getOrCreateValueMapFromConfigFileMap(state.allWatchedInputFiles, resolvedPath), ts.arrayToMap(parsed.fileNames, function (fileName) { return toPath(state, fileName); }), {
|
|
103510
|
-
createNewValue: function (_path, input) { return
|
|
103853
|
+
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); },
|
|
103511
103854
|
onDeleteValue: ts.closeFileWatcher,
|
|
103512
103855
|
});
|
|
103513
103856
|
}
|
|
@@ -103515,7 +103858,7 @@ var ts;
|
|
|
103515
103858
|
if (!state.watch || !state.lastCachedPackageJsonLookups)
|
|
103516
103859
|
return;
|
|
103517
103860
|
ts.mutateMap(getOrCreateValueMapFromConfigFileMap(state.allWatchedPackageJsonFiles, resolvedPath), new ts.Map(state.lastCachedPackageJsonLookups.get(resolvedPath)), {
|
|
103518
|
-
createNewValue: function (path, _input) { return
|
|
103861
|
+
createNewValue: function (path, _input) { return watchFile(state, path, function () { return invalidateProjectAndScheduleBuilds(state, resolvedPath, ts.ConfigFileProgramReloadLevel.Full); }, ts.PollingInterval.High, parsed === null || parsed === void 0 ? void 0 : parsed.watchOptions, ts.WatchType.PackageJson, resolved); },
|
|
103519
103862
|
onDeleteValue: ts.closeFileWatcher,
|
|
103520
103863
|
});
|
|
103521
103864
|
}
|
|
@@ -103639,19 +103982,18 @@ var ts;
|
|
|
103639
103982
|
}
|
|
103640
103983
|
}
|
|
103641
103984
|
function reportUpToDateStatus(state, configFileName, status) {
|
|
103642
|
-
if (state.options.force && (status.type === ts.UpToDateStatusType.UpToDate || status.type === ts.UpToDateStatusType.UpToDateWithUpstreamTypes)) {
|
|
103643
|
-
return reportStatus(state, ts.Diagnostics.Project_0_is_being_forcibly_rebuilt, relName(state, configFileName));
|
|
103644
|
-
}
|
|
103645
103985
|
switch (status.type) {
|
|
103646
103986
|
case ts.UpToDateStatusType.OutOfDateWithSelf:
|
|
103647
|
-
return reportStatus(state, ts.Diagnostics.
|
|
103987
|
+
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));
|
|
103648
103988
|
case ts.UpToDateStatusType.OutOfDateWithUpstream:
|
|
103649
|
-
return reportStatus(state, ts.Diagnostics.
|
|
103989
|
+
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));
|
|
103650
103990
|
case ts.UpToDateStatusType.OutputMissing:
|
|
103651
103991
|
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));
|
|
103992
|
+
case ts.UpToDateStatusType.OutOfDateBuildInfo:
|
|
103993
|
+
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));
|
|
103652
103994
|
case ts.UpToDateStatusType.UpToDate:
|
|
103653
103995
|
if (status.newestInputFileTime !== undefined) {
|
|
103654
|
-
return reportStatus(state, ts.Diagnostics.
|
|
103996
|
+
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 || ""));
|
|
103655
103997
|
}
|
|
103656
103998
|
break;
|
|
103657
103999
|
case ts.UpToDateStatusType.OutOfDateWithPrepend:
|
|
@@ -103668,6 +104010,8 @@ var ts;
|
|
|
103668
104010
|
return reportStatus(state, ts.Diagnostics.Failed_to_parse_file_0_Colon_1, relName(state, configFileName), status.reason);
|
|
103669
104011
|
case ts.UpToDateStatusType.TsVersionOutputOfDate:
|
|
103670
104012
|
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);
|
|
104013
|
+
case ts.UpToDateStatusType.ForceBuild:
|
|
104014
|
+
return reportStatus(state, ts.Diagnostics.Project_0_is_being_forcibly_rebuilt, relName(state, configFileName));
|
|
103671
104015
|
case ts.UpToDateStatusType.ContainerOnly:
|
|
103672
104016
|
case ts.UpToDateStatusType.ComputingUpstream:
|
|
103673
104017
|
break;
|