@typescript-deploys/pr-build 4.7.0-pr-48861-16 → 4.7.0-pr-48784-4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/tsc.js +827 -511
- package/lib/tsserver.js +869 -571
- package/lib/tsserverlibrary.d.ts +1 -1
- package/lib/tsserverlibrary.js +869 -571
- package/lib/typescript.d.ts +1 -1
- package/lib/typescript.js +869 -571
- package/lib/typescriptServices.d.ts +1 -1
- package/lib/typescriptServices.js +869 -571
- package/lib/typingsInstaller.js +869 -571
- package/package.json +1 -1
package/lib/tsserverlibrary.js
CHANGED
|
@@ -6384,7 +6384,7 @@ var ts;
|
|
|
6384
6384
|
};
|
|
6385
6385
|
}
|
|
6386
6386
|
function createDirectoryWatcher(dirName, dirPath, fallbackOptions) {
|
|
6387
|
-
var watcher = fsWatch(dirName, 1 /* Directory */, function (_eventName, relativeFileName) {
|
|
6387
|
+
var watcher = fsWatch(dirName, 1 /* Directory */, function (_eventName, relativeFileName, modifiedTime) {
|
|
6388
6388
|
// When files are deleted from disk, the triggered "rename" event would have a relativefileName of "undefined"
|
|
6389
6389
|
if (!ts.isString(relativeFileName))
|
|
6390
6390
|
return;
|
|
@@ -6394,7 +6394,7 @@ var ts;
|
|
|
6394
6394
|
if (callbacks) {
|
|
6395
6395
|
for (var _i = 0, callbacks_1 = callbacks; _i < callbacks_1.length; _i++) {
|
|
6396
6396
|
var fileCallback = callbacks_1[_i];
|
|
6397
|
-
fileCallback(fileName, FileWatcherEventKind.Changed);
|
|
6397
|
+
fileCallback(fileName, FileWatcherEventKind.Changed, modifiedTime);
|
|
6398
6398
|
}
|
|
6399
6399
|
}
|
|
6400
6400
|
},
|
|
@@ -6448,7 +6448,7 @@ var ts;
|
|
|
6448
6448
|
}
|
|
6449
6449
|
else {
|
|
6450
6450
|
cache.set(path, {
|
|
6451
|
-
watcher: watchFile(fileName, function (fileName, eventKind) { return ts.forEach(callbacksCache.get(path), function (cb) { return cb(fileName, eventKind); }); }, pollingInterval, options),
|
|
6451
|
+
watcher: watchFile(fileName, function (fileName, eventKind, modifiedTime) { return ts.forEach(callbacksCache.get(path), function (cb) { return cb(fileName, eventKind, modifiedTime); }); }, pollingInterval, options),
|
|
6452
6452
|
refCount: 1
|
|
6453
6453
|
});
|
|
6454
6454
|
}
|
|
@@ -6476,7 +6476,7 @@ var ts;
|
|
|
6476
6476
|
var newTime = modifiedTime.getTime();
|
|
6477
6477
|
if (oldTime !== newTime) {
|
|
6478
6478
|
watchedFile.mtime = modifiedTime;
|
|
6479
|
-
watchedFile.callback(watchedFile.fileName, getFileWatcherEventKind(oldTime, newTime));
|
|
6479
|
+
watchedFile.callback(watchedFile.fileName, getFileWatcherEventKind(oldTime, newTime), modifiedTime);
|
|
6480
6480
|
return true;
|
|
6481
6481
|
}
|
|
6482
6482
|
return false;
|
|
@@ -6727,17 +6727,18 @@ var ts;
|
|
|
6727
6727
|
})(FileSystemEntryKind = ts.FileSystemEntryKind || (ts.FileSystemEntryKind = {}));
|
|
6728
6728
|
/*@internal*/
|
|
6729
6729
|
function createFileWatcherCallback(callback) {
|
|
6730
|
-
return function (_fileName, eventKind) { return callback(eventKind === FileWatcherEventKind.Changed ? "change" : "rename", ""); };
|
|
6730
|
+
return function (_fileName, eventKind, modifiedTime) { return callback(eventKind === FileWatcherEventKind.Changed ? "change" : "rename", "", modifiedTime); };
|
|
6731
6731
|
}
|
|
6732
6732
|
ts.createFileWatcherCallback = createFileWatcherCallback;
|
|
6733
|
-
function createFsWatchCallbackForFileWatcherCallback(fileName, callback,
|
|
6734
|
-
return function (eventName) {
|
|
6733
|
+
function createFsWatchCallbackForFileWatcherCallback(fileName, callback, getModifiedTime) {
|
|
6734
|
+
return function (eventName, _relativeFileName, modifiedTime) {
|
|
6735
6735
|
if (eventName === "rename") {
|
|
6736
|
-
|
|
6736
|
+
modifiedTime || (modifiedTime = getModifiedTime(fileName) || ts.missingFileModifiedTime);
|
|
6737
|
+
callback(fileName, modifiedTime !== ts.missingFileModifiedTime ? FileWatcherEventKind.Created : FileWatcherEventKind.Deleted, modifiedTime);
|
|
6737
6738
|
}
|
|
6738
6739
|
else {
|
|
6739
6740
|
// Change
|
|
6740
|
-
callback(fileName, FileWatcherEventKind.Changed);
|
|
6741
|
+
callback(fileName, FileWatcherEventKind.Changed, modifiedTime);
|
|
6741
6742
|
}
|
|
6742
6743
|
};
|
|
6743
6744
|
}
|
|
@@ -6761,7 +6762,7 @@ var ts;
|
|
|
6761
6762
|
}
|
|
6762
6763
|
/*@internal*/
|
|
6763
6764
|
function createSystemWatchFunctions(_a) {
|
|
6764
|
-
var pollingWatchFile = _a.pollingWatchFile, getModifiedTime = _a.getModifiedTime, setTimeout = _a.setTimeout, clearTimeout = _a.clearTimeout, fsWatch = _a.fsWatch,
|
|
6765
|
+
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;
|
|
6765
6766
|
var dynamicPollingWatchFile;
|
|
6766
6767
|
var fixedChunkSizePollingWatchFile;
|
|
6767
6768
|
var nonPollingWatchFile;
|
|
@@ -6783,7 +6784,7 @@ var ts;
|
|
|
6783
6784
|
case ts.WatchFileKind.FixedChunkSizePolling:
|
|
6784
6785
|
return ensureFixedChunkSizePollingWatchFile()(fileName, callback, /* pollingInterval */ undefined, /*options*/ undefined);
|
|
6785
6786
|
case ts.WatchFileKind.UseFsEvents:
|
|
6786
|
-
return fsWatch(fileName, 0 /* File */, createFsWatchCallbackForFileWatcherCallback(fileName, callback,
|
|
6787
|
+
return fsWatch(fileName, 0 /* File */, createFsWatchCallbackForFileWatcherCallback(fileName, callback, getModifiedTime),
|
|
6787
6788
|
/*recursive*/ false, pollingInterval, ts.getFallbackOptions(options));
|
|
6788
6789
|
case ts.WatchFileKind.UseFsEventsOnParentDirectory:
|
|
6789
6790
|
if (!nonPollingWatchFile) {
|
|
@@ -6965,7 +6966,6 @@ var ts;
|
|
|
6965
6966
|
fsWatch: fsWatch,
|
|
6966
6967
|
useCaseSensitiveFileNames: useCaseSensitiveFileNames,
|
|
6967
6968
|
getCurrentDirectory: getCurrentDirectory,
|
|
6968
|
-
fileExists: fileExists,
|
|
6969
6969
|
// Node 4.0 `fs.watch` function supports the "recursive" option on both OSX and Windows
|
|
6970
6970
|
// (ref: https://github.com/nodejs/node/pull/2649 and https://github.com/Microsoft/TypeScript/issues/4643)
|
|
6971
6971
|
fsSupportsRecursiveFsWatch: fsSupportsRecursiveFsWatch,
|
|
@@ -7225,7 +7225,7 @@ var ts;
|
|
|
7225
7225
|
// File changed
|
|
7226
7226
|
eventKind = FileWatcherEventKind.Changed;
|
|
7227
7227
|
}
|
|
7228
|
-
callback(fileName, eventKind);
|
|
7228
|
+
callback(fileName, eventKind, curr.mtime);
|
|
7229
7229
|
}
|
|
7230
7230
|
}
|
|
7231
7231
|
function fsWatch(fileOrDirectory, entryKind, callback, recursive, fallbackPollingInterval, fallbackOptions) {
|
|
@@ -7251,10 +7251,10 @@ var ts;
|
|
|
7251
7251
|
* Invoke the callback with rename and update the watcher if not closed
|
|
7252
7252
|
* @param createWatcher
|
|
7253
7253
|
*/
|
|
7254
|
-
function invokeCallbackAndUpdateWatcher(createWatcher) {
|
|
7254
|
+
function invokeCallbackAndUpdateWatcher(createWatcher, modifiedTime) {
|
|
7255
7255
|
sysLog("sysLog:: " + fileOrDirectory + ":: Changing watcher to " + (createWatcher === watchPresentFileSystemEntry ? "Present" : "Missing") + "FileSystemEntryWatcher");
|
|
7256
7256
|
// Call the callback for current directory
|
|
7257
|
-
callback("rename", "");
|
|
7257
|
+
callback("rename", "", modifiedTime);
|
|
7258
7258
|
// If watcher is not closed, update it
|
|
7259
7259
|
if (watcher) {
|
|
7260
7260
|
watcher.close();
|
|
@@ -7300,13 +7300,14 @@ var ts;
|
|
|
7300
7300
|
function callbackChangingToMissingFileSystemEntry(event, relativeName) {
|
|
7301
7301
|
// because relativeName is not guaranteed to be correct we need to check on each rename with few combinations
|
|
7302
7302
|
// Eg on ubuntu while watching app/node_modules the relativeName is "node_modules" which is neither relative nor full path
|
|
7303
|
+
var modifiedTime = getModifiedTime(fileOrDirectory) || ts.missingFileModifiedTime;
|
|
7303
7304
|
return event === "rename" &&
|
|
7304
7305
|
(!relativeName ||
|
|
7305
7306
|
relativeName === lastDirectoryPart ||
|
|
7306
7307
|
(relativeName.lastIndexOf(lastDirectoryPartWithDirectorySeparator) !== -1 && relativeName.lastIndexOf(lastDirectoryPartWithDirectorySeparator) === relativeName.length - lastDirectoryPartWithDirectorySeparator.length)) &&
|
|
7307
|
-
|
|
7308
|
-
invokeCallbackAndUpdateWatcher(watchMissingFileSystemEntry) :
|
|
7309
|
-
callback(event, relativeName);
|
|
7308
|
+
modifiedTime === ts.missingFileModifiedTime ?
|
|
7309
|
+
invokeCallbackAndUpdateWatcher(watchMissingFileSystemEntry, modifiedTime) :
|
|
7310
|
+
callback(event, relativeName, modifiedTime);
|
|
7310
7311
|
}
|
|
7311
7312
|
/**
|
|
7312
7313
|
* Watch the file or directory using fs.watchFile since fs.watch threw exception
|
|
@@ -7320,12 +7321,15 @@ var ts;
|
|
|
7320
7321
|
* and switch to existing file or directory when the missing filesystem entry is created
|
|
7321
7322
|
*/
|
|
7322
7323
|
function watchMissingFileSystemEntry() {
|
|
7323
|
-
return watchFile(fileOrDirectory, function (_fileName, eventKind) {
|
|
7324
|
-
if (eventKind === FileWatcherEventKind.Created
|
|
7325
|
-
|
|
7326
|
-
|
|
7327
|
-
|
|
7328
|
-
|
|
7324
|
+
return watchFile(fileOrDirectory, function (_fileName, eventKind, modifiedTime) {
|
|
7325
|
+
if (eventKind === FileWatcherEventKind.Created) {
|
|
7326
|
+
modifiedTime || (modifiedTime = getModifiedTime(fileOrDirectory) || ts.missingFileModifiedTime);
|
|
7327
|
+
if (modifiedTime !== ts.missingFileModifiedTime) {
|
|
7328
|
+
// Call the callback for current file or directory
|
|
7329
|
+
// For now it could be callback for the inner directory creation,
|
|
7330
|
+
// but just return current directory, better than current no-op
|
|
7331
|
+
invokeCallbackAndUpdateWatcher(watchPresentFileSystemEntry, modifiedTime);
|
|
7332
|
+
}
|
|
7329
7333
|
}
|
|
7330
7334
|
}, fallbackPollingInterval, fallbackOptions);
|
|
7331
7335
|
}
|
|
@@ -7475,12 +7479,19 @@ var ts;
|
|
|
7475
7479
|
}
|
|
7476
7480
|
function getModifiedTime(path) {
|
|
7477
7481
|
var _a;
|
|
7482
|
+
// Since the error thrown by fs.statSync isn't used, we can avoid collecting a stack trace to improve
|
|
7483
|
+
// the CPU time performance.
|
|
7484
|
+
var originalStackTraceLimit = Error.stackTraceLimit;
|
|
7485
|
+
Error.stackTraceLimit = 0;
|
|
7478
7486
|
try {
|
|
7479
7487
|
return (_a = statSync(path)) === null || _a === void 0 ? void 0 : _a.mtime;
|
|
7480
7488
|
}
|
|
7481
7489
|
catch (e) {
|
|
7482
7490
|
return undefined;
|
|
7483
7491
|
}
|
|
7492
|
+
finally {
|
|
7493
|
+
Error.stackTraceLimit = originalStackTraceLimit;
|
|
7494
|
+
}
|
|
7484
7495
|
}
|
|
7485
7496
|
function setModifiedTime(path, time) {
|
|
7486
7497
|
try {
|
|
@@ -9494,8 +9505,8 @@ var ts;
|
|
|
9494
9505
|
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"),
|
|
9495
9506
|
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"),
|
|
9496
9507
|
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."),
|
|
9497
|
-
|
|
9498
|
-
|
|
9508
|
+
Project_0_is_out_of_date_because_output_1_is_older_than_input_2: diag(6350, ts.DiagnosticCategory.Message, "Project_0_is_out_of_date_because_output_1_is_older_than_input_2_6350", "Project '{0}' is out of date because output '{1}' is older than input '{2}'"),
|
|
9509
|
+
Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2: diag(6351, ts.DiagnosticCategory.Message, "Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2_6351", "Project '{0}' is up to date because newest input '{1}' is older than output '{2}'"),
|
|
9499
9510
|
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"),
|
|
9500
9511
|
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"),
|
|
9501
9512
|
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"),
|
|
@@ -9539,6 +9550,7 @@ var ts;
|
|
|
9539
9550
|
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}'."),
|
|
9540
9551
|
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}'."),
|
|
9541
9552
|
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."),
|
|
9553
|
+
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"),
|
|
9542
9554
|
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}'"),
|
|
9543
9555
|
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."),
|
|
9544
9556
|
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."),
|
|
@@ -20343,6 +20355,10 @@ var ts;
|
|
|
20343
20355
|
return optionsHaveChanges(oldOptions, newOptions, ts.affectsEmitOptionDeclarations);
|
|
20344
20356
|
}
|
|
20345
20357
|
ts.compilerOptionsAffectEmit = compilerOptionsAffectEmit;
|
|
20358
|
+
function compilerOptionsAffectDeclarationPath(newOptions, oldOptions) {
|
|
20359
|
+
return optionsHaveChanges(oldOptions, newOptions, ts.affectsDeclarationPathOptionDeclarations);
|
|
20360
|
+
}
|
|
20361
|
+
ts.compilerOptionsAffectDeclarationPath = compilerOptionsAffectDeclarationPath;
|
|
20346
20362
|
function getCompilerOptionValue(options, option) {
|
|
20347
20363
|
return option.strictFlag ? getStrictOptionValue(options, option.name) : options[option.name];
|
|
20348
20364
|
}
|
|
@@ -39381,6 +39397,7 @@ var ts;
|
|
|
39381
39397
|
type: "boolean",
|
|
39382
39398
|
affectsSemanticDiagnostics: true,
|
|
39383
39399
|
affectsEmit: true,
|
|
39400
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
39384
39401
|
category: ts.Diagnostics.Watch_and_Build_Modes,
|
|
39385
39402
|
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,
|
|
39386
39403
|
defaultValueDescription: false,
|
|
@@ -39415,12 +39432,40 @@ var ts;
|
|
|
39415
39432
|
affectsSourceFile: true,
|
|
39416
39433
|
affectsModuleResolution: true,
|
|
39417
39434
|
affectsEmit: true,
|
|
39435
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
39418
39436
|
paramType: ts.Diagnostics.VERSION,
|
|
39419
39437
|
showInSimplifiedHelpView: true,
|
|
39420
39438
|
category: ts.Diagnostics.Language_and_Environment,
|
|
39421
39439
|
description: ts.Diagnostics.Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations,
|
|
39422
39440
|
defaultValueDescription: 0 /* ES3 */,
|
|
39423
39441
|
};
|
|
39442
|
+
/*@internal*/
|
|
39443
|
+
ts.moduleOptionDeclaration = {
|
|
39444
|
+
name: "module",
|
|
39445
|
+
shortName: "m",
|
|
39446
|
+
type: new ts.Map(ts.getEntries({
|
|
39447
|
+
none: ts.ModuleKind.None,
|
|
39448
|
+
commonjs: ts.ModuleKind.CommonJS,
|
|
39449
|
+
amd: ts.ModuleKind.AMD,
|
|
39450
|
+
system: ts.ModuleKind.System,
|
|
39451
|
+
umd: ts.ModuleKind.UMD,
|
|
39452
|
+
es6: ts.ModuleKind.ES2015,
|
|
39453
|
+
es2015: ts.ModuleKind.ES2015,
|
|
39454
|
+
es2020: ts.ModuleKind.ES2020,
|
|
39455
|
+
es2022: ts.ModuleKind.ES2022,
|
|
39456
|
+
esnext: ts.ModuleKind.ESNext,
|
|
39457
|
+
node12: ts.ModuleKind.Node12,
|
|
39458
|
+
nodenext: ts.ModuleKind.NodeNext,
|
|
39459
|
+
})),
|
|
39460
|
+
affectsModuleResolution: true,
|
|
39461
|
+
affectsEmit: true,
|
|
39462
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
39463
|
+
paramType: ts.Diagnostics.KIND,
|
|
39464
|
+
showInSimplifiedHelpView: true,
|
|
39465
|
+
category: ts.Diagnostics.Modules,
|
|
39466
|
+
description: ts.Diagnostics.Specify_what_module_code_is_generated,
|
|
39467
|
+
defaultValueDescription: undefined,
|
|
39468
|
+
};
|
|
39424
39469
|
var commandOptionsWithoutBuild = [
|
|
39425
39470
|
// CommandLine only options
|
|
39426
39471
|
{
|
|
@@ -39482,37 +39527,14 @@ var ts;
|
|
|
39482
39527
|
category: ts.Diagnostics.Command_line_Options,
|
|
39483
39528
|
affectsSemanticDiagnostics: true,
|
|
39484
39529
|
affectsEmit: true,
|
|
39530
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
39485
39531
|
isCommandLineOnly: true,
|
|
39486
39532
|
description: ts.Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing,
|
|
39487
39533
|
defaultValueDescription: false,
|
|
39488
39534
|
},
|
|
39489
39535
|
// Basic
|
|
39490
39536
|
ts.targetOptionDeclaration,
|
|
39491
|
-
|
|
39492
|
-
name: "module",
|
|
39493
|
-
shortName: "m",
|
|
39494
|
-
type: new ts.Map(ts.getEntries({
|
|
39495
|
-
none: ts.ModuleKind.None,
|
|
39496
|
-
commonjs: ts.ModuleKind.CommonJS,
|
|
39497
|
-
amd: ts.ModuleKind.AMD,
|
|
39498
|
-
system: ts.ModuleKind.System,
|
|
39499
|
-
umd: ts.ModuleKind.UMD,
|
|
39500
|
-
es6: ts.ModuleKind.ES2015,
|
|
39501
|
-
es2015: ts.ModuleKind.ES2015,
|
|
39502
|
-
es2020: ts.ModuleKind.ES2020,
|
|
39503
|
-
es2022: ts.ModuleKind.ES2022,
|
|
39504
|
-
esnext: ts.ModuleKind.ESNext,
|
|
39505
|
-
node12: ts.ModuleKind.Node12,
|
|
39506
|
-
nodenext: ts.ModuleKind.NodeNext,
|
|
39507
|
-
})),
|
|
39508
|
-
affectsModuleResolution: true,
|
|
39509
|
-
affectsEmit: true,
|
|
39510
|
-
paramType: ts.Diagnostics.KIND,
|
|
39511
|
-
showInSimplifiedHelpView: true,
|
|
39512
|
-
category: ts.Diagnostics.Modules,
|
|
39513
|
-
description: ts.Diagnostics.Specify_what_module_code_is_generated,
|
|
39514
|
-
defaultValueDescription: undefined,
|
|
39515
|
-
},
|
|
39537
|
+
ts.moduleOptionDeclaration,
|
|
39516
39538
|
{
|
|
39517
39539
|
name: "lib",
|
|
39518
39540
|
type: "list",
|
|
@@ -39549,6 +39571,7 @@ var ts;
|
|
|
39549
39571
|
type: jsxOptionMap,
|
|
39550
39572
|
affectsSourceFile: true,
|
|
39551
39573
|
affectsEmit: true,
|
|
39574
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
39552
39575
|
affectsModuleResolution: true,
|
|
39553
39576
|
paramType: ts.Diagnostics.KIND,
|
|
39554
39577
|
showInSimplifiedHelpView: true,
|
|
@@ -39561,6 +39584,7 @@ var ts;
|
|
|
39561
39584
|
shortName: "d",
|
|
39562
39585
|
type: "boolean",
|
|
39563
39586
|
affectsEmit: true,
|
|
39587
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
39564
39588
|
showInSimplifiedHelpView: true,
|
|
39565
39589
|
category: ts.Diagnostics.Emit,
|
|
39566
39590
|
transpileOptionValue: undefined,
|
|
@@ -39571,6 +39595,7 @@ var ts;
|
|
|
39571
39595
|
name: "declarationMap",
|
|
39572
39596
|
type: "boolean",
|
|
39573
39597
|
affectsEmit: true,
|
|
39598
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
39574
39599
|
showInSimplifiedHelpView: true,
|
|
39575
39600
|
category: ts.Diagnostics.Emit,
|
|
39576
39601
|
transpileOptionValue: undefined,
|
|
@@ -39581,6 +39606,7 @@ var ts;
|
|
|
39581
39606
|
name: "emitDeclarationOnly",
|
|
39582
39607
|
type: "boolean",
|
|
39583
39608
|
affectsEmit: true,
|
|
39609
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
39584
39610
|
showInSimplifiedHelpView: true,
|
|
39585
39611
|
category: ts.Diagnostics.Emit,
|
|
39586
39612
|
description: ts.Diagnostics.Only_output_d_ts_files_and_not_JavaScript_files,
|
|
@@ -39591,6 +39617,7 @@ var ts;
|
|
|
39591
39617
|
name: "sourceMap",
|
|
39592
39618
|
type: "boolean",
|
|
39593
39619
|
affectsEmit: true,
|
|
39620
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
39594
39621
|
showInSimplifiedHelpView: true,
|
|
39595
39622
|
category: ts.Diagnostics.Emit,
|
|
39596
39623
|
defaultValueDescription: false,
|
|
@@ -39600,6 +39627,9 @@ var ts;
|
|
|
39600
39627
|
name: "outFile",
|
|
39601
39628
|
type: "string",
|
|
39602
39629
|
affectsEmit: true,
|
|
39630
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
39631
|
+
affectsDeclarationPath: true,
|
|
39632
|
+
affectsBundleEmitBuildInfo: true,
|
|
39603
39633
|
isFilePath: true,
|
|
39604
39634
|
paramType: ts.Diagnostics.FILE,
|
|
39605
39635
|
showInSimplifiedHelpView: true,
|
|
@@ -39611,6 +39641,8 @@ var ts;
|
|
|
39611
39641
|
name: "outDir",
|
|
39612
39642
|
type: "string",
|
|
39613
39643
|
affectsEmit: true,
|
|
39644
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
39645
|
+
affectsDeclarationPath: true,
|
|
39614
39646
|
isFilePath: true,
|
|
39615
39647
|
paramType: ts.Diagnostics.DIRECTORY,
|
|
39616
39648
|
showInSimplifiedHelpView: true,
|
|
@@ -39621,6 +39653,8 @@ var ts;
|
|
|
39621
39653
|
name: "rootDir",
|
|
39622
39654
|
type: "string",
|
|
39623
39655
|
affectsEmit: true,
|
|
39656
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
39657
|
+
affectsDeclarationPath: true,
|
|
39624
39658
|
isFilePath: true,
|
|
39625
39659
|
paramType: ts.Diagnostics.LOCATION,
|
|
39626
39660
|
category: ts.Diagnostics.Modules,
|
|
@@ -39631,6 +39665,8 @@ var ts;
|
|
|
39631
39665
|
name: "composite",
|
|
39632
39666
|
type: "boolean",
|
|
39633
39667
|
affectsEmit: true,
|
|
39668
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
39669
|
+
affectsBundleEmitBuildInfo: true,
|
|
39634
39670
|
isTSConfigOnly: true,
|
|
39635
39671
|
category: ts.Diagnostics.Projects,
|
|
39636
39672
|
transpileOptionValue: undefined,
|
|
@@ -39641,6 +39677,8 @@ var ts;
|
|
|
39641
39677
|
name: "tsBuildInfoFile",
|
|
39642
39678
|
type: "string",
|
|
39643
39679
|
affectsEmit: true,
|
|
39680
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
39681
|
+
affectsBundleEmitBuildInfo: true,
|
|
39644
39682
|
isFilePath: true,
|
|
39645
39683
|
paramType: ts.Diagnostics.FILE,
|
|
39646
39684
|
category: ts.Diagnostics.Projects,
|
|
@@ -39652,6 +39690,7 @@ var ts;
|
|
|
39652
39690
|
name: "removeComments",
|
|
39653
39691
|
type: "boolean",
|
|
39654
39692
|
affectsEmit: true,
|
|
39693
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
39655
39694
|
showInSimplifiedHelpView: true,
|
|
39656
39695
|
category: ts.Diagnostics.Emit,
|
|
39657
39696
|
defaultValueDescription: false,
|
|
@@ -39670,6 +39709,7 @@ var ts;
|
|
|
39670
39709
|
name: "importHelpers",
|
|
39671
39710
|
type: "boolean",
|
|
39672
39711
|
affectsEmit: true,
|
|
39712
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
39673
39713
|
category: ts.Diagnostics.Emit,
|
|
39674
39714
|
description: ts.Diagnostics.Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file,
|
|
39675
39715
|
defaultValueDescription: false,
|
|
@@ -39683,6 +39723,7 @@ var ts;
|
|
|
39683
39723
|
})),
|
|
39684
39724
|
affectsEmit: true,
|
|
39685
39725
|
affectsSemanticDiagnostics: true,
|
|
39726
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
39686
39727
|
category: ts.Diagnostics.Emit,
|
|
39687
39728
|
description: ts.Diagnostics.Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types,
|
|
39688
39729
|
defaultValueDescription: 0 /* Remove */,
|
|
@@ -39691,6 +39732,7 @@ var ts;
|
|
|
39691
39732
|
name: "downlevelIteration",
|
|
39692
39733
|
type: "boolean",
|
|
39693
39734
|
affectsEmit: true,
|
|
39735
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
39694
39736
|
category: ts.Diagnostics.Emit,
|
|
39695
39737
|
description: ts.Diagnostics.Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration,
|
|
39696
39738
|
defaultValueDescription: false,
|
|
@@ -39709,6 +39751,9 @@ var ts;
|
|
|
39709
39751
|
type: "boolean",
|
|
39710
39752
|
// Though this affects semantic diagnostics, affectsSemanticDiagnostics is not set here
|
|
39711
39753
|
// The value of each strictFlag depends on own strictFlag value or this and never accessed directly.
|
|
39754
|
+
// But we need to store `strict` in builf info, even though it won't be examined directly, so that the
|
|
39755
|
+
// flags it controls (e.g. `strictNullChecks`) will be retrieved correctly
|
|
39756
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
39712
39757
|
showInSimplifiedHelpView: true,
|
|
39713
39758
|
category: ts.Diagnostics.Type_Checking,
|
|
39714
39759
|
description: ts.Diagnostics.Enable_all_strict_type_checking_options,
|
|
@@ -39718,6 +39763,7 @@ var ts;
|
|
|
39718
39763
|
name: "noImplicitAny",
|
|
39719
39764
|
type: "boolean",
|
|
39720
39765
|
affectsSemanticDiagnostics: true,
|
|
39766
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
39721
39767
|
strictFlag: true,
|
|
39722
39768
|
category: ts.Diagnostics.Type_Checking,
|
|
39723
39769
|
description: ts.Diagnostics.Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type,
|
|
@@ -39727,6 +39773,7 @@ var ts;
|
|
|
39727
39773
|
name: "strictNullChecks",
|
|
39728
39774
|
type: "boolean",
|
|
39729
39775
|
affectsSemanticDiagnostics: true,
|
|
39776
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
39730
39777
|
strictFlag: true,
|
|
39731
39778
|
category: ts.Diagnostics.Type_Checking,
|
|
39732
39779
|
description: ts.Diagnostics.When_type_checking_take_into_account_null_and_undefined,
|
|
@@ -39735,6 +39782,8 @@ var ts;
|
|
|
39735
39782
|
{
|
|
39736
39783
|
name: "strictFunctionTypes",
|
|
39737
39784
|
type: "boolean",
|
|
39785
|
+
affectsSemanticDiagnostics: true,
|
|
39786
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
39738
39787
|
strictFlag: true,
|
|
39739
39788
|
category: ts.Diagnostics.Type_Checking,
|
|
39740
39789
|
description: ts.Diagnostics.When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible,
|
|
@@ -39743,6 +39792,8 @@ var ts;
|
|
|
39743
39792
|
{
|
|
39744
39793
|
name: "strictBindCallApply",
|
|
39745
39794
|
type: "boolean",
|
|
39795
|
+
affectsSemanticDiagnostics: true,
|
|
39796
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
39746
39797
|
strictFlag: true,
|
|
39747
39798
|
category: ts.Diagnostics.Type_Checking,
|
|
39748
39799
|
description: ts.Diagnostics.Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function,
|
|
@@ -39752,6 +39803,7 @@ var ts;
|
|
|
39752
39803
|
name: "strictPropertyInitialization",
|
|
39753
39804
|
type: "boolean",
|
|
39754
39805
|
affectsSemanticDiagnostics: true,
|
|
39806
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
39755
39807
|
strictFlag: true,
|
|
39756
39808
|
category: ts.Diagnostics.Type_Checking,
|
|
39757
39809
|
description: ts.Diagnostics.Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor,
|
|
@@ -39761,6 +39813,7 @@ var ts;
|
|
|
39761
39813
|
name: "noImplicitThis",
|
|
39762
39814
|
type: "boolean",
|
|
39763
39815
|
affectsSemanticDiagnostics: true,
|
|
39816
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
39764
39817
|
strictFlag: true,
|
|
39765
39818
|
category: ts.Diagnostics.Type_Checking,
|
|
39766
39819
|
description: ts.Diagnostics.Enable_error_reporting_when_this_is_given_the_type_any,
|
|
@@ -39770,6 +39823,7 @@ var ts;
|
|
|
39770
39823
|
name: "useUnknownInCatchVariables",
|
|
39771
39824
|
type: "boolean",
|
|
39772
39825
|
affectsSemanticDiagnostics: true,
|
|
39826
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
39773
39827
|
strictFlag: true,
|
|
39774
39828
|
category: ts.Diagnostics.Type_Checking,
|
|
39775
39829
|
description: ts.Diagnostics.Default_catch_clause_variables_as_unknown_instead_of_any,
|
|
@@ -39779,6 +39833,8 @@ var ts;
|
|
|
39779
39833
|
name: "alwaysStrict",
|
|
39780
39834
|
type: "boolean",
|
|
39781
39835
|
affectsSourceFile: true,
|
|
39836
|
+
affectsEmit: true,
|
|
39837
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
39782
39838
|
strictFlag: true,
|
|
39783
39839
|
category: ts.Diagnostics.Type_Checking,
|
|
39784
39840
|
description: ts.Diagnostics.Ensure_use_strict_is_always_emitted,
|
|
@@ -39789,6 +39845,7 @@ var ts;
|
|
|
39789
39845
|
name: "noUnusedLocals",
|
|
39790
39846
|
type: "boolean",
|
|
39791
39847
|
affectsSemanticDiagnostics: true,
|
|
39848
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
39792
39849
|
category: ts.Diagnostics.Type_Checking,
|
|
39793
39850
|
description: ts.Diagnostics.Enable_error_reporting_when_local_variables_aren_t_read,
|
|
39794
39851
|
defaultValueDescription: false,
|
|
@@ -39797,6 +39854,7 @@ var ts;
|
|
|
39797
39854
|
name: "noUnusedParameters",
|
|
39798
39855
|
type: "boolean",
|
|
39799
39856
|
affectsSemanticDiagnostics: true,
|
|
39857
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
39800
39858
|
category: ts.Diagnostics.Type_Checking,
|
|
39801
39859
|
description: ts.Diagnostics.Raise_an_error_when_a_function_parameter_isn_t_read,
|
|
39802
39860
|
defaultValueDescription: false,
|
|
@@ -39805,6 +39863,7 @@ var ts;
|
|
|
39805
39863
|
name: "exactOptionalPropertyTypes",
|
|
39806
39864
|
type: "boolean",
|
|
39807
39865
|
affectsSemanticDiagnostics: true,
|
|
39866
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
39808
39867
|
category: ts.Diagnostics.Type_Checking,
|
|
39809
39868
|
description: ts.Diagnostics.Interpret_optional_property_types_as_written_rather_than_adding_undefined,
|
|
39810
39869
|
defaultValueDescription: false,
|
|
@@ -39813,6 +39872,7 @@ var ts;
|
|
|
39813
39872
|
name: "noImplicitReturns",
|
|
39814
39873
|
type: "boolean",
|
|
39815
39874
|
affectsSemanticDiagnostics: true,
|
|
39875
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
39816
39876
|
category: ts.Diagnostics.Type_Checking,
|
|
39817
39877
|
description: ts.Diagnostics.Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function,
|
|
39818
39878
|
defaultValueDescription: false,
|
|
@@ -39822,6 +39882,7 @@ var ts;
|
|
|
39822
39882
|
type: "boolean",
|
|
39823
39883
|
affectsBindDiagnostics: true,
|
|
39824
39884
|
affectsSemanticDiagnostics: true,
|
|
39885
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
39825
39886
|
category: ts.Diagnostics.Type_Checking,
|
|
39826
39887
|
description: ts.Diagnostics.Enable_error_reporting_for_fallthrough_cases_in_switch_statements,
|
|
39827
39888
|
defaultValueDescription: false,
|
|
@@ -39830,6 +39891,7 @@ var ts;
|
|
|
39830
39891
|
name: "noUncheckedIndexedAccess",
|
|
39831
39892
|
type: "boolean",
|
|
39832
39893
|
affectsSemanticDiagnostics: true,
|
|
39894
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
39833
39895
|
category: ts.Diagnostics.Type_Checking,
|
|
39834
39896
|
description: ts.Diagnostics.Add_undefined_to_a_type_when_accessed_using_an_index,
|
|
39835
39897
|
defaultValueDescription: false,
|
|
@@ -39838,6 +39900,7 @@ var ts;
|
|
|
39838
39900
|
name: "noImplicitOverride",
|
|
39839
39901
|
type: "boolean",
|
|
39840
39902
|
affectsSemanticDiagnostics: true,
|
|
39903
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
39841
39904
|
category: ts.Diagnostics.Type_Checking,
|
|
39842
39905
|
description: ts.Diagnostics.Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier,
|
|
39843
39906
|
defaultValueDescription: false,
|
|
@@ -39845,6 +39908,8 @@ var ts;
|
|
|
39845
39908
|
{
|
|
39846
39909
|
name: "noPropertyAccessFromIndexSignature",
|
|
39847
39910
|
type: "boolean",
|
|
39911
|
+
affectsSemanticDiagnostics: true,
|
|
39912
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
39848
39913
|
showInSimplifiedHelpView: false,
|
|
39849
39914
|
category: ts.Diagnostics.Type_Checking,
|
|
39850
39915
|
description: ts.Diagnostics.Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type,
|
|
@@ -39930,6 +39995,7 @@ var ts;
|
|
|
39930
39995
|
name: "allowSyntheticDefaultImports",
|
|
39931
39996
|
type: "boolean",
|
|
39932
39997
|
affectsSemanticDiagnostics: true,
|
|
39998
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
39933
39999
|
category: ts.Diagnostics.Interop_Constraints,
|
|
39934
40000
|
description: ts.Diagnostics.Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export,
|
|
39935
40001
|
defaultValueDescription: ts.Diagnostics.module_system_or_esModuleInterop
|
|
@@ -39939,6 +40005,7 @@ var ts;
|
|
|
39939
40005
|
type: "boolean",
|
|
39940
40006
|
affectsSemanticDiagnostics: true,
|
|
39941
40007
|
affectsEmit: true,
|
|
40008
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
39942
40009
|
showInSimplifiedHelpView: true,
|
|
39943
40010
|
category: ts.Diagnostics.Interop_Constraints,
|
|
39944
40011
|
description: ts.Diagnostics.Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility,
|
|
@@ -39955,6 +40022,7 @@ var ts;
|
|
|
39955
40022
|
name: "allowUmdGlobalAccess",
|
|
39956
40023
|
type: "boolean",
|
|
39957
40024
|
affectsSemanticDiagnostics: true,
|
|
40025
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
39958
40026
|
category: ts.Diagnostics.Modules,
|
|
39959
40027
|
description: ts.Diagnostics.Allow_accessing_UMD_globals_from_modules,
|
|
39960
40028
|
defaultValueDescription: false,
|
|
@@ -39976,6 +40044,7 @@ var ts;
|
|
|
39976
40044
|
name: "sourceRoot",
|
|
39977
40045
|
type: "string",
|
|
39978
40046
|
affectsEmit: true,
|
|
40047
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
39979
40048
|
paramType: ts.Diagnostics.LOCATION,
|
|
39980
40049
|
category: ts.Diagnostics.Emit,
|
|
39981
40050
|
description: ts.Diagnostics.Specify_the_root_path_for_debuggers_to_find_the_reference_source_code,
|
|
@@ -39984,6 +40053,7 @@ var ts;
|
|
|
39984
40053
|
name: "mapRoot",
|
|
39985
40054
|
type: "string",
|
|
39986
40055
|
affectsEmit: true,
|
|
40056
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
39987
40057
|
paramType: ts.Diagnostics.LOCATION,
|
|
39988
40058
|
category: ts.Diagnostics.Emit,
|
|
39989
40059
|
description: ts.Diagnostics.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations,
|
|
@@ -39992,6 +40062,7 @@ var ts;
|
|
|
39992
40062
|
name: "inlineSourceMap",
|
|
39993
40063
|
type: "boolean",
|
|
39994
40064
|
affectsEmit: true,
|
|
40065
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
39995
40066
|
category: ts.Diagnostics.Emit,
|
|
39996
40067
|
description: ts.Diagnostics.Include_sourcemap_files_inside_the_emitted_JavaScript,
|
|
39997
40068
|
defaultValueDescription: false,
|
|
@@ -40000,6 +40071,7 @@ var ts;
|
|
|
40000
40071
|
name: "inlineSources",
|
|
40001
40072
|
type: "boolean",
|
|
40002
40073
|
affectsEmit: true,
|
|
40074
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
40003
40075
|
category: ts.Diagnostics.Emit,
|
|
40004
40076
|
description: ts.Diagnostics.Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript,
|
|
40005
40077
|
defaultValueDescription: false,
|
|
@@ -40009,6 +40081,7 @@ var ts;
|
|
|
40009
40081
|
name: "experimentalDecorators",
|
|
40010
40082
|
type: "boolean",
|
|
40011
40083
|
affectsSemanticDiagnostics: true,
|
|
40084
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
40012
40085
|
category: ts.Diagnostics.Language_and_Environment,
|
|
40013
40086
|
description: ts.Diagnostics.Enable_experimental_support_for_TC39_stage_2_draft_decorators,
|
|
40014
40087
|
defaultValueDescription: false,
|
|
@@ -40018,6 +40091,7 @@ var ts;
|
|
|
40018
40091
|
type: "boolean",
|
|
40019
40092
|
affectsSemanticDiagnostics: true,
|
|
40020
40093
|
affectsEmit: true,
|
|
40094
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
40021
40095
|
category: ts.Diagnostics.Language_and_Environment,
|
|
40022
40096
|
description: ts.Diagnostics.Emit_design_type_metadata_for_decorated_declarations_in_source_files,
|
|
40023
40097
|
defaultValueDescription: false,
|
|
@@ -40042,6 +40116,7 @@ var ts;
|
|
|
40042
40116
|
type: "string",
|
|
40043
40117
|
affectsSemanticDiagnostics: true,
|
|
40044
40118
|
affectsEmit: true,
|
|
40119
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
40045
40120
|
affectsModuleResolution: true,
|
|
40046
40121
|
category: ts.Diagnostics.Language_and_Environment,
|
|
40047
40122
|
description: ts.Diagnostics.Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk,
|
|
@@ -40059,6 +40134,9 @@ var ts;
|
|
|
40059
40134
|
name: "out",
|
|
40060
40135
|
type: "string",
|
|
40061
40136
|
affectsEmit: true,
|
|
40137
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
40138
|
+
affectsDeclarationPath: true,
|
|
40139
|
+
affectsBundleEmitBuildInfo: true,
|
|
40062
40140
|
isFilePath: false,
|
|
40063
40141
|
// for correct behaviour, please use outFile
|
|
40064
40142
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
@@ -40070,6 +40148,7 @@ var ts;
|
|
|
40070
40148
|
name: "reactNamespace",
|
|
40071
40149
|
type: "string",
|
|
40072
40150
|
affectsEmit: true,
|
|
40151
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
40073
40152
|
category: ts.Diagnostics.Language_and_Environment,
|
|
40074
40153
|
description: ts.Diagnostics.Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit,
|
|
40075
40154
|
defaultValueDescription: "`React`",
|
|
@@ -40077,6 +40156,8 @@ var ts;
|
|
|
40077
40156
|
{
|
|
40078
40157
|
name: "skipDefaultLibCheck",
|
|
40079
40158
|
type: "boolean",
|
|
40159
|
+
// We need to store these to determine whether `lib` files need to be rechecked
|
|
40160
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
40080
40161
|
category: ts.Diagnostics.Completeness,
|
|
40081
40162
|
description: ts.Diagnostics.Skip_type_checking_d_ts_files_that_are_included_with_TypeScript,
|
|
40082
40163
|
defaultValueDescription: false,
|
|
@@ -40092,6 +40173,7 @@ var ts;
|
|
|
40092
40173
|
name: "emitBOM",
|
|
40093
40174
|
type: "boolean",
|
|
40094
40175
|
affectsEmit: true,
|
|
40176
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
40095
40177
|
category: ts.Diagnostics.Emit,
|
|
40096
40178
|
description: ts.Diagnostics.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files,
|
|
40097
40179
|
defaultValueDescription: false,
|
|
@@ -40103,6 +40185,7 @@ var ts;
|
|
|
40103
40185
|
lf: 1 /* LineFeed */
|
|
40104
40186
|
})),
|
|
40105
40187
|
affectsEmit: true,
|
|
40188
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
40106
40189
|
paramType: ts.Diagnostics.NEWLINE,
|
|
40107
40190
|
category: ts.Diagnostics.Emit,
|
|
40108
40191
|
description: ts.Diagnostics.Set_the_newline_character_for_emitting_files,
|
|
@@ -40112,6 +40195,7 @@ var ts;
|
|
|
40112
40195
|
name: "noErrorTruncation",
|
|
40113
40196
|
type: "boolean",
|
|
40114
40197
|
affectsSemanticDiagnostics: true,
|
|
40198
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
40115
40199
|
category: ts.Diagnostics.Output_Formatting,
|
|
40116
40200
|
description: ts.Diagnostics.Disable_truncating_types_in_error_messages,
|
|
40117
40201
|
defaultValueDescription: false,
|
|
@@ -40142,6 +40226,7 @@ var ts;
|
|
|
40142
40226
|
name: "stripInternal",
|
|
40143
40227
|
type: "boolean",
|
|
40144
40228
|
affectsEmit: true,
|
|
40229
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
40145
40230
|
category: ts.Diagnostics.Emit,
|
|
40146
40231
|
description: ts.Diagnostics.Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments,
|
|
40147
40232
|
defaultValueDescription: false,
|
|
@@ -40182,6 +40267,7 @@ var ts;
|
|
|
40182
40267
|
name: "noImplicitUseStrict",
|
|
40183
40268
|
type: "boolean",
|
|
40184
40269
|
affectsSemanticDiagnostics: true,
|
|
40270
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
40185
40271
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
40186
40272
|
description: ts.Diagnostics.Disable_adding_use_strict_directives_in_emitted_JavaScript_files,
|
|
40187
40273
|
defaultValueDescription: false,
|
|
@@ -40190,6 +40276,7 @@ var ts;
|
|
|
40190
40276
|
name: "noEmitHelpers",
|
|
40191
40277
|
type: "boolean",
|
|
40192
40278
|
affectsEmit: true,
|
|
40279
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
40193
40280
|
category: ts.Diagnostics.Emit,
|
|
40194
40281
|
description: ts.Diagnostics.Disable_generating_custom_helper_functions_like_extends_in_compiled_output,
|
|
40195
40282
|
defaultValueDescription: false,
|
|
@@ -40198,6 +40285,7 @@ var ts;
|
|
|
40198
40285
|
name: "noEmitOnError",
|
|
40199
40286
|
type: "boolean",
|
|
40200
40287
|
affectsEmit: true,
|
|
40288
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
40201
40289
|
category: ts.Diagnostics.Emit,
|
|
40202
40290
|
transpileOptionValue: undefined,
|
|
40203
40291
|
description: ts.Diagnostics.Disable_emitting_files_if_any_type_checking_errors_are_reported,
|
|
@@ -40207,6 +40295,7 @@ var ts;
|
|
|
40207
40295
|
name: "preserveConstEnums",
|
|
40208
40296
|
type: "boolean",
|
|
40209
40297
|
affectsEmit: true,
|
|
40298
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
40210
40299
|
category: ts.Diagnostics.Emit,
|
|
40211
40300
|
description: ts.Diagnostics.Disable_erasing_const_enum_declarations_in_generated_code,
|
|
40212
40301
|
defaultValueDescription: false,
|
|
@@ -40215,6 +40304,8 @@ var ts;
|
|
|
40215
40304
|
name: "declarationDir",
|
|
40216
40305
|
type: "string",
|
|
40217
40306
|
affectsEmit: true,
|
|
40307
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
40308
|
+
affectsDeclarationPath: true,
|
|
40218
40309
|
isFilePath: true,
|
|
40219
40310
|
paramType: ts.Diagnostics.DIRECTORY,
|
|
40220
40311
|
category: ts.Diagnostics.Emit,
|
|
@@ -40224,6 +40315,8 @@ var ts;
|
|
|
40224
40315
|
{
|
|
40225
40316
|
name: "skipLibCheck",
|
|
40226
40317
|
type: "boolean",
|
|
40318
|
+
// We need to store these to determine whether `lib` files need to be rechecked
|
|
40319
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
40227
40320
|
category: ts.Diagnostics.Completeness,
|
|
40228
40321
|
description: ts.Diagnostics.Skip_type_checking_all_d_ts_files,
|
|
40229
40322
|
defaultValueDescription: false,
|
|
@@ -40233,6 +40326,7 @@ var ts;
|
|
|
40233
40326
|
type: "boolean",
|
|
40234
40327
|
affectsBindDiagnostics: true,
|
|
40235
40328
|
affectsSemanticDiagnostics: true,
|
|
40329
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
40236
40330
|
category: ts.Diagnostics.Type_Checking,
|
|
40237
40331
|
description: ts.Diagnostics.Disable_error_reporting_for_unused_labels,
|
|
40238
40332
|
defaultValueDescription: undefined,
|
|
@@ -40242,6 +40336,7 @@ var ts;
|
|
|
40242
40336
|
type: "boolean",
|
|
40243
40337
|
affectsBindDiagnostics: true,
|
|
40244
40338
|
affectsSemanticDiagnostics: true,
|
|
40339
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
40245
40340
|
category: ts.Diagnostics.Type_Checking,
|
|
40246
40341
|
description: ts.Diagnostics.Disable_error_reporting_for_unreachable_code,
|
|
40247
40342
|
defaultValueDescription: undefined,
|
|
@@ -40250,6 +40345,7 @@ var ts;
|
|
|
40250
40345
|
name: "suppressExcessPropertyErrors",
|
|
40251
40346
|
type: "boolean",
|
|
40252
40347
|
affectsSemanticDiagnostics: true,
|
|
40348
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
40253
40349
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
40254
40350
|
description: ts.Diagnostics.Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals,
|
|
40255
40351
|
defaultValueDescription: false,
|
|
@@ -40258,6 +40354,7 @@ var ts;
|
|
|
40258
40354
|
name: "suppressImplicitAnyIndexErrors",
|
|
40259
40355
|
type: "boolean",
|
|
40260
40356
|
affectsSemanticDiagnostics: true,
|
|
40357
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
40261
40358
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
40262
40359
|
description: ts.Diagnostics.Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures,
|
|
40263
40360
|
defaultValueDescription: false,
|
|
@@ -40282,6 +40379,7 @@ var ts;
|
|
|
40282
40379
|
name: "noStrictGenericChecks",
|
|
40283
40380
|
type: "boolean",
|
|
40284
40381
|
affectsSemanticDiagnostics: true,
|
|
40382
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
40285
40383
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
40286
40384
|
description: ts.Diagnostics.Disable_strict_checking_of_generic_signatures_in_function_types,
|
|
40287
40385
|
defaultValueDescription: false,
|
|
@@ -40291,6 +40389,7 @@ var ts;
|
|
|
40291
40389
|
type: "boolean",
|
|
40292
40390
|
affectsSemanticDiagnostics: true,
|
|
40293
40391
|
affectsEmit: true,
|
|
40392
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
40294
40393
|
category: ts.Diagnostics.Language_and_Environment,
|
|
40295
40394
|
description: ts.Diagnostics.Emit_ECMAScript_standard_compliant_class_fields,
|
|
40296
40395
|
defaultValueDescription: ts.Diagnostics.true_for_ES2022_and_above_including_ESNext
|
|
@@ -40299,6 +40398,7 @@ var ts;
|
|
|
40299
40398
|
name: "preserveValueImports",
|
|
40300
40399
|
type: "boolean",
|
|
40301
40400
|
affectsEmit: true,
|
|
40401
|
+
affectsMultiFileEmitBuildInfo: true,
|
|
40302
40402
|
category: ts.Diagnostics.Emit,
|
|
40303
40403
|
description: ts.Diagnostics.Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed,
|
|
40304
40404
|
defaultValueDescription: false,
|
|
@@ -40342,6 +40442,8 @@ var ts;
|
|
|
40342
40442
|
/* @internal */
|
|
40343
40443
|
ts.affectsEmitOptionDeclarations = ts.optionDeclarations.filter(function (option) { return !!option.affectsEmit; });
|
|
40344
40444
|
/* @internal */
|
|
40445
|
+
ts.affectsDeclarationPathOptionDeclarations = ts.optionDeclarations.filter(function (option) { return !!option.affectsDeclarationPath; });
|
|
40446
|
+
/* @internal */
|
|
40345
40447
|
ts.moduleResolutionOptionDeclarations = ts.optionDeclarations.filter(function (option) { return !!option.affectsModuleResolution; });
|
|
40346
40448
|
/* @internal */
|
|
40347
40449
|
ts.sourceFileAffectingCompilerOptions = ts.optionDeclarations.filter(function (option) {
|
|
@@ -41197,6 +41299,7 @@ var ts;
|
|
|
41197
41299
|
return optionDefinition.type;
|
|
41198
41300
|
}
|
|
41199
41301
|
}
|
|
41302
|
+
/* @internal */
|
|
41200
41303
|
function getNameOfCompilerOptionValue(value, customTypeMap) {
|
|
41201
41304
|
// There is a typeMap associated with this command-line option so use it to map value back to its name
|
|
41202
41305
|
return ts.forEachEntry(customTypeMap, function (mapValue, key) {
|
|
@@ -41205,6 +41308,7 @@ var ts;
|
|
|
41205
41308
|
}
|
|
41206
41309
|
});
|
|
41207
41310
|
}
|
|
41311
|
+
ts.getNameOfCompilerOptionValue = getNameOfCompilerOptionValue;
|
|
41208
41312
|
function serializeCompilerOptions(options, pathOptions) {
|
|
41209
41313
|
return serializeOptionBaseObject(options, getOptionsNameMap(), pathOptions);
|
|
41210
41314
|
}
|
|
@@ -65517,20 +65621,6 @@ var ts;
|
|
|
65517
65621
|
}
|
|
65518
65622
|
}
|
|
65519
65623
|
}
|
|
65520
|
-
if (relation === comparableRelation && sourceFlags & 262144 /* TypeParameter */) {
|
|
65521
|
-
// This is a carve-out in comparability to essentially forbid comparing a type parameter
|
|
65522
|
-
// with another type parameter unless one extends the other. (Remember: comparability is mostly bidirectional!)
|
|
65523
|
-
var constraint = getConstraintOfTypeParameter(source);
|
|
65524
|
-
if (constraint && hasNonCircularBaseConstraint(source)) {
|
|
65525
|
-
while (constraint && constraint.flags & 262144 /* TypeParameter */) {
|
|
65526
|
-
if (result = isRelatedTo(constraint, target, 1 /* Source */, /*reportErrors*/ false)) {
|
|
65527
|
-
return result;
|
|
65528
|
-
}
|
|
65529
|
-
constraint = getConstraintOfTypeParameter(constraint);
|
|
65530
|
-
}
|
|
65531
|
-
}
|
|
65532
|
-
return 0 /* False */;
|
|
65533
|
-
}
|
|
65534
65624
|
}
|
|
65535
65625
|
else if (targetFlags & 4194304 /* Index */) {
|
|
65536
65626
|
var targetType_1 = target.type;
|
|
@@ -65734,8 +65824,8 @@ var ts;
|
|
|
65734
65824
|
if (sourceFlags & 8650752 /* TypeVariable */) {
|
|
65735
65825
|
// IndexedAccess comparisons are handled above in the `targetFlags & TypeFlage.IndexedAccess` branch
|
|
65736
65826
|
if (!(sourceFlags & 8388608 /* IndexedAccess */ && targetFlags & 8388608 /* IndexedAccess */)) {
|
|
65737
|
-
var constraint = getConstraintOfType(source)
|
|
65738
|
-
if (!strictNullChecks && (!
|
|
65827
|
+
var constraint = getConstraintOfType(source);
|
|
65828
|
+
if (!strictNullChecks && (!constraint || (sourceFlags & 262144 /* TypeParameter */ && constraint.flags & 1 /* Any */))) {
|
|
65739
65829
|
// A type variable with no constraint is not related to the non-primitive object type.
|
|
65740
65830
|
if (result = isRelatedTo(emptyObjectType, extractTypesOfKind(target, ~67108864 /* NonPrimitive */), 3 /* Both */)) {
|
|
65741
65831
|
resetErrorInfo(saveErrorInfo);
|
|
@@ -65743,12 +65833,12 @@ var ts;
|
|
|
65743
65833
|
}
|
|
65744
65834
|
}
|
|
65745
65835
|
// hi-speed no-this-instantiation check (less accurate, but avoids costly `this`-instantiation when the constraint will suffice), see #28231 for report on why this is needed
|
|
65746
|
-
if (result = isRelatedTo(constraint, target, 1 /* Source */, /*reportErrors*/ false, /*headMessage*/ undefined, intersectionState)) {
|
|
65836
|
+
else if (constraint && (result = isRelatedTo(constraint, target, 1 /* Source */, /*reportErrors*/ false, /*headMessage*/ undefined, intersectionState))) {
|
|
65747
65837
|
resetErrorInfo(saveErrorInfo);
|
|
65748
65838
|
return result;
|
|
65749
65839
|
}
|
|
65750
65840
|
// slower, fuller, this-instantiated check (necessary when comparing raw `this` types from base classes), see `subclassWithPolymorphicThisIsAssignable.ts` test for example
|
|
65751
|
-
else if (result = isRelatedTo(getTypeWithThisArgument(constraint, source), target, 1 /* Source */, reportErrors &&
|
|
65841
|
+
else if (constraint && (result = isRelatedTo(getTypeWithThisArgument(constraint, source), target, 1 /* Source */, reportErrors && !(targetFlags & sourceFlags & 262144 /* TypeParameter */), /*headMessage*/ undefined, intersectionState))) {
|
|
65752
65842
|
resetErrorInfo(saveErrorInfo);
|
|
65753
65843
|
return result;
|
|
65754
65844
|
}
|
|
@@ -110067,7 +110157,8 @@ var ts;
|
|
|
110067
110157
|
return;
|
|
110068
110158
|
}
|
|
110069
110159
|
var version = ts.version; // Extracted into a const so the form is stable between namespace and module
|
|
110070
|
-
|
|
110160
|
+
var buildInfo = { bundle: bundle, program: program, version: version };
|
|
110161
|
+
ts.writeFile(host, emitterDiagnostics, buildInfoPath, getBuildInfoText(buildInfo), /*writeByteOrderMark*/ false, /*sourceFiles*/ undefined, { buildInfo: buildInfo });
|
|
110071
110162
|
}
|
|
110072
110163
|
function emitJsFileOrBundle(sourceFileOrBundle, jsFilePath, sourceMapFilePath, relativeToBuildInfo) {
|
|
110073
110164
|
if (!sourceFileOrBundle || emitOnlyDtsFiles || !jsFilePath) {
|
|
@@ -110221,13 +110312,18 @@ var ts;
|
|
|
110221
110312
|
if (sourceMapFilePath) {
|
|
110222
110313
|
var sourceMap = sourceMapGenerator.toString();
|
|
110223
110314
|
ts.writeFile(host, emitterDiagnostics, sourceMapFilePath, sourceMap, /*writeByteOrderMark*/ false, sourceFiles);
|
|
110315
|
+
if (printer.bundleFileInfo)
|
|
110316
|
+
printer.bundleFileInfo.mapHash = ts.BuilderState.computeSignature(sourceMap, ts.maybeBind(host, host.createHash));
|
|
110224
110317
|
}
|
|
110225
110318
|
}
|
|
110226
110319
|
else {
|
|
110227
110320
|
writer.writeLine();
|
|
110228
110321
|
}
|
|
110229
110322
|
// Write the output file
|
|
110230
|
-
|
|
110323
|
+
var text = writer.getText();
|
|
110324
|
+
ts.writeFile(host, emitterDiagnostics, jsFilePath, text, !!compilerOptions.emitBOM, sourceFiles, { sourceMapUrlPos: sourceMapUrlPos });
|
|
110325
|
+
if (printer.bundleFileInfo)
|
|
110326
|
+
printer.bundleFileInfo.hash = ts.BuilderState.computeSignature(text, ts.maybeBind(host, host.createHash));
|
|
110231
110327
|
// Reset state
|
|
110232
110328
|
writer.clear();
|
|
110233
110329
|
}
|
|
@@ -110370,34 +110466,54 @@ var ts;
|
|
|
110370
110466
|
}
|
|
110371
110467
|
/*@internal*/
|
|
110372
110468
|
function emitUsingBuildInfo(config, host, getCommandLine, customTransformers) {
|
|
110469
|
+
var createHash = ts.maybeBind(host, host.createHash);
|
|
110373
110470
|
var _a = getOutputPathsForBundle(config.options, /*forceDtsPaths*/ false), buildInfoPath = _a.buildInfoPath, jsFilePath = _a.jsFilePath, sourceMapFilePath = _a.sourceMapFilePath, declarationFilePath = _a.declarationFilePath, declarationMapPath = _a.declarationMapPath;
|
|
110374
|
-
var
|
|
110375
|
-
if (
|
|
110471
|
+
var buildInfo;
|
|
110472
|
+
if (host.getBuildInfo) {
|
|
110473
|
+
var hostBuildInfo = host.getBuildInfo(buildInfoPath, config.options.configFilePath);
|
|
110474
|
+
if (!hostBuildInfo)
|
|
110475
|
+
return buildInfoPath;
|
|
110476
|
+
buildInfo = hostBuildInfo;
|
|
110477
|
+
}
|
|
110478
|
+
else {
|
|
110479
|
+
var buildInfoText = host.readFile(buildInfoPath);
|
|
110480
|
+
if (!buildInfoText)
|
|
110481
|
+
return buildInfoPath;
|
|
110482
|
+
buildInfo = getBuildInfo(buildInfoText);
|
|
110483
|
+
}
|
|
110484
|
+
if (!buildInfo.bundle || !buildInfo.bundle.js || (declarationFilePath && !buildInfo.bundle.dts))
|
|
110376
110485
|
return buildInfoPath;
|
|
110377
110486
|
var jsFileText = host.readFile(ts.Debug.checkDefined(jsFilePath));
|
|
110378
110487
|
if (!jsFileText)
|
|
110379
110488
|
return jsFilePath;
|
|
110489
|
+
if (ts.BuilderState.computeSignature(jsFileText, createHash) !== buildInfo.bundle.js.hash)
|
|
110490
|
+
return jsFilePath;
|
|
110380
110491
|
var sourceMapText = sourceMapFilePath && host.readFile(sourceMapFilePath);
|
|
110381
110492
|
// error if no source map or for now if inline sourcemap
|
|
110382
110493
|
if ((sourceMapFilePath && !sourceMapText) || config.options.inlineSourceMap)
|
|
110383
110494
|
return sourceMapFilePath || "inline sourcemap decoding";
|
|
110495
|
+
if (sourceMapFilePath && ts.BuilderState.computeSignature(sourceMapText, createHash) !== buildInfo.bundle.js.mapHash)
|
|
110496
|
+
return sourceMapFilePath;
|
|
110384
110497
|
// read declaration text
|
|
110385
110498
|
var declarationText = declarationFilePath && host.readFile(declarationFilePath);
|
|
110386
110499
|
if (declarationFilePath && !declarationText)
|
|
110387
110500
|
return declarationFilePath;
|
|
110501
|
+
if (declarationFilePath && ts.BuilderState.computeSignature(declarationText, createHash) !== buildInfo.bundle.dts.hash)
|
|
110502
|
+
return declarationFilePath;
|
|
110388
110503
|
var declarationMapText = declarationMapPath && host.readFile(declarationMapPath);
|
|
110389
110504
|
// error if no source map or for now if inline sourcemap
|
|
110390
110505
|
if ((declarationMapPath && !declarationMapText) || config.options.inlineSourceMap)
|
|
110391
110506
|
return declarationMapPath || "inline sourcemap decoding";
|
|
110392
|
-
|
|
110393
|
-
|
|
110394
|
-
return buildInfoPath;
|
|
110507
|
+
if (declarationMapPath && ts.BuilderState.computeSignature(declarationMapText, createHash) !== buildInfo.bundle.dts.mapHash)
|
|
110508
|
+
return declarationMapPath;
|
|
110395
110509
|
var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));
|
|
110396
110510
|
var ownPrependInput = ts.createInputFiles(jsFileText, declarationText, sourceMapFilePath, sourceMapText, declarationMapPath, declarationMapText, jsFilePath, declarationFilePath, buildInfoPath, buildInfo,
|
|
110397
110511
|
/*onlyOwnText*/ true);
|
|
110398
110512
|
var outputFiles = [];
|
|
110399
110513
|
var prependNodes = ts.createPrependNodes(config.projectReferences, getCommandLine, function (f) { return host.readFile(f); });
|
|
110400
110514
|
var sourceFilesForJsEmit = createSourceFilesFromBundleBuildInfo(buildInfo.bundle, buildInfoDirectory, host);
|
|
110515
|
+
var changedDtsText;
|
|
110516
|
+
var changedDtsData;
|
|
110401
110517
|
var emitHost = {
|
|
110402
110518
|
getPrependNodes: ts.memoize(function () { return __spreadArray(__spreadArray([], prependNodes, true), [ownPrependInput], false); }),
|
|
110403
110519
|
getCanonicalFileName: host.getCanonicalFileName,
|
|
@@ -110413,7 +110529,7 @@ var ts;
|
|
|
110413
110529
|
getResolvedProjectReferenceToRedirect: ts.returnUndefined,
|
|
110414
110530
|
getProjectReferenceRedirect: ts.returnUndefined,
|
|
110415
110531
|
isSourceOfProjectReferenceRedirect: ts.returnFalse,
|
|
110416
|
-
writeFile: function (name, text, writeByteOrderMark) {
|
|
110532
|
+
writeFile: function (name, text, writeByteOrderMark, _onError, _sourceFiles, data) {
|
|
110417
110533
|
switch (name) {
|
|
110418
110534
|
case jsFilePath:
|
|
110419
110535
|
if (jsFileText === text)
|
|
@@ -110424,8 +110540,13 @@ var ts;
|
|
|
110424
110540
|
return;
|
|
110425
110541
|
break;
|
|
110426
110542
|
case buildInfoPath:
|
|
110427
|
-
var newBuildInfo =
|
|
110543
|
+
var newBuildInfo = data.buildInfo;
|
|
110428
110544
|
newBuildInfo.program = buildInfo.program;
|
|
110545
|
+
if (newBuildInfo.program && changedDtsText !== undefined && config.options.composite) {
|
|
110546
|
+
// Update the output signature
|
|
110547
|
+
newBuildInfo.program.outSignature = ts.computeSignature(changedDtsText, changedDtsData, createHash);
|
|
110548
|
+
newBuildInfo.program.dtsChangeTime = ts.getCurrentTime(host).getTime();
|
|
110549
|
+
}
|
|
110429
110550
|
// Update sourceFileInfo
|
|
110430
110551
|
var _a = buildInfo.bundle, js = _a.js, dts = _a.dts, sourceFiles = _a.sourceFiles;
|
|
110431
110552
|
newBuildInfo.bundle.js.sources = js.sources;
|
|
@@ -110433,11 +110554,13 @@ var ts;
|
|
|
110433
110554
|
newBuildInfo.bundle.dts.sources = dts.sources;
|
|
110434
110555
|
}
|
|
110435
110556
|
newBuildInfo.bundle.sourceFiles = sourceFiles;
|
|
110436
|
-
outputFiles.push({ name: name, text: getBuildInfoText(newBuildInfo), writeByteOrderMark: writeByteOrderMark });
|
|
110557
|
+
outputFiles.push({ name: name, text: getBuildInfoText(newBuildInfo), writeByteOrderMark: writeByteOrderMark, buildInfo: newBuildInfo });
|
|
110437
110558
|
return;
|
|
110438
110559
|
case declarationFilePath:
|
|
110439
110560
|
if (declarationText === text)
|
|
110440
110561
|
return;
|
|
110562
|
+
changedDtsText = text;
|
|
110563
|
+
changedDtsData = data;
|
|
110441
110564
|
break;
|
|
110442
110565
|
case declarationMapPath:
|
|
110443
110566
|
if (declarationMapText === text)
|
|
@@ -110456,6 +110579,7 @@ var ts;
|
|
|
110456
110579
|
getSourceFileFromReference: ts.returnUndefined,
|
|
110457
110580
|
redirectTargetsMap: ts.createMultiMap(),
|
|
110458
110581
|
getFileIncludeReasons: ts.notImplemented,
|
|
110582
|
+
createHash: createHash,
|
|
110459
110583
|
};
|
|
110460
110584
|
emitFiles(ts.notImplementedResolver, emitHost,
|
|
110461
110585
|
/*targetSourceFile*/ undefined, ts.getTransformers(config.options, customTransformers));
|
|
@@ -115540,12 +115664,10 @@ var ts;
|
|
|
115540
115664
|
}
|
|
115541
115665
|
ts.createCompilerHost = createCompilerHost;
|
|
115542
115666
|
/*@internal*/
|
|
115543
|
-
// TODO(shkamat): update this after reworking ts build API
|
|
115544
115667
|
function createCompilerHostWorker(options, setParentNodes, system) {
|
|
115545
115668
|
if (system === void 0) { system = ts.sys; }
|
|
115546
115669
|
var existingDirectories = new ts.Map();
|
|
115547
115670
|
var getCanonicalFileName = ts.createGetCanonicalFileName(system.useCaseSensitiveFileNames);
|
|
115548
|
-
var computeHash = ts.maybeBind(system, system.createHash) || ts.generateDjb2Hash;
|
|
115549
115671
|
function getSourceFile(fileName, languageVersionOrOptions, onError) {
|
|
115550
115672
|
var text;
|
|
115551
115673
|
try {
|
|
@@ -115578,7 +115700,7 @@ var ts;
|
|
|
115578
115700
|
// NOTE: If patchWriteFileEnsuringDirectory has been called,
|
|
115579
115701
|
// the system.writeFile will do its own directory creation and
|
|
115580
115702
|
// the ensureDirectoriesExist call will always be redundant.
|
|
115581
|
-
ts.writeFileEnsuringDirectories(fileName, data, writeByteOrderMark, function (path, data, writeByteOrderMark) { return
|
|
115703
|
+
ts.writeFileEnsuringDirectories(fileName, data, writeByteOrderMark, function (path, data, writeByteOrderMark) { return system.writeFile(path, data, writeByteOrderMark); }, function (path) { return (compilerHost.createDirectory || system.createDirectory)(path); }, function (path) { return directoryExists(path); });
|
|
115582
115704
|
ts.performance.mark("afterIOWrite");
|
|
115583
115705
|
ts.performance.measure("I/O Write", "beforeIOWrite", "afterIOWrite");
|
|
115584
115706
|
}
|
|
@@ -115588,35 +115710,6 @@ var ts;
|
|
|
115588
115710
|
}
|
|
115589
115711
|
}
|
|
115590
115712
|
}
|
|
115591
|
-
var outputFingerprints;
|
|
115592
|
-
function writeFileWorker(fileName, data, writeByteOrderMark) {
|
|
115593
|
-
if (!ts.isWatchSet(options) || !system.getModifiedTime) {
|
|
115594
|
-
system.writeFile(fileName, data, writeByteOrderMark);
|
|
115595
|
-
return;
|
|
115596
|
-
}
|
|
115597
|
-
if (!outputFingerprints) {
|
|
115598
|
-
outputFingerprints = new ts.Map();
|
|
115599
|
-
}
|
|
115600
|
-
var hash = computeHash(data);
|
|
115601
|
-
var mtimeBefore = system.getModifiedTime(fileName);
|
|
115602
|
-
if (mtimeBefore) {
|
|
115603
|
-
var fingerprint = outputFingerprints.get(fileName);
|
|
115604
|
-
// If output has not been changed, and the file has no external modification
|
|
115605
|
-
if (fingerprint &&
|
|
115606
|
-
fingerprint.byteOrderMark === writeByteOrderMark &&
|
|
115607
|
-
fingerprint.hash === hash &&
|
|
115608
|
-
fingerprint.mtime.getTime() === mtimeBefore.getTime()) {
|
|
115609
|
-
return;
|
|
115610
|
-
}
|
|
115611
|
-
}
|
|
115612
|
-
system.writeFile(fileName, data, writeByteOrderMark);
|
|
115613
|
-
var mtimeAfter = system.getModifiedTime(fileName) || ts.missingFileModifiedTime;
|
|
115614
|
-
outputFingerprints.set(fileName, {
|
|
115615
|
-
hash: hash,
|
|
115616
|
-
byteOrderMark: writeByteOrderMark,
|
|
115617
|
-
mtime: mtimeAfter
|
|
115618
|
-
});
|
|
115619
|
-
}
|
|
115620
115713
|
function getDefaultLibLocation() {
|
|
115621
115714
|
return ts.getDirectoryPath(ts.normalizePath(system.getExecutingFilePath()));
|
|
115622
115715
|
}
|
|
@@ -117168,6 +117261,7 @@ var ts;
|
|
|
117168
117261
|
getSourceFileFromReference: function (file, ref) { return program.getSourceFileFromReference(file, ref); },
|
|
117169
117262
|
redirectTargetsMap: redirectTargetsMap,
|
|
117170
117263
|
getFileIncludeReasons: program.getFileIncludeReasons,
|
|
117264
|
+
createHash: ts.maybeBind(host, host.createHash),
|
|
117171
117265
|
};
|
|
117172
117266
|
}
|
|
117173
117267
|
function writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data) {
|
|
@@ -119281,13 +119375,9 @@ var ts;
|
|
|
119281
119375
|
function createManyToManyPathMap() {
|
|
119282
119376
|
function create(forward, reverse, deleted) {
|
|
119283
119377
|
var map = {
|
|
119284
|
-
clone: function () { return create(new ts.Map(forward), new ts.Map(reverse), deleted && new ts.Set(deleted)); },
|
|
119285
|
-
forEach: function (fn) { return forward.forEach(fn); },
|
|
119286
119378
|
getKeys: function (v) { return reverse.get(v); },
|
|
119287
119379
|
getValues: function (k) { return forward.get(k); },
|
|
119288
|
-
hasKey: function (k) { return forward.has(k); },
|
|
119289
119380
|
keys: function () { return forward.keys(); },
|
|
119290
|
-
deletedKeys: function () { return deleted; },
|
|
119291
119381
|
deleteKey: function (k) {
|
|
119292
119382
|
(deleted || (deleted = new ts.Set())).add(k);
|
|
119293
119383
|
var set = forward.get(k);
|
|
@@ -119314,11 +119404,6 @@ var ts;
|
|
|
119314
119404
|
});
|
|
119315
119405
|
return map;
|
|
119316
119406
|
},
|
|
119317
|
-
clear: function () {
|
|
119318
|
-
forward.clear();
|
|
119319
|
-
reverse.clear();
|
|
119320
|
-
deleted === null || deleted === void 0 ? void 0 : deleted.clear();
|
|
119321
|
-
}
|
|
119322
119407
|
};
|
|
119323
119408
|
return map;
|
|
119324
119409
|
}
|
|
@@ -119446,18 +119531,21 @@ var ts;
|
|
|
119446
119531
|
* Creates the state of file references and signature for the new program from oldState if it is safe
|
|
119447
119532
|
*/
|
|
119448
119533
|
function create(newProgram, getCanonicalFileName, oldState, disableUseFileVersionAsSignature) {
|
|
119534
|
+
var _a, _b, _c;
|
|
119449
119535
|
var fileInfos = new ts.Map();
|
|
119450
119536
|
var referencedMap = newProgram.getCompilerOptions().module !== ts.ModuleKind.None ? createManyToManyPathMap() : undefined;
|
|
119451
119537
|
var exportedModulesMap = referencedMap ? createManyToManyPathMap() : undefined;
|
|
119452
|
-
var hasCalledUpdateShapeSignature = new ts.Set();
|
|
119453
119538
|
var useOldState = canReuseOldState(referencedMap, oldState);
|
|
119454
119539
|
// Ensure source files have parent pointers set
|
|
119455
119540
|
newProgram.getTypeChecker();
|
|
119456
119541
|
// Create the reference map, and set the file infos
|
|
119457
|
-
for (var _i = 0,
|
|
119458
|
-
var sourceFile =
|
|
119542
|
+
for (var _i = 0, _d = newProgram.getSourceFiles(); _i < _d.length; _i++) {
|
|
119543
|
+
var sourceFile = _d[_i];
|
|
119459
119544
|
var version_2 = ts.Debug.checkDefined(sourceFile.version, "Program intended to be used with Builder should have source files with versions set");
|
|
119460
|
-
var
|
|
119545
|
+
var oldUncommitedSignature = useOldState ? (_a = oldState.oldSignatures) === null || _a === void 0 ? void 0 : _a.get(sourceFile.resolvedPath) : undefined;
|
|
119546
|
+
var signature = oldUncommitedSignature === undefined ?
|
|
119547
|
+
useOldState ? (_b = oldState.fileInfos.get(sourceFile.resolvedPath)) === null || _b === void 0 ? void 0 : _b.signature : undefined :
|
|
119548
|
+
oldUncommitedSignature || undefined;
|
|
119461
119549
|
if (referencedMap) {
|
|
119462
119550
|
var newReferences = getReferencedFiles(newProgram, sourceFile, getCanonicalFileName);
|
|
119463
119551
|
if (newReferences) {
|
|
@@ -119465,19 +119553,26 @@ var ts;
|
|
|
119465
119553
|
}
|
|
119466
119554
|
// Copy old visible to outside files map
|
|
119467
119555
|
if (useOldState) {
|
|
119468
|
-
var
|
|
119556
|
+
var oldUncommitedExportedModules = (_c = oldState.oldExportedModulesMap) === null || _c === void 0 ? void 0 : _c.get(sourceFile.resolvedPath);
|
|
119557
|
+
var exportedModules = oldUncommitedExportedModules === undefined ?
|
|
119558
|
+
oldState.exportedModulesMap.getValues(sourceFile.resolvedPath) :
|
|
119559
|
+
oldUncommitedExportedModules || undefined;
|
|
119469
119560
|
if (exportedModules) {
|
|
119470
119561
|
exportedModulesMap.set(sourceFile.resolvedPath, exportedModules);
|
|
119471
119562
|
}
|
|
119472
119563
|
}
|
|
119473
119564
|
}
|
|
119474
|
-
fileInfos.set(sourceFile.resolvedPath, {
|
|
119565
|
+
fileInfos.set(sourceFile.resolvedPath, {
|
|
119566
|
+
version: version_2,
|
|
119567
|
+
signature: signature,
|
|
119568
|
+
affectsGlobalScope: isFileAffectingGlobalScope(sourceFile) || undefined,
|
|
119569
|
+
impliedFormat: sourceFile.impliedNodeFormat
|
|
119570
|
+
});
|
|
119475
119571
|
}
|
|
119476
119572
|
return {
|
|
119477
119573
|
fileInfos: fileInfos,
|
|
119478
119574
|
referencedMap: referencedMap,
|
|
119479
119575
|
exportedModulesMap: exportedModulesMap,
|
|
119480
|
-
hasCalledUpdateShapeSignature: hasCalledUpdateShapeSignature,
|
|
119481
119576
|
useFileVersionAsSignature: !disableUseFileVersionAsSignature && !useOldState
|
|
119482
119577
|
};
|
|
119483
119578
|
}
|
|
@@ -119491,71 +119586,42 @@ var ts;
|
|
|
119491
119586
|
}
|
|
119492
119587
|
BuilderState.releaseCache = releaseCache;
|
|
119493
119588
|
/**
|
|
119494
|
-
*
|
|
119589
|
+
* Gets the files affected by the path from the program
|
|
119495
119590
|
*/
|
|
119496
|
-
function
|
|
119591
|
+
function getFilesAffectedBy(state, programOfThisState, path, cancellationToken, computeHash) {
|
|
119497
119592
|
var _a, _b;
|
|
119498
|
-
|
|
119499
|
-
|
|
119500
|
-
|
|
119501
|
-
|
|
119502
|
-
exportedModulesMap: (_b = state.exportedModulesMap) === null || _b === void 0 ? void 0 : _b.clone(),
|
|
119503
|
-
hasCalledUpdateShapeSignature: new ts.Set(state.hasCalledUpdateShapeSignature),
|
|
119504
|
-
useFileVersionAsSignature: state.useFileVersionAsSignature,
|
|
119505
|
-
};
|
|
119593
|
+
var result = getFilesAffectedByWithOldState(state, programOfThisState, path, cancellationToken, computeHash);
|
|
119594
|
+
(_a = state.oldSignatures) === null || _a === void 0 ? void 0 : _a.clear();
|
|
119595
|
+
(_b = state.oldExportedModulesMap) === null || _b === void 0 ? void 0 : _b.clear();
|
|
119596
|
+
return result;
|
|
119506
119597
|
}
|
|
119507
|
-
BuilderState.
|
|
119508
|
-
|
|
119509
|
-
* Gets the files affected by the path from the program
|
|
119510
|
-
*/
|
|
119511
|
-
function getFilesAffectedBy(state, programOfThisState, path, cancellationToken, computeHash, cacheToUpdateSignature, exportedModulesMapCache) {
|
|
119512
|
-
// Since the operation could be cancelled, the signatures are always stored in the cache
|
|
119513
|
-
// They will be committed once it is safe to use them
|
|
119514
|
-
// eg when calling this api from tsserver, if there is no cancellation of the operation
|
|
119515
|
-
// In the other cases the affected files signatures are committed only after the iteration through the result is complete
|
|
119516
|
-
var signatureCache = cacheToUpdateSignature || new ts.Map();
|
|
119598
|
+
BuilderState.getFilesAffectedBy = getFilesAffectedBy;
|
|
119599
|
+
function getFilesAffectedByWithOldState(state, programOfThisState, path, cancellationToken, computeHash) {
|
|
119517
119600
|
var sourceFile = programOfThisState.getSourceFileByPath(path);
|
|
119518
119601
|
if (!sourceFile) {
|
|
119519
119602
|
return ts.emptyArray;
|
|
119520
119603
|
}
|
|
119521
|
-
if (!updateShapeSignature(state, programOfThisState, sourceFile,
|
|
119604
|
+
if (!updateShapeSignature(state, programOfThisState, sourceFile, cancellationToken, computeHash)) {
|
|
119522
119605
|
return [sourceFile];
|
|
119523
119606
|
}
|
|
119524
|
-
|
|
119525
|
-
if (!cacheToUpdateSignature) {
|
|
119526
|
-
// Commit all the signatures in the signature cache
|
|
119527
|
-
updateSignaturesFromCache(state, signatureCache);
|
|
119528
|
-
}
|
|
119529
|
-
return result;
|
|
119607
|
+
return (state.referencedMap ? getFilesAffectedByUpdatedShapeWhenModuleEmit : getFilesAffectedByUpdatedShapeWhenNonModuleEmit)(state, programOfThisState, sourceFile, cancellationToken, computeHash);
|
|
119530
119608
|
}
|
|
119531
|
-
BuilderState.
|
|
119532
|
-
/**
|
|
119533
|
-
* Updates the signatures from the cache into state's fileinfo signatures
|
|
119534
|
-
* This should be called whenever it is safe to commit the state of the builder
|
|
119535
|
-
*/
|
|
119536
|
-
function updateSignaturesFromCache(state, signatureCache) {
|
|
119537
|
-
signatureCache.forEach(function (signature, path) { return updateSignatureOfFile(state, signature, path); });
|
|
119538
|
-
}
|
|
119539
|
-
BuilderState.updateSignaturesFromCache = updateSignaturesFromCache;
|
|
119609
|
+
BuilderState.getFilesAffectedByWithOldState = getFilesAffectedByWithOldState;
|
|
119540
119610
|
function updateSignatureOfFile(state, signature, path) {
|
|
119541
119611
|
state.fileInfos.get(path).signature = signature;
|
|
119542
|
-
state.hasCalledUpdateShapeSignature.add(path);
|
|
119612
|
+
(state.hasCalledUpdateShapeSignature || (state.hasCalledUpdateShapeSignature = new ts.Set())).add(path);
|
|
119543
119613
|
}
|
|
119544
119614
|
BuilderState.updateSignatureOfFile = updateSignatureOfFile;
|
|
119545
119615
|
/**
|
|
119546
119616
|
* Returns if the shape of the signature has changed since last emit
|
|
119547
119617
|
*/
|
|
119548
|
-
function updateShapeSignature(state, programOfThisState, sourceFile,
|
|
119618
|
+
function updateShapeSignature(state, programOfThisState, sourceFile, cancellationToken, computeHash, useFileVersionAsSignature) {
|
|
119619
|
+
var _a;
|
|
119549
119620
|
if (useFileVersionAsSignature === void 0) { useFileVersionAsSignature = state.useFileVersionAsSignature; }
|
|
119550
|
-
ts.Debug.assert(!!sourceFile);
|
|
119551
|
-
ts.Debug.assert(!exportedModulesMapCache || !!state.exportedModulesMap, "Compute visible to outside map only if visibleToOutsideReferencedMap present in the state");
|
|
119552
119621
|
// If we have cached the result for this file, that means hence forth we should assume file shape is uptodate
|
|
119553
|
-
if (state.hasCalledUpdateShapeSignature
|
|
119622
|
+
if ((_a = state.hasCalledUpdateShapeSignature) === null || _a === void 0 ? void 0 : _a.has(sourceFile.resolvedPath))
|
|
119554
119623
|
return false;
|
|
119555
|
-
}
|
|
119556
119624
|
var info = state.fileInfos.get(sourceFile.resolvedPath);
|
|
119557
|
-
if (!info)
|
|
119558
|
-
return ts.Debug.fail();
|
|
119559
119625
|
var prevSignature = info.signature;
|
|
119560
119626
|
var latestSignature;
|
|
119561
119627
|
if (!sourceFile.isDeclarationFile && !useFileVersionAsSignature) {
|
|
@@ -119566,45 +119632,55 @@ var ts;
|
|
|
119566
119632
|
var firstDts_1 = ts.firstOrUndefined(emitOutput_1.outputFiles);
|
|
119567
119633
|
if (firstDts_1) {
|
|
119568
119634
|
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; })); });
|
|
119569
|
-
latestSignature = (
|
|
119570
|
-
if (
|
|
119571
|
-
updateExportedModules(sourceFile, emitOutput_1.exportedModulesFromDeclarationEmit
|
|
119635
|
+
latestSignature = computeSignature(firstDts_1.text, computeHash);
|
|
119636
|
+
if (latestSignature !== prevSignature) {
|
|
119637
|
+
updateExportedModules(state, sourceFile, emitOutput_1.exportedModulesFromDeclarationEmit);
|
|
119572
119638
|
}
|
|
119573
119639
|
}
|
|
119574
119640
|
}
|
|
119575
119641
|
// Default is to use file version as signature
|
|
119576
119642
|
if (latestSignature === undefined) {
|
|
119577
119643
|
latestSignature = sourceFile.version;
|
|
119578
|
-
if (
|
|
119644
|
+
if (state.exportedModulesMap && latestSignature !== prevSignature) {
|
|
119645
|
+
(state.oldExportedModulesMap || (state.oldExportedModulesMap = new ts.Map())).set(sourceFile.resolvedPath, state.exportedModulesMap.getValues(sourceFile.resolvedPath) || false);
|
|
119579
119646
|
// All the references in this file are exported
|
|
119580
119647
|
var references = state.referencedMap ? state.referencedMap.getValues(sourceFile.resolvedPath) : undefined;
|
|
119581
119648
|
if (references) {
|
|
119582
|
-
|
|
119649
|
+
state.exportedModulesMap.set(sourceFile.resolvedPath, references);
|
|
119583
119650
|
}
|
|
119584
119651
|
else {
|
|
119585
|
-
|
|
119652
|
+
state.exportedModulesMap.deleteKey(sourceFile.resolvedPath);
|
|
119586
119653
|
}
|
|
119587
119654
|
}
|
|
119588
119655
|
}
|
|
119589
|
-
|
|
119656
|
+
(state.oldSignatures || (state.oldSignatures = new ts.Map())).set(sourceFile.resolvedPath, prevSignature || false);
|
|
119657
|
+
(state.hasCalledUpdateShapeSignature || (state.hasCalledUpdateShapeSignature = new ts.Set())).add(sourceFile.resolvedPath);
|
|
119658
|
+
info.signature = latestSignature;
|
|
119590
119659
|
return latestSignature !== prevSignature;
|
|
119591
119660
|
}
|
|
119592
119661
|
BuilderState.updateShapeSignature = updateShapeSignature;
|
|
119662
|
+
function computeSignature(text, computeHash) {
|
|
119663
|
+
return (computeHash || ts.generateDjb2Hash)(text);
|
|
119664
|
+
}
|
|
119665
|
+
BuilderState.computeSignature = computeSignature;
|
|
119593
119666
|
/**
|
|
119594
119667
|
* Coverts the declaration emit result into exported modules map
|
|
119595
119668
|
*/
|
|
119596
|
-
function updateExportedModules(sourceFile, exportedModulesFromDeclarationEmit
|
|
119669
|
+
function updateExportedModules(state, sourceFile, exportedModulesFromDeclarationEmit) {
|
|
119670
|
+
if (!state.exportedModulesMap)
|
|
119671
|
+
return;
|
|
119672
|
+
(state.oldExportedModulesMap || (state.oldExportedModulesMap = new ts.Map())).set(sourceFile.resolvedPath, state.exportedModulesMap.getValues(sourceFile.resolvedPath) || false);
|
|
119597
119673
|
if (!exportedModulesFromDeclarationEmit) {
|
|
119598
|
-
|
|
119674
|
+
state.exportedModulesMap.deleteKey(sourceFile.resolvedPath);
|
|
119599
119675
|
return;
|
|
119600
119676
|
}
|
|
119601
119677
|
var exportedModules;
|
|
119602
119678
|
exportedModulesFromDeclarationEmit.forEach(function (symbol) { return addExportedModule(getReferencedFilesFromImportedModuleSymbol(symbol)); });
|
|
119603
119679
|
if (exportedModules) {
|
|
119604
|
-
|
|
119680
|
+
state.exportedModulesMap.set(sourceFile.resolvedPath, exportedModules);
|
|
119605
119681
|
}
|
|
119606
119682
|
else {
|
|
119607
|
-
|
|
119683
|
+
state.exportedModulesMap.deleteKey(sourceFile.resolvedPath);
|
|
119608
119684
|
}
|
|
119609
119685
|
function addExportedModule(exportedModulePaths) {
|
|
119610
119686
|
if (exportedModulePaths === null || exportedModulePaths === void 0 ? void 0 : exportedModulePaths.length) {
|
|
@@ -119616,19 +119692,6 @@ var ts;
|
|
|
119616
119692
|
}
|
|
119617
119693
|
}
|
|
119618
119694
|
BuilderState.updateExportedModules = updateExportedModules;
|
|
119619
|
-
/**
|
|
119620
|
-
* Updates the exported modules from cache into state's exported modules map
|
|
119621
|
-
* This should be called whenever it is safe to commit the state of the builder
|
|
119622
|
-
*/
|
|
119623
|
-
function updateExportedFilesMapFromCache(state, exportedModulesMapCache) {
|
|
119624
|
-
var _a;
|
|
119625
|
-
if (exportedModulesMapCache) {
|
|
119626
|
-
ts.Debug.assert(!!state.exportedModulesMap);
|
|
119627
|
-
(_a = exportedModulesMapCache.deletedKeys()) === null || _a === void 0 ? void 0 : _a.forEach(function (path) { return state.exportedModulesMap.deleteKey(path); });
|
|
119628
|
-
exportedModulesMapCache.forEach(function (exportedModules, path) { return state.exportedModulesMap.set(path, exportedModules); });
|
|
119629
|
-
}
|
|
119630
|
-
}
|
|
119631
|
-
BuilderState.updateExportedFilesMapFromCache = updateExportedFilesMapFromCache;
|
|
119632
119695
|
/**
|
|
119633
119696
|
* Get all the dependencies of the sourceFile
|
|
119634
119697
|
*/
|
|
@@ -119749,7 +119812,7 @@ var ts;
|
|
|
119749
119812
|
/**
|
|
119750
119813
|
* When program emits modular code, gets the files affected by the sourceFile whose shape has changed
|
|
119751
119814
|
*/
|
|
119752
|
-
function getFilesAffectedByUpdatedShapeWhenModuleEmit(state, programOfThisState, sourceFileWithUpdatedShape,
|
|
119815
|
+
function getFilesAffectedByUpdatedShapeWhenModuleEmit(state, programOfThisState, sourceFileWithUpdatedShape, cancellationToken, computeHash) {
|
|
119753
119816
|
if (isFileAffectingGlobalScope(sourceFileWithUpdatedShape)) {
|
|
119754
119817
|
return getAllFilesExcludingDefaultLibraryFile(state, programOfThisState, sourceFileWithUpdatedShape);
|
|
119755
119818
|
}
|
|
@@ -119769,7 +119832,7 @@ var ts;
|
|
|
119769
119832
|
if (!seenFileNamesMap.has(currentPath)) {
|
|
119770
119833
|
var currentSourceFile = programOfThisState.getSourceFileByPath(currentPath);
|
|
119771
119834
|
seenFileNamesMap.set(currentPath, currentSourceFile);
|
|
119772
|
-
if (currentSourceFile && updateShapeSignature(state, programOfThisState, currentSourceFile,
|
|
119835
|
+
if (currentSourceFile && updateShapeSignature(state, programOfThisState, currentSourceFile, cancellationToken, computeHash)) {
|
|
119773
119836
|
queue.push.apply(queue, getReferencedByPaths(state, currentSourceFile.resolvedPath));
|
|
119774
119837
|
}
|
|
119775
119838
|
}
|
|
@@ -119795,32 +119858,33 @@ var ts;
|
|
|
119795
119858
|
* Create the state so that we can iterate on changedFiles/affected files
|
|
119796
119859
|
*/
|
|
119797
119860
|
function createBuilderProgramState(newProgram, getCanonicalFileName, oldState, disableUseFileVersionAsSignature) {
|
|
119861
|
+
var _a, _b;
|
|
119798
119862
|
var state = ts.BuilderState.create(newProgram, getCanonicalFileName, oldState, disableUseFileVersionAsSignature);
|
|
119799
119863
|
state.program = newProgram;
|
|
119800
119864
|
var compilerOptions = newProgram.getCompilerOptions();
|
|
119801
119865
|
state.compilerOptions = compilerOptions;
|
|
119866
|
+
var outFilePath = ts.outFile(compilerOptions);
|
|
119802
119867
|
// With --out or --outFile, any change affects all semantic diagnostics so no need to cache them
|
|
119803
|
-
if (!
|
|
119868
|
+
if (!outFilePath) {
|
|
119804
119869
|
state.semanticDiagnosticsPerFile = new ts.Map();
|
|
119805
119870
|
}
|
|
119871
|
+
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)) {
|
|
119872
|
+
state.outSignature = oldState === null || oldState === void 0 ? void 0 : oldState.outSignature;
|
|
119873
|
+
}
|
|
119806
119874
|
state.changedFilesSet = new ts.Set();
|
|
119875
|
+
state.dtsChangeTime = compilerOptions.composite ? oldState === null || oldState === void 0 ? void 0 : oldState.dtsChangeTime : undefined;
|
|
119807
119876
|
var useOldState = ts.BuilderState.canReuseOldState(state.referencedMap, oldState);
|
|
119808
119877
|
var oldCompilerOptions = useOldState ? oldState.compilerOptions : undefined;
|
|
119809
119878
|
var canCopySemanticDiagnostics = useOldState && oldState.semanticDiagnosticsPerFile && !!state.semanticDiagnosticsPerFile &&
|
|
119810
119879
|
!ts.compilerOptionsAffectSemanticDiagnostics(compilerOptions, oldCompilerOptions);
|
|
119880
|
+
var canCopyEmitSignatures = compilerOptions.composite &&
|
|
119881
|
+
(oldState === null || oldState === void 0 ? void 0 : oldState.emitSignatures) &&
|
|
119882
|
+
!outFilePath &&
|
|
119883
|
+
!ts.compilerOptionsAffectDeclarationPath(compilerOptions, oldCompilerOptions);
|
|
119811
119884
|
if (useOldState) {
|
|
119812
|
-
// Verify the sanity of old state
|
|
119813
|
-
if (!oldState.currentChangedFilePath) {
|
|
119814
|
-
var affectedSignatures = oldState.currentAffectedFilesSignatures;
|
|
119815
|
-
ts.Debug.assert(!oldState.affectedFiles && (!affectedSignatures || !affectedSignatures.size), "Cannot reuse if only few affected files of currentChangedFile were iterated");
|
|
119816
|
-
}
|
|
119817
|
-
var changedFilesSet = oldState.changedFilesSet;
|
|
119818
|
-
if (canCopySemanticDiagnostics) {
|
|
119819
|
-
ts.Debug.assert(!changedFilesSet || !ts.forEachKey(changedFilesSet, function (path) { return oldState.semanticDiagnosticsPerFile.has(path); }), "Semantic diagnostics shouldnt be available for changed files");
|
|
119820
|
-
}
|
|
119821
119885
|
// Copy old state's changed files set
|
|
119822
|
-
changedFilesSet === null ||
|
|
119823
|
-
if (!
|
|
119886
|
+
(_a = oldState.changedFilesSet) === null || _a === void 0 ? void 0 : _a.forEach(function (value) { return state.changedFilesSet.add(value); });
|
|
119887
|
+
if (!outFilePath && oldState.affectedFilesPendingEmit) {
|
|
119824
119888
|
state.affectedFilesPendingEmit = oldState.affectedFilesPendingEmit.slice();
|
|
119825
119889
|
state.affectedFilesPendingEmitKind = oldState.affectedFilesPendingEmitKind && new ts.Map(oldState.affectedFilesPendingEmitKind);
|
|
119826
119890
|
state.affectedFilesPendingEmitIndex = oldState.affectedFilesPendingEmitIndex;
|
|
@@ -119841,6 +119905,8 @@ var ts;
|
|
|
119841
119905
|
!(oldInfo = oldState.fileInfos.get(sourceFilePath)) ||
|
|
119842
119906
|
// versions dont match
|
|
119843
119907
|
oldInfo.version !== info.version ||
|
|
119908
|
+
// Implied formats dont match
|
|
119909
|
+
oldInfo.impliedFormat !== info.impliedFormat ||
|
|
119844
119910
|
// Referenced files changed
|
|
119845
119911
|
!hasSameKeys(newReferences = referencedMap && referencedMap.getValues(sourceFilePath), oldReferencedMap && oldReferencedMap.getValues(sourceFilePath)) ||
|
|
119846
119912
|
// Referenced file was deleted in the new program
|
|
@@ -119864,27 +119930,25 @@ var ts;
|
|
|
119864
119930
|
state.semanticDiagnosticsFromOldState.add(sourceFilePath);
|
|
119865
119931
|
}
|
|
119866
119932
|
}
|
|
119933
|
+
if (canCopyEmitSignatures) {
|
|
119934
|
+
var oldEmitSignature = oldState.emitSignatures.get(sourceFilePath);
|
|
119935
|
+
if (oldEmitSignature)
|
|
119936
|
+
(state.emitSignatures || (state.emitSignatures = new ts.Map())).set(sourceFilePath, oldEmitSignature);
|
|
119937
|
+
}
|
|
119867
119938
|
});
|
|
119868
119939
|
// If the global file is removed, add all files as changed
|
|
119869
119940
|
if (useOldState && ts.forEachEntry(oldState.fileInfos, function (info, sourceFilePath) { return info.affectsGlobalScope && !state.fileInfos.has(sourceFilePath); })) {
|
|
119870
119941
|
ts.BuilderState.getAllFilesExcludingDefaultLibraryFile(state, newProgram, /*firstSourceFile*/ undefined)
|
|
119871
119942
|
.forEach(function (file) { return state.changedFilesSet.add(file.resolvedPath); });
|
|
119872
119943
|
}
|
|
119873
|
-
else if (oldCompilerOptions && !
|
|
119944
|
+
else if (oldCompilerOptions && !outFilePath && ts.compilerOptionsAffectEmit(compilerOptions, oldCompilerOptions)) {
|
|
119874
119945
|
// Add all files to affectedFilesPendingEmit since emit changed
|
|
119875
119946
|
newProgram.getSourceFiles().forEach(function (f) { return addToAffectedFilesPendingEmit(state, f.resolvedPath, 1 /* Full */); });
|
|
119876
119947
|
ts.Debug.assert(!state.seenAffectedFiles || !state.seenAffectedFiles.size);
|
|
119877
119948
|
state.seenAffectedFiles = state.seenAffectedFiles || new ts.Set();
|
|
119878
119949
|
}
|
|
119879
|
-
|
|
119880
|
-
|
|
119881
|
-
ts.forEachEntry(oldState.fileInfos, function (info, sourceFilePath) {
|
|
119882
|
-
if (state.fileInfos.has(sourceFilePath) && state.fileInfos.get(sourceFilePath).impliedFormat !== info.impliedFormat) {
|
|
119883
|
-
state.changedFilesSet.add(sourceFilePath);
|
|
119884
|
-
}
|
|
119885
|
-
});
|
|
119886
|
-
}
|
|
119887
|
-
state.buildInfoEmitPending = !!state.changedFilesSet.size;
|
|
119950
|
+
// Since old states change files set is copied, any additional change means we would need to emit build info
|
|
119951
|
+
state.buildInfoEmitPending = !useOldState || state.changedFilesSet.size !== (((_b = oldState.changedFilesSet) === null || _b === void 0 ? void 0 : _b.size) || 0);
|
|
119888
119952
|
return state;
|
|
119889
119953
|
}
|
|
119890
119954
|
function convertToDiagnostics(diagnostics, newProgram, getCanonicalFileName) {
|
|
@@ -119920,30 +119984,35 @@ var ts;
|
|
|
119920
119984
|
ts.BuilderState.releaseCache(state);
|
|
119921
119985
|
state.program = undefined;
|
|
119922
119986
|
}
|
|
119923
|
-
|
|
119924
|
-
|
|
119925
|
-
|
|
119926
|
-
|
|
119927
|
-
|
|
119928
|
-
|
|
119929
|
-
|
|
119930
|
-
|
|
119931
|
-
|
|
119932
|
-
|
|
119933
|
-
|
|
119934
|
-
|
|
119935
|
-
|
|
119936
|
-
|
|
119937
|
-
|
|
119938
|
-
|
|
119939
|
-
|
|
119940
|
-
|
|
119941
|
-
|
|
119942
|
-
|
|
119943
|
-
|
|
119944
|
-
|
|
119945
|
-
|
|
119946
|
-
|
|
119987
|
+
function backupEmitBuilderProgramState(state) {
|
|
119988
|
+
var outFilePath = ts.outFile(state.compilerOptions);
|
|
119989
|
+
// Only in --out changeFileSet is kept around till emit
|
|
119990
|
+
ts.Debug.assert(!state.changedFilesSet.size || outFilePath);
|
|
119991
|
+
return {
|
|
119992
|
+
affectedFilesPendingEmit: state.affectedFilesPendingEmit && state.affectedFilesPendingEmit.slice(),
|
|
119993
|
+
affectedFilesPendingEmitKind: state.affectedFilesPendingEmitKind && new ts.Map(state.affectedFilesPendingEmitKind),
|
|
119994
|
+
affectedFilesPendingEmitIndex: state.affectedFilesPendingEmitIndex,
|
|
119995
|
+
seenEmittedFiles: state.seenEmittedFiles && new ts.Map(state.seenEmittedFiles),
|
|
119996
|
+
programEmitComplete: state.programEmitComplete,
|
|
119997
|
+
emitSignatures: state.emitSignatures && new ts.Map(state.emitSignatures),
|
|
119998
|
+
outSignature: state.outSignature,
|
|
119999
|
+
dtsChangeTime: state.dtsChangeTime,
|
|
120000
|
+
hasChangedEmitSignature: state.hasChangedEmitSignature,
|
|
120001
|
+
changedFilesSet: outFilePath ? new ts.Set(state.changedFilesSet) : undefined,
|
|
120002
|
+
};
|
|
120003
|
+
}
|
|
120004
|
+
function restoreEmitBuilderProgramState(state, backupEmitState) {
|
|
120005
|
+
state.affectedFilesPendingEmit = backupEmitState.affectedFilesPendingEmit;
|
|
120006
|
+
state.affectedFilesPendingEmitKind = backupEmitState.affectedFilesPendingEmitKind;
|
|
120007
|
+
state.affectedFilesPendingEmitIndex = backupEmitState.affectedFilesPendingEmitIndex;
|
|
120008
|
+
state.seenEmittedFiles = backupEmitState.seenEmittedFiles;
|
|
120009
|
+
state.programEmitComplete = backupEmitState.programEmitComplete;
|
|
120010
|
+
state.emitSignatures = backupEmitState.emitSignatures;
|
|
120011
|
+
state.outSignature = backupEmitState.outSignature;
|
|
120012
|
+
state.dtsChangeTime = backupEmitState.dtsChangeTime;
|
|
120013
|
+
state.hasChangedEmitSignature = backupEmitState.hasChangedEmitSignature;
|
|
120014
|
+
if (backupEmitState.changedFilesSet)
|
|
120015
|
+
state.changedFilesSet = backupEmitState.changedFilesSet;
|
|
119947
120016
|
}
|
|
119948
120017
|
/**
|
|
119949
120018
|
* Verifies that source file is ok to be used in calls that arent handled by next
|
|
@@ -119958,7 +120027,7 @@ var ts;
|
|
|
119958
120027
|
* eg. if during diagnostics check cancellation token ends up cancelling the request, the affected file should be retained
|
|
119959
120028
|
*/
|
|
119960
120029
|
function getNextAffectedFile(state, cancellationToken, computeHash, host) {
|
|
119961
|
-
var _a;
|
|
120030
|
+
var _a, _b;
|
|
119962
120031
|
while (true) {
|
|
119963
120032
|
var affectedFiles = state.affectedFiles;
|
|
119964
120033
|
if (affectedFiles) {
|
|
@@ -119978,10 +120047,8 @@ var ts;
|
|
|
119978
120047
|
state.changedFilesSet.delete(state.currentChangedFilePath);
|
|
119979
120048
|
state.currentChangedFilePath = undefined;
|
|
119980
120049
|
// Commit the changes in file signature
|
|
119981
|
-
|
|
119982
|
-
state.
|
|
119983
|
-
ts.BuilderState.updateExportedFilesMapFromCache(state, state.currentAffectedFilesExportedModulesMap);
|
|
119984
|
-
(_a = state.currentAffectedFilesExportedModulesMap) === null || _a === void 0 ? void 0 : _a.clear();
|
|
120050
|
+
(_a = state.oldSignatures) === null || _a === void 0 ? void 0 : _a.clear();
|
|
120051
|
+
(_b = state.oldExportedModulesMap) === null || _b === void 0 ? void 0 : _b.clear();
|
|
119985
120052
|
state.affectedFiles = undefined;
|
|
119986
120053
|
}
|
|
119987
120054
|
// Get next changed file
|
|
@@ -119999,12 +120066,7 @@ var ts;
|
|
|
119999
120066
|
return program;
|
|
120000
120067
|
}
|
|
120001
120068
|
// Get next batch of affected files
|
|
120002
|
-
|
|
120003
|
-
state.currentAffectedFilesSignatures = new ts.Map();
|
|
120004
|
-
if (state.exportedModulesMap) {
|
|
120005
|
-
state.currentAffectedFilesExportedModulesMap || (state.currentAffectedFilesExportedModulesMap = ts.BuilderState.createManyToManyPathMap());
|
|
120006
|
-
}
|
|
120007
|
-
state.affectedFiles = ts.BuilderState.getFilesAffectedBy(state, program, nextKey.value, cancellationToken, computeHash, state.currentAffectedFilesSignatures, state.currentAffectedFilesExportedModulesMap);
|
|
120069
|
+
state.affectedFiles = ts.BuilderState.getFilesAffectedByWithOldState(state, program, nextKey.value, cancellationToken, computeHash);
|
|
120008
120070
|
state.currentChangedFilePath = nextKey.value;
|
|
120009
120071
|
state.affectedFilesIndex = 0;
|
|
120010
120072
|
if (!state.seenAffectedFiles)
|
|
@@ -120056,7 +120118,6 @@ var ts;
|
|
|
120056
120118
|
* This is because even though js emit doesnt change, dts emit / type used can change resulting in need for dts emit and js change
|
|
120057
120119
|
*/
|
|
120058
120120
|
function handleDtsMayChangeOfAffectedFile(state, affectedFile, cancellationToken, computeHash, host) {
|
|
120059
|
-
var _a;
|
|
120060
120121
|
removeSemanticDiagnosticsOf(state, affectedFile.resolvedPath);
|
|
120061
120122
|
// If affected files is everything except default library, then nothing more to do
|
|
120062
120123
|
if (state.allFilesExcludingDefaultLibraryFile === state.affectedFiles) {
|
|
@@ -120064,10 +120125,9 @@ var ts;
|
|
|
120064
120125
|
// When a change affects the global scope, all files are considered to be affected without updating their signature
|
|
120065
120126
|
// That means when affected file is handled, its signature can be out of date
|
|
120066
120127
|
// To avoid this, ensure that we update the signature for any affected file in this scenario.
|
|
120067
|
-
ts.BuilderState.updateShapeSignature(state, ts.Debug.checkDefined(state.program), affectedFile,
|
|
120128
|
+
ts.BuilderState.updateShapeSignature(state, ts.Debug.checkDefined(state.program), affectedFile, cancellationToken, computeHash);
|
|
120068
120129
|
return;
|
|
120069
120130
|
}
|
|
120070
|
-
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);
|
|
120071
120131
|
if (state.compilerOptions.assumeChangesOnlyAffectDirectDependencies)
|
|
120072
120132
|
return;
|
|
120073
120133
|
handleDtsMayChangeOfReferencingExportOfAffectedFile(state, affectedFile, cancellationToken, computeHash, host);
|
|
@@ -120087,7 +120147,7 @@ var ts;
|
|
|
120087
120147
|
// This ensures that we dont later during incremental builds considering wrong signature.
|
|
120088
120148
|
// Eg where this also is needed to ensure that .tsbuildinfo generated by incremental build should be same as if it was first fresh build
|
|
120089
120149
|
// But we avoid expensive full shape computation, as using file version as shape is enough for correctness.
|
|
120090
|
-
ts.BuilderState.updateShapeSignature(state, program, sourceFile,
|
|
120150
|
+
ts.BuilderState.updateShapeSignature(state, program, sourceFile, cancellationToken, computeHash, !host.disableUseFileVersionAsSignature);
|
|
120091
120151
|
// If not dts emit, nothing more to do
|
|
120092
120152
|
if (ts.getEmitDeclarations(state.compilerOptions)) {
|
|
120093
120153
|
addToAffectedFilesPendingEmit(state, path, 0 /* DtsOnly */);
|
|
@@ -120108,27 +120168,10 @@ var ts;
|
|
|
120108
120168
|
return !state.semanticDiagnosticsFromOldState.size;
|
|
120109
120169
|
}
|
|
120110
120170
|
function isChangedSignature(state, path) {
|
|
120111
|
-
var
|
|
120112
|
-
var
|
|
120171
|
+
var oldSignature = ts.Debug.checkDefined(state.oldSignatures).get(path) || undefined;
|
|
120172
|
+
var newSignature = ts.Debug.checkDefined(state.fileInfos.get(path)).signature;
|
|
120113
120173
|
return newSignature !== oldSignature;
|
|
120114
120174
|
}
|
|
120115
|
-
function forEachKeyOfExportedModulesMap(state, filePath, fn) {
|
|
120116
|
-
// Go through exported modules from cache first
|
|
120117
|
-
var keys = state.currentAffectedFilesExportedModulesMap.getKeys(filePath);
|
|
120118
|
-
var result = keys && ts.forEachKey(keys, fn);
|
|
120119
|
-
if (result)
|
|
120120
|
-
return result;
|
|
120121
|
-
// If exported from path is not from cache and exported modules has path, all files referencing file exported from are affected
|
|
120122
|
-
keys = state.exportedModulesMap.getKeys(filePath);
|
|
120123
|
-
return keys && ts.forEachKey(keys, function (exportedFromPath) {
|
|
120124
|
-
var _a;
|
|
120125
|
-
// If the cache had an updated value, skip
|
|
120126
|
-
return !state.currentAffectedFilesExportedModulesMap.hasKey(exportedFromPath) &&
|
|
120127
|
-
!((_a = state.currentAffectedFilesExportedModulesMap.deletedKeys()) === null || _a === void 0 ? void 0 : _a.has(exportedFromPath)) ?
|
|
120128
|
-
fn(exportedFromPath) :
|
|
120129
|
-
undefined;
|
|
120130
|
-
});
|
|
120131
|
-
}
|
|
120132
120175
|
function handleDtsMayChangeOfGlobalScope(state, filePath, cancellationToken, computeHash, host) {
|
|
120133
120176
|
var _a;
|
|
120134
120177
|
if (!((_a = state.fileInfos.get(filePath)) === null || _a === void 0 ? void 0 : _a.affectsGlobalScope))
|
|
@@ -120143,6 +120186,7 @@ var ts;
|
|
|
120143
120186
|
* Iterate on referencing modules that export entities from affected file and delete diagnostics and add pending emit
|
|
120144
120187
|
*/
|
|
120145
120188
|
function handleDtsMayChangeOfReferencingExportOfAffectedFile(state, affectedFile, cancellationToken, computeHash, host) {
|
|
120189
|
+
var _a;
|
|
120146
120190
|
// If there was change in signature (dts output) for the changed file,
|
|
120147
120191
|
// then only we need to handle pending file emit
|
|
120148
120192
|
if (!state.exportedModulesMap || !state.changedFilesSet.has(affectedFile.resolvedPath))
|
|
@@ -120169,11 +120213,10 @@ var ts;
|
|
|
120169
120213
|
}
|
|
120170
120214
|
}
|
|
120171
120215
|
}
|
|
120172
|
-
ts.Debug.assert(!!state.currentAffectedFilesExportedModulesMap);
|
|
120173
120216
|
var seenFileAndExportsOfFile = new ts.Set();
|
|
120174
120217
|
// Go through exported modules from cache first
|
|
120175
120218
|
// If exported modules has path, all files referencing file exported from are affected
|
|
120176
|
-
|
|
120219
|
+
(_a = state.exportedModulesMap.getKeys(affectedFile.resolvedPath)) === null || _a === void 0 ? void 0 : _a.forEach(function (exportedFromPath) {
|
|
120177
120220
|
if (handleDtsMayChangeOfGlobalScope(state, exportedFromPath, cancellationToken, computeHash, host))
|
|
120178
120221
|
return true;
|
|
120179
120222
|
var references = state.referencedMap.getKeys(exportedFromPath);
|
|
@@ -120187,19 +120230,18 @@ var ts;
|
|
|
120187
120230
|
* return true when all work is done and we can exit handling dts emit and semantic diagnostics
|
|
120188
120231
|
*/
|
|
120189
120232
|
function handleDtsMayChangeOfFileAndExportsOfFile(state, filePath, seenFileAndExportsOfFile, cancellationToken, computeHash, host) {
|
|
120190
|
-
var _a;
|
|
120233
|
+
var _a, _b;
|
|
120191
120234
|
if (!ts.tryAddToSet(seenFileAndExportsOfFile, filePath))
|
|
120192
120235
|
return undefined;
|
|
120193
120236
|
if (handleDtsMayChangeOfGlobalScope(state, filePath, cancellationToken, computeHash, host))
|
|
120194
120237
|
return true;
|
|
120195
120238
|
handleDtsMayChangeOf(state, filePath, cancellationToken, computeHash, host);
|
|
120196
|
-
ts.Debug.assert(!!state.currentAffectedFilesExportedModulesMap);
|
|
120197
120239
|
// If exported modules has path, all files referencing file exported from are affected
|
|
120198
|
-
|
|
120240
|
+
(_a = state.exportedModulesMap.getKeys(filePath)) === null || _a === void 0 ? void 0 : _a.forEach(function (exportedFromPath) {
|
|
120199
120241
|
return handleDtsMayChangeOfFileAndExportsOfFile(state, exportedFromPath, seenFileAndExportsOfFile, cancellationToken, computeHash, host);
|
|
120200
120242
|
});
|
|
120201
120243
|
// Remove diagnostics of files that import this file (without going to exports of referencing files)
|
|
120202
|
-
(
|
|
120244
|
+
(_b = state.referencedMap.getKeys(filePath)) === null || _b === void 0 ? void 0 : _b.forEach(function (referencingFilePath) {
|
|
120203
120245
|
return !seenFileAndExportsOfFile.has(referencingFilePath) && // Not already removed diagnostic file
|
|
120204
120246
|
handleDtsMayChangeOf(// Dont add to seen since this is not yet done with the export removal
|
|
120205
120247
|
state, referencingFilePath, cancellationToken, computeHash, host);
|
|
@@ -120220,12 +120262,13 @@ var ts;
|
|
|
120220
120262
|
}
|
|
120221
120263
|
else {
|
|
120222
120264
|
state.seenAffectedFiles.add(affected.resolvedPath);
|
|
120265
|
+
// Change in changeSet/affectedFilesPendingEmit, buildInfo needs to be emitted
|
|
120266
|
+
state.buildInfoEmitPending = true;
|
|
120223
120267
|
if (emitKind !== undefined) {
|
|
120224
120268
|
(state.seenEmittedFiles || (state.seenEmittedFiles = new ts.Map())).set(affected.resolvedPath, emitKind);
|
|
120225
120269
|
}
|
|
120226
120270
|
if (isPendingEmit) {
|
|
120227
120271
|
state.affectedFilesPendingEmitIndex++;
|
|
120228
|
-
state.buildInfoEmitPending = true;
|
|
120229
120272
|
}
|
|
120230
120273
|
else {
|
|
120231
120274
|
state.affectedFilesIndex++;
|
|
@@ -120276,22 +120319,43 @@ var ts;
|
|
|
120276
120319
|
/**
|
|
120277
120320
|
* Gets the program information to be emitted in buildInfo so that we can use it to create new program
|
|
120278
120321
|
*/
|
|
120279
|
-
function getProgramBuildInfo(state, getCanonicalFileName) {
|
|
120280
|
-
|
|
120281
|
-
|
|
120322
|
+
function getProgramBuildInfo(state, getCanonicalFileName, host) {
|
|
120323
|
+
var outFilePath = ts.outFile(state.compilerOptions);
|
|
120324
|
+
if (outFilePath && !state.compilerOptions.composite)
|
|
120325
|
+
return;
|
|
120282
120326
|
var currentDirectory = ts.Debug.checkDefined(state.program).getCurrentDirectory();
|
|
120283
120327
|
var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(ts.getTsBuildInfoEmitOutputFilePath(state.compilerOptions), currentDirectory));
|
|
120328
|
+
state.dtsChangeTime = state.hasChangedEmitSignature ? ts.getCurrentTime(host).getTime() : state.dtsChangeTime;
|
|
120329
|
+
if (outFilePath) {
|
|
120330
|
+
var result_15 = {
|
|
120331
|
+
options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions, "affectsBundleEmitBuildInfo"),
|
|
120332
|
+
outSignature: state.outSignature,
|
|
120333
|
+
dtsChangeTime: state.dtsChangeTime,
|
|
120334
|
+
};
|
|
120335
|
+
return result_15;
|
|
120336
|
+
}
|
|
120284
120337
|
var fileNames = [];
|
|
120285
120338
|
var fileNameToFileId = new ts.Map();
|
|
120286
120339
|
var fileIdsList;
|
|
120287
120340
|
var fileNamesToFileIdListId;
|
|
120341
|
+
var emitSignatures;
|
|
120288
120342
|
var fileInfos = ts.arrayFrom(state.fileInfos.entries(), function (_a) {
|
|
120343
|
+
var _b, _c;
|
|
120289
120344
|
var key = _a[0], value = _a[1];
|
|
120290
120345
|
// Ensure fileId
|
|
120291
120346
|
var fileId = toFileId(key);
|
|
120292
120347
|
ts.Debug.assert(fileNames[fileId - 1] === relativeToBuildInfo(key));
|
|
120293
|
-
var
|
|
120294
|
-
var actualSignature =
|
|
120348
|
+
var oldSignature = (_b = state.oldSignatures) === null || _b === void 0 ? void 0 : _b.get(key);
|
|
120349
|
+
var actualSignature = oldSignature !== undefined ? oldSignature || undefined : value.signature;
|
|
120350
|
+
if (state.compilerOptions.composite) {
|
|
120351
|
+
var file = state.program.getSourceFileByPath(key);
|
|
120352
|
+
if (!ts.isJsonSourceFile(file) && ts.sourceFileMayBeEmitted(file, state.program)) {
|
|
120353
|
+
var emitSignature = (_c = state.emitSignatures) === null || _c === void 0 ? void 0 : _c.get(key);
|
|
120354
|
+
if (emitSignature !== actualSignature) {
|
|
120355
|
+
(emitSignatures || (emitSignatures = [])).push(emitSignature === undefined ? fileId : [fileId, emitSignature]);
|
|
120356
|
+
}
|
|
120357
|
+
}
|
|
120358
|
+
}
|
|
120295
120359
|
return value.version === actualSignature ?
|
|
120296
120360
|
value.affectsGlobalScope || value.impliedFormat ?
|
|
120297
120361
|
// If file version is same as signature, dont serialize signature
|
|
@@ -120299,11 +120363,11 @@ var ts;
|
|
|
120299
120363
|
// If file info only contains version and signature and both are same we can just write string
|
|
120300
120364
|
value.version :
|
|
120301
120365
|
actualSignature !== undefined ? // If signature is not same as version, encode signature in the fileInfo
|
|
120302
|
-
|
|
120366
|
+
oldSignature === undefined ?
|
|
120303
120367
|
// If we havent computed signature, use fileInfo as is
|
|
120304
120368
|
value :
|
|
120305
120369
|
// Serialize fileInfo with new updated signature
|
|
120306
|
-
{ version: value.version, signature:
|
|
120370
|
+
{ version: value.version, signature: actualSignature, affectsGlobalScope: value.affectsGlobalScope, impliedFormat: value.impliedFormat } :
|
|
120307
120371
|
// Signature of the FileInfo is undefined, serialize it as false
|
|
120308
120372
|
{ version: value.version, signature: false, affectsGlobalScope: value.affectsGlobalScope, impliedFormat: value.impliedFormat };
|
|
120309
120373
|
});
|
|
@@ -120318,17 +120382,13 @@ var ts;
|
|
|
120318
120382
|
if (state.exportedModulesMap) {
|
|
120319
120383
|
exportedModulesMap = ts.mapDefined(ts.arrayFrom(state.exportedModulesMap.keys()).sort(ts.compareStringsCaseSensitive), function (key) {
|
|
120320
120384
|
var _a;
|
|
120321
|
-
|
|
120322
|
-
if ((_a = state.currentAffectedFilesExportedModulesMap.deletedKeys()) === null || _a === void 0 ? void 0 : _a.has(key)) {
|
|
120323
|
-
return undefined;
|
|
120324
|
-
}
|
|
120325
|
-
var newValue = state.currentAffectedFilesExportedModulesMap.getValues(key);
|
|
120326
|
-
if (newValue) {
|
|
120327
|
-
return [toFileId(key), toFileIdListId(newValue)];
|
|
120328
|
-
}
|
|
120329
|
-
}
|
|
120385
|
+
var oldValue = (_a = state.oldExportedModulesMap) === null || _a === void 0 ? void 0 : _a.get(key);
|
|
120330
120386
|
// Not in temporary cache, use existing value
|
|
120331
|
-
|
|
120387
|
+
if (oldValue === undefined)
|
|
120388
|
+
return [toFileId(key), toFileIdListId(state.exportedModulesMap.getValues(key))];
|
|
120389
|
+
if (oldValue)
|
|
120390
|
+
return [toFileId(key), toFileIdListId(oldValue)];
|
|
120391
|
+
return undefined;
|
|
120332
120392
|
});
|
|
120333
120393
|
}
|
|
120334
120394
|
var semanticDiagnosticsPerFile;
|
|
@@ -120339,9 +120399,7 @@ var ts;
|
|
|
120339
120399
|
(semanticDiagnosticsPerFile || (semanticDiagnosticsPerFile = [])).push(value.length ?
|
|
120340
120400
|
[
|
|
120341
120401
|
toFileId(key),
|
|
120342
|
-
|
|
120343
|
-
value :
|
|
120344
|
-
convertToReusableDiagnostics(value, relativeToBuildInfo)
|
|
120402
|
+
convertToReusableDiagnostics(value, relativeToBuildInfo)
|
|
120345
120403
|
] :
|
|
120346
120404
|
toFileId(key));
|
|
120347
120405
|
}
|
|
@@ -120356,16 +120414,27 @@ var ts;
|
|
|
120356
120414
|
}
|
|
120357
120415
|
}
|
|
120358
120416
|
}
|
|
120359
|
-
|
|
120417
|
+
var changeFileSet;
|
|
120418
|
+
if (state.changedFilesSet.size) {
|
|
120419
|
+
for (var _d = 0, _e = ts.arrayFrom(state.changedFilesSet.keys()).sort(ts.compareStringsCaseSensitive); _d < _e.length; _d++) {
|
|
120420
|
+
var path = _e[_d];
|
|
120421
|
+
(changeFileSet || (changeFileSet = [])).push(toFileId(path));
|
|
120422
|
+
}
|
|
120423
|
+
}
|
|
120424
|
+
var result = {
|
|
120360
120425
|
fileNames: fileNames,
|
|
120361
120426
|
fileInfos: fileInfos,
|
|
120362
|
-
options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions,
|
|
120427
|
+
options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions, "affectsMultiFileEmitBuildInfo"),
|
|
120363
120428
|
fileIdsList: fileIdsList,
|
|
120364
120429
|
referencedMap: referencedMap,
|
|
120365
120430
|
exportedModulesMap: exportedModulesMap,
|
|
120366
120431
|
semanticDiagnosticsPerFile: semanticDiagnosticsPerFile,
|
|
120367
120432
|
affectedFilesPendingEmit: affectedFilesPendingEmit,
|
|
120433
|
+
changeFileSet: changeFileSet,
|
|
120434
|
+
emitSignatures: emitSignatures,
|
|
120435
|
+
dtsChangeTime: state.dtsChangeTime,
|
|
120368
120436
|
};
|
|
120437
|
+
return result;
|
|
120369
120438
|
function relativeToBuildInfoEnsuringAbsolutePath(path) {
|
|
120370
120439
|
return relativeToBuildInfo(ts.getNormalizedAbsolutePath(path, currentDirectory));
|
|
120371
120440
|
}
|
|
@@ -120390,24 +120459,18 @@ var ts;
|
|
|
120390
120459
|
}
|
|
120391
120460
|
return fileIdListId;
|
|
120392
120461
|
}
|
|
120393
|
-
|
|
120394
|
-
|
|
120395
|
-
|
|
120396
|
-
|
|
120397
|
-
|
|
120398
|
-
|
|
120399
|
-
|
|
120400
|
-
|
|
120401
|
-
|
|
120402
|
-
// We need to store `strict`, even though it won't be examined directly, so that the
|
|
120403
|
-
// flags it controls (e.g. `strictNullChecks`) will be retrieved correctly from the buildinfo
|
|
120404
|
-
optionKey === "strict" ||
|
|
120405
|
-
// We need to store these to determine whether `lib` files need to be rechecked.
|
|
120406
|
-
optionKey === "skiplibcheck" || optionKey === "skipdefaultlibcheck") {
|
|
120407
|
-
(result || (result = {}))[name] = convertToReusableCompilerOptionValue(optionInfo, options[name], relativeToBuildInfo);
|
|
120462
|
+
function convertToProgramBuildInfoCompilerOptions(options, optionKey) {
|
|
120463
|
+
var result;
|
|
120464
|
+
var optionsNameMap = ts.getOptionsNameMap().optionsNameMap;
|
|
120465
|
+
for (var _i = 0, _a = ts.getOwnKeys(options).sort(ts.compareStringsCaseSensitive); _i < _a.length; _i++) {
|
|
120466
|
+
var name = _a[_i];
|
|
120467
|
+
var optionInfo = optionsNameMap.get(name.toLowerCase());
|
|
120468
|
+
if (optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo[optionKey]) {
|
|
120469
|
+
(result || (result = {}))[name] = convertToReusableCompilerOptionValue(optionInfo, options[name], relativeToBuildInfoEnsuringAbsolutePath);
|
|
120470
|
+
}
|
|
120408
120471
|
}
|
|
120472
|
+
return result;
|
|
120409
120473
|
}
|
|
120410
|
-
return result;
|
|
120411
120474
|
}
|
|
120412
120475
|
function convertToReusableCompilerOptionValue(option, value, relativeToBuildInfo) {
|
|
120413
120476
|
if (option) {
|
|
@@ -120481,6 +120544,10 @@ var ts;
|
|
|
120481
120544
|
return { host: host, newProgram: newProgram, oldProgram: oldProgram, configFileParsingDiagnostics: configFileParsingDiagnostics || ts.emptyArray };
|
|
120482
120545
|
}
|
|
120483
120546
|
ts.getBuilderCreationParameters = getBuilderCreationParameters;
|
|
120547
|
+
function computeSignature(text, data, computeHash) {
|
|
120548
|
+
return ts.BuilderState.computeSignature((data === null || data === void 0 ? void 0 : data.sourceMapUrlPos) !== undefined ? text.substring(0, data.sourceMapUrlPos) : text, computeHash);
|
|
120549
|
+
}
|
|
120550
|
+
ts.computeSignature = computeSignature;
|
|
120484
120551
|
function createBuilderProgram(kind, _a) {
|
|
120485
120552
|
var newProgram = _a.newProgram, host = _a.host, oldProgram = _a.oldProgram, configFileParsingDiagnostics = _a.configFileParsingDiagnostics;
|
|
120486
120553
|
// Return same program if underlying program doesnt change
|
|
@@ -120499,8 +120566,8 @@ var ts;
|
|
|
120499
120566
|
*/
|
|
120500
120567
|
var computeHash = ts.maybeBind(host, host.createHash);
|
|
120501
120568
|
var state = createBuilderProgramState(newProgram, getCanonicalFileName, oldState, host.disableUseFileVersionAsSignature);
|
|
120502
|
-
var
|
|
120503
|
-
newProgram.getProgramBuildInfo = function () { return getProgramBuildInfo(state, getCanonicalFileName); };
|
|
120569
|
+
var backupEmitState;
|
|
120570
|
+
newProgram.getProgramBuildInfo = function () { return getProgramBuildInfo(state, getCanonicalFileName, host); };
|
|
120504
120571
|
// To ensure that we arent storing any references to old program or new program without state
|
|
120505
120572
|
newProgram = undefined; // TODO: GH#18217
|
|
120506
120573
|
oldProgram = undefined;
|
|
@@ -120508,20 +120575,20 @@ var ts;
|
|
|
120508
120575
|
var getState = function () { return state; };
|
|
120509
120576
|
var builderProgram = createRedirectedBuilderProgram(getState, configFileParsingDiagnostics);
|
|
120510
120577
|
builderProgram.getState = getState;
|
|
120511
|
-
builderProgram.
|
|
120512
|
-
ts.Debug.assert(
|
|
120513
|
-
|
|
120578
|
+
builderProgram.backupEmitState = function () {
|
|
120579
|
+
ts.Debug.assert(backupEmitState === undefined);
|
|
120580
|
+
backupEmitState = backupEmitBuilderProgramState(state);
|
|
120514
120581
|
};
|
|
120515
|
-
builderProgram.
|
|
120516
|
-
state
|
|
120517
|
-
|
|
120582
|
+
builderProgram.restoreEmitState = function () {
|
|
120583
|
+
restoreEmitBuilderProgramState(state, ts.Debug.checkDefined(backupEmitState));
|
|
120584
|
+
backupEmitState = undefined;
|
|
120518
120585
|
};
|
|
120519
120586
|
builderProgram.getAllDependencies = function (sourceFile) { return ts.BuilderState.getAllDependencies(state, ts.Debug.checkDefined(state.program), sourceFile); };
|
|
120520
120587
|
builderProgram.getSemanticDiagnostics = getSemanticDiagnostics;
|
|
120521
120588
|
builderProgram.emit = emit;
|
|
120522
120589
|
builderProgram.releaseProgram = function () {
|
|
120523
120590
|
releaseCache(state);
|
|
120524
|
-
|
|
120591
|
+
backupEmitState = undefined;
|
|
120525
120592
|
};
|
|
120526
120593
|
if (kind === BuilderProgramKind.SemanticDiagnosticsBuilderProgram) {
|
|
120527
120594
|
builderProgram.getSemanticDiagnosticsOfNextAffectedFile = getSemanticDiagnosticsOfNextAffectedFile;
|
|
@@ -120580,35 +120647,59 @@ var ts;
|
|
|
120580
120647
|
return toAffectedFileEmitResult(state,
|
|
120581
120648
|
// When whole program is affected, do emit only once (eg when --out or --outFile is specified)
|
|
120582
120649
|
// Otherwise just affected file
|
|
120583
|
-
ts.Debug.checkDefined(state.program).emit(affected === state.program ? undefined : affected,
|
|
120584
|
-
|
|
120650
|
+
ts.Debug.checkDefined(state.program).emit(affected === state.program ? undefined : affected, ts.getEmitDeclarations(state.compilerOptions) ?
|
|
120651
|
+
getWriteFileCallback(writeFile, customTransformers) :
|
|
120585
120652
|
writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles || emitKind === 0 /* DtsOnly */, customTransformers), affected, emitKind, isPendingEmitFile);
|
|
120586
120653
|
}
|
|
120587
|
-
function
|
|
120654
|
+
function getWriteFileCallback(writeFile, customTransformers) {
|
|
120588
120655
|
return function (fileName, text, writeByteOrderMark, onError, sourceFiles, data) {
|
|
120589
|
-
var _a;
|
|
120656
|
+
var _a, _b, _c;
|
|
120590
120657
|
if (ts.isDeclarationFileName(fileName)) {
|
|
120591
|
-
ts.
|
|
120592
|
-
|
|
120593
|
-
|
|
120594
|
-
|
|
120595
|
-
|
|
120596
|
-
|
|
120597
|
-
|
|
120598
|
-
|
|
120599
|
-
(
|
|
120600
|
-
|
|
120601
|
-
|
|
120602
|
-
|
|
120603
|
-
|
|
120658
|
+
if (!ts.outFile(state.compilerOptions)) {
|
|
120659
|
+
ts.Debug.assert((sourceFiles === null || sourceFiles === void 0 ? void 0 : sourceFiles.length) === 1);
|
|
120660
|
+
var newSignature = void 0;
|
|
120661
|
+
if (!customTransformers) {
|
|
120662
|
+
var file = sourceFiles[0];
|
|
120663
|
+
var info = state.fileInfos.get(file.resolvedPath);
|
|
120664
|
+
if (info.signature === file.version) {
|
|
120665
|
+
newSignature = computeSignature(text, data, computeHash);
|
|
120666
|
+
if (newSignature !== file.version) { // Update it
|
|
120667
|
+
if (host.storeFilesChangingSignatureDuringEmit)
|
|
120668
|
+
(state.filesChangingSignature || (state.filesChangingSignature = new ts.Set())).add(file.resolvedPath);
|
|
120669
|
+
if (state.exportedModulesMap)
|
|
120670
|
+
ts.BuilderState.updateExportedModules(state, file, file.exportedModulesFromDeclarationEmit);
|
|
120671
|
+
if (state.affectedFiles) {
|
|
120672
|
+
// Keep old signature so we know what to undo if cancellation happens
|
|
120673
|
+
var existing = (_a = state.oldSignatures) === null || _a === void 0 ? void 0 : _a.get(file.resolvedPath);
|
|
120674
|
+
if (existing === undefined)
|
|
120675
|
+
(state.oldSignatures || (state.oldSignatures = new ts.Map())).set(file.resolvedPath, info.signature || false);
|
|
120676
|
+
info.signature = newSignature;
|
|
120677
|
+
}
|
|
120678
|
+
else {
|
|
120679
|
+
// These are directly commited
|
|
120680
|
+
info.signature = newSignature;
|
|
120681
|
+
(_b = state.oldExportedModulesMap) === null || _b === void 0 ? void 0 : _b.clear();
|
|
120682
|
+
}
|
|
120683
|
+
}
|
|
120604
120684
|
}
|
|
120605
|
-
|
|
120606
|
-
|
|
120607
|
-
|
|
120608
|
-
|
|
120685
|
+
}
|
|
120686
|
+
if (state.compilerOptions.composite) {
|
|
120687
|
+
var filePath = sourceFiles[0].resolvedPath;
|
|
120688
|
+
var oldSignature = (_c = state.emitSignatures) === null || _c === void 0 ? void 0 : _c.get(filePath);
|
|
120689
|
+
newSignature || (newSignature = computeSignature(text, data, computeHash));
|
|
120690
|
+
if (newSignature !== oldSignature) {
|
|
120691
|
+
(state.emitSignatures || (state.emitSignatures = new ts.Map())).set(filePath, newSignature);
|
|
120692
|
+
state.hasChangedEmitSignature = true;
|
|
120609
120693
|
}
|
|
120610
120694
|
}
|
|
120611
120695
|
}
|
|
120696
|
+
else if (state.compilerOptions.composite) {
|
|
120697
|
+
var newSignature = computeSignature(text, data, computeHash);
|
|
120698
|
+
if (newSignature !== state.outSignature) {
|
|
120699
|
+
state.outSignature = newSignature;
|
|
120700
|
+
state.hasChangedEmitSignature = true;
|
|
120701
|
+
}
|
|
120702
|
+
}
|
|
120612
120703
|
}
|
|
120613
120704
|
if (writeFile)
|
|
120614
120705
|
writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data);
|
|
@@ -120673,8 +120764,8 @@ var ts;
|
|
|
120673
120764
|
}
|
|
120674
120765
|
}
|
|
120675
120766
|
}
|
|
120676
|
-
return ts.Debug.checkDefined(state.program).emit(targetSourceFile,
|
|
120677
|
-
|
|
120767
|
+
return ts.Debug.checkDefined(state.program).emit(targetSourceFile, ts.getEmitDeclarations(state.compilerOptions) ?
|
|
120768
|
+
getWriteFileCallback(writeFile, customTransformers) :
|
|
120678
120769
|
writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles, customTransformers);
|
|
120679
120770
|
}
|
|
120680
120771
|
/**
|
|
@@ -120763,14 +120854,28 @@ var ts;
|
|
|
120763
120854
|
{ version: fileInfo.version, signature: fileInfo.signature === false ? undefined : fileInfo.version, affectsGlobalScope: fileInfo.affectsGlobalScope, impliedFormat: fileInfo.impliedFormat };
|
|
120764
120855
|
}
|
|
120765
120856
|
ts.toBuilderStateFileInfo = toBuilderStateFileInfo;
|
|
120766
|
-
function
|
|
120767
|
-
var _a;
|
|
120857
|
+
function createBuilderProgramUsingProgramBuildInfo(programFromBuildInfo, buildInfoPath, host) {
|
|
120858
|
+
var _a, _b, _c, _d, _e;
|
|
120768
120859
|
var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));
|
|
120769
120860
|
var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames());
|
|
120770
|
-
var
|
|
120771
|
-
var
|
|
120861
|
+
var program = programFromBuildInfo;
|
|
120862
|
+
var filePaths = (_a = program.fileNames) === null || _a === void 0 ? void 0 : _a.map(toPath);
|
|
120863
|
+
var filePathsSetList = (_b = program.fileIdsList) === null || _b === void 0 ? void 0 : _b.map(function (fileIds) { return new ts.Set(fileIds.map(toFilePath)); });
|
|
120772
120864
|
var fileInfos = new ts.Map();
|
|
120773
|
-
|
|
120865
|
+
var emitSignatures = ((_c = program.options) === null || _c === void 0 ? void 0 : _c.composite) && !ts.outFile(program.options) ? new ts.Map() : undefined;
|
|
120866
|
+
(_d = program.fileInfos) === null || _d === void 0 ? void 0 : _d.forEach(function (fileInfo, index) {
|
|
120867
|
+
var path = toFilePath(index + 1);
|
|
120868
|
+
var stateFileInfo = toBuilderStateFileInfo(fileInfo);
|
|
120869
|
+
fileInfos.set(path, stateFileInfo);
|
|
120870
|
+
if (emitSignatures && stateFileInfo.signature)
|
|
120871
|
+
emitSignatures.set(path, stateFileInfo.signature);
|
|
120872
|
+
});
|
|
120873
|
+
(_e = program.emitSignatures) === null || _e === void 0 ? void 0 : _e.forEach(function (value) {
|
|
120874
|
+
if (ts.isNumber(value))
|
|
120875
|
+
emitSignatures.delete(toFilePath(value));
|
|
120876
|
+
else
|
|
120877
|
+
emitSignatures.set(toFilePath(value[0]), value[1]);
|
|
120878
|
+
});
|
|
120774
120879
|
var state = {
|
|
120775
120880
|
fileInfos: fileInfos,
|
|
120776
120881
|
compilerOptions: program.options ? ts.convertToOptionsWithAbsolutePaths(program.options, toAbsolutePath) : {},
|
|
@@ -120781,11 +120886,15 @@ var ts;
|
|
|
120781
120886
|
affectedFilesPendingEmit: ts.map(program.affectedFilesPendingEmit, function (value) { return toFilePath(value[0]); }),
|
|
120782
120887
|
affectedFilesPendingEmitKind: program.affectedFilesPendingEmit && ts.arrayToMap(program.affectedFilesPendingEmit, function (value) { return toFilePath(value[0]); }, function (value) { return value[1]; }),
|
|
120783
120888
|
affectedFilesPendingEmitIndex: program.affectedFilesPendingEmit && 0,
|
|
120889
|
+
changedFilesSet: new ts.Set(ts.map(program.changeFileSet, toFilePath)),
|
|
120890
|
+
dtsChangeTime: program.dtsChangeTime,
|
|
120891
|
+
emitSignatures: (emitSignatures === null || emitSignatures === void 0 ? void 0 : emitSignatures.size) ? emitSignatures : undefined,
|
|
120892
|
+
outSignature: program.outSignature,
|
|
120784
120893
|
};
|
|
120785
120894
|
return {
|
|
120786
120895
|
getState: function () { return state; },
|
|
120787
|
-
|
|
120788
|
-
|
|
120896
|
+
backupEmitState: ts.noop,
|
|
120897
|
+
restoreEmitState: ts.noop,
|
|
120789
120898
|
getProgram: ts.notImplemented,
|
|
120790
120899
|
getProgramOrUndefined: ts.returnUndefined,
|
|
120791
120900
|
releaseProgram: ts.noop,
|
|
@@ -120830,12 +120939,12 @@ var ts;
|
|
|
120830
120939
|
return map;
|
|
120831
120940
|
}
|
|
120832
120941
|
}
|
|
120833
|
-
ts.
|
|
120942
|
+
ts.createBuilderProgramUsingProgramBuildInfo = createBuilderProgramUsingProgramBuildInfo;
|
|
120834
120943
|
function createRedirectedBuilderProgram(getState, configFileParsingDiagnostics) {
|
|
120835
120944
|
return {
|
|
120836
120945
|
getState: ts.notImplemented,
|
|
120837
|
-
|
|
120838
|
-
|
|
120946
|
+
backupEmitState: ts.noop,
|
|
120947
|
+
restoreEmitState: ts.noop,
|
|
120839
120948
|
getProgram: getProgram,
|
|
120840
120949
|
getProgramOrUndefined: function () { return getState().program; },
|
|
120841
120950
|
releaseProgram: function () { return getState().program = undefined; },
|
|
@@ -121951,9 +122060,9 @@ var ts;
|
|
|
121951
122060
|
if (!preferSymlinks) {
|
|
121952
122061
|
// Symlinks inside ignored paths are already filtered out of the symlink cache,
|
|
121953
122062
|
// so we only need to remove them from the realpath filenames.
|
|
121954
|
-
var
|
|
121955
|
-
if (
|
|
121956
|
-
return
|
|
122063
|
+
var result_16 = ts.forEach(targets, function (p) { return !(shouldFilterIgnoredPaths && ts.containsIgnoredPath(p)) && cb(p, referenceRedirect === p); });
|
|
122064
|
+
if (result_16)
|
|
122065
|
+
return result_16;
|
|
121957
122066
|
}
|
|
121958
122067
|
var symlinkedDirectories = (_a = host.getSymlinkCache) === null || _a === void 0 ? void 0 : _a.call(host).getSymlinkedDirectoriesByRealpath();
|
|
121959
122068
|
var fullImportedFileName = ts.getNormalizedAbsolutePath(importedFileName, cwd);
|
|
@@ -121973,10 +122082,10 @@ var ts;
|
|
|
121973
122082
|
for (var _i = 0, symlinkDirectories_1 = symlinkDirectories; _i < symlinkDirectories_1.length; _i++) {
|
|
121974
122083
|
var symlinkDirectory = symlinkDirectories_1[_i];
|
|
121975
122084
|
var option = ts.resolvePath(symlinkDirectory, relative);
|
|
121976
|
-
var
|
|
122085
|
+
var result_17 = cb(option, target === referenceRedirect);
|
|
121977
122086
|
shouldFilterIgnoredPaths = true; // We found a non-ignored path in symlinks, so we can reject ignored-path realpaths
|
|
121978
|
-
if (
|
|
121979
|
-
return
|
|
122087
|
+
if (result_17)
|
|
122088
|
+
return result_17;
|
|
121980
122089
|
}
|
|
121981
122090
|
});
|
|
121982
122091
|
});
|
|
@@ -122868,6 +122977,7 @@ var ts;
|
|
|
122868
122977
|
readDirectory: ts.maybeBind(host, host.readDirectory),
|
|
122869
122978
|
disableUseFileVersionAsSignature: host.disableUseFileVersionAsSignature,
|
|
122870
122979
|
storeFilesChangingSignatureDuringEmit: host.storeFilesChangingSignatureDuringEmit,
|
|
122980
|
+
now: ts.maybeBind(host, host.now),
|
|
122871
122981
|
};
|
|
122872
122982
|
function writeFile(fileName, text, writeByteOrderMark, onError) {
|
|
122873
122983
|
try {
|
|
@@ -122928,6 +123038,7 @@ var ts;
|
|
|
122928
123038
|
createProgram: createProgram || ts.createEmitAndSemanticDiagnosticsBuilderProgram,
|
|
122929
123039
|
disableUseFileVersionAsSignature: system.disableUseFileVersionAsSignature,
|
|
122930
123040
|
storeFilesChangingSignatureDuringEmit: system.storeFilesChangingSignatureDuringEmit,
|
|
123041
|
+
now: ts.maybeBind(system, system.now),
|
|
122931
123042
|
};
|
|
122932
123043
|
}
|
|
122933
123044
|
ts.createProgramHost = createProgramHost;
|
|
@@ -122995,20 +123106,26 @@ var ts;
|
|
|
122995
123106
|
var ts;
|
|
122996
123107
|
(function (ts) {
|
|
122997
123108
|
function readBuilderProgram(compilerOptions, host) {
|
|
122998
|
-
if (ts.outFile(compilerOptions))
|
|
122999
|
-
return undefined;
|
|
123000
123109
|
var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(compilerOptions);
|
|
123001
123110
|
if (!buildInfoPath)
|
|
123002
123111
|
return undefined;
|
|
123003
|
-
var
|
|
123004
|
-
if (
|
|
123005
|
-
|
|
123006
|
-
|
|
123112
|
+
var buildInfo;
|
|
123113
|
+
if (host.getBuildInfo) {
|
|
123114
|
+
buildInfo = host.getBuildInfo(buildInfoPath, compilerOptions.configFilePath);
|
|
123115
|
+
if (!buildInfo)
|
|
123116
|
+
return undefined;
|
|
123117
|
+
}
|
|
123118
|
+
else {
|
|
123119
|
+
var content = host.readFile(buildInfoPath);
|
|
123120
|
+
if (!content)
|
|
123121
|
+
return undefined;
|
|
123122
|
+
buildInfo = ts.getBuildInfo(content);
|
|
123123
|
+
}
|
|
123007
123124
|
if (buildInfo.version !== ts.version)
|
|
123008
123125
|
return undefined;
|
|
123009
123126
|
if (!buildInfo.program)
|
|
123010
123127
|
return undefined;
|
|
123011
|
-
return ts.
|
|
123128
|
+
return ts.createBuilderProgramUsingProgramBuildInfo(buildInfo.program, buildInfoPath, host);
|
|
123012
123129
|
}
|
|
123013
123130
|
ts.readBuilderProgram = readBuilderProgram;
|
|
123014
123131
|
function createIncrementalCompilerHost(options, system) {
|
|
@@ -123017,6 +123134,7 @@ var ts;
|
|
|
123017
123134
|
host.createHash = ts.maybeBind(system, system.createHash);
|
|
123018
123135
|
host.disableUseFileVersionAsSignature = system.disableUseFileVersionAsSignature;
|
|
123019
123136
|
host.storeFilesChangingSignatureDuringEmit = system.storeFilesChangingSignatureDuringEmit;
|
|
123137
|
+
host.now = ts.maybeBind(system, system.now);
|
|
123020
123138
|
ts.setGetSourceFileAsHashVersioned(host, system);
|
|
123021
123139
|
ts.changeCompilerHostLikeToUseCache(host, function (fileName) { return ts.toPath(fileName, host.getCurrentDirectory(), host.getCanonicalFileName); });
|
|
123022
123140
|
return host;
|
|
@@ -123751,14 +123869,16 @@ var ts;
|
|
|
123751
123869
|
UpToDateStatusType[UpToDateStatusType["OutputMissing"] = 4] = "OutputMissing";
|
|
123752
123870
|
UpToDateStatusType[UpToDateStatusType["OutOfDateWithSelf"] = 5] = "OutOfDateWithSelf";
|
|
123753
123871
|
UpToDateStatusType[UpToDateStatusType["OutOfDateWithUpstream"] = 6] = "OutOfDateWithUpstream";
|
|
123754
|
-
UpToDateStatusType[UpToDateStatusType["
|
|
123755
|
-
UpToDateStatusType[UpToDateStatusType["
|
|
123756
|
-
UpToDateStatusType[UpToDateStatusType["
|
|
123757
|
-
UpToDateStatusType[UpToDateStatusType["
|
|
123872
|
+
UpToDateStatusType[UpToDateStatusType["OutOfDateBuildInfo"] = 7] = "OutOfDateBuildInfo";
|
|
123873
|
+
UpToDateStatusType[UpToDateStatusType["UpstreamOutOfDate"] = 8] = "UpstreamOutOfDate";
|
|
123874
|
+
UpToDateStatusType[UpToDateStatusType["UpstreamBlocked"] = 9] = "UpstreamBlocked";
|
|
123875
|
+
UpToDateStatusType[UpToDateStatusType["ComputingUpstream"] = 10] = "ComputingUpstream";
|
|
123876
|
+
UpToDateStatusType[UpToDateStatusType["TsVersionOutputOfDate"] = 11] = "TsVersionOutputOfDate";
|
|
123758
123877
|
/**
|
|
123759
123878
|
* Projects with no outputs (i.e. "solution" files)
|
|
123760
123879
|
*/
|
|
123761
|
-
UpToDateStatusType[UpToDateStatusType["ContainerOnly"] =
|
|
123880
|
+
UpToDateStatusType[UpToDateStatusType["ContainerOnly"] = 12] = "ContainerOnly";
|
|
123881
|
+
UpToDateStatusType[UpToDateStatusType["ForceBuild"] = 13] = "ForceBuild";
|
|
123762
123882
|
})(UpToDateStatusType = ts.UpToDateStatusType || (ts.UpToDateStatusType = {}));
|
|
123763
123883
|
function resolveConfigFileProjectName(project) {
|
|
123764
123884
|
if (ts.fileExtensionIs(project, ".json" /* Json */)) {
|
|
@@ -123803,9 +123923,11 @@ var ts;
|
|
|
123803
123923
|
function getOrCreateValueMapFromConfigFileMap(configFileMap, resolved) {
|
|
123804
123924
|
return getOrCreateValueFromConfigFileMap(configFileMap, resolved, function () { return new ts.Map(); });
|
|
123805
123925
|
}
|
|
123806
|
-
|
|
123807
|
-
|
|
123926
|
+
/*@internal*/
|
|
123927
|
+
function getCurrentTime(host) {
|
|
123928
|
+
return host.now ? host.now() : new Date();
|
|
123808
123929
|
}
|
|
123930
|
+
ts.getCurrentTime = getCurrentTime;
|
|
123809
123931
|
/*@internal*/
|
|
123810
123932
|
function isCircularBuildOrder(buildOrder) {
|
|
123811
123933
|
return !!buildOrder && !!buildOrder.buildOrder;
|
|
@@ -123895,6 +124017,7 @@ var ts;
|
|
|
123895
124017
|
return ts.loadWithTypeDirectiveCache(ts.Debug.checkEachDefined(typeReferenceDirectiveNames), containingFile, redirectedReference, containingFileMode, loader_4);
|
|
123896
124018
|
};
|
|
123897
124019
|
}
|
|
124020
|
+
compilerHost.getBuildInfo = function (fileName, configFilePath) { return getBuildInfo(state, fileName, toResolvedConfigFilePath(state, configFilePath), /*modifiedTime*/ undefined); };
|
|
123898
124021
|
var _a = ts.createWatchFactory(hostWithWatch, options), watchFile = _a.watchFile, watchDirectory = _a.watchDirectory, writeLog = _a.writeLog;
|
|
123899
124022
|
var state = {
|
|
123900
124023
|
host: host,
|
|
@@ -123911,8 +124034,9 @@ var ts;
|
|
|
123911
124034
|
resolvedConfigFilePaths: new ts.Map(),
|
|
123912
124035
|
configFileCache: new ts.Map(),
|
|
123913
124036
|
projectStatus: new ts.Map(),
|
|
123914
|
-
buildInfoChecked: new ts.Map(),
|
|
123915
124037
|
extendedConfigCache: new ts.Map(),
|
|
124038
|
+
buildInfoCache: new ts.Map(),
|
|
124039
|
+
outputTimeStamps: new ts.Map(),
|
|
123916
124040
|
builderPrograms: new ts.Map(),
|
|
123917
124041
|
diagnostics: new ts.Map(),
|
|
123918
124042
|
projectPendingBuild: new ts.Map(),
|
|
@@ -123936,6 +124060,7 @@ var ts;
|
|
|
123936
124060
|
allWatchedConfigFiles: new ts.Map(),
|
|
123937
124061
|
allWatchedExtendedConfigFiles: new ts.Map(),
|
|
123938
124062
|
allWatchedPackageJsonFiles: new ts.Map(),
|
|
124063
|
+
filesWatched: new ts.Map(),
|
|
123939
124064
|
lastCachedPackageJsonLookups: new ts.Map(),
|
|
123940
124065
|
timerToBuildInvalidatedProject: undefined,
|
|
123941
124066
|
reportFileChangeDetected: false,
|
|
@@ -124042,11 +124167,12 @@ var ts;
|
|
|
124042
124167
|
// Config file cache
|
|
124043
124168
|
ts.mutateMapSkippingNewValues(state.configFileCache, currentProjects, noopOnDelete);
|
|
124044
124169
|
ts.mutateMapSkippingNewValues(state.projectStatus, currentProjects, noopOnDelete);
|
|
124045
|
-
ts.mutateMapSkippingNewValues(state.buildInfoChecked, currentProjects, noopOnDelete);
|
|
124046
124170
|
ts.mutateMapSkippingNewValues(state.builderPrograms, currentProjects, noopOnDelete);
|
|
124047
124171
|
ts.mutateMapSkippingNewValues(state.diagnostics, currentProjects, noopOnDelete);
|
|
124048
124172
|
ts.mutateMapSkippingNewValues(state.projectPendingBuild, currentProjects, noopOnDelete);
|
|
124049
124173
|
ts.mutateMapSkippingNewValues(state.projectErrorsReported, currentProjects, noopOnDelete);
|
|
124174
|
+
ts.mutateMapSkippingNewValues(state.buildInfoCache, currentProjects, noopOnDelete);
|
|
124175
|
+
ts.mutateMapSkippingNewValues(state.outputTimeStamps, currentProjects, noopOnDelete);
|
|
124050
124176
|
// Remove watches for the program no longer in the solution
|
|
124051
124177
|
if (state.watch) {
|
|
124052
124178
|
ts.mutateMapSkippingNewValues(state.allWatchedConfigFiles, currentProjects, { onDeleteValue: ts.closeFileWatcher });
|
|
@@ -124337,21 +124463,21 @@ var ts;
|
|
|
124337
124463
|
}
|
|
124338
124464
|
function emit(writeFileCallback, cancellationToken, customTransformers) {
|
|
124339
124465
|
var _a;
|
|
124340
|
-
var _b, _c;
|
|
124466
|
+
var _b, _c, _d;
|
|
124341
124467
|
ts.Debug.assertIsDefined(program);
|
|
124342
124468
|
ts.Debug.assert(step === BuildStep.Emit);
|
|
124343
124469
|
// Before emitting lets backup state, so we can revert it back if there are declaration errors to handle emit and declaration errors correctly
|
|
124344
|
-
program.
|
|
124470
|
+
program.backupEmitState();
|
|
124345
124471
|
var declDiagnostics;
|
|
124346
124472
|
var reportDeclarationDiagnostics = function (d) { return (declDiagnostics || (declDiagnostics = [])).push(d); };
|
|
124347
124473
|
var outputFiles = [];
|
|
124348
124474
|
var emitResult = ts.emitFilesAndReportErrors(program, reportDeclarationDiagnostics,
|
|
124349
124475
|
/*write*/ undefined,
|
|
124350
|
-
/*reportSummary*/ undefined, function (name, text, writeByteOrderMark) { return outputFiles.push({ name: name, text: text, writeByteOrderMark: writeByteOrderMark }); }, cancellationToken,
|
|
124476
|
+
/*reportSummary*/ undefined, function (name, text, writeByteOrderMark, _onError, _sourceFiles, data) { return outputFiles.push({ name: name, text: text, writeByteOrderMark: writeByteOrderMark, buildInfo: data === null || data === void 0 ? void 0 : data.buildInfo }); }, cancellationToken,
|
|
124351
124477
|
/*emitOnlyDts*/ false, customTransformers || ((_c = (_b = state.host).getCustomTransformers) === null || _c === void 0 ? void 0 : _c.call(_b, project))).emitResult;
|
|
124352
124478
|
// Don't emit .d.ts if there are decl file errors
|
|
124353
124479
|
if (declDiagnostics) {
|
|
124354
|
-
program.
|
|
124480
|
+
program.restoreEmitState();
|
|
124355
124481
|
(_a = buildErrors(state, projectPath, program, config, declDiagnostics, BuildResultFlags.DeclarationEmitErrors, "Declaration file"), buildResult = _a.buildResult, step = _a.step);
|
|
124356
124482
|
return {
|
|
124357
124483
|
emitSkipped: true,
|
|
@@ -124361,37 +124487,43 @@ var ts;
|
|
|
124361
124487
|
// Actual Emit
|
|
124362
124488
|
var host = state.host, compilerHost = state.compilerHost;
|
|
124363
124489
|
var resultFlags = BuildResultFlags.DeclarationOutputUnchanged;
|
|
124364
|
-
var
|
|
124365
|
-
var anyDtsChanged = false;
|
|
124490
|
+
var existingBuildInfo = ((_d = state.buildInfoCache.get(projectPath)) === null || _d === void 0 ? void 0 : _d.buildInfo) || undefined;
|
|
124366
124491
|
var emitterDiagnostics = ts.createDiagnosticCollection();
|
|
124367
124492
|
var emittedOutputs = new ts.Map();
|
|
124493
|
+
var options = program.getCompilerOptions();
|
|
124494
|
+
var isIncremental = ts.isIncrementalCompilation(options);
|
|
124495
|
+
var outputTimeStampMap;
|
|
124496
|
+
var now;
|
|
124368
124497
|
outputFiles.forEach(function (_a) {
|
|
124369
|
-
var
|
|
124370
|
-
var
|
|
124371
|
-
|
|
124372
|
-
|
|
124373
|
-
|
|
124374
|
-
|
|
124375
|
-
|
|
124376
|
-
else {
|
|
124498
|
+
var _b, _c;
|
|
124499
|
+
var name = _a.name, text = _a.text, writeByteOrderMark = _a.writeByteOrderMark, buildInfo = _a.buildInfo;
|
|
124500
|
+
var path = toPath(state, name);
|
|
124501
|
+
emittedOutputs.set(toPath(state, name), name);
|
|
124502
|
+
if (buildInfo) {
|
|
124503
|
+
setBuildInfo(state, buildInfo, projectPath, options);
|
|
124504
|
+
if (((_b = buildInfo.program) === null || _b === void 0 ? void 0 : _b.dtsChangeTime) !== ((_c = existingBuildInfo === null || existingBuildInfo === void 0 ? void 0 : existingBuildInfo.program) === null || _c === void 0 ? void 0 : _c.dtsChangeTime)) {
|
|
124377
124505
|
resultFlags &= ~BuildResultFlags.DeclarationOutputUnchanged;
|
|
124378
|
-
anyDtsChanged = true;
|
|
124379
124506
|
}
|
|
124380
124507
|
}
|
|
124381
|
-
emittedOutputs.set(toPath(state, name), name);
|
|
124382
124508
|
ts.writeFile(writeFileCallback ? { writeFile: writeFileCallback } : compilerHost, emitterDiagnostics, name, text, writeByteOrderMark);
|
|
124383
|
-
if (
|
|
124384
|
-
|
|
124509
|
+
if (!isIncremental && state.watch) {
|
|
124510
|
+
(outputTimeStampMap || (outputTimeStampMap = getOutputTimeStampMap(state, projectPath))).set(path, now || (now = getCurrentTime(state.host)));
|
|
124385
124511
|
}
|
|
124386
124512
|
});
|
|
124387
|
-
finishEmit(emitterDiagnostics, emittedOutputs,
|
|
124388
|
-
/*newestDeclarationFileContentChangedTimeIsMaximumDate*/ anyDtsChanged, outputFiles.length ? outputFiles[0].name : ts.getFirstProjectOutput(config, !host.useCaseSensitiveFileNames()), resultFlags);
|
|
124513
|
+
finishEmit(emitterDiagnostics, emittedOutputs, outputFiles.length ? outputFiles[0].name : ts.getFirstProjectOutput(config, !host.useCaseSensitiveFileNames()), resultFlags);
|
|
124389
124514
|
return emitResult;
|
|
124390
124515
|
}
|
|
124391
124516
|
function emitBuildInfo(writeFileCallback, cancellationToken) {
|
|
124392
124517
|
ts.Debug.assertIsDefined(program);
|
|
124393
124518
|
ts.Debug.assert(step === BuildStep.EmitBuildInfo);
|
|
124394
|
-
var emitResult = program.emitBuildInfo(
|
|
124519
|
+
var emitResult = program.emitBuildInfo(function (name, text, writeByteOrderMark, onError, sourceFiles, data) {
|
|
124520
|
+
if (data === null || data === void 0 ? void 0 : data.buildInfo)
|
|
124521
|
+
setBuildInfo(state, data.buildInfo, projectPath, program.getCompilerOptions());
|
|
124522
|
+
if (writeFileCallback)
|
|
124523
|
+
writeFileCallback(name, text, writeByteOrderMark, onError, sourceFiles, data);
|
|
124524
|
+
else
|
|
124525
|
+
state.compilerHost.writeFile(name, text, writeByteOrderMark, onError, sourceFiles, data);
|
|
124526
|
+
}, cancellationToken);
|
|
124395
124527
|
if (emitResult.diagnostics.length) {
|
|
124396
124528
|
reportErrors(state, emitResult.diagnostics);
|
|
124397
124529
|
state.diagnostics.set(projectPath, __spreadArray(__spreadArray([], state.diagnostics.get(projectPath), true), emitResult.diagnostics, true));
|
|
@@ -124404,7 +124536,7 @@ var ts;
|
|
|
124404
124536
|
step = BuildStep.QueueReferencingProjects;
|
|
124405
124537
|
return emitResult;
|
|
124406
124538
|
}
|
|
124407
|
-
function finishEmit(emitterDiagnostics, emittedOutputs,
|
|
124539
|
+
function finishEmit(emitterDiagnostics, emittedOutputs, oldestOutputFileName, resultFlags) {
|
|
124408
124540
|
var _a;
|
|
124409
124541
|
var emitDiagnostics = emitterDiagnostics.getDiagnostics();
|
|
124410
124542
|
if (emitDiagnostics.length) {
|
|
@@ -124415,13 +124547,11 @@ var ts;
|
|
|
124415
124547
|
emittedOutputs.forEach(function (name) { return listEmittedFile(state, config, name); });
|
|
124416
124548
|
}
|
|
124417
124549
|
// Update time stamps for rest of the outputs
|
|
124418
|
-
|
|
124550
|
+
updateOutputTimestampsWorker(state, config, projectPath, ts.Diagnostics.Updating_unchanged_output_timestamps_of_project_0, emittedOutputs);
|
|
124419
124551
|
state.diagnostics.delete(projectPath);
|
|
124420
124552
|
state.projectStatus.set(projectPath, {
|
|
124421
124553
|
type: ts.UpToDateStatusType.UpToDate,
|
|
124422
|
-
newestDeclarationFileContentChangedTime:
|
|
124423
|
-
maximumDate :
|
|
124424
|
-
newestDeclarationFileContentChangedTime,
|
|
124554
|
+
newestDeclarationFileContentChangedTime: getDtsChangeTime(state, config.options, projectPath),
|
|
124425
124555
|
oldestOutputFileName: oldestOutputFileName
|
|
124426
124556
|
});
|
|
124427
124557
|
afterProgramDone(state, program, config);
|
|
@@ -124456,13 +124586,21 @@ var ts;
|
|
|
124456
124586
|
ts.Debug.assert(!!outputFiles.length);
|
|
124457
124587
|
var emitterDiagnostics = ts.createDiagnosticCollection();
|
|
124458
124588
|
var emittedOutputs = new ts.Map();
|
|
124589
|
+
var resultFlags = BuildResultFlags.DeclarationOutputUnchanged;
|
|
124590
|
+
var existingBuildInfo = state.buildInfoCache.get(projectPath).buildInfo;
|
|
124459
124591
|
outputFiles.forEach(function (_a) {
|
|
124460
|
-
var
|
|
124592
|
+
var _b, _c;
|
|
124593
|
+
var name = _a.name, text = _a.text, writeByteOrderMark = _a.writeByteOrderMark, buildInfo = _a.buildInfo;
|
|
124461
124594
|
emittedOutputs.set(toPath(state, name), name);
|
|
124595
|
+
if (buildInfo) {
|
|
124596
|
+
setBuildInfo(state, buildInfo, projectPath, config.options);
|
|
124597
|
+
if (((_b = buildInfo.program) === null || _b === void 0 ? void 0 : _b.dtsChangeTime) !== ((_c = existingBuildInfo.program) === null || _c === void 0 ? void 0 : _c.dtsChangeTime)) {
|
|
124598
|
+
resultFlags &= ~BuildResultFlags.DeclarationOutputUnchanged;
|
|
124599
|
+
}
|
|
124600
|
+
}
|
|
124462
124601
|
ts.writeFile(writeFileCallback ? { writeFile: writeFileCallback } : compilerHost, emitterDiagnostics, name, text, writeByteOrderMark);
|
|
124463
124602
|
});
|
|
124464
|
-
var emitDiagnostics = finishEmit(emitterDiagnostics, emittedOutputs,
|
|
124465
|
-
/*newestDeclarationFileContentChangedTimeIsMaximumDate*/ false, outputFiles[0].name, BuildResultFlags.DeclarationOutputUnchanged);
|
|
124603
|
+
var emitDiagnostics = finishEmit(emitterDiagnostics, emittedOutputs, outputFiles[0].name, resultFlags);
|
|
124466
124604
|
return { emitSkipped: false, diagnostics: emitDiagnostics };
|
|
124467
124605
|
}
|
|
124468
124606
|
function executeSteps(till, cancellationToken, writeFile, customTransformers) {
|
|
@@ -124624,7 +124762,7 @@ var ts;
|
|
|
124624
124762
|
state.projectCompilerOptions = state.baseCompilerOptions;
|
|
124625
124763
|
}
|
|
124626
124764
|
function buildErrors(state, resolvedPath, program, config, diagnostics, buildResult, errorType) {
|
|
124627
|
-
var canEmitBuildInfo =
|
|
124765
|
+
var canEmitBuildInfo = program && !ts.outFile(program.getCompilerOptions());
|
|
124628
124766
|
reportAndStoreErrors(state, resolvedPath, diagnostics);
|
|
124629
124767
|
state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.Unbuildable, reason: errorType + " errors" });
|
|
124630
124768
|
if (canEmitBuildInfo)
|
|
@@ -124632,9 +124770,95 @@ var ts;
|
|
|
124632
124770
|
afterProgramDone(state, program, config);
|
|
124633
124771
|
return { buildResult: buildResult, step: BuildStep.QueueReferencingProjects };
|
|
124634
124772
|
}
|
|
124773
|
+
function isFileWatcherWithModifiedTime(value) {
|
|
124774
|
+
return !!value.watcher;
|
|
124775
|
+
}
|
|
124776
|
+
function getModifiedTime(state, fileName) {
|
|
124777
|
+
var path = toPath(state, fileName);
|
|
124778
|
+
var existing = state.filesWatched.get(path);
|
|
124779
|
+
if (state.watch && !!existing) {
|
|
124780
|
+
if (!isFileWatcherWithModifiedTime(existing))
|
|
124781
|
+
return existing;
|
|
124782
|
+
if (existing.modifiedTime)
|
|
124783
|
+
return existing.modifiedTime;
|
|
124784
|
+
}
|
|
124785
|
+
var result = ts.getModifiedTime(state.host, fileName);
|
|
124786
|
+
if (state.watch) {
|
|
124787
|
+
if (existing)
|
|
124788
|
+
existing.modifiedTime = result;
|
|
124789
|
+
else
|
|
124790
|
+
state.filesWatched.set(path, result);
|
|
124791
|
+
}
|
|
124792
|
+
return result;
|
|
124793
|
+
}
|
|
124794
|
+
function watchFile(state, file, callback, pollingInterval, options, watchType, project) {
|
|
124795
|
+
var path = toPath(state, file);
|
|
124796
|
+
var existing = state.filesWatched.get(path);
|
|
124797
|
+
if (existing && isFileWatcherWithModifiedTime(existing)) {
|
|
124798
|
+
existing.callbacks.push(callback);
|
|
124799
|
+
}
|
|
124800
|
+
else {
|
|
124801
|
+
var watcher = state.watchFile(file, function (fileName, eventKind, modifiedTime) {
|
|
124802
|
+
var existing = ts.Debug.checkDefined(state.filesWatched.get(path));
|
|
124803
|
+
ts.Debug.assert(isFileWatcherWithModifiedTime(existing));
|
|
124804
|
+
existing.modifiedTime = modifiedTime;
|
|
124805
|
+
existing.callbacks.forEach(function (cb) { return cb(fileName, eventKind, modifiedTime); });
|
|
124806
|
+
}, pollingInterval, options, watchType, project);
|
|
124807
|
+
state.filesWatched.set(path, { callbacks: [callback], watcher: watcher, modifiedTime: existing });
|
|
124808
|
+
}
|
|
124809
|
+
return {
|
|
124810
|
+
close: function () {
|
|
124811
|
+
var existing = ts.Debug.checkDefined(state.filesWatched.get(path));
|
|
124812
|
+
ts.Debug.assert(isFileWatcherWithModifiedTime(existing));
|
|
124813
|
+
if (existing.callbacks.length === 1) {
|
|
124814
|
+
state.filesWatched.delete(path);
|
|
124815
|
+
ts.closeFileWatcherOf(existing);
|
|
124816
|
+
}
|
|
124817
|
+
else {
|
|
124818
|
+
ts.unorderedRemoveItem(existing.callbacks, callback);
|
|
124819
|
+
}
|
|
124820
|
+
}
|
|
124821
|
+
};
|
|
124822
|
+
}
|
|
124823
|
+
function getOutputTimeStampMap(state, resolvedConfigFilePath) {
|
|
124824
|
+
if (!state.watch)
|
|
124825
|
+
return undefined;
|
|
124826
|
+
var result = state.outputTimeStamps.get(resolvedConfigFilePath);
|
|
124827
|
+
if (!result)
|
|
124828
|
+
state.outputTimeStamps.set(resolvedConfigFilePath, result = new ts.Map());
|
|
124829
|
+
return result;
|
|
124830
|
+
}
|
|
124831
|
+
function setBuildInfo(state, buildInfo, resolvedConfigPath, options) {
|
|
124832
|
+
var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(options);
|
|
124833
|
+
var existing = getBuildInfoCacheEntry(state, buildInfoPath, resolvedConfigPath);
|
|
124834
|
+
if (existing) {
|
|
124835
|
+
existing.buildInfo = buildInfo;
|
|
124836
|
+
existing.modifiedTime = getCurrentTime(state.host);
|
|
124837
|
+
}
|
|
124838
|
+
else {
|
|
124839
|
+
state.buildInfoCache.set(resolvedConfigPath, { path: toPath(state, buildInfoPath), buildInfo: buildInfo, modifiedTime: getCurrentTime(state.host) });
|
|
124840
|
+
}
|
|
124841
|
+
}
|
|
124842
|
+
function getBuildInfoCacheEntry(state, buildInfoPath, resolvedConfigPath) {
|
|
124843
|
+
var path = toPath(state, buildInfoPath);
|
|
124844
|
+
var existing = state.buildInfoCache.get(resolvedConfigPath);
|
|
124845
|
+
return (existing === null || existing === void 0 ? void 0 : existing.path) === path ? existing : undefined;
|
|
124846
|
+
}
|
|
124847
|
+
function getBuildInfo(state, buildInfoPath, resolvedConfigPath, modifiedTime) {
|
|
124848
|
+
var path = toPath(state, buildInfoPath);
|
|
124849
|
+
var existing = state.buildInfoCache.get(resolvedConfigPath);
|
|
124850
|
+
if (existing !== undefined && existing.path === path) {
|
|
124851
|
+
return existing.buildInfo || undefined;
|
|
124852
|
+
}
|
|
124853
|
+
var value = state.readFileWithCache(buildInfoPath);
|
|
124854
|
+
var buildInfo = value ? ts.getBuildInfo(value) : undefined;
|
|
124855
|
+
ts.Debug.assert(modifiedTime || !buildInfo);
|
|
124856
|
+
state.buildInfoCache.set(resolvedConfigPath, { path: path, buildInfo: buildInfo || false, modifiedTime: modifiedTime || ts.missingFileModifiedTime });
|
|
124857
|
+
return buildInfo;
|
|
124858
|
+
}
|
|
124635
124859
|
function checkConfigFileUpToDateStatus(state, configFile, oldestOutputFileTime, oldestOutputFileName) {
|
|
124636
124860
|
// Check tsconfig time
|
|
124637
|
-
var tsconfigTime =
|
|
124861
|
+
var tsconfigTime = getModifiedTime(state, configFile);
|
|
124638
124862
|
if (oldestOutputFileTime < tsconfigTime) {
|
|
124639
124863
|
return {
|
|
124640
124864
|
type: ts.UpToDateStatusType.OutOfDateWithSelf,
|
|
@@ -124644,88 +124868,24 @@ var ts;
|
|
|
124644
124868
|
}
|
|
124645
124869
|
}
|
|
124646
124870
|
function getUpToDateStatusWorker(state, project, resolvedPath) {
|
|
124647
|
-
var
|
|
124648
|
-
var newestInputFileName = undefined;
|
|
124649
|
-
var newestInputFileTime = minimumDate;
|
|
124650
|
-
var host = state.host;
|
|
124651
|
-
// Get timestamps of input files
|
|
124652
|
-
for (var _i = 0, _a = project.fileNames; _i < _a.length; _i++) {
|
|
124653
|
-
var inputFile = _a[_i];
|
|
124654
|
-
if (!host.fileExists(inputFile)) {
|
|
124655
|
-
return {
|
|
124656
|
-
type: ts.UpToDateStatusType.Unbuildable,
|
|
124657
|
-
reason: inputFile + " does not exist"
|
|
124658
|
-
};
|
|
124659
|
-
}
|
|
124660
|
-
if (!force) {
|
|
124661
|
-
var inputTime = ts.getModifiedTime(host, inputFile);
|
|
124662
|
-
if (inputTime > newestInputFileTime) {
|
|
124663
|
-
newestInputFileName = inputFile;
|
|
124664
|
-
newestInputFileTime = inputTime;
|
|
124665
|
-
}
|
|
124666
|
-
}
|
|
124667
|
-
}
|
|
124871
|
+
var _a, _b, _c;
|
|
124668
124872
|
// Container if no files are specified in the project
|
|
124669
124873
|
if (!project.fileNames.length && !ts.canJsonReportNoInputFiles(project.raw)) {
|
|
124670
124874
|
return {
|
|
124671
124875
|
type: ts.UpToDateStatusType.ContainerOnly
|
|
124672
124876
|
};
|
|
124673
124877
|
}
|
|
124674
|
-
//
|
|
124675
|
-
var
|
|
124676
|
-
|
|
124677
|
-
var oldestOutputFileName = "(none)";
|
|
124678
|
-
var oldestOutputFileTime = maximumDate;
|
|
124679
|
-
var newestOutputFileName = "(none)";
|
|
124680
|
-
var newestOutputFileTime = minimumDate;
|
|
124681
|
-
var missingOutputFileName;
|
|
124682
|
-
var newestDeclarationFileContentChangedTime = minimumDate;
|
|
124683
|
-
var isOutOfDateWithInputs = false;
|
|
124684
|
-
if (!force) {
|
|
124685
|
-
for (var _b = 0, outputs_1 = outputs; _b < outputs_1.length; _b++) {
|
|
124686
|
-
var output = outputs_1[_b];
|
|
124687
|
-
// Output is missing; can stop checking
|
|
124688
|
-
// Don't immediately return because we can still be upstream-blocked, which is a higher-priority status
|
|
124689
|
-
if (!host.fileExists(output)) {
|
|
124690
|
-
missingOutputFileName = output;
|
|
124691
|
-
break;
|
|
124692
|
-
}
|
|
124693
|
-
var outputTime = ts.getModifiedTime(host, output);
|
|
124694
|
-
if (outputTime < oldestOutputFileTime) {
|
|
124695
|
-
oldestOutputFileTime = outputTime;
|
|
124696
|
-
oldestOutputFileName = output;
|
|
124697
|
-
}
|
|
124698
|
-
// If an output is older than the newest input, we can stop checking
|
|
124699
|
-
// Don't immediately return because we can still be upstream-blocked, which is a higher-priority status
|
|
124700
|
-
if (outputTime < newestInputFileTime) {
|
|
124701
|
-
isOutOfDateWithInputs = true;
|
|
124702
|
-
break;
|
|
124703
|
-
}
|
|
124704
|
-
if (outputTime > newestOutputFileTime) {
|
|
124705
|
-
newestOutputFileTime = outputTime;
|
|
124706
|
-
newestOutputFileName = output;
|
|
124707
|
-
}
|
|
124708
|
-
// Keep track of when the most recent time a .d.ts file was changed.
|
|
124709
|
-
// In addition to file timestamps, we also keep track of when a .d.ts file
|
|
124710
|
-
// had its file touched but not had its contents changed - this allows us
|
|
124711
|
-
// to skip a downstream typecheck
|
|
124712
|
-
if (ts.isDeclarationFileName(output)) {
|
|
124713
|
-
var outputModifiedTime = ts.getModifiedTime(host, output);
|
|
124714
|
-
newestDeclarationFileContentChangedTime = newer(newestDeclarationFileContentChangedTime, outputModifiedTime);
|
|
124715
|
-
}
|
|
124716
|
-
}
|
|
124717
|
-
}
|
|
124718
|
-
var pseudoUpToDate = false;
|
|
124719
|
-
var usesPrepend = false;
|
|
124720
|
-
var upstreamChangedProject;
|
|
124878
|
+
// Fast check to see if reference projects are buildable
|
|
124879
|
+
var referenceStatuses;
|
|
124880
|
+
var force = !!state.options.force;
|
|
124721
124881
|
if (project.projectReferences) {
|
|
124722
124882
|
state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.ComputingUpstream });
|
|
124723
|
-
for (var
|
|
124724
|
-
var ref = _d[
|
|
124725
|
-
usesPrepend = usesPrepend || !!(ref.prepend);
|
|
124883
|
+
for (var _i = 0, _d = project.projectReferences; _i < _d.length; _i++) {
|
|
124884
|
+
var ref = _d[_i];
|
|
124726
124885
|
var resolvedRef = ts.resolveProjectReferencePath(ref);
|
|
124727
124886
|
var resolvedRefPath = toResolvedConfigFilePath(state, resolvedRef);
|
|
124728
|
-
var
|
|
124887
|
+
var resolvedConfig = parseConfigFile(state, resolvedRef, resolvedRefPath);
|
|
124888
|
+
var refStatus = getUpToDateStatus(state, resolvedConfig, resolvedRefPath);
|
|
124729
124889
|
// Its a circular reference ignore the status of this project
|
|
124730
124890
|
if (refStatus.type === ts.UpToDateStatusType.ComputingUpstream ||
|
|
124731
124891
|
refStatus.type === ts.UpToDateStatusType.ContainerOnly) { // Container only ignore this project
|
|
@@ -124747,75 +124907,170 @@ var ts;
|
|
|
124747
124907
|
upstreamProjectName: ref.path
|
|
124748
124908
|
};
|
|
124749
124909
|
}
|
|
124750
|
-
|
|
124751
|
-
|
|
124752
|
-
|
|
124753
|
-
|
|
124754
|
-
|
|
124755
|
-
|
|
124756
|
-
|
|
124757
|
-
|
|
124758
|
-
|
|
124759
|
-
|
|
124760
|
-
|
|
124761
|
-
|
|
124762
|
-
|
|
124763
|
-
|
|
124764
|
-
|
|
124765
|
-
|
|
124766
|
-
|
|
124910
|
+
if (!force)
|
|
124911
|
+
(referenceStatuses || (referenceStatuses = [])).push({ ref: ref, refStatus: refStatus, resolvedRefPath: resolvedRefPath, resolvedConfig: resolvedConfig });
|
|
124912
|
+
}
|
|
124913
|
+
}
|
|
124914
|
+
if (force)
|
|
124915
|
+
return { type: ts.UpToDateStatusType.ForceBuild };
|
|
124916
|
+
// Check buildinfo first
|
|
124917
|
+
var host = state.host;
|
|
124918
|
+
var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(project.options);
|
|
124919
|
+
var oldestOutputFileName = "(none)";
|
|
124920
|
+
var oldestOutputFileTime = maximumDate;
|
|
124921
|
+
var buildInfoTime;
|
|
124922
|
+
var newestDeclarationFileContentChangedTime;
|
|
124923
|
+
if (buildInfoPath) {
|
|
124924
|
+
var buildInfoCacheEntry_1 = getBuildInfoCacheEntry(state, buildInfoPath, resolvedPath);
|
|
124925
|
+
buildInfoTime = (buildInfoCacheEntry_1 === null || buildInfoCacheEntry_1 === void 0 ? void 0 : buildInfoCacheEntry_1.modifiedTime) || ts.getModifiedTime(host, buildInfoPath);
|
|
124926
|
+
if (buildInfoTime === ts.missingFileModifiedTime) {
|
|
124927
|
+
if (!buildInfoCacheEntry_1) {
|
|
124928
|
+
state.buildInfoCache.set(resolvedPath, {
|
|
124929
|
+
path: toPath(state, buildInfoPath),
|
|
124930
|
+
buildInfo: false,
|
|
124931
|
+
modifiedTime: buildInfoTime
|
|
124932
|
+
});
|
|
124933
|
+
}
|
|
124934
|
+
return {
|
|
124935
|
+
type: ts.UpToDateStatusType.OutputMissing,
|
|
124936
|
+
missingOutputFileName: buildInfoPath
|
|
124937
|
+
};
|
|
124938
|
+
}
|
|
124939
|
+
var buildInfo = ts.Debug.checkDefined(getBuildInfo(state, buildInfoPath, resolvedPath, buildInfoTime));
|
|
124940
|
+
if ((buildInfo.bundle || buildInfo.program) && buildInfo.version !== ts.version) {
|
|
124941
|
+
return {
|
|
124942
|
+
type: ts.UpToDateStatusType.TsVersionOutputOfDate,
|
|
124943
|
+
version: buildInfo.version
|
|
124944
|
+
};
|
|
124945
|
+
}
|
|
124946
|
+
if (buildInfo.program) {
|
|
124947
|
+
if (((_a = buildInfo.program.changeFileSet) === null || _a === void 0 ? void 0 : _a.length) ||
|
|
124948
|
+
(!project.options.noEmit && ((_b = buildInfo.program.affectedFilesPendingEmit) === null || _b === void 0 ? void 0 : _b.length))) {
|
|
124767
124949
|
return {
|
|
124768
|
-
type: ts.UpToDateStatusType.
|
|
124769
|
-
|
|
124770
|
-
newerProjectName: ref.path
|
|
124950
|
+
type: ts.UpToDateStatusType.OutOfDateBuildInfo,
|
|
124951
|
+
buildInfoFile: buildInfoPath
|
|
124771
124952
|
};
|
|
124772
124953
|
}
|
|
124773
124954
|
}
|
|
124955
|
+
oldestOutputFileTime = buildInfoTime;
|
|
124956
|
+
oldestOutputFileName = buildInfoPath;
|
|
124957
|
+
newestDeclarationFileContentChangedTime = ((_c = buildInfo.program) === null || _c === void 0 ? void 0 : _c.dtsChangeTime) ? new Date(buildInfo.program.dtsChangeTime) : undefined;
|
|
124774
124958
|
}
|
|
124775
|
-
|
|
124776
|
-
|
|
124777
|
-
|
|
124778
|
-
|
|
124779
|
-
|
|
124959
|
+
// Check input files
|
|
124960
|
+
var newestInputFileName = undefined;
|
|
124961
|
+
var newestInputFileTime = minimumDate;
|
|
124962
|
+
// Get timestamps of input files
|
|
124963
|
+
for (var _e = 0, _f = project.fileNames; _e < _f.length; _e++) {
|
|
124964
|
+
var inputFile = _f[_e];
|
|
124965
|
+
var inputTime = getModifiedTime(state, inputFile);
|
|
124966
|
+
if (inputTime === ts.missingFileModifiedTime) {
|
|
124967
|
+
return {
|
|
124968
|
+
type: ts.UpToDateStatusType.Unbuildable,
|
|
124969
|
+
reason: inputFile + " does not exist"
|
|
124970
|
+
};
|
|
124971
|
+
}
|
|
124972
|
+
// If an buildInfo is older than the newest input, we can stop checking
|
|
124973
|
+
if (buildInfoTime && buildInfoTime < inputTime) {
|
|
124974
|
+
return {
|
|
124975
|
+
type: ts.UpToDateStatusType.OutOfDateWithSelf,
|
|
124976
|
+
outOfDateOutputFileName: buildInfoPath,
|
|
124977
|
+
newerInputFileName: inputFile
|
|
124978
|
+
};
|
|
124979
|
+
}
|
|
124980
|
+
if (inputTime > newestInputFileTime) {
|
|
124981
|
+
newestInputFileName = inputFile;
|
|
124982
|
+
newestInputFileTime = inputTime;
|
|
124983
|
+
}
|
|
124780
124984
|
}
|
|
124781
|
-
if
|
|
124782
|
-
|
|
124783
|
-
|
|
124784
|
-
|
|
124785
|
-
|
|
124786
|
-
|
|
124985
|
+
// Now see if all outputs are newer than the newest input
|
|
124986
|
+
// Dont check output timestamps if we have buildinfo telling us output is uptodate
|
|
124987
|
+
if (!buildInfoPath) {
|
|
124988
|
+
// Collect the expected outputs of this project
|
|
124989
|
+
var outputs = ts.getAllProjectOutputs(project, !host.useCaseSensitiveFileNames());
|
|
124990
|
+
var outputTimeStampMap = getOutputTimeStampMap(state, resolvedPath);
|
|
124991
|
+
for (var _g = 0, outputs_1 = outputs; _g < outputs_1.length; _g++) {
|
|
124992
|
+
var output = outputs_1[_g];
|
|
124993
|
+
var path = toPath(state, output);
|
|
124994
|
+
// Output is missing; can stop checking
|
|
124995
|
+
var outputTime = outputTimeStampMap === null || outputTimeStampMap === void 0 ? void 0 : outputTimeStampMap.get(path);
|
|
124996
|
+
if (!outputTime) {
|
|
124997
|
+
outputTime = ts.getModifiedTime(state.host, output);
|
|
124998
|
+
outputTimeStampMap === null || outputTimeStampMap === void 0 ? void 0 : outputTimeStampMap.set(path, outputTime);
|
|
124999
|
+
}
|
|
125000
|
+
if (outputTime === ts.missingFileModifiedTime) {
|
|
125001
|
+
return {
|
|
125002
|
+
type: ts.UpToDateStatusType.OutputMissing,
|
|
125003
|
+
missingOutputFileName: output
|
|
125004
|
+
};
|
|
125005
|
+
}
|
|
125006
|
+
if (outputTime < oldestOutputFileTime) {
|
|
125007
|
+
oldestOutputFileTime = outputTime;
|
|
125008
|
+
oldestOutputFileName = output;
|
|
125009
|
+
}
|
|
125010
|
+
// If an output is older than the newest input, we can stop checking
|
|
125011
|
+
if (outputTime < newestInputFileTime) {
|
|
125012
|
+
return {
|
|
125013
|
+
type: ts.UpToDateStatusType.OutOfDateWithSelf,
|
|
125014
|
+
outOfDateOutputFileName: oldestOutputFileName,
|
|
125015
|
+
newerInputFileName: newestInputFileName
|
|
125016
|
+
};
|
|
125017
|
+
}
|
|
125018
|
+
}
|
|
124787
125019
|
}
|
|
124788
|
-
|
|
124789
|
-
|
|
124790
|
-
|
|
124791
|
-
|
|
124792
|
-
|
|
124793
|
-
|
|
124794
|
-
|
|
124795
|
-
|
|
124796
|
-
|
|
124797
|
-
|
|
124798
|
-
|
|
124799
|
-
|
|
124800
|
-
|
|
124801
|
-
|
|
124802
|
-
|
|
124803
|
-
|
|
124804
|
-
|
|
124805
|
-
if (!force && !state.buildInfoChecked.has(resolvedPath)) {
|
|
124806
|
-
state.buildInfoChecked.set(resolvedPath, true);
|
|
124807
|
-
var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(project.options);
|
|
124808
|
-
if (buildInfoPath) {
|
|
124809
|
-
var value = state.readFileWithCache(buildInfoPath);
|
|
124810
|
-
var buildInfo = value && ts.getBuildInfo(value);
|
|
124811
|
-
if (buildInfo && (buildInfo.bundle || buildInfo.program) && buildInfo.version !== ts.version) {
|
|
125020
|
+
var seenRefs = buildInfoPath ? new ts.Set() : undefined;
|
|
125021
|
+
var buildInfoCacheEntry = state.buildInfoCache.get(resolvedPath);
|
|
125022
|
+
seenRefs === null || seenRefs === void 0 ? void 0 : seenRefs.add(resolvedPath);
|
|
125023
|
+
var pseudoUpToDate = false;
|
|
125024
|
+
var usesPrepend = false;
|
|
125025
|
+
var upstreamChangedProject;
|
|
125026
|
+
if (referenceStatuses) {
|
|
125027
|
+
for (var _h = 0, referenceStatuses_1 = referenceStatuses; _h < referenceStatuses_1.length; _h++) {
|
|
125028
|
+
var _j = referenceStatuses_1[_h], ref = _j.ref, refStatus = _j.refStatus, resolvedConfig = _j.resolvedConfig, resolvedRefPath = _j.resolvedRefPath;
|
|
125029
|
+
usesPrepend = usesPrepend || !!(ref.prepend);
|
|
125030
|
+
// If the upstream project's newest file is older than our oldest output, we
|
|
125031
|
+
// can't be out of date because of it
|
|
125032
|
+
if (refStatus.newestInputFileTime && refStatus.newestInputFileTime <= oldestOutputFileTime) {
|
|
125033
|
+
continue;
|
|
125034
|
+
}
|
|
125035
|
+
// Check if tsbuildinfo path is shared, then we need to rebuild
|
|
125036
|
+
if (buildInfoCacheEntry && hasSameBuildInfo(state, buildInfoCacheEntry, seenRefs, resolvedConfig, resolvedRefPath)) {
|
|
124812
125037
|
return {
|
|
124813
|
-
type: ts.UpToDateStatusType.
|
|
124814
|
-
|
|
125038
|
+
type: ts.UpToDateStatusType.OutOfDateWithUpstream,
|
|
125039
|
+
outOfDateOutputFileName: buildInfoPath,
|
|
125040
|
+
newerProjectName: ref.path
|
|
124815
125041
|
};
|
|
124816
125042
|
}
|
|
125043
|
+
// If the upstream project has only change .d.ts files, and we've built
|
|
125044
|
+
// *after* those files, then we're "psuedo up to date" and eligible for a fast rebuild
|
|
125045
|
+
if (refStatus.newestDeclarationFileContentChangedTime && refStatus.newestDeclarationFileContentChangedTime <= oldestOutputFileTime) {
|
|
125046
|
+
pseudoUpToDate = true;
|
|
125047
|
+
upstreamChangedProject = ref.path;
|
|
125048
|
+
continue;
|
|
125049
|
+
}
|
|
125050
|
+
// We have an output older than an upstream output - we are out of date
|
|
125051
|
+
ts.Debug.assert(oldestOutputFileName !== undefined, "Should have an oldest output filename here");
|
|
125052
|
+
return {
|
|
125053
|
+
type: ts.UpToDateStatusType.OutOfDateWithUpstream,
|
|
125054
|
+
outOfDateOutputFileName: oldestOutputFileName,
|
|
125055
|
+
newerProjectName: ref.path
|
|
125056
|
+
};
|
|
124817
125057
|
}
|
|
124818
125058
|
}
|
|
125059
|
+
// Check tsconfig time
|
|
125060
|
+
var configStatus = checkConfigFileUpToDateStatus(state, project.options.configFilePath, oldestOutputFileTime, oldestOutputFileName);
|
|
125061
|
+
if (configStatus)
|
|
125062
|
+
return configStatus;
|
|
125063
|
+
// Check extended config time
|
|
125064
|
+
var extendedConfigStatus = ts.forEach(project.options.configFile.extendedSourceFiles || ts.emptyArray, function (configFile) { return checkConfigFileUpToDateStatus(state, configFile, oldestOutputFileTime, oldestOutputFileName); });
|
|
125065
|
+
if (extendedConfigStatus)
|
|
125066
|
+
return extendedConfigStatus;
|
|
125067
|
+
// Check package file time
|
|
125068
|
+
var dependentPackageFileStatus = ts.forEach(state.lastCachedPackageJsonLookups.get(resolvedPath) || ts.emptyArray, function (_a) {
|
|
125069
|
+
var path = _a[0];
|
|
125070
|
+
return checkConfigFileUpToDateStatus(state, path, oldestOutputFileTime, oldestOutputFileName);
|
|
125071
|
+
});
|
|
125072
|
+
if (dependentPackageFileStatus)
|
|
125073
|
+
return dependentPackageFileStatus;
|
|
124819
125074
|
if (usesPrepend && pseudoUpToDate) {
|
|
124820
125075
|
return {
|
|
124821
125076
|
type: ts.UpToDateStatusType.OutOfDateWithPrepend,
|
|
@@ -124828,12 +125083,30 @@ var ts;
|
|
|
124828
125083
|
type: pseudoUpToDate ? ts.UpToDateStatusType.UpToDateWithUpstreamTypes : ts.UpToDateStatusType.UpToDate,
|
|
124829
125084
|
newestDeclarationFileContentChangedTime: newestDeclarationFileContentChangedTime,
|
|
124830
125085
|
newestInputFileTime: newestInputFileTime,
|
|
124831
|
-
newestOutputFileTime: newestOutputFileTime,
|
|
124832
125086
|
newestInputFileName: newestInputFileName,
|
|
124833
|
-
newestOutputFileName: newestOutputFileName,
|
|
124834
125087
|
oldestOutputFileName: oldestOutputFileName
|
|
124835
125088
|
};
|
|
124836
125089
|
}
|
|
125090
|
+
function hasSameBuildInfo(state, buildInfoCacheEntry, seenRefs, resolvedConfig, resolvedRefPath) {
|
|
125091
|
+
if (seenRefs.has(resolvedRefPath))
|
|
125092
|
+
return false;
|
|
125093
|
+
seenRefs.add(resolvedRefPath);
|
|
125094
|
+
var refBuildInfo = state.buildInfoCache.get(resolvedRefPath);
|
|
125095
|
+
if (refBuildInfo.path === buildInfoCacheEntry.path)
|
|
125096
|
+
return true;
|
|
125097
|
+
if (resolvedConfig.projectReferences) {
|
|
125098
|
+
// Check references
|
|
125099
|
+
for (var _i = 0, _a = resolvedConfig.projectReferences; _i < _a.length; _i++) {
|
|
125100
|
+
var ref = _a[_i];
|
|
125101
|
+
var resolvedRef = ts.resolveProjectReferencePath(ref);
|
|
125102
|
+
var resolvedRefPath_1 = toResolvedConfigFilePath(state, resolvedRef);
|
|
125103
|
+
var resolvedConfig_1 = parseConfigFile(state, resolvedRef, resolvedRefPath_1);
|
|
125104
|
+
if (hasSameBuildInfo(state, buildInfoCacheEntry, seenRefs, resolvedConfig_1, resolvedRefPath_1))
|
|
125105
|
+
return true;
|
|
125106
|
+
}
|
|
125107
|
+
}
|
|
125108
|
+
return false;
|
|
125109
|
+
}
|
|
124837
125110
|
function getUpToDateStatus(state, project, resolvedPath) {
|
|
124838
125111
|
if (project === undefined) {
|
|
124839
125112
|
return { type: ts.UpToDateStatusType.Unbuildable, reason: "File deleted mid-build" };
|
|
@@ -124846,39 +125119,65 @@ var ts;
|
|
|
124846
125119
|
state.projectStatus.set(resolvedPath, actual);
|
|
124847
125120
|
return actual;
|
|
124848
125121
|
}
|
|
124849
|
-
function updateOutputTimestampsWorker(state, proj,
|
|
125122
|
+
function updateOutputTimestampsWorker(state, proj, projectPath, verboseMessage, skipOutputs) {
|
|
124850
125123
|
if (proj.options.noEmit)
|
|
124851
|
-
return
|
|
125124
|
+
return;
|
|
125125
|
+
var now;
|
|
125126
|
+
var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(proj.options);
|
|
125127
|
+
if (buildInfoPath) {
|
|
125128
|
+
if (!(skipOutputs === null || skipOutputs === void 0 ? void 0 : skipOutputs.has(toPath(state, buildInfoPath)))) {
|
|
125129
|
+
if (!!state.options.verbose)
|
|
125130
|
+
reportStatus(state, verboseMessage, proj.options.configFilePath);
|
|
125131
|
+
state.host.setModifiedTime(buildInfoPath, now = getCurrentTime(state.host));
|
|
125132
|
+
getBuildInfoCacheEntry(state, buildInfoPath, projectPath).modifiedTime = now;
|
|
125133
|
+
}
|
|
125134
|
+
state.outputTimeStamps.delete(projectPath);
|
|
125135
|
+
return;
|
|
125136
|
+
}
|
|
124852
125137
|
var host = state.host;
|
|
124853
125138
|
var outputs = ts.getAllProjectOutputs(proj, !host.useCaseSensitiveFileNames());
|
|
125139
|
+
var outputTimeStampMap = getOutputTimeStampMap(state, projectPath);
|
|
125140
|
+
var modifiedOutputs = outputTimeStampMap ? new ts.Set() : undefined;
|
|
124854
125141
|
if (!skipOutputs || outputs.length !== skipOutputs.size) {
|
|
124855
125142
|
var reportVerbose = !!state.options.verbose;
|
|
124856
|
-
var now = host.now ? host.now() : new Date();
|
|
124857
125143
|
for (var _i = 0, outputs_2 = outputs; _i < outputs_2.length; _i++) {
|
|
124858
125144
|
var file = outputs_2[_i];
|
|
124859
|
-
|
|
125145
|
+
var path = toPath(state, file);
|
|
125146
|
+
if (skipOutputs === null || skipOutputs === void 0 ? void 0 : skipOutputs.has(path))
|
|
124860
125147
|
continue;
|
|
124861
|
-
}
|
|
124862
125148
|
if (reportVerbose) {
|
|
124863
125149
|
reportVerbose = false;
|
|
124864
125150
|
reportStatus(state, verboseMessage, proj.options.configFilePath);
|
|
124865
125151
|
}
|
|
124866
|
-
|
|
124867
|
-
|
|
125152
|
+
host.setModifiedTime(file, now || (now = getCurrentTime(state.host)));
|
|
125153
|
+
if (outputTimeStampMap) {
|
|
125154
|
+
outputTimeStampMap.set(path, now);
|
|
125155
|
+
modifiedOutputs.add(path);
|
|
124868
125156
|
}
|
|
124869
|
-
host.setModifiedTime(file, now);
|
|
124870
125157
|
}
|
|
124871
125158
|
}
|
|
124872
|
-
|
|
125159
|
+
// Clear out timestamps not in output list any more
|
|
125160
|
+
outputTimeStampMap === null || outputTimeStampMap === void 0 ? void 0 : outputTimeStampMap.forEach(function (_value, key) {
|
|
125161
|
+
if (!(skipOutputs === null || skipOutputs === void 0 ? void 0 : skipOutputs.has(key)) && !modifiedOutputs.has(key))
|
|
125162
|
+
outputTimeStampMap.delete(key);
|
|
125163
|
+
});
|
|
125164
|
+
}
|
|
125165
|
+
function getDtsChangeTime(state, options, resolvedConfigPath) {
|
|
125166
|
+
var _a;
|
|
125167
|
+
if (!options.composite)
|
|
125168
|
+
return undefined;
|
|
125169
|
+
var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(options);
|
|
125170
|
+
var buildInfo = getBuildInfo(state, buildInfoPath, resolvedConfigPath, /*modifiedTime*/ undefined);
|
|
125171
|
+
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;
|
|
124873
125172
|
}
|
|
124874
125173
|
function updateOutputTimestamps(state, proj, resolvedPath) {
|
|
124875
125174
|
if (state.options.dry) {
|
|
124876
125175
|
return reportStatus(state, ts.Diagnostics.A_non_dry_build_would_update_timestamps_for_output_of_project_0, proj.options.configFilePath);
|
|
124877
125176
|
}
|
|
124878
|
-
|
|
125177
|
+
updateOutputTimestampsWorker(state, proj, resolvedPath, ts.Diagnostics.Updating_output_timestamps_of_project_0);
|
|
124879
125178
|
state.projectStatus.set(resolvedPath, {
|
|
124880
125179
|
type: ts.UpToDateStatusType.UpToDate,
|
|
124881
|
-
newestDeclarationFileContentChangedTime:
|
|
125180
|
+
newestDeclarationFileContentChangedTime: getDtsChangeTime(state, proj.options, resolvedPath),
|
|
124882
125181
|
oldestOutputFileName: ts.getFirstProjectOutput(proj, !state.host.useCaseSensitiveFileNames())
|
|
124883
125182
|
});
|
|
124884
125183
|
}
|
|
@@ -125071,12 +125370,10 @@ var ts;
|
|
|
125071
125370
|
function watchConfigFile(state, resolved, resolvedPath, parsed) {
|
|
125072
125371
|
if (!state.watch || state.allWatchedConfigFiles.has(resolvedPath))
|
|
125073
125372
|
return;
|
|
125074
|
-
state.allWatchedConfigFiles.set(resolvedPath,
|
|
125075
|
-
invalidateProjectAndScheduleBuilds(state, resolvedPath, ts.ConfigFileProgramReloadLevel.Full);
|
|
125076
|
-
}, ts.PollingInterval.High, parsed === null || parsed === void 0 ? void 0 : parsed.watchOptions, ts.WatchType.ConfigFile, resolved));
|
|
125373
|
+
state.allWatchedConfigFiles.set(resolvedPath, watchFile(state, resolved, function () { return invalidateProjectAndScheduleBuilds(state, resolvedPath, ts.ConfigFileProgramReloadLevel.Full); }, ts.PollingInterval.High, parsed === null || parsed === void 0 ? void 0 : parsed.watchOptions, ts.WatchType.ConfigFile, resolved));
|
|
125077
125374
|
}
|
|
125078
125375
|
function watchExtendedConfigFiles(state, resolvedPath, parsed) {
|
|
125079
|
-
ts.updateSharedExtendedConfigFileWatcher(resolvedPath, parsed === null || parsed === void 0 ? void 0 : parsed.options, state.allWatchedExtendedConfigFiles, function (extendedConfigFileName, extendedConfigFilePath) { return
|
|
125376
|
+
ts.updateSharedExtendedConfigFileWatcher(resolvedPath, parsed === null || parsed === void 0 ? void 0 : parsed.options, state.allWatchedExtendedConfigFiles, function (extendedConfigFileName, extendedConfigFilePath) { return watchFile(state, extendedConfigFileName, function () {
|
|
125080
125377
|
var _a;
|
|
125081
125378
|
return (_a = state.allWatchedExtendedConfigFiles.get(extendedConfigFilePath)) === null || _a === void 0 ? void 0 : _a.projects.forEach(function (projectConfigFilePath) {
|
|
125082
125379
|
return invalidateProjectAndScheduleBuilds(state, projectConfigFilePath, ts.ConfigFileProgramReloadLevel.Full);
|
|
@@ -125108,7 +125405,7 @@ var ts;
|
|
|
125108
125405
|
if (!state.watch)
|
|
125109
125406
|
return;
|
|
125110
125407
|
ts.mutateMap(getOrCreateValueMapFromConfigFileMap(state.allWatchedInputFiles, resolvedPath), ts.arrayToMap(parsed.fileNames, function (fileName) { return toPath(state, fileName); }), {
|
|
125111
|
-
createNewValue: function (_path, input) { return
|
|
125408
|
+
createNewValue: function (_path, input) { return watchFile(state, input, function () { return invalidateProjectAndScheduleBuilds(state, resolvedPath, ts.ConfigFileProgramReloadLevel.None); }, ts.PollingInterval.Low, parsed === null || parsed === void 0 ? void 0 : parsed.watchOptions, ts.WatchType.SourceFile, resolved); },
|
|
125112
125409
|
onDeleteValue: ts.closeFileWatcher,
|
|
125113
125410
|
});
|
|
125114
125411
|
}
|
|
@@ -125116,7 +125413,7 @@ var ts;
|
|
|
125116
125413
|
if (!state.watch || !state.lastCachedPackageJsonLookups)
|
|
125117
125414
|
return;
|
|
125118
125415
|
ts.mutateMap(getOrCreateValueMapFromConfigFileMap(state.allWatchedPackageJsonFiles, resolvedPath), new ts.Map(state.lastCachedPackageJsonLookups.get(resolvedPath)), {
|
|
125119
|
-
createNewValue: function (path, _input) { return
|
|
125416
|
+
createNewValue: function (path, _input) { return watchFile(state, path, function () { return invalidateProjectAndScheduleBuilds(state, resolvedPath, ts.ConfigFileProgramReloadLevel.Full); }, ts.PollingInterval.High, parsed === null || parsed === void 0 ? void 0 : parsed.watchOptions, ts.WatchType.PackageJson, resolved); },
|
|
125120
125417
|
onDeleteValue: ts.closeFileWatcher,
|
|
125121
125418
|
});
|
|
125122
125419
|
}
|
|
@@ -125248,19 +125545,18 @@ var ts;
|
|
|
125248
125545
|
}
|
|
125249
125546
|
}
|
|
125250
125547
|
function reportUpToDateStatus(state, configFileName, status) {
|
|
125251
|
-
if (state.options.force && (status.type === ts.UpToDateStatusType.UpToDate || status.type === ts.UpToDateStatusType.UpToDateWithUpstreamTypes)) {
|
|
125252
|
-
return reportStatus(state, ts.Diagnostics.Project_0_is_being_forcibly_rebuilt, relName(state, configFileName));
|
|
125253
|
-
}
|
|
125254
125548
|
switch (status.type) {
|
|
125255
125549
|
case ts.UpToDateStatusType.OutOfDateWithSelf:
|
|
125256
|
-
return reportStatus(state, ts.Diagnostics.
|
|
125550
|
+
return reportStatus(state, ts.Diagnostics.Project_0_is_out_of_date_because_output_1_is_older_than_input_2, relName(state, configFileName), relName(state, status.outOfDateOutputFileName), relName(state, status.newerInputFileName));
|
|
125257
125551
|
case ts.UpToDateStatusType.OutOfDateWithUpstream:
|
|
125258
|
-
return reportStatus(state, ts.Diagnostics.
|
|
125552
|
+
return reportStatus(state, ts.Diagnostics.Project_0_is_out_of_date_because_output_1_is_older_than_input_2, relName(state, configFileName), relName(state, status.outOfDateOutputFileName), relName(state, status.newerProjectName));
|
|
125259
125553
|
case ts.UpToDateStatusType.OutputMissing:
|
|
125260
125554
|
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));
|
|
125555
|
+
case ts.UpToDateStatusType.OutOfDateBuildInfo:
|
|
125556
|
+
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));
|
|
125261
125557
|
case ts.UpToDateStatusType.UpToDate:
|
|
125262
125558
|
if (status.newestInputFileTime !== undefined) {
|
|
125263
|
-
return reportStatus(state, ts.Diagnostics.
|
|
125559
|
+
return reportStatus(state, ts.Diagnostics.Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2, relName(state, configFileName), relName(state, status.newestInputFileName || ""), relName(state, status.oldestOutputFileName || ""));
|
|
125264
125560
|
}
|
|
125265
125561
|
// Don't report anything for "up to date because it was already built" -- too verbose
|
|
125266
125562
|
break;
|
|
@@ -125278,6 +125574,8 @@ var ts;
|
|
|
125278
125574
|
return reportStatus(state, ts.Diagnostics.Failed_to_parse_file_0_Colon_1, relName(state, configFileName), status.reason);
|
|
125279
125575
|
case ts.UpToDateStatusType.TsVersionOutputOfDate:
|
|
125280
125576
|
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);
|
|
125577
|
+
case ts.UpToDateStatusType.ForceBuild:
|
|
125578
|
+
return reportStatus(state, ts.Diagnostics.Project_0_is_being_forcibly_rebuilt, relName(state, configFileName));
|
|
125281
125579
|
case ts.UpToDateStatusType.ContainerOnly:
|
|
125282
125580
|
// Don't report status on "solution" projects
|
|
125283
125581
|
// falls through
|