@typescript-deploys/pr-build 4.7.0-pr-48861-16 → 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 +827 -511
- package/lib/tsserver.js +869 -571
- package/lib/tsserverlibrary.d.ts +1 -1
- package/lib/tsserverlibrary.js +869 -571
- package/lib/typescript.d.ts +1 -1
- package/lib/typescript.js +869 -571
- package/lib/typescriptServices.d.ts +1 -1
- package/lib/typescriptServices.js +869 -571
- package/lib/typingsInstaller.js +869 -571
- package/package.json +1 -1
package/lib/tsc.js
CHANGED
|
@@ -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 {
|
|
@@ -6485,8 +6494,8 @@ var ts;
|
|
|
6485
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"),
|
|
6486
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"),
|
|
6487
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."),
|
|
6488
|
-
|
|
6489
|
-
|
|
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}'"),
|
|
6490
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"),
|
|
6491
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"),
|
|
6492
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"),
|
|
@@ -6530,6 +6539,7 @@ var ts;
|
|
|
6530
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}'."),
|
|
6531
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}'."),
|
|
6532
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"),
|
|
6533
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}'"),
|
|
6534
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."),
|
|
6535
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."),
|
|
@@ -15976,6 +15986,10 @@ var ts;
|
|
|
15976
15986
|
return optionsHaveChanges(oldOptions, newOptions, ts.affectsEmitOptionDeclarations);
|
|
15977
15987
|
}
|
|
15978
15988
|
ts.compilerOptionsAffectEmit = compilerOptionsAffectEmit;
|
|
15989
|
+
function compilerOptionsAffectDeclarationPath(newOptions, oldOptions) {
|
|
15990
|
+
return optionsHaveChanges(oldOptions, newOptions, ts.affectsDeclarationPathOptionDeclarations);
|
|
15991
|
+
}
|
|
15992
|
+
ts.compilerOptionsAffectDeclarationPath = compilerOptionsAffectDeclarationPath;
|
|
15979
15993
|
function getCompilerOptionValue(options, option) {
|
|
15980
15994
|
return option.strictFlag ? getStrictOptionValue(options, option.name) : options[option.name];
|
|
15981
15995
|
}
|
|
@@ -31670,6 +31684,7 @@ var ts;
|
|
|
31670
31684
|
type: "boolean",
|
|
31671
31685
|
affectsSemanticDiagnostics: true,
|
|
31672
31686
|
affectsEmit: true,
|
|
31687
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31673
31688
|
category: ts.Diagnostics.Watch_and_Build_Modes,
|
|
31674
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,
|
|
31675
31690
|
defaultValueDescription: false,
|
|
@@ -31703,12 +31718,39 @@ var ts;
|
|
|
31703
31718
|
affectsSourceFile: true,
|
|
31704
31719
|
affectsModuleResolution: true,
|
|
31705
31720
|
affectsEmit: true,
|
|
31721
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31706
31722
|
paramType: ts.Diagnostics.VERSION,
|
|
31707
31723
|
showInSimplifiedHelpView: true,
|
|
31708
31724
|
category: ts.Diagnostics.Language_and_Environment,
|
|
31709
31725
|
description: ts.Diagnostics.Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations,
|
|
31710
31726
|
defaultValueDescription: 0,
|
|
31711
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
|
+
};
|
|
31712
31754
|
var commandOptionsWithoutBuild = [
|
|
31713
31755
|
{
|
|
31714
31756
|
name: "all",
|
|
@@ -31769,36 +31811,13 @@ var ts;
|
|
|
31769
31811
|
category: ts.Diagnostics.Command_line_Options,
|
|
31770
31812
|
affectsSemanticDiagnostics: true,
|
|
31771
31813
|
affectsEmit: true,
|
|
31814
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31772
31815
|
isCommandLineOnly: true,
|
|
31773
31816
|
description: ts.Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing,
|
|
31774
31817
|
defaultValueDescription: false,
|
|
31775
31818
|
},
|
|
31776
31819
|
ts.targetOptionDeclaration,
|
|
31777
|
-
|
|
31778
|
-
name: "module",
|
|
31779
|
-
shortName: "m",
|
|
31780
|
-
type: new ts.Map(ts.getEntries({
|
|
31781
|
-
none: ts.ModuleKind.None,
|
|
31782
|
-
commonjs: ts.ModuleKind.CommonJS,
|
|
31783
|
-
amd: ts.ModuleKind.AMD,
|
|
31784
|
-
system: ts.ModuleKind.System,
|
|
31785
|
-
umd: ts.ModuleKind.UMD,
|
|
31786
|
-
es6: ts.ModuleKind.ES2015,
|
|
31787
|
-
es2015: ts.ModuleKind.ES2015,
|
|
31788
|
-
es2020: ts.ModuleKind.ES2020,
|
|
31789
|
-
es2022: ts.ModuleKind.ES2022,
|
|
31790
|
-
esnext: ts.ModuleKind.ESNext,
|
|
31791
|
-
node12: ts.ModuleKind.Node12,
|
|
31792
|
-
nodenext: ts.ModuleKind.NodeNext,
|
|
31793
|
-
})),
|
|
31794
|
-
affectsModuleResolution: true,
|
|
31795
|
-
affectsEmit: true,
|
|
31796
|
-
paramType: ts.Diagnostics.KIND,
|
|
31797
|
-
showInSimplifiedHelpView: true,
|
|
31798
|
-
category: ts.Diagnostics.Modules,
|
|
31799
|
-
description: ts.Diagnostics.Specify_what_module_code_is_generated,
|
|
31800
|
-
defaultValueDescription: undefined,
|
|
31801
|
-
},
|
|
31820
|
+
ts.moduleOptionDeclaration,
|
|
31802
31821
|
{
|
|
31803
31822
|
name: "lib",
|
|
31804
31823
|
type: "list",
|
|
@@ -31835,6 +31854,7 @@ var ts;
|
|
|
31835
31854
|
type: jsxOptionMap,
|
|
31836
31855
|
affectsSourceFile: true,
|
|
31837
31856
|
affectsEmit: true,
|
|
31857
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31838
31858
|
affectsModuleResolution: true,
|
|
31839
31859
|
paramType: ts.Diagnostics.KIND,
|
|
31840
31860
|
showInSimplifiedHelpView: true,
|
|
@@ -31847,6 +31867,7 @@ var ts;
|
|
|
31847
31867
|
shortName: "d",
|
|
31848
31868
|
type: "boolean",
|
|
31849
31869
|
affectsEmit: true,
|
|
31870
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31850
31871
|
showInSimplifiedHelpView: true,
|
|
31851
31872
|
category: ts.Diagnostics.Emit,
|
|
31852
31873
|
transpileOptionValue: undefined,
|
|
@@ -31857,6 +31878,7 @@ var ts;
|
|
|
31857
31878
|
name: "declarationMap",
|
|
31858
31879
|
type: "boolean",
|
|
31859
31880
|
affectsEmit: true,
|
|
31881
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31860
31882
|
showInSimplifiedHelpView: true,
|
|
31861
31883
|
category: ts.Diagnostics.Emit,
|
|
31862
31884
|
transpileOptionValue: undefined,
|
|
@@ -31867,6 +31889,7 @@ var ts;
|
|
|
31867
31889
|
name: "emitDeclarationOnly",
|
|
31868
31890
|
type: "boolean",
|
|
31869
31891
|
affectsEmit: true,
|
|
31892
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31870
31893
|
showInSimplifiedHelpView: true,
|
|
31871
31894
|
category: ts.Diagnostics.Emit,
|
|
31872
31895
|
description: ts.Diagnostics.Only_output_d_ts_files_and_not_JavaScript_files,
|
|
@@ -31877,6 +31900,7 @@ var ts;
|
|
|
31877
31900
|
name: "sourceMap",
|
|
31878
31901
|
type: "boolean",
|
|
31879
31902
|
affectsEmit: true,
|
|
31903
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31880
31904
|
showInSimplifiedHelpView: true,
|
|
31881
31905
|
category: ts.Diagnostics.Emit,
|
|
31882
31906
|
defaultValueDescription: false,
|
|
@@ -31886,6 +31910,9 @@ var ts;
|
|
|
31886
31910
|
name: "outFile",
|
|
31887
31911
|
type: "string",
|
|
31888
31912
|
affectsEmit: true,
|
|
31913
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31914
|
+
affectsDeclarationPath: true,
|
|
31915
|
+
affectsBundleEmitBuildInfo: true,
|
|
31889
31916
|
isFilePath: true,
|
|
31890
31917
|
paramType: ts.Diagnostics.FILE,
|
|
31891
31918
|
showInSimplifiedHelpView: true,
|
|
@@ -31897,6 +31924,8 @@ var ts;
|
|
|
31897
31924
|
name: "outDir",
|
|
31898
31925
|
type: "string",
|
|
31899
31926
|
affectsEmit: true,
|
|
31927
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31928
|
+
affectsDeclarationPath: true,
|
|
31900
31929
|
isFilePath: true,
|
|
31901
31930
|
paramType: ts.Diagnostics.DIRECTORY,
|
|
31902
31931
|
showInSimplifiedHelpView: true,
|
|
@@ -31907,6 +31936,8 @@ var ts;
|
|
|
31907
31936
|
name: "rootDir",
|
|
31908
31937
|
type: "string",
|
|
31909
31938
|
affectsEmit: true,
|
|
31939
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31940
|
+
affectsDeclarationPath: true,
|
|
31910
31941
|
isFilePath: true,
|
|
31911
31942
|
paramType: ts.Diagnostics.LOCATION,
|
|
31912
31943
|
category: ts.Diagnostics.Modules,
|
|
@@ -31917,6 +31948,8 @@ var ts;
|
|
|
31917
31948
|
name: "composite",
|
|
31918
31949
|
type: "boolean",
|
|
31919
31950
|
affectsEmit: true,
|
|
31951
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31952
|
+
affectsBundleEmitBuildInfo: true,
|
|
31920
31953
|
isTSConfigOnly: true,
|
|
31921
31954
|
category: ts.Diagnostics.Projects,
|
|
31922
31955
|
transpileOptionValue: undefined,
|
|
@@ -31927,6 +31960,8 @@ var ts;
|
|
|
31927
31960
|
name: "tsBuildInfoFile",
|
|
31928
31961
|
type: "string",
|
|
31929
31962
|
affectsEmit: true,
|
|
31963
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31964
|
+
affectsBundleEmitBuildInfo: true,
|
|
31930
31965
|
isFilePath: true,
|
|
31931
31966
|
paramType: ts.Diagnostics.FILE,
|
|
31932
31967
|
category: ts.Diagnostics.Projects,
|
|
@@ -31938,6 +31973,7 @@ var ts;
|
|
|
31938
31973
|
name: "removeComments",
|
|
31939
31974
|
type: "boolean",
|
|
31940
31975
|
affectsEmit: true,
|
|
31976
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31941
31977
|
showInSimplifiedHelpView: true,
|
|
31942
31978
|
category: ts.Diagnostics.Emit,
|
|
31943
31979
|
defaultValueDescription: false,
|
|
@@ -31956,6 +31992,7 @@ var ts;
|
|
|
31956
31992
|
name: "importHelpers",
|
|
31957
31993
|
type: "boolean",
|
|
31958
31994
|
affectsEmit: true,
|
|
31995
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31959
31996
|
category: ts.Diagnostics.Emit,
|
|
31960
31997
|
description: ts.Diagnostics.Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file,
|
|
31961
31998
|
defaultValueDescription: false,
|
|
@@ -31969,6 +32006,7 @@ var ts;
|
|
|
31969
32006
|
})),
|
|
31970
32007
|
affectsEmit: true,
|
|
31971
32008
|
affectsSemanticDiagnostics: true,
|
|
32009
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31972
32010
|
category: ts.Diagnostics.Emit,
|
|
31973
32011
|
description: ts.Diagnostics.Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types,
|
|
31974
32012
|
defaultValueDescription: 0,
|
|
@@ -31977,6 +32015,7 @@ var ts;
|
|
|
31977
32015
|
name: "downlevelIteration",
|
|
31978
32016
|
type: "boolean",
|
|
31979
32017
|
affectsEmit: true,
|
|
32018
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31980
32019
|
category: ts.Diagnostics.Emit,
|
|
31981
32020
|
description: ts.Diagnostics.Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration,
|
|
31982
32021
|
defaultValueDescription: false,
|
|
@@ -31992,6 +32031,7 @@ var ts;
|
|
|
31992
32031
|
{
|
|
31993
32032
|
name: "strict",
|
|
31994
32033
|
type: "boolean",
|
|
32034
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
31995
32035
|
showInSimplifiedHelpView: true,
|
|
31996
32036
|
category: ts.Diagnostics.Type_Checking,
|
|
31997
32037
|
description: ts.Diagnostics.Enable_all_strict_type_checking_options,
|
|
@@ -32001,6 +32041,7 @@ var ts;
|
|
|
32001
32041
|
name: "noImplicitAny",
|
|
32002
32042
|
type: "boolean",
|
|
32003
32043
|
affectsSemanticDiagnostics: true,
|
|
32044
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32004
32045
|
strictFlag: true,
|
|
32005
32046
|
category: ts.Diagnostics.Type_Checking,
|
|
32006
32047
|
description: ts.Diagnostics.Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type,
|
|
@@ -32010,6 +32051,7 @@ var ts;
|
|
|
32010
32051
|
name: "strictNullChecks",
|
|
32011
32052
|
type: "boolean",
|
|
32012
32053
|
affectsSemanticDiagnostics: true,
|
|
32054
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32013
32055
|
strictFlag: true,
|
|
32014
32056
|
category: ts.Diagnostics.Type_Checking,
|
|
32015
32057
|
description: ts.Diagnostics.When_type_checking_take_into_account_null_and_undefined,
|
|
@@ -32018,6 +32060,8 @@ var ts;
|
|
|
32018
32060
|
{
|
|
32019
32061
|
name: "strictFunctionTypes",
|
|
32020
32062
|
type: "boolean",
|
|
32063
|
+
affectsSemanticDiagnostics: true,
|
|
32064
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32021
32065
|
strictFlag: true,
|
|
32022
32066
|
category: ts.Diagnostics.Type_Checking,
|
|
32023
32067
|
description: ts.Diagnostics.When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible,
|
|
@@ -32026,6 +32070,8 @@ var ts;
|
|
|
32026
32070
|
{
|
|
32027
32071
|
name: "strictBindCallApply",
|
|
32028
32072
|
type: "boolean",
|
|
32073
|
+
affectsSemanticDiagnostics: true,
|
|
32074
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32029
32075
|
strictFlag: true,
|
|
32030
32076
|
category: ts.Diagnostics.Type_Checking,
|
|
32031
32077
|
description: ts.Diagnostics.Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function,
|
|
@@ -32035,6 +32081,7 @@ var ts;
|
|
|
32035
32081
|
name: "strictPropertyInitialization",
|
|
32036
32082
|
type: "boolean",
|
|
32037
32083
|
affectsSemanticDiagnostics: true,
|
|
32084
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32038
32085
|
strictFlag: true,
|
|
32039
32086
|
category: ts.Diagnostics.Type_Checking,
|
|
32040
32087
|
description: ts.Diagnostics.Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor,
|
|
@@ -32044,6 +32091,7 @@ var ts;
|
|
|
32044
32091
|
name: "noImplicitThis",
|
|
32045
32092
|
type: "boolean",
|
|
32046
32093
|
affectsSemanticDiagnostics: true,
|
|
32094
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32047
32095
|
strictFlag: true,
|
|
32048
32096
|
category: ts.Diagnostics.Type_Checking,
|
|
32049
32097
|
description: ts.Diagnostics.Enable_error_reporting_when_this_is_given_the_type_any,
|
|
@@ -32053,6 +32101,7 @@ var ts;
|
|
|
32053
32101
|
name: "useUnknownInCatchVariables",
|
|
32054
32102
|
type: "boolean",
|
|
32055
32103
|
affectsSemanticDiagnostics: true,
|
|
32104
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32056
32105
|
strictFlag: true,
|
|
32057
32106
|
category: ts.Diagnostics.Type_Checking,
|
|
32058
32107
|
description: ts.Diagnostics.Default_catch_clause_variables_as_unknown_instead_of_any,
|
|
@@ -32062,6 +32111,8 @@ var ts;
|
|
|
32062
32111
|
name: "alwaysStrict",
|
|
32063
32112
|
type: "boolean",
|
|
32064
32113
|
affectsSourceFile: true,
|
|
32114
|
+
affectsEmit: true,
|
|
32115
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32065
32116
|
strictFlag: true,
|
|
32066
32117
|
category: ts.Diagnostics.Type_Checking,
|
|
32067
32118
|
description: ts.Diagnostics.Ensure_use_strict_is_always_emitted,
|
|
@@ -32071,6 +32122,7 @@ var ts;
|
|
|
32071
32122
|
name: "noUnusedLocals",
|
|
32072
32123
|
type: "boolean",
|
|
32073
32124
|
affectsSemanticDiagnostics: true,
|
|
32125
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32074
32126
|
category: ts.Diagnostics.Type_Checking,
|
|
32075
32127
|
description: ts.Diagnostics.Enable_error_reporting_when_local_variables_aren_t_read,
|
|
32076
32128
|
defaultValueDescription: false,
|
|
@@ -32079,6 +32131,7 @@ var ts;
|
|
|
32079
32131
|
name: "noUnusedParameters",
|
|
32080
32132
|
type: "boolean",
|
|
32081
32133
|
affectsSemanticDiagnostics: true,
|
|
32134
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32082
32135
|
category: ts.Diagnostics.Type_Checking,
|
|
32083
32136
|
description: ts.Diagnostics.Raise_an_error_when_a_function_parameter_isn_t_read,
|
|
32084
32137
|
defaultValueDescription: false,
|
|
@@ -32087,6 +32140,7 @@ var ts;
|
|
|
32087
32140
|
name: "exactOptionalPropertyTypes",
|
|
32088
32141
|
type: "boolean",
|
|
32089
32142
|
affectsSemanticDiagnostics: true,
|
|
32143
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32090
32144
|
category: ts.Diagnostics.Type_Checking,
|
|
32091
32145
|
description: ts.Diagnostics.Interpret_optional_property_types_as_written_rather_than_adding_undefined,
|
|
32092
32146
|
defaultValueDescription: false,
|
|
@@ -32095,6 +32149,7 @@ var ts;
|
|
|
32095
32149
|
name: "noImplicitReturns",
|
|
32096
32150
|
type: "boolean",
|
|
32097
32151
|
affectsSemanticDiagnostics: true,
|
|
32152
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32098
32153
|
category: ts.Diagnostics.Type_Checking,
|
|
32099
32154
|
description: ts.Diagnostics.Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function,
|
|
32100
32155
|
defaultValueDescription: false,
|
|
@@ -32104,6 +32159,7 @@ var ts;
|
|
|
32104
32159
|
type: "boolean",
|
|
32105
32160
|
affectsBindDiagnostics: true,
|
|
32106
32161
|
affectsSemanticDiagnostics: true,
|
|
32162
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32107
32163
|
category: ts.Diagnostics.Type_Checking,
|
|
32108
32164
|
description: ts.Diagnostics.Enable_error_reporting_for_fallthrough_cases_in_switch_statements,
|
|
32109
32165
|
defaultValueDescription: false,
|
|
@@ -32112,6 +32168,7 @@ var ts;
|
|
|
32112
32168
|
name: "noUncheckedIndexedAccess",
|
|
32113
32169
|
type: "boolean",
|
|
32114
32170
|
affectsSemanticDiagnostics: true,
|
|
32171
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32115
32172
|
category: ts.Diagnostics.Type_Checking,
|
|
32116
32173
|
description: ts.Diagnostics.Add_undefined_to_a_type_when_accessed_using_an_index,
|
|
32117
32174
|
defaultValueDescription: false,
|
|
@@ -32120,6 +32177,7 @@ var ts;
|
|
|
32120
32177
|
name: "noImplicitOverride",
|
|
32121
32178
|
type: "boolean",
|
|
32122
32179
|
affectsSemanticDiagnostics: true,
|
|
32180
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32123
32181
|
category: ts.Diagnostics.Type_Checking,
|
|
32124
32182
|
description: ts.Diagnostics.Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier,
|
|
32125
32183
|
defaultValueDescription: false,
|
|
@@ -32127,6 +32185,8 @@ var ts;
|
|
|
32127
32185
|
{
|
|
32128
32186
|
name: "noPropertyAccessFromIndexSignature",
|
|
32129
32187
|
type: "boolean",
|
|
32188
|
+
affectsSemanticDiagnostics: true,
|
|
32189
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32130
32190
|
showInSimplifiedHelpView: false,
|
|
32131
32191
|
category: ts.Diagnostics.Type_Checking,
|
|
32132
32192
|
description: ts.Diagnostics.Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type,
|
|
@@ -32207,6 +32267,7 @@ var ts;
|
|
|
32207
32267
|
name: "allowSyntheticDefaultImports",
|
|
32208
32268
|
type: "boolean",
|
|
32209
32269
|
affectsSemanticDiagnostics: true,
|
|
32270
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32210
32271
|
category: ts.Diagnostics.Interop_Constraints,
|
|
32211
32272
|
description: ts.Diagnostics.Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export,
|
|
32212
32273
|
defaultValueDescription: ts.Diagnostics.module_system_or_esModuleInterop
|
|
@@ -32216,6 +32277,7 @@ var ts;
|
|
|
32216
32277
|
type: "boolean",
|
|
32217
32278
|
affectsSemanticDiagnostics: true,
|
|
32218
32279
|
affectsEmit: true,
|
|
32280
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32219
32281
|
showInSimplifiedHelpView: true,
|
|
32220
32282
|
category: ts.Diagnostics.Interop_Constraints,
|
|
32221
32283
|
description: ts.Diagnostics.Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility,
|
|
@@ -32232,6 +32294,7 @@ var ts;
|
|
|
32232
32294
|
name: "allowUmdGlobalAccess",
|
|
32233
32295
|
type: "boolean",
|
|
32234
32296
|
affectsSemanticDiagnostics: true,
|
|
32297
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32235
32298
|
category: ts.Diagnostics.Modules,
|
|
32236
32299
|
description: ts.Diagnostics.Allow_accessing_UMD_globals_from_modules,
|
|
32237
32300
|
defaultValueDescription: false,
|
|
@@ -32252,6 +32315,7 @@ var ts;
|
|
|
32252
32315
|
name: "sourceRoot",
|
|
32253
32316
|
type: "string",
|
|
32254
32317
|
affectsEmit: true,
|
|
32318
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32255
32319
|
paramType: ts.Diagnostics.LOCATION,
|
|
32256
32320
|
category: ts.Diagnostics.Emit,
|
|
32257
32321
|
description: ts.Diagnostics.Specify_the_root_path_for_debuggers_to_find_the_reference_source_code,
|
|
@@ -32260,6 +32324,7 @@ var ts;
|
|
|
32260
32324
|
name: "mapRoot",
|
|
32261
32325
|
type: "string",
|
|
32262
32326
|
affectsEmit: true,
|
|
32327
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32263
32328
|
paramType: ts.Diagnostics.LOCATION,
|
|
32264
32329
|
category: ts.Diagnostics.Emit,
|
|
32265
32330
|
description: ts.Diagnostics.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations,
|
|
@@ -32268,6 +32333,7 @@ var ts;
|
|
|
32268
32333
|
name: "inlineSourceMap",
|
|
32269
32334
|
type: "boolean",
|
|
32270
32335
|
affectsEmit: true,
|
|
32336
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32271
32337
|
category: ts.Diagnostics.Emit,
|
|
32272
32338
|
description: ts.Diagnostics.Include_sourcemap_files_inside_the_emitted_JavaScript,
|
|
32273
32339
|
defaultValueDescription: false,
|
|
@@ -32276,6 +32342,7 @@ var ts;
|
|
|
32276
32342
|
name: "inlineSources",
|
|
32277
32343
|
type: "boolean",
|
|
32278
32344
|
affectsEmit: true,
|
|
32345
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32279
32346
|
category: ts.Diagnostics.Emit,
|
|
32280
32347
|
description: ts.Diagnostics.Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript,
|
|
32281
32348
|
defaultValueDescription: false,
|
|
@@ -32284,6 +32351,7 @@ var ts;
|
|
|
32284
32351
|
name: "experimentalDecorators",
|
|
32285
32352
|
type: "boolean",
|
|
32286
32353
|
affectsSemanticDiagnostics: true,
|
|
32354
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32287
32355
|
category: ts.Diagnostics.Language_and_Environment,
|
|
32288
32356
|
description: ts.Diagnostics.Enable_experimental_support_for_TC39_stage_2_draft_decorators,
|
|
32289
32357
|
defaultValueDescription: false,
|
|
@@ -32293,6 +32361,7 @@ var ts;
|
|
|
32293
32361
|
type: "boolean",
|
|
32294
32362
|
affectsSemanticDiagnostics: true,
|
|
32295
32363
|
affectsEmit: true,
|
|
32364
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32296
32365
|
category: ts.Diagnostics.Language_and_Environment,
|
|
32297
32366
|
description: ts.Diagnostics.Emit_design_type_metadata_for_decorated_declarations_in_source_files,
|
|
32298
32367
|
defaultValueDescription: false,
|
|
@@ -32316,6 +32385,7 @@ var ts;
|
|
|
32316
32385
|
type: "string",
|
|
32317
32386
|
affectsSemanticDiagnostics: true,
|
|
32318
32387
|
affectsEmit: true,
|
|
32388
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32319
32389
|
affectsModuleResolution: true,
|
|
32320
32390
|
category: ts.Diagnostics.Language_and_Environment,
|
|
32321
32391
|
description: ts.Diagnostics.Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk,
|
|
@@ -32333,6 +32403,9 @@ var ts;
|
|
|
32333
32403
|
name: "out",
|
|
32334
32404
|
type: "string",
|
|
32335
32405
|
affectsEmit: true,
|
|
32406
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32407
|
+
affectsDeclarationPath: true,
|
|
32408
|
+
affectsBundleEmitBuildInfo: true,
|
|
32336
32409
|
isFilePath: false,
|
|
32337
32410
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
32338
32411
|
paramType: ts.Diagnostics.FILE,
|
|
@@ -32343,6 +32416,7 @@ var ts;
|
|
|
32343
32416
|
name: "reactNamespace",
|
|
32344
32417
|
type: "string",
|
|
32345
32418
|
affectsEmit: true,
|
|
32419
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32346
32420
|
category: ts.Diagnostics.Language_and_Environment,
|
|
32347
32421
|
description: ts.Diagnostics.Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit,
|
|
32348
32422
|
defaultValueDescription: "`React`",
|
|
@@ -32350,6 +32424,7 @@ var ts;
|
|
|
32350
32424
|
{
|
|
32351
32425
|
name: "skipDefaultLibCheck",
|
|
32352
32426
|
type: "boolean",
|
|
32427
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32353
32428
|
category: ts.Diagnostics.Completeness,
|
|
32354
32429
|
description: ts.Diagnostics.Skip_type_checking_d_ts_files_that_are_included_with_TypeScript,
|
|
32355
32430
|
defaultValueDescription: false,
|
|
@@ -32365,6 +32440,7 @@ var ts;
|
|
|
32365
32440
|
name: "emitBOM",
|
|
32366
32441
|
type: "boolean",
|
|
32367
32442
|
affectsEmit: true,
|
|
32443
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32368
32444
|
category: ts.Diagnostics.Emit,
|
|
32369
32445
|
description: ts.Diagnostics.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files,
|
|
32370
32446
|
defaultValueDescription: false,
|
|
@@ -32376,6 +32452,7 @@ var ts;
|
|
|
32376
32452
|
lf: 1
|
|
32377
32453
|
})),
|
|
32378
32454
|
affectsEmit: true,
|
|
32455
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32379
32456
|
paramType: ts.Diagnostics.NEWLINE,
|
|
32380
32457
|
category: ts.Diagnostics.Emit,
|
|
32381
32458
|
description: ts.Diagnostics.Set_the_newline_character_for_emitting_files,
|
|
@@ -32385,6 +32462,7 @@ var ts;
|
|
|
32385
32462
|
name: "noErrorTruncation",
|
|
32386
32463
|
type: "boolean",
|
|
32387
32464
|
affectsSemanticDiagnostics: true,
|
|
32465
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32388
32466
|
category: ts.Diagnostics.Output_Formatting,
|
|
32389
32467
|
description: ts.Diagnostics.Disable_truncating_types_in_error_messages,
|
|
32390
32468
|
defaultValueDescription: false,
|
|
@@ -32411,6 +32489,7 @@ var ts;
|
|
|
32411
32489
|
name: "stripInternal",
|
|
32412
32490
|
type: "boolean",
|
|
32413
32491
|
affectsEmit: true,
|
|
32492
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32414
32493
|
category: ts.Diagnostics.Emit,
|
|
32415
32494
|
description: ts.Diagnostics.Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments,
|
|
32416
32495
|
defaultValueDescription: false,
|
|
@@ -32451,6 +32530,7 @@ var ts;
|
|
|
32451
32530
|
name: "noImplicitUseStrict",
|
|
32452
32531
|
type: "boolean",
|
|
32453
32532
|
affectsSemanticDiagnostics: true,
|
|
32533
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32454
32534
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
32455
32535
|
description: ts.Diagnostics.Disable_adding_use_strict_directives_in_emitted_JavaScript_files,
|
|
32456
32536
|
defaultValueDescription: false,
|
|
@@ -32459,6 +32539,7 @@ var ts;
|
|
|
32459
32539
|
name: "noEmitHelpers",
|
|
32460
32540
|
type: "boolean",
|
|
32461
32541
|
affectsEmit: true,
|
|
32542
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32462
32543
|
category: ts.Diagnostics.Emit,
|
|
32463
32544
|
description: ts.Diagnostics.Disable_generating_custom_helper_functions_like_extends_in_compiled_output,
|
|
32464
32545
|
defaultValueDescription: false,
|
|
@@ -32467,6 +32548,7 @@ var ts;
|
|
|
32467
32548
|
name: "noEmitOnError",
|
|
32468
32549
|
type: "boolean",
|
|
32469
32550
|
affectsEmit: true,
|
|
32551
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32470
32552
|
category: ts.Diagnostics.Emit,
|
|
32471
32553
|
transpileOptionValue: undefined,
|
|
32472
32554
|
description: ts.Diagnostics.Disable_emitting_files_if_any_type_checking_errors_are_reported,
|
|
@@ -32476,6 +32558,7 @@ var ts;
|
|
|
32476
32558
|
name: "preserveConstEnums",
|
|
32477
32559
|
type: "boolean",
|
|
32478
32560
|
affectsEmit: true,
|
|
32561
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32479
32562
|
category: ts.Diagnostics.Emit,
|
|
32480
32563
|
description: ts.Diagnostics.Disable_erasing_const_enum_declarations_in_generated_code,
|
|
32481
32564
|
defaultValueDescription: false,
|
|
@@ -32484,6 +32567,8 @@ var ts;
|
|
|
32484
32567
|
name: "declarationDir",
|
|
32485
32568
|
type: "string",
|
|
32486
32569
|
affectsEmit: true,
|
|
32570
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32571
|
+
affectsDeclarationPath: true,
|
|
32487
32572
|
isFilePath: true,
|
|
32488
32573
|
paramType: ts.Diagnostics.DIRECTORY,
|
|
32489
32574
|
category: ts.Diagnostics.Emit,
|
|
@@ -32493,6 +32578,7 @@ var ts;
|
|
|
32493
32578
|
{
|
|
32494
32579
|
name: "skipLibCheck",
|
|
32495
32580
|
type: "boolean",
|
|
32581
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32496
32582
|
category: ts.Diagnostics.Completeness,
|
|
32497
32583
|
description: ts.Diagnostics.Skip_type_checking_all_d_ts_files,
|
|
32498
32584
|
defaultValueDescription: false,
|
|
@@ -32502,6 +32588,7 @@ var ts;
|
|
|
32502
32588
|
type: "boolean",
|
|
32503
32589
|
affectsBindDiagnostics: true,
|
|
32504
32590
|
affectsSemanticDiagnostics: true,
|
|
32591
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32505
32592
|
category: ts.Diagnostics.Type_Checking,
|
|
32506
32593
|
description: ts.Diagnostics.Disable_error_reporting_for_unused_labels,
|
|
32507
32594
|
defaultValueDescription: undefined,
|
|
@@ -32511,6 +32598,7 @@ var ts;
|
|
|
32511
32598
|
type: "boolean",
|
|
32512
32599
|
affectsBindDiagnostics: true,
|
|
32513
32600
|
affectsSemanticDiagnostics: true,
|
|
32601
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32514
32602
|
category: ts.Diagnostics.Type_Checking,
|
|
32515
32603
|
description: ts.Diagnostics.Disable_error_reporting_for_unreachable_code,
|
|
32516
32604
|
defaultValueDescription: undefined,
|
|
@@ -32519,6 +32607,7 @@ var ts;
|
|
|
32519
32607
|
name: "suppressExcessPropertyErrors",
|
|
32520
32608
|
type: "boolean",
|
|
32521
32609
|
affectsSemanticDiagnostics: true,
|
|
32610
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32522
32611
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
32523
32612
|
description: ts.Diagnostics.Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals,
|
|
32524
32613
|
defaultValueDescription: false,
|
|
@@ -32527,6 +32616,7 @@ var ts;
|
|
|
32527
32616
|
name: "suppressImplicitAnyIndexErrors",
|
|
32528
32617
|
type: "boolean",
|
|
32529
32618
|
affectsSemanticDiagnostics: true,
|
|
32619
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32530
32620
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
32531
32621
|
description: ts.Diagnostics.Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures,
|
|
32532
32622
|
defaultValueDescription: false,
|
|
@@ -32551,6 +32641,7 @@ var ts;
|
|
|
32551
32641
|
name: "noStrictGenericChecks",
|
|
32552
32642
|
type: "boolean",
|
|
32553
32643
|
affectsSemanticDiagnostics: true,
|
|
32644
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32554
32645
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
32555
32646
|
description: ts.Diagnostics.Disable_strict_checking_of_generic_signatures_in_function_types,
|
|
32556
32647
|
defaultValueDescription: false,
|
|
@@ -32560,6 +32651,7 @@ var ts;
|
|
|
32560
32651
|
type: "boolean",
|
|
32561
32652
|
affectsSemanticDiagnostics: true,
|
|
32562
32653
|
affectsEmit: true,
|
|
32654
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32563
32655
|
category: ts.Diagnostics.Language_and_Environment,
|
|
32564
32656
|
description: ts.Diagnostics.Emit_ECMAScript_standard_compliant_class_fields,
|
|
32565
32657
|
defaultValueDescription: ts.Diagnostics.true_for_ES2022_and_above_including_ESNext
|
|
@@ -32568,6 +32660,7 @@ var ts;
|
|
|
32568
32660
|
name: "preserveValueImports",
|
|
32569
32661
|
type: "boolean",
|
|
32570
32662
|
affectsEmit: true,
|
|
32663
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
32571
32664
|
category: ts.Diagnostics.Emit,
|
|
32572
32665
|
description: ts.Diagnostics.Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed,
|
|
32573
32666
|
defaultValueDescription: false,
|
|
@@ -32606,6 +32699,7 @@ var ts;
|
|
|
32606
32699
|
ts.optionDeclarations = __spreadArray(__spreadArray([], ts.commonOptionsWithBuild, true), commandOptionsWithoutBuild, true);
|
|
32607
32700
|
ts.semanticDiagnosticsOptionDeclarations = ts.optionDeclarations.filter(function (option) { return !!option.affectsSemanticDiagnostics; });
|
|
32608
32701
|
ts.affectsEmitOptionDeclarations = ts.optionDeclarations.filter(function (option) { return !!option.affectsEmit; });
|
|
32702
|
+
ts.affectsDeclarationPathOptionDeclarations = ts.optionDeclarations.filter(function (option) { return !!option.affectsDeclarationPath; });
|
|
32609
32703
|
ts.moduleResolutionOptionDeclarations = ts.optionDeclarations.filter(function (option) { return !!option.affectsModuleResolution; });
|
|
32610
32704
|
ts.sourceFileAffectingCompilerOptions = ts.optionDeclarations.filter(function (option) {
|
|
32611
32705
|
return !!option.affectsSourceFile || !!option.affectsModuleResolution || !!option.affectsBindDiagnostics;
|
|
@@ -33385,6 +33479,7 @@ var ts;
|
|
|
33385
33479
|
}
|
|
33386
33480
|
});
|
|
33387
33481
|
}
|
|
33482
|
+
ts.getNameOfCompilerOptionValue = getNameOfCompilerOptionValue;
|
|
33388
33483
|
function serializeCompilerOptions(options, pathOptions) {
|
|
33389
33484
|
return serializeOptionBaseObject(options, getOptionsNameMap(), pathOptions);
|
|
33390
33485
|
}
|
|
@@ -54390,18 +54485,6 @@ var ts;
|
|
|
54390
54485
|
}
|
|
54391
54486
|
}
|
|
54392
54487
|
}
|
|
54393
|
-
if (relation === comparableRelation && sourceFlags & 262144) {
|
|
54394
|
-
var constraint = getConstraintOfTypeParameter(source);
|
|
54395
|
-
if (constraint && hasNonCircularBaseConstraint(source)) {
|
|
54396
|
-
while (constraint && constraint.flags & 262144) {
|
|
54397
|
-
if (result = isRelatedTo(constraint, target, 1, false)) {
|
|
54398
|
-
return result;
|
|
54399
|
-
}
|
|
54400
|
-
constraint = getConstraintOfTypeParameter(constraint);
|
|
54401
|
-
}
|
|
54402
|
-
}
|
|
54403
|
-
return 0;
|
|
54404
|
-
}
|
|
54405
54488
|
}
|
|
54406
54489
|
else if (targetFlags & 4194304) {
|
|
54407
54490
|
var targetType_1 = target.type;
|
|
@@ -54552,18 +54635,18 @@ var ts;
|
|
|
54552
54635
|
}
|
|
54553
54636
|
if (sourceFlags & 8650752) {
|
|
54554
54637
|
if (!(sourceFlags & 8388608 && targetFlags & 8388608)) {
|
|
54555
|
-
var constraint = getConstraintOfType(source)
|
|
54556
|
-
if (!strictNullChecks && (!
|
|
54638
|
+
var constraint = getConstraintOfType(source);
|
|
54639
|
+
if (!strictNullChecks && (!constraint || (sourceFlags & 262144 && constraint.flags & 1))) {
|
|
54557
54640
|
if (result = isRelatedTo(emptyObjectType, extractTypesOfKind(target, ~67108864), 3)) {
|
|
54558
54641
|
resetErrorInfo(saveErrorInfo);
|
|
54559
54642
|
return result;
|
|
54560
54643
|
}
|
|
54561
54644
|
}
|
|
54562
|
-
if (result = isRelatedTo(constraint, target, 1, false, undefined, intersectionState)) {
|
|
54645
|
+
else if (constraint && (result = isRelatedTo(constraint, target, 1, false, undefined, intersectionState))) {
|
|
54563
54646
|
resetErrorInfo(saveErrorInfo);
|
|
54564
54647
|
return result;
|
|
54565
54648
|
}
|
|
54566
|
-
else if (result = isRelatedTo(getTypeWithThisArgument(constraint, source), target, 1, reportErrors &&
|
|
54649
|
+
else if (constraint && (result = isRelatedTo(getTypeWithThisArgument(constraint, source), target, 1, reportErrors && !(targetFlags & sourceFlags & 262144), undefined, intersectionState))) {
|
|
54567
54650
|
resetErrorInfo(saveErrorInfo);
|
|
54568
54651
|
return result;
|
|
54569
54652
|
}
|
|
@@ -90128,7 +90211,8 @@ var ts;
|
|
|
90128
90211
|
return;
|
|
90129
90212
|
}
|
|
90130
90213
|
var version = ts.version;
|
|
90131
|
-
|
|
90214
|
+
var buildInfo = { bundle: bundle, program: program, version: version };
|
|
90215
|
+
ts.writeFile(host, emitterDiagnostics, buildInfoPath, getBuildInfoText(buildInfo), false, undefined, { buildInfo: buildInfo });
|
|
90132
90216
|
}
|
|
90133
90217
|
function emitJsFileOrBundle(sourceFileOrBundle, jsFilePath, sourceMapFilePath, relativeToBuildInfo) {
|
|
90134
90218
|
if (!sourceFileOrBundle || emitOnlyDtsFiles || !jsFilePath) {
|
|
@@ -90269,12 +90353,17 @@ var ts;
|
|
|
90269
90353
|
if (sourceMapFilePath) {
|
|
90270
90354
|
var sourceMap = sourceMapGenerator.toString();
|
|
90271
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));
|
|
90272
90358
|
}
|
|
90273
90359
|
}
|
|
90274
90360
|
else {
|
|
90275
90361
|
writer.writeLine();
|
|
90276
90362
|
}
|
|
90277
|
-
|
|
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));
|
|
90278
90367
|
writer.clear();
|
|
90279
90368
|
}
|
|
90280
90369
|
function shouldEmitSourceMaps(mapOptions, sourceFileOrBundle) {
|
|
@@ -90399,30 +90488,50 @@ var ts;
|
|
|
90399
90488
|
});
|
|
90400
90489
|
}
|
|
90401
90490
|
function emitUsingBuildInfo(config, host, getCommandLine, customTransformers) {
|
|
90491
|
+
var createHash = ts.maybeBind(host, host.createHash);
|
|
90402
90492
|
var _a = getOutputPathsForBundle(config.options, false), buildInfoPath = _a.buildInfoPath, jsFilePath = _a.jsFilePath, sourceMapFilePath = _a.sourceMapFilePath, declarationFilePath = _a.declarationFilePath, declarationMapPath = _a.declarationMapPath;
|
|
90403
|
-
var
|
|
90404
|
-
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))
|
|
90405
90507
|
return buildInfoPath;
|
|
90406
90508
|
var jsFileText = host.readFile(ts.Debug.checkDefined(jsFilePath));
|
|
90407
90509
|
if (!jsFileText)
|
|
90408
90510
|
return jsFilePath;
|
|
90511
|
+
if (ts.BuilderState.computeSignature(jsFileText, createHash) !== buildInfo.bundle.js.hash)
|
|
90512
|
+
return jsFilePath;
|
|
90409
90513
|
var sourceMapText = sourceMapFilePath && host.readFile(sourceMapFilePath);
|
|
90410
90514
|
if ((sourceMapFilePath && !sourceMapText) || config.options.inlineSourceMap)
|
|
90411
90515
|
return sourceMapFilePath || "inline sourcemap decoding";
|
|
90516
|
+
if (sourceMapFilePath && ts.BuilderState.computeSignature(sourceMapText, createHash) !== buildInfo.bundle.js.mapHash)
|
|
90517
|
+
return sourceMapFilePath;
|
|
90412
90518
|
var declarationText = declarationFilePath && host.readFile(declarationFilePath);
|
|
90413
90519
|
if (declarationFilePath && !declarationText)
|
|
90414
90520
|
return declarationFilePath;
|
|
90521
|
+
if (declarationFilePath && ts.BuilderState.computeSignature(declarationText, createHash) !== buildInfo.bundle.dts.hash)
|
|
90522
|
+
return declarationFilePath;
|
|
90415
90523
|
var declarationMapText = declarationMapPath && host.readFile(declarationMapPath);
|
|
90416
90524
|
if ((declarationMapPath && !declarationMapText) || config.options.inlineSourceMap)
|
|
90417
90525
|
return declarationMapPath || "inline sourcemap decoding";
|
|
90418
|
-
|
|
90419
|
-
|
|
90420
|
-
return buildInfoPath;
|
|
90526
|
+
if (declarationMapPath && ts.BuilderState.computeSignature(declarationMapText, createHash) !== buildInfo.bundle.dts.mapHash)
|
|
90527
|
+
return declarationMapPath;
|
|
90421
90528
|
var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));
|
|
90422
90529
|
var ownPrependInput = ts.createInputFiles(jsFileText, declarationText, sourceMapFilePath, sourceMapText, declarationMapPath, declarationMapText, jsFilePath, declarationFilePath, buildInfoPath, buildInfo, true);
|
|
90423
90530
|
var outputFiles = [];
|
|
90424
90531
|
var prependNodes = ts.createPrependNodes(config.projectReferences, getCommandLine, function (f) { return host.readFile(f); });
|
|
90425
90532
|
var sourceFilesForJsEmit = createSourceFilesFromBundleBuildInfo(buildInfo.bundle, buildInfoDirectory, host);
|
|
90533
|
+
var changedDtsText;
|
|
90534
|
+
var changedDtsData;
|
|
90426
90535
|
var emitHost = {
|
|
90427
90536
|
getPrependNodes: ts.memoize(function () { return __spreadArray(__spreadArray([], prependNodes, true), [ownPrependInput], false); }),
|
|
90428
90537
|
getCanonicalFileName: host.getCanonicalFileName,
|
|
@@ -90438,7 +90547,7 @@ var ts;
|
|
|
90438
90547
|
getResolvedProjectReferenceToRedirect: ts.returnUndefined,
|
|
90439
90548
|
getProjectReferenceRedirect: ts.returnUndefined,
|
|
90440
90549
|
isSourceOfProjectReferenceRedirect: ts.returnFalse,
|
|
90441
|
-
writeFile: function (name, text, writeByteOrderMark) {
|
|
90550
|
+
writeFile: function (name, text, writeByteOrderMark, _onError, _sourceFiles, data) {
|
|
90442
90551
|
switch (name) {
|
|
90443
90552
|
case jsFilePath:
|
|
90444
90553
|
if (jsFileText === text)
|
|
@@ -90449,19 +90558,25 @@ var ts;
|
|
|
90449
90558
|
return;
|
|
90450
90559
|
break;
|
|
90451
90560
|
case buildInfoPath:
|
|
90452
|
-
var newBuildInfo =
|
|
90561
|
+
var newBuildInfo = data.buildInfo;
|
|
90453
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
|
+
}
|
|
90454
90567
|
var _a = buildInfo.bundle, js = _a.js, dts = _a.dts, sourceFiles = _a.sourceFiles;
|
|
90455
90568
|
newBuildInfo.bundle.js.sources = js.sources;
|
|
90456
90569
|
if (dts) {
|
|
90457
90570
|
newBuildInfo.bundle.dts.sources = dts.sources;
|
|
90458
90571
|
}
|
|
90459
90572
|
newBuildInfo.bundle.sourceFiles = sourceFiles;
|
|
90460
|
-
outputFiles.push({ name: name, text: getBuildInfoText(newBuildInfo), writeByteOrderMark: writeByteOrderMark });
|
|
90573
|
+
outputFiles.push({ name: name, text: getBuildInfoText(newBuildInfo), writeByteOrderMark: writeByteOrderMark, buildInfo: newBuildInfo });
|
|
90461
90574
|
return;
|
|
90462
90575
|
case declarationFilePath:
|
|
90463
90576
|
if (declarationText === text)
|
|
90464
90577
|
return;
|
|
90578
|
+
changedDtsText = text;
|
|
90579
|
+
changedDtsData = data;
|
|
90465
90580
|
break;
|
|
90466
90581
|
case declarationMapPath:
|
|
90467
90582
|
if (declarationMapText === text)
|
|
@@ -90480,6 +90595,7 @@ var ts;
|
|
|
90480
90595
|
getSourceFileFromReference: ts.returnUndefined,
|
|
90481
90596
|
redirectTargetsMap: ts.createMultiMap(),
|
|
90482
90597
|
getFileIncludeReasons: ts.notImplemented,
|
|
90598
|
+
createHash: createHash,
|
|
90483
90599
|
};
|
|
90484
90600
|
emitFiles(ts.notImplementedResolver, emitHost, undefined, ts.getTransformers(config.options, customTransformers));
|
|
90485
90601
|
return outputFiles;
|
|
@@ -95104,7 +95220,6 @@ var ts;
|
|
|
95104
95220
|
if (system === void 0) { system = ts.sys; }
|
|
95105
95221
|
var existingDirectories = new ts.Map();
|
|
95106
95222
|
var getCanonicalFileName = ts.createGetCanonicalFileName(system.useCaseSensitiveFileNames);
|
|
95107
|
-
var computeHash = ts.maybeBind(system, system.createHash) || ts.generateDjb2Hash;
|
|
95108
95223
|
function getSourceFile(fileName, languageVersionOrOptions, onError) {
|
|
95109
95224
|
var text;
|
|
95110
95225
|
try {
|
|
@@ -95134,7 +95249,7 @@ var ts;
|
|
|
95134
95249
|
function writeFile(fileName, data, writeByteOrderMark, onError) {
|
|
95135
95250
|
try {
|
|
95136
95251
|
ts.performance.mark("beforeIOWrite");
|
|
95137
|
-
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); });
|
|
95138
95253
|
ts.performance.mark("afterIOWrite");
|
|
95139
95254
|
ts.performance.measure("I/O Write", "beforeIOWrite", "afterIOWrite");
|
|
95140
95255
|
}
|
|
@@ -95144,34 +95259,6 @@ var ts;
|
|
|
95144
95259
|
}
|
|
95145
95260
|
}
|
|
95146
95261
|
}
|
|
95147
|
-
var outputFingerprints;
|
|
95148
|
-
function writeFileWorker(fileName, data, writeByteOrderMark) {
|
|
95149
|
-
if (!ts.isWatchSet(options) || !system.getModifiedTime) {
|
|
95150
|
-
system.writeFile(fileName, data, writeByteOrderMark);
|
|
95151
|
-
return;
|
|
95152
|
-
}
|
|
95153
|
-
if (!outputFingerprints) {
|
|
95154
|
-
outputFingerprints = new ts.Map();
|
|
95155
|
-
}
|
|
95156
|
-
var hash = computeHash(data);
|
|
95157
|
-
var mtimeBefore = system.getModifiedTime(fileName);
|
|
95158
|
-
if (mtimeBefore) {
|
|
95159
|
-
var fingerprint = outputFingerprints.get(fileName);
|
|
95160
|
-
if (fingerprint &&
|
|
95161
|
-
fingerprint.byteOrderMark === writeByteOrderMark &&
|
|
95162
|
-
fingerprint.hash === hash &&
|
|
95163
|
-
fingerprint.mtime.getTime() === mtimeBefore.getTime()) {
|
|
95164
|
-
return;
|
|
95165
|
-
}
|
|
95166
|
-
}
|
|
95167
|
-
system.writeFile(fileName, data, writeByteOrderMark);
|
|
95168
|
-
var mtimeAfter = system.getModifiedTime(fileName) || ts.missingFileModifiedTime;
|
|
95169
|
-
outputFingerprints.set(fileName, {
|
|
95170
|
-
hash: hash,
|
|
95171
|
-
byteOrderMark: writeByteOrderMark,
|
|
95172
|
-
mtime: mtimeAfter
|
|
95173
|
-
});
|
|
95174
|
-
}
|
|
95175
95262
|
function getDefaultLibLocation() {
|
|
95176
95263
|
return ts.getDirectoryPath(ts.normalizePath(system.getExecutingFilePath()));
|
|
95177
95264
|
}
|
|
@@ -96513,6 +96600,7 @@ var ts;
|
|
|
96513
96600
|
getSourceFileFromReference: function (file, ref) { return program.getSourceFileFromReference(file, ref); },
|
|
96514
96601
|
redirectTargetsMap: redirectTargetsMap,
|
|
96515
96602
|
getFileIncludeReasons: program.getFileIncludeReasons,
|
|
96603
|
+
createHash: ts.maybeBind(host, host.createHash),
|
|
96516
96604
|
};
|
|
96517
96605
|
}
|
|
96518
96606
|
function writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data) {
|
|
@@ -98419,13 +98507,9 @@ var ts;
|
|
|
98419
98507
|
function createManyToManyPathMap() {
|
|
98420
98508
|
function create(forward, reverse, deleted) {
|
|
98421
98509
|
var map = {
|
|
98422
|
-
clone: function () { return create(new ts.Map(forward), new ts.Map(reverse), deleted && new ts.Set(deleted)); },
|
|
98423
|
-
forEach: function (fn) { return forward.forEach(fn); },
|
|
98424
98510
|
getKeys: function (v) { return reverse.get(v); },
|
|
98425
98511
|
getValues: function (k) { return forward.get(k); },
|
|
98426
|
-
hasKey: function (k) { return forward.has(k); },
|
|
98427
98512
|
keys: function () { return forward.keys(); },
|
|
98428
|
-
deletedKeys: function () { return deleted; },
|
|
98429
98513
|
deleteKey: function (k) {
|
|
98430
98514
|
(deleted || (deleted = new ts.Set())).add(k);
|
|
98431
98515
|
var set = forward.get(k);
|
|
@@ -98452,11 +98536,6 @@ var ts;
|
|
|
98452
98536
|
});
|
|
98453
98537
|
return map;
|
|
98454
98538
|
},
|
|
98455
|
-
clear: function () {
|
|
98456
|
-
forward.clear();
|
|
98457
|
-
reverse.clear();
|
|
98458
|
-
deleted === null || deleted === void 0 ? void 0 : deleted.clear();
|
|
98459
|
-
}
|
|
98460
98539
|
};
|
|
98461
98540
|
return map;
|
|
98462
98541
|
}
|
|
@@ -98560,35 +98639,45 @@ var ts;
|
|
|
98560
98639
|
}
|
|
98561
98640
|
BuilderState.canReuseOldState = canReuseOldState;
|
|
98562
98641
|
function create(newProgram, getCanonicalFileName, oldState, disableUseFileVersionAsSignature) {
|
|
98642
|
+
var _a, _b, _c;
|
|
98563
98643
|
var fileInfos = new ts.Map();
|
|
98564
98644
|
var referencedMap = newProgram.getCompilerOptions().module !== ts.ModuleKind.None ? createManyToManyPathMap() : undefined;
|
|
98565
98645
|
var exportedModulesMap = referencedMap ? createManyToManyPathMap() : undefined;
|
|
98566
|
-
var hasCalledUpdateShapeSignature = new ts.Set();
|
|
98567
98646
|
var useOldState = canReuseOldState(referencedMap, oldState);
|
|
98568
98647
|
newProgram.getTypeChecker();
|
|
98569
|
-
for (var _i = 0,
|
|
98570
|
-
var sourceFile =
|
|
98648
|
+
for (var _i = 0, _d = newProgram.getSourceFiles(); _i < _d.length; _i++) {
|
|
98649
|
+
var sourceFile = _d[_i];
|
|
98571
98650
|
var version_2 = ts.Debug.checkDefined(sourceFile.version, "Program intended to be used with Builder should have source files with versions set");
|
|
98572
|
-
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;
|
|
98573
98655
|
if (referencedMap) {
|
|
98574
98656
|
var newReferences = getReferencedFiles(newProgram, sourceFile, getCanonicalFileName);
|
|
98575
98657
|
if (newReferences) {
|
|
98576
98658
|
referencedMap.set(sourceFile.resolvedPath, newReferences);
|
|
98577
98659
|
}
|
|
98578
98660
|
if (useOldState) {
|
|
98579
|
-
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;
|
|
98580
98665
|
if (exportedModules) {
|
|
98581
98666
|
exportedModulesMap.set(sourceFile.resolvedPath, exportedModules);
|
|
98582
98667
|
}
|
|
98583
98668
|
}
|
|
98584
98669
|
}
|
|
98585
|
-
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
|
+
});
|
|
98586
98676
|
}
|
|
98587
98677
|
return {
|
|
98588
98678
|
fileInfos: fileInfos,
|
|
98589
98679
|
referencedMap: referencedMap,
|
|
98590
98680
|
exportedModulesMap: exportedModulesMap,
|
|
98591
|
-
hasCalledUpdateShapeSignature: hasCalledUpdateShapeSignature,
|
|
98592
98681
|
useFileVersionAsSignature: !disableUseFileVersionAsSignature && !useOldState
|
|
98593
98682
|
};
|
|
98594
98683
|
}
|
|
@@ -98598,52 +98687,36 @@ var ts;
|
|
|
98598
98687
|
state.allFileNames = undefined;
|
|
98599
98688
|
}
|
|
98600
98689
|
BuilderState.releaseCache = releaseCache;
|
|
98601
|
-
function
|
|
98690
|
+
function getFilesAffectedBy(state, programOfThisState, path, cancellationToken, computeHash) {
|
|
98602
98691
|
var _a, _b;
|
|
98603
|
-
|
|
98604
|
-
|
|
98605
|
-
|
|
98606
|
-
|
|
98607
|
-
hasCalledUpdateShapeSignature: new ts.Set(state.hasCalledUpdateShapeSignature),
|
|
98608
|
-
useFileVersionAsSignature: state.useFileVersionAsSignature,
|
|
98609
|
-
};
|
|
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;
|
|
98610
98696
|
}
|
|
98611
|
-
BuilderState.
|
|
98612
|
-
function
|
|
98613
|
-
var signatureCache = cacheToUpdateSignature || new ts.Map();
|
|
98697
|
+
BuilderState.getFilesAffectedBy = getFilesAffectedBy;
|
|
98698
|
+
function getFilesAffectedByWithOldState(state, programOfThisState, path, cancellationToken, computeHash) {
|
|
98614
98699
|
var sourceFile = programOfThisState.getSourceFileByPath(path);
|
|
98615
98700
|
if (!sourceFile) {
|
|
98616
98701
|
return ts.emptyArray;
|
|
98617
98702
|
}
|
|
98618
|
-
if (!updateShapeSignature(state, programOfThisState, sourceFile,
|
|
98703
|
+
if (!updateShapeSignature(state, programOfThisState, sourceFile, cancellationToken, computeHash)) {
|
|
98619
98704
|
return [sourceFile];
|
|
98620
98705
|
}
|
|
98621
|
-
|
|
98622
|
-
if (!cacheToUpdateSignature) {
|
|
98623
|
-
updateSignaturesFromCache(state, signatureCache);
|
|
98624
|
-
}
|
|
98625
|
-
return result;
|
|
98626
|
-
}
|
|
98627
|
-
BuilderState.getFilesAffectedBy = getFilesAffectedBy;
|
|
98628
|
-
function updateSignaturesFromCache(state, signatureCache) {
|
|
98629
|
-
signatureCache.forEach(function (signature, path) { return updateSignatureOfFile(state, signature, path); });
|
|
98706
|
+
return (state.referencedMap ? getFilesAffectedByUpdatedShapeWhenModuleEmit : getFilesAffectedByUpdatedShapeWhenNonModuleEmit)(state, programOfThisState, sourceFile, cancellationToken, computeHash);
|
|
98630
98707
|
}
|
|
98631
|
-
BuilderState.
|
|
98708
|
+
BuilderState.getFilesAffectedByWithOldState = getFilesAffectedByWithOldState;
|
|
98632
98709
|
function updateSignatureOfFile(state, signature, path) {
|
|
98633
98710
|
state.fileInfos.get(path).signature = signature;
|
|
98634
|
-
state.hasCalledUpdateShapeSignature.add(path);
|
|
98711
|
+
(state.hasCalledUpdateShapeSignature || (state.hasCalledUpdateShapeSignature = new ts.Set())).add(path);
|
|
98635
98712
|
}
|
|
98636
98713
|
BuilderState.updateSignatureOfFile = updateSignatureOfFile;
|
|
98637
|
-
function updateShapeSignature(state, programOfThisState, sourceFile,
|
|
98714
|
+
function updateShapeSignature(state, programOfThisState, sourceFile, cancellationToken, computeHash, useFileVersionAsSignature) {
|
|
98715
|
+
var _a;
|
|
98638
98716
|
if (useFileVersionAsSignature === void 0) { useFileVersionAsSignature = state.useFileVersionAsSignature; }
|
|
98639
|
-
|
|
98640
|
-
ts.Debug.assert(!exportedModulesMapCache || !!state.exportedModulesMap, "Compute visible to outside map only if visibleToOutsideReferencedMap present in the state");
|
|
98641
|
-
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))
|
|
98642
98718
|
return false;
|
|
98643
|
-
}
|
|
98644
98719
|
var info = state.fileInfos.get(sourceFile.resolvedPath);
|
|
98645
|
-
if (!info)
|
|
98646
|
-
return ts.Debug.fail();
|
|
98647
98720
|
var prevSignature = info.signature;
|
|
98648
98721
|
var latestSignature;
|
|
98649
98722
|
if (!sourceFile.isDeclarationFile && !useFileVersionAsSignature) {
|
|
@@ -98651,40 +98724,50 @@ var ts;
|
|
|
98651
98724
|
var firstDts_1 = ts.firstOrUndefined(emitOutput_1.outputFiles);
|
|
98652
98725
|
if (firstDts_1) {
|
|
98653
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; })); });
|
|
98654
|
-
latestSignature = (
|
|
98655
|
-
if (
|
|
98656
|
-
updateExportedModules(sourceFile, emitOutput_1.exportedModulesFromDeclarationEmit
|
|
98727
|
+
latestSignature = computeSignature(firstDts_1.text, computeHash);
|
|
98728
|
+
if (latestSignature !== prevSignature) {
|
|
98729
|
+
updateExportedModules(state, sourceFile, emitOutput_1.exportedModulesFromDeclarationEmit);
|
|
98657
98730
|
}
|
|
98658
98731
|
}
|
|
98659
98732
|
}
|
|
98660
98733
|
if (latestSignature === undefined) {
|
|
98661
98734
|
latestSignature = sourceFile.version;
|
|
98662
|
-
if (
|
|
98735
|
+
if (state.exportedModulesMap && latestSignature !== prevSignature) {
|
|
98736
|
+
(state.oldExportedModulesMap || (state.oldExportedModulesMap = new ts.Map())).set(sourceFile.resolvedPath, state.exportedModulesMap.getValues(sourceFile.resolvedPath) || false);
|
|
98663
98737
|
var references = state.referencedMap ? state.referencedMap.getValues(sourceFile.resolvedPath) : undefined;
|
|
98664
98738
|
if (references) {
|
|
98665
|
-
|
|
98739
|
+
state.exportedModulesMap.set(sourceFile.resolvedPath, references);
|
|
98666
98740
|
}
|
|
98667
98741
|
else {
|
|
98668
|
-
|
|
98742
|
+
state.exportedModulesMap.deleteKey(sourceFile.resolvedPath);
|
|
98669
98743
|
}
|
|
98670
98744
|
}
|
|
98671
98745
|
}
|
|
98672
|
-
|
|
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;
|
|
98673
98749
|
return latestSignature !== prevSignature;
|
|
98674
98750
|
}
|
|
98675
98751
|
BuilderState.updateShapeSignature = updateShapeSignature;
|
|
98676
|
-
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);
|
|
98677
98760
|
if (!exportedModulesFromDeclarationEmit) {
|
|
98678
|
-
|
|
98761
|
+
state.exportedModulesMap.deleteKey(sourceFile.resolvedPath);
|
|
98679
98762
|
return;
|
|
98680
98763
|
}
|
|
98681
98764
|
var exportedModules;
|
|
98682
98765
|
exportedModulesFromDeclarationEmit.forEach(function (symbol) { return addExportedModule(getReferencedFilesFromImportedModuleSymbol(symbol)); });
|
|
98683
98766
|
if (exportedModules) {
|
|
98684
|
-
|
|
98767
|
+
state.exportedModulesMap.set(sourceFile.resolvedPath, exportedModules);
|
|
98685
98768
|
}
|
|
98686
98769
|
else {
|
|
98687
|
-
|
|
98770
|
+
state.exportedModulesMap.deleteKey(sourceFile.resolvedPath);
|
|
98688
98771
|
}
|
|
98689
98772
|
function addExportedModule(exportedModulePaths) {
|
|
98690
98773
|
if (exportedModulePaths === null || exportedModulePaths === void 0 ? void 0 : exportedModulePaths.length) {
|
|
@@ -98696,15 +98779,6 @@ var ts;
|
|
|
98696
98779
|
}
|
|
98697
98780
|
}
|
|
98698
98781
|
BuilderState.updateExportedModules = updateExportedModules;
|
|
98699
|
-
function updateExportedFilesMapFromCache(state, exportedModulesMapCache) {
|
|
98700
|
-
var _a;
|
|
98701
|
-
if (exportedModulesMapCache) {
|
|
98702
|
-
ts.Debug.assert(!!state.exportedModulesMap);
|
|
98703
|
-
(_a = exportedModulesMapCache.deletedKeys()) === null || _a === void 0 ? void 0 : _a.forEach(function (path) { return state.exportedModulesMap.deleteKey(path); });
|
|
98704
|
-
exportedModulesMapCache.forEach(function (exportedModules, path) { return state.exportedModulesMap.set(path, exportedModules); });
|
|
98705
|
-
}
|
|
98706
|
-
}
|
|
98707
|
-
BuilderState.updateExportedFilesMapFromCache = updateExportedFilesMapFromCache;
|
|
98708
98782
|
function getAllDependencies(state, programOfThisState, sourceFile) {
|
|
98709
98783
|
var compilerOptions = programOfThisState.getCompilerOptions();
|
|
98710
98784
|
if (ts.outFile(compilerOptions)) {
|
|
@@ -98788,7 +98862,7 @@ var ts;
|
|
|
98788
98862
|
}
|
|
98789
98863
|
return getAllFilesExcludingDefaultLibraryFile(state, programOfThisState, sourceFileWithUpdatedShape);
|
|
98790
98864
|
}
|
|
98791
|
-
function getFilesAffectedByUpdatedShapeWhenModuleEmit(state, programOfThisState, sourceFileWithUpdatedShape,
|
|
98865
|
+
function getFilesAffectedByUpdatedShapeWhenModuleEmit(state, programOfThisState, sourceFileWithUpdatedShape, cancellationToken, computeHash) {
|
|
98792
98866
|
if (isFileAffectingGlobalScope(sourceFileWithUpdatedShape)) {
|
|
98793
98867
|
return getAllFilesExcludingDefaultLibraryFile(state, programOfThisState, sourceFileWithUpdatedShape);
|
|
98794
98868
|
}
|
|
@@ -98804,7 +98878,7 @@ var ts;
|
|
|
98804
98878
|
if (!seenFileNamesMap.has(currentPath)) {
|
|
98805
98879
|
var currentSourceFile = programOfThisState.getSourceFileByPath(currentPath);
|
|
98806
98880
|
seenFileNamesMap.set(currentPath, currentSourceFile);
|
|
98807
|
-
if (currentSourceFile && updateShapeSignature(state, programOfThisState, currentSourceFile,
|
|
98881
|
+
if (currentSourceFile && updateShapeSignature(state, programOfThisState, currentSourceFile, cancellationToken, computeHash)) {
|
|
98808
98882
|
queue.push.apply(queue, getReferencedByPaths(state, currentSourceFile.resolvedPath));
|
|
98809
98883
|
}
|
|
98810
98884
|
}
|
|
@@ -98819,29 +98893,31 @@ var ts;
|
|
|
98819
98893
|
return map1 === map2 || map1 !== undefined && map2 !== undefined && map1.size === map2.size && !ts.forEachKey(map1, function (key) { return !map2.has(key); });
|
|
98820
98894
|
}
|
|
98821
98895
|
function createBuilderProgramState(newProgram, getCanonicalFileName, oldState, disableUseFileVersionAsSignature) {
|
|
98896
|
+
var _a, _b;
|
|
98822
98897
|
var state = ts.BuilderState.create(newProgram, getCanonicalFileName, oldState, disableUseFileVersionAsSignature);
|
|
98823
98898
|
state.program = newProgram;
|
|
98824
98899
|
var compilerOptions = newProgram.getCompilerOptions();
|
|
98825
98900
|
state.compilerOptions = compilerOptions;
|
|
98826
|
-
|
|
98901
|
+
var outFilePath = ts.outFile(compilerOptions);
|
|
98902
|
+
if (!outFilePath) {
|
|
98827
98903
|
state.semanticDiagnosticsPerFile = new ts.Map();
|
|
98828
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
|
+
}
|
|
98829
98908
|
state.changedFilesSet = new ts.Set();
|
|
98909
|
+
state.dtsChangeTime = compilerOptions.composite ? oldState === null || oldState === void 0 ? void 0 : oldState.dtsChangeTime : undefined;
|
|
98830
98910
|
var useOldState = ts.BuilderState.canReuseOldState(state.referencedMap, oldState);
|
|
98831
98911
|
var oldCompilerOptions = useOldState ? oldState.compilerOptions : undefined;
|
|
98832
98912
|
var canCopySemanticDiagnostics = useOldState && oldState.semanticDiagnosticsPerFile && !!state.semanticDiagnosticsPerFile &&
|
|
98833
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);
|
|
98834
98918
|
if (useOldState) {
|
|
98835
|
-
|
|
98836
|
-
|
|
98837
|
-
ts.Debug.assert(!oldState.affectedFiles && (!affectedSignatures || !affectedSignatures.size), "Cannot reuse if only few affected files of currentChangedFile were iterated");
|
|
98838
|
-
}
|
|
98839
|
-
var changedFilesSet = oldState.changedFilesSet;
|
|
98840
|
-
if (canCopySemanticDiagnostics) {
|
|
98841
|
-
ts.Debug.assert(!changedFilesSet || !ts.forEachKey(changedFilesSet, function (path) { return oldState.semanticDiagnosticsPerFile.has(path); }), "Semantic diagnostics shouldnt be available for changed files");
|
|
98842
|
-
}
|
|
98843
|
-
changedFilesSet === null || changedFilesSet === void 0 ? void 0 : changedFilesSet.forEach(function (value) { return state.changedFilesSet.add(value); });
|
|
98844
|
-
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) {
|
|
98845
98921
|
state.affectedFilesPendingEmit = oldState.affectedFilesPendingEmit.slice();
|
|
98846
98922
|
state.affectedFilesPendingEmitKind = oldState.affectedFilesPendingEmitKind && new ts.Map(oldState.affectedFilesPendingEmitKind);
|
|
98847
98923
|
state.affectedFilesPendingEmitIndex = oldState.affectedFilesPendingEmitIndex;
|
|
@@ -98858,6 +98934,7 @@ var ts;
|
|
|
98858
98934
|
if (!useOldState ||
|
|
98859
98935
|
!(oldInfo = oldState.fileInfos.get(sourceFilePath)) ||
|
|
98860
98936
|
oldInfo.version !== info.version ||
|
|
98937
|
+
oldInfo.impliedFormat !== info.impliedFormat ||
|
|
98861
98938
|
!hasSameKeys(newReferences = referencedMap && referencedMap.getValues(sourceFilePath), oldReferencedMap && oldReferencedMap.getValues(sourceFilePath)) ||
|
|
98862
98939
|
newReferences && ts.forEachKey(newReferences, function (path) { return !state.fileInfos.has(path) && oldState.fileInfos.has(path); })) {
|
|
98863
98940
|
state.changedFilesSet.add(sourceFilePath);
|
|
@@ -98877,24 +98954,22 @@ var ts;
|
|
|
98877
98954
|
state.semanticDiagnosticsFromOldState.add(sourceFilePath);
|
|
98878
98955
|
}
|
|
98879
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
|
+
}
|
|
98880
98962
|
});
|
|
98881
98963
|
if (useOldState && ts.forEachEntry(oldState.fileInfos, function (info, sourceFilePath) { return info.affectsGlobalScope && !state.fileInfos.has(sourceFilePath); })) {
|
|
98882
98964
|
ts.BuilderState.getAllFilesExcludingDefaultLibraryFile(state, newProgram, undefined)
|
|
98883
98965
|
.forEach(function (file) { return state.changedFilesSet.add(file.resolvedPath); });
|
|
98884
98966
|
}
|
|
98885
|
-
else if (oldCompilerOptions && !
|
|
98967
|
+
else if (oldCompilerOptions && !outFilePath && ts.compilerOptionsAffectEmit(compilerOptions, oldCompilerOptions)) {
|
|
98886
98968
|
newProgram.getSourceFiles().forEach(function (f) { return addToAffectedFilesPendingEmit(state, f.resolvedPath, 1); });
|
|
98887
98969
|
ts.Debug.assert(!state.seenAffectedFiles || !state.seenAffectedFiles.size);
|
|
98888
98970
|
state.seenAffectedFiles = state.seenAffectedFiles || new ts.Set();
|
|
98889
98971
|
}
|
|
98890
|
-
|
|
98891
|
-
ts.forEachEntry(oldState.fileInfos, function (info, sourceFilePath) {
|
|
98892
|
-
if (state.fileInfos.has(sourceFilePath) && state.fileInfos.get(sourceFilePath).impliedFormat !== info.impliedFormat) {
|
|
98893
|
-
state.changedFilesSet.add(sourceFilePath);
|
|
98894
|
-
}
|
|
98895
|
-
});
|
|
98896
|
-
}
|
|
98897
|
-
state.buildInfoEmitPending = !!state.changedFilesSet.size;
|
|
98972
|
+
state.buildInfoEmitPending = !useOldState || state.changedFilesSet.size !== (((_b = oldState.changedFilesSet) === null || _b === void 0 ? void 0 : _b.size) || 0);
|
|
98898
98973
|
return state;
|
|
98899
98974
|
}
|
|
98900
98975
|
function convertToDiagnostics(diagnostics, newProgram, getCanonicalFileName) {
|
|
@@ -98927,33 +99002,40 @@ var ts;
|
|
|
98927
99002
|
ts.BuilderState.releaseCache(state);
|
|
98928
99003
|
state.program = undefined;
|
|
98929
99004
|
}
|
|
98930
|
-
function
|
|
98931
|
-
var
|
|
98932
|
-
|
|
98933
|
-
|
|
98934
|
-
|
|
98935
|
-
|
|
98936
|
-
|
|
98937
|
-
|
|
98938
|
-
|
|
98939
|
-
|
|
98940
|
-
|
|
98941
|
-
|
|
98942
|
-
|
|
98943
|
-
|
|
98944
|
-
|
|
98945
|
-
|
|
98946
|
-
|
|
98947
|
-
|
|
98948
|
-
|
|
98949
|
-
|
|
98950
|
-
|
|
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;
|
|
98951
99033
|
}
|
|
98952
99034
|
function assertSourceFileOkWithoutNextAffectedCall(state, sourceFile) {
|
|
98953
99035
|
ts.Debug.assert(!sourceFile || !state.affectedFiles || state.affectedFiles[state.affectedFilesIndex - 1] !== sourceFile || !state.semanticDiagnosticsPerFile.has(sourceFile.resolvedPath));
|
|
98954
99036
|
}
|
|
98955
99037
|
function getNextAffectedFile(state, cancellationToken, computeHash, host) {
|
|
98956
|
-
var _a;
|
|
99038
|
+
var _a, _b;
|
|
98957
99039
|
while (true) {
|
|
98958
99040
|
var affectedFiles = state.affectedFiles;
|
|
98959
99041
|
if (affectedFiles) {
|
|
@@ -98970,10 +99052,8 @@ var ts;
|
|
|
98970
99052
|
}
|
|
98971
99053
|
state.changedFilesSet.delete(state.currentChangedFilePath);
|
|
98972
99054
|
state.currentChangedFilePath = undefined;
|
|
98973
|
-
|
|
98974
|
-
state.
|
|
98975
|
-
ts.BuilderState.updateExportedFilesMapFromCache(state, state.currentAffectedFilesExportedModulesMap);
|
|
98976
|
-
(_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();
|
|
98977
99057
|
state.affectedFiles = undefined;
|
|
98978
99058
|
}
|
|
98979
99059
|
var nextKey = state.changedFilesSet.keys().next();
|
|
@@ -98986,12 +99066,7 @@ var ts;
|
|
|
98986
99066
|
ts.Debug.assert(!state.semanticDiagnosticsPerFile);
|
|
98987
99067
|
return program;
|
|
98988
99068
|
}
|
|
98989
|
-
|
|
98990
|
-
state.currentAffectedFilesSignatures = new ts.Map();
|
|
98991
|
-
if (state.exportedModulesMap) {
|
|
98992
|
-
state.currentAffectedFilesExportedModulesMap || (state.currentAffectedFilesExportedModulesMap = ts.BuilderState.createManyToManyPathMap());
|
|
98993
|
-
}
|
|
98994
|
-
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);
|
|
98995
99070
|
state.currentChangedFilePath = nextKey.value;
|
|
98996
99071
|
state.affectedFilesIndex = 0;
|
|
98997
99072
|
if (!state.seenAffectedFiles)
|
|
@@ -99035,14 +99110,12 @@ var ts;
|
|
|
99035
99110
|
}
|
|
99036
99111
|
}
|
|
99037
99112
|
function handleDtsMayChangeOfAffectedFile(state, affectedFile, cancellationToken, computeHash, host) {
|
|
99038
|
-
var _a;
|
|
99039
99113
|
removeSemanticDiagnosticsOf(state, affectedFile.resolvedPath);
|
|
99040
99114
|
if (state.allFilesExcludingDefaultLibraryFile === state.affectedFiles) {
|
|
99041
99115
|
removeDiagnosticsOfLibraryFiles(state);
|
|
99042
|
-
ts.BuilderState.updateShapeSignature(state, ts.Debug.checkDefined(state.program), affectedFile,
|
|
99116
|
+
ts.BuilderState.updateShapeSignature(state, ts.Debug.checkDefined(state.program), affectedFile, cancellationToken, computeHash);
|
|
99043
99117
|
return;
|
|
99044
99118
|
}
|
|
99045
|
-
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);
|
|
99046
99119
|
if (state.compilerOptions.assumeChangesOnlyAffectDirectDependencies)
|
|
99047
99120
|
return;
|
|
99048
99121
|
handleDtsMayChangeOfReferencingExportOfAffectedFile(state, affectedFile, cancellationToken, computeHash, host);
|
|
@@ -99053,7 +99126,7 @@ var ts;
|
|
|
99053
99126
|
var program = ts.Debug.checkDefined(state.program);
|
|
99054
99127
|
var sourceFile = program.getSourceFileByPath(path);
|
|
99055
99128
|
if (sourceFile) {
|
|
99056
|
-
ts.BuilderState.updateShapeSignature(state, program, sourceFile,
|
|
99129
|
+
ts.BuilderState.updateShapeSignature(state, program, sourceFile, cancellationToken, computeHash, !host.disableUseFileVersionAsSignature);
|
|
99057
99130
|
if (ts.getEmitDeclarations(state.compilerOptions)) {
|
|
99058
99131
|
addToAffectedFilesPendingEmit(state, path, 0);
|
|
99059
99132
|
}
|
|
@@ -99069,24 +99142,10 @@ var ts;
|
|
|
99069
99142
|
return !state.semanticDiagnosticsFromOldState.size;
|
|
99070
99143
|
}
|
|
99071
99144
|
function isChangedSignature(state, path) {
|
|
99072
|
-
var
|
|
99073
|
-
var
|
|
99145
|
+
var oldSignature = ts.Debug.checkDefined(state.oldSignatures).get(path) || undefined;
|
|
99146
|
+
var newSignature = ts.Debug.checkDefined(state.fileInfos.get(path)).signature;
|
|
99074
99147
|
return newSignature !== oldSignature;
|
|
99075
99148
|
}
|
|
99076
|
-
function forEachKeyOfExportedModulesMap(state, filePath, fn) {
|
|
99077
|
-
var keys = state.currentAffectedFilesExportedModulesMap.getKeys(filePath);
|
|
99078
|
-
var result = keys && ts.forEachKey(keys, fn);
|
|
99079
|
-
if (result)
|
|
99080
|
-
return result;
|
|
99081
|
-
keys = state.exportedModulesMap.getKeys(filePath);
|
|
99082
|
-
return keys && ts.forEachKey(keys, function (exportedFromPath) {
|
|
99083
|
-
var _a;
|
|
99084
|
-
return !state.currentAffectedFilesExportedModulesMap.hasKey(exportedFromPath) &&
|
|
99085
|
-
!((_a = state.currentAffectedFilesExportedModulesMap.deletedKeys()) === null || _a === void 0 ? void 0 : _a.has(exportedFromPath)) ?
|
|
99086
|
-
fn(exportedFromPath) :
|
|
99087
|
-
undefined;
|
|
99088
|
-
});
|
|
99089
|
-
}
|
|
99090
99149
|
function handleDtsMayChangeOfGlobalScope(state, filePath, cancellationToken, computeHash, host) {
|
|
99091
99150
|
var _a;
|
|
99092
99151
|
if (!((_a = state.fileInfos.get(filePath)) === null || _a === void 0 ? void 0 : _a.affectsGlobalScope))
|
|
@@ -99097,6 +99156,7 @@ var ts;
|
|
|
99097
99156
|
return true;
|
|
99098
99157
|
}
|
|
99099
99158
|
function handleDtsMayChangeOfReferencingExportOfAffectedFile(state, affectedFile, cancellationToken, computeHash, host) {
|
|
99159
|
+
var _a;
|
|
99100
99160
|
if (!state.exportedModulesMap || !state.changedFilesSet.has(affectedFile.resolvedPath))
|
|
99101
99161
|
return;
|
|
99102
99162
|
if (!isChangedSignature(state, affectedFile.resolvedPath))
|
|
@@ -99119,9 +99179,8 @@ var ts;
|
|
|
99119
99179
|
}
|
|
99120
99180
|
}
|
|
99121
99181
|
}
|
|
99122
|
-
ts.Debug.assert(!!state.currentAffectedFilesExportedModulesMap);
|
|
99123
99182
|
var seenFileAndExportsOfFile = new ts.Set();
|
|
99124
|
-
|
|
99183
|
+
(_a = state.exportedModulesMap.getKeys(affectedFile.resolvedPath)) === null || _a === void 0 ? void 0 : _a.forEach(function (exportedFromPath) {
|
|
99125
99184
|
if (handleDtsMayChangeOfGlobalScope(state, exportedFromPath, cancellationToken, computeHash, host))
|
|
99126
99185
|
return true;
|
|
99127
99186
|
var references = state.referencedMap.getKeys(exportedFromPath);
|
|
@@ -99131,17 +99190,16 @@ var ts;
|
|
|
99131
99190
|
});
|
|
99132
99191
|
}
|
|
99133
99192
|
function handleDtsMayChangeOfFileAndExportsOfFile(state, filePath, seenFileAndExportsOfFile, cancellationToken, computeHash, host) {
|
|
99134
|
-
var _a;
|
|
99193
|
+
var _a, _b;
|
|
99135
99194
|
if (!ts.tryAddToSet(seenFileAndExportsOfFile, filePath))
|
|
99136
99195
|
return undefined;
|
|
99137
99196
|
if (handleDtsMayChangeOfGlobalScope(state, filePath, cancellationToken, computeHash, host))
|
|
99138
99197
|
return true;
|
|
99139
99198
|
handleDtsMayChangeOf(state, filePath, cancellationToken, computeHash, host);
|
|
99140
|
-
|
|
99141
|
-
forEachKeyOfExportedModulesMap(state, filePath, function (exportedFromPath) {
|
|
99199
|
+
(_a = state.exportedModulesMap.getKeys(filePath)) === null || _a === void 0 ? void 0 : _a.forEach(function (exportedFromPath) {
|
|
99142
99200
|
return handleDtsMayChangeOfFileAndExportsOfFile(state, exportedFromPath, seenFileAndExportsOfFile, cancellationToken, computeHash, host);
|
|
99143
99201
|
});
|
|
99144
|
-
(
|
|
99202
|
+
(_b = state.referencedMap.getKeys(filePath)) === null || _b === void 0 ? void 0 : _b.forEach(function (referencingFilePath) {
|
|
99145
99203
|
return !seenFileAndExportsOfFile.has(referencingFilePath) &&
|
|
99146
99204
|
handleDtsMayChangeOf(state, referencingFilePath, cancellationToken, computeHash, host);
|
|
99147
99205
|
});
|
|
@@ -99157,12 +99215,12 @@ var ts;
|
|
|
99157
99215
|
}
|
|
99158
99216
|
else {
|
|
99159
99217
|
state.seenAffectedFiles.add(affected.resolvedPath);
|
|
99218
|
+
state.buildInfoEmitPending = true;
|
|
99160
99219
|
if (emitKind !== undefined) {
|
|
99161
99220
|
(state.seenEmittedFiles || (state.seenEmittedFiles = new ts.Map())).set(affected.resolvedPath, emitKind);
|
|
99162
99221
|
}
|
|
99163
99222
|
if (isPendingEmit) {
|
|
99164
99223
|
state.affectedFilesPendingEmitIndex++;
|
|
99165
|
-
state.buildInfoEmitPending = true;
|
|
99166
99224
|
}
|
|
99167
99225
|
else {
|
|
99168
99226
|
state.affectedFilesIndex++;
|
|
@@ -99194,29 +99252,50 @@ var ts;
|
|
|
99194
99252
|
}
|
|
99195
99253
|
return ts.filterSemanticDiagnostics(diagnostics, state.compilerOptions);
|
|
99196
99254
|
}
|
|
99197
|
-
function getProgramBuildInfo(state, getCanonicalFileName) {
|
|
99198
|
-
|
|
99199
|
-
|
|
99255
|
+
function getProgramBuildInfo(state, getCanonicalFileName, host) {
|
|
99256
|
+
var outFilePath = ts.outFile(state.compilerOptions);
|
|
99257
|
+
if (outFilePath && !state.compilerOptions.composite)
|
|
99258
|
+
return;
|
|
99200
99259
|
var currentDirectory = ts.Debug.checkDefined(state.program).getCurrentDirectory();
|
|
99201
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
|
+
}
|
|
99202
99270
|
var fileNames = [];
|
|
99203
99271
|
var fileNameToFileId = new ts.Map();
|
|
99204
99272
|
var fileIdsList;
|
|
99205
99273
|
var fileNamesToFileIdListId;
|
|
99274
|
+
var emitSignatures;
|
|
99206
99275
|
var fileInfos = ts.arrayFrom(state.fileInfos.entries(), function (_a) {
|
|
99276
|
+
var _b, _c;
|
|
99207
99277
|
var key = _a[0], value = _a[1];
|
|
99208
99278
|
var fileId = toFileId(key);
|
|
99209
99279
|
ts.Debug.assert(fileNames[fileId - 1] === relativeToBuildInfo(key));
|
|
99210
|
-
var
|
|
99211
|
-
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
|
+
}
|
|
99212
99291
|
return value.version === actualSignature ?
|
|
99213
99292
|
value.affectsGlobalScope || value.impliedFormat ?
|
|
99214
99293
|
{ version: value.version, signature: undefined, affectsGlobalScope: value.affectsGlobalScope, impliedFormat: value.impliedFormat } :
|
|
99215
99294
|
value.version :
|
|
99216
99295
|
actualSignature !== undefined ?
|
|
99217
|
-
|
|
99296
|
+
oldSignature === undefined ?
|
|
99218
99297
|
value :
|
|
99219
|
-
{ version: value.version, signature:
|
|
99298
|
+
{ version: value.version, signature: actualSignature, affectsGlobalScope: value.affectsGlobalScope, impliedFormat: value.impliedFormat } :
|
|
99220
99299
|
{ version: value.version, signature: false, affectsGlobalScope: value.affectsGlobalScope, impliedFormat: value.impliedFormat };
|
|
99221
99300
|
});
|
|
99222
99301
|
var referencedMap;
|
|
@@ -99230,16 +99309,12 @@ var ts;
|
|
|
99230
99309
|
if (state.exportedModulesMap) {
|
|
99231
99310
|
exportedModulesMap = ts.mapDefined(ts.arrayFrom(state.exportedModulesMap.keys()).sort(ts.compareStringsCaseSensitive), function (key) {
|
|
99232
99311
|
var _a;
|
|
99233
|
-
|
|
99234
|
-
|
|
99235
|
-
|
|
99236
|
-
|
|
99237
|
-
|
|
99238
|
-
|
|
99239
|
-
return [toFileId(key), toFileIdListId(newValue)];
|
|
99240
|
-
}
|
|
99241
|
-
}
|
|
99242
|
-
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;
|
|
99243
99318
|
});
|
|
99244
99319
|
}
|
|
99245
99320
|
var semanticDiagnosticsPerFile;
|
|
@@ -99250,9 +99325,7 @@ var ts;
|
|
|
99250
99325
|
(semanticDiagnosticsPerFile || (semanticDiagnosticsPerFile = [])).push(value.length ?
|
|
99251
99326
|
[
|
|
99252
99327
|
toFileId(key),
|
|
99253
|
-
|
|
99254
|
-
value :
|
|
99255
|
-
convertToReusableDiagnostics(value, relativeToBuildInfo)
|
|
99328
|
+
convertToReusableDiagnostics(value, relativeToBuildInfo)
|
|
99256
99329
|
] :
|
|
99257
99330
|
toFileId(key));
|
|
99258
99331
|
}
|
|
@@ -99267,16 +99340,27 @@ var ts;
|
|
|
99267
99340
|
}
|
|
99268
99341
|
}
|
|
99269
99342
|
}
|
|
99270
|
-
|
|
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 = {
|
|
99271
99351
|
fileNames: fileNames,
|
|
99272
99352
|
fileInfos: fileInfos,
|
|
99273
|
-
options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions,
|
|
99353
|
+
options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions, "affectsMultiFileEmitBuildInfo"),
|
|
99274
99354
|
fileIdsList: fileIdsList,
|
|
99275
99355
|
referencedMap: referencedMap,
|
|
99276
99356
|
exportedModulesMap: exportedModulesMap,
|
|
99277
99357
|
semanticDiagnosticsPerFile: semanticDiagnosticsPerFile,
|
|
99278
99358
|
affectedFilesPendingEmit: affectedFilesPendingEmit,
|
|
99359
|
+
changeFileSet: changeFileSet,
|
|
99360
|
+
emitSignatures: emitSignatures,
|
|
99361
|
+
dtsChangeTime: state.dtsChangeTime,
|
|
99279
99362
|
};
|
|
99363
|
+
return result;
|
|
99280
99364
|
function relativeToBuildInfoEnsuringAbsolutePath(path) {
|
|
99281
99365
|
return relativeToBuildInfo(ts.getNormalizedAbsolutePath(path, currentDirectory));
|
|
99282
99366
|
}
|
|
@@ -99301,21 +99385,18 @@ var ts;
|
|
|
99301
99385
|
}
|
|
99302
99386
|
return fileIdListId;
|
|
99303
99387
|
}
|
|
99304
|
-
|
|
99305
|
-
|
|
99306
|
-
|
|
99307
|
-
|
|
99308
|
-
|
|
99309
|
-
|
|
99310
|
-
|
|
99311
|
-
|
|
99312
|
-
|
|
99313
|
-
optionKey === "strict" ||
|
|
99314
|
-
optionKey === "skiplibcheck" || optionKey === "skipdefaultlibcheck") {
|
|
99315
|
-
(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
|
+
}
|
|
99316
99397
|
}
|
|
99398
|
+
return result;
|
|
99317
99399
|
}
|
|
99318
|
-
return result;
|
|
99319
99400
|
}
|
|
99320
99401
|
function convertToReusableCompilerOptionValue(option, value, relativeToBuildInfo) {
|
|
99321
99402
|
if (option) {
|
|
@@ -99389,6 +99470,10 @@ var ts;
|
|
|
99389
99470
|
return { host: host, newProgram: newProgram, oldProgram: oldProgram, configFileParsingDiagnostics: configFileParsingDiagnostics || ts.emptyArray };
|
|
99390
99471
|
}
|
|
99391
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;
|
|
99392
99477
|
function createBuilderProgram(kind, _a) {
|
|
99393
99478
|
var newProgram = _a.newProgram, host = _a.host, oldProgram = _a.oldProgram, configFileParsingDiagnostics = _a.configFileParsingDiagnostics;
|
|
99394
99479
|
var oldState = oldProgram && oldProgram.getState();
|
|
@@ -99400,28 +99485,28 @@ var ts;
|
|
|
99400
99485
|
var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames());
|
|
99401
99486
|
var computeHash = ts.maybeBind(host, host.createHash);
|
|
99402
99487
|
var state = createBuilderProgramState(newProgram, getCanonicalFileName, oldState, host.disableUseFileVersionAsSignature);
|
|
99403
|
-
var
|
|
99404
|
-
newProgram.getProgramBuildInfo = function () { return getProgramBuildInfo(state, getCanonicalFileName); };
|
|
99488
|
+
var backupEmitState;
|
|
99489
|
+
newProgram.getProgramBuildInfo = function () { return getProgramBuildInfo(state, getCanonicalFileName, host); };
|
|
99405
99490
|
newProgram = undefined;
|
|
99406
99491
|
oldProgram = undefined;
|
|
99407
99492
|
oldState = undefined;
|
|
99408
99493
|
var getState = function () { return state; };
|
|
99409
99494
|
var builderProgram = createRedirectedBuilderProgram(getState, configFileParsingDiagnostics);
|
|
99410
99495
|
builderProgram.getState = getState;
|
|
99411
|
-
builderProgram.
|
|
99412
|
-
ts.Debug.assert(
|
|
99413
|
-
|
|
99496
|
+
builderProgram.backupEmitState = function () {
|
|
99497
|
+
ts.Debug.assert(backupEmitState === undefined);
|
|
99498
|
+
backupEmitState = backupEmitBuilderProgramState(state);
|
|
99414
99499
|
};
|
|
99415
|
-
builderProgram.
|
|
99416
|
-
state
|
|
99417
|
-
|
|
99500
|
+
builderProgram.restoreEmitState = function () {
|
|
99501
|
+
restoreEmitBuilderProgramState(state, ts.Debug.checkDefined(backupEmitState));
|
|
99502
|
+
backupEmitState = undefined;
|
|
99418
99503
|
};
|
|
99419
99504
|
builderProgram.getAllDependencies = function (sourceFile) { return ts.BuilderState.getAllDependencies(state, ts.Debug.checkDefined(state.program), sourceFile); };
|
|
99420
99505
|
builderProgram.getSemanticDiagnostics = getSemanticDiagnostics;
|
|
99421
99506
|
builderProgram.emit = emit;
|
|
99422
99507
|
builderProgram.releaseProgram = function () {
|
|
99423
99508
|
releaseCache(state);
|
|
99424
|
-
|
|
99509
|
+
backupEmitState = undefined;
|
|
99425
99510
|
};
|
|
99426
99511
|
if (kind === BuilderProgramKind.SemanticDiagnosticsBuilderProgram) {
|
|
99427
99512
|
builderProgram.getSemanticDiagnosticsOfNextAffectedFile = getSemanticDiagnosticsOfNextAffectedFile;
|
|
@@ -99467,35 +99552,57 @@ var ts;
|
|
|
99467
99552
|
affected = program;
|
|
99468
99553
|
}
|
|
99469
99554
|
}
|
|
99470
|
-
return toAffectedFileEmitResult(state, ts.Debug.checkDefined(state.program).emit(affected === state.program ? undefined : affected,
|
|
99471
|
-
|
|
99555
|
+
return toAffectedFileEmitResult(state, ts.Debug.checkDefined(state.program).emit(affected === state.program ? undefined : affected, ts.getEmitDeclarations(state.compilerOptions) ?
|
|
99556
|
+
getWriteFileCallback(writeFile, customTransformers) :
|
|
99472
99557
|
writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles || emitKind === 0, customTransformers), affected, emitKind, isPendingEmitFile);
|
|
99473
99558
|
}
|
|
99474
|
-
function
|
|
99559
|
+
function getWriteFileCallback(writeFile, customTransformers) {
|
|
99475
99560
|
return function (fileName, text, writeByteOrderMark, onError, sourceFiles, data) {
|
|
99476
|
-
var _a;
|
|
99561
|
+
var _a, _b, _c;
|
|
99477
99562
|
if (ts.isDeclarationFileName(fileName)) {
|
|
99478
|
-
ts.
|
|
99479
|
-
|
|
99480
|
-
|
|
99481
|
-
|
|
99482
|
-
|
|
99483
|
-
|
|
99484
|
-
|
|
99485
|
-
|
|
99486
|
-
|
|
99487
|
-
|
|
99488
|
-
|
|
99489
|
-
|
|
99490
|
-
|
|
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
|
+
}
|
|
99491
99587
|
}
|
|
99492
|
-
|
|
99493
|
-
|
|
99494
|
-
|
|
99495
|
-
|
|
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;
|
|
99496
99596
|
}
|
|
99497
99597
|
}
|
|
99498
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
|
+
}
|
|
99499
99606
|
}
|
|
99500
99607
|
if (writeFile)
|
|
99501
99608
|
writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data);
|
|
@@ -99544,8 +99651,8 @@ var ts;
|
|
|
99544
99651
|
}
|
|
99545
99652
|
}
|
|
99546
99653
|
}
|
|
99547
|
-
return ts.Debug.checkDefined(state.program).emit(targetSourceFile,
|
|
99548
|
-
|
|
99654
|
+
return ts.Debug.checkDefined(state.program).emit(targetSourceFile, ts.getEmitDeclarations(state.compilerOptions) ?
|
|
99655
|
+
getWriteFileCallback(writeFile, customTransformers) :
|
|
99549
99656
|
writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles, customTransformers);
|
|
99550
99657
|
}
|
|
99551
99658
|
function getSemanticDiagnosticsOfNextAffectedFile(cancellationToken, ignoreSourceFile) {
|
|
@@ -99608,14 +99715,28 @@ var ts;
|
|
|
99608
99715
|
{ version: fileInfo.version, signature: fileInfo.signature === false ? undefined : fileInfo.version, affectsGlobalScope: fileInfo.affectsGlobalScope, impliedFormat: fileInfo.impliedFormat };
|
|
99609
99716
|
}
|
|
99610
99717
|
ts.toBuilderStateFileInfo = toBuilderStateFileInfo;
|
|
99611
|
-
function
|
|
99612
|
-
var _a;
|
|
99718
|
+
function createBuilderProgramUsingProgramBuildInfo(programFromBuildInfo, buildInfoPath, host) {
|
|
99719
|
+
var _a, _b, _c, _d, _e;
|
|
99613
99720
|
var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));
|
|
99614
99721
|
var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames());
|
|
99615
|
-
var
|
|
99616
|
-
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)); });
|
|
99617
99725
|
var fileInfos = new ts.Map();
|
|
99618
|
-
|
|
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
|
+
});
|
|
99619
99740
|
var state = {
|
|
99620
99741
|
fileInfos: fileInfos,
|
|
99621
99742
|
compilerOptions: program.options ? ts.convertToOptionsWithAbsolutePaths(program.options, toAbsolutePath) : {},
|
|
@@ -99626,11 +99747,15 @@ var ts;
|
|
|
99626
99747
|
affectedFilesPendingEmit: ts.map(program.affectedFilesPendingEmit, function (value) { return toFilePath(value[0]); }),
|
|
99627
99748
|
affectedFilesPendingEmitKind: program.affectedFilesPendingEmit && ts.arrayToMap(program.affectedFilesPendingEmit, function (value) { return toFilePath(value[0]); }, function (value) { return value[1]; }),
|
|
99628
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,
|
|
99629
99754
|
};
|
|
99630
99755
|
return {
|
|
99631
99756
|
getState: function () { return state; },
|
|
99632
|
-
|
|
99633
|
-
|
|
99757
|
+
backupEmitState: ts.noop,
|
|
99758
|
+
restoreEmitState: ts.noop,
|
|
99634
99759
|
getProgram: ts.notImplemented,
|
|
99635
99760
|
getProgramOrUndefined: ts.returnUndefined,
|
|
99636
99761
|
releaseProgram: ts.noop,
|
|
@@ -99675,12 +99800,12 @@ var ts;
|
|
|
99675
99800
|
return map;
|
|
99676
99801
|
}
|
|
99677
99802
|
}
|
|
99678
|
-
ts.
|
|
99803
|
+
ts.createBuilderProgramUsingProgramBuildInfo = createBuilderProgramUsingProgramBuildInfo;
|
|
99679
99804
|
function createRedirectedBuilderProgram(getState, configFileParsingDiagnostics) {
|
|
99680
99805
|
return {
|
|
99681
99806
|
getState: ts.notImplemented,
|
|
99682
|
-
|
|
99683
|
-
|
|
99807
|
+
backupEmitState: ts.noop,
|
|
99808
|
+
restoreEmitState: ts.noop,
|
|
99684
99809
|
getProgram: getProgram,
|
|
99685
99810
|
getProgramOrUndefined: function () { return getState().program; },
|
|
99686
99811
|
releaseProgram: function () { return getState().program = undefined; },
|
|
@@ -100631,9 +100756,9 @@ var ts;
|
|
|
100631
100756
|
var targets = importedFileNames.map(function (f) { return ts.getNormalizedAbsolutePath(f, cwd); });
|
|
100632
100757
|
var shouldFilterIgnoredPaths = !ts.every(targets, ts.containsIgnoredPath);
|
|
100633
100758
|
if (!preferSymlinks) {
|
|
100634
|
-
var
|
|
100635
|
-
if (
|
|
100636
|
-
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;
|
|
100637
100762
|
}
|
|
100638
100763
|
var symlinkedDirectories = (_a = host.getSymlinkCache) === null || _a === void 0 ? void 0 : _a.call(host).getSymlinkedDirectoriesByRealpath();
|
|
100639
100764
|
var fullImportedFileName = ts.getNormalizedAbsolutePath(importedFileName, cwd);
|
|
@@ -100652,10 +100777,10 @@ var ts;
|
|
|
100652
100777
|
for (var _i = 0, symlinkDirectories_1 = symlinkDirectories; _i < symlinkDirectories_1.length; _i++) {
|
|
100653
100778
|
var symlinkDirectory = symlinkDirectories_1[_i];
|
|
100654
100779
|
var option = ts.resolvePath(symlinkDirectory, relative);
|
|
100655
|
-
var
|
|
100780
|
+
var result_17 = cb(option, target === referenceRedirect);
|
|
100656
100781
|
shouldFilterIgnoredPaths = true;
|
|
100657
|
-
if (
|
|
100658
|
-
return
|
|
100782
|
+
if (result_17)
|
|
100783
|
+
return result_17;
|
|
100659
100784
|
}
|
|
100660
100785
|
});
|
|
100661
100786
|
});
|
|
@@ -101470,6 +101595,7 @@ var ts;
|
|
|
101470
101595
|
readDirectory: ts.maybeBind(host, host.readDirectory),
|
|
101471
101596
|
disableUseFileVersionAsSignature: host.disableUseFileVersionAsSignature,
|
|
101472
101597
|
storeFilesChangingSignatureDuringEmit: host.storeFilesChangingSignatureDuringEmit,
|
|
101598
|
+
now: ts.maybeBind(host, host.now),
|
|
101473
101599
|
};
|
|
101474
101600
|
function writeFile(fileName, text, writeByteOrderMark, onError) {
|
|
101475
101601
|
try {
|
|
@@ -101524,6 +101650,7 @@ var ts;
|
|
|
101524
101650
|
createProgram: createProgram || ts.createEmitAndSemanticDiagnosticsBuilderProgram,
|
|
101525
101651
|
disableUseFileVersionAsSignature: system.disableUseFileVersionAsSignature,
|
|
101526
101652
|
storeFilesChangingSignatureDuringEmit: system.storeFilesChangingSignatureDuringEmit,
|
|
101653
|
+
now: ts.maybeBind(system, system.now),
|
|
101527
101654
|
};
|
|
101528
101655
|
}
|
|
101529
101656
|
ts.createProgramHost = createProgramHost;
|
|
@@ -101579,20 +101706,26 @@ var ts;
|
|
|
101579
101706
|
var ts;
|
|
101580
101707
|
(function (ts) {
|
|
101581
101708
|
function readBuilderProgram(compilerOptions, host) {
|
|
101582
|
-
if (ts.outFile(compilerOptions))
|
|
101583
|
-
return undefined;
|
|
101584
101709
|
var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(compilerOptions);
|
|
101585
101710
|
if (!buildInfoPath)
|
|
101586
101711
|
return undefined;
|
|
101587
|
-
var
|
|
101588
|
-
if (
|
|
101589
|
-
|
|
101590
|
-
|
|
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
|
+
}
|
|
101591
101724
|
if (buildInfo.version !== ts.version)
|
|
101592
101725
|
return undefined;
|
|
101593
101726
|
if (!buildInfo.program)
|
|
101594
101727
|
return undefined;
|
|
101595
|
-
return ts.
|
|
101728
|
+
return ts.createBuilderProgramUsingProgramBuildInfo(buildInfo.program, buildInfoPath, host);
|
|
101596
101729
|
}
|
|
101597
101730
|
ts.readBuilderProgram = readBuilderProgram;
|
|
101598
101731
|
function createIncrementalCompilerHost(options, system) {
|
|
@@ -101601,6 +101734,7 @@ var ts;
|
|
|
101601
101734
|
host.createHash = ts.maybeBind(system, system.createHash);
|
|
101602
101735
|
host.disableUseFileVersionAsSignature = system.disableUseFileVersionAsSignature;
|
|
101603
101736
|
host.storeFilesChangingSignatureDuringEmit = system.storeFilesChangingSignatureDuringEmit;
|
|
101737
|
+
host.now = ts.maybeBind(system, system.now);
|
|
101604
101738
|
ts.setGetSourceFileAsHashVersioned(host, system);
|
|
101605
101739
|
ts.changeCompilerHostLikeToUseCache(host, function (fileName) { return ts.toPath(fileName, host.getCurrentDirectory(), host.getCanonicalFileName); });
|
|
101606
101740
|
return host;
|
|
@@ -102263,11 +102397,13 @@ var ts;
|
|
|
102263
102397
|
UpToDateStatusType[UpToDateStatusType["OutputMissing"] = 4] = "OutputMissing";
|
|
102264
102398
|
UpToDateStatusType[UpToDateStatusType["OutOfDateWithSelf"] = 5] = "OutOfDateWithSelf";
|
|
102265
102399
|
UpToDateStatusType[UpToDateStatusType["OutOfDateWithUpstream"] = 6] = "OutOfDateWithUpstream";
|
|
102266
|
-
UpToDateStatusType[UpToDateStatusType["
|
|
102267
|
-
UpToDateStatusType[UpToDateStatusType["
|
|
102268
|
-
UpToDateStatusType[UpToDateStatusType["
|
|
102269
|
-
UpToDateStatusType[UpToDateStatusType["
|
|
102270
|
-
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";
|
|
102271
102407
|
})(UpToDateStatusType = ts.UpToDateStatusType || (ts.UpToDateStatusType = {}));
|
|
102272
102408
|
function resolveConfigFileProjectName(project) {
|
|
102273
102409
|
if (ts.fileExtensionIs(project, ".json")) {
|
|
@@ -102305,9 +102441,10 @@ var ts;
|
|
|
102305
102441
|
function getOrCreateValueMapFromConfigFileMap(configFileMap, resolved) {
|
|
102306
102442
|
return getOrCreateValueFromConfigFileMap(configFileMap, resolved, function () { return new ts.Map(); });
|
|
102307
102443
|
}
|
|
102308
|
-
function
|
|
102309
|
-
return
|
|
102444
|
+
function getCurrentTime(host) {
|
|
102445
|
+
return host.now ? host.now() : new Date();
|
|
102310
102446
|
}
|
|
102447
|
+
ts.getCurrentTime = getCurrentTime;
|
|
102311
102448
|
function isCircularBuildOrder(buildOrder) {
|
|
102312
102449
|
return !!buildOrder && !!buildOrder.buildOrder;
|
|
102313
102450
|
}
|
|
@@ -102391,6 +102528,7 @@ var ts;
|
|
|
102391
102528
|
return ts.loadWithTypeDirectiveCache(ts.Debug.checkEachDefined(typeReferenceDirectiveNames), containingFile, redirectedReference, containingFileMode, loader_4);
|
|
102392
102529
|
};
|
|
102393
102530
|
}
|
|
102531
|
+
compilerHost.getBuildInfo = function (fileName, configFilePath) { return getBuildInfo(state, fileName, toResolvedConfigFilePath(state, configFilePath), undefined); };
|
|
102394
102532
|
var _a = ts.createWatchFactory(hostWithWatch, options), watchFile = _a.watchFile, watchDirectory = _a.watchDirectory, writeLog = _a.writeLog;
|
|
102395
102533
|
var state = {
|
|
102396
102534
|
host: host,
|
|
@@ -102406,8 +102544,9 @@ var ts;
|
|
|
102406
102544
|
resolvedConfigFilePaths: new ts.Map(),
|
|
102407
102545
|
configFileCache: new ts.Map(),
|
|
102408
102546
|
projectStatus: new ts.Map(),
|
|
102409
|
-
buildInfoChecked: new ts.Map(),
|
|
102410
102547
|
extendedConfigCache: new ts.Map(),
|
|
102548
|
+
buildInfoCache: new ts.Map(),
|
|
102549
|
+
outputTimeStamps: new ts.Map(),
|
|
102411
102550
|
builderPrograms: new ts.Map(),
|
|
102412
102551
|
diagnostics: new ts.Map(),
|
|
102413
102552
|
projectPendingBuild: new ts.Map(),
|
|
@@ -102429,6 +102568,7 @@ var ts;
|
|
|
102429
102568
|
allWatchedConfigFiles: new ts.Map(),
|
|
102430
102569
|
allWatchedExtendedConfigFiles: new ts.Map(),
|
|
102431
102570
|
allWatchedPackageJsonFiles: new ts.Map(),
|
|
102571
|
+
filesWatched: new ts.Map(),
|
|
102432
102572
|
lastCachedPackageJsonLookups: new ts.Map(),
|
|
102433
102573
|
timerToBuildInvalidatedProject: undefined,
|
|
102434
102574
|
reportFileChangeDetected: false,
|
|
@@ -102530,11 +102670,12 @@ var ts;
|
|
|
102530
102670
|
var noopOnDelete = { onDeleteValue: ts.noop };
|
|
102531
102671
|
ts.mutateMapSkippingNewValues(state.configFileCache, currentProjects, noopOnDelete);
|
|
102532
102672
|
ts.mutateMapSkippingNewValues(state.projectStatus, currentProjects, noopOnDelete);
|
|
102533
|
-
ts.mutateMapSkippingNewValues(state.buildInfoChecked, currentProjects, noopOnDelete);
|
|
102534
102673
|
ts.mutateMapSkippingNewValues(state.builderPrograms, currentProjects, noopOnDelete);
|
|
102535
102674
|
ts.mutateMapSkippingNewValues(state.diagnostics, currentProjects, noopOnDelete);
|
|
102536
102675
|
ts.mutateMapSkippingNewValues(state.projectPendingBuild, currentProjects, noopOnDelete);
|
|
102537
102676
|
ts.mutateMapSkippingNewValues(state.projectErrorsReported, currentProjects, noopOnDelete);
|
|
102677
|
+
ts.mutateMapSkippingNewValues(state.buildInfoCache, currentProjects, noopOnDelete);
|
|
102678
|
+
ts.mutateMapSkippingNewValues(state.outputTimeStamps, currentProjects, noopOnDelete);
|
|
102538
102679
|
if (state.watch) {
|
|
102539
102680
|
ts.mutateMapSkippingNewValues(state.allWatchedConfigFiles, currentProjects, { onDeleteValue: ts.closeFileWatcher });
|
|
102540
102681
|
state.allWatchedExtendedConfigFiles.forEach(function (watcher) {
|
|
@@ -102820,16 +102961,16 @@ var ts;
|
|
|
102820
102961
|
}
|
|
102821
102962
|
function emit(writeFileCallback, cancellationToken, customTransformers) {
|
|
102822
102963
|
var _a;
|
|
102823
|
-
var _b, _c;
|
|
102964
|
+
var _b, _c, _d;
|
|
102824
102965
|
ts.Debug.assertIsDefined(program);
|
|
102825
102966
|
ts.Debug.assert(step === BuildStep.Emit);
|
|
102826
|
-
program.
|
|
102967
|
+
program.backupEmitState();
|
|
102827
102968
|
var declDiagnostics;
|
|
102828
102969
|
var reportDeclarationDiagnostics = function (d) { return (declDiagnostics || (declDiagnostics = [])).push(d); };
|
|
102829
102970
|
var outputFiles = [];
|
|
102830
|
-
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;
|
|
102831
102972
|
if (declDiagnostics) {
|
|
102832
|
-
program.
|
|
102973
|
+
program.restoreEmitState();
|
|
102833
102974
|
(_a = buildErrors(state, projectPath, program, config, declDiagnostics, BuildResultFlags.DeclarationEmitErrors, "Declaration file"), buildResult = _a.buildResult, step = _a.step);
|
|
102834
102975
|
return {
|
|
102835
102976
|
emitSkipped: true,
|
|
@@ -102838,35 +102979,43 @@ var ts;
|
|
|
102838
102979
|
}
|
|
102839
102980
|
var host = state.host, compilerHost = state.compilerHost;
|
|
102840
102981
|
var resultFlags = BuildResultFlags.DeclarationOutputUnchanged;
|
|
102841
|
-
var
|
|
102842
|
-
var anyDtsChanged = false;
|
|
102982
|
+
var existingBuildInfo = ((_d = state.buildInfoCache.get(projectPath)) === null || _d === void 0 ? void 0 : _d.buildInfo) || undefined;
|
|
102843
102983
|
var emitterDiagnostics = ts.createDiagnosticCollection();
|
|
102844
102984
|
var emittedOutputs = new ts.Map();
|
|
102985
|
+
var options = program.getCompilerOptions();
|
|
102986
|
+
var isIncremental = ts.isIncrementalCompilation(options);
|
|
102987
|
+
var outputTimeStampMap;
|
|
102988
|
+
var now;
|
|
102845
102989
|
outputFiles.forEach(function (_a) {
|
|
102846
|
-
var
|
|
102847
|
-
var
|
|
102848
|
-
|
|
102849
|
-
|
|
102850
|
-
|
|
102851
|
-
|
|
102852
|
-
|
|
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)) {
|
|
102853
102997
|
resultFlags &= ~BuildResultFlags.DeclarationOutputUnchanged;
|
|
102854
|
-
anyDtsChanged = true;
|
|
102855
102998
|
}
|
|
102856
102999
|
}
|
|
102857
|
-
emittedOutputs.set(toPath(state, name), name);
|
|
102858
103000
|
ts.writeFile(writeFileCallback ? { writeFile: writeFileCallback } : compilerHost, emitterDiagnostics, name, text, writeByteOrderMark);
|
|
102859
|
-
if (
|
|
102860
|
-
|
|
103001
|
+
if (!isIncremental && state.watch) {
|
|
103002
|
+
(outputTimeStampMap || (outputTimeStampMap = getOutputTimeStampMap(state, projectPath))).set(path, now || (now = getCurrentTime(state.host)));
|
|
102861
103003
|
}
|
|
102862
103004
|
});
|
|
102863
|
-
finishEmit(emitterDiagnostics, emittedOutputs,
|
|
103005
|
+
finishEmit(emitterDiagnostics, emittedOutputs, outputFiles.length ? outputFiles[0].name : ts.getFirstProjectOutput(config, !host.useCaseSensitiveFileNames()), resultFlags);
|
|
102864
103006
|
return emitResult;
|
|
102865
103007
|
}
|
|
102866
103008
|
function emitBuildInfo(writeFileCallback, cancellationToken) {
|
|
102867
103009
|
ts.Debug.assertIsDefined(program);
|
|
102868
103010
|
ts.Debug.assert(step === BuildStep.EmitBuildInfo);
|
|
102869
|
-
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);
|
|
102870
103019
|
if (emitResult.diagnostics.length) {
|
|
102871
103020
|
reportErrors(state, emitResult.diagnostics);
|
|
102872
103021
|
state.diagnostics.set(projectPath, __spreadArray(__spreadArray([], state.diagnostics.get(projectPath), true), emitResult.diagnostics, true));
|
|
@@ -102879,7 +103028,7 @@ var ts;
|
|
|
102879
103028
|
step = BuildStep.QueueReferencingProjects;
|
|
102880
103029
|
return emitResult;
|
|
102881
103030
|
}
|
|
102882
|
-
function finishEmit(emitterDiagnostics, emittedOutputs,
|
|
103031
|
+
function finishEmit(emitterDiagnostics, emittedOutputs, oldestOutputFileName, resultFlags) {
|
|
102883
103032
|
var _a;
|
|
102884
103033
|
var emitDiagnostics = emitterDiagnostics.getDiagnostics();
|
|
102885
103034
|
if (emitDiagnostics.length) {
|
|
@@ -102889,13 +103038,11 @@ var ts;
|
|
|
102889
103038
|
if (state.write) {
|
|
102890
103039
|
emittedOutputs.forEach(function (name) { return listEmittedFile(state, config, name); });
|
|
102891
103040
|
}
|
|
102892
|
-
|
|
103041
|
+
updateOutputTimestampsWorker(state, config, projectPath, ts.Diagnostics.Updating_unchanged_output_timestamps_of_project_0, emittedOutputs);
|
|
102893
103042
|
state.diagnostics.delete(projectPath);
|
|
102894
103043
|
state.projectStatus.set(projectPath, {
|
|
102895
103044
|
type: ts.UpToDateStatusType.UpToDate,
|
|
102896
|
-
newestDeclarationFileContentChangedTime:
|
|
102897
|
-
maximumDate :
|
|
102898
|
-
newestDeclarationFileContentChangedTime,
|
|
103045
|
+
newestDeclarationFileContentChangedTime: getDtsChangeTime(state, config.options, projectPath),
|
|
102899
103046
|
oldestOutputFileName: oldestOutputFileName
|
|
102900
103047
|
});
|
|
102901
103048
|
afterProgramDone(state, program, config);
|
|
@@ -102928,12 +103075,21 @@ var ts;
|
|
|
102928
103075
|
ts.Debug.assert(!!outputFiles.length);
|
|
102929
103076
|
var emitterDiagnostics = ts.createDiagnosticCollection();
|
|
102930
103077
|
var emittedOutputs = new ts.Map();
|
|
103078
|
+
var resultFlags = BuildResultFlags.DeclarationOutputUnchanged;
|
|
103079
|
+
var existingBuildInfo = state.buildInfoCache.get(projectPath).buildInfo;
|
|
102931
103080
|
outputFiles.forEach(function (_a) {
|
|
102932
|
-
var
|
|
103081
|
+
var _b, _c;
|
|
103082
|
+
var name = _a.name, text = _a.text, writeByteOrderMark = _a.writeByteOrderMark, buildInfo = _a.buildInfo;
|
|
102933
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
|
+
}
|
|
102934
103090
|
ts.writeFile(writeFileCallback ? { writeFile: writeFileCallback } : compilerHost, emitterDiagnostics, name, text, writeByteOrderMark);
|
|
102935
103091
|
});
|
|
102936
|
-
var emitDiagnostics = finishEmit(emitterDiagnostics, emittedOutputs,
|
|
103092
|
+
var emitDiagnostics = finishEmit(emitterDiagnostics, emittedOutputs, outputFiles[0].name, resultFlags);
|
|
102937
103093
|
return { emitSkipped: false, diagnostics: emitDiagnostics };
|
|
102938
103094
|
}
|
|
102939
103095
|
function executeSteps(till, cancellationToken, writeFile, customTransformers) {
|
|
@@ -103089,7 +103245,7 @@ var ts;
|
|
|
103089
103245
|
state.projectCompilerOptions = state.baseCompilerOptions;
|
|
103090
103246
|
}
|
|
103091
103247
|
function buildErrors(state, resolvedPath, program, config, diagnostics, buildResult, errorType) {
|
|
103092
|
-
var canEmitBuildInfo =
|
|
103248
|
+
var canEmitBuildInfo = program && !ts.outFile(program.getCompilerOptions());
|
|
103093
103249
|
reportAndStoreErrors(state, resolvedPath, diagnostics);
|
|
103094
103250
|
state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.Unbuildable, reason: errorType + " errors" });
|
|
103095
103251
|
if (canEmitBuildInfo)
|
|
@@ -103097,8 +103253,94 @@ var ts;
|
|
|
103097
103253
|
afterProgramDone(state, program, config);
|
|
103098
103254
|
return { buildResult: buildResult, step: BuildStep.QueueReferencingProjects };
|
|
103099
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
|
+
}
|
|
103100
103342
|
function checkConfigFileUpToDateStatus(state, configFile, oldestOutputFileTime, oldestOutputFileName) {
|
|
103101
|
-
var tsconfigTime =
|
|
103343
|
+
var tsconfigTime = getModifiedTime(state, configFile);
|
|
103102
103344
|
if (oldestOutputFileTime < tsconfigTime) {
|
|
103103
103345
|
return {
|
|
103104
103346
|
type: ts.UpToDateStatusType.OutOfDateWithSelf,
|
|
@@ -103108,76 +103350,22 @@ var ts;
|
|
|
103108
103350
|
}
|
|
103109
103351
|
}
|
|
103110
103352
|
function getUpToDateStatusWorker(state, project, resolvedPath) {
|
|
103111
|
-
var
|
|
103112
|
-
var newestInputFileName = undefined;
|
|
103113
|
-
var newestInputFileTime = minimumDate;
|
|
103114
|
-
var host = state.host;
|
|
103115
|
-
for (var _i = 0, _a = project.fileNames; _i < _a.length; _i++) {
|
|
103116
|
-
var inputFile = _a[_i];
|
|
103117
|
-
if (!host.fileExists(inputFile)) {
|
|
103118
|
-
return {
|
|
103119
|
-
type: ts.UpToDateStatusType.Unbuildable,
|
|
103120
|
-
reason: inputFile + " does not exist"
|
|
103121
|
-
};
|
|
103122
|
-
}
|
|
103123
|
-
if (!force) {
|
|
103124
|
-
var inputTime = ts.getModifiedTime(host, inputFile);
|
|
103125
|
-
if (inputTime > newestInputFileTime) {
|
|
103126
|
-
newestInputFileName = inputFile;
|
|
103127
|
-
newestInputFileTime = inputTime;
|
|
103128
|
-
}
|
|
103129
|
-
}
|
|
103130
|
-
}
|
|
103353
|
+
var _a, _b, _c;
|
|
103131
103354
|
if (!project.fileNames.length && !ts.canJsonReportNoInputFiles(project.raw)) {
|
|
103132
103355
|
return {
|
|
103133
103356
|
type: ts.UpToDateStatusType.ContainerOnly
|
|
103134
103357
|
};
|
|
103135
103358
|
}
|
|
103136
|
-
var
|
|
103137
|
-
var
|
|
103138
|
-
var oldestOutputFileTime = maximumDate;
|
|
103139
|
-
var newestOutputFileName = "(none)";
|
|
103140
|
-
var newestOutputFileTime = minimumDate;
|
|
103141
|
-
var missingOutputFileName;
|
|
103142
|
-
var newestDeclarationFileContentChangedTime = minimumDate;
|
|
103143
|
-
var isOutOfDateWithInputs = false;
|
|
103144
|
-
if (!force) {
|
|
103145
|
-
for (var _b = 0, outputs_1 = outputs; _b < outputs_1.length; _b++) {
|
|
103146
|
-
var output = outputs_1[_b];
|
|
103147
|
-
if (!host.fileExists(output)) {
|
|
103148
|
-
missingOutputFileName = output;
|
|
103149
|
-
break;
|
|
103150
|
-
}
|
|
103151
|
-
var outputTime = ts.getModifiedTime(host, output);
|
|
103152
|
-
if (outputTime < oldestOutputFileTime) {
|
|
103153
|
-
oldestOutputFileTime = outputTime;
|
|
103154
|
-
oldestOutputFileName = output;
|
|
103155
|
-
}
|
|
103156
|
-
if (outputTime < newestInputFileTime) {
|
|
103157
|
-
isOutOfDateWithInputs = true;
|
|
103158
|
-
break;
|
|
103159
|
-
}
|
|
103160
|
-
if (outputTime > newestOutputFileTime) {
|
|
103161
|
-
newestOutputFileTime = outputTime;
|
|
103162
|
-
newestOutputFileName = output;
|
|
103163
|
-
}
|
|
103164
|
-
if (ts.isDeclarationFileName(output)) {
|
|
103165
|
-
var outputModifiedTime = ts.getModifiedTime(host, output);
|
|
103166
|
-
newestDeclarationFileContentChangedTime = newer(newestDeclarationFileContentChangedTime, outputModifiedTime);
|
|
103167
|
-
}
|
|
103168
|
-
}
|
|
103169
|
-
}
|
|
103170
|
-
var pseudoUpToDate = false;
|
|
103171
|
-
var usesPrepend = false;
|
|
103172
|
-
var upstreamChangedProject;
|
|
103359
|
+
var referenceStatuses;
|
|
103360
|
+
var force = !!state.options.force;
|
|
103173
103361
|
if (project.projectReferences) {
|
|
103174
103362
|
state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.ComputingUpstream });
|
|
103175
|
-
for (var
|
|
103176
|
-
var ref = _d[
|
|
103177
|
-
usesPrepend = usesPrepend || !!(ref.prepend);
|
|
103363
|
+
for (var _i = 0, _d = project.projectReferences; _i < _d.length; _i++) {
|
|
103364
|
+
var ref = _d[_i];
|
|
103178
103365
|
var resolvedRef = ts.resolveProjectReferencePath(ref);
|
|
103179
103366
|
var resolvedRefPath = toResolvedConfigFilePath(state, resolvedRef);
|
|
103180
|
-
var
|
|
103367
|
+
var resolvedConfig = parseConfigFile(state, resolvedRef, resolvedRefPath);
|
|
103368
|
+
var refStatus = getUpToDateStatus(state, resolvedConfig, resolvedRefPath);
|
|
103181
103369
|
if (refStatus.type === ts.UpToDateStatusType.ComputingUpstream ||
|
|
103182
103370
|
refStatus.type === ts.UpToDateStatusType.ContainerOnly) {
|
|
103183
103371
|
continue;
|
|
@@ -103196,65 +103384,152 @@ var ts;
|
|
|
103196
103384
|
upstreamProjectName: ref.path
|
|
103197
103385
|
};
|
|
103198
103386
|
}
|
|
103199
|
-
if (!force
|
|
103200
|
-
|
|
103201
|
-
|
|
103202
|
-
|
|
103203
|
-
|
|
103204
|
-
|
|
103205
|
-
|
|
103206
|
-
|
|
103207
|
-
|
|
103208
|
-
|
|
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))) {
|
|
103209
103425
|
return {
|
|
103210
|
-
type: ts.UpToDateStatusType.
|
|
103211
|
-
|
|
103212
|
-
newerProjectName: ref.path
|
|
103426
|
+
type: ts.UpToDateStatusType.OutOfDateBuildInfo,
|
|
103427
|
+
buildInfoFile: buildInfoPath
|
|
103213
103428
|
};
|
|
103214
103429
|
}
|
|
103215
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;
|
|
103216
103434
|
}
|
|
103217
|
-
|
|
103218
|
-
|
|
103219
|
-
|
|
103220
|
-
|
|
103221
|
-
|
|
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
|
+
}
|
|
103222
103457
|
}
|
|
103223
|
-
if (
|
|
103224
|
-
|
|
103225
|
-
|
|
103226
|
-
|
|
103227
|
-
|
|
103228
|
-
|
|
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
|
+
}
|
|
103229
103487
|
}
|
|
103230
|
-
|
|
103231
|
-
|
|
103232
|
-
|
|
103233
|
-
|
|
103234
|
-
|
|
103235
|
-
|
|
103236
|
-
|
|
103237
|
-
var
|
|
103238
|
-
var
|
|
103239
|
-
|
|
103240
|
-
|
|
103241
|
-
|
|
103242
|
-
|
|
103243
|
-
|
|
103244
|
-
if (!force && !state.buildInfoChecked.has(resolvedPath)) {
|
|
103245
|
-
state.buildInfoChecked.set(resolvedPath, true);
|
|
103246
|
-
var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(project.options);
|
|
103247
|
-
if (buildInfoPath) {
|
|
103248
|
-
var value = state.readFileWithCache(buildInfoPath);
|
|
103249
|
-
var buildInfo = value && ts.getBuildInfo(value);
|
|
103250
|
-
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)) {
|
|
103251
103502
|
return {
|
|
103252
|
-
type: ts.UpToDateStatusType.
|
|
103253
|
-
|
|
103503
|
+
type: ts.UpToDateStatusType.OutOfDateWithUpstream,
|
|
103504
|
+
outOfDateOutputFileName: buildInfoPath,
|
|
103505
|
+
newerProjectName: ref.path
|
|
103254
103506
|
};
|
|
103255
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
|
+
};
|
|
103256
103519
|
}
|
|
103257
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;
|
|
103258
103533
|
if (usesPrepend && pseudoUpToDate) {
|
|
103259
103534
|
return {
|
|
103260
103535
|
type: ts.UpToDateStatusType.OutOfDateWithPrepend,
|
|
@@ -103266,12 +103541,29 @@ var ts;
|
|
|
103266
103541
|
type: pseudoUpToDate ? ts.UpToDateStatusType.UpToDateWithUpstreamTypes : ts.UpToDateStatusType.UpToDate,
|
|
103267
103542
|
newestDeclarationFileContentChangedTime: newestDeclarationFileContentChangedTime,
|
|
103268
103543
|
newestInputFileTime: newestInputFileTime,
|
|
103269
|
-
newestOutputFileTime: newestOutputFileTime,
|
|
103270
103544
|
newestInputFileName: newestInputFileName,
|
|
103271
|
-
newestOutputFileName: newestOutputFileName,
|
|
103272
103545
|
oldestOutputFileName: oldestOutputFileName
|
|
103273
103546
|
};
|
|
103274
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
|
+
}
|
|
103275
103567
|
function getUpToDateStatus(state, project, resolvedPath) {
|
|
103276
103568
|
if (project === undefined) {
|
|
103277
103569
|
return { type: ts.UpToDateStatusType.Unbuildable, reason: "File deleted mid-build" };
|
|
@@ -103284,39 +103576,64 @@ var ts;
|
|
|
103284
103576
|
state.projectStatus.set(resolvedPath, actual);
|
|
103285
103577
|
return actual;
|
|
103286
103578
|
}
|
|
103287
|
-
function updateOutputTimestampsWorker(state, proj,
|
|
103579
|
+
function updateOutputTimestampsWorker(state, proj, projectPath, verboseMessage, skipOutputs) {
|
|
103288
103580
|
if (proj.options.noEmit)
|
|
103289
|
-
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
|
+
}
|
|
103290
103594
|
var host = state.host;
|
|
103291
103595
|
var outputs = ts.getAllProjectOutputs(proj, !host.useCaseSensitiveFileNames());
|
|
103596
|
+
var outputTimeStampMap = getOutputTimeStampMap(state, projectPath);
|
|
103597
|
+
var modifiedOutputs = outputTimeStampMap ? new ts.Set() : undefined;
|
|
103292
103598
|
if (!skipOutputs || outputs.length !== skipOutputs.size) {
|
|
103293
103599
|
var reportVerbose = !!state.options.verbose;
|
|
103294
|
-
var now = host.now ? host.now() : new Date();
|
|
103295
103600
|
for (var _i = 0, outputs_2 = outputs; _i < outputs_2.length; _i++) {
|
|
103296
103601
|
var file = outputs_2[_i];
|
|
103297
|
-
|
|
103602
|
+
var path = toPath(state, file);
|
|
103603
|
+
if (skipOutputs === null || skipOutputs === void 0 ? void 0 : skipOutputs.has(path))
|
|
103298
103604
|
continue;
|
|
103299
|
-
}
|
|
103300
103605
|
if (reportVerbose) {
|
|
103301
103606
|
reportVerbose = false;
|
|
103302
103607
|
reportStatus(state, verboseMessage, proj.options.configFilePath);
|
|
103303
103608
|
}
|
|
103304
|
-
|
|
103305
|
-
|
|
103609
|
+
host.setModifiedTime(file, now || (now = getCurrentTime(state.host)));
|
|
103610
|
+
if (outputTimeStampMap) {
|
|
103611
|
+
outputTimeStampMap.set(path, now);
|
|
103612
|
+
modifiedOutputs.add(path);
|
|
103306
103613
|
}
|
|
103307
|
-
host.setModifiedTime(file, now);
|
|
103308
103614
|
}
|
|
103309
103615
|
}
|
|
103310
|
-
|
|
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;
|
|
103311
103628
|
}
|
|
103312
103629
|
function updateOutputTimestamps(state, proj, resolvedPath) {
|
|
103313
103630
|
if (state.options.dry) {
|
|
103314
103631
|
return reportStatus(state, ts.Diagnostics.A_non_dry_build_would_update_timestamps_for_output_of_project_0, proj.options.configFilePath);
|
|
103315
103632
|
}
|
|
103316
|
-
|
|
103633
|
+
updateOutputTimestampsWorker(state, proj, resolvedPath, ts.Diagnostics.Updating_output_timestamps_of_project_0);
|
|
103317
103634
|
state.projectStatus.set(resolvedPath, {
|
|
103318
103635
|
type: ts.UpToDateStatusType.UpToDate,
|
|
103319
|
-
newestDeclarationFileContentChangedTime:
|
|
103636
|
+
newestDeclarationFileContentChangedTime: getDtsChangeTime(state, proj.options, resolvedPath),
|
|
103320
103637
|
oldestOutputFileName: ts.getFirstProjectOutput(proj, !state.host.useCaseSensitiveFileNames())
|
|
103321
103638
|
});
|
|
103322
103639
|
}
|
|
@@ -103498,12 +103815,10 @@ var ts;
|
|
|
103498
103815
|
function watchConfigFile(state, resolved, resolvedPath, parsed) {
|
|
103499
103816
|
if (!state.watch || state.allWatchedConfigFiles.has(resolvedPath))
|
|
103500
103817
|
return;
|
|
103501
|
-
state.allWatchedConfigFiles.set(resolvedPath,
|
|
103502
|
-
invalidateProjectAndScheduleBuilds(state, resolvedPath, ts.ConfigFileProgramReloadLevel.Full);
|
|
103503
|
-
}, 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));
|
|
103504
103819
|
}
|
|
103505
103820
|
function watchExtendedConfigFiles(state, resolvedPath, parsed) {
|
|
103506
|
-
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 () {
|
|
103507
103822
|
var _a;
|
|
103508
103823
|
return (_a = state.allWatchedExtendedConfigFiles.get(extendedConfigFilePath)) === null || _a === void 0 ? void 0 : _a.projects.forEach(function (projectConfigFilePath) {
|
|
103509
103824
|
return invalidateProjectAndScheduleBuilds(state, projectConfigFilePath, ts.ConfigFileProgramReloadLevel.Full);
|
|
@@ -103535,7 +103850,7 @@ var ts;
|
|
|
103535
103850
|
if (!state.watch)
|
|
103536
103851
|
return;
|
|
103537
103852
|
ts.mutateMap(getOrCreateValueMapFromConfigFileMap(state.allWatchedInputFiles, resolvedPath), ts.arrayToMap(parsed.fileNames, function (fileName) { return toPath(state, fileName); }), {
|
|
103538
|
-
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); },
|
|
103539
103854
|
onDeleteValue: ts.closeFileWatcher,
|
|
103540
103855
|
});
|
|
103541
103856
|
}
|
|
@@ -103543,7 +103858,7 @@ var ts;
|
|
|
103543
103858
|
if (!state.watch || !state.lastCachedPackageJsonLookups)
|
|
103544
103859
|
return;
|
|
103545
103860
|
ts.mutateMap(getOrCreateValueMapFromConfigFileMap(state.allWatchedPackageJsonFiles, resolvedPath), new ts.Map(state.lastCachedPackageJsonLookups.get(resolvedPath)), {
|
|
103546
|
-
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); },
|
|
103547
103862
|
onDeleteValue: ts.closeFileWatcher,
|
|
103548
103863
|
});
|
|
103549
103864
|
}
|
|
@@ -103667,19 +103982,18 @@ var ts;
|
|
|
103667
103982
|
}
|
|
103668
103983
|
}
|
|
103669
103984
|
function reportUpToDateStatus(state, configFileName, status) {
|
|
103670
|
-
if (state.options.force && (status.type === ts.UpToDateStatusType.UpToDate || status.type === ts.UpToDateStatusType.UpToDateWithUpstreamTypes)) {
|
|
103671
|
-
return reportStatus(state, ts.Diagnostics.Project_0_is_being_forcibly_rebuilt, relName(state, configFileName));
|
|
103672
|
-
}
|
|
103673
103985
|
switch (status.type) {
|
|
103674
103986
|
case ts.UpToDateStatusType.OutOfDateWithSelf:
|
|
103675
|
-
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));
|
|
103676
103988
|
case ts.UpToDateStatusType.OutOfDateWithUpstream:
|
|
103677
|
-
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));
|
|
103678
103990
|
case ts.UpToDateStatusType.OutputMissing:
|
|
103679
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));
|
|
103680
103994
|
case ts.UpToDateStatusType.UpToDate:
|
|
103681
103995
|
if (status.newestInputFileTime !== undefined) {
|
|
103682
|
-
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 || ""));
|
|
103683
103997
|
}
|
|
103684
103998
|
break;
|
|
103685
103999
|
case ts.UpToDateStatusType.OutOfDateWithPrepend:
|
|
@@ -103696,6 +104010,8 @@ var ts;
|
|
|
103696
104010
|
return reportStatus(state, ts.Diagnostics.Failed_to_parse_file_0_Colon_1, relName(state, configFileName), status.reason);
|
|
103697
104011
|
case ts.UpToDateStatusType.TsVersionOutputOfDate:
|
|
103698
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));
|
|
103699
104015
|
case ts.UpToDateStatusType.ContainerOnly:
|
|
103700
104016
|
case ts.UpToDateStatusType.ComputingUpstream:
|
|
103701
104017
|
break;
|