@typescript-deploys/pr-build 4.8.0-pr-48784-20 → 4.8.0-pr-49285-8
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 +522 -918
- package/lib/tsserver.js +580 -961
- package/lib/tsserverlibrary.d.ts +1 -1
- package/lib/tsserverlibrary.js +580 -961
- package/lib/typescript.d.ts +1 -1
- package/lib/typescript.js +580 -961
- package/lib/typescriptServices.d.ts +1 -1
- package/lib/typescriptServices.js +580 -961
- package/lib/typingsInstaller.js +580 -961
- package/package.json +1 -1
package/lib/tsc.js
CHANGED
|
@@ -3755,7 +3755,7 @@ var ts;
|
|
|
3755
3755
|
};
|
|
3756
3756
|
}
|
|
3757
3757
|
function createDirectoryWatcher(dirName, dirPath, fallbackOptions) {
|
|
3758
|
-
var watcher = fsWatch(dirName, 1, function (_eventName, relativeFileName
|
|
3758
|
+
var watcher = fsWatch(dirName, 1, function (_eventName, relativeFileName) {
|
|
3759
3759
|
if (!ts.isString(relativeFileName))
|
|
3760
3760
|
return;
|
|
3761
3761
|
var fileName = ts.getNormalizedAbsolutePath(relativeFileName, dirName);
|
|
@@ -3763,7 +3763,7 @@ var ts;
|
|
|
3763
3763
|
if (callbacks) {
|
|
3764
3764
|
for (var _i = 0, callbacks_1 = callbacks; _i < callbacks_1.length; _i++) {
|
|
3765
3765
|
var fileCallback = callbacks_1[_i];
|
|
3766
|
-
fileCallback(fileName, FileWatcherEventKind.Changed
|
|
3766
|
+
fileCallback(fileName, FileWatcherEventKind.Changed);
|
|
3767
3767
|
}
|
|
3768
3768
|
}
|
|
3769
3769
|
}, false, PollingInterval.Medium, fallbackOptions);
|
|
@@ -3815,7 +3815,7 @@ var ts;
|
|
|
3815
3815
|
}
|
|
3816
3816
|
else {
|
|
3817
3817
|
cache.set(path, {
|
|
3818
|
-
watcher: watchFile(fileName, function (fileName, eventKind
|
|
3818
|
+
watcher: watchFile(fileName, function (fileName, eventKind) { return ts.forEach(callbacksCache.get(path), function (cb) { return cb(fileName, eventKind); }); }, pollingInterval, options),
|
|
3819
3819
|
refCount: 1
|
|
3820
3820
|
});
|
|
3821
3821
|
}
|
|
@@ -3839,7 +3839,7 @@ var ts;
|
|
|
3839
3839
|
var newTime = modifiedTime.getTime();
|
|
3840
3840
|
if (oldTime !== newTime) {
|
|
3841
3841
|
watchedFile.mtime = modifiedTime;
|
|
3842
|
-
watchedFile.callback(watchedFile.fileName, getFileWatcherEventKind(oldTime, newTime)
|
|
3842
|
+
watchedFile.callback(watchedFile.fileName, getFileWatcherEventKind(oldTime, newTime));
|
|
3843
3843
|
return true;
|
|
3844
3844
|
}
|
|
3845
3845
|
return false;
|
|
@@ -4053,17 +4053,16 @@ var ts;
|
|
|
4053
4053
|
}
|
|
4054
4054
|
ts.createDirectoryWatcherSupportingRecursive = createDirectoryWatcherSupportingRecursive;
|
|
4055
4055
|
function createFileWatcherCallback(callback) {
|
|
4056
|
-
return function (_fileName, eventKind
|
|
4056
|
+
return function (_fileName, eventKind) { return callback(eventKind === FileWatcherEventKind.Changed ? "change" : "rename", ""); };
|
|
4057
4057
|
}
|
|
4058
4058
|
ts.createFileWatcherCallback = createFileWatcherCallback;
|
|
4059
|
-
function createFsWatchCallbackForFileWatcherCallback(fileName, callback,
|
|
4060
|
-
return function (eventName
|
|
4059
|
+
function createFsWatchCallbackForFileWatcherCallback(fileName, callback, fileExists) {
|
|
4060
|
+
return function (eventName) {
|
|
4061
4061
|
if (eventName === "rename") {
|
|
4062
|
-
|
|
4063
|
-
callback(fileName, modifiedTime !== ts.missingFileModifiedTime ? FileWatcherEventKind.Created : FileWatcherEventKind.Deleted, modifiedTime);
|
|
4062
|
+
callback(fileName, fileExists(fileName) ? FileWatcherEventKind.Created : FileWatcherEventKind.Deleted);
|
|
4064
4063
|
}
|
|
4065
4064
|
else {
|
|
4066
|
-
callback(fileName, FileWatcherEventKind.Changed
|
|
4065
|
+
callback(fileName, FileWatcherEventKind.Changed);
|
|
4067
4066
|
}
|
|
4068
4067
|
};
|
|
4069
4068
|
}
|
|
@@ -4082,7 +4081,7 @@ var ts;
|
|
|
4082
4081
|
};
|
|
4083
4082
|
}
|
|
4084
4083
|
function createSystemWatchFunctions(_a) {
|
|
4085
|
-
var pollingWatchFile = _a.pollingWatchFile, getModifiedTime = _a.getModifiedTime, setTimeout = _a.setTimeout, clearTimeout = _a.clearTimeout, fsWatch = _a.fsWatch, useCaseSensitiveFileNames = _a.useCaseSensitiveFileNames, getCurrentDirectory = _a.getCurrentDirectory, fsSupportsRecursiveFsWatch = _a.fsSupportsRecursiveFsWatch, directoryExists = _a.directoryExists, getAccessibleSortedChildDirectories = _a.getAccessibleSortedChildDirectories, realpath = _a.realpath, tscWatchFile = _a.tscWatchFile, useNonPollingWatchers = _a.useNonPollingWatchers, tscWatchDirectory = _a.tscWatchDirectory, defaultWatchFileKind = _a.defaultWatchFileKind;
|
|
4084
|
+
var pollingWatchFile = _a.pollingWatchFile, getModifiedTime = _a.getModifiedTime, setTimeout = _a.setTimeout, clearTimeout = _a.clearTimeout, fsWatch = _a.fsWatch, fileExists = _a.fileExists, 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;
|
|
4086
4085
|
var dynamicPollingWatchFile;
|
|
4087
4086
|
var fixedChunkSizePollingWatchFile;
|
|
4088
4087
|
var nonPollingWatchFile;
|
|
@@ -4104,7 +4103,7 @@ var ts;
|
|
|
4104
4103
|
case ts.WatchFileKind.FixedChunkSizePolling:
|
|
4105
4104
|
return ensureFixedChunkSizePollingWatchFile()(fileName, callback, undefined, undefined);
|
|
4106
4105
|
case ts.WatchFileKind.UseFsEvents:
|
|
4107
|
-
return fsWatch(fileName, 0, createFsWatchCallbackForFileWatcherCallback(fileName, callback,
|
|
4106
|
+
return fsWatch(fileName, 0, createFsWatchCallbackForFileWatcherCallback(fileName, callback, fileExists), false, pollingInterval, ts.getFallbackOptions(options));
|
|
4108
4107
|
case ts.WatchFileKind.UseFsEventsOnParentDirectory:
|
|
4109
4108
|
if (!nonPollingWatchFile) {
|
|
4110
4109
|
nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames);
|
|
@@ -4261,6 +4260,7 @@ var ts;
|
|
|
4261
4260
|
fsWatch: fsWatch,
|
|
4262
4261
|
useCaseSensitiveFileNames: useCaseSensitiveFileNames,
|
|
4263
4262
|
getCurrentDirectory: getCurrentDirectory,
|
|
4263
|
+
fileExists: fileExists,
|
|
4264
4264
|
fsSupportsRecursiveFsWatch: fsSupportsRecursiveFsWatch,
|
|
4265
4265
|
directoryExists: directoryExists,
|
|
4266
4266
|
getAccessibleSortedChildDirectories: function (path) { return getAccessibleFileSystemEntries(path).directories; },
|
|
@@ -4488,7 +4488,7 @@ var ts;
|
|
|
4488
4488
|
else {
|
|
4489
4489
|
eventKind = FileWatcherEventKind.Changed;
|
|
4490
4490
|
}
|
|
4491
|
-
callback(fileName, eventKind
|
|
4491
|
+
callback(fileName, eventKind);
|
|
4492
4492
|
}
|
|
4493
4493
|
}
|
|
4494
4494
|
function fsWatch(fileOrDirectory, entryKind, callback, recursive, fallbackPollingInterval, fallbackOptions) {
|
|
@@ -4508,9 +4508,9 @@ var ts;
|
|
|
4508
4508
|
watcher = undefined;
|
|
4509
4509
|
}
|
|
4510
4510
|
};
|
|
4511
|
-
function invokeCallbackAndUpdateWatcher(createWatcher
|
|
4511
|
+
function invokeCallbackAndUpdateWatcher(createWatcher) {
|
|
4512
4512
|
sysLog("sysLog:: " + fileOrDirectory + ":: Changing watcher to " + (createWatcher === watchPresentFileSystemEntry ? "Present" : "Missing") + "FileSystemEntryWatcher");
|
|
4513
|
-
callback("rename", ""
|
|
4513
|
+
callback("rename", "");
|
|
4514
4514
|
if (watcher) {
|
|
4515
4515
|
watcher.close();
|
|
4516
4516
|
watcher = createWatcher();
|
|
@@ -4543,25 +4543,21 @@ var ts;
|
|
|
4543
4543
|
}
|
|
4544
4544
|
}
|
|
4545
4545
|
function callbackChangingToMissingFileSystemEntry(event, relativeName) {
|
|
4546
|
-
var modifiedTime = getModifiedTime(fileOrDirectory) || ts.missingFileModifiedTime;
|
|
4547
4546
|
return event === "rename" &&
|
|
4548
4547
|
(!relativeName ||
|
|
4549
4548
|
relativeName === lastDirectoryPart ||
|
|
4550
4549
|
(relativeName.lastIndexOf(lastDirectoryPartWithDirectorySeparator) !== -1 && relativeName.lastIndexOf(lastDirectoryPartWithDirectorySeparator) === relativeName.length - lastDirectoryPartWithDirectorySeparator.length)) &&
|
|
4551
|
-
|
|
4552
|
-
invokeCallbackAndUpdateWatcher(watchMissingFileSystemEntry
|
|
4553
|
-
callback(event, relativeName
|
|
4550
|
+
!fileSystemEntryExists(fileOrDirectory, entryKind) ?
|
|
4551
|
+
invokeCallbackAndUpdateWatcher(watchMissingFileSystemEntry) :
|
|
4552
|
+
callback(event, relativeName);
|
|
4554
4553
|
}
|
|
4555
4554
|
function watchPresentFileSystemEntryWithFsWatchFile() {
|
|
4556
4555
|
return watchFile(fileOrDirectory, createFileWatcherCallback(callback), fallbackPollingInterval, fallbackOptions);
|
|
4557
4556
|
}
|
|
4558
4557
|
function watchMissingFileSystemEntry() {
|
|
4559
|
-
return watchFile(fileOrDirectory, function (_fileName, eventKind
|
|
4560
|
-
if (eventKind === FileWatcherEventKind.Created) {
|
|
4561
|
-
|
|
4562
|
-
if (modifiedTime !== ts.missingFileModifiedTime) {
|
|
4563
|
-
invokeCallbackAndUpdateWatcher(watchPresentFileSystemEntry, modifiedTime);
|
|
4564
|
-
}
|
|
4558
|
+
return watchFile(fileOrDirectory, function (_fileName, eventKind) {
|
|
4559
|
+
if (eventKind === FileWatcherEventKind.Created && fileSystemEntryExists(fileOrDirectory, entryKind)) {
|
|
4560
|
+
invokeCallbackAndUpdateWatcher(watchPresentFileSystemEntry);
|
|
4565
4561
|
}
|
|
4566
4562
|
}, fallbackPollingInterval, fallbackOptions);
|
|
4567
4563
|
}
|
|
@@ -4700,17 +4696,12 @@ var ts;
|
|
|
4700
4696
|
}
|
|
4701
4697
|
function getModifiedTime(path) {
|
|
4702
4698
|
var _a;
|
|
4703
|
-
var originalStackTraceLimit = Error.stackTraceLimit;
|
|
4704
|
-
Error.stackTraceLimit = 0;
|
|
4705
4699
|
try {
|
|
4706
4700
|
return (_a = statSync(path)) === null || _a === void 0 ? void 0 : _a.mtime;
|
|
4707
4701
|
}
|
|
4708
4702
|
catch (e) {
|
|
4709
4703
|
return undefined;
|
|
4710
4704
|
}
|
|
4711
|
-
finally {
|
|
4712
|
-
Error.stackTraceLimit = originalStackTraceLimit;
|
|
4713
|
-
}
|
|
4714
4705
|
}
|
|
4715
4706
|
function setModifiedTime(path, time) {
|
|
4716
4707
|
try {
|
|
@@ -6513,8 +6504,8 @@ var ts;
|
|
|
6513
6504
|
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"),
|
|
6514
6505
|
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"),
|
|
6515
6506
|
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."),
|
|
6516
|
-
|
|
6517
|
-
|
|
6507
|
+
Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2: diag(6350, ts.DiagnosticCategory.Message, "Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2_6350", "Project '{0}' is out of date because oldest output '{1}' is older than newest input '{2}'"),
|
|
6508
|
+
Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2: diag(6351, ts.DiagnosticCategory.Message, "Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2_6351", "Project '{0}' is up to date because newest input '{1}' is older than oldest output '{2}'"),
|
|
6518
6509
|
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"),
|
|
6519
6510
|
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"),
|
|
6520
6511
|
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"),
|
|
@@ -6558,8 +6549,6 @@ var ts;
|
|
|
6558
6549
|
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}'."),
|
|
6559
6550
|
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}'."),
|
|
6560
6551
|
Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_resolved: diag(6398, ts.DiagnosticCategory.Message, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_re_6398", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was not resolved."),
|
|
6561
|
-
Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_are_not_emitted: diag(6399, ts.DiagnosticCategory.Message, "Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_are_not_emitted_6399", "Project '{0}' is out of date because buildinfo file '{1}' indicates that some of the changes are not emitted"),
|
|
6562
|
-
Project_0_is_up_to_date_but_needs_update_to_timestamps_of_output_files_that_are_older_than_input_files: diag(6400, ts.DiagnosticCategory.Message, "Project_0_is_up_to_date_but_needs_update_to_timestamps_of_output_files_that_are_older_than_input_fil_6400", "Project '{0}' is up to date but needs update to timestamps of output files that are older than input files"),
|
|
6563
6552
|
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}'"),
|
|
6564
6553
|
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."),
|
|
6565
6554
|
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."),
|
|
@@ -16027,10 +16016,6 @@ var ts;
|
|
|
16027
16016
|
return optionsHaveChanges(oldOptions, newOptions, ts.affectsEmitOptionDeclarations);
|
|
16028
16017
|
}
|
|
16029
16018
|
ts.compilerOptionsAffectEmit = compilerOptionsAffectEmit;
|
|
16030
|
-
function compilerOptionsAffectDeclarationPath(newOptions, oldOptions) {
|
|
16031
|
-
return optionsHaveChanges(oldOptions, newOptions, ts.affectsDeclarationPathOptionDeclarations);
|
|
16032
|
-
}
|
|
16033
|
-
ts.compilerOptionsAffectDeclarationPath = compilerOptionsAffectDeclarationPath;
|
|
16034
16019
|
function getCompilerOptionValue(options, option) {
|
|
16035
16020
|
return option.strictFlag ? getStrictOptionValue(options, option.name) : options[option.name];
|
|
16036
16021
|
}
|
|
@@ -31740,7 +31725,6 @@ var ts;
|
|
|
31740
31725
|
type: "boolean",
|
|
31741
31726
|
affectsSemanticDiagnostics: true,
|
|
31742
31727
|
affectsEmit: true,
|
|
31743
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31744
31728
|
category: ts.Diagnostics.Watch_and_Build_Modes,
|
|
31745
31729
|
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,
|
|
31746
31730
|
defaultValueDescription: false,
|
|
@@ -31774,39 +31758,12 @@ var ts;
|
|
|
31774
31758
|
affectsSourceFile: true,
|
|
31775
31759
|
affectsModuleResolution: true,
|
|
31776
31760
|
affectsEmit: true,
|
|
31777
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31778
31761
|
paramType: ts.Diagnostics.VERSION,
|
|
31779
31762
|
showInSimplifiedHelpView: true,
|
|
31780
31763
|
category: ts.Diagnostics.Language_and_Environment,
|
|
31781
31764
|
description: ts.Diagnostics.Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations,
|
|
31782
31765
|
defaultValueDescription: 0,
|
|
31783
31766
|
};
|
|
31784
|
-
ts.moduleOptionDeclaration = {
|
|
31785
|
-
name: "module",
|
|
31786
|
-
shortName: "m",
|
|
31787
|
-
type: new ts.Map(ts.getEntries({
|
|
31788
|
-
none: ts.ModuleKind.None,
|
|
31789
|
-
commonjs: ts.ModuleKind.CommonJS,
|
|
31790
|
-
amd: ts.ModuleKind.AMD,
|
|
31791
|
-
system: ts.ModuleKind.System,
|
|
31792
|
-
umd: ts.ModuleKind.UMD,
|
|
31793
|
-
es6: ts.ModuleKind.ES2015,
|
|
31794
|
-
es2015: ts.ModuleKind.ES2015,
|
|
31795
|
-
es2020: ts.ModuleKind.ES2020,
|
|
31796
|
-
es2022: ts.ModuleKind.ES2022,
|
|
31797
|
-
esnext: ts.ModuleKind.ESNext,
|
|
31798
|
-
node16: ts.ModuleKind.Node16,
|
|
31799
|
-
nodenext: ts.ModuleKind.NodeNext,
|
|
31800
|
-
})),
|
|
31801
|
-
affectsModuleResolution: true,
|
|
31802
|
-
affectsEmit: true,
|
|
31803
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31804
|
-
paramType: ts.Diagnostics.KIND,
|
|
31805
|
-
showInSimplifiedHelpView: true,
|
|
31806
|
-
category: ts.Diagnostics.Modules,
|
|
31807
|
-
description: ts.Diagnostics.Specify_what_module_code_is_generated,
|
|
31808
|
-
defaultValueDescription: undefined,
|
|
31809
|
-
};
|
|
31810
31767
|
var commandOptionsWithoutBuild = [
|
|
31811
31768
|
{
|
|
31812
31769
|
name: "all",
|
|
@@ -31867,13 +31824,36 @@ var ts;
|
|
|
31867
31824
|
category: ts.Diagnostics.Command_line_Options,
|
|
31868
31825
|
affectsSemanticDiagnostics: true,
|
|
31869
31826
|
affectsEmit: true,
|
|
31870
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31871
31827
|
isCommandLineOnly: true,
|
|
31872
31828
|
description: ts.Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing,
|
|
31873
31829
|
defaultValueDescription: false,
|
|
31874
31830
|
},
|
|
31875
31831
|
ts.targetOptionDeclaration,
|
|
31876
|
-
|
|
31832
|
+
{
|
|
31833
|
+
name: "module",
|
|
31834
|
+
shortName: "m",
|
|
31835
|
+
type: new ts.Map(ts.getEntries({
|
|
31836
|
+
none: ts.ModuleKind.None,
|
|
31837
|
+
commonjs: ts.ModuleKind.CommonJS,
|
|
31838
|
+
amd: ts.ModuleKind.AMD,
|
|
31839
|
+
system: ts.ModuleKind.System,
|
|
31840
|
+
umd: ts.ModuleKind.UMD,
|
|
31841
|
+
es6: ts.ModuleKind.ES2015,
|
|
31842
|
+
es2015: ts.ModuleKind.ES2015,
|
|
31843
|
+
es2020: ts.ModuleKind.ES2020,
|
|
31844
|
+
es2022: ts.ModuleKind.ES2022,
|
|
31845
|
+
esnext: ts.ModuleKind.ESNext,
|
|
31846
|
+
node16: ts.ModuleKind.Node16,
|
|
31847
|
+
nodenext: ts.ModuleKind.NodeNext,
|
|
31848
|
+
})),
|
|
31849
|
+
affectsModuleResolution: true,
|
|
31850
|
+
affectsEmit: true,
|
|
31851
|
+
paramType: ts.Diagnostics.KIND,
|
|
31852
|
+
showInSimplifiedHelpView: true,
|
|
31853
|
+
category: ts.Diagnostics.Modules,
|
|
31854
|
+
description: ts.Diagnostics.Specify_what_module_code_is_generated,
|
|
31855
|
+
defaultValueDescription: undefined,
|
|
31856
|
+
},
|
|
31877
31857
|
{
|
|
31878
31858
|
name: "lib",
|
|
31879
31859
|
type: "list",
|
|
@@ -31910,7 +31890,6 @@ var ts;
|
|
|
31910
31890
|
type: jsxOptionMap,
|
|
31911
31891
|
affectsSourceFile: true,
|
|
31912
31892
|
affectsEmit: true,
|
|
31913
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31914
31893
|
affectsModuleResolution: true,
|
|
31915
31894
|
paramType: ts.Diagnostics.KIND,
|
|
31916
31895
|
showInSimplifiedHelpView: true,
|
|
@@ -31923,7 +31902,6 @@ var ts;
|
|
|
31923
31902
|
shortName: "d",
|
|
31924
31903
|
type: "boolean",
|
|
31925
31904
|
affectsEmit: true,
|
|
31926
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31927
31905
|
showInSimplifiedHelpView: true,
|
|
31928
31906
|
category: ts.Diagnostics.Emit,
|
|
31929
31907
|
transpileOptionValue: undefined,
|
|
@@ -31934,7 +31912,6 @@ var ts;
|
|
|
31934
31912
|
name: "declarationMap",
|
|
31935
31913
|
type: "boolean",
|
|
31936
31914
|
affectsEmit: true,
|
|
31937
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31938
31915
|
showInSimplifiedHelpView: true,
|
|
31939
31916
|
category: ts.Diagnostics.Emit,
|
|
31940
31917
|
transpileOptionValue: undefined,
|
|
@@ -31945,7 +31922,6 @@ var ts;
|
|
|
31945
31922
|
name: "emitDeclarationOnly",
|
|
31946
31923
|
type: "boolean",
|
|
31947
31924
|
affectsEmit: true,
|
|
31948
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31949
31925
|
showInSimplifiedHelpView: true,
|
|
31950
31926
|
category: ts.Diagnostics.Emit,
|
|
31951
31927
|
description: ts.Diagnostics.Only_output_d_ts_files_and_not_JavaScript_files,
|
|
@@ -31956,7 +31932,6 @@ var ts;
|
|
|
31956
31932
|
name: "sourceMap",
|
|
31957
31933
|
type: "boolean",
|
|
31958
31934
|
affectsEmit: true,
|
|
31959
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31960
31935
|
showInSimplifiedHelpView: true,
|
|
31961
31936
|
category: ts.Diagnostics.Emit,
|
|
31962
31937
|
defaultValueDescription: false,
|
|
@@ -31966,9 +31941,6 @@ var ts;
|
|
|
31966
31941
|
name: "outFile",
|
|
31967
31942
|
type: "string",
|
|
31968
31943
|
affectsEmit: true,
|
|
31969
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31970
|
-
affectsDeclarationPath: true,
|
|
31971
|
-
affectsBundleEmitBuildInfo: true,
|
|
31972
31944
|
isFilePath: true,
|
|
31973
31945
|
paramType: ts.Diagnostics.FILE,
|
|
31974
31946
|
showInSimplifiedHelpView: true,
|
|
@@ -31980,8 +31952,6 @@ var ts;
|
|
|
31980
31952
|
name: "outDir",
|
|
31981
31953
|
type: "string",
|
|
31982
31954
|
affectsEmit: true,
|
|
31983
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31984
|
-
affectsDeclarationPath: true,
|
|
31985
31955
|
isFilePath: true,
|
|
31986
31956
|
paramType: ts.Diagnostics.DIRECTORY,
|
|
31987
31957
|
showInSimplifiedHelpView: true,
|
|
@@ -31992,8 +31962,6 @@ var ts;
|
|
|
31992
31962
|
name: "rootDir",
|
|
31993
31963
|
type: "string",
|
|
31994
31964
|
affectsEmit: true,
|
|
31995
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31996
|
-
affectsDeclarationPath: true,
|
|
31997
31965
|
isFilePath: true,
|
|
31998
31966
|
paramType: ts.Diagnostics.LOCATION,
|
|
31999
31967
|
category: ts.Diagnostics.Modules,
|
|
@@ -32004,8 +31972,6 @@ var ts;
|
|
|
32004
31972
|
name: "composite",
|
|
32005
31973
|
type: "boolean",
|
|
32006
31974
|
affectsEmit: true,
|
|
32007
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32008
|
-
affectsBundleEmitBuildInfo: true,
|
|
32009
31975
|
isTSConfigOnly: true,
|
|
32010
31976
|
category: ts.Diagnostics.Projects,
|
|
32011
31977
|
transpileOptionValue: undefined,
|
|
@@ -32016,8 +31982,6 @@ var ts;
|
|
|
32016
31982
|
name: "tsBuildInfoFile",
|
|
32017
31983
|
type: "string",
|
|
32018
31984
|
affectsEmit: true,
|
|
32019
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32020
|
-
affectsBundleEmitBuildInfo: true,
|
|
32021
31985
|
isFilePath: true,
|
|
32022
31986
|
paramType: ts.Diagnostics.FILE,
|
|
32023
31987
|
category: ts.Diagnostics.Projects,
|
|
@@ -32029,7 +31993,6 @@ var ts;
|
|
|
32029
31993
|
name: "removeComments",
|
|
32030
31994
|
type: "boolean",
|
|
32031
31995
|
affectsEmit: true,
|
|
32032
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32033
31996
|
showInSimplifiedHelpView: true,
|
|
32034
31997
|
category: ts.Diagnostics.Emit,
|
|
32035
31998
|
defaultValueDescription: false,
|
|
@@ -32048,7 +32011,6 @@ var ts;
|
|
|
32048
32011
|
name: "importHelpers",
|
|
32049
32012
|
type: "boolean",
|
|
32050
32013
|
affectsEmit: true,
|
|
32051
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32052
32014
|
category: ts.Diagnostics.Emit,
|
|
32053
32015
|
description: ts.Diagnostics.Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file,
|
|
32054
32016
|
defaultValueDescription: false,
|
|
@@ -32062,7 +32024,6 @@ var ts;
|
|
|
32062
32024
|
})),
|
|
32063
32025
|
affectsEmit: true,
|
|
32064
32026
|
affectsSemanticDiagnostics: true,
|
|
32065
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32066
32027
|
category: ts.Diagnostics.Emit,
|
|
32067
32028
|
description: ts.Diagnostics.Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types,
|
|
32068
32029
|
defaultValueDescription: 0,
|
|
@@ -32071,7 +32032,6 @@ var ts;
|
|
|
32071
32032
|
name: "downlevelIteration",
|
|
32072
32033
|
type: "boolean",
|
|
32073
32034
|
affectsEmit: true,
|
|
32074
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32075
32035
|
category: ts.Diagnostics.Emit,
|
|
32076
32036
|
description: ts.Diagnostics.Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration,
|
|
32077
32037
|
defaultValueDescription: false,
|
|
@@ -32087,7 +32047,6 @@ var ts;
|
|
|
32087
32047
|
{
|
|
32088
32048
|
name: "strict",
|
|
32089
32049
|
type: "boolean",
|
|
32090
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32091
32050
|
showInSimplifiedHelpView: true,
|
|
32092
32051
|
category: ts.Diagnostics.Type_Checking,
|
|
32093
32052
|
description: ts.Diagnostics.Enable_all_strict_type_checking_options,
|
|
@@ -32097,7 +32056,6 @@ var ts;
|
|
|
32097
32056
|
name: "noImplicitAny",
|
|
32098
32057
|
type: "boolean",
|
|
32099
32058
|
affectsSemanticDiagnostics: true,
|
|
32100
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32101
32059
|
strictFlag: true,
|
|
32102
32060
|
category: ts.Diagnostics.Type_Checking,
|
|
32103
32061
|
description: ts.Diagnostics.Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type,
|
|
@@ -32107,7 +32065,6 @@ var ts;
|
|
|
32107
32065
|
name: "strictNullChecks",
|
|
32108
32066
|
type: "boolean",
|
|
32109
32067
|
affectsSemanticDiagnostics: true,
|
|
32110
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32111
32068
|
strictFlag: true,
|
|
32112
32069
|
category: ts.Diagnostics.Type_Checking,
|
|
32113
32070
|
description: ts.Diagnostics.When_type_checking_take_into_account_null_and_undefined,
|
|
@@ -32116,8 +32073,6 @@ var ts;
|
|
|
32116
32073
|
{
|
|
32117
32074
|
name: "strictFunctionTypes",
|
|
32118
32075
|
type: "boolean",
|
|
32119
|
-
affectsSemanticDiagnostics: true,
|
|
32120
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32121
32076
|
strictFlag: true,
|
|
32122
32077
|
category: ts.Diagnostics.Type_Checking,
|
|
32123
32078
|
description: ts.Diagnostics.When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible,
|
|
@@ -32126,8 +32081,6 @@ var ts;
|
|
|
32126
32081
|
{
|
|
32127
32082
|
name: "strictBindCallApply",
|
|
32128
32083
|
type: "boolean",
|
|
32129
|
-
affectsSemanticDiagnostics: true,
|
|
32130
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32131
32084
|
strictFlag: true,
|
|
32132
32085
|
category: ts.Diagnostics.Type_Checking,
|
|
32133
32086
|
description: ts.Diagnostics.Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function,
|
|
@@ -32137,7 +32090,6 @@ var ts;
|
|
|
32137
32090
|
name: "strictPropertyInitialization",
|
|
32138
32091
|
type: "boolean",
|
|
32139
32092
|
affectsSemanticDiagnostics: true,
|
|
32140
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32141
32093
|
strictFlag: true,
|
|
32142
32094
|
category: ts.Diagnostics.Type_Checking,
|
|
32143
32095
|
description: ts.Diagnostics.Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor,
|
|
@@ -32147,7 +32099,6 @@ var ts;
|
|
|
32147
32099
|
name: "noImplicitThis",
|
|
32148
32100
|
type: "boolean",
|
|
32149
32101
|
affectsSemanticDiagnostics: true,
|
|
32150
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32151
32102
|
strictFlag: true,
|
|
32152
32103
|
category: ts.Diagnostics.Type_Checking,
|
|
32153
32104
|
description: ts.Diagnostics.Enable_error_reporting_when_this_is_given_the_type_any,
|
|
@@ -32157,7 +32108,6 @@ var ts;
|
|
|
32157
32108
|
name: "useUnknownInCatchVariables",
|
|
32158
32109
|
type: "boolean",
|
|
32159
32110
|
affectsSemanticDiagnostics: true,
|
|
32160
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32161
32111
|
strictFlag: true,
|
|
32162
32112
|
category: ts.Diagnostics.Type_Checking,
|
|
32163
32113
|
description: ts.Diagnostics.Default_catch_clause_variables_as_unknown_instead_of_any,
|
|
@@ -32167,8 +32117,6 @@ var ts;
|
|
|
32167
32117
|
name: "alwaysStrict",
|
|
32168
32118
|
type: "boolean",
|
|
32169
32119
|
affectsSourceFile: true,
|
|
32170
|
-
affectsEmit: true,
|
|
32171
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32172
32120
|
strictFlag: true,
|
|
32173
32121
|
category: ts.Diagnostics.Type_Checking,
|
|
32174
32122
|
description: ts.Diagnostics.Ensure_use_strict_is_always_emitted,
|
|
@@ -32178,7 +32126,6 @@ var ts;
|
|
|
32178
32126
|
name: "noUnusedLocals",
|
|
32179
32127
|
type: "boolean",
|
|
32180
32128
|
affectsSemanticDiagnostics: true,
|
|
32181
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32182
32129
|
category: ts.Diagnostics.Type_Checking,
|
|
32183
32130
|
description: ts.Diagnostics.Enable_error_reporting_when_local_variables_aren_t_read,
|
|
32184
32131
|
defaultValueDescription: false,
|
|
@@ -32187,7 +32134,6 @@ var ts;
|
|
|
32187
32134
|
name: "noUnusedParameters",
|
|
32188
32135
|
type: "boolean",
|
|
32189
32136
|
affectsSemanticDiagnostics: true,
|
|
32190
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32191
32137
|
category: ts.Diagnostics.Type_Checking,
|
|
32192
32138
|
description: ts.Diagnostics.Raise_an_error_when_a_function_parameter_isn_t_read,
|
|
32193
32139
|
defaultValueDescription: false,
|
|
@@ -32196,7 +32142,6 @@ var ts;
|
|
|
32196
32142
|
name: "exactOptionalPropertyTypes",
|
|
32197
32143
|
type: "boolean",
|
|
32198
32144
|
affectsSemanticDiagnostics: true,
|
|
32199
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32200
32145
|
category: ts.Diagnostics.Type_Checking,
|
|
32201
32146
|
description: ts.Diagnostics.Interpret_optional_property_types_as_written_rather_than_adding_undefined,
|
|
32202
32147
|
defaultValueDescription: false,
|
|
@@ -32205,7 +32150,6 @@ var ts;
|
|
|
32205
32150
|
name: "noImplicitReturns",
|
|
32206
32151
|
type: "boolean",
|
|
32207
32152
|
affectsSemanticDiagnostics: true,
|
|
32208
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32209
32153
|
category: ts.Diagnostics.Type_Checking,
|
|
32210
32154
|
description: ts.Diagnostics.Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function,
|
|
32211
32155
|
defaultValueDescription: false,
|
|
@@ -32215,7 +32159,6 @@ var ts;
|
|
|
32215
32159
|
type: "boolean",
|
|
32216
32160
|
affectsBindDiagnostics: true,
|
|
32217
32161
|
affectsSemanticDiagnostics: true,
|
|
32218
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32219
32162
|
category: ts.Diagnostics.Type_Checking,
|
|
32220
32163
|
description: ts.Diagnostics.Enable_error_reporting_for_fallthrough_cases_in_switch_statements,
|
|
32221
32164
|
defaultValueDescription: false,
|
|
@@ -32224,7 +32167,6 @@ var ts;
|
|
|
32224
32167
|
name: "noUncheckedIndexedAccess",
|
|
32225
32168
|
type: "boolean",
|
|
32226
32169
|
affectsSemanticDiagnostics: true,
|
|
32227
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32228
32170
|
category: ts.Diagnostics.Type_Checking,
|
|
32229
32171
|
description: ts.Diagnostics.Add_undefined_to_a_type_when_accessed_using_an_index,
|
|
32230
32172
|
defaultValueDescription: false,
|
|
@@ -32233,7 +32175,6 @@ var ts;
|
|
|
32233
32175
|
name: "noImplicitOverride",
|
|
32234
32176
|
type: "boolean",
|
|
32235
32177
|
affectsSemanticDiagnostics: true,
|
|
32236
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32237
32178
|
category: ts.Diagnostics.Type_Checking,
|
|
32238
32179
|
description: ts.Diagnostics.Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier,
|
|
32239
32180
|
defaultValueDescription: false,
|
|
@@ -32241,8 +32182,6 @@ var ts;
|
|
|
32241
32182
|
{
|
|
32242
32183
|
name: "noPropertyAccessFromIndexSignature",
|
|
32243
32184
|
type: "boolean",
|
|
32244
|
-
affectsSemanticDiagnostics: true,
|
|
32245
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32246
32185
|
showInSimplifiedHelpView: false,
|
|
32247
32186
|
category: ts.Diagnostics.Type_Checking,
|
|
32248
32187
|
description: ts.Diagnostics.Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type,
|
|
@@ -32323,7 +32262,6 @@ var ts;
|
|
|
32323
32262
|
name: "allowSyntheticDefaultImports",
|
|
32324
32263
|
type: "boolean",
|
|
32325
32264
|
affectsSemanticDiagnostics: true,
|
|
32326
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32327
32265
|
category: ts.Diagnostics.Interop_Constraints,
|
|
32328
32266
|
description: ts.Diagnostics.Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export,
|
|
32329
32267
|
defaultValueDescription: ts.Diagnostics.module_system_or_esModuleInterop
|
|
@@ -32333,7 +32271,6 @@ var ts;
|
|
|
32333
32271
|
type: "boolean",
|
|
32334
32272
|
affectsSemanticDiagnostics: true,
|
|
32335
32273
|
affectsEmit: true,
|
|
32336
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32337
32274
|
showInSimplifiedHelpView: true,
|
|
32338
32275
|
category: ts.Diagnostics.Interop_Constraints,
|
|
32339
32276
|
description: ts.Diagnostics.Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility,
|
|
@@ -32350,7 +32287,6 @@ var ts;
|
|
|
32350
32287
|
name: "allowUmdGlobalAccess",
|
|
32351
32288
|
type: "boolean",
|
|
32352
32289
|
affectsSemanticDiagnostics: true,
|
|
32353
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32354
32290
|
category: ts.Diagnostics.Modules,
|
|
32355
32291
|
description: ts.Diagnostics.Allow_accessing_UMD_globals_from_modules,
|
|
32356
32292
|
defaultValueDescription: false,
|
|
@@ -32371,7 +32307,6 @@ var ts;
|
|
|
32371
32307
|
name: "sourceRoot",
|
|
32372
32308
|
type: "string",
|
|
32373
32309
|
affectsEmit: true,
|
|
32374
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32375
32310
|
paramType: ts.Diagnostics.LOCATION,
|
|
32376
32311
|
category: ts.Diagnostics.Emit,
|
|
32377
32312
|
description: ts.Diagnostics.Specify_the_root_path_for_debuggers_to_find_the_reference_source_code,
|
|
@@ -32380,7 +32315,6 @@ var ts;
|
|
|
32380
32315
|
name: "mapRoot",
|
|
32381
32316
|
type: "string",
|
|
32382
32317
|
affectsEmit: true,
|
|
32383
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32384
32318
|
paramType: ts.Diagnostics.LOCATION,
|
|
32385
32319
|
category: ts.Diagnostics.Emit,
|
|
32386
32320
|
description: ts.Diagnostics.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations,
|
|
@@ -32389,7 +32323,6 @@ var ts;
|
|
|
32389
32323
|
name: "inlineSourceMap",
|
|
32390
32324
|
type: "boolean",
|
|
32391
32325
|
affectsEmit: true,
|
|
32392
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32393
32326
|
category: ts.Diagnostics.Emit,
|
|
32394
32327
|
description: ts.Diagnostics.Include_sourcemap_files_inside_the_emitted_JavaScript,
|
|
32395
32328
|
defaultValueDescription: false,
|
|
@@ -32398,7 +32331,6 @@ var ts;
|
|
|
32398
32331
|
name: "inlineSources",
|
|
32399
32332
|
type: "boolean",
|
|
32400
32333
|
affectsEmit: true,
|
|
32401
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32402
32334
|
category: ts.Diagnostics.Emit,
|
|
32403
32335
|
description: ts.Diagnostics.Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript,
|
|
32404
32336
|
defaultValueDescription: false,
|
|
@@ -32407,7 +32339,6 @@ var ts;
|
|
|
32407
32339
|
name: "experimentalDecorators",
|
|
32408
32340
|
type: "boolean",
|
|
32409
32341
|
affectsSemanticDiagnostics: true,
|
|
32410
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32411
32342
|
category: ts.Diagnostics.Language_and_Environment,
|
|
32412
32343
|
description: ts.Diagnostics.Enable_experimental_support_for_TC39_stage_2_draft_decorators,
|
|
32413
32344
|
defaultValueDescription: false,
|
|
@@ -32417,7 +32348,6 @@ var ts;
|
|
|
32417
32348
|
type: "boolean",
|
|
32418
32349
|
affectsSemanticDiagnostics: true,
|
|
32419
32350
|
affectsEmit: true,
|
|
32420
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32421
32351
|
category: ts.Diagnostics.Language_and_Environment,
|
|
32422
32352
|
description: ts.Diagnostics.Emit_design_type_metadata_for_decorated_declarations_in_source_files,
|
|
32423
32353
|
defaultValueDescription: false,
|
|
@@ -32441,7 +32371,6 @@ var ts;
|
|
|
32441
32371
|
type: "string",
|
|
32442
32372
|
affectsSemanticDiagnostics: true,
|
|
32443
32373
|
affectsEmit: true,
|
|
32444
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32445
32374
|
affectsModuleResolution: true,
|
|
32446
32375
|
category: ts.Diagnostics.Language_and_Environment,
|
|
32447
32376
|
description: ts.Diagnostics.Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk,
|
|
@@ -32459,9 +32388,6 @@ var ts;
|
|
|
32459
32388
|
name: "out",
|
|
32460
32389
|
type: "string",
|
|
32461
32390
|
affectsEmit: true,
|
|
32462
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32463
|
-
affectsDeclarationPath: true,
|
|
32464
|
-
affectsBundleEmitBuildInfo: true,
|
|
32465
32391
|
isFilePath: false,
|
|
32466
32392
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
32467
32393
|
paramType: ts.Diagnostics.FILE,
|
|
@@ -32472,7 +32398,6 @@ var ts;
|
|
|
32472
32398
|
name: "reactNamespace",
|
|
32473
32399
|
type: "string",
|
|
32474
32400
|
affectsEmit: true,
|
|
32475
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32476
32401
|
category: ts.Diagnostics.Language_and_Environment,
|
|
32477
32402
|
description: ts.Diagnostics.Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit,
|
|
32478
32403
|
defaultValueDescription: "`React`",
|
|
@@ -32480,7 +32405,6 @@ var ts;
|
|
|
32480
32405
|
{
|
|
32481
32406
|
name: "skipDefaultLibCheck",
|
|
32482
32407
|
type: "boolean",
|
|
32483
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32484
32408
|
category: ts.Diagnostics.Completeness,
|
|
32485
32409
|
description: ts.Diagnostics.Skip_type_checking_d_ts_files_that_are_included_with_TypeScript,
|
|
32486
32410
|
defaultValueDescription: false,
|
|
@@ -32496,7 +32420,6 @@ var ts;
|
|
|
32496
32420
|
name: "emitBOM",
|
|
32497
32421
|
type: "boolean",
|
|
32498
32422
|
affectsEmit: true,
|
|
32499
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32500
32423
|
category: ts.Diagnostics.Emit,
|
|
32501
32424
|
description: ts.Diagnostics.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files,
|
|
32502
32425
|
defaultValueDescription: false,
|
|
@@ -32508,7 +32431,6 @@ var ts;
|
|
|
32508
32431
|
lf: 1
|
|
32509
32432
|
})),
|
|
32510
32433
|
affectsEmit: true,
|
|
32511
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32512
32434
|
paramType: ts.Diagnostics.NEWLINE,
|
|
32513
32435
|
category: ts.Diagnostics.Emit,
|
|
32514
32436
|
description: ts.Diagnostics.Set_the_newline_character_for_emitting_files,
|
|
@@ -32518,7 +32440,6 @@ var ts;
|
|
|
32518
32440
|
name: "noErrorTruncation",
|
|
32519
32441
|
type: "boolean",
|
|
32520
32442
|
affectsSemanticDiagnostics: true,
|
|
32521
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32522
32443
|
category: ts.Diagnostics.Output_Formatting,
|
|
32523
32444
|
description: ts.Diagnostics.Disable_truncating_types_in_error_messages,
|
|
32524
32445
|
defaultValueDescription: false,
|
|
@@ -32545,7 +32466,6 @@ var ts;
|
|
|
32545
32466
|
name: "stripInternal",
|
|
32546
32467
|
type: "boolean",
|
|
32547
32468
|
affectsEmit: true,
|
|
32548
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32549
32469
|
category: ts.Diagnostics.Emit,
|
|
32550
32470
|
description: ts.Diagnostics.Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments,
|
|
32551
32471
|
defaultValueDescription: false,
|
|
@@ -32586,7 +32506,6 @@ var ts;
|
|
|
32586
32506
|
name: "noImplicitUseStrict",
|
|
32587
32507
|
type: "boolean",
|
|
32588
32508
|
affectsSemanticDiagnostics: true,
|
|
32589
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32590
32509
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
32591
32510
|
description: ts.Diagnostics.Disable_adding_use_strict_directives_in_emitted_JavaScript_files,
|
|
32592
32511
|
defaultValueDescription: false,
|
|
@@ -32595,7 +32514,6 @@ var ts;
|
|
|
32595
32514
|
name: "noEmitHelpers",
|
|
32596
32515
|
type: "boolean",
|
|
32597
32516
|
affectsEmit: true,
|
|
32598
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32599
32517
|
category: ts.Diagnostics.Emit,
|
|
32600
32518
|
description: ts.Diagnostics.Disable_generating_custom_helper_functions_like_extends_in_compiled_output,
|
|
32601
32519
|
defaultValueDescription: false,
|
|
@@ -32604,7 +32522,6 @@ var ts;
|
|
|
32604
32522
|
name: "noEmitOnError",
|
|
32605
32523
|
type: "boolean",
|
|
32606
32524
|
affectsEmit: true,
|
|
32607
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32608
32525
|
category: ts.Diagnostics.Emit,
|
|
32609
32526
|
transpileOptionValue: undefined,
|
|
32610
32527
|
description: ts.Diagnostics.Disable_emitting_files_if_any_type_checking_errors_are_reported,
|
|
@@ -32614,7 +32531,6 @@ var ts;
|
|
|
32614
32531
|
name: "preserveConstEnums",
|
|
32615
32532
|
type: "boolean",
|
|
32616
32533
|
affectsEmit: true,
|
|
32617
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32618
32534
|
category: ts.Diagnostics.Emit,
|
|
32619
32535
|
description: ts.Diagnostics.Disable_erasing_const_enum_declarations_in_generated_code,
|
|
32620
32536
|
defaultValueDescription: false,
|
|
@@ -32623,8 +32539,6 @@ var ts;
|
|
|
32623
32539
|
name: "declarationDir",
|
|
32624
32540
|
type: "string",
|
|
32625
32541
|
affectsEmit: true,
|
|
32626
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32627
|
-
affectsDeclarationPath: true,
|
|
32628
32542
|
isFilePath: true,
|
|
32629
32543
|
paramType: ts.Diagnostics.DIRECTORY,
|
|
32630
32544
|
category: ts.Diagnostics.Emit,
|
|
@@ -32634,7 +32548,6 @@ var ts;
|
|
|
32634
32548
|
{
|
|
32635
32549
|
name: "skipLibCheck",
|
|
32636
32550
|
type: "boolean",
|
|
32637
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32638
32551
|
category: ts.Diagnostics.Completeness,
|
|
32639
32552
|
description: ts.Diagnostics.Skip_type_checking_all_d_ts_files,
|
|
32640
32553
|
defaultValueDescription: false,
|
|
@@ -32644,7 +32557,6 @@ var ts;
|
|
|
32644
32557
|
type: "boolean",
|
|
32645
32558
|
affectsBindDiagnostics: true,
|
|
32646
32559
|
affectsSemanticDiagnostics: true,
|
|
32647
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32648
32560
|
category: ts.Diagnostics.Type_Checking,
|
|
32649
32561
|
description: ts.Diagnostics.Disable_error_reporting_for_unused_labels,
|
|
32650
32562
|
defaultValueDescription: undefined,
|
|
@@ -32654,7 +32566,6 @@ var ts;
|
|
|
32654
32566
|
type: "boolean",
|
|
32655
32567
|
affectsBindDiagnostics: true,
|
|
32656
32568
|
affectsSemanticDiagnostics: true,
|
|
32657
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32658
32569
|
category: ts.Diagnostics.Type_Checking,
|
|
32659
32570
|
description: ts.Diagnostics.Disable_error_reporting_for_unreachable_code,
|
|
32660
32571
|
defaultValueDescription: undefined,
|
|
@@ -32663,7 +32574,6 @@ var ts;
|
|
|
32663
32574
|
name: "suppressExcessPropertyErrors",
|
|
32664
32575
|
type: "boolean",
|
|
32665
32576
|
affectsSemanticDiagnostics: true,
|
|
32666
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32667
32577
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
32668
32578
|
description: ts.Diagnostics.Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals,
|
|
32669
32579
|
defaultValueDescription: false,
|
|
@@ -32672,7 +32582,6 @@ var ts;
|
|
|
32672
32582
|
name: "suppressImplicitAnyIndexErrors",
|
|
32673
32583
|
type: "boolean",
|
|
32674
32584
|
affectsSemanticDiagnostics: true,
|
|
32675
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32676
32585
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
32677
32586
|
description: ts.Diagnostics.Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures,
|
|
32678
32587
|
defaultValueDescription: false,
|
|
@@ -32697,7 +32606,6 @@ var ts;
|
|
|
32697
32606
|
name: "noStrictGenericChecks",
|
|
32698
32607
|
type: "boolean",
|
|
32699
32608
|
affectsSemanticDiagnostics: true,
|
|
32700
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32701
32609
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
32702
32610
|
description: ts.Diagnostics.Disable_strict_checking_of_generic_signatures_in_function_types,
|
|
32703
32611
|
defaultValueDescription: false,
|
|
@@ -32707,7 +32615,6 @@ var ts;
|
|
|
32707
32615
|
type: "boolean",
|
|
32708
32616
|
affectsSemanticDiagnostics: true,
|
|
32709
32617
|
affectsEmit: true,
|
|
32710
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32711
32618
|
category: ts.Diagnostics.Language_and_Environment,
|
|
32712
32619
|
description: ts.Diagnostics.Emit_ECMAScript_standard_compliant_class_fields,
|
|
32713
32620
|
defaultValueDescription: ts.Diagnostics.true_for_ES2022_and_above_including_ESNext
|
|
@@ -32716,7 +32623,6 @@ var ts;
|
|
|
32716
32623
|
name: "preserveValueImports",
|
|
32717
32624
|
type: "boolean",
|
|
32718
32625
|
affectsEmit: true,
|
|
32719
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32720
32626
|
category: ts.Diagnostics.Emit,
|
|
32721
32627
|
description: ts.Diagnostics.Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed,
|
|
32722
32628
|
defaultValueDescription: false,
|
|
@@ -32755,7 +32661,6 @@ var ts;
|
|
|
32755
32661
|
ts.optionDeclarations = __spreadArray(__spreadArray([], ts.commonOptionsWithBuild, true), commandOptionsWithoutBuild, true);
|
|
32756
32662
|
ts.semanticDiagnosticsOptionDeclarations = ts.optionDeclarations.filter(function (option) { return !!option.affectsSemanticDiagnostics; });
|
|
32757
32663
|
ts.affectsEmitOptionDeclarations = ts.optionDeclarations.filter(function (option) { return !!option.affectsEmit; });
|
|
32758
|
-
ts.affectsDeclarationPathOptionDeclarations = ts.optionDeclarations.filter(function (option) { return !!option.affectsDeclarationPath; });
|
|
32759
32664
|
ts.moduleResolutionOptionDeclarations = ts.optionDeclarations.filter(function (option) { return !!option.affectsModuleResolution; });
|
|
32760
32665
|
ts.sourceFileAffectingCompilerOptions = ts.optionDeclarations.filter(function (option) {
|
|
32761
32666
|
return !!option.affectsSourceFile || !!option.affectsModuleResolution || !!option.affectsBindDiagnostics;
|
|
@@ -33542,7 +33447,6 @@ var ts;
|
|
|
33542
33447
|
}
|
|
33543
33448
|
});
|
|
33544
33449
|
}
|
|
33545
|
-
ts.getNameOfCompilerOptionValue = getNameOfCompilerOptionValue;
|
|
33546
33450
|
function serializeCompilerOptions(options, pathOptions) {
|
|
33547
33451
|
return serializeOptionBaseObject(options, getOptionsNameMap(), pathOptions);
|
|
33548
33452
|
}
|
|
@@ -90643,8 +90547,7 @@ var ts;
|
|
|
90643
90547
|
return;
|
|
90644
90548
|
}
|
|
90645
90549
|
var version = ts.version;
|
|
90646
|
-
|
|
90647
|
-
ts.writeFile(host, emitterDiagnostics, buildInfoPath, getBuildInfoText(buildInfo), false, undefined, { buildInfo: buildInfo });
|
|
90550
|
+
ts.writeFile(host, emitterDiagnostics, buildInfoPath, getBuildInfoText({ bundle: bundle, program: program, version: version }), false);
|
|
90648
90551
|
}
|
|
90649
90552
|
function emitJsFileOrBundle(sourceFileOrBundle, jsFilePath, sourceMapFilePath, relativeToBuildInfo) {
|
|
90650
90553
|
if (!sourceFileOrBundle || emitOnlyDtsFiles || !jsFilePath) {
|
|
@@ -90785,17 +90688,12 @@ var ts;
|
|
|
90785
90688
|
if (sourceMapFilePath) {
|
|
90786
90689
|
var sourceMap = sourceMapGenerator.toString();
|
|
90787
90690
|
ts.writeFile(host, emitterDiagnostics, sourceMapFilePath, sourceMap, false, sourceFiles);
|
|
90788
|
-
if (printer.bundleFileInfo)
|
|
90789
|
-
printer.bundleFileInfo.mapHash = ts.BuilderState.computeSignature(sourceMap, ts.maybeBind(host, host.createHash));
|
|
90790
90691
|
}
|
|
90791
90692
|
}
|
|
90792
90693
|
else {
|
|
90793
90694
|
writer.writeLine();
|
|
90794
90695
|
}
|
|
90795
|
-
|
|
90796
|
-
ts.writeFile(host, emitterDiagnostics, jsFilePath, text, !!compilerOptions.emitBOM, sourceFiles, { sourceMapUrlPos: sourceMapUrlPos });
|
|
90797
|
-
if (printer.bundleFileInfo)
|
|
90798
|
-
printer.bundleFileInfo.hash = ts.BuilderState.computeSignature(text, ts.maybeBind(host, host.createHash));
|
|
90696
|
+
ts.writeFile(host, emitterDiagnostics, jsFilePath, writer.getText(), !!compilerOptions.emitBOM, sourceFiles, { sourceMapUrlPos: sourceMapUrlPos });
|
|
90799
90697
|
writer.clear();
|
|
90800
90698
|
}
|
|
90801
90699
|
function shouldEmitSourceMaps(mapOptions, sourceFileOrBundle) {
|
|
@@ -90920,50 +90818,30 @@ var ts;
|
|
|
90920
90818
|
});
|
|
90921
90819
|
}
|
|
90922
90820
|
function emitUsingBuildInfo(config, host, getCommandLine, customTransformers) {
|
|
90923
|
-
var createHash = ts.maybeBind(host, host.createHash);
|
|
90924
90821
|
var _a = getOutputPathsForBundle(config.options, false), buildInfoPath = _a.buildInfoPath, jsFilePath = _a.jsFilePath, sourceMapFilePath = _a.sourceMapFilePath, declarationFilePath = _a.declarationFilePath, declarationMapPath = _a.declarationMapPath;
|
|
90925
|
-
var
|
|
90926
|
-
if (
|
|
90927
|
-
var hostBuildInfo = host.getBuildInfo(buildInfoPath, config.options.configFilePath);
|
|
90928
|
-
if (!hostBuildInfo)
|
|
90929
|
-
return buildInfoPath;
|
|
90930
|
-
buildInfo = hostBuildInfo;
|
|
90931
|
-
}
|
|
90932
|
-
else {
|
|
90933
|
-
var buildInfoText = host.readFile(buildInfoPath);
|
|
90934
|
-
if (!buildInfoText)
|
|
90935
|
-
return buildInfoPath;
|
|
90936
|
-
buildInfo = getBuildInfo(buildInfoText);
|
|
90937
|
-
}
|
|
90938
|
-
if (!buildInfo.bundle || !buildInfo.bundle.js || (declarationFilePath && !buildInfo.bundle.dts))
|
|
90822
|
+
var buildInfoText = host.readFile(ts.Debug.checkDefined(buildInfoPath));
|
|
90823
|
+
if (!buildInfoText)
|
|
90939
90824
|
return buildInfoPath;
|
|
90940
90825
|
var jsFileText = host.readFile(ts.Debug.checkDefined(jsFilePath));
|
|
90941
90826
|
if (!jsFileText)
|
|
90942
90827
|
return jsFilePath;
|
|
90943
|
-
if (ts.BuilderState.computeSignature(jsFileText, createHash) !== buildInfo.bundle.js.hash)
|
|
90944
|
-
return jsFilePath;
|
|
90945
90828
|
var sourceMapText = sourceMapFilePath && host.readFile(sourceMapFilePath);
|
|
90946
90829
|
if ((sourceMapFilePath && !sourceMapText) || config.options.inlineSourceMap)
|
|
90947
90830
|
return sourceMapFilePath || "inline sourcemap decoding";
|
|
90948
|
-
if (sourceMapFilePath && ts.BuilderState.computeSignature(sourceMapText, createHash) !== buildInfo.bundle.js.mapHash)
|
|
90949
|
-
return sourceMapFilePath;
|
|
90950
90831
|
var declarationText = declarationFilePath && host.readFile(declarationFilePath);
|
|
90951
90832
|
if (declarationFilePath && !declarationText)
|
|
90952
90833
|
return declarationFilePath;
|
|
90953
|
-
if (declarationFilePath && ts.BuilderState.computeSignature(declarationText, createHash) !== buildInfo.bundle.dts.hash)
|
|
90954
|
-
return declarationFilePath;
|
|
90955
90834
|
var declarationMapText = declarationMapPath && host.readFile(declarationMapPath);
|
|
90956
90835
|
if ((declarationMapPath && !declarationMapText) || config.options.inlineSourceMap)
|
|
90957
90836
|
return declarationMapPath || "inline sourcemap decoding";
|
|
90958
|
-
|
|
90959
|
-
|
|
90837
|
+
var buildInfo = getBuildInfo(buildInfoText);
|
|
90838
|
+
if (!buildInfo.bundle || !buildInfo.bundle.js || (declarationText && !buildInfo.bundle.dts))
|
|
90839
|
+
return buildInfoPath;
|
|
90960
90840
|
var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));
|
|
90961
90841
|
var ownPrependInput = ts.createInputFiles(jsFileText, declarationText, sourceMapFilePath, sourceMapText, declarationMapPath, declarationMapText, jsFilePath, declarationFilePath, buildInfoPath, buildInfo, true);
|
|
90962
90842
|
var outputFiles = [];
|
|
90963
90843
|
var prependNodes = ts.createPrependNodes(config.projectReferences, getCommandLine, function (f) { return host.readFile(f); });
|
|
90964
90844
|
var sourceFilesForJsEmit = createSourceFilesFromBundleBuildInfo(buildInfo.bundle, buildInfoDirectory, host);
|
|
90965
|
-
var changedDtsText;
|
|
90966
|
-
var changedDtsData;
|
|
90967
90845
|
var emitHost = {
|
|
90968
90846
|
getPrependNodes: ts.memoize(function () { return __spreadArray(__spreadArray([], prependNodes, true), [ownPrependInput], false); }),
|
|
90969
90847
|
getCanonicalFileName: host.getCanonicalFileName,
|
|
@@ -90979,7 +90857,7 @@ var ts;
|
|
|
90979
90857
|
getResolvedProjectReferenceToRedirect: ts.returnUndefined,
|
|
90980
90858
|
getProjectReferenceRedirect: ts.returnUndefined,
|
|
90981
90859
|
isSourceOfProjectReferenceRedirect: ts.returnFalse,
|
|
90982
|
-
writeFile: function (name, text, writeByteOrderMark
|
|
90860
|
+
writeFile: function (name, text, writeByteOrderMark) {
|
|
90983
90861
|
switch (name) {
|
|
90984
90862
|
case jsFilePath:
|
|
90985
90863
|
if (jsFileText === text)
|
|
@@ -90990,25 +90868,19 @@ var ts;
|
|
|
90990
90868
|
return;
|
|
90991
90869
|
break;
|
|
90992
90870
|
case buildInfoPath:
|
|
90993
|
-
var newBuildInfo =
|
|
90871
|
+
var newBuildInfo = getBuildInfo(text);
|
|
90994
90872
|
newBuildInfo.program = buildInfo.program;
|
|
90995
|
-
if (newBuildInfo.program && changedDtsText !== undefined && config.options.composite) {
|
|
90996
|
-
newBuildInfo.program.outSignature = ts.computeSignature(changedDtsText, changedDtsData, createHash);
|
|
90997
|
-
newBuildInfo.program.dtsChangeTime = ts.getCurrentTime(host).getTime();
|
|
90998
|
-
}
|
|
90999
90873
|
var _a = buildInfo.bundle, js = _a.js, dts = _a.dts, sourceFiles = _a.sourceFiles;
|
|
91000
90874
|
newBuildInfo.bundle.js.sources = js.sources;
|
|
91001
90875
|
if (dts) {
|
|
91002
90876
|
newBuildInfo.bundle.dts.sources = dts.sources;
|
|
91003
90877
|
}
|
|
91004
90878
|
newBuildInfo.bundle.sourceFiles = sourceFiles;
|
|
91005
|
-
outputFiles.push({ name: name, text: getBuildInfoText(newBuildInfo), writeByteOrderMark: writeByteOrderMark
|
|
90879
|
+
outputFiles.push({ name: name, text: getBuildInfoText(newBuildInfo), writeByteOrderMark: writeByteOrderMark });
|
|
91006
90880
|
return;
|
|
91007
90881
|
case declarationFilePath:
|
|
91008
90882
|
if (declarationText === text)
|
|
91009
90883
|
return;
|
|
91010
|
-
changedDtsText = text;
|
|
91011
|
-
changedDtsData = data;
|
|
91012
90884
|
break;
|
|
91013
90885
|
case declarationMapPath:
|
|
91014
90886
|
if (declarationMapText === text)
|
|
@@ -91027,7 +90899,6 @@ var ts;
|
|
|
91027
90899
|
getSourceFileFromReference: ts.returnUndefined,
|
|
91028
90900
|
redirectTargetsMap: ts.createMultiMap(),
|
|
91029
90901
|
getFileIncludeReasons: ts.notImplemented,
|
|
91030
|
-
createHash: createHash,
|
|
91031
90902
|
};
|
|
91032
90903
|
emitFiles(ts.notImplementedResolver, emitHost, undefined, ts.getTransformers(config.options, customTransformers));
|
|
91033
90904
|
return outputFiles;
|
|
@@ -95652,6 +95523,7 @@ var ts;
|
|
|
95652
95523
|
if (system === void 0) { system = ts.sys; }
|
|
95653
95524
|
var existingDirectories = new ts.Map();
|
|
95654
95525
|
var getCanonicalFileName = ts.createGetCanonicalFileName(system.useCaseSensitiveFileNames);
|
|
95526
|
+
var computeHash = ts.maybeBind(system, system.createHash) || ts.generateDjb2Hash;
|
|
95655
95527
|
function getSourceFile(fileName, languageVersionOrOptions, onError) {
|
|
95656
95528
|
var text;
|
|
95657
95529
|
try {
|
|
@@ -95681,7 +95553,7 @@ var ts;
|
|
|
95681
95553
|
function writeFile(fileName, data, writeByteOrderMark, onError) {
|
|
95682
95554
|
try {
|
|
95683
95555
|
ts.performance.mark("beforeIOWrite");
|
|
95684
|
-
ts.writeFileEnsuringDirectories(fileName, data, writeByteOrderMark, function (path, data, writeByteOrderMark) { return
|
|
95556
|
+
ts.writeFileEnsuringDirectories(fileName, data, writeByteOrderMark, function (path, data, writeByteOrderMark) { return writeFileWorker(path, data, writeByteOrderMark); }, function (path) { return (compilerHost.createDirectory || system.createDirectory)(path); }, function (path) { return directoryExists(path); });
|
|
95685
95557
|
ts.performance.mark("afterIOWrite");
|
|
95686
95558
|
ts.performance.measure("I/O Write", "beforeIOWrite", "afterIOWrite");
|
|
95687
95559
|
}
|
|
@@ -95691,6 +95563,34 @@ var ts;
|
|
|
95691
95563
|
}
|
|
95692
95564
|
}
|
|
95693
95565
|
}
|
|
95566
|
+
var outputFingerprints;
|
|
95567
|
+
function writeFileWorker(fileName, data, writeByteOrderMark) {
|
|
95568
|
+
if (!ts.isWatchSet(options) || !system.getModifiedTime) {
|
|
95569
|
+
system.writeFile(fileName, data, writeByteOrderMark);
|
|
95570
|
+
return;
|
|
95571
|
+
}
|
|
95572
|
+
if (!outputFingerprints) {
|
|
95573
|
+
outputFingerprints = new ts.Map();
|
|
95574
|
+
}
|
|
95575
|
+
var hash = computeHash(data);
|
|
95576
|
+
var mtimeBefore = system.getModifiedTime(fileName);
|
|
95577
|
+
if (mtimeBefore) {
|
|
95578
|
+
var fingerprint = outputFingerprints.get(fileName);
|
|
95579
|
+
if (fingerprint &&
|
|
95580
|
+
fingerprint.byteOrderMark === writeByteOrderMark &&
|
|
95581
|
+
fingerprint.hash === hash &&
|
|
95582
|
+
fingerprint.mtime.getTime() === mtimeBefore.getTime()) {
|
|
95583
|
+
return;
|
|
95584
|
+
}
|
|
95585
|
+
}
|
|
95586
|
+
system.writeFile(fileName, data, writeByteOrderMark);
|
|
95587
|
+
var mtimeAfter = system.getModifiedTime(fileName) || ts.missingFileModifiedTime;
|
|
95588
|
+
outputFingerprints.set(fileName, {
|
|
95589
|
+
hash: hash,
|
|
95590
|
+
byteOrderMark: writeByteOrderMark,
|
|
95591
|
+
mtime: mtimeAfter
|
|
95592
|
+
});
|
|
95593
|
+
}
|
|
95694
95594
|
function getDefaultLibLocation() {
|
|
95695
95595
|
return ts.getDirectoryPath(ts.normalizePath(system.getExecutingFilePath()));
|
|
95696
95596
|
}
|
|
@@ -97064,7 +96964,6 @@ var ts;
|
|
|
97064
96964
|
getSourceFileFromReference: function (file, ref) { return program.getSourceFileFromReference(file, ref); },
|
|
97065
96965
|
redirectTargetsMap: redirectTargetsMap,
|
|
97066
96966
|
getFileIncludeReasons: program.getFileIncludeReasons,
|
|
97067
|
-
createHash: ts.maybeBind(host, host.createHash),
|
|
97068
96967
|
};
|
|
97069
96968
|
}
|
|
97070
96969
|
function writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data) {
|
|
@@ -98971,9 +98870,13 @@ var ts;
|
|
|
98971
98870
|
function createManyToManyPathMap() {
|
|
98972
98871
|
function create(forward, reverse, deleted) {
|
|
98973
98872
|
var map = {
|
|
98873
|
+
clone: function () { return create(new ts.Map(forward), new ts.Map(reverse), deleted && new ts.Set(deleted)); },
|
|
98874
|
+
forEach: function (fn) { return forward.forEach(fn); },
|
|
98974
98875
|
getKeys: function (v) { return reverse.get(v); },
|
|
98975
98876
|
getValues: function (k) { return forward.get(k); },
|
|
98877
|
+
hasKey: function (k) { return forward.has(k); },
|
|
98976
98878
|
keys: function () { return forward.keys(); },
|
|
98879
|
+
deletedKeys: function () { return deleted; },
|
|
98977
98880
|
deleteKey: function (k) {
|
|
98978
98881
|
(deleted || (deleted = new ts.Set())).add(k);
|
|
98979
98882
|
var set = forward.get(k);
|
|
@@ -99000,6 +98903,11 @@ var ts;
|
|
|
99000
98903
|
});
|
|
99001
98904
|
return map;
|
|
99002
98905
|
},
|
|
98906
|
+
clear: function () {
|
|
98907
|
+
forward.clear();
|
|
98908
|
+
reverse.clear();
|
|
98909
|
+
deleted === null || deleted === void 0 ? void 0 : deleted.clear();
|
|
98910
|
+
}
|
|
99003
98911
|
};
|
|
99004
98912
|
return map;
|
|
99005
98913
|
}
|
|
@@ -99103,45 +99011,35 @@ var ts;
|
|
|
99103
99011
|
}
|
|
99104
99012
|
BuilderState.canReuseOldState = canReuseOldState;
|
|
99105
99013
|
function create(newProgram, getCanonicalFileName, oldState, disableUseFileVersionAsSignature) {
|
|
99106
|
-
var _a, _b, _c;
|
|
99107
99014
|
var fileInfos = new ts.Map();
|
|
99108
99015
|
var referencedMap = newProgram.getCompilerOptions().module !== ts.ModuleKind.None ? createManyToManyPathMap() : undefined;
|
|
99109
99016
|
var exportedModulesMap = referencedMap ? createManyToManyPathMap() : undefined;
|
|
99017
|
+
var hasCalledUpdateShapeSignature = new ts.Set();
|
|
99110
99018
|
var useOldState = canReuseOldState(referencedMap, oldState);
|
|
99111
99019
|
newProgram.getTypeChecker();
|
|
99112
|
-
for (var _i = 0,
|
|
99113
|
-
var sourceFile =
|
|
99020
|
+
for (var _i = 0, _a = newProgram.getSourceFiles(); _i < _a.length; _i++) {
|
|
99021
|
+
var sourceFile = _a[_i];
|
|
99114
99022
|
var version_2 = ts.Debug.checkDefined(sourceFile.version, "Program intended to be used with Builder should have source files with versions set");
|
|
99115
|
-
var
|
|
99116
|
-
var signature = oldUncommitedSignature === undefined ?
|
|
99117
|
-
useOldState ? (_b = oldState.fileInfos.get(sourceFile.resolvedPath)) === null || _b === void 0 ? void 0 : _b.signature : undefined :
|
|
99118
|
-
oldUncommitedSignature || undefined;
|
|
99023
|
+
var oldInfo = useOldState ? oldState.fileInfos.get(sourceFile.resolvedPath) : undefined;
|
|
99119
99024
|
if (referencedMap) {
|
|
99120
99025
|
var newReferences = getReferencedFiles(newProgram, sourceFile, getCanonicalFileName);
|
|
99121
99026
|
if (newReferences) {
|
|
99122
99027
|
referencedMap.set(sourceFile.resolvedPath, newReferences);
|
|
99123
99028
|
}
|
|
99124
99029
|
if (useOldState) {
|
|
99125
|
-
var
|
|
99126
|
-
var exportedModules = oldUncommitedExportedModules === undefined ?
|
|
99127
|
-
oldState.exportedModulesMap.getValues(sourceFile.resolvedPath) :
|
|
99128
|
-
oldUncommitedExportedModules || undefined;
|
|
99030
|
+
var exportedModules = oldState.exportedModulesMap.getValues(sourceFile.resolvedPath);
|
|
99129
99031
|
if (exportedModules) {
|
|
99130
99032
|
exportedModulesMap.set(sourceFile.resolvedPath, exportedModules);
|
|
99131
99033
|
}
|
|
99132
99034
|
}
|
|
99133
99035
|
}
|
|
99134
|
-
fileInfos.set(sourceFile.resolvedPath, {
|
|
99135
|
-
version: version_2,
|
|
99136
|
-
signature: signature,
|
|
99137
|
-
affectsGlobalScope: isFileAffectingGlobalScope(sourceFile) || undefined,
|
|
99138
|
-
impliedFormat: sourceFile.impliedNodeFormat
|
|
99139
|
-
});
|
|
99036
|
+
fileInfos.set(sourceFile.resolvedPath, { version: version_2, signature: oldInfo && oldInfo.signature, affectsGlobalScope: isFileAffectingGlobalScope(sourceFile) || undefined, impliedFormat: sourceFile.impliedNodeFormat });
|
|
99140
99037
|
}
|
|
99141
99038
|
return {
|
|
99142
99039
|
fileInfos: fileInfos,
|
|
99143
99040
|
referencedMap: referencedMap,
|
|
99144
99041
|
exportedModulesMap: exportedModulesMap,
|
|
99042
|
+
hasCalledUpdateShapeSignature: hasCalledUpdateShapeSignature,
|
|
99145
99043
|
useFileVersionAsSignature: !disableUseFileVersionAsSignature && !useOldState
|
|
99146
99044
|
};
|
|
99147
99045
|
}
|
|
@@ -99151,36 +99049,52 @@ var ts;
|
|
|
99151
99049
|
state.allFileNames = undefined;
|
|
99152
99050
|
}
|
|
99153
99051
|
BuilderState.releaseCache = releaseCache;
|
|
99154
|
-
function
|
|
99052
|
+
function clone(state) {
|
|
99155
99053
|
var _a, _b;
|
|
99156
|
-
|
|
99157
|
-
|
|
99158
|
-
|
|
99159
|
-
|
|
99054
|
+
return {
|
|
99055
|
+
fileInfos: new ts.Map(state.fileInfos),
|
|
99056
|
+
referencedMap: (_a = state.referencedMap) === null || _a === void 0 ? void 0 : _a.clone(),
|
|
99057
|
+
exportedModulesMap: (_b = state.exportedModulesMap) === null || _b === void 0 ? void 0 : _b.clone(),
|
|
99058
|
+
hasCalledUpdateShapeSignature: new ts.Set(state.hasCalledUpdateShapeSignature),
|
|
99059
|
+
useFileVersionAsSignature: state.useFileVersionAsSignature,
|
|
99060
|
+
};
|
|
99160
99061
|
}
|
|
99161
|
-
BuilderState.
|
|
99162
|
-
function
|
|
99062
|
+
BuilderState.clone = clone;
|
|
99063
|
+
function getFilesAffectedBy(state, programOfThisState, path, cancellationToken, computeHash, cacheToUpdateSignature, exportedModulesMapCache) {
|
|
99064
|
+
var signatureCache = cacheToUpdateSignature || new ts.Map();
|
|
99163
99065
|
var sourceFile = programOfThisState.getSourceFileByPath(path);
|
|
99164
99066
|
if (!sourceFile) {
|
|
99165
99067
|
return ts.emptyArray;
|
|
99166
99068
|
}
|
|
99167
|
-
if (!updateShapeSignature(state, programOfThisState, sourceFile, cancellationToken, computeHash)) {
|
|
99069
|
+
if (!updateShapeSignature(state, programOfThisState, sourceFile, signatureCache, cancellationToken, computeHash, exportedModulesMapCache)) {
|
|
99168
99070
|
return [sourceFile];
|
|
99169
99071
|
}
|
|
99170
|
-
|
|
99072
|
+
var result = (state.referencedMap ? getFilesAffectedByUpdatedShapeWhenModuleEmit : getFilesAffectedByUpdatedShapeWhenNonModuleEmit)(state, programOfThisState, sourceFile, signatureCache, cancellationToken, computeHash, exportedModulesMapCache);
|
|
99073
|
+
if (!cacheToUpdateSignature) {
|
|
99074
|
+
updateSignaturesFromCache(state, signatureCache);
|
|
99075
|
+
}
|
|
99076
|
+
return result;
|
|
99171
99077
|
}
|
|
99172
|
-
BuilderState.
|
|
99078
|
+
BuilderState.getFilesAffectedBy = getFilesAffectedBy;
|
|
99079
|
+
function updateSignaturesFromCache(state, signatureCache) {
|
|
99080
|
+
signatureCache.forEach(function (signature, path) { return updateSignatureOfFile(state, signature, path); });
|
|
99081
|
+
}
|
|
99082
|
+
BuilderState.updateSignaturesFromCache = updateSignaturesFromCache;
|
|
99173
99083
|
function updateSignatureOfFile(state, signature, path) {
|
|
99174
99084
|
state.fileInfos.get(path).signature = signature;
|
|
99175
|
-
|
|
99085
|
+
state.hasCalledUpdateShapeSignature.add(path);
|
|
99176
99086
|
}
|
|
99177
99087
|
BuilderState.updateSignatureOfFile = updateSignatureOfFile;
|
|
99178
|
-
function updateShapeSignature(state, programOfThisState, sourceFile, cancellationToken, computeHash, useFileVersionAsSignature) {
|
|
99179
|
-
var _a;
|
|
99088
|
+
function updateShapeSignature(state, programOfThisState, sourceFile, cacheToUpdateSignature, cancellationToken, computeHash, exportedModulesMapCache, useFileVersionAsSignature) {
|
|
99180
99089
|
if (useFileVersionAsSignature === void 0) { useFileVersionAsSignature = state.useFileVersionAsSignature; }
|
|
99181
|
-
|
|
99090
|
+
ts.Debug.assert(!!sourceFile);
|
|
99091
|
+
ts.Debug.assert(!exportedModulesMapCache || !!state.exportedModulesMap, "Compute visible to outside map only if visibleToOutsideReferencedMap present in the state");
|
|
99092
|
+
if (state.hasCalledUpdateShapeSignature.has(sourceFile.resolvedPath) || cacheToUpdateSignature.has(sourceFile.resolvedPath)) {
|
|
99182
99093
|
return false;
|
|
99094
|
+
}
|
|
99183
99095
|
var info = state.fileInfos.get(sourceFile.resolvedPath);
|
|
99096
|
+
if (!info)
|
|
99097
|
+
return ts.Debug.fail();
|
|
99184
99098
|
var prevSignature = info.signature;
|
|
99185
99099
|
var latestSignature;
|
|
99186
99100
|
if (!sourceFile.isDeclarationFile && !useFileVersionAsSignature) {
|
|
@@ -99188,50 +99102,40 @@ var ts;
|
|
|
99188
99102
|
var firstDts_1 = ts.firstOrUndefined(emitOutput_1.outputFiles);
|
|
99189
99103
|
if (firstDts_1) {
|
|
99190
99104
|
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; })); });
|
|
99191
|
-
latestSignature =
|
|
99192
|
-
if (latestSignature !== prevSignature) {
|
|
99193
|
-
updateExportedModules(
|
|
99105
|
+
latestSignature = (computeHash || ts.generateDjb2Hash)(firstDts_1.text);
|
|
99106
|
+
if (exportedModulesMapCache && latestSignature !== prevSignature) {
|
|
99107
|
+
updateExportedModules(sourceFile, emitOutput_1.exportedModulesFromDeclarationEmit, exportedModulesMapCache);
|
|
99194
99108
|
}
|
|
99195
99109
|
}
|
|
99196
99110
|
}
|
|
99197
99111
|
if (latestSignature === undefined) {
|
|
99198
99112
|
latestSignature = sourceFile.version;
|
|
99199
|
-
if (
|
|
99200
|
-
(state.oldExportedModulesMap || (state.oldExportedModulesMap = new ts.Map())).set(sourceFile.resolvedPath, state.exportedModulesMap.getValues(sourceFile.resolvedPath) || false);
|
|
99113
|
+
if (exportedModulesMapCache && latestSignature !== prevSignature) {
|
|
99201
99114
|
var references = state.referencedMap ? state.referencedMap.getValues(sourceFile.resolvedPath) : undefined;
|
|
99202
99115
|
if (references) {
|
|
99203
|
-
|
|
99116
|
+
exportedModulesMapCache.set(sourceFile.resolvedPath, references);
|
|
99204
99117
|
}
|
|
99205
99118
|
else {
|
|
99206
|
-
|
|
99119
|
+
exportedModulesMapCache.deleteKey(sourceFile.resolvedPath);
|
|
99207
99120
|
}
|
|
99208
99121
|
}
|
|
99209
99122
|
}
|
|
99210
|
-
|
|
99211
|
-
(state.hasCalledUpdateShapeSignature || (state.hasCalledUpdateShapeSignature = new ts.Set())).add(sourceFile.resolvedPath);
|
|
99212
|
-
info.signature = latestSignature;
|
|
99123
|
+
cacheToUpdateSignature.set(sourceFile.resolvedPath, latestSignature);
|
|
99213
99124
|
return latestSignature !== prevSignature;
|
|
99214
99125
|
}
|
|
99215
99126
|
BuilderState.updateShapeSignature = updateShapeSignature;
|
|
99216
|
-
function
|
|
99217
|
-
return (computeHash || ts.generateDjb2Hash)(text);
|
|
99218
|
-
}
|
|
99219
|
-
BuilderState.computeSignature = computeSignature;
|
|
99220
|
-
function updateExportedModules(state, sourceFile, exportedModulesFromDeclarationEmit) {
|
|
99221
|
-
if (!state.exportedModulesMap)
|
|
99222
|
-
return;
|
|
99223
|
-
(state.oldExportedModulesMap || (state.oldExportedModulesMap = new ts.Map())).set(sourceFile.resolvedPath, state.exportedModulesMap.getValues(sourceFile.resolvedPath) || false);
|
|
99127
|
+
function updateExportedModules(sourceFile, exportedModulesFromDeclarationEmit, exportedModulesMapCache) {
|
|
99224
99128
|
if (!exportedModulesFromDeclarationEmit) {
|
|
99225
|
-
|
|
99129
|
+
exportedModulesMapCache.deleteKey(sourceFile.resolvedPath);
|
|
99226
99130
|
return;
|
|
99227
99131
|
}
|
|
99228
99132
|
var exportedModules;
|
|
99229
99133
|
exportedModulesFromDeclarationEmit.forEach(function (symbol) { return addExportedModule(getReferencedFilesFromImportedModuleSymbol(symbol)); });
|
|
99230
99134
|
if (exportedModules) {
|
|
99231
|
-
|
|
99135
|
+
exportedModulesMapCache.set(sourceFile.resolvedPath, exportedModules);
|
|
99232
99136
|
}
|
|
99233
99137
|
else {
|
|
99234
|
-
|
|
99138
|
+
exportedModulesMapCache.deleteKey(sourceFile.resolvedPath);
|
|
99235
99139
|
}
|
|
99236
99140
|
function addExportedModule(exportedModulePaths) {
|
|
99237
99141
|
if (exportedModulePaths === null || exportedModulePaths === void 0 ? void 0 : exportedModulePaths.length) {
|
|
@@ -99243,6 +99147,15 @@ var ts;
|
|
|
99243
99147
|
}
|
|
99244
99148
|
}
|
|
99245
99149
|
BuilderState.updateExportedModules = updateExportedModules;
|
|
99150
|
+
function updateExportedFilesMapFromCache(state, exportedModulesMapCache) {
|
|
99151
|
+
var _a;
|
|
99152
|
+
if (exportedModulesMapCache) {
|
|
99153
|
+
ts.Debug.assert(!!state.exportedModulesMap);
|
|
99154
|
+
(_a = exportedModulesMapCache.deletedKeys()) === null || _a === void 0 ? void 0 : _a.forEach(function (path) { return state.exportedModulesMap.deleteKey(path); });
|
|
99155
|
+
exportedModulesMapCache.forEach(function (exportedModules, path) { return state.exportedModulesMap.set(path, exportedModules); });
|
|
99156
|
+
}
|
|
99157
|
+
}
|
|
99158
|
+
BuilderState.updateExportedFilesMapFromCache = updateExportedFilesMapFromCache;
|
|
99246
99159
|
function getAllDependencies(state, programOfThisState, sourceFile) {
|
|
99247
99160
|
var compilerOptions = programOfThisState.getCompilerOptions();
|
|
99248
99161
|
if (ts.outFile(compilerOptions)) {
|
|
@@ -99326,7 +99239,7 @@ var ts;
|
|
|
99326
99239
|
}
|
|
99327
99240
|
return getAllFilesExcludingDefaultLibraryFile(state, programOfThisState, sourceFileWithUpdatedShape);
|
|
99328
99241
|
}
|
|
99329
|
-
function getFilesAffectedByUpdatedShapeWhenModuleEmit(state, programOfThisState, sourceFileWithUpdatedShape, cancellationToken, computeHash) {
|
|
99242
|
+
function getFilesAffectedByUpdatedShapeWhenModuleEmit(state, programOfThisState, sourceFileWithUpdatedShape, cacheToUpdateSignature, cancellationToken, computeHash, exportedModulesMapCache) {
|
|
99330
99243
|
if (isFileAffectingGlobalScope(sourceFileWithUpdatedShape)) {
|
|
99331
99244
|
return getAllFilesExcludingDefaultLibraryFile(state, programOfThisState, sourceFileWithUpdatedShape);
|
|
99332
99245
|
}
|
|
@@ -99342,7 +99255,7 @@ var ts;
|
|
|
99342
99255
|
if (!seenFileNamesMap.has(currentPath)) {
|
|
99343
99256
|
var currentSourceFile = programOfThisState.getSourceFileByPath(currentPath);
|
|
99344
99257
|
seenFileNamesMap.set(currentPath, currentSourceFile);
|
|
99345
|
-
if (currentSourceFile && updateShapeSignature(state, programOfThisState, currentSourceFile, cancellationToken, computeHash)) {
|
|
99258
|
+
if (currentSourceFile && updateShapeSignature(state, programOfThisState, currentSourceFile, cacheToUpdateSignature, cancellationToken, computeHash, exportedModulesMapCache)) {
|
|
99346
99259
|
queue.push.apply(queue, getReferencedByPaths(state, currentSourceFile.resolvedPath));
|
|
99347
99260
|
}
|
|
99348
99261
|
}
|
|
@@ -99357,31 +99270,29 @@ var ts;
|
|
|
99357
99270
|
return map1 === map2 || map1 !== undefined && map2 !== undefined && map1.size === map2.size && !ts.forEachKey(map1, function (key) { return !map2.has(key); });
|
|
99358
99271
|
}
|
|
99359
99272
|
function createBuilderProgramState(newProgram, getCanonicalFileName, oldState, disableUseFileVersionAsSignature) {
|
|
99360
|
-
var _a, _b;
|
|
99361
99273
|
var state = ts.BuilderState.create(newProgram, getCanonicalFileName, oldState, disableUseFileVersionAsSignature);
|
|
99362
99274
|
state.program = newProgram;
|
|
99363
99275
|
var compilerOptions = newProgram.getCompilerOptions();
|
|
99364
99276
|
state.compilerOptions = compilerOptions;
|
|
99365
|
-
|
|
99366
|
-
if (!outFilePath) {
|
|
99277
|
+
if (!ts.outFile(compilerOptions)) {
|
|
99367
99278
|
state.semanticDiagnosticsPerFile = new ts.Map();
|
|
99368
99279
|
}
|
|
99369
|
-
else if (compilerOptions.composite && (oldState === null || oldState === void 0 ? void 0 : oldState.outSignature) && outFilePath === ts.outFile(oldState === null || oldState === void 0 ? void 0 : oldState.compilerOptions)) {
|
|
99370
|
-
state.outSignature = oldState === null || oldState === void 0 ? void 0 : oldState.outSignature;
|
|
99371
|
-
}
|
|
99372
99280
|
state.changedFilesSet = new ts.Set();
|
|
99373
|
-
state.dtsChangeTime = compilerOptions.composite ? oldState === null || oldState === void 0 ? void 0 : oldState.dtsChangeTime : undefined;
|
|
99374
99281
|
var useOldState = ts.BuilderState.canReuseOldState(state.referencedMap, oldState);
|
|
99375
99282
|
var oldCompilerOptions = useOldState ? oldState.compilerOptions : undefined;
|
|
99376
99283
|
var canCopySemanticDiagnostics = useOldState && oldState.semanticDiagnosticsPerFile && !!state.semanticDiagnosticsPerFile &&
|
|
99377
99284
|
!ts.compilerOptionsAffectSemanticDiagnostics(compilerOptions, oldCompilerOptions);
|
|
99378
|
-
var canCopyEmitSignatures = compilerOptions.composite &&
|
|
99379
|
-
(oldState === null || oldState === void 0 ? void 0 : oldState.emitSignatures) &&
|
|
99380
|
-
!outFilePath &&
|
|
99381
|
-
!ts.compilerOptionsAffectDeclarationPath(compilerOptions, oldCompilerOptions);
|
|
99382
99285
|
if (useOldState) {
|
|
99383
|
-
(
|
|
99384
|
-
|
|
99286
|
+
if (!oldState.currentChangedFilePath) {
|
|
99287
|
+
var affectedSignatures = oldState.currentAffectedFilesSignatures;
|
|
99288
|
+
ts.Debug.assert(!oldState.affectedFiles && (!affectedSignatures || !affectedSignatures.size), "Cannot reuse if only few affected files of currentChangedFile were iterated");
|
|
99289
|
+
}
|
|
99290
|
+
var changedFilesSet = oldState.changedFilesSet;
|
|
99291
|
+
if (canCopySemanticDiagnostics) {
|
|
99292
|
+
ts.Debug.assert(!changedFilesSet || !ts.forEachKey(changedFilesSet, function (path) { return oldState.semanticDiagnosticsPerFile.has(path); }), "Semantic diagnostics shouldnt be available for changed files");
|
|
99293
|
+
}
|
|
99294
|
+
changedFilesSet === null || changedFilesSet === void 0 ? void 0 : changedFilesSet.forEach(function (value) { return state.changedFilesSet.add(value); });
|
|
99295
|
+
if (!ts.outFile(compilerOptions) && oldState.affectedFilesPendingEmit) {
|
|
99385
99296
|
state.affectedFilesPendingEmit = oldState.affectedFilesPendingEmit.slice();
|
|
99386
99297
|
state.affectedFilesPendingEmitKind = oldState.affectedFilesPendingEmitKind && new ts.Map(oldState.affectedFilesPendingEmitKind);
|
|
99387
99298
|
state.affectedFilesPendingEmitIndex = oldState.affectedFilesPendingEmitIndex;
|
|
@@ -99398,7 +99309,6 @@ var ts;
|
|
|
99398
99309
|
if (!useOldState ||
|
|
99399
99310
|
!(oldInfo = oldState.fileInfos.get(sourceFilePath)) ||
|
|
99400
99311
|
oldInfo.version !== info.version ||
|
|
99401
|
-
oldInfo.impliedFormat !== info.impliedFormat ||
|
|
99402
99312
|
!hasSameKeys(newReferences = referencedMap && referencedMap.getValues(sourceFilePath), oldReferencedMap && oldReferencedMap.getValues(sourceFilePath)) ||
|
|
99403
99313
|
newReferences && ts.forEachKey(newReferences, function (path) { return !state.fileInfos.has(path) && oldState.fileInfos.has(path); })) {
|
|
99404
99314
|
state.changedFilesSet.add(sourceFilePath);
|
|
@@ -99418,22 +99328,24 @@ var ts;
|
|
|
99418
99328
|
state.semanticDiagnosticsFromOldState.add(sourceFilePath);
|
|
99419
99329
|
}
|
|
99420
99330
|
}
|
|
99421
|
-
if (canCopyEmitSignatures) {
|
|
99422
|
-
var oldEmitSignature = oldState.emitSignatures.get(sourceFilePath);
|
|
99423
|
-
if (oldEmitSignature)
|
|
99424
|
-
(state.emitSignatures || (state.emitSignatures = new ts.Map())).set(sourceFilePath, oldEmitSignature);
|
|
99425
|
-
}
|
|
99426
99331
|
});
|
|
99427
99332
|
if (useOldState && ts.forEachEntry(oldState.fileInfos, function (info, sourceFilePath) { return info.affectsGlobalScope && !state.fileInfos.has(sourceFilePath); })) {
|
|
99428
99333
|
ts.BuilderState.getAllFilesExcludingDefaultLibraryFile(state, newProgram, undefined)
|
|
99429
99334
|
.forEach(function (file) { return state.changedFilesSet.add(file.resolvedPath); });
|
|
99430
99335
|
}
|
|
99431
|
-
else if (oldCompilerOptions && !
|
|
99336
|
+
else if (oldCompilerOptions && !ts.outFile(compilerOptions) && ts.compilerOptionsAffectEmit(compilerOptions, oldCompilerOptions)) {
|
|
99432
99337
|
newProgram.getSourceFiles().forEach(function (f) { return addToAffectedFilesPendingEmit(state, f.resolvedPath, 1); });
|
|
99433
99338
|
ts.Debug.assert(!state.seenAffectedFiles || !state.seenAffectedFiles.size);
|
|
99434
99339
|
state.seenAffectedFiles = state.seenAffectedFiles || new ts.Set();
|
|
99435
99340
|
}
|
|
99436
|
-
|
|
99341
|
+
if (useOldState) {
|
|
99342
|
+
ts.forEachEntry(oldState.fileInfos, function (info, sourceFilePath) {
|
|
99343
|
+
if (state.fileInfos.has(sourceFilePath) && state.fileInfos.get(sourceFilePath).impliedFormat !== info.impliedFormat) {
|
|
99344
|
+
state.changedFilesSet.add(sourceFilePath);
|
|
99345
|
+
}
|
|
99346
|
+
});
|
|
99347
|
+
}
|
|
99348
|
+
state.buildInfoEmitPending = !!state.changedFilesSet.size;
|
|
99437
99349
|
return state;
|
|
99438
99350
|
}
|
|
99439
99351
|
function convertToDiagnostics(diagnostics, newProgram, getCanonicalFileName) {
|
|
@@ -99466,40 +99378,33 @@ var ts;
|
|
|
99466
99378
|
ts.BuilderState.releaseCache(state);
|
|
99467
99379
|
state.program = undefined;
|
|
99468
99380
|
}
|
|
99469
|
-
function
|
|
99470
|
-
var
|
|
99471
|
-
ts.
|
|
99472
|
-
|
|
99473
|
-
|
|
99474
|
-
|
|
99475
|
-
|
|
99476
|
-
|
|
99477
|
-
|
|
99478
|
-
|
|
99479
|
-
|
|
99480
|
-
|
|
99481
|
-
|
|
99482
|
-
|
|
99483
|
-
|
|
99484
|
-
|
|
99485
|
-
|
|
99486
|
-
|
|
99487
|
-
|
|
99488
|
-
|
|
99489
|
-
|
|
99490
|
-
state.programEmitComplete = backupEmitState.programEmitComplete;
|
|
99491
|
-
state.emitSignatures = backupEmitState.emitSignatures;
|
|
99492
|
-
state.outSignature = backupEmitState.outSignature;
|
|
99493
|
-
state.dtsChangeTime = backupEmitState.dtsChangeTime;
|
|
99494
|
-
state.hasChangedEmitSignature = backupEmitState.hasChangedEmitSignature;
|
|
99495
|
-
if (backupEmitState.changedFilesSet)
|
|
99496
|
-
state.changedFilesSet = backupEmitState.changedFilesSet;
|
|
99381
|
+
function cloneBuilderProgramState(state) {
|
|
99382
|
+
var _a;
|
|
99383
|
+
var newState = ts.BuilderState.clone(state);
|
|
99384
|
+
newState.semanticDiagnosticsPerFile = state.semanticDiagnosticsPerFile && new ts.Map(state.semanticDiagnosticsPerFile);
|
|
99385
|
+
newState.changedFilesSet = new ts.Set(state.changedFilesSet);
|
|
99386
|
+
newState.affectedFiles = state.affectedFiles;
|
|
99387
|
+
newState.affectedFilesIndex = state.affectedFilesIndex;
|
|
99388
|
+
newState.currentChangedFilePath = state.currentChangedFilePath;
|
|
99389
|
+
newState.currentAffectedFilesSignatures = state.currentAffectedFilesSignatures && new ts.Map(state.currentAffectedFilesSignatures);
|
|
99390
|
+
newState.currentAffectedFilesExportedModulesMap = (_a = state.currentAffectedFilesExportedModulesMap) === null || _a === void 0 ? void 0 : _a.clone();
|
|
99391
|
+
newState.seenAffectedFiles = state.seenAffectedFiles && new ts.Set(state.seenAffectedFiles);
|
|
99392
|
+
newState.cleanedDiagnosticsOfLibFiles = state.cleanedDiagnosticsOfLibFiles;
|
|
99393
|
+
newState.semanticDiagnosticsFromOldState = state.semanticDiagnosticsFromOldState && new ts.Set(state.semanticDiagnosticsFromOldState);
|
|
99394
|
+
newState.program = state.program;
|
|
99395
|
+
newState.compilerOptions = state.compilerOptions;
|
|
99396
|
+
newState.affectedFilesPendingEmit = state.affectedFilesPendingEmit && state.affectedFilesPendingEmit.slice();
|
|
99397
|
+
newState.affectedFilesPendingEmitKind = state.affectedFilesPendingEmitKind && new ts.Map(state.affectedFilesPendingEmitKind);
|
|
99398
|
+
newState.affectedFilesPendingEmitIndex = state.affectedFilesPendingEmitIndex;
|
|
99399
|
+
newState.seenEmittedFiles = state.seenEmittedFiles && new ts.Map(state.seenEmittedFiles);
|
|
99400
|
+
newState.programEmitComplete = state.programEmitComplete;
|
|
99401
|
+
return newState;
|
|
99497
99402
|
}
|
|
99498
99403
|
function assertSourceFileOkWithoutNextAffectedCall(state, sourceFile) {
|
|
99499
99404
|
ts.Debug.assert(!sourceFile || !state.affectedFiles || state.affectedFiles[state.affectedFilesIndex - 1] !== sourceFile || !state.semanticDiagnosticsPerFile.has(sourceFile.resolvedPath));
|
|
99500
99405
|
}
|
|
99501
99406
|
function getNextAffectedFile(state, cancellationToken, computeHash, host) {
|
|
99502
|
-
var _a
|
|
99407
|
+
var _a;
|
|
99503
99408
|
while (true) {
|
|
99504
99409
|
var affectedFiles = state.affectedFiles;
|
|
99505
99410
|
if (affectedFiles) {
|
|
@@ -99516,8 +99421,10 @@ var ts;
|
|
|
99516
99421
|
}
|
|
99517
99422
|
state.changedFilesSet.delete(state.currentChangedFilePath);
|
|
99518
99423
|
state.currentChangedFilePath = undefined;
|
|
99519
|
-
(
|
|
99520
|
-
|
|
99424
|
+
ts.BuilderState.updateSignaturesFromCache(state, state.currentAffectedFilesSignatures);
|
|
99425
|
+
state.currentAffectedFilesSignatures.clear();
|
|
99426
|
+
ts.BuilderState.updateExportedFilesMapFromCache(state, state.currentAffectedFilesExportedModulesMap);
|
|
99427
|
+
(_a = state.currentAffectedFilesExportedModulesMap) === null || _a === void 0 ? void 0 : _a.clear();
|
|
99521
99428
|
state.affectedFiles = undefined;
|
|
99522
99429
|
}
|
|
99523
99430
|
var nextKey = state.changedFilesSet.keys().next();
|
|
@@ -99530,7 +99437,12 @@ var ts;
|
|
|
99530
99437
|
ts.Debug.assert(!state.semanticDiagnosticsPerFile);
|
|
99531
99438
|
return program;
|
|
99532
99439
|
}
|
|
99533
|
-
|
|
99440
|
+
if (!state.currentAffectedFilesSignatures)
|
|
99441
|
+
state.currentAffectedFilesSignatures = new ts.Map();
|
|
99442
|
+
if (state.exportedModulesMap) {
|
|
99443
|
+
state.currentAffectedFilesExportedModulesMap || (state.currentAffectedFilesExportedModulesMap = ts.BuilderState.createManyToManyPathMap());
|
|
99444
|
+
}
|
|
99445
|
+
state.affectedFiles = ts.BuilderState.getFilesAffectedBy(state, program, nextKey.value, cancellationToken, computeHash, state.currentAffectedFilesSignatures, state.currentAffectedFilesExportedModulesMap);
|
|
99534
99446
|
state.currentChangedFilePath = nextKey.value;
|
|
99535
99447
|
state.affectedFilesIndex = 0;
|
|
99536
99448
|
if (!state.seenAffectedFiles)
|
|
@@ -99574,12 +99486,14 @@ var ts;
|
|
|
99574
99486
|
}
|
|
99575
99487
|
}
|
|
99576
99488
|
function handleDtsMayChangeOfAffectedFile(state, affectedFile, cancellationToken, computeHash, host) {
|
|
99489
|
+
var _a;
|
|
99577
99490
|
removeSemanticDiagnosticsOf(state, affectedFile.resolvedPath);
|
|
99578
99491
|
if (state.allFilesExcludingDefaultLibraryFile === state.affectedFiles) {
|
|
99579
99492
|
removeDiagnosticsOfLibraryFiles(state);
|
|
99580
|
-
ts.BuilderState.updateShapeSignature(state, ts.Debug.checkDefined(state.program), affectedFile, cancellationToken, computeHash);
|
|
99493
|
+
ts.BuilderState.updateShapeSignature(state, ts.Debug.checkDefined(state.program), affectedFile, ts.Debug.checkDefined(state.currentAffectedFilesSignatures), cancellationToken, computeHash, state.currentAffectedFilesExportedModulesMap);
|
|
99581
99494
|
return;
|
|
99582
99495
|
}
|
|
99496
|
+
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);
|
|
99583
99497
|
if (state.compilerOptions.assumeChangesOnlyAffectDirectDependencies)
|
|
99584
99498
|
return;
|
|
99585
99499
|
handleDtsMayChangeOfReferencingExportOfAffectedFile(state, affectedFile, cancellationToken, computeHash, host);
|
|
@@ -99590,7 +99504,7 @@ var ts;
|
|
|
99590
99504
|
var program = ts.Debug.checkDefined(state.program);
|
|
99591
99505
|
var sourceFile = program.getSourceFileByPath(path);
|
|
99592
99506
|
if (sourceFile) {
|
|
99593
|
-
ts.BuilderState.updateShapeSignature(state, program, sourceFile, cancellationToken, computeHash, !host.disableUseFileVersionAsSignature);
|
|
99507
|
+
ts.BuilderState.updateShapeSignature(state, program, sourceFile, ts.Debug.checkDefined(state.currentAffectedFilesSignatures), cancellationToken, computeHash, state.currentAffectedFilesExportedModulesMap, !host.disableUseFileVersionAsSignature);
|
|
99594
99508
|
if (ts.getEmitDeclarations(state.compilerOptions)) {
|
|
99595
99509
|
addToAffectedFilesPendingEmit(state, path, 0);
|
|
99596
99510
|
}
|
|
@@ -99606,10 +99520,24 @@ var ts;
|
|
|
99606
99520
|
return !state.semanticDiagnosticsFromOldState.size;
|
|
99607
99521
|
}
|
|
99608
99522
|
function isChangedSignature(state, path) {
|
|
99609
|
-
var
|
|
99610
|
-
var
|
|
99523
|
+
var newSignature = ts.Debug.checkDefined(state.currentAffectedFilesSignatures).get(path);
|
|
99524
|
+
var oldSignature = ts.Debug.checkDefined(state.fileInfos.get(path)).signature;
|
|
99611
99525
|
return newSignature !== oldSignature;
|
|
99612
99526
|
}
|
|
99527
|
+
function forEachKeyOfExportedModulesMap(state, filePath, fn) {
|
|
99528
|
+
var keys = state.currentAffectedFilesExportedModulesMap.getKeys(filePath);
|
|
99529
|
+
var result = keys && ts.forEachKey(keys, fn);
|
|
99530
|
+
if (result)
|
|
99531
|
+
return result;
|
|
99532
|
+
keys = state.exportedModulesMap.getKeys(filePath);
|
|
99533
|
+
return keys && ts.forEachKey(keys, function (exportedFromPath) {
|
|
99534
|
+
var _a;
|
|
99535
|
+
return !state.currentAffectedFilesExportedModulesMap.hasKey(exportedFromPath) &&
|
|
99536
|
+
!((_a = state.currentAffectedFilesExportedModulesMap.deletedKeys()) === null || _a === void 0 ? void 0 : _a.has(exportedFromPath)) ?
|
|
99537
|
+
fn(exportedFromPath) :
|
|
99538
|
+
undefined;
|
|
99539
|
+
});
|
|
99540
|
+
}
|
|
99613
99541
|
function handleDtsMayChangeOfGlobalScope(state, filePath, cancellationToken, computeHash, host) {
|
|
99614
99542
|
var _a;
|
|
99615
99543
|
if (!((_a = state.fileInfos.get(filePath)) === null || _a === void 0 ? void 0 : _a.affectsGlobalScope))
|
|
@@ -99620,7 +99548,6 @@ var ts;
|
|
|
99620
99548
|
return true;
|
|
99621
99549
|
}
|
|
99622
99550
|
function handleDtsMayChangeOfReferencingExportOfAffectedFile(state, affectedFile, cancellationToken, computeHash, host) {
|
|
99623
|
-
var _a;
|
|
99624
99551
|
if (!state.exportedModulesMap || !state.changedFilesSet.has(affectedFile.resolvedPath))
|
|
99625
99552
|
return;
|
|
99626
99553
|
if (!isChangedSignature(state, affectedFile.resolvedPath))
|
|
@@ -99643,8 +99570,9 @@ var ts;
|
|
|
99643
99570
|
}
|
|
99644
99571
|
}
|
|
99645
99572
|
}
|
|
99573
|
+
ts.Debug.assert(!!state.currentAffectedFilesExportedModulesMap);
|
|
99646
99574
|
var seenFileAndExportsOfFile = new ts.Set();
|
|
99647
|
-
(
|
|
99575
|
+
forEachKeyOfExportedModulesMap(state, affectedFile.resolvedPath, function (exportedFromPath) {
|
|
99648
99576
|
if (handleDtsMayChangeOfGlobalScope(state, exportedFromPath, cancellationToken, computeHash, host))
|
|
99649
99577
|
return true;
|
|
99650
99578
|
var references = state.referencedMap.getKeys(exportedFromPath);
|
|
@@ -99654,16 +99582,17 @@ var ts;
|
|
|
99654
99582
|
});
|
|
99655
99583
|
}
|
|
99656
99584
|
function handleDtsMayChangeOfFileAndExportsOfFile(state, filePath, seenFileAndExportsOfFile, cancellationToken, computeHash, host) {
|
|
99657
|
-
var _a
|
|
99585
|
+
var _a;
|
|
99658
99586
|
if (!ts.tryAddToSet(seenFileAndExportsOfFile, filePath))
|
|
99659
99587
|
return undefined;
|
|
99660
99588
|
if (handleDtsMayChangeOfGlobalScope(state, filePath, cancellationToken, computeHash, host))
|
|
99661
99589
|
return true;
|
|
99662
99590
|
handleDtsMayChangeOf(state, filePath, cancellationToken, computeHash, host);
|
|
99663
|
-
|
|
99591
|
+
ts.Debug.assert(!!state.currentAffectedFilesExportedModulesMap);
|
|
99592
|
+
forEachKeyOfExportedModulesMap(state, filePath, function (exportedFromPath) {
|
|
99664
99593
|
return handleDtsMayChangeOfFileAndExportsOfFile(state, exportedFromPath, seenFileAndExportsOfFile, cancellationToken, computeHash, host);
|
|
99665
99594
|
});
|
|
99666
|
-
(
|
|
99595
|
+
(_a = state.referencedMap.getKeys(filePath)) === null || _a === void 0 ? void 0 : _a.forEach(function (referencingFilePath) {
|
|
99667
99596
|
return !seenFileAndExportsOfFile.has(referencingFilePath) &&
|
|
99668
99597
|
handleDtsMayChangeOf(state, referencingFilePath, cancellationToken, computeHash, host);
|
|
99669
99598
|
});
|
|
@@ -99679,12 +99608,12 @@ var ts;
|
|
|
99679
99608
|
}
|
|
99680
99609
|
else {
|
|
99681
99610
|
state.seenAffectedFiles.add(affected.resolvedPath);
|
|
99682
|
-
state.buildInfoEmitPending = true;
|
|
99683
99611
|
if (emitKind !== undefined) {
|
|
99684
99612
|
(state.seenEmittedFiles || (state.seenEmittedFiles = new ts.Map())).set(affected.resolvedPath, emitKind);
|
|
99685
99613
|
}
|
|
99686
99614
|
if (isPendingEmit) {
|
|
99687
99615
|
state.affectedFilesPendingEmitIndex++;
|
|
99616
|
+
state.buildInfoEmitPending = true;
|
|
99688
99617
|
}
|
|
99689
99618
|
else {
|
|
99690
99619
|
state.affectedFilesIndex++;
|
|
@@ -99716,65 +99645,29 @@ var ts;
|
|
|
99716
99645
|
}
|
|
99717
99646
|
return ts.filterSemanticDiagnostics(diagnostics, state.compilerOptions);
|
|
99718
99647
|
}
|
|
99719
|
-
function
|
|
99720
|
-
|
|
99721
|
-
|
|
99722
|
-
ts.isProgramBundleEmitBuildInfo = isProgramBundleEmitBuildInfo;
|
|
99723
|
-
function getProgramBuildInfo(state, getCanonicalFileName, host) {
|
|
99724
|
-
var outFilePath = ts.outFile(state.compilerOptions);
|
|
99725
|
-
if (outFilePath && !state.compilerOptions.composite)
|
|
99726
|
-
return;
|
|
99648
|
+
function getProgramBuildInfo(state, getCanonicalFileName) {
|
|
99649
|
+
if (ts.outFile(state.compilerOptions))
|
|
99650
|
+
return undefined;
|
|
99727
99651
|
var currentDirectory = ts.Debug.checkDefined(state.program).getCurrentDirectory();
|
|
99728
99652
|
var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(ts.getTsBuildInfoEmitOutputFilePath(state.compilerOptions), currentDirectory));
|
|
99729
|
-
state.dtsChangeTime = state.hasChangedEmitSignature ? ts.getCurrentTime(host).getTime() : state.dtsChangeTime;
|
|
99730
|
-
if (outFilePath) {
|
|
99731
|
-
var fileNames_1 = [];
|
|
99732
|
-
var fileInfos_1 = [];
|
|
99733
|
-
state.program.getRootFileNames().forEach(function (f) {
|
|
99734
|
-
var sourceFile = state.program.getSourceFile(f);
|
|
99735
|
-
if (!sourceFile)
|
|
99736
|
-
return;
|
|
99737
|
-
fileNames_1.push(relativeToBuildInfo(sourceFile.resolvedPath));
|
|
99738
|
-
fileInfos_1.push(sourceFile.version);
|
|
99739
|
-
});
|
|
99740
|
-
var result_15 = {
|
|
99741
|
-
fileNames: fileNames_1,
|
|
99742
|
-
fileInfos: fileInfos_1,
|
|
99743
|
-
options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions, "affectsBundleEmitBuildInfo"),
|
|
99744
|
-
outSignature: state.outSignature,
|
|
99745
|
-
dtsChangeTime: state.dtsChangeTime,
|
|
99746
|
-
};
|
|
99747
|
-
return result_15;
|
|
99748
|
-
}
|
|
99749
99653
|
var fileNames = [];
|
|
99750
99654
|
var fileNameToFileId = new ts.Map();
|
|
99751
99655
|
var fileIdsList;
|
|
99752
99656
|
var fileNamesToFileIdListId;
|
|
99753
|
-
var emitSignatures;
|
|
99754
99657
|
var fileInfos = ts.arrayFrom(state.fileInfos.entries(), function (_a) {
|
|
99755
|
-
var _b, _c;
|
|
99756
99658
|
var key = _a[0], value = _a[1];
|
|
99757
99659
|
var fileId = toFileId(key);
|
|
99758
99660
|
ts.Debug.assert(fileNames[fileId - 1] === relativeToBuildInfo(key));
|
|
99759
|
-
var
|
|
99760
|
-
var actualSignature =
|
|
99761
|
-
if (state.compilerOptions.composite) {
|
|
99762
|
-
var file = state.program.getSourceFileByPath(key);
|
|
99763
|
-
if (!ts.isJsonSourceFile(file) && ts.sourceFileMayBeEmitted(file, state.program)) {
|
|
99764
|
-
var emitSignature = (_c = state.emitSignatures) === null || _c === void 0 ? void 0 : _c.get(key);
|
|
99765
|
-
if (emitSignature !== actualSignature) {
|
|
99766
|
-
(emitSignatures || (emitSignatures = [])).push(emitSignature === undefined ? fileId : [fileId, emitSignature]);
|
|
99767
|
-
}
|
|
99768
|
-
}
|
|
99769
|
-
}
|
|
99661
|
+
var signature = state.currentAffectedFilesSignatures && state.currentAffectedFilesSignatures.get(key);
|
|
99662
|
+
var actualSignature = signature !== null && signature !== void 0 ? signature : value.signature;
|
|
99770
99663
|
return value.version === actualSignature ?
|
|
99771
99664
|
value.affectsGlobalScope || value.impliedFormat ?
|
|
99772
99665
|
{ version: value.version, signature: undefined, affectsGlobalScope: value.affectsGlobalScope, impliedFormat: value.impliedFormat } :
|
|
99773
99666
|
value.version :
|
|
99774
99667
|
actualSignature !== undefined ?
|
|
99775
|
-
|
|
99668
|
+
signature === undefined ?
|
|
99776
99669
|
value :
|
|
99777
|
-
{ version: value.version, signature:
|
|
99670
|
+
{ version: value.version, signature: signature, affectsGlobalScope: value.affectsGlobalScope, impliedFormat: value.impliedFormat } :
|
|
99778
99671
|
{ version: value.version, signature: false, affectsGlobalScope: value.affectsGlobalScope, impliedFormat: value.impliedFormat };
|
|
99779
99672
|
});
|
|
99780
99673
|
var referencedMap;
|
|
@@ -99788,12 +99681,16 @@ var ts;
|
|
|
99788
99681
|
if (state.exportedModulesMap) {
|
|
99789
99682
|
exportedModulesMap = ts.mapDefined(ts.arrayFrom(state.exportedModulesMap.keys()).sort(ts.compareStringsCaseSensitive), function (key) {
|
|
99790
99683
|
var _a;
|
|
99791
|
-
|
|
99792
|
-
|
|
99793
|
-
|
|
99794
|
-
|
|
99795
|
-
|
|
99796
|
-
|
|
99684
|
+
if (state.currentAffectedFilesExportedModulesMap) {
|
|
99685
|
+
if ((_a = state.currentAffectedFilesExportedModulesMap.deletedKeys()) === null || _a === void 0 ? void 0 : _a.has(key)) {
|
|
99686
|
+
return undefined;
|
|
99687
|
+
}
|
|
99688
|
+
var newValue = state.currentAffectedFilesExportedModulesMap.getValues(key);
|
|
99689
|
+
if (newValue) {
|
|
99690
|
+
return [toFileId(key), toFileIdListId(newValue)];
|
|
99691
|
+
}
|
|
99692
|
+
}
|
|
99693
|
+
return [toFileId(key), toFileIdListId(state.exportedModulesMap.getValues(key))];
|
|
99797
99694
|
});
|
|
99798
99695
|
}
|
|
99799
99696
|
var semanticDiagnosticsPerFile;
|
|
@@ -99804,7 +99701,9 @@ var ts;
|
|
|
99804
99701
|
(semanticDiagnosticsPerFile || (semanticDiagnosticsPerFile = [])).push(value.length ?
|
|
99805
99702
|
[
|
|
99806
99703
|
toFileId(key),
|
|
99807
|
-
|
|
99704
|
+
state.hasReusableDiagnostic ?
|
|
99705
|
+
value :
|
|
99706
|
+
convertToReusableDiagnostics(value, relativeToBuildInfo)
|
|
99808
99707
|
] :
|
|
99809
99708
|
toFileId(key));
|
|
99810
99709
|
}
|
|
@@ -99819,27 +99718,16 @@ var ts;
|
|
|
99819
99718
|
}
|
|
99820
99719
|
}
|
|
99821
99720
|
}
|
|
99822
|
-
|
|
99823
|
-
if (state.changedFilesSet.size) {
|
|
99824
|
-
for (var _d = 0, _e = ts.arrayFrom(state.changedFilesSet.keys()).sort(ts.compareStringsCaseSensitive); _d < _e.length; _d++) {
|
|
99825
|
-
var path = _e[_d];
|
|
99826
|
-
(changeFileSet || (changeFileSet = [])).push(toFileId(path));
|
|
99827
|
-
}
|
|
99828
|
-
}
|
|
99829
|
-
var result = {
|
|
99721
|
+
return {
|
|
99830
99722
|
fileNames: fileNames,
|
|
99831
99723
|
fileInfos: fileInfos,
|
|
99832
|
-
options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions,
|
|
99724
|
+
options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions, relativeToBuildInfoEnsuringAbsolutePath),
|
|
99833
99725
|
fileIdsList: fileIdsList,
|
|
99834
99726
|
referencedMap: referencedMap,
|
|
99835
99727
|
exportedModulesMap: exportedModulesMap,
|
|
99836
99728
|
semanticDiagnosticsPerFile: semanticDiagnosticsPerFile,
|
|
99837
99729
|
affectedFilesPendingEmit: affectedFilesPendingEmit,
|
|
99838
|
-
changeFileSet: changeFileSet,
|
|
99839
|
-
emitSignatures: emitSignatures,
|
|
99840
|
-
dtsChangeTime: state.dtsChangeTime,
|
|
99841
99730
|
};
|
|
99842
|
-
return result;
|
|
99843
99731
|
function relativeToBuildInfoEnsuringAbsolutePath(path) {
|
|
99844
99732
|
return relativeToBuildInfo(ts.getNormalizedAbsolutePath(path, currentDirectory));
|
|
99845
99733
|
}
|
|
@@ -99864,18 +99752,21 @@ var ts;
|
|
|
99864
99752
|
}
|
|
99865
99753
|
return fileIdListId;
|
|
99866
99754
|
}
|
|
99867
|
-
|
|
99868
|
-
|
|
99869
|
-
|
|
99870
|
-
|
|
99871
|
-
|
|
99872
|
-
|
|
99873
|
-
|
|
99874
|
-
|
|
99875
|
-
|
|
99755
|
+
}
|
|
99756
|
+
function convertToProgramBuildInfoCompilerOptions(options, relativeToBuildInfo) {
|
|
99757
|
+
var result;
|
|
99758
|
+
var optionsNameMap = ts.getOptionsNameMap().optionsNameMap;
|
|
99759
|
+
for (var _i = 0, _a = ts.getOwnKeys(options).sort(ts.compareStringsCaseSensitive); _i < _a.length; _i++) {
|
|
99760
|
+
var name = _a[_i];
|
|
99761
|
+
var optionKey = name.toLowerCase();
|
|
99762
|
+
var optionInfo = optionsNameMap.get(optionKey);
|
|
99763
|
+
if ((optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsEmit) || (optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsSemanticDiagnostics) ||
|
|
99764
|
+
optionKey === "strict" ||
|
|
99765
|
+
optionKey === "skiplibcheck" || optionKey === "skipdefaultlibcheck") {
|
|
99766
|
+
(result || (result = {}))[name] = convertToReusableCompilerOptionValue(optionInfo, options[name], relativeToBuildInfo);
|
|
99876
99767
|
}
|
|
99877
|
-
return result;
|
|
99878
99768
|
}
|
|
99769
|
+
return result;
|
|
99879
99770
|
}
|
|
99880
99771
|
function convertToReusableCompilerOptionValue(option, value, relativeToBuildInfo) {
|
|
99881
99772
|
if (option) {
|
|
@@ -99949,10 +99840,6 @@ var ts;
|
|
|
99949
99840
|
return { host: host, newProgram: newProgram, oldProgram: oldProgram, configFileParsingDiagnostics: configFileParsingDiagnostics || ts.emptyArray };
|
|
99950
99841
|
}
|
|
99951
99842
|
ts.getBuilderCreationParameters = getBuilderCreationParameters;
|
|
99952
|
-
function computeSignature(text, data, computeHash) {
|
|
99953
|
-
return ts.BuilderState.computeSignature((data === null || data === void 0 ? void 0 : data.sourceMapUrlPos) !== undefined ? text.substring(0, data.sourceMapUrlPos) : text, computeHash);
|
|
99954
|
-
}
|
|
99955
|
-
ts.computeSignature = computeSignature;
|
|
99956
99843
|
function createBuilderProgram(kind, _a) {
|
|
99957
99844
|
var newProgram = _a.newProgram, host = _a.host, oldProgram = _a.oldProgram, configFileParsingDiagnostics = _a.configFileParsingDiagnostics;
|
|
99958
99845
|
var oldState = oldProgram && oldProgram.getState();
|
|
@@ -99964,28 +99851,28 @@ var ts;
|
|
|
99964
99851
|
var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames());
|
|
99965
99852
|
var computeHash = ts.maybeBind(host, host.createHash);
|
|
99966
99853
|
var state = createBuilderProgramState(newProgram, getCanonicalFileName, oldState, host.disableUseFileVersionAsSignature);
|
|
99967
|
-
var
|
|
99968
|
-
newProgram.getProgramBuildInfo = function () { return getProgramBuildInfo(state, getCanonicalFileName
|
|
99854
|
+
var backupState;
|
|
99855
|
+
newProgram.getProgramBuildInfo = function () { return getProgramBuildInfo(state, getCanonicalFileName); };
|
|
99969
99856
|
newProgram = undefined;
|
|
99970
99857
|
oldProgram = undefined;
|
|
99971
99858
|
oldState = undefined;
|
|
99972
99859
|
var getState = function () { return state; };
|
|
99973
99860
|
var builderProgram = createRedirectedBuilderProgram(getState, configFileParsingDiagnostics);
|
|
99974
99861
|
builderProgram.getState = getState;
|
|
99975
|
-
builderProgram.
|
|
99976
|
-
ts.Debug.assert(
|
|
99977
|
-
|
|
99862
|
+
builderProgram.backupState = function () {
|
|
99863
|
+
ts.Debug.assert(backupState === undefined);
|
|
99864
|
+
backupState = cloneBuilderProgramState(state);
|
|
99978
99865
|
};
|
|
99979
|
-
builderProgram.
|
|
99980
|
-
|
|
99981
|
-
|
|
99866
|
+
builderProgram.restoreState = function () {
|
|
99867
|
+
state = ts.Debug.checkDefined(backupState);
|
|
99868
|
+
backupState = undefined;
|
|
99982
99869
|
};
|
|
99983
99870
|
builderProgram.getAllDependencies = function (sourceFile) { return ts.BuilderState.getAllDependencies(state, ts.Debug.checkDefined(state.program), sourceFile); };
|
|
99984
99871
|
builderProgram.getSemanticDiagnostics = getSemanticDiagnostics;
|
|
99985
99872
|
builderProgram.emit = emit;
|
|
99986
99873
|
builderProgram.releaseProgram = function () {
|
|
99987
99874
|
releaseCache(state);
|
|
99988
|
-
|
|
99875
|
+
backupState = undefined;
|
|
99989
99876
|
};
|
|
99990
99877
|
if (kind === BuilderProgramKind.SemanticDiagnosticsBuilderProgram) {
|
|
99991
99878
|
builderProgram.getSemanticDiagnosticsOfNextAffectedFile = getSemanticDiagnosticsOfNextAffectedFile;
|
|
@@ -100031,57 +99918,35 @@ var ts;
|
|
|
100031
99918
|
affected = program;
|
|
100032
99919
|
}
|
|
100033
99920
|
}
|
|
100034
|
-
return toAffectedFileEmitResult(state, ts.Debug.checkDefined(state.program).emit(affected === state.program ? undefined : affected, ts.getEmitDeclarations(state.compilerOptions) ?
|
|
100035
|
-
|
|
99921
|
+
return toAffectedFileEmitResult(state, ts.Debug.checkDefined(state.program).emit(affected === state.program ? undefined : affected, affected !== state.program && ts.getEmitDeclarations(state.compilerOptions) && !customTransformers ?
|
|
99922
|
+
getWriteFileUpdatingSignatureCallback(writeFile) :
|
|
100036
99923
|
writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles || emitKind === 0, customTransformers), affected, emitKind, isPendingEmitFile);
|
|
100037
99924
|
}
|
|
100038
|
-
function
|
|
99925
|
+
function getWriteFileUpdatingSignatureCallback(writeFile) {
|
|
100039
99926
|
return function (fileName, text, writeByteOrderMark, onError, sourceFiles, data) {
|
|
100040
|
-
var _a
|
|
99927
|
+
var _a;
|
|
100041
99928
|
if (ts.isDeclarationFileName(fileName)) {
|
|
100042
|
-
|
|
100043
|
-
|
|
100044
|
-
|
|
100045
|
-
|
|
100046
|
-
|
|
100047
|
-
|
|
100048
|
-
|
|
100049
|
-
|
|
100050
|
-
|
|
100051
|
-
|
|
100052
|
-
|
|
100053
|
-
|
|
100054
|
-
|
|
100055
|
-
if (state.affectedFiles) {
|
|
100056
|
-
var existing = (_a = state.oldSignatures) === null || _a === void 0 ? void 0 : _a.get(file.resolvedPath);
|
|
100057
|
-
if (existing === undefined)
|
|
100058
|
-
(state.oldSignatures || (state.oldSignatures = new ts.Map())).set(file.resolvedPath, info.signature || false);
|
|
100059
|
-
info.signature = newSignature;
|
|
100060
|
-
}
|
|
100061
|
-
else {
|
|
100062
|
-
info.signature = newSignature;
|
|
100063
|
-
(_b = state.oldExportedModulesMap) === null || _b === void 0 ? void 0 : _b.clear();
|
|
100064
|
-
}
|
|
100065
|
-
}
|
|
99929
|
+
ts.Debug.assert((sourceFiles === null || sourceFiles === void 0 ? void 0 : sourceFiles.length) === 1);
|
|
99930
|
+
var file = sourceFiles[0];
|
|
99931
|
+
var info = state.fileInfos.get(file.resolvedPath);
|
|
99932
|
+
var signature = ((_a = state.currentAffectedFilesSignatures) === null || _a === void 0 ? void 0 : _a.get(file.resolvedPath)) || info.signature;
|
|
99933
|
+
if (signature === file.version) {
|
|
99934
|
+
var newSignature = (computeHash || ts.generateDjb2Hash)((data === null || data === void 0 ? void 0 : data.sourceMapUrlPos) !== undefined ? text.substring(0, data.sourceMapUrlPos) : text);
|
|
99935
|
+
if (newSignature !== file.version) {
|
|
99936
|
+
if (host.storeFilesChangingSignatureDuringEmit)
|
|
99937
|
+
(state.filesChangingSignature || (state.filesChangingSignature = new ts.Set())).add(file.resolvedPath);
|
|
99938
|
+
if (state.exportedModulesMap)
|
|
99939
|
+
ts.BuilderState.updateExportedModules(file, file.exportedModulesFromDeclarationEmit, state.currentAffectedFilesExportedModulesMap || (state.currentAffectedFilesExportedModulesMap = ts.BuilderState.createManyToManyPathMap()));
|
|
99940
|
+
if (state.affectedFiles && state.affectedFilesIndex < state.affectedFiles.length) {
|
|
99941
|
+
state.currentAffectedFilesSignatures.set(file.resolvedPath, newSignature);
|
|
100066
99942
|
}
|
|
100067
|
-
|
|
100068
|
-
|
|
100069
|
-
|
|
100070
|
-
|
|
100071
|
-
newSignature || (newSignature = computeSignature(text, data, computeHash));
|
|
100072
|
-
if (newSignature !== oldSignature) {
|
|
100073
|
-
(state.emitSignatures || (state.emitSignatures = new ts.Map())).set(filePath, newSignature);
|
|
100074
|
-
state.hasChangedEmitSignature = true;
|
|
99943
|
+
else {
|
|
99944
|
+
info.signature = newSignature;
|
|
99945
|
+
if (state.exportedModulesMap)
|
|
99946
|
+
ts.BuilderState.updateExportedFilesMapFromCache(state, state.currentAffectedFilesExportedModulesMap);
|
|
100075
99947
|
}
|
|
100076
99948
|
}
|
|
100077
99949
|
}
|
|
100078
|
-
else if (state.compilerOptions.composite) {
|
|
100079
|
-
var newSignature = computeSignature(text, data, computeHash);
|
|
100080
|
-
if (newSignature !== state.outSignature) {
|
|
100081
|
-
state.outSignature = newSignature;
|
|
100082
|
-
state.hasChangedEmitSignature = true;
|
|
100083
|
-
}
|
|
100084
|
-
}
|
|
100085
99950
|
}
|
|
100086
99951
|
if (writeFile)
|
|
100087
99952
|
writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data);
|
|
@@ -100130,8 +99995,8 @@ var ts;
|
|
|
100130
99995
|
}
|
|
100131
99996
|
}
|
|
100132
99997
|
}
|
|
100133
|
-
return ts.Debug.checkDefined(state.program).emit(targetSourceFile, ts.getEmitDeclarations(state.compilerOptions) ?
|
|
100134
|
-
|
|
99998
|
+
return ts.Debug.checkDefined(state.program).emit(targetSourceFile, !ts.outFile(state.compilerOptions) && ts.getEmitDeclarations(state.compilerOptions) && !customTransformers ?
|
|
99999
|
+
getWriteFileUpdatingSignatureCallback(writeFile) :
|
|
100135
100000
|
writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles, customTransformers);
|
|
100136
100001
|
}
|
|
100137
100002
|
function getSemanticDiagnosticsOfNextAffectedFile(cancellationToken, ignoreSourceFile) {
|
|
@@ -100194,58 +100059,29 @@ var ts;
|
|
|
100194
100059
|
{ version: fileInfo.version, signature: fileInfo.signature === false ? undefined : fileInfo.version, affectsGlobalScope: fileInfo.affectsGlobalScope, impliedFormat: fileInfo.impliedFormat };
|
|
100195
100060
|
}
|
|
100196
100061
|
ts.toBuilderStateFileInfo = toBuilderStateFileInfo;
|
|
100197
|
-
function
|
|
100198
|
-
var _a
|
|
100062
|
+
function createBuildProgramUsingProgramBuildInfo(program, buildInfoPath, host) {
|
|
100063
|
+
var _a;
|
|
100199
100064
|
var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));
|
|
100200
100065
|
var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames());
|
|
100201
|
-
var
|
|
100202
|
-
var
|
|
100203
|
-
var
|
|
100204
|
-
|
|
100205
|
-
|
|
100206
|
-
|
|
100207
|
-
|
|
100208
|
-
|
|
100209
|
-
|
|
100210
|
-
};
|
|
100211
|
-
|
|
100212
|
-
|
|
100213
|
-
|
|
100214
|
-
|
|
100215
|
-
|
|
100216
|
-
var emitSignatures_1 = ((_c = program.options) === null || _c === void 0 ? void 0 : _c.composite) && !ts.outFile(program.options) ? new ts.Map() : undefined;
|
|
100217
|
-
program.fileInfos.forEach(function (fileInfo, index) {
|
|
100218
|
-
var path = toFilePath(index + 1);
|
|
100219
|
-
var stateFileInfo = toBuilderStateFileInfo(fileInfo);
|
|
100220
|
-
fileInfos_2.set(path, stateFileInfo);
|
|
100221
|
-
if (emitSignatures_1 && stateFileInfo.signature)
|
|
100222
|
-
emitSignatures_1.set(path, stateFileInfo.signature);
|
|
100223
|
-
});
|
|
100224
|
-
(_d = program.emitSignatures) === null || _d === void 0 ? void 0 : _d.forEach(function (value) {
|
|
100225
|
-
if (ts.isNumber(value))
|
|
100226
|
-
emitSignatures_1.delete(toFilePath(value));
|
|
100227
|
-
else
|
|
100228
|
-
emitSignatures_1.set(toFilePath(value[0]), value[1]);
|
|
100229
|
-
});
|
|
100230
|
-
state = {
|
|
100231
|
-
fileInfos: fileInfos_2,
|
|
100232
|
-
compilerOptions: program.options ? ts.convertToOptionsWithAbsolutePaths(program.options, toAbsolutePath) : {},
|
|
100233
|
-
referencedMap: toManyToManyPathMap(program.referencedMap),
|
|
100234
|
-
exportedModulesMap: toManyToManyPathMap(program.exportedModulesMap),
|
|
100235
|
-
semanticDiagnosticsPerFile: program.semanticDiagnosticsPerFile && ts.arrayToMap(program.semanticDiagnosticsPerFile, function (value) { return toFilePath(ts.isNumber(value) ? value : value[0]); }, function (value) { return ts.isNumber(value) ? ts.emptyArray : value[1]; }),
|
|
100236
|
-
hasReusableDiagnostic: true,
|
|
100237
|
-
affectedFilesPendingEmit: ts.map(program.affectedFilesPendingEmit, function (value) { return toFilePath(value[0]); }),
|
|
100238
|
-
affectedFilesPendingEmitKind: program.affectedFilesPendingEmit && ts.arrayToMap(program.affectedFilesPendingEmit, function (value) { return toFilePath(value[0]); }, function (value) { return value[1]; }),
|
|
100239
|
-
affectedFilesPendingEmitIndex: program.affectedFilesPendingEmit && 0,
|
|
100240
|
-
changedFilesSet: new ts.Set(ts.map(program.changeFileSet, toFilePath)),
|
|
100241
|
-
dtsChangeTime: program.dtsChangeTime,
|
|
100242
|
-
emitSignatures: (emitSignatures_1 === null || emitSignatures_1 === void 0 ? void 0 : emitSignatures_1.size) ? emitSignatures_1 : undefined,
|
|
100243
|
-
};
|
|
100244
|
-
}
|
|
100066
|
+
var filePaths = program.fileNames.map(toPath);
|
|
100067
|
+
var filePathsSetList = (_a = program.fileIdsList) === null || _a === void 0 ? void 0 : _a.map(function (fileIds) { return new ts.Set(fileIds.map(toFilePath)); });
|
|
100068
|
+
var fileInfos = new ts.Map();
|
|
100069
|
+
program.fileInfos.forEach(function (fileInfo, index) { return fileInfos.set(toFilePath(index + 1), toBuilderStateFileInfo(fileInfo)); });
|
|
100070
|
+
var state = {
|
|
100071
|
+
fileInfos: fileInfos,
|
|
100072
|
+
compilerOptions: program.options ? ts.convertToOptionsWithAbsolutePaths(program.options, toAbsolutePath) : {},
|
|
100073
|
+
referencedMap: toManyToManyPathMap(program.referencedMap),
|
|
100074
|
+
exportedModulesMap: toManyToManyPathMap(program.exportedModulesMap),
|
|
100075
|
+
semanticDiagnosticsPerFile: program.semanticDiagnosticsPerFile && ts.arrayToMap(program.semanticDiagnosticsPerFile, function (value) { return toFilePath(ts.isNumber(value) ? value : value[0]); }, function (value) { return ts.isNumber(value) ? ts.emptyArray : value[1]; }),
|
|
100076
|
+
hasReusableDiagnostic: true,
|
|
100077
|
+
affectedFilesPendingEmit: ts.map(program.affectedFilesPendingEmit, function (value) { return toFilePath(value[0]); }),
|
|
100078
|
+
affectedFilesPendingEmitKind: program.affectedFilesPendingEmit && ts.arrayToMap(program.affectedFilesPendingEmit, function (value) { return toFilePath(value[0]); }, function (value) { return value[1]; }),
|
|
100079
|
+
affectedFilesPendingEmitIndex: program.affectedFilesPendingEmit && 0,
|
|
100080
|
+
};
|
|
100245
100081
|
return {
|
|
100246
100082
|
getState: function () { return state; },
|
|
100247
|
-
|
|
100248
|
-
|
|
100083
|
+
backupState: ts.noop,
|
|
100084
|
+
restoreState: ts.noop,
|
|
100249
100085
|
getProgram: ts.notImplemented,
|
|
100250
100086
|
getProgramOrUndefined: ts.returnUndefined,
|
|
100251
100087
|
releaseProgram: ts.noop,
|
|
@@ -100290,24 +100126,12 @@ var ts;
|
|
|
100290
100126
|
return map;
|
|
100291
100127
|
}
|
|
100292
100128
|
}
|
|
100293
|
-
ts.
|
|
100294
|
-
function getBuildInfoFileVersionMap(program, buildInfoPath, host) {
|
|
100295
|
-
var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));
|
|
100296
|
-
var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames());
|
|
100297
|
-
var fileInfos = new ts.Map();
|
|
100298
|
-
program.fileInfos.forEach(function (fileInfo, index) {
|
|
100299
|
-
var path = ts.toPath(program.fileNames[index], buildInfoDirectory, getCanonicalFileName);
|
|
100300
|
-
var version = ts.isString(fileInfo) ? fileInfo : fileInfo.version;
|
|
100301
|
-
fileInfos.set(path, version);
|
|
100302
|
-
});
|
|
100303
|
-
return fileInfos;
|
|
100304
|
-
}
|
|
100305
|
-
ts.getBuildInfoFileVersionMap = getBuildInfoFileVersionMap;
|
|
100129
|
+
ts.createBuildProgramUsingProgramBuildInfo = createBuildProgramUsingProgramBuildInfo;
|
|
100306
100130
|
function createRedirectedBuilderProgram(getState, configFileParsingDiagnostics) {
|
|
100307
100131
|
return {
|
|
100308
100132
|
getState: ts.notImplemented,
|
|
100309
|
-
|
|
100310
|
-
|
|
100133
|
+
backupState: ts.noop,
|
|
100134
|
+
restoreState: ts.noop,
|
|
100311
100135
|
getProgram: getProgram,
|
|
100312
100136
|
getProgramOrUndefined: function () { return getState().program; },
|
|
100313
100137
|
releaseProgram: function () { return getState().program = undefined; },
|
|
@@ -101258,9 +101082,9 @@ var ts;
|
|
|
101258
101082
|
var targets = importedFileNames.map(function (f) { return ts.getNormalizedAbsolutePath(f, cwd); });
|
|
101259
101083
|
var shouldFilterIgnoredPaths = !ts.every(targets, ts.containsIgnoredPath);
|
|
101260
101084
|
if (!preferSymlinks) {
|
|
101261
|
-
var
|
|
101262
|
-
if (
|
|
101263
|
-
return
|
|
101085
|
+
var result_15 = ts.forEach(targets, function (p) { return !(shouldFilterIgnoredPaths && ts.containsIgnoredPath(p)) && cb(p, referenceRedirect === p); });
|
|
101086
|
+
if (result_15)
|
|
101087
|
+
return result_15;
|
|
101264
101088
|
}
|
|
101265
101089
|
var symlinkedDirectories = (_a = host.getSymlinkCache) === null || _a === void 0 ? void 0 : _a.call(host).getSymlinkedDirectoriesByRealpath();
|
|
101266
101090
|
var fullImportedFileName = ts.getNormalizedAbsolutePath(importedFileName, cwd);
|
|
@@ -101279,10 +101103,10 @@ var ts;
|
|
|
101279
101103
|
for (var _i = 0, symlinkDirectories_1 = symlinkDirectories; _i < symlinkDirectories_1.length; _i++) {
|
|
101280
101104
|
var symlinkDirectory = symlinkDirectories_1[_i];
|
|
101281
101105
|
var option = ts.resolvePath(symlinkDirectory, relative);
|
|
101282
|
-
var
|
|
101106
|
+
var result_16 = cb(option, target === referenceRedirect);
|
|
101283
101107
|
shouldFilterIgnoredPaths = true;
|
|
101284
|
-
if (
|
|
101285
|
-
return
|
|
101108
|
+
if (result_16)
|
|
101109
|
+
return result_16;
|
|
101286
101110
|
}
|
|
101287
101111
|
});
|
|
101288
101112
|
});
|
|
@@ -102115,7 +101939,6 @@ var ts;
|
|
|
102115
101939
|
readDirectory: ts.maybeBind(host, host.readDirectory),
|
|
102116
101940
|
disableUseFileVersionAsSignature: host.disableUseFileVersionAsSignature,
|
|
102117
101941
|
storeFilesChangingSignatureDuringEmit: host.storeFilesChangingSignatureDuringEmit,
|
|
102118
|
-
now: ts.maybeBind(host, host.now),
|
|
102119
101942
|
};
|
|
102120
101943
|
function writeFile(fileName, text, writeByteOrderMark, onError) {
|
|
102121
101944
|
try {
|
|
@@ -102170,7 +101993,6 @@ var ts;
|
|
|
102170
101993
|
createProgram: createProgram || ts.createEmitAndSemanticDiagnosticsBuilderProgram,
|
|
102171
101994
|
disableUseFileVersionAsSignature: system.disableUseFileVersionAsSignature,
|
|
102172
101995
|
storeFilesChangingSignatureDuringEmit: system.storeFilesChangingSignatureDuringEmit,
|
|
102173
|
-
now: ts.maybeBind(system, system.now),
|
|
102174
101996
|
};
|
|
102175
101997
|
}
|
|
102176
101998
|
ts.createProgramHost = createProgramHost;
|
|
@@ -102226,26 +102048,20 @@ var ts;
|
|
|
102226
102048
|
var ts;
|
|
102227
102049
|
(function (ts) {
|
|
102228
102050
|
function readBuilderProgram(compilerOptions, host) {
|
|
102051
|
+
if (ts.outFile(compilerOptions))
|
|
102052
|
+
return undefined;
|
|
102229
102053
|
var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(compilerOptions);
|
|
102230
102054
|
if (!buildInfoPath)
|
|
102231
102055
|
return undefined;
|
|
102232
|
-
var
|
|
102233
|
-
if (
|
|
102234
|
-
|
|
102235
|
-
|
|
102236
|
-
return undefined;
|
|
102237
|
-
}
|
|
102238
|
-
else {
|
|
102239
|
-
var content = host.readFile(buildInfoPath);
|
|
102240
|
-
if (!content)
|
|
102241
|
-
return undefined;
|
|
102242
|
-
buildInfo = ts.getBuildInfo(content);
|
|
102243
|
-
}
|
|
102056
|
+
var content = host.readFile(buildInfoPath);
|
|
102057
|
+
if (!content)
|
|
102058
|
+
return undefined;
|
|
102059
|
+
var buildInfo = ts.getBuildInfo(content);
|
|
102244
102060
|
if (buildInfo.version !== ts.version)
|
|
102245
102061
|
return undefined;
|
|
102246
102062
|
if (!buildInfo.program)
|
|
102247
102063
|
return undefined;
|
|
102248
|
-
return ts.
|
|
102064
|
+
return ts.createBuildProgramUsingProgramBuildInfo(buildInfo.program, buildInfoPath, host);
|
|
102249
102065
|
}
|
|
102250
102066
|
ts.readBuilderProgram = readBuilderProgram;
|
|
102251
102067
|
function createIncrementalCompilerHost(options, system) {
|
|
@@ -102254,7 +102070,6 @@ var ts;
|
|
|
102254
102070
|
host.createHash = ts.maybeBind(system, system.createHash);
|
|
102255
102071
|
host.disableUseFileVersionAsSignature = system.disableUseFileVersionAsSignature;
|
|
102256
102072
|
host.storeFilesChangingSignatureDuringEmit = system.storeFilesChangingSignatureDuringEmit;
|
|
102257
|
-
host.now = ts.maybeBind(system, system.now);
|
|
102258
102073
|
ts.setGetSourceFileAsHashVersioned(host, system);
|
|
102259
102074
|
ts.changeCompilerHostLikeToUseCache(host, function (fileName) { return ts.toPath(fileName, host.getCurrentDirectory(), host.getCanonicalFileName); });
|
|
102260
102075
|
return host;
|
|
@@ -102918,14 +102733,11 @@ var ts;
|
|
|
102918
102733
|
UpToDateStatusType[UpToDateStatusType["OutputMissing"] = 4] = "OutputMissing";
|
|
102919
102734
|
UpToDateStatusType[UpToDateStatusType["OutOfDateWithSelf"] = 5] = "OutOfDateWithSelf";
|
|
102920
102735
|
UpToDateStatusType[UpToDateStatusType["OutOfDateWithUpstream"] = 6] = "OutOfDateWithUpstream";
|
|
102921
|
-
UpToDateStatusType[UpToDateStatusType["
|
|
102922
|
-
UpToDateStatusType[UpToDateStatusType["
|
|
102923
|
-
UpToDateStatusType[UpToDateStatusType["
|
|
102924
|
-
UpToDateStatusType[UpToDateStatusType["
|
|
102925
|
-
UpToDateStatusType[UpToDateStatusType["
|
|
102926
|
-
UpToDateStatusType[UpToDateStatusType["UpToDateWithInputFileText"] = 12] = "UpToDateWithInputFileText";
|
|
102927
|
-
UpToDateStatusType[UpToDateStatusType["ContainerOnly"] = 13] = "ContainerOnly";
|
|
102928
|
-
UpToDateStatusType[UpToDateStatusType["ForceBuild"] = 14] = "ForceBuild";
|
|
102736
|
+
UpToDateStatusType[UpToDateStatusType["UpstreamOutOfDate"] = 7] = "UpstreamOutOfDate";
|
|
102737
|
+
UpToDateStatusType[UpToDateStatusType["UpstreamBlocked"] = 8] = "UpstreamBlocked";
|
|
102738
|
+
UpToDateStatusType[UpToDateStatusType["ComputingUpstream"] = 9] = "ComputingUpstream";
|
|
102739
|
+
UpToDateStatusType[UpToDateStatusType["TsVersionOutputOfDate"] = 10] = "TsVersionOutputOfDate";
|
|
102740
|
+
UpToDateStatusType[UpToDateStatusType["ContainerOnly"] = 11] = "ContainerOnly";
|
|
102929
102741
|
})(UpToDateStatusType = ts.UpToDateStatusType || (ts.UpToDateStatusType = {}));
|
|
102930
102742
|
function resolveConfigFileProjectName(project) {
|
|
102931
102743
|
if (ts.fileExtensionIs(project, ".json")) {
|
|
@@ -102963,10 +102775,9 @@ var ts;
|
|
|
102963
102775
|
function getOrCreateValueMapFromConfigFileMap(configFileMap, resolved) {
|
|
102964
102776
|
return getOrCreateValueFromConfigFileMap(configFileMap, resolved, function () { return new ts.Map(); });
|
|
102965
102777
|
}
|
|
102966
|
-
function
|
|
102967
|
-
return
|
|
102778
|
+
function newer(date1, date2) {
|
|
102779
|
+
return date2 > date1 ? date2 : date1;
|
|
102968
102780
|
}
|
|
102969
|
-
ts.getCurrentTime = getCurrentTime;
|
|
102970
102781
|
function isCircularBuildOrder(buildOrder) {
|
|
102971
102782
|
return !!buildOrder && !!buildOrder.buildOrder;
|
|
102972
102783
|
}
|
|
@@ -103052,7 +102863,6 @@ var ts;
|
|
|
103052
102863
|
return ts.loadWithTypeDirectiveCache(ts.Debug.checkEachDefined(typeReferenceDirectiveNames), containingFile, redirectedReference, containingFileMode, loader_4);
|
|
103053
102864
|
};
|
|
103054
102865
|
}
|
|
103055
|
-
compilerHost.getBuildInfo = function (fileName, configFilePath) { return getBuildInfo(state, fileName, toResolvedConfigFilePath(state, configFilePath), undefined); };
|
|
103056
102866
|
var _a = ts.createWatchFactory(hostWithWatch, options), watchFile = _a.watchFile, watchDirectory = _a.watchDirectory, writeLog = _a.writeLog;
|
|
103057
102867
|
var state = {
|
|
103058
102868
|
host: host,
|
|
@@ -103068,9 +102878,8 @@ var ts;
|
|
|
103068
102878
|
resolvedConfigFilePaths: new ts.Map(),
|
|
103069
102879
|
configFileCache: new ts.Map(),
|
|
103070
102880
|
projectStatus: new ts.Map(),
|
|
102881
|
+
buildInfoChecked: new ts.Map(),
|
|
103071
102882
|
extendedConfigCache: new ts.Map(),
|
|
103072
|
-
buildInfoCache: new ts.Map(),
|
|
103073
|
-
outputTimeStamps: new ts.Map(),
|
|
103074
102883
|
builderPrograms: new ts.Map(),
|
|
103075
102884
|
diagnostics: new ts.Map(),
|
|
103076
102885
|
projectPendingBuild: new ts.Map(),
|
|
@@ -103091,7 +102900,6 @@ var ts;
|
|
|
103091
102900
|
allWatchedConfigFiles: new ts.Map(),
|
|
103092
102901
|
allWatchedExtendedConfigFiles: new ts.Map(),
|
|
103093
102902
|
allWatchedPackageJsonFiles: new ts.Map(),
|
|
103094
|
-
filesWatched: new ts.Map(),
|
|
103095
102903
|
lastCachedPackageJsonLookups: new ts.Map(),
|
|
103096
102904
|
timerToBuildInvalidatedProject: undefined,
|
|
103097
102905
|
reportFileChangeDetected: false,
|
|
@@ -103197,12 +103005,11 @@ var ts;
|
|
|
103197
103005
|
var noopOnDelete = { onDeleteValue: ts.noop };
|
|
103198
103006
|
ts.mutateMapSkippingNewValues(state.configFileCache, currentProjects, noopOnDelete);
|
|
103199
103007
|
ts.mutateMapSkippingNewValues(state.projectStatus, currentProjects, noopOnDelete);
|
|
103008
|
+
ts.mutateMapSkippingNewValues(state.buildInfoChecked, currentProjects, noopOnDelete);
|
|
103200
103009
|
ts.mutateMapSkippingNewValues(state.builderPrograms, currentProjects, noopOnDelete);
|
|
103201
103010
|
ts.mutateMapSkippingNewValues(state.diagnostics, currentProjects, noopOnDelete);
|
|
103202
103011
|
ts.mutateMapSkippingNewValues(state.projectPendingBuild, currentProjects, noopOnDelete);
|
|
103203
103012
|
ts.mutateMapSkippingNewValues(state.projectErrorsReported, currentProjects, noopOnDelete);
|
|
103204
|
-
ts.mutateMapSkippingNewValues(state.buildInfoCache, currentProjects, noopOnDelete);
|
|
103205
|
-
ts.mutateMapSkippingNewValues(state.outputTimeStamps, currentProjects, noopOnDelete);
|
|
103206
103013
|
if (state.watch) {
|
|
103207
103014
|
ts.mutateMapSkippingNewValues(state.allWatchedConfigFiles, currentProjects, { onDeleteValue: ts.closeFileWatcher });
|
|
103208
103015
|
state.allWatchedExtendedConfigFiles.forEach(function (watcher) {
|
|
@@ -103494,16 +103301,16 @@ var ts;
|
|
|
103494
103301
|
}
|
|
103495
103302
|
function emit(writeFileCallback, cancellationToken, customTransformers) {
|
|
103496
103303
|
var _a;
|
|
103497
|
-
var _b, _c
|
|
103304
|
+
var _b, _c;
|
|
103498
103305
|
ts.Debug.assertIsDefined(program);
|
|
103499
103306
|
ts.Debug.assert(step === BuildStep.Emit);
|
|
103500
|
-
program.
|
|
103307
|
+
program.backupState();
|
|
103501
103308
|
var declDiagnostics;
|
|
103502
103309
|
var reportDeclarationDiagnostics = function (d) { return (declDiagnostics || (declDiagnostics = [])).push(d); };
|
|
103503
103310
|
var outputFiles = [];
|
|
103504
|
-
var emitResult = ts.emitFilesAndReportErrors(program, reportDeclarationDiagnostics, undefined, undefined, function (name, text, writeByteOrderMark
|
|
103311
|
+
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;
|
|
103505
103312
|
if (declDiagnostics) {
|
|
103506
|
-
program.
|
|
103313
|
+
program.restoreState();
|
|
103507
103314
|
(_a = buildErrors(state, projectPath, program, config, declDiagnostics, BuildResultFlags.DeclarationEmitErrors, "Declaration file"), buildResult = _a.buildResult, step = _a.step);
|
|
103508
103315
|
return {
|
|
103509
103316
|
emitSkipped: true,
|
|
@@ -103512,46 +103319,38 @@ var ts;
|
|
|
103512
103319
|
}
|
|
103513
103320
|
var host = state.host, compilerHost = state.compilerHost;
|
|
103514
103321
|
var resultFlags = BuildResultFlags.DeclarationOutputUnchanged;
|
|
103515
|
-
var
|
|
103322
|
+
var newestDeclarationFileContentChangedTime = minimumDate;
|
|
103323
|
+
var anyDtsChanged = false;
|
|
103516
103324
|
var emitterDiagnostics = ts.createDiagnosticCollection();
|
|
103517
103325
|
var emittedOutputs = new ts.Map();
|
|
103518
|
-
var options = program.getCompilerOptions();
|
|
103519
|
-
var isIncremental = ts.isIncrementalCompilation(options);
|
|
103520
|
-
var outputTimeStampMap;
|
|
103521
|
-
var now;
|
|
103522
103326
|
ts.solutionPerformance.mark("beforeOutputFilesWrite");
|
|
103523
103327
|
outputFiles.forEach(function (_a) {
|
|
103524
|
-
var
|
|
103525
|
-
var
|
|
103526
|
-
|
|
103527
|
-
|
|
103528
|
-
|
|
103529
|
-
|
|
103530
|
-
|
|
103328
|
+
var name = _a.name, text = _a.text, writeByteOrderMark = _a.writeByteOrderMark;
|
|
103329
|
+
var priorChangeTime;
|
|
103330
|
+
if (!anyDtsChanged && ts.isDeclarationFileName(name)) {
|
|
103331
|
+
if (host.fileExists(name) && state.readFileWithCache(name) === text) {
|
|
103332
|
+
priorChangeTime = host.getModifiedTime(name);
|
|
103333
|
+
}
|
|
103334
|
+
else {
|
|
103531
103335
|
resultFlags &= ~BuildResultFlags.DeclarationOutputUnchanged;
|
|
103336
|
+
anyDtsChanged = true;
|
|
103532
103337
|
}
|
|
103533
103338
|
}
|
|
103339
|
+
emittedOutputs.set(toPath(state, name), name);
|
|
103534
103340
|
ts.writeFile(writeFileCallback ? { writeFile: writeFileCallback } : compilerHost, emitterDiagnostics, name, text, writeByteOrderMark);
|
|
103535
|
-
if (
|
|
103536
|
-
|
|
103341
|
+
if (priorChangeTime !== undefined) {
|
|
103342
|
+
newestDeclarationFileContentChangedTime = newer(priorChangeTime, newestDeclarationFileContentChangedTime);
|
|
103537
103343
|
}
|
|
103538
103344
|
});
|
|
103539
103345
|
ts.solutionPerformance.mark("afterOutputFilesWrite");
|
|
103540
103346
|
ts.solutionPerformance.measure("OutputFilesWrite", "beforeOutputFilesWrite", "afterOutputFilesWrite");
|
|
103541
|
-
finishEmit(emitterDiagnostics, emittedOutputs, outputFiles.length ? outputFiles[0].name : ts.getFirstProjectOutput(config, !host.useCaseSensitiveFileNames()), resultFlags);
|
|
103347
|
+
finishEmit(emitterDiagnostics, emittedOutputs, newestDeclarationFileContentChangedTime, anyDtsChanged, outputFiles.length ? outputFiles[0].name : ts.getFirstProjectOutput(config, !host.useCaseSensitiveFileNames()), resultFlags);
|
|
103542
103348
|
return emitResult;
|
|
103543
103349
|
}
|
|
103544
103350
|
function emitBuildInfo(writeFileCallback, cancellationToken) {
|
|
103545
103351
|
ts.Debug.assertIsDefined(program);
|
|
103546
103352
|
ts.Debug.assert(step === BuildStep.EmitBuildInfo);
|
|
103547
|
-
var emitResult = program.emitBuildInfo(
|
|
103548
|
-
if (data === null || data === void 0 ? void 0 : data.buildInfo)
|
|
103549
|
-
setBuildInfo(state, data.buildInfo, projectPath, program.getCompilerOptions());
|
|
103550
|
-
if (writeFileCallback)
|
|
103551
|
-
writeFileCallback(name, text, writeByteOrderMark, onError, sourceFiles, data);
|
|
103552
|
-
else
|
|
103553
|
-
state.compilerHost.writeFile(name, text, writeByteOrderMark, onError, sourceFiles, data);
|
|
103554
|
-
}, cancellationToken);
|
|
103353
|
+
var emitResult = program.emitBuildInfo(writeFileCallback, cancellationToken);
|
|
103555
103354
|
if (emitResult.diagnostics.length) {
|
|
103556
103355
|
reportErrors(state, emitResult.diagnostics);
|
|
103557
103356
|
state.diagnostics.set(projectPath, __spreadArray(__spreadArray([], state.diagnostics.get(projectPath), true), emitResult.diagnostics, true));
|
|
@@ -103564,7 +103363,7 @@ var ts;
|
|
|
103564
103363
|
step = BuildStep.QueueReferencingProjects;
|
|
103565
103364
|
return emitResult;
|
|
103566
103365
|
}
|
|
103567
|
-
function finishEmit(emitterDiagnostics, emittedOutputs, oldestOutputFileName, resultFlags) {
|
|
103366
|
+
function finishEmit(emitterDiagnostics, emittedOutputs, priorNewestUpdateTime, newestDeclarationFileContentChangedTimeIsMaximumDate, oldestOutputFileName, resultFlags) {
|
|
103568
103367
|
var _a;
|
|
103569
103368
|
var emitDiagnostics = emitterDiagnostics.getDiagnostics();
|
|
103570
103369
|
if (emitDiagnostics.length) {
|
|
@@ -103574,11 +103373,13 @@ var ts;
|
|
|
103574
103373
|
if (state.write) {
|
|
103575
103374
|
emittedOutputs.forEach(function (name) { return listEmittedFile(state, config, name); });
|
|
103576
103375
|
}
|
|
103577
|
-
updateOutputTimestampsWorker(state, config,
|
|
103376
|
+
var newestDeclarationFileContentChangedTime = updateOutputTimestampsWorker(state, config, priorNewestUpdateTime, ts.Diagnostics.Updating_unchanged_output_timestamps_of_project_0, emittedOutputs);
|
|
103578
103377
|
state.diagnostics.delete(projectPath);
|
|
103579
103378
|
state.projectStatus.set(projectPath, {
|
|
103580
103379
|
type: ts.UpToDateStatusType.UpToDate,
|
|
103581
|
-
newestDeclarationFileContentChangedTime:
|
|
103380
|
+
newestDeclarationFileContentChangedTime: newestDeclarationFileContentChangedTimeIsMaximumDate ?
|
|
103381
|
+
maximumDate :
|
|
103382
|
+
newestDeclarationFileContentChangedTime,
|
|
103582
103383
|
oldestOutputFileName: oldestOutputFileName
|
|
103583
103384
|
});
|
|
103584
103385
|
afterProgramDone(state, program, config);
|
|
@@ -103611,21 +103412,12 @@ var ts;
|
|
|
103611
103412
|
ts.Debug.assert(!!outputFiles.length);
|
|
103612
103413
|
var emitterDiagnostics = ts.createDiagnosticCollection();
|
|
103613
103414
|
var emittedOutputs = new ts.Map();
|
|
103614
|
-
var resultFlags = BuildResultFlags.DeclarationOutputUnchanged;
|
|
103615
|
-
var existingBuildInfo = state.buildInfoCache.get(projectPath).buildInfo;
|
|
103616
103415
|
outputFiles.forEach(function (_a) {
|
|
103617
|
-
var
|
|
103618
|
-
var name = _a.name, text = _a.text, writeByteOrderMark = _a.writeByteOrderMark, buildInfo = _a.buildInfo;
|
|
103416
|
+
var name = _a.name, text = _a.text, writeByteOrderMark = _a.writeByteOrderMark;
|
|
103619
103417
|
emittedOutputs.set(toPath(state, name), name);
|
|
103620
|
-
if (buildInfo) {
|
|
103621
|
-
setBuildInfo(state, buildInfo, projectPath, config.options);
|
|
103622
|
-
if (((_b = buildInfo.program) === null || _b === void 0 ? void 0 : _b.dtsChangeTime) !== ((_c = existingBuildInfo.program) === null || _c === void 0 ? void 0 : _c.dtsChangeTime)) {
|
|
103623
|
-
resultFlags &= ~BuildResultFlags.DeclarationOutputUnchanged;
|
|
103624
|
-
}
|
|
103625
|
-
}
|
|
103626
103418
|
ts.writeFile(writeFileCallback ? { writeFile: writeFileCallback } : compilerHost, emitterDiagnostics, name, text, writeByteOrderMark);
|
|
103627
103419
|
});
|
|
103628
|
-
var emitDiagnostics = finishEmit(emitterDiagnostics, emittedOutputs, outputFiles[0].name,
|
|
103420
|
+
var emitDiagnostics = finishEmit(emitterDiagnostics, emittedOutputs, minimumDate, false, outputFiles[0].name, BuildResultFlags.DeclarationOutputUnchanged);
|
|
103629
103421
|
return { emitSkipped: false, diagnostics: emitDiagnostics };
|
|
103630
103422
|
}
|
|
103631
103423
|
function executeSteps(till, cancellationToken, writeFile, customTransformers) {
|
|
@@ -103727,7 +103519,7 @@ var ts;
|
|
|
103727
103519
|
}
|
|
103728
103520
|
continue;
|
|
103729
103521
|
}
|
|
103730
|
-
if (status.type === ts.UpToDateStatusType.UpToDateWithUpstreamTypes
|
|
103522
|
+
if (status.type === ts.UpToDateStatusType.UpToDateWithUpstreamTypes) {
|
|
103731
103523
|
reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config));
|
|
103732
103524
|
return {
|
|
103733
103525
|
kind: InvalidatedProjectKind.UpdateOutputFileStamps,
|
|
@@ -103812,7 +103604,7 @@ var ts;
|
|
|
103812
103604
|
state.projectCompilerOptions = state.baseCompilerOptions;
|
|
103813
103605
|
}
|
|
103814
103606
|
function buildErrors(state, resolvedPath, program, config, diagnostics, buildResult, errorType) {
|
|
103815
|
-
var canEmitBuildInfo = program && !ts.outFile(program.getCompilerOptions());
|
|
103607
|
+
var canEmitBuildInfo = !(buildResult & BuildResultFlags.SyntaxErrors) && program && !ts.outFile(program.getCompilerOptions());
|
|
103816
103608
|
reportAndStoreErrors(state, resolvedPath, diagnostics);
|
|
103817
103609
|
state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.Unbuildable, reason: errorType + " errors" });
|
|
103818
103610
|
if (canEmitBuildInfo)
|
|
@@ -103820,100 +103612,8 @@ var ts;
|
|
|
103820
103612
|
afterProgramDone(state, program, config);
|
|
103821
103613
|
return { buildResult: buildResult, step: BuildStep.QueueReferencingProjects };
|
|
103822
103614
|
}
|
|
103823
|
-
function isFileWatcherWithModifiedTime(value) {
|
|
103824
|
-
return !!value.watcher;
|
|
103825
|
-
}
|
|
103826
|
-
function getModifiedTime(state, fileName) {
|
|
103827
|
-
var path = toPath(state, fileName);
|
|
103828
|
-
var existing = state.filesWatched.get(path);
|
|
103829
|
-
if (state.watch && !!existing) {
|
|
103830
|
-
if (!isFileWatcherWithModifiedTime(existing))
|
|
103831
|
-
return existing;
|
|
103832
|
-
if (existing.modifiedTime)
|
|
103833
|
-
return existing.modifiedTime;
|
|
103834
|
-
}
|
|
103835
|
-
var result = ts.getModifiedTime(state.host, fileName);
|
|
103836
|
-
if (state.watch) {
|
|
103837
|
-
if (existing)
|
|
103838
|
-
existing.modifiedTime = result;
|
|
103839
|
-
else
|
|
103840
|
-
state.filesWatched.set(path, result);
|
|
103841
|
-
}
|
|
103842
|
-
return result;
|
|
103843
|
-
}
|
|
103844
|
-
function watchFile(state, file, callback, pollingInterval, options, watchType, project) {
|
|
103845
|
-
var path = toPath(state, file);
|
|
103846
|
-
var existing = state.filesWatched.get(path);
|
|
103847
|
-
if (existing && isFileWatcherWithModifiedTime(existing)) {
|
|
103848
|
-
existing.callbacks.push(callback);
|
|
103849
|
-
}
|
|
103850
|
-
else {
|
|
103851
|
-
var watcher = state.watchFile(file, function (fileName, eventKind, modifiedTime) {
|
|
103852
|
-
var existing = ts.Debug.checkDefined(state.filesWatched.get(path));
|
|
103853
|
-
ts.Debug.assert(isFileWatcherWithModifiedTime(existing));
|
|
103854
|
-
existing.modifiedTime = modifiedTime;
|
|
103855
|
-
existing.callbacks.forEach(function (cb) { return cb(fileName, eventKind, modifiedTime); });
|
|
103856
|
-
}, pollingInterval, options, watchType, project);
|
|
103857
|
-
state.filesWatched.set(path, { callbacks: [callback], watcher: watcher, modifiedTime: existing });
|
|
103858
|
-
}
|
|
103859
|
-
return {
|
|
103860
|
-
close: function () {
|
|
103861
|
-
var existing = ts.Debug.checkDefined(state.filesWatched.get(path));
|
|
103862
|
-
ts.Debug.assert(isFileWatcherWithModifiedTime(existing));
|
|
103863
|
-
if (existing.callbacks.length === 1) {
|
|
103864
|
-
state.filesWatched.delete(path);
|
|
103865
|
-
ts.closeFileWatcherOf(existing);
|
|
103866
|
-
}
|
|
103867
|
-
else {
|
|
103868
|
-
ts.unorderedRemoveItem(existing.callbacks, callback);
|
|
103869
|
-
}
|
|
103870
|
-
}
|
|
103871
|
-
};
|
|
103872
|
-
}
|
|
103873
|
-
function getOutputTimeStampMap(state, resolvedConfigFilePath) {
|
|
103874
|
-
if (!state.watch)
|
|
103875
|
-
return undefined;
|
|
103876
|
-
var result = state.outputTimeStamps.get(resolvedConfigFilePath);
|
|
103877
|
-
if (!result)
|
|
103878
|
-
state.outputTimeStamps.set(resolvedConfigFilePath, result = new ts.Map());
|
|
103879
|
-
return result;
|
|
103880
|
-
}
|
|
103881
|
-
function setBuildInfo(state, buildInfo, resolvedConfigPath, options) {
|
|
103882
|
-
var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(options);
|
|
103883
|
-
var existing = getBuildInfoCacheEntry(state, buildInfoPath, resolvedConfigPath);
|
|
103884
|
-
if (existing) {
|
|
103885
|
-
existing.buildInfo = buildInfo;
|
|
103886
|
-
existing.modifiedTime = getCurrentTime(state.host);
|
|
103887
|
-
}
|
|
103888
|
-
else {
|
|
103889
|
-
state.buildInfoCache.set(resolvedConfigPath, { path: toPath(state, buildInfoPath), buildInfo: buildInfo, modifiedTime: getCurrentTime(state.host) });
|
|
103890
|
-
}
|
|
103891
|
-
}
|
|
103892
|
-
function getBuildInfoCacheEntry(state, buildInfoPath, resolvedConfigPath) {
|
|
103893
|
-
var path = toPath(state, buildInfoPath);
|
|
103894
|
-
var existing = state.buildInfoCache.get(resolvedConfigPath);
|
|
103895
|
-
return (existing === null || existing === void 0 ? void 0 : existing.path) === path ? existing : undefined;
|
|
103896
|
-
}
|
|
103897
|
-
function getBuildInfo(state, buildInfoPath, resolvedConfigPath, modifiedTime) {
|
|
103898
|
-
var path = toPath(state, buildInfoPath);
|
|
103899
|
-
var existing = state.buildInfoCache.get(resolvedConfigPath);
|
|
103900
|
-
if (existing !== undefined && existing.path === path) {
|
|
103901
|
-
return existing.buildInfo || undefined;
|
|
103902
|
-
}
|
|
103903
|
-
ts.solutionPerformance.mark("beforeGetBuildInfo");
|
|
103904
|
-
ts.solutionPerformance.mark("beforeBuildInfoRead");
|
|
103905
|
-
var value = state.readFileWithCache(buildInfoPath);
|
|
103906
|
-
ts.solutionPerformance.mark("afterBuildInfoRead");
|
|
103907
|
-
ts.solutionPerformance.measure("BuildInfoRead", "beforeBuildInfoRead", "afterBuildInfoRead");
|
|
103908
|
-
var buildInfo = value ? ts.getBuildInfo(value) : undefined;
|
|
103909
|
-
ts.Debug.assert(modifiedTime || !buildInfo);
|
|
103910
|
-
state.buildInfoCache.set(resolvedConfigPath, { path: path, buildInfo: buildInfo || false, modifiedTime: modifiedTime || ts.missingFileModifiedTime });
|
|
103911
|
-
ts.solutionPerformance.mark("afterGetBuildInfo");
|
|
103912
|
-
ts.solutionPerformance.measure("GetBuildInfo", "beforeGetBuildInfo", "afterGetBuildInfo");
|
|
103913
|
-
return buildInfo;
|
|
103914
|
-
}
|
|
103915
103615
|
function checkConfigFileUpToDateStatus(state, configFile, oldestOutputFileTime, oldestOutputFileName) {
|
|
103916
|
-
var tsconfigTime = getModifiedTime(state, configFile);
|
|
103616
|
+
var tsconfigTime = ts.getModifiedTime(state.host, configFile);
|
|
103917
103617
|
if (oldestOutputFileTime < tsconfigTime) {
|
|
103918
103618
|
return {
|
|
103919
103619
|
type: ts.UpToDateStatusType.OutOfDateWithSelf,
|
|
@@ -103923,22 +103623,76 @@ var ts;
|
|
|
103923
103623
|
}
|
|
103924
103624
|
}
|
|
103925
103625
|
function getUpToDateStatusWorker(state, project, resolvedPath) {
|
|
103926
|
-
var
|
|
103626
|
+
var force = !!state.options.force;
|
|
103627
|
+
var newestInputFileName = undefined;
|
|
103628
|
+
var newestInputFileTime = minimumDate;
|
|
103629
|
+
var host = state.host;
|
|
103630
|
+
for (var _i = 0, _a = project.fileNames; _i < _a.length; _i++) {
|
|
103631
|
+
var inputFile = _a[_i];
|
|
103632
|
+
if (!host.fileExists(inputFile)) {
|
|
103633
|
+
return {
|
|
103634
|
+
type: ts.UpToDateStatusType.Unbuildable,
|
|
103635
|
+
reason: inputFile + " does not exist"
|
|
103636
|
+
};
|
|
103637
|
+
}
|
|
103638
|
+
if (!force) {
|
|
103639
|
+
var inputTime = ts.getModifiedTime(host, inputFile);
|
|
103640
|
+
if (inputTime > newestInputFileTime) {
|
|
103641
|
+
newestInputFileName = inputFile;
|
|
103642
|
+
newestInputFileTime = inputTime;
|
|
103643
|
+
}
|
|
103644
|
+
}
|
|
103645
|
+
}
|
|
103927
103646
|
if (!project.fileNames.length && !ts.canJsonReportNoInputFiles(project.raw)) {
|
|
103928
103647
|
return {
|
|
103929
103648
|
type: ts.UpToDateStatusType.ContainerOnly
|
|
103930
103649
|
};
|
|
103931
103650
|
}
|
|
103932
|
-
var
|
|
103933
|
-
var
|
|
103651
|
+
var outputs = ts.getAllProjectOutputs(project, !host.useCaseSensitiveFileNames());
|
|
103652
|
+
var oldestOutputFileName = "(none)";
|
|
103653
|
+
var oldestOutputFileTime = maximumDate;
|
|
103654
|
+
var newestOutputFileName = "(none)";
|
|
103655
|
+
var newestOutputFileTime = minimumDate;
|
|
103656
|
+
var missingOutputFileName;
|
|
103657
|
+
var newestDeclarationFileContentChangedTime = minimumDate;
|
|
103658
|
+
var isOutOfDateWithInputs = false;
|
|
103659
|
+
if (!force) {
|
|
103660
|
+
for (var _b = 0, outputs_1 = outputs; _b < outputs_1.length; _b++) {
|
|
103661
|
+
var output = outputs_1[_b];
|
|
103662
|
+
if (!host.fileExists(output)) {
|
|
103663
|
+
missingOutputFileName = output;
|
|
103664
|
+
break;
|
|
103665
|
+
}
|
|
103666
|
+
var outputTime = ts.getModifiedTime(host, output);
|
|
103667
|
+
if (outputTime < oldestOutputFileTime) {
|
|
103668
|
+
oldestOutputFileTime = outputTime;
|
|
103669
|
+
oldestOutputFileName = output;
|
|
103670
|
+
}
|
|
103671
|
+
if (outputTime < newestInputFileTime) {
|
|
103672
|
+
isOutOfDateWithInputs = true;
|
|
103673
|
+
break;
|
|
103674
|
+
}
|
|
103675
|
+
if (outputTime > newestOutputFileTime) {
|
|
103676
|
+
newestOutputFileTime = outputTime;
|
|
103677
|
+
newestOutputFileName = output;
|
|
103678
|
+
}
|
|
103679
|
+
if (ts.isDeclarationFileName(output)) {
|
|
103680
|
+
var outputModifiedTime = ts.getModifiedTime(host, output);
|
|
103681
|
+
newestDeclarationFileContentChangedTime = newer(newestDeclarationFileContentChangedTime, outputModifiedTime);
|
|
103682
|
+
}
|
|
103683
|
+
}
|
|
103684
|
+
}
|
|
103685
|
+
var pseudoUpToDate = false;
|
|
103686
|
+
var usesPrepend = false;
|
|
103687
|
+
var upstreamChangedProject;
|
|
103934
103688
|
if (project.projectReferences) {
|
|
103935
103689
|
state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.ComputingUpstream });
|
|
103936
|
-
for (var
|
|
103937
|
-
var ref = _d[
|
|
103690
|
+
for (var _c = 0, _d = project.projectReferences; _c < _d.length; _c++) {
|
|
103691
|
+
var ref = _d[_c];
|
|
103692
|
+
usesPrepend = usesPrepend || !!(ref.prepend);
|
|
103938
103693
|
var resolvedRef = ts.resolveProjectReferencePath(ref);
|
|
103939
103694
|
var resolvedRefPath = toResolvedConfigFilePath(state, resolvedRef);
|
|
103940
|
-
var
|
|
103941
|
-
var refStatus = getUpToDateStatus(state, resolvedConfig, resolvedRefPath);
|
|
103695
|
+
var refStatus = getUpToDateStatus(state, parseConfigFile(state, resolvedRef, resolvedRefPath), resolvedRefPath);
|
|
103942
103696
|
if (refStatus.type === ts.UpToDateStatusType.ComputingUpstream ||
|
|
103943
103697
|
refStatus.type === ts.UpToDateStatusType.ContainerOnly) {
|
|
103944
103698
|
continue;
|
|
@@ -103957,169 +103711,68 @@ var ts;
|
|
|
103957
103711
|
upstreamProjectName: ref.path
|
|
103958
103712
|
};
|
|
103959
103713
|
}
|
|
103960
|
-
if (!force)
|
|
103961
|
-
|
|
103962
|
-
|
|
103963
|
-
|
|
103964
|
-
|
|
103965
|
-
|
|
103966
|
-
|
|
103967
|
-
|
|
103968
|
-
|
|
103969
|
-
|
|
103970
|
-
var buildInfoTime;
|
|
103971
|
-
var buildInfoProgram;
|
|
103972
|
-
var buildInfoVersionMap;
|
|
103973
|
-
var newestDeclarationFileContentChangedTime;
|
|
103974
|
-
if (buildInfoPath) {
|
|
103975
|
-
var buildInfoCacheEntry_1 = getBuildInfoCacheEntry(state, buildInfoPath, resolvedPath);
|
|
103976
|
-
buildInfoTime = (buildInfoCacheEntry_1 === null || buildInfoCacheEntry_1 === void 0 ? void 0 : buildInfoCacheEntry_1.modifiedTime) || ts.getModifiedTime(host, buildInfoPath);
|
|
103977
|
-
if (buildInfoTime === ts.missingFileModifiedTime) {
|
|
103978
|
-
if (!buildInfoCacheEntry_1) {
|
|
103979
|
-
state.buildInfoCache.set(resolvedPath, {
|
|
103980
|
-
path: toPath(state, buildInfoPath),
|
|
103981
|
-
buildInfo: false,
|
|
103982
|
-
modifiedTime: buildInfoTime
|
|
103983
|
-
});
|
|
103984
|
-
}
|
|
103985
|
-
return {
|
|
103986
|
-
type: ts.UpToDateStatusType.OutputMissing,
|
|
103987
|
-
missingOutputFileName: buildInfoPath
|
|
103988
|
-
};
|
|
103989
|
-
}
|
|
103990
|
-
var buildInfo = ts.Debug.checkDefined(getBuildInfo(state, buildInfoPath, resolvedPath, buildInfoTime));
|
|
103991
|
-
if ((buildInfo.bundle || buildInfo.program) && buildInfo.version !== ts.version) {
|
|
103992
|
-
return {
|
|
103993
|
-
type: ts.UpToDateStatusType.TsVersionOutputOfDate,
|
|
103994
|
-
version: buildInfo.version
|
|
103995
|
-
};
|
|
103996
|
-
}
|
|
103997
|
-
if (buildInfo.program) {
|
|
103998
|
-
if (((_a = buildInfo.program.changeFileSet) === null || _a === void 0 ? void 0 : _a.length) ||
|
|
103999
|
-
(!project.options.noEmit && ((_b = buildInfo.program.affectedFilesPendingEmit) === null || _b === void 0 ? void 0 : _b.length))) {
|
|
103714
|
+
if (!force && !missingOutputFileName) {
|
|
103715
|
+
if (refStatus.newestInputFileTime && refStatus.newestInputFileTime <= oldestOutputFileTime) {
|
|
103716
|
+
continue;
|
|
103717
|
+
}
|
|
103718
|
+
if (refStatus.newestDeclarationFileContentChangedTime && refStatus.newestDeclarationFileContentChangedTime <= oldestOutputFileTime) {
|
|
103719
|
+
pseudoUpToDate = true;
|
|
103720
|
+
upstreamChangedProject = ref.path;
|
|
103721
|
+
continue;
|
|
103722
|
+
}
|
|
103723
|
+
ts.Debug.assert(oldestOutputFileName !== undefined, "Should have an oldest output filename here");
|
|
104000
103724
|
return {
|
|
104001
|
-
type: ts.UpToDateStatusType.
|
|
104002
|
-
|
|
103725
|
+
type: ts.UpToDateStatusType.OutOfDateWithUpstream,
|
|
103726
|
+
outOfDateOutputFileName: oldestOutputFileName,
|
|
103727
|
+
newerProjectName: ref.path
|
|
104003
103728
|
};
|
|
104004
103729
|
}
|
|
104005
|
-
buildInfoProgram = buildInfo.program;
|
|
104006
103730
|
}
|
|
104007
|
-
oldestOutputFileTime = buildInfoTime;
|
|
104008
|
-
oldestOutputFileName = buildInfoPath;
|
|
104009
|
-
newestDeclarationFileContentChangedTime = ((_c = buildInfo.program) === null || _c === void 0 ? void 0 : _c.dtsChangeTime) ? new Date(buildInfo.program.dtsChangeTime) : undefined;
|
|
104010
103731
|
}
|
|
104011
|
-
|
|
104012
|
-
|
|
104013
|
-
|
|
104014
|
-
|
|
104015
|
-
|
|
104016
|
-
var inputTime = getModifiedTime(state, inputFile);
|
|
104017
|
-
if (inputTime === ts.missingFileModifiedTime) {
|
|
104018
|
-
return {
|
|
104019
|
-
type: ts.UpToDateStatusType.Unbuildable,
|
|
104020
|
-
reason: inputFile + " does not exist"
|
|
104021
|
-
};
|
|
104022
|
-
}
|
|
104023
|
-
if (buildInfoTime && buildInfoTime < inputTime) {
|
|
104024
|
-
var version_3 = void 0;
|
|
104025
|
-
var currentVersion = void 0;
|
|
104026
|
-
if (buildInfoProgram) {
|
|
104027
|
-
if (!buildInfoVersionMap)
|
|
104028
|
-
buildInfoVersionMap = ts.getBuildInfoFileVersionMap(buildInfoProgram, buildInfoPath, host);
|
|
104029
|
-
version_3 = buildInfoVersionMap.get(toPath(state, inputFile));
|
|
104030
|
-
var text = version_3 ? state.readFileWithCache(inputFile) : undefined;
|
|
104031
|
-
currentVersion = text && (host.createHash || ts.generateDjb2Hash)(text);
|
|
104032
|
-
if (version_3 && version_3 === currentVersion)
|
|
104033
|
-
pseudoInputUptodate = true;
|
|
104034
|
-
}
|
|
104035
|
-
if (!version_3 || version_3 !== currentVersion) {
|
|
104036
|
-
return {
|
|
104037
|
-
type: ts.UpToDateStatusType.OutOfDateWithSelf,
|
|
104038
|
-
outOfDateOutputFileName: buildInfoPath,
|
|
104039
|
-
newerInputFileName: inputFile
|
|
104040
|
-
};
|
|
104041
|
-
}
|
|
104042
|
-
}
|
|
104043
|
-
if (inputTime > newestInputFileTime) {
|
|
104044
|
-
newestInputFileName = inputFile;
|
|
104045
|
-
newestInputFileTime = inputTime;
|
|
104046
|
-
}
|
|
103732
|
+
if (missingOutputFileName !== undefined) {
|
|
103733
|
+
return {
|
|
103734
|
+
type: ts.UpToDateStatusType.OutputMissing,
|
|
103735
|
+
missingOutputFileName: missingOutputFileName
|
|
103736
|
+
};
|
|
104047
103737
|
}
|
|
104048
|
-
if (
|
|
104049
|
-
|
|
104050
|
-
|
|
104051
|
-
|
|
104052
|
-
|
|
104053
|
-
|
|
104054
|
-
var outputTime = outputTimeStampMap === null || outputTimeStampMap === void 0 ? void 0 : outputTimeStampMap.get(path);
|
|
104055
|
-
if (!outputTime) {
|
|
104056
|
-
outputTime = ts.getModifiedTime(state.host, output);
|
|
104057
|
-
outputTimeStampMap === null || outputTimeStampMap === void 0 ? void 0 : outputTimeStampMap.set(path, outputTime);
|
|
104058
|
-
}
|
|
104059
|
-
if (outputTime === ts.missingFileModifiedTime) {
|
|
104060
|
-
return {
|
|
104061
|
-
type: ts.UpToDateStatusType.OutputMissing,
|
|
104062
|
-
missingOutputFileName: output
|
|
104063
|
-
};
|
|
104064
|
-
}
|
|
104065
|
-
if (outputTime < oldestOutputFileTime) {
|
|
104066
|
-
oldestOutputFileTime = outputTime;
|
|
104067
|
-
oldestOutputFileName = output;
|
|
104068
|
-
}
|
|
104069
|
-
if (outputTime < newestInputFileTime) {
|
|
104070
|
-
return {
|
|
104071
|
-
type: ts.UpToDateStatusType.OutOfDateWithSelf,
|
|
104072
|
-
outOfDateOutputFileName: oldestOutputFileName,
|
|
104073
|
-
newerInputFileName: newestInputFileName
|
|
104074
|
-
};
|
|
104075
|
-
}
|
|
104076
|
-
}
|
|
103738
|
+
if (isOutOfDateWithInputs) {
|
|
103739
|
+
return {
|
|
103740
|
+
type: ts.UpToDateStatusType.OutOfDateWithSelf,
|
|
103741
|
+
outOfDateOutputFileName: oldestOutputFileName,
|
|
103742
|
+
newerInputFileName: newestInputFileName
|
|
103743
|
+
};
|
|
104077
103744
|
}
|
|
104078
|
-
|
|
104079
|
-
|
|
104080
|
-
|
|
104081
|
-
|
|
104082
|
-
|
|
104083
|
-
|
|
104084
|
-
|
|
104085
|
-
|
|
104086
|
-
var
|
|
104087
|
-
|
|
104088
|
-
|
|
104089
|
-
|
|
104090
|
-
|
|
104091
|
-
|
|
103745
|
+
else {
|
|
103746
|
+
var configStatus = checkConfigFileUpToDateStatus(state, project.options.configFilePath, oldestOutputFileTime, oldestOutputFileName);
|
|
103747
|
+
if (configStatus)
|
|
103748
|
+
return configStatus;
|
|
103749
|
+
var extendedConfigStatus = ts.forEach(project.options.configFile.extendedSourceFiles || ts.emptyArray, function (configFile) { return checkConfigFileUpToDateStatus(state, configFile, oldestOutputFileTime, oldestOutputFileName); });
|
|
103750
|
+
if (extendedConfigStatus)
|
|
103751
|
+
return extendedConfigStatus;
|
|
103752
|
+
var dependentPackageFileStatus = ts.forEach(state.lastCachedPackageJsonLookups.get(resolvedPath) || ts.emptyArray, function (_a) {
|
|
103753
|
+
var path = _a[0];
|
|
103754
|
+
return checkConfigFileUpToDateStatus(state, path, oldestOutputFileTime, oldestOutputFileName);
|
|
103755
|
+
});
|
|
103756
|
+
if (dependentPackageFileStatus)
|
|
103757
|
+
return dependentPackageFileStatus;
|
|
103758
|
+
}
|
|
103759
|
+
if (!force && !state.buildInfoChecked.has(resolvedPath)) {
|
|
103760
|
+
state.buildInfoChecked.set(resolvedPath, true);
|
|
103761
|
+
var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(project.options);
|
|
103762
|
+
if (buildInfoPath) {
|
|
103763
|
+
ts.solutionPerformance.mark("beforeBuildInfoRead");
|
|
103764
|
+
var value = state.readFileWithCache(buildInfoPath);
|
|
103765
|
+
ts.solutionPerformance.mark("afterBuildInfoRead");
|
|
103766
|
+
ts.solutionPerformance.measure("BuildInfoRead", "beforeBuildInfoRead", "afterBuildInfoRead");
|
|
103767
|
+
var buildInfo = value && ts.getBuildInfo(value);
|
|
103768
|
+
if (buildInfo && (buildInfo.bundle || buildInfo.program) && buildInfo.version !== ts.version) {
|
|
104092
103769
|
return {
|
|
104093
|
-
type: ts.UpToDateStatusType.
|
|
104094
|
-
|
|
104095
|
-
newerProjectName: ref.path
|
|
103770
|
+
type: ts.UpToDateStatusType.TsVersionOutputOfDate,
|
|
103771
|
+
version: buildInfo.version
|
|
104096
103772
|
};
|
|
104097
103773
|
}
|
|
104098
|
-
if (refStatus.newestDeclarationFileContentChangedTime && refStatus.newestDeclarationFileContentChangedTime <= oldestOutputFileTime) {
|
|
104099
|
-
pseudoUpToDate = true;
|
|
104100
|
-
upstreamChangedProject = ref.path;
|
|
104101
|
-
continue;
|
|
104102
|
-
}
|
|
104103
|
-
ts.Debug.assert(oldestOutputFileName !== undefined, "Should have an oldest output filename here");
|
|
104104
|
-
return {
|
|
104105
|
-
type: ts.UpToDateStatusType.OutOfDateWithUpstream,
|
|
104106
|
-
outOfDateOutputFileName: oldestOutputFileName,
|
|
104107
|
-
newerProjectName: ref.path
|
|
104108
|
-
};
|
|
104109
103774
|
}
|
|
104110
103775
|
}
|
|
104111
|
-
var configStatus = checkConfigFileUpToDateStatus(state, project.options.configFilePath, oldestOutputFileTime, oldestOutputFileName);
|
|
104112
|
-
if (configStatus)
|
|
104113
|
-
return configStatus;
|
|
104114
|
-
var extendedConfigStatus = ts.forEach(project.options.configFile.extendedSourceFiles || ts.emptyArray, function (configFile) { return checkConfigFileUpToDateStatus(state, configFile, oldestOutputFileTime, oldestOutputFileName); });
|
|
104115
|
-
if (extendedConfigStatus)
|
|
104116
|
-
return extendedConfigStatus;
|
|
104117
|
-
var dependentPackageFileStatus = ts.forEach(state.lastCachedPackageJsonLookups.get(resolvedPath) || ts.emptyArray, function (_a) {
|
|
104118
|
-
var path = _a[0];
|
|
104119
|
-
return checkConfigFileUpToDateStatus(state, path, oldestOutputFileTime, oldestOutputFileName);
|
|
104120
|
-
});
|
|
104121
|
-
if (dependentPackageFileStatus)
|
|
104122
|
-
return dependentPackageFileStatus;
|
|
104123
103776
|
if (usesPrepend && pseudoUpToDate) {
|
|
104124
103777
|
return {
|
|
104125
103778
|
type: ts.UpToDateStatusType.OutOfDateWithPrepend,
|
|
@@ -104128,36 +103781,15 @@ var ts;
|
|
|
104128
103781
|
};
|
|
104129
103782
|
}
|
|
104130
103783
|
return {
|
|
104131
|
-
type: pseudoUpToDate ?
|
|
104132
|
-
ts.UpToDateStatusType.UpToDateWithUpstreamTypes :
|
|
104133
|
-
pseudoInputUptodate ?
|
|
104134
|
-
ts.UpToDateStatusType.UpToDateWithInputFileText :
|
|
104135
|
-
ts.UpToDateStatusType.UpToDate,
|
|
103784
|
+
type: pseudoUpToDate ? ts.UpToDateStatusType.UpToDateWithUpstreamTypes : ts.UpToDateStatusType.UpToDate,
|
|
104136
103785
|
newestDeclarationFileContentChangedTime: newestDeclarationFileContentChangedTime,
|
|
104137
103786
|
newestInputFileTime: newestInputFileTime,
|
|
103787
|
+
newestOutputFileTime: newestOutputFileTime,
|
|
104138
103788
|
newestInputFileName: newestInputFileName,
|
|
103789
|
+
newestOutputFileName: newestOutputFileName,
|
|
104139
103790
|
oldestOutputFileName: oldestOutputFileName
|
|
104140
103791
|
};
|
|
104141
103792
|
}
|
|
104142
|
-
function hasSameBuildInfo(state, buildInfoCacheEntry, seenRefs, resolvedConfig, resolvedRefPath) {
|
|
104143
|
-
if (seenRefs.has(resolvedRefPath))
|
|
104144
|
-
return false;
|
|
104145
|
-
seenRefs.add(resolvedRefPath);
|
|
104146
|
-
var refBuildInfo = state.buildInfoCache.get(resolvedRefPath);
|
|
104147
|
-
if (refBuildInfo.path === buildInfoCacheEntry.path)
|
|
104148
|
-
return true;
|
|
104149
|
-
if (resolvedConfig.projectReferences) {
|
|
104150
|
-
for (var _i = 0, _a = resolvedConfig.projectReferences; _i < _a.length; _i++) {
|
|
104151
|
-
var ref = _a[_i];
|
|
104152
|
-
var resolvedRef = ts.resolveProjectReferencePath(ref);
|
|
104153
|
-
var resolvedRefPath_1 = toResolvedConfigFilePath(state, resolvedRef);
|
|
104154
|
-
var resolvedConfig_1 = parseConfigFile(state, resolvedRef, resolvedRefPath_1);
|
|
104155
|
-
if (hasSameBuildInfo(state, buildInfoCacheEntry, seenRefs, resolvedConfig_1, resolvedRefPath_1))
|
|
104156
|
-
return true;
|
|
104157
|
-
}
|
|
104158
|
-
}
|
|
104159
|
-
return false;
|
|
104160
|
-
}
|
|
104161
103793
|
function getUpToDateStatus(state, project, resolvedPath) {
|
|
104162
103794
|
if (project === undefined) {
|
|
104163
103795
|
return { type: ts.UpToDateStatusType.Unbuildable, reason: "File deleted mid-build" };
|
|
@@ -104173,68 +103805,42 @@ var ts;
|
|
|
104173
103805
|
state.projectStatus.set(resolvedPath, actual);
|
|
104174
103806
|
return actual;
|
|
104175
103807
|
}
|
|
104176
|
-
function updateOutputTimestampsWorker(state, proj,
|
|
103808
|
+
function updateOutputTimestampsWorker(state, proj, priorNewestUpdateTime, verboseMessage, skipOutputs) {
|
|
104177
103809
|
if (proj.options.noEmit)
|
|
104178
|
-
return;
|
|
104179
|
-
var now;
|
|
103810
|
+
return priorNewestUpdateTime;
|
|
104180
103811
|
ts.solutionPerformance.mark("beforeUpdateOutputTimestamps");
|
|
104181
|
-
var
|
|
104182
|
-
|
|
104183
|
-
|
|
104184
|
-
|
|
103812
|
+
var host = state.host;
|
|
103813
|
+
var outputs = ts.getAllProjectOutputs(proj, !host.useCaseSensitiveFileNames());
|
|
103814
|
+
if (!skipOutputs || outputs.length !== skipOutputs.size) {
|
|
103815
|
+
var reportVerbose = !!state.options.verbose;
|
|
103816
|
+
var now = host.now ? host.now() : new Date();
|
|
103817
|
+
for (var _i = 0, outputs_2 = outputs; _i < outputs_2.length; _i++) {
|
|
103818
|
+
var file = outputs_2[_i];
|
|
103819
|
+
if (skipOutputs && skipOutputs.has(toPath(state, file))) {
|
|
103820
|
+
continue;
|
|
103821
|
+
}
|
|
103822
|
+
if (reportVerbose) {
|
|
103823
|
+
reportVerbose = false;
|
|
104185
103824
|
reportStatus(state, verboseMessage, proj.options.configFilePath);
|
|
104186
|
-
state.host.setModifiedTime(buildInfoPath, now = getCurrentTime(state.host));
|
|
104187
|
-
getBuildInfoCacheEntry(state, buildInfoPath, projectPath).modifiedTime = now;
|
|
104188
|
-
}
|
|
104189
|
-
state.outputTimeStamps.delete(projectPath);
|
|
104190
|
-
}
|
|
104191
|
-
else {
|
|
104192
|
-
var host = state.host;
|
|
104193
|
-
var outputs = ts.getAllProjectOutputs(proj, !host.useCaseSensitiveFileNames());
|
|
104194
|
-
var outputTimeStampMap_1 = getOutputTimeStampMap(state, projectPath);
|
|
104195
|
-
var modifiedOutputs_1 = outputTimeStampMap_1 ? new ts.Set() : undefined;
|
|
104196
|
-
if (!skipOutputs || outputs.length !== skipOutputs.size) {
|
|
104197
|
-
var reportVerbose = !!state.options.verbose;
|
|
104198
|
-
for (var _i = 0, outputs_2 = outputs; _i < outputs_2.length; _i++) {
|
|
104199
|
-
var file = outputs_2[_i];
|
|
104200
|
-
var path = toPath(state, file);
|
|
104201
|
-
if (skipOutputs === null || skipOutputs === void 0 ? void 0 : skipOutputs.has(path))
|
|
104202
|
-
continue;
|
|
104203
|
-
if (reportVerbose) {
|
|
104204
|
-
reportVerbose = false;
|
|
104205
|
-
reportStatus(state, verboseMessage, proj.options.configFilePath);
|
|
104206
|
-
}
|
|
104207
|
-
host.setModifiedTime(file, now || (now = getCurrentTime(state.host)));
|
|
104208
|
-
if (outputTimeStampMap_1) {
|
|
104209
|
-
outputTimeStampMap_1.set(path, now);
|
|
104210
|
-
modifiedOutputs_1.add(path);
|
|
104211
|
-
}
|
|
104212
103825
|
}
|
|
103826
|
+
if (ts.isDeclarationFileName(file)) {
|
|
103827
|
+
priorNewestUpdateTime = newer(priorNewestUpdateTime, ts.getModifiedTime(host, file));
|
|
103828
|
+
}
|
|
103829
|
+
host.setModifiedTime(file, now);
|
|
104213
103830
|
}
|
|
104214
|
-
outputTimeStampMap_1 === null || outputTimeStampMap_1 === void 0 ? void 0 : outputTimeStampMap_1.forEach(function (_value, key) {
|
|
104215
|
-
if (!(skipOutputs === null || skipOutputs === void 0 ? void 0 : skipOutputs.has(key)) && !modifiedOutputs_1.has(key))
|
|
104216
|
-
outputTimeStampMap_1.delete(key);
|
|
104217
|
-
});
|
|
104218
103831
|
}
|
|
104219
103832
|
ts.solutionPerformance.mark("afterUpdateOutputTimestamps");
|
|
104220
103833
|
ts.solutionPerformance.measure("UpdateOutputTimestamps", "beforeUpdateOutputTimestamps", "afterUpdateOutputTimestamps");
|
|
104221
|
-
|
|
104222
|
-
function getDtsChangeTime(state, options, resolvedConfigPath) {
|
|
104223
|
-
var _a;
|
|
104224
|
-
if (!options.composite)
|
|
104225
|
-
return undefined;
|
|
104226
|
-
var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(options);
|
|
104227
|
-
var buildInfo = getBuildInfo(state, buildInfoPath, resolvedConfigPath, undefined);
|
|
104228
|
-
return ((_a = buildInfo === null || buildInfo === void 0 ? void 0 : buildInfo.program) === null || _a === void 0 ? void 0 : _a.dtsChangeTime) ? new Date(buildInfo.program.dtsChangeTime) : undefined;
|
|
103834
|
+
return priorNewestUpdateTime;
|
|
104229
103835
|
}
|
|
104230
103836
|
function updateOutputTimestamps(state, proj, resolvedPath) {
|
|
104231
103837
|
if (state.options.dry) {
|
|
104232
103838
|
return reportStatus(state, ts.Diagnostics.A_non_dry_build_would_update_timestamps_for_output_of_project_0, proj.options.configFilePath);
|
|
104233
103839
|
}
|
|
104234
|
-
updateOutputTimestampsWorker(state, proj,
|
|
103840
|
+
var priorNewestUpdateTime = updateOutputTimestampsWorker(state, proj, minimumDate, ts.Diagnostics.Updating_output_timestamps_of_project_0);
|
|
104235
103841
|
state.projectStatus.set(resolvedPath, {
|
|
104236
103842
|
type: ts.UpToDateStatusType.UpToDate,
|
|
104237
|
-
newestDeclarationFileContentChangedTime:
|
|
103843
|
+
newestDeclarationFileContentChangedTime: priorNewestUpdateTime,
|
|
104238
103844
|
oldestOutputFileName: ts.getFirstProjectOutput(proj, !state.host.useCaseSensitiveFileNames())
|
|
104239
103845
|
});
|
|
104240
103846
|
}
|
|
@@ -104273,7 +103879,6 @@ var ts;
|
|
|
104273
103879
|
}
|
|
104274
103880
|
break;
|
|
104275
103881
|
}
|
|
104276
|
-
case ts.UpToDateStatusType.UpToDateWithInputFileText:
|
|
104277
103882
|
case ts.UpToDateStatusType.UpToDateWithUpstreamTypes:
|
|
104278
103883
|
case ts.UpToDateStatusType.OutOfDateWithPrepend:
|
|
104279
103884
|
if (!(buildResult & BuildResultFlags.DeclarationOutputUnchanged)) {
|
|
@@ -104459,10 +104064,12 @@ var ts;
|
|
|
104459
104064
|
function watchConfigFile(state, resolved, resolvedPath, parsed) {
|
|
104460
104065
|
if (!state.watch || state.allWatchedConfigFiles.has(resolvedPath))
|
|
104461
104066
|
return;
|
|
104462
|
-
state.allWatchedConfigFiles.set(resolvedPath, watchFile(
|
|
104067
|
+
state.allWatchedConfigFiles.set(resolvedPath, state.watchFile(resolved, function () {
|
|
104068
|
+
invalidateProjectAndScheduleBuilds(state, resolvedPath, ts.ConfigFileProgramReloadLevel.Full);
|
|
104069
|
+
}, ts.PollingInterval.High, parsed === null || parsed === void 0 ? void 0 : parsed.watchOptions, ts.WatchType.ConfigFile, resolved));
|
|
104463
104070
|
}
|
|
104464
104071
|
function watchExtendedConfigFiles(state, resolvedPath, parsed) {
|
|
104465
|
-
ts.updateSharedExtendedConfigFileWatcher(resolvedPath, parsed === null || parsed === void 0 ? void 0 : parsed.options, state.allWatchedExtendedConfigFiles, function (extendedConfigFileName, extendedConfigFilePath) { return watchFile(
|
|
104072
|
+
ts.updateSharedExtendedConfigFileWatcher(resolvedPath, parsed === null || parsed === void 0 ? void 0 : parsed.options, state.allWatchedExtendedConfigFiles, function (extendedConfigFileName, extendedConfigFilePath) { return state.watchFile(extendedConfigFileName, function () {
|
|
104466
104073
|
var _a;
|
|
104467
104074
|
return (_a = state.allWatchedExtendedConfigFiles.get(extendedConfigFilePath)) === null || _a === void 0 ? void 0 : _a.projects.forEach(function (projectConfigFilePath) {
|
|
104468
104075
|
return invalidateProjectAndScheduleBuilds(state, projectConfigFilePath, ts.ConfigFileProgramReloadLevel.Full);
|
|
@@ -104494,7 +104101,7 @@ var ts;
|
|
|
104494
104101
|
if (!state.watch)
|
|
104495
104102
|
return;
|
|
104496
104103
|
ts.mutateMap(getOrCreateValueMapFromConfigFileMap(state.allWatchedInputFiles, resolvedPath), ts.arrayToMap(parsed.fileNames, function (fileName) { return toPath(state, fileName); }), {
|
|
104497
|
-
createNewValue: function (_path, input) { return watchFile(
|
|
104104
|
+
createNewValue: function (_path, input) { return state.watchFile(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); },
|
|
104498
104105
|
onDeleteValue: ts.closeFileWatcher,
|
|
104499
104106
|
});
|
|
104500
104107
|
}
|
|
@@ -104502,7 +104109,7 @@ var ts;
|
|
|
104502
104109
|
if (!state.watch || !state.lastCachedPackageJsonLookups)
|
|
104503
104110
|
return;
|
|
104504
104111
|
ts.mutateMap(getOrCreateValueMapFromConfigFileMap(state.allWatchedPackageJsonFiles, resolvedPath), new ts.Map(state.lastCachedPackageJsonLookups.get(resolvedPath)), {
|
|
104505
|
-
createNewValue: function (path, _input) { return watchFile(
|
|
104112
|
+
createNewValue: function (path, _input) { return state.watchFile(path, function () { return invalidateProjectAndScheduleBuilds(state, resolvedPath, ts.ConfigFileProgramReloadLevel.None); }, ts.PollingInterval.High, parsed === null || parsed === void 0 ? void 0 : parsed.watchOptions, ts.WatchType.PackageJson, resolved); },
|
|
104506
104113
|
onDeleteValue: ts.closeFileWatcher,
|
|
104507
104114
|
});
|
|
104508
104115
|
}
|
|
@@ -104627,26 +104234,25 @@ var ts;
|
|
|
104627
104234
|
}
|
|
104628
104235
|
}
|
|
104629
104236
|
function reportUpToDateStatus(state, configFileName, status) {
|
|
104237
|
+
if (state.options.force && (status.type === ts.UpToDateStatusType.UpToDate || status.type === ts.UpToDateStatusType.UpToDateWithUpstreamTypes)) {
|
|
104238
|
+
return reportStatus(state, ts.Diagnostics.Project_0_is_being_forcibly_rebuilt, relName(state, configFileName));
|
|
104239
|
+
}
|
|
104630
104240
|
switch (status.type) {
|
|
104631
104241
|
case ts.UpToDateStatusType.OutOfDateWithSelf:
|
|
104632
|
-
return reportStatus(state, ts.Diagnostics.
|
|
104242
|
+
return reportStatus(state, ts.Diagnostics.Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2, relName(state, configFileName), relName(state, status.outOfDateOutputFileName), relName(state, status.newerInputFileName));
|
|
104633
104243
|
case ts.UpToDateStatusType.OutOfDateWithUpstream:
|
|
104634
|
-
return reportStatus(state, ts.Diagnostics.
|
|
104244
|
+
return reportStatus(state, ts.Diagnostics.Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2, relName(state, configFileName), relName(state, status.outOfDateOutputFileName), relName(state, status.newerProjectName));
|
|
104635
104245
|
case ts.UpToDateStatusType.OutputMissing:
|
|
104636
104246
|
return reportStatus(state, ts.Diagnostics.Project_0_is_out_of_date_because_output_file_1_does_not_exist, relName(state, configFileName), relName(state, status.missingOutputFileName));
|
|
104637
|
-
case ts.UpToDateStatusType.OutOfDateBuildInfo:
|
|
104638
|
-
return reportStatus(state, ts.Diagnostics.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_are_not_emitted, relName(state, configFileName), relName(state, status.buildInfoFile));
|
|
104639
104247
|
case ts.UpToDateStatusType.UpToDate:
|
|
104640
104248
|
if (status.newestInputFileTime !== undefined) {
|
|
104641
|
-
return reportStatus(state, ts.Diagnostics.
|
|
104249
|
+
return reportStatus(state, ts.Diagnostics.Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2, relName(state, configFileName), relName(state, status.newestInputFileName || ""), relName(state, status.oldestOutputFileName || ""));
|
|
104642
104250
|
}
|
|
104643
104251
|
break;
|
|
104644
104252
|
case ts.UpToDateStatusType.OutOfDateWithPrepend:
|
|
104645
104253
|
return reportStatus(state, ts.Diagnostics.Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed, relName(state, configFileName), relName(state, status.newerProjectName));
|
|
104646
104254
|
case ts.UpToDateStatusType.UpToDateWithUpstreamTypes:
|
|
104647
104255
|
return reportStatus(state, ts.Diagnostics.Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies, relName(state, configFileName));
|
|
104648
|
-
case ts.UpToDateStatusType.UpToDateWithInputFileText:
|
|
104649
|
-
return reportStatus(state, ts.Diagnostics.Project_0_is_up_to_date_but_needs_update_to_timestamps_of_output_files_that_are_older_than_input_files, relName(state, configFileName));
|
|
104650
104256
|
case ts.UpToDateStatusType.UpstreamOutOfDate:
|
|
104651
104257
|
return reportStatus(state, ts.Diagnostics.Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date, relName(state, configFileName), relName(state, status.upstreamProjectName));
|
|
104652
104258
|
case ts.UpToDateStatusType.UpstreamBlocked:
|
|
@@ -104657,8 +104263,6 @@ var ts;
|
|
|
104657
104263
|
return reportStatus(state, ts.Diagnostics.Failed_to_parse_file_0_Colon_1, relName(state, configFileName), status.reason);
|
|
104658
104264
|
case ts.UpToDateStatusType.TsVersionOutputOfDate:
|
|
104659
104265
|
return reportStatus(state, ts.Diagnostics.Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2, relName(state, configFileName), status.version, ts.version);
|
|
104660
|
-
case ts.UpToDateStatusType.ForceBuild:
|
|
104661
|
-
return reportStatus(state, ts.Diagnostics.Project_0_is_being_forcibly_rebuilt, relName(state, configFileName));
|
|
104662
104266
|
case ts.UpToDateStatusType.ContainerOnly:
|
|
104663
104267
|
case ts.UpToDateStatusType.ComputingUpstream:
|
|
104664
104268
|
break;
|