@typescript-deploys/pr-build 4.8.0-pr-48784-14 → 4.8.0-pr-49285-2
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/cs/diagnosticMessages.generated.json +1 -0
- package/lib/de/diagnosticMessages.generated.json +1 -0
- package/lib/es/diagnosticMessages.generated.json +1 -0
- package/lib/fr/diagnosticMessages.generated.json +1 -0
- package/lib/it/diagnosticMessages.generated.json +1 -0
- package/lib/ja/diagnosticMessages.generated.json +1 -0
- package/lib/ko/diagnosticMessages.generated.json +1 -0
- package/lib/lib.es5.d.ts +1 -1
- package/lib/pl/diagnosticMessages.generated.json +1 -0
- package/lib/pt-br/diagnosticMessages.generated.json +1 -0
- package/lib/ru/diagnosticMessages.generated.json +1 -0
- package/lib/tr/diagnosticMessages.generated.json +1 -0
- package/lib/tsc.js +650 -986
- package/lib/tsserver.js +719 -1038
- package/lib/tsserverlibrary.d.ts +1 -1
- package/lib/tsserverlibrary.js +719 -1038
- package/lib/typescript.d.ts +1 -1
- package/lib/typescript.js +719 -1038
- package/lib/typescriptServices.d.ts +1 -1
- package/lib/typescriptServices.js +719 -1038
- package/lib/typingsInstaller.js +719 -1038
- package/lib/zh-cn/diagnosticMessages.generated.json +1 -0
- package/lib/zh-tw/diagnosticMessages.generated.json +1 -0
- package/package.json +1 -1
- package/test.js +9 -0
- package/test.ts +4 -0
package/lib/tsc.js
CHANGED
|
@@ -69,7 +69,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
69
69
|
var ts;
|
|
70
70
|
(function (ts) {
|
|
71
71
|
ts.versionMajorMinor = "4.8";
|
|
72
|
-
ts.version = ts.versionMajorMinor + ".0-insiders.
|
|
72
|
+
ts.version = ts.versionMajorMinor + ".0-insiders.20220531";
|
|
73
73
|
var NativeCollections;
|
|
74
74
|
(function (NativeCollections) {
|
|
75
75
|
var globals = typeof globalThis !== "undefined" ? globalThis :
|
|
@@ -3749,7 +3749,7 @@ var ts;
|
|
|
3749
3749
|
};
|
|
3750
3750
|
}
|
|
3751
3751
|
function createDirectoryWatcher(dirName, dirPath, fallbackOptions) {
|
|
3752
|
-
var watcher = fsWatch(dirName, 1, function (_eventName, relativeFileName
|
|
3752
|
+
var watcher = fsWatch(dirName, 1, function (_eventName, relativeFileName) {
|
|
3753
3753
|
if (!ts.isString(relativeFileName))
|
|
3754
3754
|
return;
|
|
3755
3755
|
var fileName = ts.getNormalizedAbsolutePath(relativeFileName, dirName);
|
|
@@ -3757,7 +3757,7 @@ var ts;
|
|
|
3757
3757
|
if (callbacks) {
|
|
3758
3758
|
for (var _i = 0, callbacks_1 = callbacks; _i < callbacks_1.length; _i++) {
|
|
3759
3759
|
var fileCallback = callbacks_1[_i];
|
|
3760
|
-
fileCallback(fileName, FileWatcherEventKind.Changed
|
|
3760
|
+
fileCallback(fileName, FileWatcherEventKind.Changed);
|
|
3761
3761
|
}
|
|
3762
3762
|
}
|
|
3763
3763
|
}, false, PollingInterval.Medium, fallbackOptions);
|
|
@@ -3809,7 +3809,7 @@ var ts;
|
|
|
3809
3809
|
}
|
|
3810
3810
|
else {
|
|
3811
3811
|
cache.set(path, {
|
|
3812
|
-
watcher: watchFile(fileName, function (fileName, eventKind
|
|
3812
|
+
watcher: watchFile(fileName, function (fileName, eventKind) { return ts.forEach(callbacksCache.get(path), function (cb) { return cb(fileName, eventKind); }); }, pollingInterval, options),
|
|
3813
3813
|
refCount: 1
|
|
3814
3814
|
});
|
|
3815
3815
|
}
|
|
@@ -3833,7 +3833,7 @@ var ts;
|
|
|
3833
3833
|
var newTime = modifiedTime.getTime();
|
|
3834
3834
|
if (oldTime !== newTime) {
|
|
3835
3835
|
watchedFile.mtime = modifiedTime;
|
|
3836
|
-
watchedFile.callback(watchedFile.fileName, getFileWatcherEventKind(oldTime, newTime)
|
|
3836
|
+
watchedFile.callback(watchedFile.fileName, getFileWatcherEventKind(oldTime, newTime));
|
|
3837
3837
|
return true;
|
|
3838
3838
|
}
|
|
3839
3839
|
return false;
|
|
@@ -4047,17 +4047,16 @@ var ts;
|
|
|
4047
4047
|
}
|
|
4048
4048
|
ts.createDirectoryWatcherSupportingRecursive = createDirectoryWatcherSupportingRecursive;
|
|
4049
4049
|
function createFileWatcherCallback(callback) {
|
|
4050
|
-
return function (_fileName, eventKind
|
|
4050
|
+
return function (_fileName, eventKind) { return callback(eventKind === FileWatcherEventKind.Changed ? "change" : "rename", ""); };
|
|
4051
4051
|
}
|
|
4052
4052
|
ts.createFileWatcherCallback = createFileWatcherCallback;
|
|
4053
|
-
function createFsWatchCallbackForFileWatcherCallback(fileName, callback,
|
|
4054
|
-
return function (eventName
|
|
4053
|
+
function createFsWatchCallbackForFileWatcherCallback(fileName, callback, fileExists) {
|
|
4054
|
+
return function (eventName) {
|
|
4055
4055
|
if (eventName === "rename") {
|
|
4056
|
-
|
|
4057
|
-
callback(fileName, modifiedTime !== ts.missingFileModifiedTime ? FileWatcherEventKind.Created : FileWatcherEventKind.Deleted, modifiedTime);
|
|
4056
|
+
callback(fileName, fileExists(fileName) ? FileWatcherEventKind.Created : FileWatcherEventKind.Deleted);
|
|
4058
4057
|
}
|
|
4059
4058
|
else {
|
|
4060
|
-
callback(fileName, FileWatcherEventKind.Changed
|
|
4059
|
+
callback(fileName, FileWatcherEventKind.Changed);
|
|
4061
4060
|
}
|
|
4062
4061
|
};
|
|
4063
4062
|
}
|
|
@@ -4076,7 +4075,7 @@ var ts;
|
|
|
4076
4075
|
};
|
|
4077
4076
|
}
|
|
4078
4077
|
function createSystemWatchFunctions(_a) {
|
|
4079
|
-
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;
|
|
4078
|
+
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;
|
|
4080
4079
|
var dynamicPollingWatchFile;
|
|
4081
4080
|
var fixedChunkSizePollingWatchFile;
|
|
4082
4081
|
var nonPollingWatchFile;
|
|
@@ -4098,7 +4097,7 @@ var ts;
|
|
|
4098
4097
|
case ts.WatchFileKind.FixedChunkSizePolling:
|
|
4099
4098
|
return ensureFixedChunkSizePollingWatchFile()(fileName, callback, undefined, undefined);
|
|
4100
4099
|
case ts.WatchFileKind.UseFsEvents:
|
|
4101
|
-
return fsWatch(fileName, 0, createFsWatchCallbackForFileWatcherCallback(fileName, callback,
|
|
4100
|
+
return fsWatch(fileName, 0, createFsWatchCallbackForFileWatcherCallback(fileName, callback, fileExists), false, pollingInterval, ts.getFallbackOptions(options));
|
|
4102
4101
|
case ts.WatchFileKind.UseFsEventsOnParentDirectory:
|
|
4103
4102
|
if (!nonPollingWatchFile) {
|
|
4104
4103
|
nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames);
|
|
@@ -4255,6 +4254,7 @@ var ts;
|
|
|
4255
4254
|
fsWatch: fsWatch,
|
|
4256
4255
|
useCaseSensitiveFileNames: useCaseSensitiveFileNames,
|
|
4257
4256
|
getCurrentDirectory: getCurrentDirectory,
|
|
4257
|
+
fileExists: fileExists,
|
|
4258
4258
|
fsSupportsRecursiveFsWatch: fsSupportsRecursiveFsWatch,
|
|
4259
4259
|
directoryExists: directoryExists,
|
|
4260
4260
|
getAccessibleSortedChildDirectories: function (path) { return getAccessibleFileSystemEntries(path).directories; },
|
|
@@ -4482,7 +4482,7 @@ var ts;
|
|
|
4482
4482
|
else {
|
|
4483
4483
|
eventKind = FileWatcherEventKind.Changed;
|
|
4484
4484
|
}
|
|
4485
|
-
callback(fileName, eventKind
|
|
4485
|
+
callback(fileName, eventKind);
|
|
4486
4486
|
}
|
|
4487
4487
|
}
|
|
4488
4488
|
function fsWatch(fileOrDirectory, entryKind, callback, recursive, fallbackPollingInterval, fallbackOptions) {
|
|
@@ -4502,9 +4502,9 @@ var ts;
|
|
|
4502
4502
|
watcher = undefined;
|
|
4503
4503
|
}
|
|
4504
4504
|
};
|
|
4505
|
-
function invokeCallbackAndUpdateWatcher(createWatcher
|
|
4505
|
+
function invokeCallbackAndUpdateWatcher(createWatcher) {
|
|
4506
4506
|
sysLog("sysLog:: " + fileOrDirectory + ":: Changing watcher to " + (createWatcher === watchPresentFileSystemEntry ? "Present" : "Missing") + "FileSystemEntryWatcher");
|
|
4507
|
-
callback("rename", ""
|
|
4507
|
+
callback("rename", "");
|
|
4508
4508
|
if (watcher) {
|
|
4509
4509
|
watcher.close();
|
|
4510
4510
|
watcher = createWatcher();
|
|
@@ -4537,25 +4537,21 @@ var ts;
|
|
|
4537
4537
|
}
|
|
4538
4538
|
}
|
|
4539
4539
|
function callbackChangingToMissingFileSystemEntry(event, relativeName) {
|
|
4540
|
-
var modifiedTime = getModifiedTime(fileOrDirectory) || ts.missingFileModifiedTime;
|
|
4541
4540
|
return event === "rename" &&
|
|
4542
4541
|
(!relativeName ||
|
|
4543
4542
|
relativeName === lastDirectoryPart ||
|
|
4544
4543
|
(relativeName.lastIndexOf(lastDirectoryPartWithDirectorySeparator) !== -1 && relativeName.lastIndexOf(lastDirectoryPartWithDirectorySeparator) === relativeName.length - lastDirectoryPartWithDirectorySeparator.length)) &&
|
|
4545
|
-
|
|
4546
|
-
invokeCallbackAndUpdateWatcher(watchMissingFileSystemEntry
|
|
4547
|
-
callback(event, relativeName
|
|
4544
|
+
!fileSystemEntryExists(fileOrDirectory, entryKind) ?
|
|
4545
|
+
invokeCallbackAndUpdateWatcher(watchMissingFileSystemEntry) :
|
|
4546
|
+
callback(event, relativeName);
|
|
4548
4547
|
}
|
|
4549
4548
|
function watchPresentFileSystemEntryWithFsWatchFile() {
|
|
4550
4549
|
return watchFile(fileOrDirectory, createFileWatcherCallback(callback), fallbackPollingInterval, fallbackOptions);
|
|
4551
4550
|
}
|
|
4552
4551
|
function watchMissingFileSystemEntry() {
|
|
4553
|
-
return watchFile(fileOrDirectory, function (_fileName, eventKind
|
|
4554
|
-
if (eventKind === FileWatcherEventKind.Created) {
|
|
4555
|
-
|
|
4556
|
-
if (modifiedTime !== ts.missingFileModifiedTime) {
|
|
4557
|
-
invokeCallbackAndUpdateWatcher(watchPresentFileSystemEntry, modifiedTime);
|
|
4558
|
-
}
|
|
4552
|
+
return watchFile(fileOrDirectory, function (_fileName, eventKind) {
|
|
4553
|
+
if (eventKind === FileWatcherEventKind.Created && fileSystemEntryExists(fileOrDirectory, entryKind)) {
|
|
4554
|
+
invokeCallbackAndUpdateWatcher(watchPresentFileSystemEntry);
|
|
4559
4555
|
}
|
|
4560
4556
|
}, fallbackPollingInterval, fallbackOptions);
|
|
4561
4557
|
}
|
|
@@ -4694,17 +4690,12 @@ var ts;
|
|
|
4694
4690
|
}
|
|
4695
4691
|
function getModifiedTime(path) {
|
|
4696
4692
|
var _a;
|
|
4697
|
-
var originalStackTraceLimit = Error.stackTraceLimit;
|
|
4698
|
-
Error.stackTraceLimit = 0;
|
|
4699
4693
|
try {
|
|
4700
4694
|
return (_a = statSync(path)) === null || _a === void 0 ? void 0 : _a.mtime;
|
|
4701
4695
|
}
|
|
4702
4696
|
catch (e) {
|
|
4703
4697
|
return undefined;
|
|
4704
4698
|
}
|
|
4705
|
-
finally {
|
|
4706
|
-
Error.stackTraceLimit = originalStackTraceLimit;
|
|
4707
|
-
}
|
|
4708
4699
|
}
|
|
4709
4700
|
function setModifiedTime(path, time) {
|
|
4710
4701
|
try {
|
|
@@ -5610,6 +5601,7 @@ var ts;
|
|
|
5610
5601
|
Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1: diag(2205, ts.DiagnosticCategory.Error, "Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2205", "Construct signatures with no arguments have incompatible return types '{0}' and '{1}'.", undefined, true),
|
|
5611
5602
|
The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement: diag(2206, ts.DiagnosticCategory.Error, "The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement_2206", "The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement."),
|
|
5612
5603
|
The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement: diag(2207, ts.DiagnosticCategory.Error, "The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement_2207", "The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement."),
|
|
5604
|
+
This_type_parameter_probably_needs_an_extends_object_constraint: diag(2208, ts.DiagnosticCategory.Error, "This_type_parameter_probably_needs_an_extends_object_constraint_2208", "This type parameter probably needs an `extends object` constraint."),
|
|
5613
5605
|
The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate: diag(2209, ts.DiagnosticCategory.Error, "The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_roo_2209", "The project root is ambiguous, but is required to resolve export map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."),
|
|
5614
5606
|
The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate: diag(2210, ts.DiagnosticCategory.Error, "The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_roo_2210", "The project root is ambiguous, but is required to resolve import map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."),
|
|
5615
5607
|
Duplicate_identifier_0: diag(2300, ts.DiagnosticCategory.Error, "Duplicate_identifier_0_2300", "Duplicate identifier '{0}'."),
|
|
@@ -6505,8 +6497,8 @@ var ts;
|
|
|
6505
6497
|
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"),
|
|
6506
6498
|
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"),
|
|
6507
6499
|
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."),
|
|
6508
|
-
|
|
6509
|
-
|
|
6500
|
+
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}'"),
|
|
6501
|
+
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}'"),
|
|
6510
6502
|
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"),
|
|
6511
6503
|
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"),
|
|
6512
6504
|
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"),
|
|
@@ -6550,8 +6542,6 @@ var ts;
|
|
|
6550
6542
|
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}'."),
|
|
6551
6543
|
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}'."),
|
|
6552
6544
|
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."),
|
|
6553
|
-
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"),
|
|
6554
|
-
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"),
|
|
6555
6545
|
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}'"),
|
|
6556
6546
|
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."),
|
|
6557
6547
|
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."),
|
|
@@ -16018,10 +16008,6 @@ var ts;
|
|
|
16018
16008
|
return optionsHaveChanges(oldOptions, newOptions, ts.affectsEmitOptionDeclarations);
|
|
16019
16009
|
}
|
|
16020
16010
|
ts.compilerOptionsAffectEmit = compilerOptionsAffectEmit;
|
|
16021
|
-
function compilerOptionsAffectDeclarationPath(newOptions, oldOptions) {
|
|
16022
|
-
return optionsHaveChanges(oldOptions, newOptions, ts.affectsDeclarationPathOptionDeclarations);
|
|
16023
|
-
}
|
|
16024
|
-
ts.compilerOptionsAffectDeclarationPath = compilerOptionsAffectDeclarationPath;
|
|
16025
16011
|
function getCompilerOptionValue(options, option) {
|
|
16026
16012
|
return option.strictFlag ? getStrictOptionValue(options, option.name) : options[option.name];
|
|
16027
16013
|
}
|
|
@@ -31731,7 +31717,6 @@ var ts;
|
|
|
31731
31717
|
type: "boolean",
|
|
31732
31718
|
affectsSemanticDiagnostics: true,
|
|
31733
31719
|
affectsEmit: true,
|
|
31734
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31735
31720
|
category: ts.Diagnostics.Watch_and_Build_Modes,
|
|
31736
31721
|
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,
|
|
31737
31722
|
defaultValueDescription: false,
|
|
@@ -31765,39 +31750,12 @@ var ts;
|
|
|
31765
31750
|
affectsSourceFile: true,
|
|
31766
31751
|
affectsModuleResolution: true,
|
|
31767
31752
|
affectsEmit: true,
|
|
31768
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31769
31753
|
paramType: ts.Diagnostics.VERSION,
|
|
31770
31754
|
showInSimplifiedHelpView: true,
|
|
31771
31755
|
category: ts.Diagnostics.Language_and_Environment,
|
|
31772
31756
|
description: ts.Diagnostics.Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations,
|
|
31773
31757
|
defaultValueDescription: 0,
|
|
31774
31758
|
};
|
|
31775
|
-
ts.moduleOptionDeclaration = {
|
|
31776
|
-
name: "module",
|
|
31777
|
-
shortName: "m",
|
|
31778
|
-
type: new ts.Map(ts.getEntries({
|
|
31779
|
-
none: ts.ModuleKind.None,
|
|
31780
|
-
commonjs: ts.ModuleKind.CommonJS,
|
|
31781
|
-
amd: ts.ModuleKind.AMD,
|
|
31782
|
-
system: ts.ModuleKind.System,
|
|
31783
|
-
umd: ts.ModuleKind.UMD,
|
|
31784
|
-
es6: ts.ModuleKind.ES2015,
|
|
31785
|
-
es2015: ts.ModuleKind.ES2015,
|
|
31786
|
-
es2020: ts.ModuleKind.ES2020,
|
|
31787
|
-
es2022: ts.ModuleKind.ES2022,
|
|
31788
|
-
esnext: ts.ModuleKind.ESNext,
|
|
31789
|
-
node16: ts.ModuleKind.Node16,
|
|
31790
|
-
nodenext: ts.ModuleKind.NodeNext,
|
|
31791
|
-
})),
|
|
31792
|
-
affectsModuleResolution: true,
|
|
31793
|
-
affectsEmit: true,
|
|
31794
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31795
|
-
paramType: ts.Diagnostics.KIND,
|
|
31796
|
-
showInSimplifiedHelpView: true,
|
|
31797
|
-
category: ts.Diagnostics.Modules,
|
|
31798
|
-
description: ts.Diagnostics.Specify_what_module_code_is_generated,
|
|
31799
|
-
defaultValueDescription: undefined,
|
|
31800
|
-
};
|
|
31801
31759
|
var commandOptionsWithoutBuild = [
|
|
31802
31760
|
{
|
|
31803
31761
|
name: "all",
|
|
@@ -31858,13 +31816,36 @@ var ts;
|
|
|
31858
31816
|
category: ts.Diagnostics.Command_line_Options,
|
|
31859
31817
|
affectsSemanticDiagnostics: true,
|
|
31860
31818
|
affectsEmit: true,
|
|
31861
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31862
31819
|
isCommandLineOnly: true,
|
|
31863
31820
|
description: ts.Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing,
|
|
31864
31821
|
defaultValueDescription: false,
|
|
31865
31822
|
},
|
|
31866
31823
|
ts.targetOptionDeclaration,
|
|
31867
|
-
|
|
31824
|
+
{
|
|
31825
|
+
name: "module",
|
|
31826
|
+
shortName: "m",
|
|
31827
|
+
type: new ts.Map(ts.getEntries({
|
|
31828
|
+
none: ts.ModuleKind.None,
|
|
31829
|
+
commonjs: ts.ModuleKind.CommonJS,
|
|
31830
|
+
amd: ts.ModuleKind.AMD,
|
|
31831
|
+
system: ts.ModuleKind.System,
|
|
31832
|
+
umd: ts.ModuleKind.UMD,
|
|
31833
|
+
es6: ts.ModuleKind.ES2015,
|
|
31834
|
+
es2015: ts.ModuleKind.ES2015,
|
|
31835
|
+
es2020: ts.ModuleKind.ES2020,
|
|
31836
|
+
es2022: ts.ModuleKind.ES2022,
|
|
31837
|
+
esnext: ts.ModuleKind.ESNext,
|
|
31838
|
+
node16: ts.ModuleKind.Node16,
|
|
31839
|
+
nodenext: ts.ModuleKind.NodeNext,
|
|
31840
|
+
})),
|
|
31841
|
+
affectsModuleResolution: true,
|
|
31842
|
+
affectsEmit: true,
|
|
31843
|
+
paramType: ts.Diagnostics.KIND,
|
|
31844
|
+
showInSimplifiedHelpView: true,
|
|
31845
|
+
category: ts.Diagnostics.Modules,
|
|
31846
|
+
description: ts.Diagnostics.Specify_what_module_code_is_generated,
|
|
31847
|
+
defaultValueDescription: undefined,
|
|
31848
|
+
},
|
|
31868
31849
|
{
|
|
31869
31850
|
name: "lib",
|
|
31870
31851
|
type: "list",
|
|
@@ -31901,7 +31882,6 @@ var ts;
|
|
|
31901
31882
|
type: jsxOptionMap,
|
|
31902
31883
|
affectsSourceFile: true,
|
|
31903
31884
|
affectsEmit: true,
|
|
31904
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31905
31885
|
affectsModuleResolution: true,
|
|
31906
31886
|
paramType: ts.Diagnostics.KIND,
|
|
31907
31887
|
showInSimplifiedHelpView: true,
|
|
@@ -31914,7 +31894,6 @@ var ts;
|
|
|
31914
31894
|
shortName: "d",
|
|
31915
31895
|
type: "boolean",
|
|
31916
31896
|
affectsEmit: true,
|
|
31917
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31918
31897
|
showInSimplifiedHelpView: true,
|
|
31919
31898
|
category: ts.Diagnostics.Emit,
|
|
31920
31899
|
transpileOptionValue: undefined,
|
|
@@ -31925,7 +31904,6 @@ var ts;
|
|
|
31925
31904
|
name: "declarationMap",
|
|
31926
31905
|
type: "boolean",
|
|
31927
31906
|
affectsEmit: true,
|
|
31928
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31929
31907
|
showInSimplifiedHelpView: true,
|
|
31930
31908
|
category: ts.Diagnostics.Emit,
|
|
31931
31909
|
transpileOptionValue: undefined,
|
|
@@ -31936,7 +31914,6 @@ var ts;
|
|
|
31936
31914
|
name: "emitDeclarationOnly",
|
|
31937
31915
|
type: "boolean",
|
|
31938
31916
|
affectsEmit: true,
|
|
31939
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31940
31917
|
showInSimplifiedHelpView: true,
|
|
31941
31918
|
category: ts.Diagnostics.Emit,
|
|
31942
31919
|
description: ts.Diagnostics.Only_output_d_ts_files_and_not_JavaScript_files,
|
|
@@ -31947,7 +31924,6 @@ var ts;
|
|
|
31947
31924
|
name: "sourceMap",
|
|
31948
31925
|
type: "boolean",
|
|
31949
31926
|
affectsEmit: true,
|
|
31950
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31951
31927
|
showInSimplifiedHelpView: true,
|
|
31952
31928
|
category: ts.Diagnostics.Emit,
|
|
31953
31929
|
defaultValueDescription: false,
|
|
@@ -31957,9 +31933,6 @@ var ts;
|
|
|
31957
31933
|
name: "outFile",
|
|
31958
31934
|
type: "string",
|
|
31959
31935
|
affectsEmit: true,
|
|
31960
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31961
|
-
affectsDeclarationPath: true,
|
|
31962
|
-
affectsBundleEmitBuildInfo: true,
|
|
31963
31936
|
isFilePath: true,
|
|
31964
31937
|
paramType: ts.Diagnostics.FILE,
|
|
31965
31938
|
showInSimplifiedHelpView: true,
|
|
@@ -31971,8 +31944,6 @@ var ts;
|
|
|
31971
31944
|
name: "outDir",
|
|
31972
31945
|
type: "string",
|
|
31973
31946
|
affectsEmit: true,
|
|
31974
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31975
|
-
affectsDeclarationPath: true,
|
|
31976
31947
|
isFilePath: true,
|
|
31977
31948
|
paramType: ts.Diagnostics.DIRECTORY,
|
|
31978
31949
|
showInSimplifiedHelpView: true,
|
|
@@ -31983,8 +31954,6 @@ var ts;
|
|
|
31983
31954
|
name: "rootDir",
|
|
31984
31955
|
type: "string",
|
|
31985
31956
|
affectsEmit: true,
|
|
31986
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31987
|
-
affectsDeclarationPath: true,
|
|
31988
31957
|
isFilePath: true,
|
|
31989
31958
|
paramType: ts.Diagnostics.LOCATION,
|
|
31990
31959
|
category: ts.Diagnostics.Modules,
|
|
@@ -31995,8 +31964,6 @@ var ts;
|
|
|
31995
31964
|
name: "composite",
|
|
31996
31965
|
type: "boolean",
|
|
31997
31966
|
affectsEmit: true,
|
|
31998
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31999
|
-
affectsBundleEmitBuildInfo: true,
|
|
32000
31967
|
isTSConfigOnly: true,
|
|
32001
31968
|
category: ts.Diagnostics.Projects,
|
|
32002
31969
|
transpileOptionValue: undefined,
|
|
@@ -32007,8 +31974,6 @@ var ts;
|
|
|
32007
31974
|
name: "tsBuildInfoFile",
|
|
32008
31975
|
type: "string",
|
|
32009
31976
|
affectsEmit: true,
|
|
32010
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32011
|
-
affectsBundleEmitBuildInfo: true,
|
|
32012
31977
|
isFilePath: true,
|
|
32013
31978
|
paramType: ts.Diagnostics.FILE,
|
|
32014
31979
|
category: ts.Diagnostics.Projects,
|
|
@@ -32020,7 +31985,6 @@ var ts;
|
|
|
32020
31985
|
name: "removeComments",
|
|
32021
31986
|
type: "boolean",
|
|
32022
31987
|
affectsEmit: true,
|
|
32023
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32024
31988
|
showInSimplifiedHelpView: true,
|
|
32025
31989
|
category: ts.Diagnostics.Emit,
|
|
32026
31990
|
defaultValueDescription: false,
|
|
@@ -32039,7 +32003,6 @@ var ts;
|
|
|
32039
32003
|
name: "importHelpers",
|
|
32040
32004
|
type: "boolean",
|
|
32041
32005
|
affectsEmit: true,
|
|
32042
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32043
32006
|
category: ts.Diagnostics.Emit,
|
|
32044
32007
|
description: ts.Diagnostics.Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file,
|
|
32045
32008
|
defaultValueDescription: false,
|
|
@@ -32053,7 +32016,6 @@ var ts;
|
|
|
32053
32016
|
})),
|
|
32054
32017
|
affectsEmit: true,
|
|
32055
32018
|
affectsSemanticDiagnostics: true,
|
|
32056
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32057
32019
|
category: ts.Diagnostics.Emit,
|
|
32058
32020
|
description: ts.Diagnostics.Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types,
|
|
32059
32021
|
defaultValueDescription: 0,
|
|
@@ -32062,7 +32024,6 @@ var ts;
|
|
|
32062
32024
|
name: "downlevelIteration",
|
|
32063
32025
|
type: "boolean",
|
|
32064
32026
|
affectsEmit: true,
|
|
32065
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32066
32027
|
category: ts.Diagnostics.Emit,
|
|
32067
32028
|
description: ts.Diagnostics.Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration,
|
|
32068
32029
|
defaultValueDescription: false,
|
|
@@ -32078,7 +32039,6 @@ var ts;
|
|
|
32078
32039
|
{
|
|
32079
32040
|
name: "strict",
|
|
32080
32041
|
type: "boolean",
|
|
32081
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32082
32042
|
showInSimplifiedHelpView: true,
|
|
32083
32043
|
category: ts.Diagnostics.Type_Checking,
|
|
32084
32044
|
description: ts.Diagnostics.Enable_all_strict_type_checking_options,
|
|
@@ -32088,7 +32048,6 @@ var ts;
|
|
|
32088
32048
|
name: "noImplicitAny",
|
|
32089
32049
|
type: "boolean",
|
|
32090
32050
|
affectsSemanticDiagnostics: true,
|
|
32091
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32092
32051
|
strictFlag: true,
|
|
32093
32052
|
category: ts.Diagnostics.Type_Checking,
|
|
32094
32053
|
description: ts.Diagnostics.Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type,
|
|
@@ -32098,7 +32057,6 @@ var ts;
|
|
|
32098
32057
|
name: "strictNullChecks",
|
|
32099
32058
|
type: "boolean",
|
|
32100
32059
|
affectsSemanticDiagnostics: true,
|
|
32101
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32102
32060
|
strictFlag: true,
|
|
32103
32061
|
category: ts.Diagnostics.Type_Checking,
|
|
32104
32062
|
description: ts.Diagnostics.When_type_checking_take_into_account_null_and_undefined,
|
|
@@ -32107,8 +32065,6 @@ var ts;
|
|
|
32107
32065
|
{
|
|
32108
32066
|
name: "strictFunctionTypes",
|
|
32109
32067
|
type: "boolean",
|
|
32110
|
-
affectsSemanticDiagnostics: true,
|
|
32111
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32112
32068
|
strictFlag: true,
|
|
32113
32069
|
category: ts.Diagnostics.Type_Checking,
|
|
32114
32070
|
description: ts.Diagnostics.When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible,
|
|
@@ -32117,8 +32073,6 @@ var ts;
|
|
|
32117
32073
|
{
|
|
32118
32074
|
name: "strictBindCallApply",
|
|
32119
32075
|
type: "boolean",
|
|
32120
|
-
affectsSemanticDiagnostics: true,
|
|
32121
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32122
32076
|
strictFlag: true,
|
|
32123
32077
|
category: ts.Diagnostics.Type_Checking,
|
|
32124
32078
|
description: ts.Diagnostics.Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function,
|
|
@@ -32128,7 +32082,6 @@ var ts;
|
|
|
32128
32082
|
name: "strictPropertyInitialization",
|
|
32129
32083
|
type: "boolean",
|
|
32130
32084
|
affectsSemanticDiagnostics: true,
|
|
32131
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32132
32085
|
strictFlag: true,
|
|
32133
32086
|
category: ts.Diagnostics.Type_Checking,
|
|
32134
32087
|
description: ts.Diagnostics.Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor,
|
|
@@ -32138,7 +32091,6 @@ var ts;
|
|
|
32138
32091
|
name: "noImplicitThis",
|
|
32139
32092
|
type: "boolean",
|
|
32140
32093
|
affectsSemanticDiagnostics: true,
|
|
32141
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32142
32094
|
strictFlag: true,
|
|
32143
32095
|
category: ts.Diagnostics.Type_Checking,
|
|
32144
32096
|
description: ts.Diagnostics.Enable_error_reporting_when_this_is_given_the_type_any,
|
|
@@ -32148,7 +32100,6 @@ var ts;
|
|
|
32148
32100
|
name: "useUnknownInCatchVariables",
|
|
32149
32101
|
type: "boolean",
|
|
32150
32102
|
affectsSemanticDiagnostics: true,
|
|
32151
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32152
32103
|
strictFlag: true,
|
|
32153
32104
|
category: ts.Diagnostics.Type_Checking,
|
|
32154
32105
|
description: ts.Diagnostics.Default_catch_clause_variables_as_unknown_instead_of_any,
|
|
@@ -32158,8 +32109,6 @@ var ts;
|
|
|
32158
32109
|
name: "alwaysStrict",
|
|
32159
32110
|
type: "boolean",
|
|
32160
32111
|
affectsSourceFile: true,
|
|
32161
|
-
affectsEmit: true,
|
|
32162
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32163
32112
|
strictFlag: true,
|
|
32164
32113
|
category: ts.Diagnostics.Type_Checking,
|
|
32165
32114
|
description: ts.Diagnostics.Ensure_use_strict_is_always_emitted,
|
|
@@ -32169,7 +32118,6 @@ var ts;
|
|
|
32169
32118
|
name: "noUnusedLocals",
|
|
32170
32119
|
type: "boolean",
|
|
32171
32120
|
affectsSemanticDiagnostics: true,
|
|
32172
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32173
32121
|
category: ts.Diagnostics.Type_Checking,
|
|
32174
32122
|
description: ts.Diagnostics.Enable_error_reporting_when_local_variables_aren_t_read,
|
|
32175
32123
|
defaultValueDescription: false,
|
|
@@ -32178,7 +32126,6 @@ var ts;
|
|
|
32178
32126
|
name: "noUnusedParameters",
|
|
32179
32127
|
type: "boolean",
|
|
32180
32128
|
affectsSemanticDiagnostics: true,
|
|
32181
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32182
32129
|
category: ts.Diagnostics.Type_Checking,
|
|
32183
32130
|
description: ts.Diagnostics.Raise_an_error_when_a_function_parameter_isn_t_read,
|
|
32184
32131
|
defaultValueDescription: false,
|
|
@@ -32187,7 +32134,6 @@ var ts;
|
|
|
32187
32134
|
name: "exactOptionalPropertyTypes",
|
|
32188
32135
|
type: "boolean",
|
|
32189
32136
|
affectsSemanticDiagnostics: true,
|
|
32190
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32191
32137
|
category: ts.Diagnostics.Type_Checking,
|
|
32192
32138
|
description: ts.Diagnostics.Interpret_optional_property_types_as_written_rather_than_adding_undefined,
|
|
32193
32139
|
defaultValueDescription: false,
|
|
@@ -32196,7 +32142,6 @@ var ts;
|
|
|
32196
32142
|
name: "noImplicitReturns",
|
|
32197
32143
|
type: "boolean",
|
|
32198
32144
|
affectsSemanticDiagnostics: true,
|
|
32199
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32200
32145
|
category: ts.Diagnostics.Type_Checking,
|
|
32201
32146
|
description: ts.Diagnostics.Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function,
|
|
32202
32147
|
defaultValueDescription: false,
|
|
@@ -32206,7 +32151,6 @@ var ts;
|
|
|
32206
32151
|
type: "boolean",
|
|
32207
32152
|
affectsBindDiagnostics: true,
|
|
32208
32153
|
affectsSemanticDiagnostics: true,
|
|
32209
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32210
32154
|
category: ts.Diagnostics.Type_Checking,
|
|
32211
32155
|
description: ts.Diagnostics.Enable_error_reporting_for_fallthrough_cases_in_switch_statements,
|
|
32212
32156
|
defaultValueDescription: false,
|
|
@@ -32215,7 +32159,6 @@ var ts;
|
|
|
32215
32159
|
name: "noUncheckedIndexedAccess",
|
|
32216
32160
|
type: "boolean",
|
|
32217
32161
|
affectsSemanticDiagnostics: true,
|
|
32218
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32219
32162
|
category: ts.Diagnostics.Type_Checking,
|
|
32220
32163
|
description: ts.Diagnostics.Add_undefined_to_a_type_when_accessed_using_an_index,
|
|
32221
32164
|
defaultValueDescription: false,
|
|
@@ -32224,7 +32167,6 @@ var ts;
|
|
|
32224
32167
|
name: "noImplicitOverride",
|
|
32225
32168
|
type: "boolean",
|
|
32226
32169
|
affectsSemanticDiagnostics: true,
|
|
32227
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32228
32170
|
category: ts.Diagnostics.Type_Checking,
|
|
32229
32171
|
description: ts.Diagnostics.Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier,
|
|
32230
32172
|
defaultValueDescription: false,
|
|
@@ -32232,8 +32174,6 @@ var ts;
|
|
|
32232
32174
|
{
|
|
32233
32175
|
name: "noPropertyAccessFromIndexSignature",
|
|
32234
32176
|
type: "boolean",
|
|
32235
|
-
affectsSemanticDiagnostics: true,
|
|
32236
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32237
32177
|
showInSimplifiedHelpView: false,
|
|
32238
32178
|
category: ts.Diagnostics.Type_Checking,
|
|
32239
32179
|
description: ts.Diagnostics.Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type,
|
|
@@ -32314,7 +32254,6 @@ var ts;
|
|
|
32314
32254
|
name: "allowSyntheticDefaultImports",
|
|
32315
32255
|
type: "boolean",
|
|
32316
32256
|
affectsSemanticDiagnostics: true,
|
|
32317
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32318
32257
|
category: ts.Diagnostics.Interop_Constraints,
|
|
32319
32258
|
description: ts.Diagnostics.Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export,
|
|
32320
32259
|
defaultValueDescription: ts.Diagnostics.module_system_or_esModuleInterop
|
|
@@ -32324,7 +32263,6 @@ var ts;
|
|
|
32324
32263
|
type: "boolean",
|
|
32325
32264
|
affectsSemanticDiagnostics: true,
|
|
32326
32265
|
affectsEmit: true,
|
|
32327
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32328
32266
|
showInSimplifiedHelpView: true,
|
|
32329
32267
|
category: ts.Diagnostics.Interop_Constraints,
|
|
32330
32268
|
description: ts.Diagnostics.Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility,
|
|
@@ -32341,7 +32279,6 @@ var ts;
|
|
|
32341
32279
|
name: "allowUmdGlobalAccess",
|
|
32342
32280
|
type: "boolean",
|
|
32343
32281
|
affectsSemanticDiagnostics: true,
|
|
32344
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32345
32282
|
category: ts.Diagnostics.Modules,
|
|
32346
32283
|
description: ts.Diagnostics.Allow_accessing_UMD_globals_from_modules,
|
|
32347
32284
|
defaultValueDescription: false,
|
|
@@ -32362,7 +32299,6 @@ var ts;
|
|
|
32362
32299
|
name: "sourceRoot",
|
|
32363
32300
|
type: "string",
|
|
32364
32301
|
affectsEmit: true,
|
|
32365
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32366
32302
|
paramType: ts.Diagnostics.LOCATION,
|
|
32367
32303
|
category: ts.Diagnostics.Emit,
|
|
32368
32304
|
description: ts.Diagnostics.Specify_the_root_path_for_debuggers_to_find_the_reference_source_code,
|
|
@@ -32371,7 +32307,6 @@ var ts;
|
|
|
32371
32307
|
name: "mapRoot",
|
|
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_location_where_debugger_should_locate_map_files_instead_of_generated_locations,
|
|
@@ -32380,7 +32315,6 @@ var ts;
|
|
|
32380
32315
|
name: "inlineSourceMap",
|
|
32381
32316
|
type: "boolean",
|
|
32382
32317
|
affectsEmit: true,
|
|
32383
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32384
32318
|
category: ts.Diagnostics.Emit,
|
|
32385
32319
|
description: ts.Diagnostics.Include_sourcemap_files_inside_the_emitted_JavaScript,
|
|
32386
32320
|
defaultValueDescription: false,
|
|
@@ -32389,7 +32323,6 @@ var ts;
|
|
|
32389
32323
|
name: "inlineSources",
|
|
32390
32324
|
type: "boolean",
|
|
32391
32325
|
affectsEmit: true,
|
|
32392
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32393
32326
|
category: ts.Diagnostics.Emit,
|
|
32394
32327
|
description: ts.Diagnostics.Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript,
|
|
32395
32328
|
defaultValueDescription: false,
|
|
@@ -32398,7 +32331,6 @@ var ts;
|
|
|
32398
32331
|
name: "experimentalDecorators",
|
|
32399
32332
|
type: "boolean",
|
|
32400
32333
|
affectsSemanticDiagnostics: true,
|
|
32401
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32402
32334
|
category: ts.Diagnostics.Language_and_Environment,
|
|
32403
32335
|
description: ts.Diagnostics.Enable_experimental_support_for_TC39_stage_2_draft_decorators,
|
|
32404
32336
|
defaultValueDescription: false,
|
|
@@ -32408,7 +32340,6 @@ var ts;
|
|
|
32408
32340
|
type: "boolean",
|
|
32409
32341
|
affectsSemanticDiagnostics: true,
|
|
32410
32342
|
affectsEmit: true,
|
|
32411
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32412
32343
|
category: ts.Diagnostics.Language_and_Environment,
|
|
32413
32344
|
description: ts.Diagnostics.Emit_design_type_metadata_for_decorated_declarations_in_source_files,
|
|
32414
32345
|
defaultValueDescription: false,
|
|
@@ -32432,7 +32363,6 @@ var ts;
|
|
|
32432
32363
|
type: "string",
|
|
32433
32364
|
affectsSemanticDiagnostics: true,
|
|
32434
32365
|
affectsEmit: true,
|
|
32435
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32436
32366
|
affectsModuleResolution: true,
|
|
32437
32367
|
category: ts.Diagnostics.Language_and_Environment,
|
|
32438
32368
|
description: ts.Diagnostics.Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk,
|
|
@@ -32450,9 +32380,6 @@ var ts;
|
|
|
32450
32380
|
name: "out",
|
|
32451
32381
|
type: "string",
|
|
32452
32382
|
affectsEmit: true,
|
|
32453
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32454
|
-
affectsDeclarationPath: true,
|
|
32455
|
-
affectsBundleEmitBuildInfo: true,
|
|
32456
32383
|
isFilePath: false,
|
|
32457
32384
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
32458
32385
|
paramType: ts.Diagnostics.FILE,
|
|
@@ -32463,7 +32390,6 @@ var ts;
|
|
|
32463
32390
|
name: "reactNamespace",
|
|
32464
32391
|
type: "string",
|
|
32465
32392
|
affectsEmit: true,
|
|
32466
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32467
32393
|
category: ts.Diagnostics.Language_and_Environment,
|
|
32468
32394
|
description: ts.Diagnostics.Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit,
|
|
32469
32395
|
defaultValueDescription: "`React`",
|
|
@@ -32471,7 +32397,6 @@ var ts;
|
|
|
32471
32397
|
{
|
|
32472
32398
|
name: "skipDefaultLibCheck",
|
|
32473
32399
|
type: "boolean",
|
|
32474
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32475
32400
|
category: ts.Diagnostics.Completeness,
|
|
32476
32401
|
description: ts.Diagnostics.Skip_type_checking_d_ts_files_that_are_included_with_TypeScript,
|
|
32477
32402
|
defaultValueDescription: false,
|
|
@@ -32487,7 +32412,6 @@ var ts;
|
|
|
32487
32412
|
name: "emitBOM",
|
|
32488
32413
|
type: "boolean",
|
|
32489
32414
|
affectsEmit: true,
|
|
32490
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32491
32415
|
category: ts.Diagnostics.Emit,
|
|
32492
32416
|
description: ts.Diagnostics.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files,
|
|
32493
32417
|
defaultValueDescription: false,
|
|
@@ -32499,7 +32423,6 @@ var ts;
|
|
|
32499
32423
|
lf: 1
|
|
32500
32424
|
})),
|
|
32501
32425
|
affectsEmit: true,
|
|
32502
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32503
32426
|
paramType: ts.Diagnostics.NEWLINE,
|
|
32504
32427
|
category: ts.Diagnostics.Emit,
|
|
32505
32428
|
description: ts.Diagnostics.Set_the_newline_character_for_emitting_files,
|
|
@@ -32509,7 +32432,6 @@ var ts;
|
|
|
32509
32432
|
name: "noErrorTruncation",
|
|
32510
32433
|
type: "boolean",
|
|
32511
32434
|
affectsSemanticDiagnostics: true,
|
|
32512
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32513
32435
|
category: ts.Diagnostics.Output_Formatting,
|
|
32514
32436
|
description: ts.Diagnostics.Disable_truncating_types_in_error_messages,
|
|
32515
32437
|
defaultValueDescription: false,
|
|
@@ -32536,7 +32458,6 @@ var ts;
|
|
|
32536
32458
|
name: "stripInternal",
|
|
32537
32459
|
type: "boolean",
|
|
32538
32460
|
affectsEmit: true,
|
|
32539
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32540
32461
|
category: ts.Diagnostics.Emit,
|
|
32541
32462
|
description: ts.Diagnostics.Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments,
|
|
32542
32463
|
defaultValueDescription: false,
|
|
@@ -32577,7 +32498,6 @@ var ts;
|
|
|
32577
32498
|
name: "noImplicitUseStrict",
|
|
32578
32499
|
type: "boolean",
|
|
32579
32500
|
affectsSemanticDiagnostics: true,
|
|
32580
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32581
32501
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
32582
32502
|
description: ts.Diagnostics.Disable_adding_use_strict_directives_in_emitted_JavaScript_files,
|
|
32583
32503
|
defaultValueDescription: false,
|
|
@@ -32586,7 +32506,6 @@ var ts;
|
|
|
32586
32506
|
name: "noEmitHelpers",
|
|
32587
32507
|
type: "boolean",
|
|
32588
32508
|
affectsEmit: true,
|
|
32589
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32590
32509
|
category: ts.Diagnostics.Emit,
|
|
32591
32510
|
description: ts.Diagnostics.Disable_generating_custom_helper_functions_like_extends_in_compiled_output,
|
|
32592
32511
|
defaultValueDescription: false,
|
|
@@ -32595,7 +32514,6 @@ var ts;
|
|
|
32595
32514
|
name: "noEmitOnError",
|
|
32596
32515
|
type: "boolean",
|
|
32597
32516
|
affectsEmit: true,
|
|
32598
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32599
32517
|
category: ts.Diagnostics.Emit,
|
|
32600
32518
|
transpileOptionValue: undefined,
|
|
32601
32519
|
description: ts.Diagnostics.Disable_emitting_files_if_any_type_checking_errors_are_reported,
|
|
@@ -32605,7 +32523,6 @@ var ts;
|
|
|
32605
32523
|
name: "preserveConstEnums",
|
|
32606
32524
|
type: "boolean",
|
|
32607
32525
|
affectsEmit: true,
|
|
32608
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32609
32526
|
category: ts.Diagnostics.Emit,
|
|
32610
32527
|
description: ts.Diagnostics.Disable_erasing_const_enum_declarations_in_generated_code,
|
|
32611
32528
|
defaultValueDescription: false,
|
|
@@ -32614,8 +32531,6 @@ var ts;
|
|
|
32614
32531
|
name: "declarationDir",
|
|
32615
32532
|
type: "string",
|
|
32616
32533
|
affectsEmit: true,
|
|
32617
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32618
|
-
affectsDeclarationPath: true,
|
|
32619
32534
|
isFilePath: true,
|
|
32620
32535
|
paramType: ts.Diagnostics.DIRECTORY,
|
|
32621
32536
|
category: ts.Diagnostics.Emit,
|
|
@@ -32625,7 +32540,6 @@ var ts;
|
|
|
32625
32540
|
{
|
|
32626
32541
|
name: "skipLibCheck",
|
|
32627
32542
|
type: "boolean",
|
|
32628
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32629
32543
|
category: ts.Diagnostics.Completeness,
|
|
32630
32544
|
description: ts.Diagnostics.Skip_type_checking_all_d_ts_files,
|
|
32631
32545
|
defaultValueDescription: false,
|
|
@@ -32635,7 +32549,6 @@ var ts;
|
|
|
32635
32549
|
type: "boolean",
|
|
32636
32550
|
affectsBindDiagnostics: true,
|
|
32637
32551
|
affectsSemanticDiagnostics: true,
|
|
32638
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32639
32552
|
category: ts.Diagnostics.Type_Checking,
|
|
32640
32553
|
description: ts.Diagnostics.Disable_error_reporting_for_unused_labels,
|
|
32641
32554
|
defaultValueDescription: undefined,
|
|
@@ -32645,7 +32558,6 @@ var ts;
|
|
|
32645
32558
|
type: "boolean",
|
|
32646
32559
|
affectsBindDiagnostics: true,
|
|
32647
32560
|
affectsSemanticDiagnostics: true,
|
|
32648
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32649
32561
|
category: ts.Diagnostics.Type_Checking,
|
|
32650
32562
|
description: ts.Diagnostics.Disable_error_reporting_for_unreachable_code,
|
|
32651
32563
|
defaultValueDescription: undefined,
|
|
@@ -32654,7 +32566,6 @@ var ts;
|
|
|
32654
32566
|
name: "suppressExcessPropertyErrors",
|
|
32655
32567
|
type: "boolean",
|
|
32656
32568
|
affectsSemanticDiagnostics: true,
|
|
32657
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32658
32569
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
32659
32570
|
description: ts.Diagnostics.Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals,
|
|
32660
32571
|
defaultValueDescription: false,
|
|
@@ -32663,7 +32574,6 @@ var ts;
|
|
|
32663
32574
|
name: "suppressImplicitAnyIndexErrors",
|
|
32664
32575
|
type: "boolean",
|
|
32665
32576
|
affectsSemanticDiagnostics: true,
|
|
32666
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32667
32577
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
32668
32578
|
description: ts.Diagnostics.Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures,
|
|
32669
32579
|
defaultValueDescription: false,
|
|
@@ -32688,7 +32598,6 @@ var ts;
|
|
|
32688
32598
|
name: "noStrictGenericChecks",
|
|
32689
32599
|
type: "boolean",
|
|
32690
32600
|
affectsSemanticDiagnostics: true,
|
|
32691
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32692
32601
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
32693
32602
|
description: ts.Diagnostics.Disable_strict_checking_of_generic_signatures_in_function_types,
|
|
32694
32603
|
defaultValueDescription: false,
|
|
@@ -32698,7 +32607,6 @@ var ts;
|
|
|
32698
32607
|
type: "boolean",
|
|
32699
32608
|
affectsSemanticDiagnostics: true,
|
|
32700
32609
|
affectsEmit: true,
|
|
32701
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32702
32610
|
category: ts.Diagnostics.Language_and_Environment,
|
|
32703
32611
|
description: ts.Diagnostics.Emit_ECMAScript_standard_compliant_class_fields,
|
|
32704
32612
|
defaultValueDescription: ts.Diagnostics.true_for_ES2022_and_above_including_ESNext
|
|
@@ -32707,7 +32615,6 @@ var ts;
|
|
|
32707
32615
|
name: "preserveValueImports",
|
|
32708
32616
|
type: "boolean",
|
|
32709
32617
|
affectsEmit: true,
|
|
32710
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32711
32618
|
category: ts.Diagnostics.Emit,
|
|
32712
32619
|
description: ts.Diagnostics.Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed,
|
|
32713
32620
|
defaultValueDescription: false,
|
|
@@ -32746,7 +32653,6 @@ var ts;
|
|
|
32746
32653
|
ts.optionDeclarations = __spreadArray(__spreadArray([], ts.commonOptionsWithBuild, true), commandOptionsWithoutBuild, true);
|
|
32747
32654
|
ts.semanticDiagnosticsOptionDeclarations = ts.optionDeclarations.filter(function (option) { return !!option.affectsSemanticDiagnostics; });
|
|
32748
32655
|
ts.affectsEmitOptionDeclarations = ts.optionDeclarations.filter(function (option) { return !!option.affectsEmit; });
|
|
32749
|
-
ts.affectsDeclarationPathOptionDeclarations = ts.optionDeclarations.filter(function (option) { return !!option.affectsDeclarationPath; });
|
|
32750
32656
|
ts.moduleResolutionOptionDeclarations = ts.optionDeclarations.filter(function (option) { return !!option.affectsModuleResolution; });
|
|
32751
32657
|
ts.sourceFileAffectingCompilerOptions = ts.optionDeclarations.filter(function (option) {
|
|
32752
32658
|
return !!option.affectsSourceFile || !!option.affectsModuleResolution || !!option.affectsBindDiagnostics;
|
|
@@ -33526,7 +33432,6 @@ var ts;
|
|
|
33526
33432
|
}
|
|
33527
33433
|
});
|
|
33528
33434
|
}
|
|
33529
|
-
ts.getNameOfCompilerOptionValue = getNameOfCompilerOptionValue;
|
|
33530
33435
|
function serializeCompilerOptions(options, pathOptions) {
|
|
33531
33436
|
return serializeOptionBaseObject(options, getOptionsNameMap(), pathOptions);
|
|
33532
33437
|
}
|
|
@@ -39850,6 +39755,7 @@ var ts;
|
|
|
39850
39755
|
var emptyTypeLiteralSymbol = createSymbol(2048, "__type");
|
|
39851
39756
|
emptyTypeLiteralSymbol.members = ts.createSymbolTable();
|
|
39852
39757
|
var emptyTypeLiteralType = createAnonymousType(emptyTypeLiteralSymbol, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray);
|
|
39758
|
+
var unknownUnionType = strictNullChecks ? getUnionType([undefinedType, nullType, createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray)]) : unknownType;
|
|
39853
39759
|
var emptyGenericType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray);
|
|
39854
39760
|
emptyGenericType.instantiations = new ts.Map();
|
|
39855
39761
|
var anyFunctionType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray);
|
|
@@ -48659,7 +48565,7 @@ var ts;
|
|
|
48659
48565
|
}
|
|
48660
48566
|
}
|
|
48661
48567
|
}
|
|
48662
|
-
else if (t.flags & 469892092) {
|
|
48568
|
+
else if (t.flags & 469892092 || isEmptyAnonymousObjectType(t)) {
|
|
48663
48569
|
hasDisjointDomainType = true;
|
|
48664
48570
|
}
|
|
48665
48571
|
}
|
|
@@ -48667,7 +48573,7 @@ var ts;
|
|
|
48667
48573
|
if (hasDisjointDomainType) {
|
|
48668
48574
|
for (var _a = 0, types_6 = types; _a < types_6.length; _a++) {
|
|
48669
48575
|
var t = types_6[_a];
|
|
48670
|
-
if (t.flags & 469892092) {
|
|
48576
|
+
if (t.flags & 469892092 || isEmptyAnonymousObjectType(t)) {
|
|
48671
48577
|
constraints = ts.append(constraints, t);
|
|
48672
48578
|
}
|
|
48673
48579
|
}
|
|
@@ -50937,7 +50843,7 @@ var ts;
|
|
|
50937
50843
|
}
|
|
50938
50844
|
return includes;
|
|
50939
50845
|
}
|
|
50940
|
-
function
|
|
50846
|
+
function removeRedundantSupertypes(types, includes) {
|
|
50941
50847
|
var i = types.length;
|
|
50942
50848
|
while (i > 0) {
|
|
50943
50849
|
i--;
|
|
@@ -50945,7 +50851,9 @@ var ts;
|
|
|
50945
50851
|
var remove = t.flags & 4 && includes & (128 | 134217728 | 268435456) ||
|
|
50946
50852
|
t.flags & 8 && includes & 256 ||
|
|
50947
50853
|
t.flags & 64 && includes & 2048 ||
|
|
50948
|
-
t.flags & 4096 && includes & 8192
|
|
50854
|
+
t.flags & 4096 && includes & 8192 ||
|
|
50855
|
+
t.flags & 16384 && includes & 32768 ||
|
|
50856
|
+
isEmptyAnonymousObjectType(t) && includes & 470302716;
|
|
50949
50857
|
if (remove) {
|
|
50950
50858
|
ts.orderedRemoveItemAt(types, i);
|
|
50951
50859
|
}
|
|
@@ -51040,7 +50948,7 @@ var ts;
|
|
|
51040
50948
|
result.aliasTypeArguments = aliasTypeArguments;
|
|
51041
50949
|
return result;
|
|
51042
50950
|
}
|
|
51043
|
-
function getIntersectionType(types, aliasSymbol, aliasTypeArguments) {
|
|
50951
|
+
function getIntersectionType(types, aliasSymbol, aliasTypeArguments, noSupertypeReduction) {
|
|
51044
50952
|
var typeMembershipMap = new ts.Map();
|
|
51045
50953
|
var includes = addTypesToIntersection(typeMembershipMap, 0, types);
|
|
51046
50954
|
var typeSet = ts.arrayFrom(typeMembershipMap.values());
|
|
@@ -51068,11 +50976,11 @@ var ts;
|
|
|
51068
50976
|
if (includes & 4 && includes & (128 | 134217728 | 268435456) ||
|
|
51069
50977
|
includes & 8 && includes & 256 ||
|
|
51070
50978
|
includes & 64 && includes & 2048 ||
|
|
51071
|
-
includes & 4096 && includes & 8192
|
|
51072
|
-
|
|
51073
|
-
|
|
51074
|
-
|
|
51075
|
-
|
|
50979
|
+
includes & 4096 && includes & 8192 ||
|
|
50980
|
+
includes & 16384 && includes & 32768 ||
|
|
50981
|
+
includes & 16777216 && includes & 470302716) {
|
|
50982
|
+
if (!noSupertypeReduction)
|
|
50983
|
+
removeRedundantSupertypes(typeSet, includes);
|
|
51076
50984
|
}
|
|
51077
50985
|
if (includes & 262144) {
|
|
51078
50986
|
typeSet[typeSet.indexOf(undefinedType)] = missingType;
|
|
@@ -51104,7 +51012,7 @@ var ts;
|
|
|
51104
51012
|
return errorType;
|
|
51105
51013
|
}
|
|
51106
51014
|
var constituents = getCrossProductIntersections(typeSet);
|
|
51107
|
-
var origin = ts.some(constituents, function (t) { return !!(t.flags & 2097152); }) ? createOriginUnionOrIntersectionType(2097152, typeSet) : undefined;
|
|
51015
|
+
var origin = ts.some(constituents, function (t) { return !!(t.flags & 2097152); }) && getConstituentCountOfTypes(constituents) > getConstituentCountOfTypes(typeSet) ? createOriginUnionOrIntersectionType(2097152, typeSet) : undefined;
|
|
51108
51016
|
result = getUnionType(constituents, 1, aliasSymbol, aliasTypeArguments, origin);
|
|
51109
51017
|
}
|
|
51110
51018
|
}
|
|
@@ -51147,11 +51055,21 @@ var ts;
|
|
|
51147
51055
|
}
|
|
51148
51056
|
return intersections;
|
|
51149
51057
|
}
|
|
51058
|
+
function getConstituentCount(type) {
|
|
51059
|
+
return !(type.flags & 3145728) || type.aliasSymbol ? 1 :
|
|
51060
|
+
type.flags & 1048576 && type.origin ? getConstituentCount(type.origin) :
|
|
51061
|
+
getConstituentCountOfTypes(type.types);
|
|
51062
|
+
}
|
|
51063
|
+
function getConstituentCountOfTypes(types) {
|
|
51064
|
+
return ts.reduceLeft(types, function (n, t) { return n + getConstituentCount(t); }, 0);
|
|
51065
|
+
}
|
|
51150
51066
|
function getTypeFromIntersectionTypeNode(node) {
|
|
51151
51067
|
var links = getNodeLinks(node);
|
|
51152
51068
|
if (!links.resolvedType) {
|
|
51153
51069
|
var aliasSymbol = getAliasSymbolForTypeNode(node);
|
|
51154
|
-
|
|
51070
|
+
var types = ts.map(node.types, getTypeFromTypeNode);
|
|
51071
|
+
var noSupertypeReduction = types.length === 2 && !!(types[0].flags & (4 | 8 | 64)) && types[1] === emptyTypeLiteralType;
|
|
51072
|
+
links.resolvedType = getIntersectionType(types, aliasSymbol, getTypeArgumentsForAliasSymbol(aliasSymbol), noSupertypeReduction);
|
|
51155
51073
|
}
|
|
51156
51074
|
return links.resolvedType;
|
|
51157
51075
|
}
|
|
@@ -53630,6 +53548,17 @@ var ts;
|
|
|
53630
53548
|
return !!(ts.getObjectFlags(type) & 16 && (type.members && isEmptyResolvedType(type) ||
|
|
53631
53549
|
type.symbol && type.symbol.flags & 2048 && getMembersOfSymbol(type.symbol).size === 0));
|
|
53632
53550
|
}
|
|
53551
|
+
function isUnknownLikeUnionType(type) {
|
|
53552
|
+
if (strictNullChecks && type.flags & 1048576) {
|
|
53553
|
+
if (!(type.objectFlags & 33554432)) {
|
|
53554
|
+
var types = type.types;
|
|
53555
|
+
type.objectFlags |= 33554432 | (types.length >= 3 && types[0].flags & 32768 &&
|
|
53556
|
+
types[1].flags & 65536 && ts.some(types, isEmptyAnonymousObjectType) ? 67108864 : 0);
|
|
53557
|
+
}
|
|
53558
|
+
return !!(type.objectFlags & 67108864);
|
|
53559
|
+
}
|
|
53560
|
+
return false;
|
|
53561
|
+
}
|
|
53633
53562
|
function isStringIndexSignatureOnlyType(type) {
|
|
53634
53563
|
return type.flags & 524288 && !isGenericMappedType(type) && getPropertiesOfType(type).length === 0 && getIndexInfosOfType(type).length === 1 && !!getIndexInfoOfType(type, stringType) ||
|
|
53635
53564
|
type.flags & 3145728 && ts.every(type.types, isStringIndexSignatureOnlyType) ||
|
|
@@ -53707,13 +53636,15 @@ var ts;
|
|
|
53707
53636
|
return true;
|
|
53708
53637
|
if (s & 65536 && (!strictNullChecks && !(t & 3145728) || t & 65536))
|
|
53709
53638
|
return true;
|
|
53710
|
-
if (s & 524288 && t & 67108864)
|
|
53639
|
+
if (s & 524288 && t & 67108864 && !(relation === strictSubtypeRelation && isEmptyAnonymousObjectType(source)))
|
|
53711
53640
|
return true;
|
|
53712
53641
|
if (relation === assignableRelation || relation === comparableRelation) {
|
|
53713
53642
|
if (s & 1)
|
|
53714
53643
|
return true;
|
|
53715
53644
|
if (s & (8 | 256) && !(s & 1024) && (t & 32 || relation === assignableRelation && t & 256 && t & 1024))
|
|
53716
53645
|
return true;
|
|
53646
|
+
if (isUnknownLikeUnionType(target))
|
|
53647
|
+
return true;
|
|
53717
53648
|
}
|
|
53718
53649
|
return false;
|
|
53719
53650
|
}
|
|
@@ -53755,16 +53686,27 @@ var ts;
|
|
|
53755
53686
|
function getNormalizedType(type, writing) {
|
|
53756
53687
|
while (true) {
|
|
53757
53688
|
var t = isFreshLiteralType(type) ? type.regularType :
|
|
53758
|
-
ts.getObjectFlags(type) & 4
|
|
53759
|
-
type.flags & 3145728 ?
|
|
53689
|
+
ts.getObjectFlags(type) & 4 ? type.node ? createTypeReference(type.target, getTypeArguments(type)) : getSingleBaseForNonAugmentingSubtype(type) || type :
|
|
53690
|
+
type.flags & 3145728 ? getNormalizedUnionOrIntersectionType(type, writing) :
|
|
53760
53691
|
type.flags & 33554432 ? writing ? type.baseType : type.substitute :
|
|
53761
53692
|
type.flags & 25165824 ? getSimplifiedType(type, writing) :
|
|
53762
53693
|
type;
|
|
53763
|
-
t = getSingleBaseForNonAugmentingSubtype(t) || t;
|
|
53764
53694
|
if (t === type)
|
|
53765
|
-
|
|
53695
|
+
return t;
|
|
53766
53696
|
type = t;
|
|
53767
53697
|
}
|
|
53698
|
+
}
|
|
53699
|
+
function getNormalizedUnionOrIntersectionType(type, writing) {
|
|
53700
|
+
var reduced = getReducedType(type);
|
|
53701
|
+
if (reduced !== type) {
|
|
53702
|
+
return reduced;
|
|
53703
|
+
}
|
|
53704
|
+
if (type.flags & 2097152) {
|
|
53705
|
+
var normalizedTypes = ts.sameMap(type.types, function (t) { return getNormalizedType(t, writing); });
|
|
53706
|
+
if (normalizedTypes !== type.types) {
|
|
53707
|
+
return getIntersectionType(normalizedTypes);
|
|
53708
|
+
}
|
|
53709
|
+
}
|
|
53768
53710
|
return type;
|
|
53769
53711
|
}
|
|
53770
53712
|
function checkTypeRelatedTo(source, target, relation, errorNode, headMessage, containingMessageChain, errorOutputContainer) {
|
|
@@ -54139,6 +54081,7 @@ var ts;
|
|
|
54139
54081
|
return 0;
|
|
54140
54082
|
}
|
|
54141
54083
|
function reportErrorResults(originalSource, originalTarget, source, target, headMessage) {
|
|
54084
|
+
var _a, _b;
|
|
54142
54085
|
var sourceHasBase = !!getSingleBaseForNonAugmentingSubtype(originalSource);
|
|
54143
54086
|
var targetHasBase = !!getSingleBaseForNonAugmentingSubtype(originalTarget);
|
|
54144
54087
|
source = (originalSource.aliasSymbol || sourceHasBase) ? originalSource : source;
|
|
@@ -54177,6 +54120,9 @@ var ts;
|
|
|
54177
54120
|
return;
|
|
54178
54121
|
}
|
|
54179
54122
|
reportRelationError(headMessage, source, target);
|
|
54123
|
+
if (strictNullChecks && source.flags & 8650752 && ((_b = (_a = source.symbol) === null || _a === void 0 ? void 0 : _a.declarations) === null || _b === void 0 ? void 0 : _b[0]) && !getConstraintOfType(source) && isRelatedTo(emptyObjectType, extractTypesOfKind(target, ~67108864))) {
|
|
54124
|
+
associateRelatedInfo(ts.createDiagnosticForNode(source.symbol.declarations[0], ts.Diagnostics.This_type_parameter_probably_needs_an_extends_object_constraint));
|
|
54125
|
+
}
|
|
54180
54126
|
}
|
|
54181
54127
|
function traceUnionsOrIntersectionsTooLarge(source, target) {
|
|
54182
54128
|
if (!ts.tracing) {
|
|
@@ -54818,12 +54764,6 @@ var ts;
|
|
|
54818
54764
|
if (sourceFlags & 8650752) {
|
|
54819
54765
|
if (!(sourceFlags & 8388608 && targetFlags & 8388608)) {
|
|
54820
54766
|
var constraint = getConstraintOfType(source) || unknownType;
|
|
54821
|
-
if (!getConstraintOfType(source) || (sourceFlags & 262144 && constraint.flags & 1)) {
|
|
54822
|
-
if (result = isRelatedTo(emptyObjectType, extractTypesOfKind(target, ~67108864), 3)) {
|
|
54823
|
-
resetErrorInfo(saveErrorInfo);
|
|
54824
|
-
return result;
|
|
54825
|
-
}
|
|
54826
|
-
}
|
|
54827
54767
|
if (result = isRelatedTo(constraint, target, 1, false, undefined, intersectionState)) {
|
|
54828
54768
|
resetErrorInfo(saveErrorInfo);
|
|
54829
54769
|
return result;
|
|
@@ -56079,9 +56019,11 @@ var ts;
|
|
|
56079
56019
|
return getSupertypeOrUnion(types);
|
|
56080
56020
|
}
|
|
56081
56021
|
var primaryTypes = ts.filter(types, function (t) { return !(t.flags & 98304); });
|
|
56082
|
-
|
|
56083
|
-
|
|
56084
|
-
getUnionType(types,
|
|
56022
|
+
if (primaryTypes.length) {
|
|
56023
|
+
var supertypeOrUnion = getSupertypeOrUnion(primaryTypes);
|
|
56024
|
+
return primaryTypes === types ? supertypeOrUnion : getUnionType(__spreadArray([supertypeOrUnion], ts.filter(types, function (t) { return !!(t.flags & 98304); }), true));
|
|
56025
|
+
}
|
|
56026
|
+
return getUnionType(types, 2);
|
|
56085
56027
|
}
|
|
56086
56028
|
function getCommonSubtype(types) {
|
|
56087
56029
|
return ts.reduceLeft(types, function (s, t) { return isTypeSubtypeOf(t, s) ? t : s; });
|
|
@@ -56268,12 +56210,13 @@ var ts;
|
|
|
56268
56210
|
return result;
|
|
56269
56211
|
}
|
|
56270
56212
|
function getFalsyFlags(type) {
|
|
56271
|
-
|
|
56272
|
-
|
|
56273
|
-
|
|
56274
|
-
|
|
56275
|
-
|
|
56276
|
-
|
|
56213
|
+
var t = type.flags & 2097152 ? getBaseConstraintOrType(type) : type;
|
|
56214
|
+
return t.flags & 1048576 ? getFalsyFlagsOfTypes(t.types) :
|
|
56215
|
+
t.flags & 128 ? t.value === "" ? 128 : 0 :
|
|
56216
|
+
t.flags & 256 ? t.value === 0 ? 256 : 0 :
|
|
56217
|
+
t.flags & 2048 ? isZeroBigInt(t) ? 2048 : 0 :
|
|
56218
|
+
t.flags & 512 ? (t === falseType || t === regularFalseType) ? 512 : 0 :
|
|
56219
|
+
t.flags & 117724;
|
|
56277
56220
|
}
|
|
56278
56221
|
function removeDefinitelyFalsyTypes(type) {
|
|
56279
56222
|
return getFalsyFlags(type) & 117632 ?
|
|
@@ -56308,16 +56251,19 @@ var ts;
|
|
|
56308
56251
|
return type.flags & 32768 ? type : getUnionType([type, isProperty ? missingType : undefinedType]);
|
|
56309
56252
|
}
|
|
56310
56253
|
function getGlobalNonNullableTypeInstantiation(type) {
|
|
56311
|
-
var reducedType = getTypeWithFacts(type, 2097152);
|
|
56312
56254
|
if (!deferredGlobalNonNullableTypeAlias) {
|
|
56313
56255
|
deferredGlobalNonNullableTypeAlias = getGlobalSymbol("NonNullable", 524288, undefined) || unknownSymbol;
|
|
56314
56256
|
}
|
|
56315
56257
|
return deferredGlobalNonNullableTypeAlias !== unknownSymbol ?
|
|
56316
|
-
getTypeAliasInstantiation(deferredGlobalNonNullableTypeAlias, [
|
|
56317
|
-
|
|
56258
|
+
getTypeAliasInstantiation(deferredGlobalNonNullableTypeAlias, [type]) :
|
|
56259
|
+
getIntersectionType([type, emptyObjectType]);
|
|
56318
56260
|
}
|
|
56319
56261
|
function getNonNullableType(type) {
|
|
56320
|
-
|
|
56262
|
+
if (strictNullChecks) {
|
|
56263
|
+
var reducedType = getTypeWithFacts(type, 2097152);
|
|
56264
|
+
return maybeTypeOfKind(reducedType, 465829888) ? getGlobalNonNullableTypeInstantiation(reducedType) : reducedType;
|
|
56265
|
+
}
|
|
56266
|
+
return type;
|
|
56321
56267
|
}
|
|
56322
56268
|
function addOptionalTypeMarker(type) {
|
|
56323
56269
|
return strictNullChecks ? getUnionType([type, optionalType]) : type;
|
|
@@ -58138,6 +58084,24 @@ var ts;
|
|
|
58138
58084
|
function getTypeWithFacts(type, include) {
|
|
58139
58085
|
return filterType(type, function (t) { return (getTypeFacts(t) & include) !== 0; });
|
|
58140
58086
|
}
|
|
58087
|
+
function getIntersectionWithFacts(type, facts) {
|
|
58088
|
+
var reduced = recombineUnknownType(getTypeWithFacts(strictNullChecks && type.flags & 2 ? unknownUnionType : type, facts));
|
|
58089
|
+
if (strictNullChecks) {
|
|
58090
|
+
switch (facts) {
|
|
58091
|
+
case 524288:
|
|
58092
|
+
return mapType(reduced, function (t) { return getTypeFacts(t) & 65536 ? getIntersectionType([t, getTypeFacts(t) & 131072 && !maybeTypeOfKind(reduced, 65536) ? getUnionType([emptyObjectType, nullType]) : emptyObjectType]) : t; });
|
|
58093
|
+
case 1048576:
|
|
58094
|
+
return mapType(reduced, function (t) { return getTypeFacts(t) & 131072 ? getIntersectionType([t, getTypeFacts(t) & 65536 && !maybeTypeOfKind(reduced, 32768) ? getUnionType([emptyObjectType, undefinedType]) : emptyObjectType]) : t; });
|
|
58095
|
+
case 2097152:
|
|
58096
|
+
case 4194304:
|
|
58097
|
+
return mapType(reduced, function (t) { return getTypeFacts(t) & 262144 ? getGlobalNonNullableTypeInstantiation(t) : t; });
|
|
58098
|
+
}
|
|
58099
|
+
}
|
|
58100
|
+
return reduced;
|
|
58101
|
+
}
|
|
58102
|
+
function recombineUnknownType(type) {
|
|
58103
|
+
return type === unknownUnionType ? unknownType : type;
|
|
58104
|
+
}
|
|
58141
58105
|
function getTypeWithDefault(type, defaultExpression) {
|
|
58142
58106
|
return defaultExpression ?
|
|
58143
58107
|
getUnionType([getNonUndefinedType(type), getTypeOfExpression(defaultExpression)]) :
|
|
@@ -59078,7 +59042,7 @@ var ts;
|
|
|
59078
59042
|
if (isEvolvingArrayTypeList(types)) {
|
|
59079
59043
|
return getEvolvingArrayType(getUnionType(ts.map(types, getElementTypeOfEvolvingArrayType)));
|
|
59080
59044
|
}
|
|
59081
|
-
var result = getUnionType(ts.sameMap(types, finalizeEvolvingArrayType), subtypeReduction);
|
|
59045
|
+
var result = recombineUnknownType(getUnionType(ts.sameMap(types, finalizeEvolvingArrayType), subtypeReduction));
|
|
59082
59046
|
if (result !== declaredType && result.flags & declaredType.flags & 1048576 && ts.arraysEqual(result.types, declaredType.types)) {
|
|
59083
59047
|
return declaredType;
|
|
59084
59048
|
}
|
|
@@ -59174,8 +59138,7 @@ var ts;
|
|
|
59174
59138
|
}
|
|
59175
59139
|
function narrowTypeByTruthiness(type, expr, assumeTrue) {
|
|
59176
59140
|
if (isMatchingReference(reference, expr)) {
|
|
59177
|
-
return type
|
|
59178
|
-
getTypeWithFacts(type, assumeTrue ? 4194304 : 8388608);
|
|
59141
|
+
return getIntersectionWithFacts(type, assumeTrue ? 4194304 : 8388608);
|
|
59179
59142
|
}
|
|
59180
59143
|
if (strictNullChecks && assumeTrue && optionalChainContainsReference(expr, reference)) {
|
|
59181
59144
|
type = getTypeWithFacts(type, 2097152);
|
|
@@ -59315,9 +59278,6 @@ var ts;
|
|
|
59315
59278
|
assumeTrue = !assumeTrue;
|
|
59316
59279
|
}
|
|
59317
59280
|
var valueType = getTypeOfExpression(value);
|
|
59318
|
-
if (assumeTrue && (type.flags & 2) && (operator === 34 || operator === 35) && (valueType.flags & 65536)) {
|
|
59319
|
-
return getUnionType([nullType, undefinedType]);
|
|
59320
|
-
}
|
|
59321
59281
|
if ((type.flags & 2) && assumeTrue && (operator === 36 || operator === 37)) {
|
|
59322
59282
|
if (valueType.flags & (131068 | 67108864)) {
|
|
59323
59283
|
return valueType;
|
|
@@ -59337,7 +59297,7 @@ var ts;
|
|
|
59337
59297
|
valueType.flags & 65536 ?
|
|
59338
59298
|
assumeTrue ? 131072 : 1048576 :
|
|
59339
59299
|
assumeTrue ? 65536 : 524288;
|
|
59340
|
-
return
|
|
59300
|
+
return getIntersectionWithFacts(type, facts);
|
|
59341
59301
|
}
|
|
59342
59302
|
if (assumeTrue) {
|
|
59343
59303
|
var filterFn = operator === 34 ?
|
|
@@ -59364,14 +59324,11 @@ var ts;
|
|
|
59364
59324
|
if (type.flags & 1 && literal.text === "function") {
|
|
59365
59325
|
return type;
|
|
59366
59326
|
}
|
|
59367
|
-
if (assumeTrue && type.flags & 2 && literal.text === "object") {
|
|
59368
|
-
return type === nonNullUnknownType ? nonPrimitiveType : getUnionType([nonPrimitiveType, nullType]);
|
|
59369
|
-
}
|
|
59370
59327
|
var facts = assumeTrue ?
|
|
59371
59328
|
typeofEQFacts.get(literal.text) || 128 :
|
|
59372
59329
|
typeofNEFacts.get(literal.text) || 32768;
|
|
59373
59330
|
var impliedType = getImpliedTypeFromTypeofGuard(type, literal.text);
|
|
59374
|
-
return getTypeWithFacts(assumeTrue && impliedType ?
|
|
59331
|
+
return getTypeWithFacts(assumeTrue && impliedType ? narrowTypeByImpliedType(type, impliedType) : type, facts);
|
|
59375
59332
|
}
|
|
59376
59333
|
function narrowTypeBySwitchOptionalChainContainment(type, switchStatement, clauseStart, clauseEnd, clauseCheck) {
|
|
59377
59334
|
var everyClauseChecks = clauseStart !== clauseEnd && ts.every(getSwitchClauseTypes(switchStatement).slice(clauseStart, clauseEnd), clauseCheck);
|
|
@@ -59416,30 +59373,35 @@ var ts;
|
|
|
59416
59373
|
}
|
|
59417
59374
|
function getImpliedTypeFromTypeofGuard(type, text) {
|
|
59418
59375
|
switch (text) {
|
|
59376
|
+
case "object":
|
|
59377
|
+
return type.flags & 1 ? type : getUnionType([nullType, nonPrimitiveType]);
|
|
59419
59378
|
case "function":
|
|
59420
59379
|
return type.flags & 1 ? type : globalFunctionType;
|
|
59421
|
-
case "object":
|
|
59422
|
-
return type.flags & 2 ? getUnionType([nonPrimitiveType, nullType]) : type;
|
|
59423
59380
|
default:
|
|
59424
59381
|
return typeofTypesByName.get(text);
|
|
59425
59382
|
}
|
|
59426
59383
|
}
|
|
59427
|
-
function
|
|
59428
|
-
|
|
59429
|
-
|
|
59430
|
-
|
|
59431
|
-
|
|
59432
|
-
if (
|
|
59433
|
-
return
|
|
59384
|
+
function narrowTypeByImpliedType(type, candidate) {
|
|
59385
|
+
if (type.flags & 3) {
|
|
59386
|
+
return candidate;
|
|
59387
|
+
}
|
|
59388
|
+
return mapType(type, function (t) {
|
|
59389
|
+
if (isTypeRelatedTo(t, candidate, strictSubtypeRelation)) {
|
|
59390
|
+
return t;
|
|
59434
59391
|
}
|
|
59435
|
-
|
|
59436
|
-
|
|
59437
|
-
|
|
59438
|
-
return getIntersectionType([type, candidate]);
|
|
59392
|
+
return mapType(candidate, function (c) {
|
|
59393
|
+
if (!areTypesComparable(t, c)) {
|
|
59394
|
+
return neverType;
|
|
59439
59395
|
}
|
|
59440
|
-
|
|
59441
|
-
|
|
59442
|
-
|
|
59396
|
+
if (c.flags & 131068 && t.flags & 524288 && !isEmptyAnonymousObjectType(t)) {
|
|
59397
|
+
return isTypeSubtypeOf(c, t) ? c : neverType;
|
|
59398
|
+
}
|
|
59399
|
+
if (c === globalFunctionType && isTypeSubtypeOf(c, t)) {
|
|
59400
|
+
return c;
|
|
59401
|
+
}
|
|
59402
|
+
return getIntersectionType([t, c]);
|
|
59403
|
+
});
|
|
59404
|
+
});
|
|
59443
59405
|
}
|
|
59444
59406
|
function narrowBySwitchOnTypeOf(type, switchStatement, clauseStart, clauseEnd) {
|
|
59445
59407
|
var switchWitnesses = getSwitchClauseTypeOfWitnesses(switchStatement, true);
|
|
@@ -59465,7 +59427,7 @@ var ts;
|
|
|
59465
59427
|
return filterType(type, function (t) { return (getTypeFacts(t) & switchFacts) === switchFacts; });
|
|
59466
59428
|
}
|
|
59467
59429
|
var impliedType = getTypeWithFacts(getUnionType(clauseWitnesses.map(function (text) { return getImpliedTypeFromTypeofGuard(type, text) || type; })), switchFacts);
|
|
59468
|
-
return getTypeWithFacts(
|
|
59430
|
+
return getTypeWithFacts(narrowTypeByImpliedType(type, impliedType), switchFacts);
|
|
59469
59431
|
}
|
|
59470
59432
|
function isMatchingConstructorReference(expr) {
|
|
59471
59433
|
return (ts.isPropertyAccessExpression(expr) && ts.idText(expr.name) === "constructor" ||
|
|
@@ -59726,7 +59688,9 @@ var ts;
|
|
|
59726
59688
|
!(someType(type, isGenericTypeWithoutNullableConstraint) && isGenericIndexType(getTypeOfExpression(parent.argumentExpression)));
|
|
59727
59689
|
}
|
|
59728
59690
|
function isGenericTypeWithUnionConstraint(type) {
|
|
59729
|
-
return
|
|
59691
|
+
return type.flags & 2097152 ?
|
|
59692
|
+
ts.some(type.types, isGenericTypeWithUnionConstraint) :
|
|
59693
|
+
!!(type.flags & 465829888 && getBaseConstraintOrType(type).flags & (98304 | 1048576));
|
|
59730
59694
|
}
|
|
59731
59695
|
function isGenericTypeWithoutNullableConstraint(type) {
|
|
59732
59696
|
return !!(type.flags & 465829888 && !maybeTypeOfKind(getBaseConstraintOrType(type), 98304));
|
|
@@ -59743,7 +59707,7 @@ var ts;
|
|
|
59743
59707
|
var substituteConstraints = !(checkMode && checkMode & 2) &&
|
|
59744
59708
|
someType(type, isGenericTypeWithUnionConstraint) &&
|
|
59745
59709
|
(isConstraintPosition(type, reference) || hasContextualTypeWithNoGenericTypes(reference, checkMode));
|
|
59746
|
-
return substituteConstraints ? mapType(type,
|
|
59710
|
+
return substituteConstraints ? mapType(type, getBaseConstraintOrType) : type;
|
|
59747
59711
|
}
|
|
59748
59712
|
function isExportOrExportExpression(location) {
|
|
59749
59713
|
return !!ts.findAncestor(location, function (n) {
|
|
@@ -69219,7 +69183,7 @@ var ts;
|
|
|
69219
69183
|
}
|
|
69220
69184
|
if (ts.isBindingPattern(node.name)) {
|
|
69221
69185
|
var needCheckInitializer = node.initializer && node.parent.parent.kind !== 243;
|
|
69222
|
-
var needCheckWidenedType = node.name.elements.
|
|
69186
|
+
var needCheckWidenedType = !ts.some(node.name.elements, ts.not(ts.isOmittedExpression));
|
|
69223
69187
|
if (needCheckInitializer || needCheckWidenedType) {
|
|
69224
69188
|
var widenedType = getWidenedTypeForVariableLikeDeclaration(node);
|
|
69225
69189
|
if (needCheckInitializer) {
|
|
@@ -90565,8 +90529,7 @@ var ts;
|
|
|
90565
90529
|
return;
|
|
90566
90530
|
}
|
|
90567
90531
|
var version = ts.version;
|
|
90568
|
-
|
|
90569
|
-
ts.writeFile(host, emitterDiagnostics, buildInfoPath, getBuildInfoText(buildInfo), false, undefined, { buildInfo: buildInfo });
|
|
90532
|
+
ts.writeFile(host, emitterDiagnostics, buildInfoPath, getBuildInfoText({ bundle: bundle, program: program, version: version }), false);
|
|
90570
90533
|
}
|
|
90571
90534
|
function emitJsFileOrBundle(sourceFileOrBundle, jsFilePath, sourceMapFilePath, relativeToBuildInfo) {
|
|
90572
90535
|
if (!sourceFileOrBundle || emitOnlyDtsFiles || !jsFilePath) {
|
|
@@ -90707,17 +90670,12 @@ var ts;
|
|
|
90707
90670
|
if (sourceMapFilePath) {
|
|
90708
90671
|
var sourceMap = sourceMapGenerator.toString();
|
|
90709
90672
|
ts.writeFile(host, emitterDiagnostics, sourceMapFilePath, sourceMap, false, sourceFiles);
|
|
90710
|
-
if (printer.bundleFileInfo)
|
|
90711
|
-
printer.bundleFileInfo.mapHash = ts.BuilderState.computeSignature(sourceMap, ts.maybeBind(host, host.createHash));
|
|
90712
90673
|
}
|
|
90713
90674
|
}
|
|
90714
90675
|
else {
|
|
90715
90676
|
writer.writeLine();
|
|
90716
90677
|
}
|
|
90717
|
-
|
|
90718
|
-
ts.writeFile(host, emitterDiagnostics, jsFilePath, text, !!compilerOptions.emitBOM, sourceFiles, { sourceMapUrlPos: sourceMapUrlPos });
|
|
90719
|
-
if (printer.bundleFileInfo)
|
|
90720
|
-
printer.bundleFileInfo.hash = ts.BuilderState.computeSignature(text, ts.maybeBind(host, host.createHash));
|
|
90678
|
+
ts.writeFile(host, emitterDiagnostics, jsFilePath, writer.getText(), !!compilerOptions.emitBOM, sourceFiles, { sourceMapUrlPos: sourceMapUrlPos });
|
|
90721
90679
|
writer.clear();
|
|
90722
90680
|
}
|
|
90723
90681
|
function shouldEmitSourceMaps(mapOptions, sourceFileOrBundle) {
|
|
@@ -90842,50 +90800,30 @@ var ts;
|
|
|
90842
90800
|
});
|
|
90843
90801
|
}
|
|
90844
90802
|
function emitUsingBuildInfo(config, host, getCommandLine, customTransformers) {
|
|
90845
|
-
var createHash = ts.maybeBind(host, host.createHash);
|
|
90846
90803
|
var _a = getOutputPathsForBundle(config.options, false), buildInfoPath = _a.buildInfoPath, jsFilePath = _a.jsFilePath, sourceMapFilePath = _a.sourceMapFilePath, declarationFilePath = _a.declarationFilePath, declarationMapPath = _a.declarationMapPath;
|
|
90847
|
-
var
|
|
90848
|
-
if (
|
|
90849
|
-
var hostBuildInfo = host.getBuildInfo(buildInfoPath, config.options.configFilePath);
|
|
90850
|
-
if (!hostBuildInfo)
|
|
90851
|
-
return buildInfoPath;
|
|
90852
|
-
buildInfo = hostBuildInfo;
|
|
90853
|
-
}
|
|
90854
|
-
else {
|
|
90855
|
-
var buildInfoText = host.readFile(buildInfoPath);
|
|
90856
|
-
if (!buildInfoText)
|
|
90857
|
-
return buildInfoPath;
|
|
90858
|
-
buildInfo = getBuildInfo(buildInfoText);
|
|
90859
|
-
}
|
|
90860
|
-
if (!buildInfo.bundle || !buildInfo.bundle.js || (declarationFilePath && !buildInfo.bundle.dts))
|
|
90804
|
+
var buildInfoText = host.readFile(ts.Debug.checkDefined(buildInfoPath));
|
|
90805
|
+
if (!buildInfoText)
|
|
90861
90806
|
return buildInfoPath;
|
|
90862
90807
|
var jsFileText = host.readFile(ts.Debug.checkDefined(jsFilePath));
|
|
90863
90808
|
if (!jsFileText)
|
|
90864
90809
|
return jsFilePath;
|
|
90865
|
-
if (ts.BuilderState.computeSignature(jsFileText, createHash) !== buildInfo.bundle.js.hash)
|
|
90866
|
-
return jsFilePath;
|
|
90867
90810
|
var sourceMapText = sourceMapFilePath && host.readFile(sourceMapFilePath);
|
|
90868
90811
|
if ((sourceMapFilePath && !sourceMapText) || config.options.inlineSourceMap)
|
|
90869
90812
|
return sourceMapFilePath || "inline sourcemap decoding";
|
|
90870
|
-
if (sourceMapFilePath && ts.BuilderState.computeSignature(sourceMapText, createHash) !== buildInfo.bundle.js.mapHash)
|
|
90871
|
-
return sourceMapFilePath;
|
|
90872
90813
|
var declarationText = declarationFilePath && host.readFile(declarationFilePath);
|
|
90873
90814
|
if (declarationFilePath && !declarationText)
|
|
90874
90815
|
return declarationFilePath;
|
|
90875
|
-
if (declarationFilePath && ts.BuilderState.computeSignature(declarationText, createHash) !== buildInfo.bundle.dts.hash)
|
|
90876
|
-
return declarationFilePath;
|
|
90877
90816
|
var declarationMapText = declarationMapPath && host.readFile(declarationMapPath);
|
|
90878
90817
|
if ((declarationMapPath && !declarationMapText) || config.options.inlineSourceMap)
|
|
90879
90818
|
return declarationMapPath || "inline sourcemap decoding";
|
|
90880
|
-
|
|
90881
|
-
|
|
90819
|
+
var buildInfo = getBuildInfo(buildInfoText);
|
|
90820
|
+
if (!buildInfo.bundle || !buildInfo.bundle.js || (declarationText && !buildInfo.bundle.dts))
|
|
90821
|
+
return buildInfoPath;
|
|
90882
90822
|
var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));
|
|
90883
90823
|
var ownPrependInput = ts.createInputFiles(jsFileText, declarationText, sourceMapFilePath, sourceMapText, declarationMapPath, declarationMapText, jsFilePath, declarationFilePath, buildInfoPath, buildInfo, true);
|
|
90884
90824
|
var outputFiles = [];
|
|
90885
90825
|
var prependNodes = ts.createPrependNodes(config.projectReferences, getCommandLine, function (f) { return host.readFile(f); });
|
|
90886
90826
|
var sourceFilesForJsEmit = createSourceFilesFromBundleBuildInfo(buildInfo.bundle, buildInfoDirectory, host);
|
|
90887
|
-
var changedDtsText;
|
|
90888
|
-
var changedDtsData;
|
|
90889
90827
|
var emitHost = {
|
|
90890
90828
|
getPrependNodes: ts.memoize(function () { return __spreadArray(__spreadArray([], prependNodes, true), [ownPrependInput], false); }),
|
|
90891
90829
|
getCanonicalFileName: host.getCanonicalFileName,
|
|
@@ -90901,7 +90839,7 @@ var ts;
|
|
|
90901
90839
|
getResolvedProjectReferenceToRedirect: ts.returnUndefined,
|
|
90902
90840
|
getProjectReferenceRedirect: ts.returnUndefined,
|
|
90903
90841
|
isSourceOfProjectReferenceRedirect: ts.returnFalse,
|
|
90904
|
-
writeFile: function (name, text, writeByteOrderMark
|
|
90842
|
+
writeFile: function (name, text, writeByteOrderMark) {
|
|
90905
90843
|
switch (name) {
|
|
90906
90844
|
case jsFilePath:
|
|
90907
90845
|
if (jsFileText === text)
|
|
@@ -90912,25 +90850,19 @@ var ts;
|
|
|
90912
90850
|
return;
|
|
90913
90851
|
break;
|
|
90914
90852
|
case buildInfoPath:
|
|
90915
|
-
var newBuildInfo =
|
|
90853
|
+
var newBuildInfo = getBuildInfo(text);
|
|
90916
90854
|
newBuildInfo.program = buildInfo.program;
|
|
90917
|
-
if (newBuildInfo.program && changedDtsText !== undefined && config.options.composite) {
|
|
90918
|
-
newBuildInfo.program.outSignature = ts.computeSignature(changedDtsText, changedDtsData, createHash);
|
|
90919
|
-
newBuildInfo.program.dtsChangeTime = ts.getCurrentTime(host).getTime();
|
|
90920
|
-
}
|
|
90921
90855
|
var _a = buildInfo.bundle, js = _a.js, dts = _a.dts, sourceFiles = _a.sourceFiles;
|
|
90922
90856
|
newBuildInfo.bundle.js.sources = js.sources;
|
|
90923
90857
|
if (dts) {
|
|
90924
90858
|
newBuildInfo.bundle.dts.sources = dts.sources;
|
|
90925
90859
|
}
|
|
90926
90860
|
newBuildInfo.bundle.sourceFiles = sourceFiles;
|
|
90927
|
-
outputFiles.push({ name: name, text: getBuildInfoText(newBuildInfo), writeByteOrderMark: writeByteOrderMark
|
|
90861
|
+
outputFiles.push({ name: name, text: getBuildInfoText(newBuildInfo), writeByteOrderMark: writeByteOrderMark });
|
|
90928
90862
|
return;
|
|
90929
90863
|
case declarationFilePath:
|
|
90930
90864
|
if (declarationText === text)
|
|
90931
90865
|
return;
|
|
90932
|
-
changedDtsText = text;
|
|
90933
|
-
changedDtsData = data;
|
|
90934
90866
|
break;
|
|
90935
90867
|
case declarationMapPath:
|
|
90936
90868
|
if (declarationMapText === text)
|
|
@@ -90949,7 +90881,6 @@ var ts;
|
|
|
90949
90881
|
getSourceFileFromReference: ts.returnUndefined,
|
|
90950
90882
|
redirectTargetsMap: ts.createMultiMap(),
|
|
90951
90883
|
getFileIncludeReasons: ts.notImplemented,
|
|
90952
|
-
createHash: createHash,
|
|
90953
90884
|
};
|
|
90954
90885
|
emitFiles(ts.notImplementedResolver, emitHost, undefined, ts.getTransformers(config.options, customTransformers));
|
|
90955
90886
|
return outputFiles;
|
|
@@ -95574,6 +95505,7 @@ var ts;
|
|
|
95574
95505
|
if (system === void 0) { system = ts.sys; }
|
|
95575
95506
|
var existingDirectories = new ts.Map();
|
|
95576
95507
|
var getCanonicalFileName = ts.createGetCanonicalFileName(system.useCaseSensitiveFileNames);
|
|
95508
|
+
var computeHash = ts.maybeBind(system, system.createHash) || ts.generateDjb2Hash;
|
|
95577
95509
|
function getSourceFile(fileName, languageVersionOrOptions, onError) {
|
|
95578
95510
|
var text;
|
|
95579
95511
|
try {
|
|
@@ -95603,7 +95535,7 @@ var ts;
|
|
|
95603
95535
|
function writeFile(fileName, data, writeByteOrderMark, onError) {
|
|
95604
95536
|
try {
|
|
95605
95537
|
ts.performance.mark("beforeIOWrite");
|
|
95606
|
-
ts.writeFileEnsuringDirectories(fileName, data, writeByteOrderMark, function (path, data, writeByteOrderMark) { return
|
|
95538
|
+
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); });
|
|
95607
95539
|
ts.performance.mark("afterIOWrite");
|
|
95608
95540
|
ts.performance.measure("I/O Write", "beforeIOWrite", "afterIOWrite");
|
|
95609
95541
|
}
|
|
@@ -95613,6 +95545,34 @@ var ts;
|
|
|
95613
95545
|
}
|
|
95614
95546
|
}
|
|
95615
95547
|
}
|
|
95548
|
+
var outputFingerprints;
|
|
95549
|
+
function writeFileWorker(fileName, data, writeByteOrderMark) {
|
|
95550
|
+
if (!ts.isWatchSet(options) || !system.getModifiedTime) {
|
|
95551
|
+
system.writeFile(fileName, data, writeByteOrderMark);
|
|
95552
|
+
return;
|
|
95553
|
+
}
|
|
95554
|
+
if (!outputFingerprints) {
|
|
95555
|
+
outputFingerprints = new ts.Map();
|
|
95556
|
+
}
|
|
95557
|
+
var hash = computeHash(data);
|
|
95558
|
+
var mtimeBefore = system.getModifiedTime(fileName);
|
|
95559
|
+
if (mtimeBefore) {
|
|
95560
|
+
var fingerprint = outputFingerprints.get(fileName);
|
|
95561
|
+
if (fingerprint &&
|
|
95562
|
+
fingerprint.byteOrderMark === writeByteOrderMark &&
|
|
95563
|
+
fingerprint.hash === hash &&
|
|
95564
|
+
fingerprint.mtime.getTime() === mtimeBefore.getTime()) {
|
|
95565
|
+
return;
|
|
95566
|
+
}
|
|
95567
|
+
}
|
|
95568
|
+
system.writeFile(fileName, data, writeByteOrderMark);
|
|
95569
|
+
var mtimeAfter = system.getModifiedTime(fileName) || ts.missingFileModifiedTime;
|
|
95570
|
+
outputFingerprints.set(fileName, {
|
|
95571
|
+
hash: hash,
|
|
95572
|
+
byteOrderMark: writeByteOrderMark,
|
|
95573
|
+
mtime: mtimeAfter
|
|
95574
|
+
});
|
|
95575
|
+
}
|
|
95616
95576
|
function getDefaultLibLocation() {
|
|
95617
95577
|
return ts.getDirectoryPath(ts.normalizePath(system.getExecutingFilePath()));
|
|
95618
95578
|
}
|
|
@@ -96986,7 +96946,6 @@ var ts;
|
|
|
96986
96946
|
getSourceFileFromReference: function (file, ref) { return program.getSourceFileFromReference(file, ref); },
|
|
96987
96947
|
redirectTargetsMap: redirectTargetsMap,
|
|
96988
96948
|
getFileIncludeReasons: program.getFileIncludeReasons,
|
|
96989
|
-
createHash: ts.maybeBind(host, host.createHash),
|
|
96990
96949
|
};
|
|
96991
96950
|
}
|
|
96992
96951
|
function writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data) {
|
|
@@ -98893,9 +98852,13 @@ var ts;
|
|
|
98893
98852
|
function createManyToManyPathMap() {
|
|
98894
98853
|
function create(forward, reverse, deleted) {
|
|
98895
98854
|
var map = {
|
|
98855
|
+
clone: function () { return create(new ts.Map(forward), new ts.Map(reverse), deleted && new ts.Set(deleted)); },
|
|
98856
|
+
forEach: function (fn) { return forward.forEach(fn); },
|
|
98896
98857
|
getKeys: function (v) { return reverse.get(v); },
|
|
98897
98858
|
getValues: function (k) { return forward.get(k); },
|
|
98859
|
+
hasKey: function (k) { return forward.has(k); },
|
|
98898
98860
|
keys: function () { return forward.keys(); },
|
|
98861
|
+
deletedKeys: function () { return deleted; },
|
|
98899
98862
|
deleteKey: function (k) {
|
|
98900
98863
|
(deleted || (deleted = new ts.Set())).add(k);
|
|
98901
98864
|
var set = forward.get(k);
|
|
@@ -98922,6 +98885,11 @@ var ts;
|
|
|
98922
98885
|
});
|
|
98923
98886
|
return map;
|
|
98924
98887
|
},
|
|
98888
|
+
clear: function () {
|
|
98889
|
+
forward.clear();
|
|
98890
|
+
reverse.clear();
|
|
98891
|
+
deleted === null || deleted === void 0 ? void 0 : deleted.clear();
|
|
98892
|
+
}
|
|
98925
98893
|
};
|
|
98926
98894
|
return map;
|
|
98927
98895
|
}
|
|
@@ -99025,45 +98993,35 @@ var ts;
|
|
|
99025
98993
|
}
|
|
99026
98994
|
BuilderState.canReuseOldState = canReuseOldState;
|
|
99027
98995
|
function create(newProgram, getCanonicalFileName, oldState, disableUseFileVersionAsSignature) {
|
|
99028
|
-
var _a, _b, _c;
|
|
99029
98996
|
var fileInfos = new ts.Map();
|
|
99030
98997
|
var referencedMap = newProgram.getCompilerOptions().module !== ts.ModuleKind.None ? createManyToManyPathMap() : undefined;
|
|
99031
98998
|
var exportedModulesMap = referencedMap ? createManyToManyPathMap() : undefined;
|
|
98999
|
+
var hasCalledUpdateShapeSignature = new ts.Set();
|
|
99032
99000
|
var useOldState = canReuseOldState(referencedMap, oldState);
|
|
99033
99001
|
newProgram.getTypeChecker();
|
|
99034
|
-
for (var _i = 0,
|
|
99035
|
-
var sourceFile =
|
|
99002
|
+
for (var _i = 0, _a = newProgram.getSourceFiles(); _i < _a.length; _i++) {
|
|
99003
|
+
var sourceFile = _a[_i];
|
|
99036
99004
|
var version_2 = ts.Debug.checkDefined(sourceFile.version, "Program intended to be used with Builder should have source files with versions set");
|
|
99037
|
-
var
|
|
99038
|
-
var signature = oldUncommitedSignature === undefined ?
|
|
99039
|
-
useOldState ? (_b = oldState.fileInfos.get(sourceFile.resolvedPath)) === null || _b === void 0 ? void 0 : _b.signature : undefined :
|
|
99040
|
-
oldUncommitedSignature || undefined;
|
|
99005
|
+
var oldInfo = useOldState ? oldState.fileInfos.get(sourceFile.resolvedPath) : undefined;
|
|
99041
99006
|
if (referencedMap) {
|
|
99042
99007
|
var newReferences = getReferencedFiles(newProgram, sourceFile, getCanonicalFileName);
|
|
99043
99008
|
if (newReferences) {
|
|
99044
99009
|
referencedMap.set(sourceFile.resolvedPath, newReferences);
|
|
99045
99010
|
}
|
|
99046
99011
|
if (useOldState) {
|
|
99047
|
-
var
|
|
99048
|
-
var exportedModules = oldUncommitedExportedModules === undefined ?
|
|
99049
|
-
oldState.exportedModulesMap.getValues(sourceFile.resolvedPath) :
|
|
99050
|
-
oldUncommitedExportedModules || undefined;
|
|
99012
|
+
var exportedModules = oldState.exportedModulesMap.getValues(sourceFile.resolvedPath);
|
|
99051
99013
|
if (exportedModules) {
|
|
99052
99014
|
exportedModulesMap.set(sourceFile.resolvedPath, exportedModules);
|
|
99053
99015
|
}
|
|
99054
99016
|
}
|
|
99055
99017
|
}
|
|
99056
|
-
fileInfos.set(sourceFile.resolvedPath, {
|
|
99057
|
-
version: version_2,
|
|
99058
|
-
signature: signature,
|
|
99059
|
-
affectsGlobalScope: isFileAffectingGlobalScope(sourceFile) || undefined,
|
|
99060
|
-
impliedFormat: sourceFile.impliedNodeFormat
|
|
99061
|
-
});
|
|
99018
|
+
fileInfos.set(sourceFile.resolvedPath, { version: version_2, signature: oldInfo && oldInfo.signature, affectsGlobalScope: isFileAffectingGlobalScope(sourceFile) || undefined, impliedFormat: sourceFile.impliedNodeFormat });
|
|
99062
99019
|
}
|
|
99063
99020
|
return {
|
|
99064
99021
|
fileInfos: fileInfos,
|
|
99065
99022
|
referencedMap: referencedMap,
|
|
99066
99023
|
exportedModulesMap: exportedModulesMap,
|
|
99024
|
+
hasCalledUpdateShapeSignature: hasCalledUpdateShapeSignature,
|
|
99067
99025
|
useFileVersionAsSignature: !disableUseFileVersionAsSignature && !useOldState
|
|
99068
99026
|
};
|
|
99069
99027
|
}
|
|
@@ -99073,36 +99031,52 @@ var ts;
|
|
|
99073
99031
|
state.allFileNames = undefined;
|
|
99074
99032
|
}
|
|
99075
99033
|
BuilderState.releaseCache = releaseCache;
|
|
99076
|
-
function
|
|
99034
|
+
function clone(state) {
|
|
99077
99035
|
var _a, _b;
|
|
99078
|
-
|
|
99079
|
-
|
|
99080
|
-
|
|
99081
|
-
|
|
99036
|
+
return {
|
|
99037
|
+
fileInfos: new ts.Map(state.fileInfos),
|
|
99038
|
+
referencedMap: (_a = state.referencedMap) === null || _a === void 0 ? void 0 : _a.clone(),
|
|
99039
|
+
exportedModulesMap: (_b = state.exportedModulesMap) === null || _b === void 0 ? void 0 : _b.clone(),
|
|
99040
|
+
hasCalledUpdateShapeSignature: new ts.Set(state.hasCalledUpdateShapeSignature),
|
|
99041
|
+
useFileVersionAsSignature: state.useFileVersionAsSignature,
|
|
99042
|
+
};
|
|
99082
99043
|
}
|
|
99083
|
-
BuilderState.
|
|
99084
|
-
function
|
|
99044
|
+
BuilderState.clone = clone;
|
|
99045
|
+
function getFilesAffectedBy(state, programOfThisState, path, cancellationToken, computeHash, cacheToUpdateSignature, exportedModulesMapCache) {
|
|
99046
|
+
var signatureCache = cacheToUpdateSignature || new ts.Map();
|
|
99085
99047
|
var sourceFile = programOfThisState.getSourceFileByPath(path);
|
|
99086
99048
|
if (!sourceFile) {
|
|
99087
99049
|
return ts.emptyArray;
|
|
99088
99050
|
}
|
|
99089
|
-
if (!updateShapeSignature(state, programOfThisState, sourceFile, cancellationToken, computeHash)) {
|
|
99051
|
+
if (!updateShapeSignature(state, programOfThisState, sourceFile, signatureCache, cancellationToken, computeHash, exportedModulesMapCache)) {
|
|
99090
99052
|
return [sourceFile];
|
|
99091
99053
|
}
|
|
99092
|
-
|
|
99054
|
+
var result = (state.referencedMap ? getFilesAffectedByUpdatedShapeWhenModuleEmit : getFilesAffectedByUpdatedShapeWhenNonModuleEmit)(state, programOfThisState, sourceFile, signatureCache, cancellationToken, computeHash, exportedModulesMapCache);
|
|
99055
|
+
if (!cacheToUpdateSignature) {
|
|
99056
|
+
updateSignaturesFromCache(state, signatureCache);
|
|
99057
|
+
}
|
|
99058
|
+
return result;
|
|
99093
99059
|
}
|
|
99094
|
-
BuilderState.
|
|
99060
|
+
BuilderState.getFilesAffectedBy = getFilesAffectedBy;
|
|
99061
|
+
function updateSignaturesFromCache(state, signatureCache) {
|
|
99062
|
+
signatureCache.forEach(function (signature, path) { return updateSignatureOfFile(state, signature, path); });
|
|
99063
|
+
}
|
|
99064
|
+
BuilderState.updateSignaturesFromCache = updateSignaturesFromCache;
|
|
99095
99065
|
function updateSignatureOfFile(state, signature, path) {
|
|
99096
99066
|
state.fileInfos.get(path).signature = signature;
|
|
99097
|
-
|
|
99067
|
+
state.hasCalledUpdateShapeSignature.add(path);
|
|
99098
99068
|
}
|
|
99099
99069
|
BuilderState.updateSignatureOfFile = updateSignatureOfFile;
|
|
99100
|
-
function updateShapeSignature(state, programOfThisState, sourceFile, cancellationToken, computeHash, useFileVersionAsSignature) {
|
|
99101
|
-
var _a;
|
|
99070
|
+
function updateShapeSignature(state, programOfThisState, sourceFile, cacheToUpdateSignature, cancellationToken, computeHash, exportedModulesMapCache, useFileVersionAsSignature) {
|
|
99102
99071
|
if (useFileVersionAsSignature === void 0) { useFileVersionAsSignature = state.useFileVersionAsSignature; }
|
|
99103
|
-
|
|
99072
|
+
ts.Debug.assert(!!sourceFile);
|
|
99073
|
+
ts.Debug.assert(!exportedModulesMapCache || !!state.exportedModulesMap, "Compute visible to outside map only if visibleToOutsideReferencedMap present in the state");
|
|
99074
|
+
if (state.hasCalledUpdateShapeSignature.has(sourceFile.resolvedPath) || cacheToUpdateSignature.has(sourceFile.resolvedPath)) {
|
|
99104
99075
|
return false;
|
|
99076
|
+
}
|
|
99105
99077
|
var info = state.fileInfos.get(sourceFile.resolvedPath);
|
|
99078
|
+
if (!info)
|
|
99079
|
+
return ts.Debug.fail();
|
|
99106
99080
|
var prevSignature = info.signature;
|
|
99107
99081
|
var latestSignature;
|
|
99108
99082
|
if (!sourceFile.isDeclarationFile && !useFileVersionAsSignature) {
|
|
@@ -99110,50 +99084,40 @@ var ts;
|
|
|
99110
99084
|
var firstDts_1 = ts.firstOrUndefined(emitOutput_1.outputFiles);
|
|
99111
99085
|
if (firstDts_1) {
|
|
99112
99086
|
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; })); });
|
|
99113
|
-
latestSignature =
|
|
99114
|
-
if (latestSignature !== prevSignature) {
|
|
99115
|
-
updateExportedModules(
|
|
99087
|
+
latestSignature = (computeHash || ts.generateDjb2Hash)(firstDts_1.text);
|
|
99088
|
+
if (exportedModulesMapCache && latestSignature !== prevSignature) {
|
|
99089
|
+
updateExportedModules(sourceFile, emitOutput_1.exportedModulesFromDeclarationEmit, exportedModulesMapCache);
|
|
99116
99090
|
}
|
|
99117
99091
|
}
|
|
99118
99092
|
}
|
|
99119
99093
|
if (latestSignature === undefined) {
|
|
99120
99094
|
latestSignature = sourceFile.version;
|
|
99121
|
-
if (
|
|
99122
|
-
(state.oldExportedModulesMap || (state.oldExportedModulesMap = new ts.Map())).set(sourceFile.resolvedPath, state.exportedModulesMap.getValues(sourceFile.resolvedPath) || false);
|
|
99095
|
+
if (exportedModulesMapCache && latestSignature !== prevSignature) {
|
|
99123
99096
|
var references = state.referencedMap ? state.referencedMap.getValues(sourceFile.resolvedPath) : undefined;
|
|
99124
99097
|
if (references) {
|
|
99125
|
-
|
|
99098
|
+
exportedModulesMapCache.set(sourceFile.resolvedPath, references);
|
|
99126
99099
|
}
|
|
99127
99100
|
else {
|
|
99128
|
-
|
|
99101
|
+
exportedModulesMapCache.deleteKey(sourceFile.resolvedPath);
|
|
99129
99102
|
}
|
|
99130
99103
|
}
|
|
99131
99104
|
}
|
|
99132
|
-
|
|
99133
|
-
(state.hasCalledUpdateShapeSignature || (state.hasCalledUpdateShapeSignature = new ts.Set())).add(sourceFile.resolvedPath);
|
|
99134
|
-
info.signature = latestSignature;
|
|
99105
|
+
cacheToUpdateSignature.set(sourceFile.resolvedPath, latestSignature);
|
|
99135
99106
|
return latestSignature !== prevSignature;
|
|
99136
99107
|
}
|
|
99137
99108
|
BuilderState.updateShapeSignature = updateShapeSignature;
|
|
99138
|
-
function
|
|
99139
|
-
return (computeHash || ts.generateDjb2Hash)(text);
|
|
99140
|
-
}
|
|
99141
|
-
BuilderState.computeSignature = computeSignature;
|
|
99142
|
-
function updateExportedModules(state, sourceFile, exportedModulesFromDeclarationEmit) {
|
|
99143
|
-
if (!state.exportedModulesMap)
|
|
99144
|
-
return;
|
|
99145
|
-
(state.oldExportedModulesMap || (state.oldExportedModulesMap = new ts.Map())).set(sourceFile.resolvedPath, state.exportedModulesMap.getValues(sourceFile.resolvedPath) || false);
|
|
99109
|
+
function updateExportedModules(sourceFile, exportedModulesFromDeclarationEmit, exportedModulesMapCache) {
|
|
99146
99110
|
if (!exportedModulesFromDeclarationEmit) {
|
|
99147
|
-
|
|
99111
|
+
exportedModulesMapCache.deleteKey(sourceFile.resolvedPath);
|
|
99148
99112
|
return;
|
|
99149
99113
|
}
|
|
99150
99114
|
var exportedModules;
|
|
99151
99115
|
exportedModulesFromDeclarationEmit.forEach(function (symbol) { return addExportedModule(getReferencedFilesFromImportedModuleSymbol(symbol)); });
|
|
99152
99116
|
if (exportedModules) {
|
|
99153
|
-
|
|
99117
|
+
exportedModulesMapCache.set(sourceFile.resolvedPath, exportedModules);
|
|
99154
99118
|
}
|
|
99155
99119
|
else {
|
|
99156
|
-
|
|
99120
|
+
exportedModulesMapCache.deleteKey(sourceFile.resolvedPath);
|
|
99157
99121
|
}
|
|
99158
99122
|
function addExportedModule(exportedModulePaths) {
|
|
99159
99123
|
if (exportedModulePaths === null || exportedModulePaths === void 0 ? void 0 : exportedModulePaths.length) {
|
|
@@ -99165,6 +99129,15 @@ var ts;
|
|
|
99165
99129
|
}
|
|
99166
99130
|
}
|
|
99167
99131
|
BuilderState.updateExportedModules = updateExportedModules;
|
|
99132
|
+
function updateExportedFilesMapFromCache(state, exportedModulesMapCache) {
|
|
99133
|
+
var _a;
|
|
99134
|
+
if (exportedModulesMapCache) {
|
|
99135
|
+
ts.Debug.assert(!!state.exportedModulesMap);
|
|
99136
|
+
(_a = exportedModulesMapCache.deletedKeys()) === null || _a === void 0 ? void 0 : _a.forEach(function (path) { return state.exportedModulesMap.deleteKey(path); });
|
|
99137
|
+
exportedModulesMapCache.forEach(function (exportedModules, path) { return state.exportedModulesMap.set(path, exportedModules); });
|
|
99138
|
+
}
|
|
99139
|
+
}
|
|
99140
|
+
BuilderState.updateExportedFilesMapFromCache = updateExportedFilesMapFromCache;
|
|
99168
99141
|
function getAllDependencies(state, programOfThisState, sourceFile) {
|
|
99169
99142
|
var compilerOptions = programOfThisState.getCompilerOptions();
|
|
99170
99143
|
if (ts.outFile(compilerOptions)) {
|
|
@@ -99248,7 +99221,7 @@ var ts;
|
|
|
99248
99221
|
}
|
|
99249
99222
|
return getAllFilesExcludingDefaultLibraryFile(state, programOfThisState, sourceFileWithUpdatedShape);
|
|
99250
99223
|
}
|
|
99251
|
-
function getFilesAffectedByUpdatedShapeWhenModuleEmit(state, programOfThisState, sourceFileWithUpdatedShape, cancellationToken, computeHash) {
|
|
99224
|
+
function getFilesAffectedByUpdatedShapeWhenModuleEmit(state, programOfThisState, sourceFileWithUpdatedShape, cacheToUpdateSignature, cancellationToken, computeHash, exportedModulesMapCache) {
|
|
99252
99225
|
if (isFileAffectingGlobalScope(sourceFileWithUpdatedShape)) {
|
|
99253
99226
|
return getAllFilesExcludingDefaultLibraryFile(state, programOfThisState, sourceFileWithUpdatedShape);
|
|
99254
99227
|
}
|
|
@@ -99264,7 +99237,7 @@ var ts;
|
|
|
99264
99237
|
if (!seenFileNamesMap.has(currentPath)) {
|
|
99265
99238
|
var currentSourceFile = programOfThisState.getSourceFileByPath(currentPath);
|
|
99266
99239
|
seenFileNamesMap.set(currentPath, currentSourceFile);
|
|
99267
|
-
if (currentSourceFile && updateShapeSignature(state, programOfThisState, currentSourceFile, cancellationToken, computeHash)) {
|
|
99240
|
+
if (currentSourceFile && updateShapeSignature(state, programOfThisState, currentSourceFile, cacheToUpdateSignature, cancellationToken, computeHash, exportedModulesMapCache)) {
|
|
99268
99241
|
queue.push.apply(queue, getReferencedByPaths(state, currentSourceFile.resolvedPath));
|
|
99269
99242
|
}
|
|
99270
99243
|
}
|
|
@@ -99279,31 +99252,29 @@ var ts;
|
|
|
99279
99252
|
return map1 === map2 || map1 !== undefined && map2 !== undefined && map1.size === map2.size && !ts.forEachKey(map1, function (key) { return !map2.has(key); });
|
|
99280
99253
|
}
|
|
99281
99254
|
function createBuilderProgramState(newProgram, getCanonicalFileName, oldState, disableUseFileVersionAsSignature) {
|
|
99282
|
-
var _a, _b;
|
|
99283
99255
|
var state = ts.BuilderState.create(newProgram, getCanonicalFileName, oldState, disableUseFileVersionAsSignature);
|
|
99284
99256
|
state.program = newProgram;
|
|
99285
99257
|
var compilerOptions = newProgram.getCompilerOptions();
|
|
99286
99258
|
state.compilerOptions = compilerOptions;
|
|
99287
|
-
|
|
99288
|
-
if (!outFilePath) {
|
|
99259
|
+
if (!ts.outFile(compilerOptions)) {
|
|
99289
99260
|
state.semanticDiagnosticsPerFile = new ts.Map();
|
|
99290
99261
|
}
|
|
99291
|
-
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)) {
|
|
99292
|
-
state.outSignature = oldState === null || oldState === void 0 ? void 0 : oldState.outSignature;
|
|
99293
|
-
}
|
|
99294
99262
|
state.changedFilesSet = new ts.Set();
|
|
99295
|
-
state.dtsChangeTime = compilerOptions.composite ? oldState === null || oldState === void 0 ? void 0 : oldState.dtsChangeTime : undefined;
|
|
99296
99263
|
var useOldState = ts.BuilderState.canReuseOldState(state.referencedMap, oldState);
|
|
99297
99264
|
var oldCompilerOptions = useOldState ? oldState.compilerOptions : undefined;
|
|
99298
99265
|
var canCopySemanticDiagnostics = useOldState && oldState.semanticDiagnosticsPerFile && !!state.semanticDiagnosticsPerFile &&
|
|
99299
99266
|
!ts.compilerOptionsAffectSemanticDiagnostics(compilerOptions, oldCompilerOptions);
|
|
99300
|
-
var canCopyEmitSignatures = compilerOptions.composite &&
|
|
99301
|
-
(oldState === null || oldState === void 0 ? void 0 : oldState.emitSignatures) &&
|
|
99302
|
-
!outFilePath &&
|
|
99303
|
-
!ts.compilerOptionsAffectDeclarationPath(compilerOptions, oldCompilerOptions);
|
|
99304
99267
|
if (useOldState) {
|
|
99305
|
-
(
|
|
99306
|
-
|
|
99268
|
+
if (!oldState.currentChangedFilePath) {
|
|
99269
|
+
var affectedSignatures = oldState.currentAffectedFilesSignatures;
|
|
99270
|
+
ts.Debug.assert(!oldState.affectedFiles && (!affectedSignatures || !affectedSignatures.size), "Cannot reuse if only few affected files of currentChangedFile were iterated");
|
|
99271
|
+
}
|
|
99272
|
+
var changedFilesSet = oldState.changedFilesSet;
|
|
99273
|
+
if (canCopySemanticDiagnostics) {
|
|
99274
|
+
ts.Debug.assert(!changedFilesSet || !ts.forEachKey(changedFilesSet, function (path) { return oldState.semanticDiagnosticsPerFile.has(path); }), "Semantic diagnostics shouldnt be available for changed files");
|
|
99275
|
+
}
|
|
99276
|
+
changedFilesSet === null || changedFilesSet === void 0 ? void 0 : changedFilesSet.forEach(function (value) { return state.changedFilesSet.add(value); });
|
|
99277
|
+
if (!ts.outFile(compilerOptions) && oldState.affectedFilesPendingEmit) {
|
|
99307
99278
|
state.affectedFilesPendingEmit = oldState.affectedFilesPendingEmit.slice();
|
|
99308
99279
|
state.affectedFilesPendingEmitKind = oldState.affectedFilesPendingEmitKind && new ts.Map(oldState.affectedFilesPendingEmitKind);
|
|
99309
99280
|
state.affectedFilesPendingEmitIndex = oldState.affectedFilesPendingEmitIndex;
|
|
@@ -99320,7 +99291,6 @@ var ts;
|
|
|
99320
99291
|
if (!useOldState ||
|
|
99321
99292
|
!(oldInfo = oldState.fileInfos.get(sourceFilePath)) ||
|
|
99322
99293
|
oldInfo.version !== info.version ||
|
|
99323
|
-
oldInfo.impliedFormat !== info.impliedFormat ||
|
|
99324
99294
|
!hasSameKeys(newReferences = referencedMap && referencedMap.getValues(sourceFilePath), oldReferencedMap && oldReferencedMap.getValues(sourceFilePath)) ||
|
|
99325
99295
|
newReferences && ts.forEachKey(newReferences, function (path) { return !state.fileInfos.has(path) && oldState.fileInfos.has(path); })) {
|
|
99326
99296
|
state.changedFilesSet.add(sourceFilePath);
|
|
@@ -99340,22 +99310,24 @@ var ts;
|
|
|
99340
99310
|
state.semanticDiagnosticsFromOldState.add(sourceFilePath);
|
|
99341
99311
|
}
|
|
99342
99312
|
}
|
|
99343
|
-
if (canCopyEmitSignatures) {
|
|
99344
|
-
var oldEmitSignature = oldState.emitSignatures.get(sourceFilePath);
|
|
99345
|
-
if (oldEmitSignature)
|
|
99346
|
-
(state.emitSignatures || (state.emitSignatures = new ts.Map())).set(sourceFilePath, oldEmitSignature);
|
|
99347
|
-
}
|
|
99348
99313
|
});
|
|
99349
99314
|
if (useOldState && ts.forEachEntry(oldState.fileInfos, function (info, sourceFilePath) { return info.affectsGlobalScope && !state.fileInfos.has(sourceFilePath); })) {
|
|
99350
99315
|
ts.BuilderState.getAllFilesExcludingDefaultLibraryFile(state, newProgram, undefined)
|
|
99351
99316
|
.forEach(function (file) { return state.changedFilesSet.add(file.resolvedPath); });
|
|
99352
99317
|
}
|
|
99353
|
-
else if (oldCompilerOptions && !
|
|
99318
|
+
else if (oldCompilerOptions && !ts.outFile(compilerOptions) && ts.compilerOptionsAffectEmit(compilerOptions, oldCompilerOptions)) {
|
|
99354
99319
|
newProgram.getSourceFiles().forEach(function (f) { return addToAffectedFilesPendingEmit(state, f.resolvedPath, 1); });
|
|
99355
99320
|
ts.Debug.assert(!state.seenAffectedFiles || !state.seenAffectedFiles.size);
|
|
99356
99321
|
state.seenAffectedFiles = state.seenAffectedFiles || new ts.Set();
|
|
99357
99322
|
}
|
|
99358
|
-
|
|
99323
|
+
if (useOldState) {
|
|
99324
|
+
ts.forEachEntry(oldState.fileInfos, function (info, sourceFilePath) {
|
|
99325
|
+
if (state.fileInfos.has(sourceFilePath) && state.fileInfos.get(sourceFilePath).impliedFormat !== info.impliedFormat) {
|
|
99326
|
+
state.changedFilesSet.add(sourceFilePath);
|
|
99327
|
+
}
|
|
99328
|
+
});
|
|
99329
|
+
}
|
|
99330
|
+
state.buildInfoEmitPending = !!state.changedFilesSet.size;
|
|
99359
99331
|
return state;
|
|
99360
99332
|
}
|
|
99361
99333
|
function convertToDiagnostics(diagnostics, newProgram, getCanonicalFileName) {
|
|
@@ -99388,40 +99360,33 @@ var ts;
|
|
|
99388
99360
|
ts.BuilderState.releaseCache(state);
|
|
99389
99361
|
state.program = undefined;
|
|
99390
99362
|
}
|
|
99391
|
-
function
|
|
99392
|
-
var
|
|
99393
|
-
ts.
|
|
99394
|
-
|
|
99395
|
-
|
|
99396
|
-
|
|
99397
|
-
|
|
99398
|
-
|
|
99399
|
-
|
|
99400
|
-
|
|
99401
|
-
|
|
99402
|
-
|
|
99403
|
-
|
|
99404
|
-
|
|
99405
|
-
|
|
99406
|
-
|
|
99407
|
-
|
|
99408
|
-
|
|
99409
|
-
|
|
99410
|
-
|
|
99411
|
-
|
|
99412
|
-
state.programEmitComplete = backupEmitState.programEmitComplete;
|
|
99413
|
-
state.emitSignatures = backupEmitState.emitSignatures;
|
|
99414
|
-
state.outSignature = backupEmitState.outSignature;
|
|
99415
|
-
state.dtsChangeTime = backupEmitState.dtsChangeTime;
|
|
99416
|
-
state.hasChangedEmitSignature = backupEmitState.hasChangedEmitSignature;
|
|
99417
|
-
if (backupEmitState.changedFilesSet)
|
|
99418
|
-
state.changedFilesSet = backupEmitState.changedFilesSet;
|
|
99363
|
+
function cloneBuilderProgramState(state) {
|
|
99364
|
+
var _a;
|
|
99365
|
+
var newState = ts.BuilderState.clone(state);
|
|
99366
|
+
newState.semanticDiagnosticsPerFile = state.semanticDiagnosticsPerFile && new ts.Map(state.semanticDiagnosticsPerFile);
|
|
99367
|
+
newState.changedFilesSet = new ts.Set(state.changedFilesSet);
|
|
99368
|
+
newState.affectedFiles = state.affectedFiles;
|
|
99369
|
+
newState.affectedFilesIndex = state.affectedFilesIndex;
|
|
99370
|
+
newState.currentChangedFilePath = state.currentChangedFilePath;
|
|
99371
|
+
newState.currentAffectedFilesSignatures = state.currentAffectedFilesSignatures && new ts.Map(state.currentAffectedFilesSignatures);
|
|
99372
|
+
newState.currentAffectedFilesExportedModulesMap = (_a = state.currentAffectedFilesExportedModulesMap) === null || _a === void 0 ? void 0 : _a.clone();
|
|
99373
|
+
newState.seenAffectedFiles = state.seenAffectedFiles && new ts.Set(state.seenAffectedFiles);
|
|
99374
|
+
newState.cleanedDiagnosticsOfLibFiles = state.cleanedDiagnosticsOfLibFiles;
|
|
99375
|
+
newState.semanticDiagnosticsFromOldState = state.semanticDiagnosticsFromOldState && new ts.Set(state.semanticDiagnosticsFromOldState);
|
|
99376
|
+
newState.program = state.program;
|
|
99377
|
+
newState.compilerOptions = state.compilerOptions;
|
|
99378
|
+
newState.affectedFilesPendingEmit = state.affectedFilesPendingEmit && state.affectedFilesPendingEmit.slice();
|
|
99379
|
+
newState.affectedFilesPendingEmitKind = state.affectedFilesPendingEmitKind && new ts.Map(state.affectedFilesPendingEmitKind);
|
|
99380
|
+
newState.affectedFilesPendingEmitIndex = state.affectedFilesPendingEmitIndex;
|
|
99381
|
+
newState.seenEmittedFiles = state.seenEmittedFiles && new ts.Map(state.seenEmittedFiles);
|
|
99382
|
+
newState.programEmitComplete = state.programEmitComplete;
|
|
99383
|
+
return newState;
|
|
99419
99384
|
}
|
|
99420
99385
|
function assertSourceFileOkWithoutNextAffectedCall(state, sourceFile) {
|
|
99421
99386
|
ts.Debug.assert(!sourceFile || !state.affectedFiles || state.affectedFiles[state.affectedFilesIndex - 1] !== sourceFile || !state.semanticDiagnosticsPerFile.has(sourceFile.resolvedPath));
|
|
99422
99387
|
}
|
|
99423
99388
|
function getNextAffectedFile(state, cancellationToken, computeHash, host) {
|
|
99424
|
-
var _a
|
|
99389
|
+
var _a;
|
|
99425
99390
|
while (true) {
|
|
99426
99391
|
var affectedFiles = state.affectedFiles;
|
|
99427
99392
|
if (affectedFiles) {
|
|
@@ -99438,8 +99403,10 @@ var ts;
|
|
|
99438
99403
|
}
|
|
99439
99404
|
state.changedFilesSet.delete(state.currentChangedFilePath);
|
|
99440
99405
|
state.currentChangedFilePath = undefined;
|
|
99441
|
-
(
|
|
99442
|
-
|
|
99406
|
+
ts.BuilderState.updateSignaturesFromCache(state, state.currentAffectedFilesSignatures);
|
|
99407
|
+
state.currentAffectedFilesSignatures.clear();
|
|
99408
|
+
ts.BuilderState.updateExportedFilesMapFromCache(state, state.currentAffectedFilesExportedModulesMap);
|
|
99409
|
+
(_a = state.currentAffectedFilesExportedModulesMap) === null || _a === void 0 ? void 0 : _a.clear();
|
|
99443
99410
|
state.affectedFiles = undefined;
|
|
99444
99411
|
}
|
|
99445
99412
|
var nextKey = state.changedFilesSet.keys().next();
|
|
@@ -99452,7 +99419,12 @@ var ts;
|
|
|
99452
99419
|
ts.Debug.assert(!state.semanticDiagnosticsPerFile);
|
|
99453
99420
|
return program;
|
|
99454
99421
|
}
|
|
99455
|
-
|
|
99422
|
+
if (!state.currentAffectedFilesSignatures)
|
|
99423
|
+
state.currentAffectedFilesSignatures = new ts.Map();
|
|
99424
|
+
if (state.exportedModulesMap) {
|
|
99425
|
+
state.currentAffectedFilesExportedModulesMap || (state.currentAffectedFilesExportedModulesMap = ts.BuilderState.createManyToManyPathMap());
|
|
99426
|
+
}
|
|
99427
|
+
state.affectedFiles = ts.BuilderState.getFilesAffectedBy(state, program, nextKey.value, cancellationToken, computeHash, state.currentAffectedFilesSignatures, state.currentAffectedFilesExportedModulesMap);
|
|
99456
99428
|
state.currentChangedFilePath = nextKey.value;
|
|
99457
99429
|
state.affectedFilesIndex = 0;
|
|
99458
99430
|
if (!state.seenAffectedFiles)
|
|
@@ -99496,12 +99468,14 @@ var ts;
|
|
|
99496
99468
|
}
|
|
99497
99469
|
}
|
|
99498
99470
|
function handleDtsMayChangeOfAffectedFile(state, affectedFile, cancellationToken, computeHash, host) {
|
|
99471
|
+
var _a;
|
|
99499
99472
|
removeSemanticDiagnosticsOf(state, affectedFile.resolvedPath);
|
|
99500
99473
|
if (state.allFilesExcludingDefaultLibraryFile === state.affectedFiles) {
|
|
99501
99474
|
removeDiagnosticsOfLibraryFiles(state);
|
|
99502
|
-
ts.BuilderState.updateShapeSignature(state, ts.Debug.checkDefined(state.program), affectedFile, cancellationToken, computeHash);
|
|
99475
|
+
ts.BuilderState.updateShapeSignature(state, ts.Debug.checkDefined(state.program), affectedFile, ts.Debug.checkDefined(state.currentAffectedFilesSignatures), cancellationToken, computeHash, state.currentAffectedFilesExportedModulesMap);
|
|
99503
99476
|
return;
|
|
99504
99477
|
}
|
|
99478
|
+
ts.Debug.assert(state.hasCalledUpdateShapeSignature.has(affectedFile.resolvedPath) || ((_a = state.currentAffectedFilesSignatures) === null || _a === void 0 ? void 0 : _a.has(affectedFile.resolvedPath)), "Signature not updated for affected file: " + affectedFile.fileName);
|
|
99505
99479
|
if (state.compilerOptions.assumeChangesOnlyAffectDirectDependencies)
|
|
99506
99480
|
return;
|
|
99507
99481
|
handleDtsMayChangeOfReferencingExportOfAffectedFile(state, affectedFile, cancellationToken, computeHash, host);
|
|
@@ -99512,7 +99486,7 @@ var ts;
|
|
|
99512
99486
|
var program = ts.Debug.checkDefined(state.program);
|
|
99513
99487
|
var sourceFile = program.getSourceFileByPath(path);
|
|
99514
99488
|
if (sourceFile) {
|
|
99515
|
-
ts.BuilderState.updateShapeSignature(state, program, sourceFile, cancellationToken, computeHash, !host.disableUseFileVersionAsSignature);
|
|
99489
|
+
ts.BuilderState.updateShapeSignature(state, program, sourceFile, ts.Debug.checkDefined(state.currentAffectedFilesSignatures), cancellationToken, computeHash, state.currentAffectedFilesExportedModulesMap, !host.disableUseFileVersionAsSignature);
|
|
99516
99490
|
if (ts.getEmitDeclarations(state.compilerOptions)) {
|
|
99517
99491
|
addToAffectedFilesPendingEmit(state, path, 0);
|
|
99518
99492
|
}
|
|
@@ -99528,10 +99502,24 @@ var ts;
|
|
|
99528
99502
|
return !state.semanticDiagnosticsFromOldState.size;
|
|
99529
99503
|
}
|
|
99530
99504
|
function isChangedSignature(state, path) {
|
|
99531
|
-
var
|
|
99532
|
-
var
|
|
99505
|
+
var newSignature = ts.Debug.checkDefined(state.currentAffectedFilesSignatures).get(path);
|
|
99506
|
+
var oldSignature = ts.Debug.checkDefined(state.fileInfos.get(path)).signature;
|
|
99533
99507
|
return newSignature !== oldSignature;
|
|
99534
99508
|
}
|
|
99509
|
+
function forEachKeyOfExportedModulesMap(state, filePath, fn) {
|
|
99510
|
+
var keys = state.currentAffectedFilesExportedModulesMap.getKeys(filePath);
|
|
99511
|
+
var result = keys && ts.forEachKey(keys, fn);
|
|
99512
|
+
if (result)
|
|
99513
|
+
return result;
|
|
99514
|
+
keys = state.exportedModulesMap.getKeys(filePath);
|
|
99515
|
+
return keys && ts.forEachKey(keys, function (exportedFromPath) {
|
|
99516
|
+
var _a;
|
|
99517
|
+
return !state.currentAffectedFilesExportedModulesMap.hasKey(exportedFromPath) &&
|
|
99518
|
+
!((_a = state.currentAffectedFilesExportedModulesMap.deletedKeys()) === null || _a === void 0 ? void 0 : _a.has(exportedFromPath)) ?
|
|
99519
|
+
fn(exportedFromPath) :
|
|
99520
|
+
undefined;
|
|
99521
|
+
});
|
|
99522
|
+
}
|
|
99535
99523
|
function handleDtsMayChangeOfGlobalScope(state, filePath, cancellationToken, computeHash, host) {
|
|
99536
99524
|
var _a;
|
|
99537
99525
|
if (!((_a = state.fileInfos.get(filePath)) === null || _a === void 0 ? void 0 : _a.affectsGlobalScope))
|
|
@@ -99542,7 +99530,6 @@ var ts;
|
|
|
99542
99530
|
return true;
|
|
99543
99531
|
}
|
|
99544
99532
|
function handleDtsMayChangeOfReferencingExportOfAffectedFile(state, affectedFile, cancellationToken, computeHash, host) {
|
|
99545
|
-
var _a;
|
|
99546
99533
|
if (!state.exportedModulesMap || !state.changedFilesSet.has(affectedFile.resolvedPath))
|
|
99547
99534
|
return;
|
|
99548
99535
|
if (!isChangedSignature(state, affectedFile.resolvedPath))
|
|
@@ -99565,8 +99552,9 @@ var ts;
|
|
|
99565
99552
|
}
|
|
99566
99553
|
}
|
|
99567
99554
|
}
|
|
99555
|
+
ts.Debug.assert(!!state.currentAffectedFilesExportedModulesMap);
|
|
99568
99556
|
var seenFileAndExportsOfFile = new ts.Set();
|
|
99569
|
-
(
|
|
99557
|
+
forEachKeyOfExportedModulesMap(state, affectedFile.resolvedPath, function (exportedFromPath) {
|
|
99570
99558
|
if (handleDtsMayChangeOfGlobalScope(state, exportedFromPath, cancellationToken, computeHash, host))
|
|
99571
99559
|
return true;
|
|
99572
99560
|
var references = state.referencedMap.getKeys(exportedFromPath);
|
|
@@ -99576,16 +99564,17 @@ var ts;
|
|
|
99576
99564
|
});
|
|
99577
99565
|
}
|
|
99578
99566
|
function handleDtsMayChangeOfFileAndExportsOfFile(state, filePath, seenFileAndExportsOfFile, cancellationToken, computeHash, host) {
|
|
99579
|
-
var _a
|
|
99567
|
+
var _a;
|
|
99580
99568
|
if (!ts.tryAddToSet(seenFileAndExportsOfFile, filePath))
|
|
99581
99569
|
return undefined;
|
|
99582
99570
|
if (handleDtsMayChangeOfGlobalScope(state, filePath, cancellationToken, computeHash, host))
|
|
99583
99571
|
return true;
|
|
99584
99572
|
handleDtsMayChangeOf(state, filePath, cancellationToken, computeHash, host);
|
|
99585
|
-
|
|
99573
|
+
ts.Debug.assert(!!state.currentAffectedFilesExportedModulesMap);
|
|
99574
|
+
forEachKeyOfExportedModulesMap(state, filePath, function (exportedFromPath) {
|
|
99586
99575
|
return handleDtsMayChangeOfFileAndExportsOfFile(state, exportedFromPath, seenFileAndExportsOfFile, cancellationToken, computeHash, host);
|
|
99587
99576
|
});
|
|
99588
|
-
(
|
|
99577
|
+
(_a = state.referencedMap.getKeys(filePath)) === null || _a === void 0 ? void 0 : _a.forEach(function (referencingFilePath) {
|
|
99589
99578
|
return !seenFileAndExportsOfFile.has(referencingFilePath) &&
|
|
99590
99579
|
handleDtsMayChangeOf(state, referencingFilePath, cancellationToken, computeHash, host);
|
|
99591
99580
|
});
|
|
@@ -99601,12 +99590,12 @@ var ts;
|
|
|
99601
99590
|
}
|
|
99602
99591
|
else {
|
|
99603
99592
|
state.seenAffectedFiles.add(affected.resolvedPath);
|
|
99604
|
-
state.buildInfoEmitPending = true;
|
|
99605
99593
|
if (emitKind !== undefined) {
|
|
99606
99594
|
(state.seenEmittedFiles || (state.seenEmittedFiles = new ts.Map())).set(affected.resolvedPath, emitKind);
|
|
99607
99595
|
}
|
|
99608
99596
|
if (isPendingEmit) {
|
|
99609
99597
|
state.affectedFilesPendingEmitIndex++;
|
|
99598
|
+
state.buildInfoEmitPending = true;
|
|
99610
99599
|
}
|
|
99611
99600
|
else {
|
|
99612
99601
|
state.affectedFilesIndex++;
|
|
@@ -99638,65 +99627,29 @@ var ts;
|
|
|
99638
99627
|
}
|
|
99639
99628
|
return ts.filterSemanticDiagnostics(diagnostics, state.compilerOptions);
|
|
99640
99629
|
}
|
|
99641
|
-
function
|
|
99642
|
-
|
|
99643
|
-
|
|
99644
|
-
ts.isProgramBundleEmitBuildInfo = isProgramBundleEmitBuildInfo;
|
|
99645
|
-
function getProgramBuildInfo(state, getCanonicalFileName, host) {
|
|
99646
|
-
var outFilePath = ts.outFile(state.compilerOptions);
|
|
99647
|
-
if (outFilePath && !state.compilerOptions.composite)
|
|
99648
|
-
return;
|
|
99630
|
+
function getProgramBuildInfo(state, getCanonicalFileName) {
|
|
99631
|
+
if (ts.outFile(state.compilerOptions))
|
|
99632
|
+
return undefined;
|
|
99649
99633
|
var currentDirectory = ts.Debug.checkDefined(state.program).getCurrentDirectory();
|
|
99650
99634
|
var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(ts.getTsBuildInfoEmitOutputFilePath(state.compilerOptions), currentDirectory));
|
|
99651
|
-
state.dtsChangeTime = state.hasChangedEmitSignature ? ts.getCurrentTime(host).getTime() : state.dtsChangeTime;
|
|
99652
|
-
if (outFilePath) {
|
|
99653
|
-
var fileNames_1 = [];
|
|
99654
|
-
var fileInfos_1 = [];
|
|
99655
|
-
state.program.getRootFileNames().forEach(function (f) {
|
|
99656
|
-
var sourceFile = state.program.getSourceFile(f);
|
|
99657
|
-
if (!sourceFile)
|
|
99658
|
-
return;
|
|
99659
|
-
fileNames_1.push(relativeToBuildInfo(sourceFile.resolvedPath));
|
|
99660
|
-
fileInfos_1.push(sourceFile.version);
|
|
99661
|
-
});
|
|
99662
|
-
var result_15 = {
|
|
99663
|
-
fileNames: fileNames_1,
|
|
99664
|
-
fileInfos: fileInfos_1,
|
|
99665
|
-
options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions, "affectsBundleEmitBuildInfo"),
|
|
99666
|
-
outSignature: state.outSignature,
|
|
99667
|
-
dtsChangeTime: state.dtsChangeTime,
|
|
99668
|
-
};
|
|
99669
|
-
return result_15;
|
|
99670
|
-
}
|
|
99671
99635
|
var fileNames = [];
|
|
99672
99636
|
var fileNameToFileId = new ts.Map();
|
|
99673
99637
|
var fileIdsList;
|
|
99674
99638
|
var fileNamesToFileIdListId;
|
|
99675
|
-
var emitSignatures;
|
|
99676
99639
|
var fileInfos = ts.arrayFrom(state.fileInfos.entries(), function (_a) {
|
|
99677
|
-
var _b, _c;
|
|
99678
99640
|
var key = _a[0], value = _a[1];
|
|
99679
99641
|
var fileId = toFileId(key);
|
|
99680
99642
|
ts.Debug.assert(fileNames[fileId - 1] === relativeToBuildInfo(key));
|
|
99681
|
-
var
|
|
99682
|
-
var actualSignature =
|
|
99683
|
-
if (state.compilerOptions.composite) {
|
|
99684
|
-
var file = state.program.getSourceFileByPath(key);
|
|
99685
|
-
if (!ts.isJsonSourceFile(file) && ts.sourceFileMayBeEmitted(file, state.program)) {
|
|
99686
|
-
var emitSignature = (_c = state.emitSignatures) === null || _c === void 0 ? void 0 : _c.get(key);
|
|
99687
|
-
if (emitSignature !== actualSignature) {
|
|
99688
|
-
(emitSignatures || (emitSignatures = [])).push(emitSignature === undefined ? fileId : [fileId, emitSignature]);
|
|
99689
|
-
}
|
|
99690
|
-
}
|
|
99691
|
-
}
|
|
99643
|
+
var signature = state.currentAffectedFilesSignatures && state.currentAffectedFilesSignatures.get(key);
|
|
99644
|
+
var actualSignature = signature !== null && signature !== void 0 ? signature : value.signature;
|
|
99692
99645
|
return value.version === actualSignature ?
|
|
99693
99646
|
value.affectsGlobalScope || value.impliedFormat ?
|
|
99694
99647
|
{ version: value.version, signature: undefined, affectsGlobalScope: value.affectsGlobalScope, impliedFormat: value.impliedFormat } :
|
|
99695
99648
|
value.version :
|
|
99696
99649
|
actualSignature !== undefined ?
|
|
99697
|
-
|
|
99650
|
+
signature === undefined ?
|
|
99698
99651
|
value :
|
|
99699
|
-
{ version: value.version, signature:
|
|
99652
|
+
{ version: value.version, signature: signature, affectsGlobalScope: value.affectsGlobalScope, impliedFormat: value.impliedFormat } :
|
|
99700
99653
|
{ version: value.version, signature: false, affectsGlobalScope: value.affectsGlobalScope, impliedFormat: value.impliedFormat };
|
|
99701
99654
|
});
|
|
99702
99655
|
var referencedMap;
|
|
@@ -99710,12 +99663,16 @@ var ts;
|
|
|
99710
99663
|
if (state.exportedModulesMap) {
|
|
99711
99664
|
exportedModulesMap = ts.mapDefined(ts.arrayFrom(state.exportedModulesMap.keys()).sort(ts.compareStringsCaseSensitive), function (key) {
|
|
99712
99665
|
var _a;
|
|
99713
|
-
|
|
99714
|
-
|
|
99715
|
-
|
|
99716
|
-
|
|
99717
|
-
|
|
99718
|
-
|
|
99666
|
+
if (state.currentAffectedFilesExportedModulesMap) {
|
|
99667
|
+
if ((_a = state.currentAffectedFilesExportedModulesMap.deletedKeys()) === null || _a === void 0 ? void 0 : _a.has(key)) {
|
|
99668
|
+
return undefined;
|
|
99669
|
+
}
|
|
99670
|
+
var newValue = state.currentAffectedFilesExportedModulesMap.getValues(key);
|
|
99671
|
+
if (newValue) {
|
|
99672
|
+
return [toFileId(key), toFileIdListId(newValue)];
|
|
99673
|
+
}
|
|
99674
|
+
}
|
|
99675
|
+
return [toFileId(key), toFileIdListId(state.exportedModulesMap.getValues(key))];
|
|
99719
99676
|
});
|
|
99720
99677
|
}
|
|
99721
99678
|
var semanticDiagnosticsPerFile;
|
|
@@ -99726,7 +99683,9 @@ var ts;
|
|
|
99726
99683
|
(semanticDiagnosticsPerFile || (semanticDiagnosticsPerFile = [])).push(value.length ?
|
|
99727
99684
|
[
|
|
99728
99685
|
toFileId(key),
|
|
99729
|
-
|
|
99686
|
+
state.hasReusableDiagnostic ?
|
|
99687
|
+
value :
|
|
99688
|
+
convertToReusableDiagnostics(value, relativeToBuildInfo)
|
|
99730
99689
|
] :
|
|
99731
99690
|
toFileId(key));
|
|
99732
99691
|
}
|
|
@@ -99741,27 +99700,16 @@ var ts;
|
|
|
99741
99700
|
}
|
|
99742
99701
|
}
|
|
99743
99702
|
}
|
|
99744
|
-
|
|
99745
|
-
if (state.changedFilesSet.size) {
|
|
99746
|
-
for (var _d = 0, _e = ts.arrayFrom(state.changedFilesSet.keys()).sort(ts.compareStringsCaseSensitive); _d < _e.length; _d++) {
|
|
99747
|
-
var path = _e[_d];
|
|
99748
|
-
(changeFileSet || (changeFileSet = [])).push(toFileId(path));
|
|
99749
|
-
}
|
|
99750
|
-
}
|
|
99751
|
-
var result = {
|
|
99703
|
+
return {
|
|
99752
99704
|
fileNames: fileNames,
|
|
99753
99705
|
fileInfos: fileInfos,
|
|
99754
|
-
options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions,
|
|
99706
|
+
options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions, relativeToBuildInfoEnsuringAbsolutePath),
|
|
99755
99707
|
fileIdsList: fileIdsList,
|
|
99756
99708
|
referencedMap: referencedMap,
|
|
99757
99709
|
exportedModulesMap: exportedModulesMap,
|
|
99758
99710
|
semanticDiagnosticsPerFile: semanticDiagnosticsPerFile,
|
|
99759
99711
|
affectedFilesPendingEmit: affectedFilesPendingEmit,
|
|
99760
|
-
changeFileSet: changeFileSet,
|
|
99761
|
-
emitSignatures: emitSignatures,
|
|
99762
|
-
dtsChangeTime: state.dtsChangeTime,
|
|
99763
99712
|
};
|
|
99764
|
-
return result;
|
|
99765
99713
|
function relativeToBuildInfoEnsuringAbsolutePath(path) {
|
|
99766
99714
|
return relativeToBuildInfo(ts.getNormalizedAbsolutePath(path, currentDirectory));
|
|
99767
99715
|
}
|
|
@@ -99786,18 +99734,21 @@ var ts;
|
|
|
99786
99734
|
}
|
|
99787
99735
|
return fileIdListId;
|
|
99788
99736
|
}
|
|
99789
|
-
|
|
99790
|
-
|
|
99791
|
-
|
|
99792
|
-
|
|
99793
|
-
|
|
99794
|
-
|
|
99795
|
-
|
|
99796
|
-
|
|
99797
|
-
|
|
99737
|
+
}
|
|
99738
|
+
function convertToProgramBuildInfoCompilerOptions(options, relativeToBuildInfo) {
|
|
99739
|
+
var result;
|
|
99740
|
+
var optionsNameMap = ts.getOptionsNameMap().optionsNameMap;
|
|
99741
|
+
for (var _i = 0, _a = ts.getOwnKeys(options).sort(ts.compareStringsCaseSensitive); _i < _a.length; _i++) {
|
|
99742
|
+
var name = _a[_i];
|
|
99743
|
+
var optionKey = name.toLowerCase();
|
|
99744
|
+
var optionInfo = optionsNameMap.get(optionKey);
|
|
99745
|
+
if ((optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsEmit) || (optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsSemanticDiagnostics) ||
|
|
99746
|
+
optionKey === "strict" ||
|
|
99747
|
+
optionKey === "skiplibcheck" || optionKey === "skipdefaultlibcheck") {
|
|
99748
|
+
(result || (result = {}))[name] = convertToReusableCompilerOptionValue(optionInfo, options[name], relativeToBuildInfo);
|
|
99798
99749
|
}
|
|
99799
|
-
return result;
|
|
99800
99750
|
}
|
|
99751
|
+
return result;
|
|
99801
99752
|
}
|
|
99802
99753
|
function convertToReusableCompilerOptionValue(option, value, relativeToBuildInfo) {
|
|
99803
99754
|
if (option) {
|
|
@@ -99871,10 +99822,6 @@ var ts;
|
|
|
99871
99822
|
return { host: host, newProgram: newProgram, oldProgram: oldProgram, configFileParsingDiagnostics: configFileParsingDiagnostics || ts.emptyArray };
|
|
99872
99823
|
}
|
|
99873
99824
|
ts.getBuilderCreationParameters = getBuilderCreationParameters;
|
|
99874
|
-
function computeSignature(text, data, computeHash) {
|
|
99875
|
-
return ts.BuilderState.computeSignature((data === null || data === void 0 ? void 0 : data.sourceMapUrlPos) !== undefined ? text.substring(0, data.sourceMapUrlPos) : text, computeHash);
|
|
99876
|
-
}
|
|
99877
|
-
ts.computeSignature = computeSignature;
|
|
99878
99825
|
function createBuilderProgram(kind, _a) {
|
|
99879
99826
|
var newProgram = _a.newProgram, host = _a.host, oldProgram = _a.oldProgram, configFileParsingDiagnostics = _a.configFileParsingDiagnostics;
|
|
99880
99827
|
var oldState = oldProgram && oldProgram.getState();
|
|
@@ -99886,28 +99833,28 @@ var ts;
|
|
|
99886
99833
|
var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames());
|
|
99887
99834
|
var computeHash = ts.maybeBind(host, host.createHash);
|
|
99888
99835
|
var state = createBuilderProgramState(newProgram, getCanonicalFileName, oldState, host.disableUseFileVersionAsSignature);
|
|
99889
|
-
var
|
|
99890
|
-
newProgram.getProgramBuildInfo = function () { return getProgramBuildInfo(state, getCanonicalFileName
|
|
99836
|
+
var backupState;
|
|
99837
|
+
newProgram.getProgramBuildInfo = function () { return getProgramBuildInfo(state, getCanonicalFileName); };
|
|
99891
99838
|
newProgram = undefined;
|
|
99892
99839
|
oldProgram = undefined;
|
|
99893
99840
|
oldState = undefined;
|
|
99894
99841
|
var getState = function () { return state; };
|
|
99895
99842
|
var builderProgram = createRedirectedBuilderProgram(getState, configFileParsingDiagnostics);
|
|
99896
99843
|
builderProgram.getState = getState;
|
|
99897
|
-
builderProgram.
|
|
99898
|
-
ts.Debug.assert(
|
|
99899
|
-
|
|
99844
|
+
builderProgram.backupState = function () {
|
|
99845
|
+
ts.Debug.assert(backupState === undefined);
|
|
99846
|
+
backupState = cloneBuilderProgramState(state);
|
|
99900
99847
|
};
|
|
99901
|
-
builderProgram.
|
|
99902
|
-
|
|
99903
|
-
|
|
99848
|
+
builderProgram.restoreState = function () {
|
|
99849
|
+
state = ts.Debug.checkDefined(backupState);
|
|
99850
|
+
backupState = undefined;
|
|
99904
99851
|
};
|
|
99905
99852
|
builderProgram.getAllDependencies = function (sourceFile) { return ts.BuilderState.getAllDependencies(state, ts.Debug.checkDefined(state.program), sourceFile); };
|
|
99906
99853
|
builderProgram.getSemanticDiagnostics = getSemanticDiagnostics;
|
|
99907
99854
|
builderProgram.emit = emit;
|
|
99908
99855
|
builderProgram.releaseProgram = function () {
|
|
99909
99856
|
releaseCache(state);
|
|
99910
|
-
|
|
99857
|
+
backupState = undefined;
|
|
99911
99858
|
};
|
|
99912
99859
|
if (kind === BuilderProgramKind.SemanticDiagnosticsBuilderProgram) {
|
|
99913
99860
|
builderProgram.getSemanticDiagnosticsOfNextAffectedFile = getSemanticDiagnosticsOfNextAffectedFile;
|
|
@@ -99953,57 +99900,35 @@ var ts;
|
|
|
99953
99900
|
affected = program;
|
|
99954
99901
|
}
|
|
99955
99902
|
}
|
|
99956
|
-
return toAffectedFileEmitResult(state, ts.Debug.checkDefined(state.program).emit(affected === state.program ? undefined : affected, ts.getEmitDeclarations(state.compilerOptions) ?
|
|
99957
|
-
|
|
99903
|
+
return toAffectedFileEmitResult(state, ts.Debug.checkDefined(state.program).emit(affected === state.program ? undefined : affected, affected !== state.program && ts.getEmitDeclarations(state.compilerOptions) && !customTransformers ?
|
|
99904
|
+
getWriteFileUpdatingSignatureCallback(writeFile) :
|
|
99958
99905
|
writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles || emitKind === 0, customTransformers), affected, emitKind, isPendingEmitFile);
|
|
99959
99906
|
}
|
|
99960
|
-
function
|
|
99907
|
+
function getWriteFileUpdatingSignatureCallback(writeFile) {
|
|
99961
99908
|
return function (fileName, text, writeByteOrderMark, onError, sourceFiles, data) {
|
|
99962
|
-
var _a
|
|
99909
|
+
var _a;
|
|
99963
99910
|
if (ts.isDeclarationFileName(fileName)) {
|
|
99964
|
-
|
|
99965
|
-
|
|
99966
|
-
|
|
99967
|
-
|
|
99968
|
-
|
|
99969
|
-
|
|
99970
|
-
|
|
99971
|
-
|
|
99972
|
-
|
|
99973
|
-
|
|
99974
|
-
|
|
99975
|
-
|
|
99976
|
-
|
|
99977
|
-
if (state.affectedFiles) {
|
|
99978
|
-
var existing = (_a = state.oldSignatures) === null || _a === void 0 ? void 0 : _a.get(file.resolvedPath);
|
|
99979
|
-
if (existing === undefined)
|
|
99980
|
-
(state.oldSignatures || (state.oldSignatures = new ts.Map())).set(file.resolvedPath, info.signature || false);
|
|
99981
|
-
info.signature = newSignature;
|
|
99982
|
-
}
|
|
99983
|
-
else {
|
|
99984
|
-
info.signature = newSignature;
|
|
99985
|
-
(_b = state.oldExportedModulesMap) === null || _b === void 0 ? void 0 : _b.clear();
|
|
99986
|
-
}
|
|
99987
|
-
}
|
|
99911
|
+
ts.Debug.assert((sourceFiles === null || sourceFiles === void 0 ? void 0 : sourceFiles.length) === 1);
|
|
99912
|
+
var file = sourceFiles[0];
|
|
99913
|
+
var info = state.fileInfos.get(file.resolvedPath);
|
|
99914
|
+
var signature = ((_a = state.currentAffectedFilesSignatures) === null || _a === void 0 ? void 0 : _a.get(file.resolvedPath)) || info.signature;
|
|
99915
|
+
if (signature === file.version) {
|
|
99916
|
+
var newSignature = (computeHash || ts.generateDjb2Hash)((data === null || data === void 0 ? void 0 : data.sourceMapUrlPos) !== undefined ? text.substring(0, data.sourceMapUrlPos) : text);
|
|
99917
|
+
if (newSignature !== file.version) {
|
|
99918
|
+
if (host.storeFilesChangingSignatureDuringEmit)
|
|
99919
|
+
(state.filesChangingSignature || (state.filesChangingSignature = new ts.Set())).add(file.resolvedPath);
|
|
99920
|
+
if (state.exportedModulesMap)
|
|
99921
|
+
ts.BuilderState.updateExportedModules(file, file.exportedModulesFromDeclarationEmit, state.currentAffectedFilesExportedModulesMap || (state.currentAffectedFilesExportedModulesMap = ts.BuilderState.createManyToManyPathMap()));
|
|
99922
|
+
if (state.affectedFiles && state.affectedFilesIndex < state.affectedFiles.length) {
|
|
99923
|
+
state.currentAffectedFilesSignatures.set(file.resolvedPath, newSignature);
|
|
99988
99924
|
}
|
|
99989
|
-
|
|
99990
|
-
|
|
99991
|
-
|
|
99992
|
-
|
|
99993
|
-
newSignature || (newSignature = computeSignature(text, data, computeHash));
|
|
99994
|
-
if (newSignature !== oldSignature) {
|
|
99995
|
-
(state.emitSignatures || (state.emitSignatures = new ts.Map())).set(filePath, newSignature);
|
|
99996
|
-
state.hasChangedEmitSignature = true;
|
|
99925
|
+
else {
|
|
99926
|
+
info.signature = newSignature;
|
|
99927
|
+
if (state.exportedModulesMap)
|
|
99928
|
+
ts.BuilderState.updateExportedFilesMapFromCache(state, state.currentAffectedFilesExportedModulesMap);
|
|
99997
99929
|
}
|
|
99998
99930
|
}
|
|
99999
99931
|
}
|
|
100000
|
-
else if (state.compilerOptions.composite) {
|
|
100001
|
-
var newSignature = computeSignature(text, data, computeHash);
|
|
100002
|
-
if (newSignature !== state.outSignature) {
|
|
100003
|
-
state.outSignature = newSignature;
|
|
100004
|
-
state.hasChangedEmitSignature = true;
|
|
100005
|
-
}
|
|
100006
|
-
}
|
|
100007
99932
|
}
|
|
100008
99933
|
if (writeFile)
|
|
100009
99934
|
writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data);
|
|
@@ -100052,8 +99977,8 @@ var ts;
|
|
|
100052
99977
|
}
|
|
100053
99978
|
}
|
|
100054
99979
|
}
|
|
100055
|
-
return ts.Debug.checkDefined(state.program).emit(targetSourceFile, ts.getEmitDeclarations(state.compilerOptions) ?
|
|
100056
|
-
|
|
99980
|
+
return ts.Debug.checkDefined(state.program).emit(targetSourceFile, !ts.outFile(state.compilerOptions) && ts.getEmitDeclarations(state.compilerOptions) && !customTransformers ?
|
|
99981
|
+
getWriteFileUpdatingSignatureCallback(writeFile) :
|
|
100057
99982
|
writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles, customTransformers);
|
|
100058
99983
|
}
|
|
100059
99984
|
function getSemanticDiagnosticsOfNextAffectedFile(cancellationToken, ignoreSourceFile) {
|
|
@@ -100116,58 +100041,29 @@ var ts;
|
|
|
100116
100041
|
{ version: fileInfo.version, signature: fileInfo.signature === false ? undefined : fileInfo.version, affectsGlobalScope: fileInfo.affectsGlobalScope, impliedFormat: fileInfo.impliedFormat };
|
|
100117
100042
|
}
|
|
100118
100043
|
ts.toBuilderStateFileInfo = toBuilderStateFileInfo;
|
|
100119
|
-
function
|
|
100120
|
-
var _a
|
|
100044
|
+
function createBuildProgramUsingProgramBuildInfo(program, buildInfoPath, host) {
|
|
100045
|
+
var _a;
|
|
100121
100046
|
var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));
|
|
100122
100047
|
var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames());
|
|
100123
|
-
var
|
|
100124
|
-
var
|
|
100125
|
-
var
|
|
100126
|
-
|
|
100127
|
-
|
|
100128
|
-
|
|
100129
|
-
|
|
100130
|
-
|
|
100131
|
-
|
|
100132
|
-
};
|
|
100133
|
-
|
|
100134
|
-
|
|
100135
|
-
|
|
100136
|
-
|
|
100137
|
-
|
|
100138
|
-
var emitSignatures_1 = ((_c = program.options) === null || _c === void 0 ? void 0 : _c.composite) && !ts.outFile(program.options) ? new ts.Map() : undefined;
|
|
100139
|
-
program.fileInfos.forEach(function (fileInfo, index) {
|
|
100140
|
-
var path = toFilePath(index + 1);
|
|
100141
|
-
var stateFileInfo = toBuilderStateFileInfo(fileInfo);
|
|
100142
|
-
fileInfos_2.set(path, stateFileInfo);
|
|
100143
|
-
if (emitSignatures_1 && stateFileInfo.signature)
|
|
100144
|
-
emitSignatures_1.set(path, stateFileInfo.signature);
|
|
100145
|
-
});
|
|
100146
|
-
(_d = program.emitSignatures) === null || _d === void 0 ? void 0 : _d.forEach(function (value) {
|
|
100147
|
-
if (ts.isNumber(value))
|
|
100148
|
-
emitSignatures_1.delete(toFilePath(value));
|
|
100149
|
-
else
|
|
100150
|
-
emitSignatures_1.set(toFilePath(value[0]), value[1]);
|
|
100151
|
-
});
|
|
100152
|
-
state = {
|
|
100153
|
-
fileInfos: fileInfos_2,
|
|
100154
|
-
compilerOptions: program.options ? ts.convertToOptionsWithAbsolutePaths(program.options, toAbsolutePath) : {},
|
|
100155
|
-
referencedMap: toManyToManyPathMap(program.referencedMap),
|
|
100156
|
-
exportedModulesMap: toManyToManyPathMap(program.exportedModulesMap),
|
|
100157
|
-
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]; }),
|
|
100158
|
-
hasReusableDiagnostic: true,
|
|
100159
|
-
affectedFilesPendingEmit: ts.map(program.affectedFilesPendingEmit, function (value) { return toFilePath(value[0]); }),
|
|
100160
|
-
affectedFilesPendingEmitKind: program.affectedFilesPendingEmit && ts.arrayToMap(program.affectedFilesPendingEmit, function (value) { return toFilePath(value[0]); }, function (value) { return value[1]; }),
|
|
100161
|
-
affectedFilesPendingEmitIndex: program.affectedFilesPendingEmit && 0,
|
|
100162
|
-
changedFilesSet: new ts.Set(ts.map(program.changeFileSet, toFilePath)),
|
|
100163
|
-
dtsChangeTime: program.dtsChangeTime,
|
|
100164
|
-
emitSignatures: (emitSignatures_1 === null || emitSignatures_1 === void 0 ? void 0 : emitSignatures_1.size) ? emitSignatures_1 : undefined,
|
|
100165
|
-
};
|
|
100166
|
-
}
|
|
100048
|
+
var filePaths = program.fileNames.map(toPath);
|
|
100049
|
+
var filePathsSetList = (_a = program.fileIdsList) === null || _a === void 0 ? void 0 : _a.map(function (fileIds) { return new ts.Set(fileIds.map(toFilePath)); });
|
|
100050
|
+
var fileInfos = new ts.Map();
|
|
100051
|
+
program.fileInfos.forEach(function (fileInfo, index) { return fileInfos.set(toFilePath(index + 1), toBuilderStateFileInfo(fileInfo)); });
|
|
100052
|
+
var state = {
|
|
100053
|
+
fileInfos: fileInfos,
|
|
100054
|
+
compilerOptions: program.options ? ts.convertToOptionsWithAbsolutePaths(program.options, toAbsolutePath) : {},
|
|
100055
|
+
referencedMap: toManyToManyPathMap(program.referencedMap),
|
|
100056
|
+
exportedModulesMap: toManyToManyPathMap(program.exportedModulesMap),
|
|
100057
|
+
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]; }),
|
|
100058
|
+
hasReusableDiagnostic: true,
|
|
100059
|
+
affectedFilesPendingEmit: ts.map(program.affectedFilesPendingEmit, function (value) { return toFilePath(value[0]); }),
|
|
100060
|
+
affectedFilesPendingEmitKind: program.affectedFilesPendingEmit && ts.arrayToMap(program.affectedFilesPendingEmit, function (value) { return toFilePath(value[0]); }, function (value) { return value[1]; }),
|
|
100061
|
+
affectedFilesPendingEmitIndex: program.affectedFilesPendingEmit && 0,
|
|
100062
|
+
};
|
|
100167
100063
|
return {
|
|
100168
100064
|
getState: function () { return state; },
|
|
100169
|
-
|
|
100170
|
-
|
|
100065
|
+
backupState: ts.noop,
|
|
100066
|
+
restoreState: ts.noop,
|
|
100171
100067
|
getProgram: ts.notImplemented,
|
|
100172
100068
|
getProgramOrUndefined: ts.returnUndefined,
|
|
100173
100069
|
releaseProgram: ts.noop,
|
|
@@ -100212,24 +100108,12 @@ var ts;
|
|
|
100212
100108
|
return map;
|
|
100213
100109
|
}
|
|
100214
100110
|
}
|
|
100215
|
-
ts.
|
|
100216
|
-
function getBuildInfoFileVersionMap(program, buildInfoPath, host) {
|
|
100217
|
-
var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));
|
|
100218
|
-
var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames());
|
|
100219
|
-
var fileInfos = new ts.Map();
|
|
100220
|
-
program.fileInfos.forEach(function (fileInfo, index) {
|
|
100221
|
-
var path = ts.toPath(program.fileNames[index], buildInfoDirectory, getCanonicalFileName);
|
|
100222
|
-
var version = ts.isString(fileInfo) ? fileInfo : fileInfo.version;
|
|
100223
|
-
fileInfos.set(path, version);
|
|
100224
|
-
});
|
|
100225
|
-
return fileInfos;
|
|
100226
|
-
}
|
|
100227
|
-
ts.getBuildInfoFileVersionMap = getBuildInfoFileVersionMap;
|
|
100111
|
+
ts.createBuildProgramUsingProgramBuildInfo = createBuildProgramUsingProgramBuildInfo;
|
|
100228
100112
|
function createRedirectedBuilderProgram(getState, configFileParsingDiagnostics) {
|
|
100229
100113
|
return {
|
|
100230
100114
|
getState: ts.notImplemented,
|
|
100231
|
-
|
|
100232
|
-
|
|
100115
|
+
backupState: ts.noop,
|
|
100116
|
+
restoreState: ts.noop,
|
|
100233
100117
|
getProgram: getProgram,
|
|
100234
100118
|
getProgramOrUndefined: function () { return getState().program; },
|
|
100235
100119
|
releaseProgram: function () { return getState().program = undefined; },
|
|
@@ -101180,9 +101064,9 @@ var ts;
|
|
|
101180
101064
|
var targets = importedFileNames.map(function (f) { return ts.getNormalizedAbsolutePath(f, cwd); });
|
|
101181
101065
|
var shouldFilterIgnoredPaths = !ts.every(targets, ts.containsIgnoredPath);
|
|
101182
101066
|
if (!preferSymlinks) {
|
|
101183
|
-
var
|
|
101184
|
-
if (
|
|
101185
|
-
return
|
|
101067
|
+
var result_15 = ts.forEach(targets, function (p) { return !(shouldFilterIgnoredPaths && ts.containsIgnoredPath(p)) && cb(p, referenceRedirect === p); });
|
|
101068
|
+
if (result_15)
|
|
101069
|
+
return result_15;
|
|
101186
101070
|
}
|
|
101187
101071
|
var symlinkedDirectories = (_a = host.getSymlinkCache) === null || _a === void 0 ? void 0 : _a.call(host).getSymlinkedDirectoriesByRealpath();
|
|
101188
101072
|
var fullImportedFileName = ts.getNormalizedAbsolutePath(importedFileName, cwd);
|
|
@@ -101201,10 +101085,10 @@ var ts;
|
|
|
101201
101085
|
for (var _i = 0, symlinkDirectories_1 = symlinkDirectories; _i < symlinkDirectories_1.length; _i++) {
|
|
101202
101086
|
var symlinkDirectory = symlinkDirectories_1[_i];
|
|
101203
101087
|
var option = ts.resolvePath(symlinkDirectory, relative);
|
|
101204
|
-
var
|
|
101088
|
+
var result_16 = cb(option, target === referenceRedirect);
|
|
101205
101089
|
shouldFilterIgnoredPaths = true;
|
|
101206
|
-
if (
|
|
101207
|
-
return
|
|
101090
|
+
if (result_16)
|
|
101091
|
+
return result_16;
|
|
101208
101092
|
}
|
|
101209
101093
|
});
|
|
101210
101094
|
});
|
|
@@ -102036,7 +101920,6 @@ var ts;
|
|
|
102036
101920
|
readDirectory: ts.maybeBind(host, host.readDirectory),
|
|
102037
101921
|
disableUseFileVersionAsSignature: host.disableUseFileVersionAsSignature,
|
|
102038
101922
|
storeFilesChangingSignatureDuringEmit: host.storeFilesChangingSignatureDuringEmit,
|
|
102039
|
-
now: ts.maybeBind(host, host.now),
|
|
102040
101923
|
};
|
|
102041
101924
|
function writeFile(fileName, text, writeByteOrderMark, onError) {
|
|
102042
101925
|
try {
|
|
@@ -102091,7 +101974,6 @@ var ts;
|
|
|
102091
101974
|
createProgram: createProgram || ts.createEmitAndSemanticDiagnosticsBuilderProgram,
|
|
102092
101975
|
disableUseFileVersionAsSignature: system.disableUseFileVersionAsSignature,
|
|
102093
101976
|
storeFilesChangingSignatureDuringEmit: system.storeFilesChangingSignatureDuringEmit,
|
|
102094
|
-
now: ts.maybeBind(system, system.now),
|
|
102095
101977
|
};
|
|
102096
101978
|
}
|
|
102097
101979
|
ts.createProgramHost = createProgramHost;
|
|
@@ -102147,26 +102029,20 @@ var ts;
|
|
|
102147
102029
|
var ts;
|
|
102148
102030
|
(function (ts) {
|
|
102149
102031
|
function readBuilderProgram(compilerOptions, host) {
|
|
102032
|
+
if (ts.outFile(compilerOptions))
|
|
102033
|
+
return undefined;
|
|
102150
102034
|
var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(compilerOptions);
|
|
102151
102035
|
if (!buildInfoPath)
|
|
102152
102036
|
return undefined;
|
|
102153
|
-
var
|
|
102154
|
-
if (
|
|
102155
|
-
|
|
102156
|
-
|
|
102157
|
-
return undefined;
|
|
102158
|
-
}
|
|
102159
|
-
else {
|
|
102160
|
-
var content = host.readFile(buildInfoPath);
|
|
102161
|
-
if (!content)
|
|
102162
|
-
return undefined;
|
|
102163
|
-
buildInfo = ts.getBuildInfo(content);
|
|
102164
|
-
}
|
|
102037
|
+
var content = host.readFile(buildInfoPath);
|
|
102038
|
+
if (!content)
|
|
102039
|
+
return undefined;
|
|
102040
|
+
var buildInfo = ts.getBuildInfo(content);
|
|
102165
102041
|
if (buildInfo.version !== ts.version)
|
|
102166
102042
|
return undefined;
|
|
102167
102043
|
if (!buildInfo.program)
|
|
102168
102044
|
return undefined;
|
|
102169
|
-
return ts.
|
|
102045
|
+
return ts.createBuildProgramUsingProgramBuildInfo(buildInfo.program, buildInfoPath, host);
|
|
102170
102046
|
}
|
|
102171
102047
|
ts.readBuilderProgram = readBuilderProgram;
|
|
102172
102048
|
function createIncrementalCompilerHost(options, system) {
|
|
@@ -102175,7 +102051,6 @@ var ts;
|
|
|
102175
102051
|
host.createHash = ts.maybeBind(system, system.createHash);
|
|
102176
102052
|
host.disableUseFileVersionAsSignature = system.disableUseFileVersionAsSignature;
|
|
102177
102053
|
host.storeFilesChangingSignatureDuringEmit = system.storeFilesChangingSignatureDuringEmit;
|
|
102178
|
-
host.now = ts.maybeBind(system, system.now);
|
|
102179
102054
|
ts.setGetSourceFileAsHashVersioned(host, system);
|
|
102180
102055
|
ts.changeCompilerHostLikeToUseCache(host, function (fileName) { return ts.toPath(fileName, host.getCurrentDirectory(), host.getCanonicalFileName); });
|
|
102181
102056
|
return host;
|
|
@@ -102839,14 +102714,11 @@ var ts;
|
|
|
102839
102714
|
UpToDateStatusType[UpToDateStatusType["OutputMissing"] = 4] = "OutputMissing";
|
|
102840
102715
|
UpToDateStatusType[UpToDateStatusType["OutOfDateWithSelf"] = 5] = "OutOfDateWithSelf";
|
|
102841
102716
|
UpToDateStatusType[UpToDateStatusType["OutOfDateWithUpstream"] = 6] = "OutOfDateWithUpstream";
|
|
102842
|
-
UpToDateStatusType[UpToDateStatusType["
|
|
102843
|
-
UpToDateStatusType[UpToDateStatusType["
|
|
102844
|
-
UpToDateStatusType[UpToDateStatusType["
|
|
102845
|
-
UpToDateStatusType[UpToDateStatusType["
|
|
102846
|
-
UpToDateStatusType[UpToDateStatusType["
|
|
102847
|
-
UpToDateStatusType[UpToDateStatusType["UpToDateWithInputFileText"] = 12] = "UpToDateWithInputFileText";
|
|
102848
|
-
UpToDateStatusType[UpToDateStatusType["ContainerOnly"] = 13] = "ContainerOnly";
|
|
102849
|
-
UpToDateStatusType[UpToDateStatusType["ForceBuild"] = 14] = "ForceBuild";
|
|
102717
|
+
UpToDateStatusType[UpToDateStatusType["UpstreamOutOfDate"] = 7] = "UpstreamOutOfDate";
|
|
102718
|
+
UpToDateStatusType[UpToDateStatusType["UpstreamBlocked"] = 8] = "UpstreamBlocked";
|
|
102719
|
+
UpToDateStatusType[UpToDateStatusType["ComputingUpstream"] = 9] = "ComputingUpstream";
|
|
102720
|
+
UpToDateStatusType[UpToDateStatusType["TsVersionOutputOfDate"] = 10] = "TsVersionOutputOfDate";
|
|
102721
|
+
UpToDateStatusType[UpToDateStatusType["ContainerOnly"] = 11] = "ContainerOnly";
|
|
102850
102722
|
})(UpToDateStatusType = ts.UpToDateStatusType || (ts.UpToDateStatusType = {}));
|
|
102851
102723
|
function resolveConfigFileProjectName(project) {
|
|
102852
102724
|
if (ts.fileExtensionIs(project, ".json")) {
|
|
@@ -102884,10 +102756,9 @@ var ts;
|
|
|
102884
102756
|
function getOrCreateValueMapFromConfigFileMap(configFileMap, resolved) {
|
|
102885
102757
|
return getOrCreateValueFromConfigFileMap(configFileMap, resolved, function () { return new ts.Map(); });
|
|
102886
102758
|
}
|
|
102887
|
-
function
|
|
102888
|
-
return
|
|
102759
|
+
function newer(date1, date2) {
|
|
102760
|
+
return date2 > date1 ? date2 : date1;
|
|
102889
102761
|
}
|
|
102890
|
-
ts.getCurrentTime = getCurrentTime;
|
|
102891
102762
|
function isCircularBuildOrder(buildOrder) {
|
|
102892
102763
|
return !!buildOrder && !!buildOrder.buildOrder;
|
|
102893
102764
|
}
|
|
@@ -102971,7 +102842,6 @@ var ts;
|
|
|
102971
102842
|
return ts.loadWithTypeDirectiveCache(ts.Debug.checkEachDefined(typeReferenceDirectiveNames), containingFile, redirectedReference, containingFileMode, loader_4);
|
|
102972
102843
|
};
|
|
102973
102844
|
}
|
|
102974
|
-
compilerHost.getBuildInfo = function (fileName, configFilePath) { return getBuildInfo(state, fileName, toResolvedConfigFilePath(state, configFilePath), undefined); };
|
|
102975
102845
|
var _a = ts.createWatchFactory(hostWithWatch, options), watchFile = _a.watchFile, watchDirectory = _a.watchDirectory, writeLog = _a.writeLog;
|
|
102976
102846
|
var state = {
|
|
102977
102847
|
host: host,
|
|
@@ -102987,9 +102857,8 @@ var ts;
|
|
|
102987
102857
|
resolvedConfigFilePaths: new ts.Map(),
|
|
102988
102858
|
configFileCache: new ts.Map(),
|
|
102989
102859
|
projectStatus: new ts.Map(),
|
|
102860
|
+
buildInfoChecked: new ts.Map(),
|
|
102990
102861
|
extendedConfigCache: new ts.Map(),
|
|
102991
|
-
buildInfoCache: new ts.Map(),
|
|
102992
|
-
outputTimeStamps: new ts.Map(),
|
|
102993
102862
|
builderPrograms: new ts.Map(),
|
|
102994
102863
|
diagnostics: new ts.Map(),
|
|
102995
102864
|
projectPendingBuild: new ts.Map(),
|
|
@@ -103010,7 +102879,6 @@ var ts;
|
|
|
103010
102879
|
allWatchedConfigFiles: new ts.Map(),
|
|
103011
102880
|
allWatchedExtendedConfigFiles: new ts.Map(),
|
|
103012
102881
|
allWatchedPackageJsonFiles: new ts.Map(),
|
|
103013
|
-
filesWatched: new ts.Map(),
|
|
103014
102882
|
lastCachedPackageJsonLookups: new ts.Map(),
|
|
103015
102883
|
timerToBuildInvalidatedProject: undefined,
|
|
103016
102884
|
reportFileChangeDetected: false,
|
|
@@ -103116,12 +102984,11 @@ var ts;
|
|
|
103116
102984
|
var noopOnDelete = { onDeleteValue: ts.noop };
|
|
103117
102985
|
ts.mutateMapSkippingNewValues(state.configFileCache, currentProjects, noopOnDelete);
|
|
103118
102986
|
ts.mutateMapSkippingNewValues(state.projectStatus, currentProjects, noopOnDelete);
|
|
102987
|
+
ts.mutateMapSkippingNewValues(state.buildInfoChecked, currentProjects, noopOnDelete);
|
|
103119
102988
|
ts.mutateMapSkippingNewValues(state.builderPrograms, currentProjects, noopOnDelete);
|
|
103120
102989
|
ts.mutateMapSkippingNewValues(state.diagnostics, currentProjects, noopOnDelete);
|
|
103121
102990
|
ts.mutateMapSkippingNewValues(state.projectPendingBuild, currentProjects, noopOnDelete);
|
|
103122
102991
|
ts.mutateMapSkippingNewValues(state.projectErrorsReported, currentProjects, noopOnDelete);
|
|
103123
|
-
ts.mutateMapSkippingNewValues(state.buildInfoCache, currentProjects, noopOnDelete);
|
|
103124
|
-
ts.mutateMapSkippingNewValues(state.outputTimeStamps, currentProjects, noopOnDelete);
|
|
103125
102992
|
if (state.watch) {
|
|
103126
102993
|
ts.mutateMapSkippingNewValues(state.allWatchedConfigFiles, currentProjects, { onDeleteValue: ts.closeFileWatcher });
|
|
103127
102994
|
state.allWatchedExtendedConfigFiles.forEach(function (watcher) {
|
|
@@ -103413,16 +103280,16 @@ var ts;
|
|
|
103413
103280
|
}
|
|
103414
103281
|
function emit(writeFileCallback, cancellationToken, customTransformers) {
|
|
103415
103282
|
var _a;
|
|
103416
|
-
var _b, _c
|
|
103283
|
+
var _b, _c;
|
|
103417
103284
|
ts.Debug.assertIsDefined(program);
|
|
103418
103285
|
ts.Debug.assert(step === BuildStep.Emit);
|
|
103419
|
-
program.
|
|
103286
|
+
program.backupState();
|
|
103420
103287
|
var declDiagnostics;
|
|
103421
103288
|
var reportDeclarationDiagnostics = function (d) { return (declDiagnostics || (declDiagnostics = [])).push(d); };
|
|
103422
103289
|
var outputFiles = [];
|
|
103423
|
-
var emitResult = ts.emitFilesAndReportErrors(program, reportDeclarationDiagnostics, undefined, undefined, function (name, text, writeByteOrderMark
|
|
103290
|
+
var emitResult = ts.emitFilesAndReportErrors(program, reportDeclarationDiagnostics, undefined, undefined, function (name, text, writeByteOrderMark) { return outputFiles.push({ name: name, text: text, writeByteOrderMark: writeByteOrderMark }); }, cancellationToken, false, customTransformers || ((_c = (_b = state.host).getCustomTransformers) === null || _c === void 0 ? void 0 : _c.call(_b, project))).emitResult;
|
|
103424
103291
|
if (declDiagnostics) {
|
|
103425
|
-
program.
|
|
103292
|
+
program.restoreState();
|
|
103426
103293
|
(_a = buildErrors(state, projectPath, program, config, declDiagnostics, BuildResultFlags.DeclarationEmitErrors, "Declaration file"), buildResult = _a.buildResult, step = _a.step);
|
|
103427
103294
|
return {
|
|
103428
103295
|
emitSkipped: true,
|
|
@@ -103431,46 +103298,38 @@ var ts;
|
|
|
103431
103298
|
}
|
|
103432
103299
|
var host = state.host, compilerHost = state.compilerHost;
|
|
103433
103300
|
var resultFlags = BuildResultFlags.DeclarationOutputUnchanged;
|
|
103434
|
-
var
|
|
103301
|
+
var newestDeclarationFileContentChangedTime = minimumDate;
|
|
103302
|
+
var anyDtsChanged = false;
|
|
103435
103303
|
var emitterDiagnostics = ts.createDiagnosticCollection();
|
|
103436
103304
|
var emittedOutputs = new ts.Map();
|
|
103437
|
-
var options = program.getCompilerOptions();
|
|
103438
|
-
var isIncremental = ts.isIncrementalCompilation(options);
|
|
103439
|
-
var outputTimeStampMap;
|
|
103440
|
-
var now;
|
|
103441
103305
|
ts.solutionPerformance.mark("beforeOutputFilesWrite");
|
|
103442
103306
|
outputFiles.forEach(function (_a) {
|
|
103443
|
-
var
|
|
103444
|
-
var
|
|
103445
|
-
|
|
103446
|
-
|
|
103447
|
-
|
|
103448
|
-
|
|
103449
|
-
|
|
103307
|
+
var name = _a.name, text = _a.text, writeByteOrderMark = _a.writeByteOrderMark;
|
|
103308
|
+
var priorChangeTime;
|
|
103309
|
+
if (!anyDtsChanged && ts.isDeclarationFileName(name)) {
|
|
103310
|
+
if (host.fileExists(name) && state.readFileWithCache(name) === text) {
|
|
103311
|
+
priorChangeTime = host.getModifiedTime(name);
|
|
103312
|
+
}
|
|
103313
|
+
else {
|
|
103450
103314
|
resultFlags &= ~BuildResultFlags.DeclarationOutputUnchanged;
|
|
103315
|
+
anyDtsChanged = true;
|
|
103451
103316
|
}
|
|
103452
103317
|
}
|
|
103318
|
+
emittedOutputs.set(toPath(state, name), name);
|
|
103453
103319
|
ts.writeFile(writeFileCallback ? { writeFile: writeFileCallback } : compilerHost, emitterDiagnostics, name, text, writeByteOrderMark);
|
|
103454
|
-
if (
|
|
103455
|
-
|
|
103320
|
+
if (priorChangeTime !== undefined) {
|
|
103321
|
+
newestDeclarationFileContentChangedTime = newer(priorChangeTime, newestDeclarationFileContentChangedTime);
|
|
103456
103322
|
}
|
|
103457
103323
|
});
|
|
103458
103324
|
ts.solutionPerformance.mark("afterOutputFilesWrite");
|
|
103459
103325
|
ts.solutionPerformance.measure("OutputFilesWrite", "beforeOutputFilesWrite", "afterOutputFilesWrite");
|
|
103460
|
-
finishEmit(emitterDiagnostics, emittedOutputs, outputFiles.length ? outputFiles[0].name : ts.getFirstProjectOutput(config, !host.useCaseSensitiveFileNames()), resultFlags);
|
|
103326
|
+
finishEmit(emitterDiagnostics, emittedOutputs, newestDeclarationFileContentChangedTime, anyDtsChanged, outputFiles.length ? outputFiles[0].name : ts.getFirstProjectOutput(config, !host.useCaseSensitiveFileNames()), resultFlags);
|
|
103461
103327
|
return emitResult;
|
|
103462
103328
|
}
|
|
103463
103329
|
function emitBuildInfo(writeFileCallback, cancellationToken) {
|
|
103464
103330
|
ts.Debug.assertIsDefined(program);
|
|
103465
103331
|
ts.Debug.assert(step === BuildStep.EmitBuildInfo);
|
|
103466
|
-
var emitResult = program.emitBuildInfo(
|
|
103467
|
-
if (data === null || data === void 0 ? void 0 : data.buildInfo)
|
|
103468
|
-
setBuildInfo(state, data.buildInfo, projectPath, program.getCompilerOptions());
|
|
103469
|
-
if (writeFileCallback)
|
|
103470
|
-
writeFileCallback(name, text, writeByteOrderMark, onError, sourceFiles, data);
|
|
103471
|
-
else
|
|
103472
|
-
state.compilerHost.writeFile(name, text, writeByteOrderMark, onError, sourceFiles, data);
|
|
103473
|
-
}, cancellationToken);
|
|
103332
|
+
var emitResult = program.emitBuildInfo(writeFileCallback, cancellationToken);
|
|
103474
103333
|
if (emitResult.diagnostics.length) {
|
|
103475
103334
|
reportErrors(state, emitResult.diagnostics);
|
|
103476
103335
|
state.diagnostics.set(projectPath, __spreadArray(__spreadArray([], state.diagnostics.get(projectPath), true), emitResult.diagnostics, true));
|
|
@@ -103483,7 +103342,7 @@ var ts;
|
|
|
103483
103342
|
step = BuildStep.QueueReferencingProjects;
|
|
103484
103343
|
return emitResult;
|
|
103485
103344
|
}
|
|
103486
|
-
function finishEmit(emitterDiagnostics, emittedOutputs, oldestOutputFileName, resultFlags) {
|
|
103345
|
+
function finishEmit(emitterDiagnostics, emittedOutputs, priorNewestUpdateTime, newestDeclarationFileContentChangedTimeIsMaximumDate, oldestOutputFileName, resultFlags) {
|
|
103487
103346
|
var _a;
|
|
103488
103347
|
var emitDiagnostics = emitterDiagnostics.getDiagnostics();
|
|
103489
103348
|
if (emitDiagnostics.length) {
|
|
@@ -103493,11 +103352,13 @@ var ts;
|
|
|
103493
103352
|
if (state.write) {
|
|
103494
103353
|
emittedOutputs.forEach(function (name) { return listEmittedFile(state, config, name); });
|
|
103495
103354
|
}
|
|
103496
|
-
updateOutputTimestampsWorker(state, config,
|
|
103355
|
+
var newestDeclarationFileContentChangedTime = updateOutputTimestampsWorker(state, config, priorNewestUpdateTime, ts.Diagnostics.Updating_unchanged_output_timestamps_of_project_0, emittedOutputs);
|
|
103497
103356
|
state.diagnostics.delete(projectPath);
|
|
103498
103357
|
state.projectStatus.set(projectPath, {
|
|
103499
103358
|
type: ts.UpToDateStatusType.UpToDate,
|
|
103500
|
-
newestDeclarationFileContentChangedTime:
|
|
103359
|
+
newestDeclarationFileContentChangedTime: newestDeclarationFileContentChangedTimeIsMaximumDate ?
|
|
103360
|
+
maximumDate :
|
|
103361
|
+
newestDeclarationFileContentChangedTime,
|
|
103501
103362
|
oldestOutputFileName: oldestOutputFileName
|
|
103502
103363
|
});
|
|
103503
103364
|
afterProgramDone(state, program, config);
|
|
@@ -103530,21 +103391,12 @@ var ts;
|
|
|
103530
103391
|
ts.Debug.assert(!!outputFiles.length);
|
|
103531
103392
|
var emitterDiagnostics = ts.createDiagnosticCollection();
|
|
103532
103393
|
var emittedOutputs = new ts.Map();
|
|
103533
|
-
var resultFlags = BuildResultFlags.DeclarationOutputUnchanged;
|
|
103534
|
-
var existingBuildInfo = state.buildInfoCache.get(projectPath).buildInfo;
|
|
103535
103394
|
outputFiles.forEach(function (_a) {
|
|
103536
|
-
var
|
|
103537
|
-
var name = _a.name, text = _a.text, writeByteOrderMark = _a.writeByteOrderMark, buildInfo = _a.buildInfo;
|
|
103395
|
+
var name = _a.name, text = _a.text, writeByteOrderMark = _a.writeByteOrderMark;
|
|
103538
103396
|
emittedOutputs.set(toPath(state, name), name);
|
|
103539
|
-
if (buildInfo) {
|
|
103540
|
-
setBuildInfo(state, buildInfo, projectPath, config.options);
|
|
103541
|
-
if (((_b = buildInfo.program) === null || _b === void 0 ? void 0 : _b.dtsChangeTime) !== ((_c = existingBuildInfo.program) === null || _c === void 0 ? void 0 : _c.dtsChangeTime)) {
|
|
103542
|
-
resultFlags &= ~BuildResultFlags.DeclarationOutputUnchanged;
|
|
103543
|
-
}
|
|
103544
|
-
}
|
|
103545
103397
|
ts.writeFile(writeFileCallback ? { writeFile: writeFileCallback } : compilerHost, emitterDiagnostics, name, text, writeByteOrderMark);
|
|
103546
103398
|
});
|
|
103547
|
-
var emitDiagnostics = finishEmit(emitterDiagnostics, emittedOutputs, outputFiles[0].name,
|
|
103399
|
+
var emitDiagnostics = finishEmit(emitterDiagnostics, emittedOutputs, minimumDate, false, outputFiles[0].name, BuildResultFlags.DeclarationOutputUnchanged);
|
|
103548
103400
|
return { emitSkipped: false, diagnostics: emitDiagnostics };
|
|
103549
103401
|
}
|
|
103550
103402
|
function executeSteps(till, cancellationToken, writeFile, customTransformers) {
|
|
@@ -103646,7 +103498,7 @@ var ts;
|
|
|
103646
103498
|
}
|
|
103647
103499
|
continue;
|
|
103648
103500
|
}
|
|
103649
|
-
if (status.type === ts.UpToDateStatusType.UpToDateWithUpstreamTypes
|
|
103501
|
+
if (status.type === ts.UpToDateStatusType.UpToDateWithUpstreamTypes) {
|
|
103650
103502
|
reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config));
|
|
103651
103503
|
return {
|
|
103652
103504
|
kind: InvalidatedProjectKind.UpdateOutputFileStamps,
|
|
@@ -103731,7 +103583,7 @@ var ts;
|
|
|
103731
103583
|
state.projectCompilerOptions = state.baseCompilerOptions;
|
|
103732
103584
|
}
|
|
103733
103585
|
function buildErrors(state, resolvedPath, program, config, diagnostics, buildResult, errorType) {
|
|
103734
|
-
var canEmitBuildInfo = program && !ts.outFile(program.getCompilerOptions());
|
|
103586
|
+
var canEmitBuildInfo = !(buildResult & BuildResultFlags.SyntaxErrors) && program && !ts.outFile(program.getCompilerOptions());
|
|
103735
103587
|
reportAndStoreErrors(state, resolvedPath, diagnostics);
|
|
103736
103588
|
state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.Unbuildable, reason: errorType + " errors" });
|
|
103737
103589
|
if (canEmitBuildInfo)
|
|
@@ -103739,100 +103591,8 @@ var ts;
|
|
|
103739
103591
|
afterProgramDone(state, program, config);
|
|
103740
103592
|
return { buildResult: buildResult, step: BuildStep.QueueReferencingProjects };
|
|
103741
103593
|
}
|
|
103742
|
-
function isFileWatcherWithModifiedTime(value) {
|
|
103743
|
-
return !!value.watcher;
|
|
103744
|
-
}
|
|
103745
|
-
function getModifiedTime(state, fileName) {
|
|
103746
|
-
var path = toPath(state, fileName);
|
|
103747
|
-
var existing = state.filesWatched.get(path);
|
|
103748
|
-
if (state.watch && !!existing) {
|
|
103749
|
-
if (!isFileWatcherWithModifiedTime(existing))
|
|
103750
|
-
return existing;
|
|
103751
|
-
if (existing.modifiedTime)
|
|
103752
|
-
return existing.modifiedTime;
|
|
103753
|
-
}
|
|
103754
|
-
var result = ts.getModifiedTime(state.host, fileName);
|
|
103755
|
-
if (state.watch) {
|
|
103756
|
-
if (existing)
|
|
103757
|
-
existing.modifiedTime = result;
|
|
103758
|
-
else
|
|
103759
|
-
state.filesWatched.set(path, result);
|
|
103760
|
-
}
|
|
103761
|
-
return result;
|
|
103762
|
-
}
|
|
103763
|
-
function watchFile(state, file, callback, pollingInterval, options, watchType, project) {
|
|
103764
|
-
var path = toPath(state, file);
|
|
103765
|
-
var existing = state.filesWatched.get(path);
|
|
103766
|
-
if (existing && isFileWatcherWithModifiedTime(existing)) {
|
|
103767
|
-
existing.callbacks.push(callback);
|
|
103768
|
-
}
|
|
103769
|
-
else {
|
|
103770
|
-
var watcher = state.watchFile(file, function (fileName, eventKind, modifiedTime) {
|
|
103771
|
-
var existing = ts.Debug.checkDefined(state.filesWatched.get(path));
|
|
103772
|
-
ts.Debug.assert(isFileWatcherWithModifiedTime(existing));
|
|
103773
|
-
existing.modifiedTime = modifiedTime;
|
|
103774
|
-
existing.callbacks.forEach(function (cb) { return cb(fileName, eventKind, modifiedTime); });
|
|
103775
|
-
}, pollingInterval, options, watchType, project);
|
|
103776
|
-
state.filesWatched.set(path, { callbacks: [callback], watcher: watcher, modifiedTime: existing });
|
|
103777
|
-
}
|
|
103778
|
-
return {
|
|
103779
|
-
close: function () {
|
|
103780
|
-
var existing = ts.Debug.checkDefined(state.filesWatched.get(path));
|
|
103781
|
-
ts.Debug.assert(isFileWatcherWithModifiedTime(existing));
|
|
103782
|
-
if (existing.callbacks.length === 1) {
|
|
103783
|
-
state.filesWatched.delete(path);
|
|
103784
|
-
ts.closeFileWatcherOf(existing);
|
|
103785
|
-
}
|
|
103786
|
-
else {
|
|
103787
|
-
ts.unorderedRemoveItem(existing.callbacks, callback);
|
|
103788
|
-
}
|
|
103789
|
-
}
|
|
103790
|
-
};
|
|
103791
|
-
}
|
|
103792
|
-
function getOutputTimeStampMap(state, resolvedConfigFilePath) {
|
|
103793
|
-
if (!state.watch)
|
|
103794
|
-
return undefined;
|
|
103795
|
-
var result = state.outputTimeStamps.get(resolvedConfigFilePath);
|
|
103796
|
-
if (!result)
|
|
103797
|
-
state.outputTimeStamps.set(resolvedConfigFilePath, result = new ts.Map());
|
|
103798
|
-
return result;
|
|
103799
|
-
}
|
|
103800
|
-
function setBuildInfo(state, buildInfo, resolvedConfigPath, options) {
|
|
103801
|
-
var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(options);
|
|
103802
|
-
var existing = getBuildInfoCacheEntry(state, buildInfoPath, resolvedConfigPath);
|
|
103803
|
-
if (existing) {
|
|
103804
|
-
existing.buildInfo = buildInfo;
|
|
103805
|
-
existing.modifiedTime = getCurrentTime(state.host);
|
|
103806
|
-
}
|
|
103807
|
-
else {
|
|
103808
|
-
state.buildInfoCache.set(resolvedConfigPath, { path: toPath(state, buildInfoPath), buildInfo: buildInfo, modifiedTime: getCurrentTime(state.host) });
|
|
103809
|
-
}
|
|
103810
|
-
}
|
|
103811
|
-
function getBuildInfoCacheEntry(state, buildInfoPath, resolvedConfigPath) {
|
|
103812
|
-
var path = toPath(state, buildInfoPath);
|
|
103813
|
-
var existing = state.buildInfoCache.get(resolvedConfigPath);
|
|
103814
|
-
return (existing === null || existing === void 0 ? void 0 : existing.path) === path ? existing : undefined;
|
|
103815
|
-
}
|
|
103816
|
-
function getBuildInfo(state, buildInfoPath, resolvedConfigPath, modifiedTime) {
|
|
103817
|
-
var path = toPath(state, buildInfoPath);
|
|
103818
|
-
var existing = state.buildInfoCache.get(resolvedConfigPath);
|
|
103819
|
-
if (existing !== undefined && existing.path === path) {
|
|
103820
|
-
return existing.buildInfo || undefined;
|
|
103821
|
-
}
|
|
103822
|
-
ts.solutionPerformance.mark("beforeGetBuildInfo");
|
|
103823
|
-
ts.solutionPerformance.mark("beforeBuildInfoRead");
|
|
103824
|
-
var value = state.readFileWithCache(buildInfoPath);
|
|
103825
|
-
ts.solutionPerformance.mark("afterBuildInfoRead");
|
|
103826
|
-
ts.solutionPerformance.measure("BuildInfoRead", "beforeBuildInfoRead", "afterBuildInfoRead");
|
|
103827
|
-
var buildInfo = value ? ts.getBuildInfo(value) : undefined;
|
|
103828
|
-
ts.Debug.assert(modifiedTime || !buildInfo);
|
|
103829
|
-
state.buildInfoCache.set(resolvedConfigPath, { path: path, buildInfo: buildInfo || false, modifiedTime: modifiedTime || ts.missingFileModifiedTime });
|
|
103830
|
-
ts.solutionPerformance.mark("afterGetBuildInfo");
|
|
103831
|
-
ts.solutionPerformance.measure("GetBuildInfo", "beforeGetBuildInfo", "afterGetBuildInfo");
|
|
103832
|
-
return buildInfo;
|
|
103833
|
-
}
|
|
103834
103594
|
function checkConfigFileUpToDateStatus(state, configFile, oldestOutputFileTime, oldestOutputFileName) {
|
|
103835
|
-
var tsconfigTime = getModifiedTime(state, configFile);
|
|
103595
|
+
var tsconfigTime = ts.getModifiedTime(state.host, configFile);
|
|
103836
103596
|
if (oldestOutputFileTime < tsconfigTime) {
|
|
103837
103597
|
return {
|
|
103838
103598
|
type: ts.UpToDateStatusType.OutOfDateWithSelf,
|
|
@@ -103842,22 +103602,76 @@ var ts;
|
|
|
103842
103602
|
}
|
|
103843
103603
|
}
|
|
103844
103604
|
function getUpToDateStatusWorker(state, project, resolvedPath) {
|
|
103845
|
-
var
|
|
103605
|
+
var force = !!state.options.force;
|
|
103606
|
+
var newestInputFileName = undefined;
|
|
103607
|
+
var newestInputFileTime = minimumDate;
|
|
103608
|
+
var host = state.host;
|
|
103609
|
+
for (var _i = 0, _a = project.fileNames; _i < _a.length; _i++) {
|
|
103610
|
+
var inputFile = _a[_i];
|
|
103611
|
+
if (!host.fileExists(inputFile)) {
|
|
103612
|
+
return {
|
|
103613
|
+
type: ts.UpToDateStatusType.Unbuildable,
|
|
103614
|
+
reason: inputFile + " does not exist"
|
|
103615
|
+
};
|
|
103616
|
+
}
|
|
103617
|
+
if (!force) {
|
|
103618
|
+
var inputTime = ts.getModifiedTime(host, inputFile);
|
|
103619
|
+
if (inputTime > newestInputFileTime) {
|
|
103620
|
+
newestInputFileName = inputFile;
|
|
103621
|
+
newestInputFileTime = inputTime;
|
|
103622
|
+
}
|
|
103623
|
+
}
|
|
103624
|
+
}
|
|
103846
103625
|
if (!project.fileNames.length && !ts.canJsonReportNoInputFiles(project.raw)) {
|
|
103847
103626
|
return {
|
|
103848
103627
|
type: ts.UpToDateStatusType.ContainerOnly
|
|
103849
103628
|
};
|
|
103850
103629
|
}
|
|
103851
|
-
var
|
|
103852
|
-
var
|
|
103630
|
+
var outputs = ts.getAllProjectOutputs(project, !host.useCaseSensitiveFileNames());
|
|
103631
|
+
var oldestOutputFileName = "(none)";
|
|
103632
|
+
var oldestOutputFileTime = maximumDate;
|
|
103633
|
+
var newestOutputFileName = "(none)";
|
|
103634
|
+
var newestOutputFileTime = minimumDate;
|
|
103635
|
+
var missingOutputFileName;
|
|
103636
|
+
var newestDeclarationFileContentChangedTime = minimumDate;
|
|
103637
|
+
var isOutOfDateWithInputs = false;
|
|
103638
|
+
if (!force) {
|
|
103639
|
+
for (var _b = 0, outputs_1 = outputs; _b < outputs_1.length; _b++) {
|
|
103640
|
+
var output = outputs_1[_b];
|
|
103641
|
+
if (!host.fileExists(output)) {
|
|
103642
|
+
missingOutputFileName = output;
|
|
103643
|
+
break;
|
|
103644
|
+
}
|
|
103645
|
+
var outputTime = ts.getModifiedTime(host, output);
|
|
103646
|
+
if (outputTime < oldestOutputFileTime) {
|
|
103647
|
+
oldestOutputFileTime = outputTime;
|
|
103648
|
+
oldestOutputFileName = output;
|
|
103649
|
+
}
|
|
103650
|
+
if (outputTime < newestInputFileTime) {
|
|
103651
|
+
isOutOfDateWithInputs = true;
|
|
103652
|
+
break;
|
|
103653
|
+
}
|
|
103654
|
+
if (outputTime > newestOutputFileTime) {
|
|
103655
|
+
newestOutputFileTime = outputTime;
|
|
103656
|
+
newestOutputFileName = output;
|
|
103657
|
+
}
|
|
103658
|
+
if (ts.isDeclarationFileName(output)) {
|
|
103659
|
+
var outputModifiedTime = ts.getModifiedTime(host, output);
|
|
103660
|
+
newestDeclarationFileContentChangedTime = newer(newestDeclarationFileContentChangedTime, outputModifiedTime);
|
|
103661
|
+
}
|
|
103662
|
+
}
|
|
103663
|
+
}
|
|
103664
|
+
var pseudoUpToDate = false;
|
|
103665
|
+
var usesPrepend = false;
|
|
103666
|
+
var upstreamChangedProject;
|
|
103853
103667
|
if (project.projectReferences) {
|
|
103854
103668
|
state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.ComputingUpstream });
|
|
103855
|
-
for (var
|
|
103856
|
-
var ref = _d[
|
|
103669
|
+
for (var _c = 0, _d = project.projectReferences; _c < _d.length; _c++) {
|
|
103670
|
+
var ref = _d[_c];
|
|
103671
|
+
usesPrepend = usesPrepend || !!(ref.prepend);
|
|
103857
103672
|
var resolvedRef = ts.resolveProjectReferencePath(ref);
|
|
103858
103673
|
var resolvedRefPath = toResolvedConfigFilePath(state, resolvedRef);
|
|
103859
|
-
var
|
|
103860
|
-
var refStatus = getUpToDateStatus(state, resolvedConfig, resolvedRefPath);
|
|
103674
|
+
var refStatus = getUpToDateStatus(state, parseConfigFile(state, resolvedRef, resolvedRefPath), resolvedRefPath);
|
|
103861
103675
|
if (refStatus.type === ts.UpToDateStatusType.ComputingUpstream ||
|
|
103862
103676
|
refStatus.type === ts.UpToDateStatusType.ContainerOnly) {
|
|
103863
103677
|
continue;
|
|
@@ -103876,169 +103690,68 @@ var ts;
|
|
|
103876
103690
|
upstreamProjectName: ref.path
|
|
103877
103691
|
};
|
|
103878
103692
|
}
|
|
103879
|
-
if (!force)
|
|
103880
|
-
|
|
103881
|
-
|
|
103882
|
-
|
|
103883
|
-
|
|
103884
|
-
|
|
103885
|
-
|
|
103886
|
-
|
|
103887
|
-
|
|
103888
|
-
|
|
103889
|
-
var buildInfoTime;
|
|
103890
|
-
var buildInfoProgram;
|
|
103891
|
-
var buildInfoVersionMap;
|
|
103892
|
-
var newestDeclarationFileContentChangedTime;
|
|
103893
|
-
if (buildInfoPath) {
|
|
103894
|
-
var buildInfoCacheEntry_1 = getBuildInfoCacheEntry(state, buildInfoPath, resolvedPath);
|
|
103895
|
-
buildInfoTime = (buildInfoCacheEntry_1 === null || buildInfoCacheEntry_1 === void 0 ? void 0 : buildInfoCacheEntry_1.modifiedTime) || ts.getModifiedTime(host, buildInfoPath);
|
|
103896
|
-
if (buildInfoTime === ts.missingFileModifiedTime) {
|
|
103897
|
-
if (!buildInfoCacheEntry_1) {
|
|
103898
|
-
state.buildInfoCache.set(resolvedPath, {
|
|
103899
|
-
path: toPath(state, buildInfoPath),
|
|
103900
|
-
buildInfo: false,
|
|
103901
|
-
modifiedTime: buildInfoTime
|
|
103902
|
-
});
|
|
103903
|
-
}
|
|
103904
|
-
return {
|
|
103905
|
-
type: ts.UpToDateStatusType.OutputMissing,
|
|
103906
|
-
missingOutputFileName: buildInfoPath
|
|
103907
|
-
};
|
|
103908
|
-
}
|
|
103909
|
-
var buildInfo = ts.Debug.checkDefined(getBuildInfo(state, buildInfoPath, resolvedPath, buildInfoTime));
|
|
103910
|
-
if ((buildInfo.bundle || buildInfo.program) && buildInfo.version !== ts.version) {
|
|
103911
|
-
return {
|
|
103912
|
-
type: ts.UpToDateStatusType.TsVersionOutputOfDate,
|
|
103913
|
-
version: buildInfo.version
|
|
103914
|
-
};
|
|
103915
|
-
}
|
|
103916
|
-
if (buildInfo.program) {
|
|
103917
|
-
if (((_a = buildInfo.program.changeFileSet) === null || _a === void 0 ? void 0 : _a.length) ||
|
|
103918
|
-
(!project.options.noEmit && ((_b = buildInfo.program.affectedFilesPendingEmit) === null || _b === void 0 ? void 0 : _b.length))) {
|
|
103693
|
+
if (!force && !missingOutputFileName) {
|
|
103694
|
+
if (refStatus.newestInputFileTime && refStatus.newestInputFileTime <= oldestOutputFileTime) {
|
|
103695
|
+
continue;
|
|
103696
|
+
}
|
|
103697
|
+
if (refStatus.newestDeclarationFileContentChangedTime && refStatus.newestDeclarationFileContentChangedTime <= oldestOutputFileTime) {
|
|
103698
|
+
pseudoUpToDate = true;
|
|
103699
|
+
upstreamChangedProject = ref.path;
|
|
103700
|
+
continue;
|
|
103701
|
+
}
|
|
103702
|
+
ts.Debug.assert(oldestOutputFileName !== undefined, "Should have an oldest output filename here");
|
|
103919
103703
|
return {
|
|
103920
|
-
type: ts.UpToDateStatusType.
|
|
103921
|
-
|
|
103704
|
+
type: ts.UpToDateStatusType.OutOfDateWithUpstream,
|
|
103705
|
+
outOfDateOutputFileName: oldestOutputFileName,
|
|
103706
|
+
newerProjectName: ref.path
|
|
103922
103707
|
};
|
|
103923
103708
|
}
|
|
103924
|
-
buildInfoProgram = buildInfo.program;
|
|
103925
103709
|
}
|
|
103926
|
-
oldestOutputFileTime = buildInfoTime;
|
|
103927
|
-
oldestOutputFileName = buildInfoPath;
|
|
103928
|
-
newestDeclarationFileContentChangedTime = ((_c = buildInfo.program) === null || _c === void 0 ? void 0 : _c.dtsChangeTime) ? new Date(buildInfo.program.dtsChangeTime) : undefined;
|
|
103929
103710
|
}
|
|
103930
|
-
|
|
103931
|
-
|
|
103932
|
-
|
|
103933
|
-
|
|
103934
|
-
|
|
103935
|
-
var inputTime = getModifiedTime(state, inputFile);
|
|
103936
|
-
if (inputTime === ts.missingFileModifiedTime) {
|
|
103937
|
-
return {
|
|
103938
|
-
type: ts.UpToDateStatusType.Unbuildable,
|
|
103939
|
-
reason: inputFile + " does not exist"
|
|
103940
|
-
};
|
|
103941
|
-
}
|
|
103942
|
-
if (buildInfoTime && buildInfoTime < inputTime) {
|
|
103943
|
-
var version_3 = void 0;
|
|
103944
|
-
var currentVersion = void 0;
|
|
103945
|
-
if (buildInfoProgram) {
|
|
103946
|
-
if (!buildInfoVersionMap)
|
|
103947
|
-
buildInfoVersionMap = ts.getBuildInfoFileVersionMap(buildInfoProgram, buildInfoPath, host);
|
|
103948
|
-
version_3 = buildInfoVersionMap.get(toPath(state, inputFile));
|
|
103949
|
-
var text = version_3 ? state.readFileWithCache(inputFile) : undefined;
|
|
103950
|
-
currentVersion = text && (host.createHash || ts.generateDjb2Hash)(text);
|
|
103951
|
-
if (version_3 && version_3 === currentVersion)
|
|
103952
|
-
pseudoInputUptodate = true;
|
|
103953
|
-
}
|
|
103954
|
-
if (!version_3 || version_3 !== currentVersion) {
|
|
103955
|
-
return {
|
|
103956
|
-
type: ts.UpToDateStatusType.OutOfDateWithSelf,
|
|
103957
|
-
outOfDateOutputFileName: buildInfoPath,
|
|
103958
|
-
newerInputFileName: inputFile
|
|
103959
|
-
};
|
|
103960
|
-
}
|
|
103961
|
-
}
|
|
103962
|
-
if (inputTime > newestInputFileTime) {
|
|
103963
|
-
newestInputFileName = inputFile;
|
|
103964
|
-
newestInputFileTime = inputTime;
|
|
103965
|
-
}
|
|
103711
|
+
if (missingOutputFileName !== undefined) {
|
|
103712
|
+
return {
|
|
103713
|
+
type: ts.UpToDateStatusType.OutputMissing,
|
|
103714
|
+
missingOutputFileName: missingOutputFileName
|
|
103715
|
+
};
|
|
103966
103716
|
}
|
|
103967
|
-
if (
|
|
103968
|
-
|
|
103969
|
-
|
|
103970
|
-
|
|
103971
|
-
|
|
103972
|
-
|
|
103973
|
-
var outputTime = outputTimeStampMap === null || outputTimeStampMap === void 0 ? void 0 : outputTimeStampMap.get(path);
|
|
103974
|
-
if (!outputTime) {
|
|
103975
|
-
outputTime = ts.getModifiedTime(state.host, output);
|
|
103976
|
-
outputTimeStampMap === null || outputTimeStampMap === void 0 ? void 0 : outputTimeStampMap.set(path, outputTime);
|
|
103977
|
-
}
|
|
103978
|
-
if (outputTime === ts.missingFileModifiedTime) {
|
|
103979
|
-
return {
|
|
103980
|
-
type: ts.UpToDateStatusType.OutputMissing,
|
|
103981
|
-
missingOutputFileName: output
|
|
103982
|
-
};
|
|
103983
|
-
}
|
|
103984
|
-
if (outputTime < oldestOutputFileTime) {
|
|
103985
|
-
oldestOutputFileTime = outputTime;
|
|
103986
|
-
oldestOutputFileName = output;
|
|
103987
|
-
}
|
|
103988
|
-
if (outputTime < newestInputFileTime) {
|
|
103989
|
-
return {
|
|
103990
|
-
type: ts.UpToDateStatusType.OutOfDateWithSelf,
|
|
103991
|
-
outOfDateOutputFileName: oldestOutputFileName,
|
|
103992
|
-
newerInputFileName: newestInputFileName
|
|
103993
|
-
};
|
|
103994
|
-
}
|
|
103995
|
-
}
|
|
103717
|
+
if (isOutOfDateWithInputs) {
|
|
103718
|
+
return {
|
|
103719
|
+
type: ts.UpToDateStatusType.OutOfDateWithSelf,
|
|
103720
|
+
outOfDateOutputFileName: oldestOutputFileName,
|
|
103721
|
+
newerInputFileName: newestInputFileName
|
|
103722
|
+
};
|
|
103996
103723
|
}
|
|
103997
|
-
|
|
103998
|
-
|
|
103999
|
-
|
|
104000
|
-
|
|
104001
|
-
|
|
104002
|
-
|
|
104003
|
-
|
|
104004
|
-
|
|
104005
|
-
var
|
|
104006
|
-
|
|
104007
|
-
|
|
104008
|
-
|
|
104009
|
-
|
|
104010
|
-
|
|
103724
|
+
else {
|
|
103725
|
+
var configStatus = checkConfigFileUpToDateStatus(state, project.options.configFilePath, oldestOutputFileTime, oldestOutputFileName);
|
|
103726
|
+
if (configStatus)
|
|
103727
|
+
return configStatus;
|
|
103728
|
+
var extendedConfigStatus = ts.forEach(project.options.configFile.extendedSourceFiles || ts.emptyArray, function (configFile) { return checkConfigFileUpToDateStatus(state, configFile, oldestOutputFileTime, oldestOutputFileName); });
|
|
103729
|
+
if (extendedConfigStatus)
|
|
103730
|
+
return extendedConfigStatus;
|
|
103731
|
+
var dependentPackageFileStatus = ts.forEach(state.lastCachedPackageJsonLookups.get(resolvedPath) || ts.emptyArray, function (_a) {
|
|
103732
|
+
var path = _a[0];
|
|
103733
|
+
return checkConfigFileUpToDateStatus(state, path, oldestOutputFileTime, oldestOutputFileName);
|
|
103734
|
+
});
|
|
103735
|
+
if (dependentPackageFileStatus)
|
|
103736
|
+
return dependentPackageFileStatus;
|
|
103737
|
+
}
|
|
103738
|
+
if (!force && !state.buildInfoChecked.has(resolvedPath)) {
|
|
103739
|
+
state.buildInfoChecked.set(resolvedPath, true);
|
|
103740
|
+
var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(project.options);
|
|
103741
|
+
if (buildInfoPath) {
|
|
103742
|
+
ts.solutionPerformance.mark("beforeBuildInfoRead");
|
|
103743
|
+
var value = state.readFileWithCache(buildInfoPath);
|
|
103744
|
+
ts.solutionPerformance.mark("afterBuildInfoRead");
|
|
103745
|
+
ts.solutionPerformance.measure("BuildInfoRead", "beforeBuildInfoRead", "afterBuildInfoRead");
|
|
103746
|
+
var buildInfo = value && ts.getBuildInfo(value);
|
|
103747
|
+
if (buildInfo && (buildInfo.bundle || buildInfo.program) && buildInfo.version !== ts.version) {
|
|
104011
103748
|
return {
|
|
104012
|
-
type: ts.UpToDateStatusType.
|
|
104013
|
-
|
|
104014
|
-
newerProjectName: ref.path
|
|
103749
|
+
type: ts.UpToDateStatusType.TsVersionOutputOfDate,
|
|
103750
|
+
version: buildInfo.version
|
|
104015
103751
|
};
|
|
104016
103752
|
}
|
|
104017
|
-
if (refStatus.newestDeclarationFileContentChangedTime && refStatus.newestDeclarationFileContentChangedTime <= oldestOutputFileTime) {
|
|
104018
|
-
pseudoUpToDate = true;
|
|
104019
|
-
upstreamChangedProject = ref.path;
|
|
104020
|
-
continue;
|
|
104021
|
-
}
|
|
104022
|
-
ts.Debug.assert(oldestOutputFileName !== undefined, "Should have an oldest output filename here");
|
|
104023
|
-
return {
|
|
104024
|
-
type: ts.UpToDateStatusType.OutOfDateWithUpstream,
|
|
104025
|
-
outOfDateOutputFileName: oldestOutputFileName,
|
|
104026
|
-
newerProjectName: ref.path
|
|
104027
|
-
};
|
|
104028
103753
|
}
|
|
104029
103754
|
}
|
|
104030
|
-
var configStatus = checkConfigFileUpToDateStatus(state, project.options.configFilePath, oldestOutputFileTime, oldestOutputFileName);
|
|
104031
|
-
if (configStatus)
|
|
104032
|
-
return configStatus;
|
|
104033
|
-
var extendedConfigStatus = ts.forEach(project.options.configFile.extendedSourceFiles || ts.emptyArray, function (configFile) { return checkConfigFileUpToDateStatus(state, configFile, oldestOutputFileTime, oldestOutputFileName); });
|
|
104034
|
-
if (extendedConfigStatus)
|
|
104035
|
-
return extendedConfigStatus;
|
|
104036
|
-
var dependentPackageFileStatus = ts.forEach(state.lastCachedPackageJsonLookups.get(resolvedPath) || ts.emptyArray, function (_a) {
|
|
104037
|
-
var path = _a[0];
|
|
104038
|
-
return checkConfigFileUpToDateStatus(state, path, oldestOutputFileTime, oldestOutputFileName);
|
|
104039
|
-
});
|
|
104040
|
-
if (dependentPackageFileStatus)
|
|
104041
|
-
return dependentPackageFileStatus;
|
|
104042
103755
|
if (usesPrepend && pseudoUpToDate) {
|
|
104043
103756
|
return {
|
|
104044
103757
|
type: ts.UpToDateStatusType.OutOfDateWithPrepend,
|
|
@@ -104047,36 +103760,15 @@ var ts;
|
|
|
104047
103760
|
};
|
|
104048
103761
|
}
|
|
104049
103762
|
return {
|
|
104050
|
-
type: pseudoUpToDate ?
|
|
104051
|
-
ts.UpToDateStatusType.UpToDateWithUpstreamTypes :
|
|
104052
|
-
pseudoInputUptodate ?
|
|
104053
|
-
ts.UpToDateStatusType.UpToDateWithInputFileText :
|
|
104054
|
-
ts.UpToDateStatusType.UpToDate,
|
|
103763
|
+
type: pseudoUpToDate ? ts.UpToDateStatusType.UpToDateWithUpstreamTypes : ts.UpToDateStatusType.UpToDate,
|
|
104055
103764
|
newestDeclarationFileContentChangedTime: newestDeclarationFileContentChangedTime,
|
|
104056
103765
|
newestInputFileTime: newestInputFileTime,
|
|
103766
|
+
newestOutputFileTime: newestOutputFileTime,
|
|
104057
103767
|
newestInputFileName: newestInputFileName,
|
|
103768
|
+
newestOutputFileName: newestOutputFileName,
|
|
104058
103769
|
oldestOutputFileName: oldestOutputFileName
|
|
104059
103770
|
};
|
|
104060
103771
|
}
|
|
104061
|
-
function hasSameBuildInfo(state, buildInfoCacheEntry, seenRefs, resolvedConfig, resolvedRefPath) {
|
|
104062
|
-
if (seenRefs.has(resolvedRefPath))
|
|
104063
|
-
return false;
|
|
104064
|
-
seenRefs.add(resolvedRefPath);
|
|
104065
|
-
var refBuildInfo = state.buildInfoCache.get(resolvedRefPath);
|
|
104066
|
-
if (refBuildInfo.path === buildInfoCacheEntry.path)
|
|
104067
|
-
return true;
|
|
104068
|
-
if (resolvedConfig.projectReferences) {
|
|
104069
|
-
for (var _i = 0, _a = resolvedConfig.projectReferences; _i < _a.length; _i++) {
|
|
104070
|
-
var ref = _a[_i];
|
|
104071
|
-
var resolvedRef = ts.resolveProjectReferencePath(ref);
|
|
104072
|
-
var resolvedRefPath_1 = toResolvedConfigFilePath(state, resolvedRef);
|
|
104073
|
-
var resolvedConfig_1 = parseConfigFile(state, resolvedRef, resolvedRefPath_1);
|
|
104074
|
-
if (hasSameBuildInfo(state, buildInfoCacheEntry, seenRefs, resolvedConfig_1, resolvedRefPath_1))
|
|
104075
|
-
return true;
|
|
104076
|
-
}
|
|
104077
|
-
}
|
|
104078
|
-
return false;
|
|
104079
|
-
}
|
|
104080
103772
|
function getUpToDateStatus(state, project, resolvedPath) {
|
|
104081
103773
|
if (project === undefined) {
|
|
104082
103774
|
return { type: ts.UpToDateStatusType.Unbuildable, reason: "File deleted mid-build" };
|
|
@@ -104092,68 +103784,42 @@ var ts;
|
|
|
104092
103784
|
state.projectStatus.set(resolvedPath, actual);
|
|
104093
103785
|
return actual;
|
|
104094
103786
|
}
|
|
104095
|
-
function updateOutputTimestampsWorker(state, proj,
|
|
103787
|
+
function updateOutputTimestampsWorker(state, proj, priorNewestUpdateTime, verboseMessage, skipOutputs) {
|
|
104096
103788
|
if (proj.options.noEmit)
|
|
104097
|
-
return;
|
|
104098
|
-
var now;
|
|
103789
|
+
return priorNewestUpdateTime;
|
|
104099
103790
|
ts.solutionPerformance.mark("beforeUpdateOutputTimestamps");
|
|
104100
|
-
var
|
|
104101
|
-
|
|
104102
|
-
|
|
104103
|
-
|
|
103791
|
+
var host = state.host;
|
|
103792
|
+
var outputs = ts.getAllProjectOutputs(proj, !host.useCaseSensitiveFileNames());
|
|
103793
|
+
if (!skipOutputs || outputs.length !== skipOutputs.size) {
|
|
103794
|
+
var reportVerbose = !!state.options.verbose;
|
|
103795
|
+
var now = host.now ? host.now() : new Date();
|
|
103796
|
+
for (var _i = 0, outputs_2 = outputs; _i < outputs_2.length; _i++) {
|
|
103797
|
+
var file = outputs_2[_i];
|
|
103798
|
+
if (skipOutputs && skipOutputs.has(toPath(state, file))) {
|
|
103799
|
+
continue;
|
|
103800
|
+
}
|
|
103801
|
+
if (reportVerbose) {
|
|
103802
|
+
reportVerbose = false;
|
|
104104
103803
|
reportStatus(state, verboseMessage, proj.options.configFilePath);
|
|
104105
|
-
state.host.setModifiedTime(buildInfoPath, now = getCurrentTime(state.host));
|
|
104106
|
-
getBuildInfoCacheEntry(state, buildInfoPath, projectPath).modifiedTime = now;
|
|
104107
|
-
}
|
|
104108
|
-
state.outputTimeStamps.delete(projectPath);
|
|
104109
|
-
}
|
|
104110
|
-
else {
|
|
104111
|
-
var host = state.host;
|
|
104112
|
-
var outputs = ts.getAllProjectOutputs(proj, !host.useCaseSensitiveFileNames());
|
|
104113
|
-
var outputTimeStampMap_1 = getOutputTimeStampMap(state, projectPath);
|
|
104114
|
-
var modifiedOutputs_1 = outputTimeStampMap_1 ? new ts.Set() : undefined;
|
|
104115
|
-
if (!skipOutputs || outputs.length !== skipOutputs.size) {
|
|
104116
|
-
var reportVerbose = !!state.options.verbose;
|
|
104117
|
-
for (var _i = 0, outputs_2 = outputs; _i < outputs_2.length; _i++) {
|
|
104118
|
-
var file = outputs_2[_i];
|
|
104119
|
-
var path = toPath(state, file);
|
|
104120
|
-
if (skipOutputs === null || skipOutputs === void 0 ? void 0 : skipOutputs.has(path))
|
|
104121
|
-
continue;
|
|
104122
|
-
if (reportVerbose) {
|
|
104123
|
-
reportVerbose = false;
|
|
104124
|
-
reportStatus(state, verboseMessage, proj.options.configFilePath);
|
|
104125
|
-
}
|
|
104126
|
-
host.setModifiedTime(file, now || (now = getCurrentTime(state.host)));
|
|
104127
|
-
if (outputTimeStampMap_1) {
|
|
104128
|
-
outputTimeStampMap_1.set(path, now);
|
|
104129
|
-
modifiedOutputs_1.add(path);
|
|
104130
|
-
}
|
|
104131
103804
|
}
|
|
103805
|
+
if (ts.isDeclarationFileName(file)) {
|
|
103806
|
+
priorNewestUpdateTime = newer(priorNewestUpdateTime, ts.getModifiedTime(host, file));
|
|
103807
|
+
}
|
|
103808
|
+
host.setModifiedTime(file, now);
|
|
104132
103809
|
}
|
|
104133
|
-
outputTimeStampMap_1 === null || outputTimeStampMap_1 === void 0 ? void 0 : outputTimeStampMap_1.forEach(function (_value, key) {
|
|
104134
|
-
if (!(skipOutputs === null || skipOutputs === void 0 ? void 0 : skipOutputs.has(key)) && !modifiedOutputs_1.has(key))
|
|
104135
|
-
outputTimeStampMap_1.delete(key);
|
|
104136
|
-
});
|
|
104137
103810
|
}
|
|
104138
103811
|
ts.solutionPerformance.mark("afterUpdateOutputTimestamps");
|
|
104139
103812
|
ts.solutionPerformance.measure("UpdateOutputTimestamps", "beforeUpdateOutputTimestamps", "afterUpdateOutputTimestamps");
|
|
104140
|
-
|
|
104141
|
-
function getDtsChangeTime(state, options, resolvedConfigPath) {
|
|
104142
|
-
var _a;
|
|
104143
|
-
if (!options.composite)
|
|
104144
|
-
return undefined;
|
|
104145
|
-
var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(options);
|
|
104146
|
-
var buildInfo = getBuildInfo(state, buildInfoPath, resolvedConfigPath, undefined);
|
|
104147
|
-
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;
|
|
103813
|
+
return priorNewestUpdateTime;
|
|
104148
103814
|
}
|
|
104149
103815
|
function updateOutputTimestamps(state, proj, resolvedPath) {
|
|
104150
103816
|
if (state.options.dry) {
|
|
104151
103817
|
return reportStatus(state, ts.Diagnostics.A_non_dry_build_would_update_timestamps_for_output_of_project_0, proj.options.configFilePath);
|
|
104152
103818
|
}
|
|
104153
|
-
updateOutputTimestampsWorker(state, proj,
|
|
103819
|
+
var priorNewestUpdateTime = updateOutputTimestampsWorker(state, proj, minimumDate, ts.Diagnostics.Updating_output_timestamps_of_project_0);
|
|
104154
103820
|
state.projectStatus.set(resolvedPath, {
|
|
104155
103821
|
type: ts.UpToDateStatusType.UpToDate,
|
|
104156
|
-
newestDeclarationFileContentChangedTime:
|
|
103822
|
+
newestDeclarationFileContentChangedTime: priorNewestUpdateTime,
|
|
104157
103823
|
oldestOutputFileName: ts.getFirstProjectOutput(proj, !state.host.useCaseSensitiveFileNames())
|
|
104158
103824
|
});
|
|
104159
103825
|
}
|
|
@@ -104192,7 +103858,6 @@ var ts;
|
|
|
104192
103858
|
}
|
|
104193
103859
|
break;
|
|
104194
103860
|
}
|
|
104195
|
-
case ts.UpToDateStatusType.UpToDateWithInputFileText:
|
|
104196
103861
|
case ts.UpToDateStatusType.UpToDateWithUpstreamTypes:
|
|
104197
103862
|
case ts.UpToDateStatusType.OutOfDateWithPrepend:
|
|
104198
103863
|
if (!(buildResult & BuildResultFlags.DeclarationOutputUnchanged)) {
|
|
@@ -104371,10 +104036,12 @@ var ts;
|
|
|
104371
104036
|
function watchConfigFile(state, resolved, resolvedPath, parsed) {
|
|
104372
104037
|
if (!state.watch || state.allWatchedConfigFiles.has(resolvedPath))
|
|
104373
104038
|
return;
|
|
104374
|
-
state.allWatchedConfigFiles.set(resolvedPath, watchFile(
|
|
104039
|
+
state.allWatchedConfigFiles.set(resolvedPath, state.watchFile(resolved, function () {
|
|
104040
|
+
invalidateProjectAndScheduleBuilds(state, resolvedPath, ts.ConfigFileProgramReloadLevel.Full);
|
|
104041
|
+
}, ts.PollingInterval.High, parsed === null || parsed === void 0 ? void 0 : parsed.watchOptions, ts.WatchType.ConfigFile, resolved));
|
|
104375
104042
|
}
|
|
104376
104043
|
function watchExtendedConfigFiles(state, resolvedPath, parsed) {
|
|
104377
|
-
ts.updateSharedExtendedConfigFileWatcher(resolvedPath, parsed === null || parsed === void 0 ? void 0 : parsed.options, state.allWatchedExtendedConfigFiles, function (extendedConfigFileName, extendedConfigFilePath) { return watchFile(
|
|
104044
|
+
ts.updateSharedExtendedConfigFileWatcher(resolvedPath, parsed === null || parsed === void 0 ? void 0 : parsed.options, state.allWatchedExtendedConfigFiles, function (extendedConfigFileName, extendedConfigFilePath) { return state.watchFile(extendedConfigFileName, function () {
|
|
104378
104045
|
var _a;
|
|
104379
104046
|
return (_a = state.allWatchedExtendedConfigFiles.get(extendedConfigFilePath)) === null || _a === void 0 ? void 0 : _a.projects.forEach(function (projectConfigFilePath) {
|
|
104380
104047
|
return invalidateProjectAndScheduleBuilds(state, projectConfigFilePath, ts.ConfigFileProgramReloadLevel.Full);
|
|
@@ -104406,7 +104073,7 @@ var ts;
|
|
|
104406
104073
|
if (!state.watch)
|
|
104407
104074
|
return;
|
|
104408
104075
|
ts.mutateMap(getOrCreateValueMapFromConfigFileMap(state.allWatchedInputFiles, resolvedPath), ts.arrayToMap(parsed.fileNames, function (fileName) { return toPath(state, fileName); }), {
|
|
104409
|
-
createNewValue: function (_path, input) { return watchFile(
|
|
104076
|
+
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); },
|
|
104410
104077
|
onDeleteValue: ts.closeFileWatcher,
|
|
104411
104078
|
});
|
|
104412
104079
|
}
|
|
@@ -104414,7 +104081,7 @@ var ts;
|
|
|
104414
104081
|
if (!state.watch || !state.lastCachedPackageJsonLookups)
|
|
104415
104082
|
return;
|
|
104416
104083
|
ts.mutateMap(getOrCreateValueMapFromConfigFileMap(state.allWatchedPackageJsonFiles, resolvedPath), new ts.Map(state.lastCachedPackageJsonLookups.get(resolvedPath)), {
|
|
104417
|
-
createNewValue: function (path, _input) { return watchFile(
|
|
104084
|
+
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); },
|
|
104418
104085
|
onDeleteValue: ts.closeFileWatcher,
|
|
104419
104086
|
});
|
|
104420
104087
|
}
|
|
@@ -104539,26 +104206,25 @@ var ts;
|
|
|
104539
104206
|
}
|
|
104540
104207
|
}
|
|
104541
104208
|
function reportUpToDateStatus(state, configFileName, status) {
|
|
104209
|
+
if (state.options.force && (status.type === ts.UpToDateStatusType.UpToDate || status.type === ts.UpToDateStatusType.UpToDateWithUpstreamTypes)) {
|
|
104210
|
+
return reportStatus(state, ts.Diagnostics.Project_0_is_being_forcibly_rebuilt, relName(state, configFileName));
|
|
104211
|
+
}
|
|
104542
104212
|
switch (status.type) {
|
|
104543
104213
|
case ts.UpToDateStatusType.OutOfDateWithSelf:
|
|
104544
|
-
return reportStatus(state, ts.Diagnostics.
|
|
104214
|
+
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));
|
|
104545
104215
|
case ts.UpToDateStatusType.OutOfDateWithUpstream:
|
|
104546
|
-
return reportStatus(state, ts.Diagnostics.
|
|
104216
|
+
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));
|
|
104547
104217
|
case ts.UpToDateStatusType.OutputMissing:
|
|
104548
104218
|
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));
|
|
104549
|
-
case ts.UpToDateStatusType.OutOfDateBuildInfo:
|
|
104550
|
-
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));
|
|
104551
104219
|
case ts.UpToDateStatusType.UpToDate:
|
|
104552
104220
|
if (status.newestInputFileTime !== undefined) {
|
|
104553
|
-
return reportStatus(state, ts.Diagnostics.
|
|
104221
|
+
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 || ""));
|
|
104554
104222
|
}
|
|
104555
104223
|
break;
|
|
104556
104224
|
case ts.UpToDateStatusType.OutOfDateWithPrepend:
|
|
104557
104225
|
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));
|
|
104558
104226
|
case ts.UpToDateStatusType.UpToDateWithUpstreamTypes:
|
|
104559
104227
|
return reportStatus(state, ts.Diagnostics.Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies, relName(state, configFileName));
|
|
104560
|
-
case ts.UpToDateStatusType.UpToDateWithInputFileText:
|
|
104561
|
-
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));
|
|
104562
104228
|
case ts.UpToDateStatusType.UpstreamOutOfDate:
|
|
104563
104229
|
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));
|
|
104564
104230
|
case ts.UpToDateStatusType.UpstreamBlocked:
|
|
@@ -104569,8 +104235,6 @@ var ts;
|
|
|
104569
104235
|
return reportStatus(state, ts.Diagnostics.Failed_to_parse_file_0_Colon_1, relName(state, configFileName), status.reason);
|
|
104570
104236
|
case ts.UpToDateStatusType.TsVersionOutputOfDate:
|
|
104571
104237
|
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);
|
|
104572
|
-
case ts.UpToDateStatusType.ForceBuild:
|
|
104573
|
-
return reportStatus(state, ts.Diagnostics.Project_0_is_being_forcibly_rebuilt, relName(state, configFileName));
|
|
104574
104238
|
case ts.UpToDateStatusType.ContainerOnly:
|
|
104575
104239
|
case ts.UpToDateStatusType.ComputingUpstream:
|
|
104576
104240
|
break;
|