@typescript-deploys/pr-build 4.8.0-pr-49285-5 → 4.8.0-pr-48784-17

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 CHANGED
@@ -3749,7 +3749,7 @@ var ts;
3749
3749
  };
3750
3750
  }
3751
3751
  function createDirectoryWatcher(dirName, dirPath, fallbackOptions) {
3752
- var watcher = fsWatch(dirName, 1, function (_eventName, relativeFileName) {
3752
+ var watcher = fsWatch(dirName, 1, function (_eventName, relativeFileName, modifiedTime) {
3753
3753
  if (!ts.isString(relativeFileName))
3754
3754
  return;
3755
3755
  var fileName = ts.getNormalizedAbsolutePath(relativeFileName, dirName);
@@ -3757,7 +3757,7 @@ var ts;
3757
3757
  if (callbacks) {
3758
3758
  for (var _i = 0, callbacks_1 = callbacks; _i < callbacks_1.length; _i++) {
3759
3759
  var fileCallback = callbacks_1[_i];
3760
- fileCallback(fileName, FileWatcherEventKind.Changed);
3760
+ fileCallback(fileName, FileWatcherEventKind.Changed, modifiedTime);
3761
3761
  }
3762
3762
  }
3763
3763
  }, false, PollingInterval.Medium, fallbackOptions);
@@ -3809,7 +3809,7 @@ var ts;
3809
3809
  }
3810
3810
  else {
3811
3811
  cache.set(path, {
3812
- watcher: watchFile(fileName, function (fileName, eventKind) { return ts.forEach(callbacksCache.get(path), function (cb) { return cb(fileName, eventKind); }); }, pollingInterval, options),
3812
+ watcher: watchFile(fileName, function (fileName, eventKind, modifiedTime) { return ts.forEach(callbacksCache.get(path), function (cb) { return cb(fileName, eventKind, modifiedTime); }); }, pollingInterval, options),
3813
3813
  refCount: 1
3814
3814
  });
3815
3815
  }
@@ -3833,7 +3833,7 @@ var ts;
3833
3833
  var newTime = modifiedTime.getTime();
3834
3834
  if (oldTime !== newTime) {
3835
3835
  watchedFile.mtime = modifiedTime;
3836
- watchedFile.callback(watchedFile.fileName, getFileWatcherEventKind(oldTime, newTime));
3836
+ watchedFile.callback(watchedFile.fileName, getFileWatcherEventKind(oldTime, newTime), modifiedTime);
3837
3837
  return true;
3838
3838
  }
3839
3839
  return false;
@@ -4047,16 +4047,17 @@ var ts;
4047
4047
  }
4048
4048
  ts.createDirectoryWatcherSupportingRecursive = createDirectoryWatcherSupportingRecursive;
4049
4049
  function createFileWatcherCallback(callback) {
4050
- return function (_fileName, eventKind) { return callback(eventKind === FileWatcherEventKind.Changed ? "change" : "rename", ""); };
4050
+ return function (_fileName, eventKind, modifiedTime) { return callback(eventKind === FileWatcherEventKind.Changed ? "change" : "rename", "", modifiedTime); };
4051
4051
  }
4052
4052
  ts.createFileWatcherCallback = createFileWatcherCallback;
4053
- function createFsWatchCallbackForFileWatcherCallback(fileName, callback, fileExists) {
4054
- return function (eventName) {
4053
+ function createFsWatchCallbackForFileWatcherCallback(fileName, callback, getModifiedTime) {
4054
+ return function (eventName, _relativeFileName, modifiedTime) {
4055
4055
  if (eventName === "rename") {
4056
- callback(fileName, fileExists(fileName) ? FileWatcherEventKind.Created : FileWatcherEventKind.Deleted);
4056
+ modifiedTime || (modifiedTime = getModifiedTime(fileName) || ts.missingFileModifiedTime);
4057
+ callback(fileName, modifiedTime !== ts.missingFileModifiedTime ? FileWatcherEventKind.Created : FileWatcherEventKind.Deleted, modifiedTime);
4057
4058
  }
4058
4059
  else {
4059
- callback(fileName, FileWatcherEventKind.Changed);
4060
+ callback(fileName, FileWatcherEventKind.Changed, modifiedTime);
4060
4061
  }
4061
4062
  };
4062
4063
  }
@@ -4075,7 +4076,7 @@ var ts;
4075
4076
  };
4076
4077
  }
4077
4078
  function createSystemWatchFunctions(_a) {
4078
- var pollingWatchFile = _a.pollingWatchFile, getModifiedTime = _a.getModifiedTime, setTimeout = _a.setTimeout, clearTimeout = _a.clearTimeout, fsWatch = _a.fsWatch, fileExists = _a.fileExists, useCaseSensitiveFileNames = _a.useCaseSensitiveFileNames, getCurrentDirectory = _a.getCurrentDirectory, fsSupportsRecursiveFsWatch = _a.fsSupportsRecursiveFsWatch, directoryExists = _a.directoryExists, getAccessibleSortedChildDirectories = _a.getAccessibleSortedChildDirectories, realpath = _a.realpath, tscWatchFile = _a.tscWatchFile, useNonPollingWatchers = _a.useNonPollingWatchers, tscWatchDirectory = _a.tscWatchDirectory, defaultWatchFileKind = _a.defaultWatchFileKind;
4079
+ var pollingWatchFile = _a.pollingWatchFile, getModifiedTime = _a.getModifiedTime, setTimeout = _a.setTimeout, clearTimeout = _a.clearTimeout, fsWatch = _a.fsWatch, useCaseSensitiveFileNames = _a.useCaseSensitiveFileNames, getCurrentDirectory = _a.getCurrentDirectory, fsSupportsRecursiveFsWatch = _a.fsSupportsRecursiveFsWatch, directoryExists = _a.directoryExists, getAccessibleSortedChildDirectories = _a.getAccessibleSortedChildDirectories, realpath = _a.realpath, tscWatchFile = _a.tscWatchFile, useNonPollingWatchers = _a.useNonPollingWatchers, tscWatchDirectory = _a.tscWatchDirectory, defaultWatchFileKind = _a.defaultWatchFileKind;
4079
4080
  var dynamicPollingWatchFile;
4080
4081
  var fixedChunkSizePollingWatchFile;
4081
4082
  var nonPollingWatchFile;
@@ -4097,7 +4098,7 @@ var ts;
4097
4098
  case ts.WatchFileKind.FixedChunkSizePolling:
4098
4099
  return ensureFixedChunkSizePollingWatchFile()(fileName, callback, undefined, undefined);
4099
4100
  case ts.WatchFileKind.UseFsEvents:
4100
- return fsWatch(fileName, 0, createFsWatchCallbackForFileWatcherCallback(fileName, callback, fileExists), false, pollingInterval, ts.getFallbackOptions(options));
4101
+ return fsWatch(fileName, 0, createFsWatchCallbackForFileWatcherCallback(fileName, callback, getModifiedTime), false, pollingInterval, ts.getFallbackOptions(options));
4101
4102
  case ts.WatchFileKind.UseFsEventsOnParentDirectory:
4102
4103
  if (!nonPollingWatchFile) {
4103
4104
  nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames);
@@ -4254,7 +4255,6 @@ var ts;
4254
4255
  fsWatch: fsWatch,
4255
4256
  useCaseSensitiveFileNames: useCaseSensitiveFileNames,
4256
4257
  getCurrentDirectory: getCurrentDirectory,
4257
- fileExists: fileExists,
4258
4258
  fsSupportsRecursiveFsWatch: fsSupportsRecursiveFsWatch,
4259
4259
  directoryExists: directoryExists,
4260
4260
  getAccessibleSortedChildDirectories: function (path) { return getAccessibleFileSystemEntries(path).directories; },
@@ -4482,7 +4482,7 @@ var ts;
4482
4482
  else {
4483
4483
  eventKind = FileWatcherEventKind.Changed;
4484
4484
  }
4485
- callback(fileName, eventKind);
4485
+ callback(fileName, eventKind, curr.mtime);
4486
4486
  }
4487
4487
  }
4488
4488
  function fsWatch(fileOrDirectory, entryKind, callback, recursive, fallbackPollingInterval, fallbackOptions) {
@@ -4502,9 +4502,9 @@ var ts;
4502
4502
  watcher = undefined;
4503
4503
  }
4504
4504
  };
4505
- function invokeCallbackAndUpdateWatcher(createWatcher) {
4505
+ function invokeCallbackAndUpdateWatcher(createWatcher, modifiedTime) {
4506
4506
  sysLog("sysLog:: " + fileOrDirectory + ":: Changing watcher to " + (createWatcher === watchPresentFileSystemEntry ? "Present" : "Missing") + "FileSystemEntryWatcher");
4507
- callback("rename", "");
4507
+ callback("rename", "", modifiedTime);
4508
4508
  if (watcher) {
4509
4509
  watcher.close();
4510
4510
  watcher = createWatcher();
@@ -4537,21 +4537,25 @@ var ts;
4537
4537
  }
4538
4538
  }
4539
4539
  function callbackChangingToMissingFileSystemEntry(event, relativeName) {
4540
+ var modifiedTime = getModifiedTime(fileOrDirectory) || ts.missingFileModifiedTime;
4540
4541
  return event === "rename" &&
4541
4542
  (!relativeName ||
4542
4543
  relativeName === lastDirectoryPart ||
4543
4544
  (relativeName.lastIndexOf(lastDirectoryPartWithDirectorySeparator) !== -1 && relativeName.lastIndexOf(lastDirectoryPartWithDirectorySeparator) === relativeName.length - lastDirectoryPartWithDirectorySeparator.length)) &&
4544
- !fileSystemEntryExists(fileOrDirectory, entryKind) ?
4545
- invokeCallbackAndUpdateWatcher(watchMissingFileSystemEntry) :
4546
- callback(event, relativeName);
4545
+ modifiedTime === ts.missingFileModifiedTime ?
4546
+ invokeCallbackAndUpdateWatcher(watchMissingFileSystemEntry, modifiedTime) :
4547
+ callback(event, relativeName, modifiedTime);
4547
4548
  }
4548
4549
  function watchPresentFileSystemEntryWithFsWatchFile() {
4549
4550
  return watchFile(fileOrDirectory, createFileWatcherCallback(callback), fallbackPollingInterval, fallbackOptions);
4550
4551
  }
4551
4552
  function watchMissingFileSystemEntry() {
4552
- return watchFile(fileOrDirectory, function (_fileName, eventKind) {
4553
- if (eventKind === FileWatcherEventKind.Created && fileSystemEntryExists(fileOrDirectory, entryKind)) {
4554
- invokeCallbackAndUpdateWatcher(watchPresentFileSystemEntry);
4553
+ return watchFile(fileOrDirectory, function (_fileName, eventKind, modifiedTime) {
4554
+ if (eventKind === FileWatcherEventKind.Created) {
4555
+ modifiedTime || (modifiedTime = getModifiedTime(fileOrDirectory) || ts.missingFileModifiedTime);
4556
+ if (modifiedTime !== ts.missingFileModifiedTime) {
4557
+ invokeCallbackAndUpdateWatcher(watchPresentFileSystemEntry, modifiedTime);
4558
+ }
4555
4559
  }
4556
4560
  }, fallbackPollingInterval, fallbackOptions);
4557
4561
  }
@@ -4690,12 +4694,17 @@ var ts;
4690
4694
  }
4691
4695
  function getModifiedTime(path) {
4692
4696
  var _a;
4697
+ var originalStackTraceLimit = Error.stackTraceLimit;
4698
+ Error.stackTraceLimit = 0;
4693
4699
  try {
4694
4700
  return (_a = statSync(path)) === null || _a === void 0 ? void 0 : _a.mtime;
4695
4701
  }
4696
4702
  catch (e) {
4697
4703
  return undefined;
4698
4704
  }
4705
+ finally {
4706
+ Error.stackTraceLimit = originalStackTraceLimit;
4707
+ }
4699
4708
  }
4700
4709
  function setModifiedTime(path, time) {
4701
4710
  try {
@@ -6498,8 +6507,8 @@ var ts;
6498
6507
  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"),
6499
6508
  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"),
6500
6509
  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."),
6501
- Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2: diag(6350, ts.DiagnosticCategory.Message, "Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2_6350", "Project '{0}' is out of date because oldest output '{1}' is older than newest input '{2}'"),
6502
- Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2: diag(6351, ts.DiagnosticCategory.Message, "Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2_6351", "Project '{0}' is up to date because newest input '{1}' is older than oldest output '{2}'"),
6510
+ 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}'"),
6511
+ 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}'"),
6503
6512
  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"),
6504
6513
  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"),
6505
6514
  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"),
@@ -6543,6 +6552,8 @@ var ts;
6543
6552
  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}'."),
6544
6553
  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}'."),
6545
6554
  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."),
6555
+ 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"),
6556
+ Project_0_is_up_to_date_but_needs_update_to_timestamps_of_output_files_that_are_older_than_input_files: diag(6400, ts.DiagnosticCategory.Message, "Project_0_is_up_to_date_but_needs_update_to_timestamps_of_output_files_that_are_older_than_input_fil_6400", "Project '{0}' is up to date but needs update to timestamps of output files that are older than input files"),
6546
6557
  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}'"),
6547
6558
  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."),
6548
6559
  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."),
@@ -16009,6 +16020,10 @@ var ts;
16009
16020
  return optionsHaveChanges(oldOptions, newOptions, ts.affectsEmitOptionDeclarations);
16010
16021
  }
16011
16022
  ts.compilerOptionsAffectEmit = compilerOptionsAffectEmit;
16023
+ function compilerOptionsAffectDeclarationPath(newOptions, oldOptions) {
16024
+ return optionsHaveChanges(oldOptions, newOptions, ts.affectsDeclarationPathOptionDeclarations);
16025
+ }
16026
+ ts.compilerOptionsAffectDeclarationPath = compilerOptionsAffectDeclarationPath;
16012
16027
  function getCompilerOptionValue(options, option) {
16013
16028
  return option.strictFlag ? getStrictOptionValue(options, option.name) : options[option.name];
16014
16029
  }
@@ -31718,6 +31733,7 @@ var ts;
31718
31733
  type: "boolean",
31719
31734
  affectsSemanticDiagnostics: true,
31720
31735
  affectsEmit: true,
31736
+ affectsMultiFileEmitBuildInfo: true,
31721
31737
  category: ts.Diagnostics.Watch_and_Build_Modes,
31722
31738
  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,
31723
31739
  defaultValueDescription: false,
@@ -31751,12 +31767,39 @@ var ts;
31751
31767
  affectsSourceFile: true,
31752
31768
  affectsModuleResolution: true,
31753
31769
  affectsEmit: true,
31770
+ affectsMultiFileEmitBuildInfo: true,
31754
31771
  paramType: ts.Diagnostics.VERSION,
31755
31772
  showInSimplifiedHelpView: true,
31756
31773
  category: ts.Diagnostics.Language_and_Environment,
31757
31774
  description: ts.Diagnostics.Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations,
31758
31775
  defaultValueDescription: 0,
31759
31776
  };
31777
+ ts.moduleOptionDeclaration = {
31778
+ name: "module",
31779
+ shortName: "m",
31780
+ type: new ts.Map(ts.getEntries({
31781
+ none: ts.ModuleKind.None,
31782
+ commonjs: ts.ModuleKind.CommonJS,
31783
+ amd: ts.ModuleKind.AMD,
31784
+ system: ts.ModuleKind.System,
31785
+ umd: ts.ModuleKind.UMD,
31786
+ es6: ts.ModuleKind.ES2015,
31787
+ es2015: ts.ModuleKind.ES2015,
31788
+ es2020: ts.ModuleKind.ES2020,
31789
+ es2022: ts.ModuleKind.ES2022,
31790
+ esnext: ts.ModuleKind.ESNext,
31791
+ node16: ts.ModuleKind.Node16,
31792
+ nodenext: ts.ModuleKind.NodeNext,
31793
+ })),
31794
+ affectsModuleResolution: true,
31795
+ affectsEmit: true,
31796
+ affectsMultiFileEmitBuildInfo: true,
31797
+ paramType: ts.Diagnostics.KIND,
31798
+ showInSimplifiedHelpView: true,
31799
+ category: ts.Diagnostics.Modules,
31800
+ description: ts.Diagnostics.Specify_what_module_code_is_generated,
31801
+ defaultValueDescription: undefined,
31802
+ };
31760
31803
  var commandOptionsWithoutBuild = [
31761
31804
  {
31762
31805
  name: "all",
@@ -31817,36 +31860,13 @@ var ts;
31817
31860
  category: ts.Diagnostics.Command_line_Options,
31818
31861
  affectsSemanticDiagnostics: true,
31819
31862
  affectsEmit: true,
31863
+ affectsMultiFileEmitBuildInfo: true,
31820
31864
  isCommandLineOnly: true,
31821
31865
  description: ts.Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing,
31822
31866
  defaultValueDescription: false,
31823
31867
  },
31824
31868
  ts.targetOptionDeclaration,
31825
- {
31826
- name: "module",
31827
- shortName: "m",
31828
- type: new ts.Map(ts.getEntries({
31829
- none: ts.ModuleKind.None,
31830
- commonjs: ts.ModuleKind.CommonJS,
31831
- amd: ts.ModuleKind.AMD,
31832
- system: ts.ModuleKind.System,
31833
- umd: ts.ModuleKind.UMD,
31834
- es6: ts.ModuleKind.ES2015,
31835
- es2015: ts.ModuleKind.ES2015,
31836
- es2020: ts.ModuleKind.ES2020,
31837
- es2022: ts.ModuleKind.ES2022,
31838
- esnext: ts.ModuleKind.ESNext,
31839
- node16: ts.ModuleKind.Node16,
31840
- nodenext: ts.ModuleKind.NodeNext,
31841
- })),
31842
- affectsModuleResolution: true,
31843
- affectsEmit: true,
31844
- paramType: ts.Diagnostics.KIND,
31845
- showInSimplifiedHelpView: true,
31846
- category: ts.Diagnostics.Modules,
31847
- description: ts.Diagnostics.Specify_what_module_code_is_generated,
31848
- defaultValueDescription: undefined,
31849
- },
31869
+ ts.moduleOptionDeclaration,
31850
31870
  {
31851
31871
  name: "lib",
31852
31872
  type: "list",
@@ -31883,6 +31903,7 @@ var ts;
31883
31903
  type: jsxOptionMap,
31884
31904
  affectsSourceFile: true,
31885
31905
  affectsEmit: true,
31906
+ affectsMultiFileEmitBuildInfo: true,
31886
31907
  affectsModuleResolution: true,
31887
31908
  paramType: ts.Diagnostics.KIND,
31888
31909
  showInSimplifiedHelpView: true,
@@ -31895,6 +31916,7 @@ var ts;
31895
31916
  shortName: "d",
31896
31917
  type: "boolean",
31897
31918
  affectsEmit: true,
31919
+ affectsMultiFileEmitBuildInfo: true,
31898
31920
  showInSimplifiedHelpView: true,
31899
31921
  category: ts.Diagnostics.Emit,
31900
31922
  transpileOptionValue: undefined,
@@ -31905,6 +31927,7 @@ var ts;
31905
31927
  name: "declarationMap",
31906
31928
  type: "boolean",
31907
31929
  affectsEmit: true,
31930
+ affectsMultiFileEmitBuildInfo: true,
31908
31931
  showInSimplifiedHelpView: true,
31909
31932
  category: ts.Diagnostics.Emit,
31910
31933
  transpileOptionValue: undefined,
@@ -31915,6 +31938,7 @@ var ts;
31915
31938
  name: "emitDeclarationOnly",
31916
31939
  type: "boolean",
31917
31940
  affectsEmit: true,
31941
+ affectsMultiFileEmitBuildInfo: true,
31918
31942
  showInSimplifiedHelpView: true,
31919
31943
  category: ts.Diagnostics.Emit,
31920
31944
  description: ts.Diagnostics.Only_output_d_ts_files_and_not_JavaScript_files,
@@ -31925,6 +31949,7 @@ var ts;
31925
31949
  name: "sourceMap",
31926
31950
  type: "boolean",
31927
31951
  affectsEmit: true,
31952
+ affectsMultiFileEmitBuildInfo: true,
31928
31953
  showInSimplifiedHelpView: true,
31929
31954
  category: ts.Diagnostics.Emit,
31930
31955
  defaultValueDescription: false,
@@ -31934,6 +31959,9 @@ var ts;
31934
31959
  name: "outFile",
31935
31960
  type: "string",
31936
31961
  affectsEmit: true,
31962
+ affectsMultiFileEmitBuildInfo: true,
31963
+ affectsDeclarationPath: true,
31964
+ affectsBundleEmitBuildInfo: true,
31937
31965
  isFilePath: true,
31938
31966
  paramType: ts.Diagnostics.FILE,
31939
31967
  showInSimplifiedHelpView: true,
@@ -31945,6 +31973,8 @@ var ts;
31945
31973
  name: "outDir",
31946
31974
  type: "string",
31947
31975
  affectsEmit: true,
31976
+ affectsMultiFileEmitBuildInfo: true,
31977
+ affectsDeclarationPath: true,
31948
31978
  isFilePath: true,
31949
31979
  paramType: ts.Diagnostics.DIRECTORY,
31950
31980
  showInSimplifiedHelpView: true,
@@ -31955,6 +31985,8 @@ var ts;
31955
31985
  name: "rootDir",
31956
31986
  type: "string",
31957
31987
  affectsEmit: true,
31988
+ affectsMultiFileEmitBuildInfo: true,
31989
+ affectsDeclarationPath: true,
31958
31990
  isFilePath: true,
31959
31991
  paramType: ts.Diagnostics.LOCATION,
31960
31992
  category: ts.Diagnostics.Modules,
@@ -31965,6 +31997,8 @@ var ts;
31965
31997
  name: "composite",
31966
31998
  type: "boolean",
31967
31999
  affectsEmit: true,
32000
+ affectsMultiFileEmitBuildInfo: true,
32001
+ affectsBundleEmitBuildInfo: true,
31968
32002
  isTSConfigOnly: true,
31969
32003
  category: ts.Diagnostics.Projects,
31970
32004
  transpileOptionValue: undefined,
@@ -31975,6 +32009,8 @@ var ts;
31975
32009
  name: "tsBuildInfoFile",
31976
32010
  type: "string",
31977
32011
  affectsEmit: true,
32012
+ affectsMultiFileEmitBuildInfo: true,
32013
+ affectsBundleEmitBuildInfo: true,
31978
32014
  isFilePath: true,
31979
32015
  paramType: ts.Diagnostics.FILE,
31980
32016
  category: ts.Diagnostics.Projects,
@@ -31986,6 +32022,7 @@ var ts;
31986
32022
  name: "removeComments",
31987
32023
  type: "boolean",
31988
32024
  affectsEmit: true,
32025
+ affectsMultiFileEmitBuildInfo: true,
31989
32026
  showInSimplifiedHelpView: true,
31990
32027
  category: ts.Diagnostics.Emit,
31991
32028
  defaultValueDescription: false,
@@ -32004,6 +32041,7 @@ var ts;
32004
32041
  name: "importHelpers",
32005
32042
  type: "boolean",
32006
32043
  affectsEmit: true,
32044
+ affectsMultiFileEmitBuildInfo: true,
32007
32045
  category: ts.Diagnostics.Emit,
32008
32046
  description: ts.Diagnostics.Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file,
32009
32047
  defaultValueDescription: false,
@@ -32017,6 +32055,7 @@ var ts;
32017
32055
  })),
32018
32056
  affectsEmit: true,
32019
32057
  affectsSemanticDiagnostics: true,
32058
+ affectsMultiFileEmitBuildInfo: true,
32020
32059
  category: ts.Diagnostics.Emit,
32021
32060
  description: ts.Diagnostics.Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types,
32022
32061
  defaultValueDescription: 0,
@@ -32025,6 +32064,7 @@ var ts;
32025
32064
  name: "downlevelIteration",
32026
32065
  type: "boolean",
32027
32066
  affectsEmit: true,
32067
+ affectsMultiFileEmitBuildInfo: true,
32028
32068
  category: ts.Diagnostics.Emit,
32029
32069
  description: ts.Diagnostics.Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration,
32030
32070
  defaultValueDescription: false,
@@ -32040,6 +32080,7 @@ var ts;
32040
32080
  {
32041
32081
  name: "strict",
32042
32082
  type: "boolean",
32083
+ affectsMultiFileEmitBuildInfo: true,
32043
32084
  showInSimplifiedHelpView: true,
32044
32085
  category: ts.Diagnostics.Type_Checking,
32045
32086
  description: ts.Diagnostics.Enable_all_strict_type_checking_options,
@@ -32049,6 +32090,7 @@ var ts;
32049
32090
  name: "noImplicitAny",
32050
32091
  type: "boolean",
32051
32092
  affectsSemanticDiagnostics: true,
32093
+ affectsMultiFileEmitBuildInfo: true,
32052
32094
  strictFlag: true,
32053
32095
  category: ts.Diagnostics.Type_Checking,
32054
32096
  description: ts.Diagnostics.Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type,
@@ -32058,6 +32100,7 @@ var ts;
32058
32100
  name: "strictNullChecks",
32059
32101
  type: "boolean",
32060
32102
  affectsSemanticDiagnostics: true,
32103
+ affectsMultiFileEmitBuildInfo: true,
32061
32104
  strictFlag: true,
32062
32105
  category: ts.Diagnostics.Type_Checking,
32063
32106
  description: ts.Diagnostics.When_type_checking_take_into_account_null_and_undefined,
@@ -32066,6 +32109,8 @@ var ts;
32066
32109
  {
32067
32110
  name: "strictFunctionTypes",
32068
32111
  type: "boolean",
32112
+ affectsSemanticDiagnostics: true,
32113
+ affectsMultiFileEmitBuildInfo: true,
32069
32114
  strictFlag: true,
32070
32115
  category: ts.Diagnostics.Type_Checking,
32071
32116
  description: ts.Diagnostics.When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible,
@@ -32074,6 +32119,8 @@ var ts;
32074
32119
  {
32075
32120
  name: "strictBindCallApply",
32076
32121
  type: "boolean",
32122
+ affectsSemanticDiagnostics: true,
32123
+ affectsMultiFileEmitBuildInfo: true,
32077
32124
  strictFlag: true,
32078
32125
  category: ts.Diagnostics.Type_Checking,
32079
32126
  description: ts.Diagnostics.Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function,
@@ -32083,6 +32130,7 @@ var ts;
32083
32130
  name: "strictPropertyInitialization",
32084
32131
  type: "boolean",
32085
32132
  affectsSemanticDiagnostics: true,
32133
+ affectsMultiFileEmitBuildInfo: true,
32086
32134
  strictFlag: true,
32087
32135
  category: ts.Diagnostics.Type_Checking,
32088
32136
  description: ts.Diagnostics.Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor,
@@ -32092,6 +32140,7 @@ var ts;
32092
32140
  name: "noImplicitThis",
32093
32141
  type: "boolean",
32094
32142
  affectsSemanticDiagnostics: true,
32143
+ affectsMultiFileEmitBuildInfo: true,
32095
32144
  strictFlag: true,
32096
32145
  category: ts.Diagnostics.Type_Checking,
32097
32146
  description: ts.Diagnostics.Enable_error_reporting_when_this_is_given_the_type_any,
@@ -32101,6 +32150,7 @@ var ts;
32101
32150
  name: "useUnknownInCatchVariables",
32102
32151
  type: "boolean",
32103
32152
  affectsSemanticDiagnostics: true,
32153
+ affectsMultiFileEmitBuildInfo: true,
32104
32154
  strictFlag: true,
32105
32155
  category: ts.Diagnostics.Type_Checking,
32106
32156
  description: ts.Diagnostics.Default_catch_clause_variables_as_unknown_instead_of_any,
@@ -32110,6 +32160,8 @@ var ts;
32110
32160
  name: "alwaysStrict",
32111
32161
  type: "boolean",
32112
32162
  affectsSourceFile: true,
32163
+ affectsEmit: true,
32164
+ affectsMultiFileEmitBuildInfo: true,
32113
32165
  strictFlag: true,
32114
32166
  category: ts.Diagnostics.Type_Checking,
32115
32167
  description: ts.Diagnostics.Ensure_use_strict_is_always_emitted,
@@ -32119,6 +32171,7 @@ var ts;
32119
32171
  name: "noUnusedLocals",
32120
32172
  type: "boolean",
32121
32173
  affectsSemanticDiagnostics: true,
32174
+ affectsMultiFileEmitBuildInfo: true,
32122
32175
  category: ts.Diagnostics.Type_Checking,
32123
32176
  description: ts.Diagnostics.Enable_error_reporting_when_local_variables_aren_t_read,
32124
32177
  defaultValueDescription: false,
@@ -32127,6 +32180,7 @@ var ts;
32127
32180
  name: "noUnusedParameters",
32128
32181
  type: "boolean",
32129
32182
  affectsSemanticDiagnostics: true,
32183
+ affectsMultiFileEmitBuildInfo: true,
32130
32184
  category: ts.Diagnostics.Type_Checking,
32131
32185
  description: ts.Diagnostics.Raise_an_error_when_a_function_parameter_isn_t_read,
32132
32186
  defaultValueDescription: false,
@@ -32135,6 +32189,7 @@ var ts;
32135
32189
  name: "exactOptionalPropertyTypes",
32136
32190
  type: "boolean",
32137
32191
  affectsSemanticDiagnostics: true,
32192
+ affectsMultiFileEmitBuildInfo: true,
32138
32193
  category: ts.Diagnostics.Type_Checking,
32139
32194
  description: ts.Diagnostics.Interpret_optional_property_types_as_written_rather_than_adding_undefined,
32140
32195
  defaultValueDescription: false,
@@ -32143,6 +32198,7 @@ var ts;
32143
32198
  name: "noImplicitReturns",
32144
32199
  type: "boolean",
32145
32200
  affectsSemanticDiagnostics: true,
32201
+ affectsMultiFileEmitBuildInfo: true,
32146
32202
  category: ts.Diagnostics.Type_Checking,
32147
32203
  description: ts.Diagnostics.Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function,
32148
32204
  defaultValueDescription: false,
@@ -32152,6 +32208,7 @@ var ts;
32152
32208
  type: "boolean",
32153
32209
  affectsBindDiagnostics: true,
32154
32210
  affectsSemanticDiagnostics: true,
32211
+ affectsMultiFileEmitBuildInfo: true,
32155
32212
  category: ts.Diagnostics.Type_Checking,
32156
32213
  description: ts.Diagnostics.Enable_error_reporting_for_fallthrough_cases_in_switch_statements,
32157
32214
  defaultValueDescription: false,
@@ -32160,6 +32217,7 @@ var ts;
32160
32217
  name: "noUncheckedIndexedAccess",
32161
32218
  type: "boolean",
32162
32219
  affectsSemanticDiagnostics: true,
32220
+ affectsMultiFileEmitBuildInfo: true,
32163
32221
  category: ts.Diagnostics.Type_Checking,
32164
32222
  description: ts.Diagnostics.Add_undefined_to_a_type_when_accessed_using_an_index,
32165
32223
  defaultValueDescription: false,
@@ -32168,6 +32226,7 @@ var ts;
32168
32226
  name: "noImplicitOverride",
32169
32227
  type: "boolean",
32170
32228
  affectsSemanticDiagnostics: true,
32229
+ affectsMultiFileEmitBuildInfo: true,
32171
32230
  category: ts.Diagnostics.Type_Checking,
32172
32231
  description: ts.Diagnostics.Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier,
32173
32232
  defaultValueDescription: false,
@@ -32175,6 +32234,8 @@ var ts;
32175
32234
  {
32176
32235
  name: "noPropertyAccessFromIndexSignature",
32177
32236
  type: "boolean",
32237
+ affectsSemanticDiagnostics: true,
32238
+ affectsMultiFileEmitBuildInfo: true,
32178
32239
  showInSimplifiedHelpView: false,
32179
32240
  category: ts.Diagnostics.Type_Checking,
32180
32241
  description: ts.Diagnostics.Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type,
@@ -32255,6 +32316,7 @@ var ts;
32255
32316
  name: "allowSyntheticDefaultImports",
32256
32317
  type: "boolean",
32257
32318
  affectsSemanticDiagnostics: true,
32319
+ affectsMultiFileEmitBuildInfo: true,
32258
32320
  category: ts.Diagnostics.Interop_Constraints,
32259
32321
  description: ts.Diagnostics.Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export,
32260
32322
  defaultValueDescription: ts.Diagnostics.module_system_or_esModuleInterop
@@ -32264,6 +32326,7 @@ var ts;
32264
32326
  type: "boolean",
32265
32327
  affectsSemanticDiagnostics: true,
32266
32328
  affectsEmit: true,
32329
+ affectsMultiFileEmitBuildInfo: true,
32267
32330
  showInSimplifiedHelpView: true,
32268
32331
  category: ts.Diagnostics.Interop_Constraints,
32269
32332
  description: ts.Diagnostics.Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility,
@@ -32280,6 +32343,7 @@ var ts;
32280
32343
  name: "allowUmdGlobalAccess",
32281
32344
  type: "boolean",
32282
32345
  affectsSemanticDiagnostics: true,
32346
+ affectsMultiFileEmitBuildInfo: true,
32283
32347
  category: ts.Diagnostics.Modules,
32284
32348
  description: ts.Diagnostics.Allow_accessing_UMD_globals_from_modules,
32285
32349
  defaultValueDescription: false,
@@ -32300,6 +32364,7 @@ var ts;
32300
32364
  name: "sourceRoot",
32301
32365
  type: "string",
32302
32366
  affectsEmit: true,
32367
+ affectsMultiFileEmitBuildInfo: true,
32303
32368
  paramType: ts.Diagnostics.LOCATION,
32304
32369
  category: ts.Diagnostics.Emit,
32305
32370
  description: ts.Diagnostics.Specify_the_root_path_for_debuggers_to_find_the_reference_source_code,
@@ -32308,6 +32373,7 @@ var ts;
32308
32373
  name: "mapRoot",
32309
32374
  type: "string",
32310
32375
  affectsEmit: true,
32376
+ affectsMultiFileEmitBuildInfo: true,
32311
32377
  paramType: ts.Diagnostics.LOCATION,
32312
32378
  category: ts.Diagnostics.Emit,
32313
32379
  description: ts.Diagnostics.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations,
@@ -32316,6 +32382,7 @@ var ts;
32316
32382
  name: "inlineSourceMap",
32317
32383
  type: "boolean",
32318
32384
  affectsEmit: true,
32385
+ affectsMultiFileEmitBuildInfo: true,
32319
32386
  category: ts.Diagnostics.Emit,
32320
32387
  description: ts.Diagnostics.Include_sourcemap_files_inside_the_emitted_JavaScript,
32321
32388
  defaultValueDescription: false,
@@ -32324,6 +32391,7 @@ var ts;
32324
32391
  name: "inlineSources",
32325
32392
  type: "boolean",
32326
32393
  affectsEmit: true,
32394
+ affectsMultiFileEmitBuildInfo: true,
32327
32395
  category: ts.Diagnostics.Emit,
32328
32396
  description: ts.Diagnostics.Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript,
32329
32397
  defaultValueDescription: false,
@@ -32332,6 +32400,7 @@ var ts;
32332
32400
  name: "experimentalDecorators",
32333
32401
  type: "boolean",
32334
32402
  affectsSemanticDiagnostics: true,
32403
+ affectsMultiFileEmitBuildInfo: true,
32335
32404
  category: ts.Diagnostics.Language_and_Environment,
32336
32405
  description: ts.Diagnostics.Enable_experimental_support_for_TC39_stage_2_draft_decorators,
32337
32406
  defaultValueDescription: false,
@@ -32341,6 +32410,7 @@ var ts;
32341
32410
  type: "boolean",
32342
32411
  affectsSemanticDiagnostics: true,
32343
32412
  affectsEmit: true,
32413
+ affectsMultiFileEmitBuildInfo: true,
32344
32414
  category: ts.Diagnostics.Language_and_Environment,
32345
32415
  description: ts.Diagnostics.Emit_design_type_metadata_for_decorated_declarations_in_source_files,
32346
32416
  defaultValueDescription: false,
@@ -32364,6 +32434,7 @@ var ts;
32364
32434
  type: "string",
32365
32435
  affectsSemanticDiagnostics: true,
32366
32436
  affectsEmit: true,
32437
+ affectsMultiFileEmitBuildInfo: true,
32367
32438
  affectsModuleResolution: true,
32368
32439
  category: ts.Diagnostics.Language_and_Environment,
32369
32440
  description: ts.Diagnostics.Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk,
@@ -32381,6 +32452,9 @@ var ts;
32381
32452
  name: "out",
32382
32453
  type: "string",
32383
32454
  affectsEmit: true,
32455
+ affectsMultiFileEmitBuildInfo: true,
32456
+ affectsDeclarationPath: true,
32457
+ affectsBundleEmitBuildInfo: true,
32384
32458
  isFilePath: false,
32385
32459
  category: ts.Diagnostics.Backwards_Compatibility,
32386
32460
  paramType: ts.Diagnostics.FILE,
@@ -32391,6 +32465,7 @@ var ts;
32391
32465
  name: "reactNamespace",
32392
32466
  type: "string",
32393
32467
  affectsEmit: true,
32468
+ affectsMultiFileEmitBuildInfo: true,
32394
32469
  category: ts.Diagnostics.Language_and_Environment,
32395
32470
  description: ts.Diagnostics.Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit,
32396
32471
  defaultValueDescription: "`React`",
@@ -32398,6 +32473,7 @@ var ts;
32398
32473
  {
32399
32474
  name: "skipDefaultLibCheck",
32400
32475
  type: "boolean",
32476
+ affectsMultiFileEmitBuildInfo: true,
32401
32477
  category: ts.Diagnostics.Completeness,
32402
32478
  description: ts.Diagnostics.Skip_type_checking_d_ts_files_that_are_included_with_TypeScript,
32403
32479
  defaultValueDescription: false,
@@ -32413,6 +32489,7 @@ var ts;
32413
32489
  name: "emitBOM",
32414
32490
  type: "boolean",
32415
32491
  affectsEmit: true,
32492
+ affectsMultiFileEmitBuildInfo: true,
32416
32493
  category: ts.Diagnostics.Emit,
32417
32494
  description: ts.Diagnostics.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files,
32418
32495
  defaultValueDescription: false,
@@ -32424,6 +32501,7 @@ var ts;
32424
32501
  lf: 1
32425
32502
  })),
32426
32503
  affectsEmit: true,
32504
+ affectsMultiFileEmitBuildInfo: true,
32427
32505
  paramType: ts.Diagnostics.NEWLINE,
32428
32506
  category: ts.Diagnostics.Emit,
32429
32507
  description: ts.Diagnostics.Set_the_newline_character_for_emitting_files,
@@ -32433,6 +32511,7 @@ var ts;
32433
32511
  name: "noErrorTruncation",
32434
32512
  type: "boolean",
32435
32513
  affectsSemanticDiagnostics: true,
32514
+ affectsMultiFileEmitBuildInfo: true,
32436
32515
  category: ts.Diagnostics.Output_Formatting,
32437
32516
  description: ts.Diagnostics.Disable_truncating_types_in_error_messages,
32438
32517
  defaultValueDescription: false,
@@ -32459,6 +32538,7 @@ var ts;
32459
32538
  name: "stripInternal",
32460
32539
  type: "boolean",
32461
32540
  affectsEmit: true,
32541
+ affectsMultiFileEmitBuildInfo: true,
32462
32542
  category: ts.Diagnostics.Emit,
32463
32543
  description: ts.Diagnostics.Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments,
32464
32544
  defaultValueDescription: false,
@@ -32499,6 +32579,7 @@ var ts;
32499
32579
  name: "noImplicitUseStrict",
32500
32580
  type: "boolean",
32501
32581
  affectsSemanticDiagnostics: true,
32582
+ affectsMultiFileEmitBuildInfo: true,
32502
32583
  category: ts.Diagnostics.Backwards_Compatibility,
32503
32584
  description: ts.Diagnostics.Disable_adding_use_strict_directives_in_emitted_JavaScript_files,
32504
32585
  defaultValueDescription: false,
@@ -32507,6 +32588,7 @@ var ts;
32507
32588
  name: "noEmitHelpers",
32508
32589
  type: "boolean",
32509
32590
  affectsEmit: true,
32591
+ affectsMultiFileEmitBuildInfo: true,
32510
32592
  category: ts.Diagnostics.Emit,
32511
32593
  description: ts.Diagnostics.Disable_generating_custom_helper_functions_like_extends_in_compiled_output,
32512
32594
  defaultValueDescription: false,
@@ -32515,6 +32597,7 @@ var ts;
32515
32597
  name: "noEmitOnError",
32516
32598
  type: "boolean",
32517
32599
  affectsEmit: true,
32600
+ affectsMultiFileEmitBuildInfo: true,
32518
32601
  category: ts.Diagnostics.Emit,
32519
32602
  transpileOptionValue: undefined,
32520
32603
  description: ts.Diagnostics.Disable_emitting_files_if_any_type_checking_errors_are_reported,
@@ -32524,6 +32607,7 @@ var ts;
32524
32607
  name: "preserveConstEnums",
32525
32608
  type: "boolean",
32526
32609
  affectsEmit: true,
32610
+ affectsMultiFileEmitBuildInfo: true,
32527
32611
  category: ts.Diagnostics.Emit,
32528
32612
  description: ts.Diagnostics.Disable_erasing_const_enum_declarations_in_generated_code,
32529
32613
  defaultValueDescription: false,
@@ -32532,6 +32616,8 @@ var ts;
32532
32616
  name: "declarationDir",
32533
32617
  type: "string",
32534
32618
  affectsEmit: true,
32619
+ affectsMultiFileEmitBuildInfo: true,
32620
+ affectsDeclarationPath: true,
32535
32621
  isFilePath: true,
32536
32622
  paramType: ts.Diagnostics.DIRECTORY,
32537
32623
  category: ts.Diagnostics.Emit,
@@ -32541,6 +32627,7 @@ var ts;
32541
32627
  {
32542
32628
  name: "skipLibCheck",
32543
32629
  type: "boolean",
32630
+ affectsMultiFileEmitBuildInfo: true,
32544
32631
  category: ts.Diagnostics.Completeness,
32545
32632
  description: ts.Diagnostics.Skip_type_checking_all_d_ts_files,
32546
32633
  defaultValueDescription: false,
@@ -32550,6 +32637,7 @@ var ts;
32550
32637
  type: "boolean",
32551
32638
  affectsBindDiagnostics: true,
32552
32639
  affectsSemanticDiagnostics: true,
32640
+ affectsMultiFileEmitBuildInfo: true,
32553
32641
  category: ts.Diagnostics.Type_Checking,
32554
32642
  description: ts.Diagnostics.Disable_error_reporting_for_unused_labels,
32555
32643
  defaultValueDescription: undefined,
@@ -32559,6 +32647,7 @@ var ts;
32559
32647
  type: "boolean",
32560
32648
  affectsBindDiagnostics: true,
32561
32649
  affectsSemanticDiagnostics: true,
32650
+ affectsMultiFileEmitBuildInfo: true,
32562
32651
  category: ts.Diagnostics.Type_Checking,
32563
32652
  description: ts.Diagnostics.Disable_error_reporting_for_unreachable_code,
32564
32653
  defaultValueDescription: undefined,
@@ -32567,6 +32656,7 @@ var ts;
32567
32656
  name: "suppressExcessPropertyErrors",
32568
32657
  type: "boolean",
32569
32658
  affectsSemanticDiagnostics: true,
32659
+ affectsMultiFileEmitBuildInfo: true,
32570
32660
  category: ts.Diagnostics.Backwards_Compatibility,
32571
32661
  description: ts.Diagnostics.Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals,
32572
32662
  defaultValueDescription: false,
@@ -32575,6 +32665,7 @@ var ts;
32575
32665
  name: "suppressImplicitAnyIndexErrors",
32576
32666
  type: "boolean",
32577
32667
  affectsSemanticDiagnostics: true,
32668
+ affectsMultiFileEmitBuildInfo: true,
32578
32669
  category: ts.Diagnostics.Backwards_Compatibility,
32579
32670
  description: ts.Diagnostics.Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures,
32580
32671
  defaultValueDescription: false,
@@ -32599,6 +32690,7 @@ var ts;
32599
32690
  name: "noStrictGenericChecks",
32600
32691
  type: "boolean",
32601
32692
  affectsSemanticDiagnostics: true,
32693
+ affectsMultiFileEmitBuildInfo: true,
32602
32694
  category: ts.Diagnostics.Backwards_Compatibility,
32603
32695
  description: ts.Diagnostics.Disable_strict_checking_of_generic_signatures_in_function_types,
32604
32696
  defaultValueDescription: false,
@@ -32608,6 +32700,7 @@ var ts;
32608
32700
  type: "boolean",
32609
32701
  affectsSemanticDiagnostics: true,
32610
32702
  affectsEmit: true,
32703
+ affectsMultiFileEmitBuildInfo: true,
32611
32704
  category: ts.Diagnostics.Language_and_Environment,
32612
32705
  description: ts.Diagnostics.Emit_ECMAScript_standard_compliant_class_fields,
32613
32706
  defaultValueDescription: ts.Diagnostics.true_for_ES2022_and_above_including_ESNext
@@ -32616,6 +32709,7 @@ var ts;
32616
32709
  name: "preserveValueImports",
32617
32710
  type: "boolean",
32618
32711
  affectsEmit: true,
32712
+ affectsMultiFileEmitBuildInfo: true,
32619
32713
  category: ts.Diagnostics.Emit,
32620
32714
  description: ts.Diagnostics.Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed,
32621
32715
  defaultValueDescription: false,
@@ -32654,6 +32748,7 @@ var ts;
32654
32748
  ts.optionDeclarations = __spreadArray(__spreadArray([], ts.commonOptionsWithBuild, true), commandOptionsWithoutBuild, true);
32655
32749
  ts.semanticDiagnosticsOptionDeclarations = ts.optionDeclarations.filter(function (option) { return !!option.affectsSemanticDiagnostics; });
32656
32750
  ts.affectsEmitOptionDeclarations = ts.optionDeclarations.filter(function (option) { return !!option.affectsEmit; });
32751
+ ts.affectsDeclarationPathOptionDeclarations = ts.optionDeclarations.filter(function (option) { return !!option.affectsDeclarationPath; });
32657
32752
  ts.moduleResolutionOptionDeclarations = ts.optionDeclarations.filter(function (option) { return !!option.affectsModuleResolution; });
32658
32753
  ts.sourceFileAffectingCompilerOptions = ts.optionDeclarations.filter(function (option) {
32659
32754
  return !!option.affectsSourceFile || !!option.affectsModuleResolution || !!option.affectsBindDiagnostics;
@@ -33433,6 +33528,7 @@ var ts;
33433
33528
  }
33434
33529
  });
33435
33530
  }
33531
+ ts.getNameOfCompilerOptionValue = getNameOfCompilerOptionValue;
33436
33532
  function serializeCompilerOptions(options, pathOptions) {
33437
33533
  return serializeOptionBaseObject(options, getOptionsNameMap(), pathOptions);
33438
33534
  }
@@ -90533,7 +90629,8 @@ var ts;
90533
90629
  return;
90534
90630
  }
90535
90631
  var version = ts.version;
90536
- ts.writeFile(host, emitterDiagnostics, buildInfoPath, getBuildInfoText({ bundle: bundle, program: program, version: version }), false);
90632
+ var buildInfo = { bundle: bundle, program: program, version: version };
90633
+ ts.writeFile(host, emitterDiagnostics, buildInfoPath, getBuildInfoText(buildInfo), false, undefined, { buildInfo: buildInfo });
90537
90634
  }
90538
90635
  function emitJsFileOrBundle(sourceFileOrBundle, jsFilePath, sourceMapFilePath, relativeToBuildInfo) {
90539
90636
  if (!sourceFileOrBundle || emitOnlyDtsFiles || !jsFilePath) {
@@ -90674,12 +90771,17 @@ var ts;
90674
90771
  if (sourceMapFilePath) {
90675
90772
  var sourceMap = sourceMapGenerator.toString();
90676
90773
  ts.writeFile(host, emitterDiagnostics, sourceMapFilePath, sourceMap, false, sourceFiles);
90774
+ if (printer.bundleFileInfo)
90775
+ printer.bundleFileInfo.mapHash = ts.BuilderState.computeSignature(sourceMap, ts.maybeBind(host, host.createHash));
90677
90776
  }
90678
90777
  }
90679
90778
  else {
90680
90779
  writer.writeLine();
90681
90780
  }
90682
- ts.writeFile(host, emitterDiagnostics, jsFilePath, writer.getText(), !!compilerOptions.emitBOM, sourceFiles, { sourceMapUrlPos: sourceMapUrlPos });
90781
+ var text = writer.getText();
90782
+ ts.writeFile(host, emitterDiagnostics, jsFilePath, text, !!compilerOptions.emitBOM, sourceFiles, { sourceMapUrlPos: sourceMapUrlPos });
90783
+ if (printer.bundleFileInfo)
90784
+ printer.bundleFileInfo.hash = ts.BuilderState.computeSignature(text, ts.maybeBind(host, host.createHash));
90683
90785
  writer.clear();
90684
90786
  }
90685
90787
  function shouldEmitSourceMaps(mapOptions, sourceFileOrBundle) {
@@ -90804,30 +90906,50 @@ var ts;
90804
90906
  });
90805
90907
  }
90806
90908
  function emitUsingBuildInfo(config, host, getCommandLine, customTransformers) {
90909
+ var createHash = ts.maybeBind(host, host.createHash);
90807
90910
  var _a = getOutputPathsForBundle(config.options, false), buildInfoPath = _a.buildInfoPath, jsFilePath = _a.jsFilePath, sourceMapFilePath = _a.sourceMapFilePath, declarationFilePath = _a.declarationFilePath, declarationMapPath = _a.declarationMapPath;
90808
- var buildInfoText = host.readFile(ts.Debug.checkDefined(buildInfoPath));
90809
- if (!buildInfoText)
90911
+ var buildInfo;
90912
+ if (host.getBuildInfo) {
90913
+ var hostBuildInfo = host.getBuildInfo(buildInfoPath, config.options.configFilePath);
90914
+ if (!hostBuildInfo)
90915
+ return buildInfoPath;
90916
+ buildInfo = hostBuildInfo;
90917
+ }
90918
+ else {
90919
+ var buildInfoText = host.readFile(buildInfoPath);
90920
+ if (!buildInfoText)
90921
+ return buildInfoPath;
90922
+ buildInfo = getBuildInfo(buildInfoText);
90923
+ }
90924
+ if (!buildInfo.bundle || !buildInfo.bundle.js || (declarationFilePath && !buildInfo.bundle.dts))
90810
90925
  return buildInfoPath;
90811
90926
  var jsFileText = host.readFile(ts.Debug.checkDefined(jsFilePath));
90812
90927
  if (!jsFileText)
90813
90928
  return jsFilePath;
90929
+ if (ts.BuilderState.computeSignature(jsFileText, createHash) !== buildInfo.bundle.js.hash)
90930
+ return jsFilePath;
90814
90931
  var sourceMapText = sourceMapFilePath && host.readFile(sourceMapFilePath);
90815
90932
  if ((sourceMapFilePath && !sourceMapText) || config.options.inlineSourceMap)
90816
90933
  return sourceMapFilePath || "inline sourcemap decoding";
90934
+ if (sourceMapFilePath && ts.BuilderState.computeSignature(sourceMapText, createHash) !== buildInfo.bundle.js.mapHash)
90935
+ return sourceMapFilePath;
90817
90936
  var declarationText = declarationFilePath && host.readFile(declarationFilePath);
90818
90937
  if (declarationFilePath && !declarationText)
90819
90938
  return declarationFilePath;
90939
+ if (declarationFilePath && ts.BuilderState.computeSignature(declarationText, createHash) !== buildInfo.bundle.dts.hash)
90940
+ return declarationFilePath;
90820
90941
  var declarationMapText = declarationMapPath && host.readFile(declarationMapPath);
90821
90942
  if ((declarationMapPath && !declarationMapText) || config.options.inlineSourceMap)
90822
90943
  return declarationMapPath || "inline sourcemap decoding";
90823
- var buildInfo = getBuildInfo(buildInfoText);
90824
- if (!buildInfo.bundle || !buildInfo.bundle.js || (declarationText && !buildInfo.bundle.dts))
90825
- return buildInfoPath;
90944
+ if (declarationMapPath && ts.BuilderState.computeSignature(declarationMapText, createHash) !== buildInfo.bundle.dts.mapHash)
90945
+ return declarationMapPath;
90826
90946
  var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));
90827
90947
  var ownPrependInput = ts.createInputFiles(jsFileText, declarationText, sourceMapFilePath, sourceMapText, declarationMapPath, declarationMapText, jsFilePath, declarationFilePath, buildInfoPath, buildInfo, true);
90828
90948
  var outputFiles = [];
90829
90949
  var prependNodes = ts.createPrependNodes(config.projectReferences, getCommandLine, function (f) { return host.readFile(f); });
90830
90950
  var sourceFilesForJsEmit = createSourceFilesFromBundleBuildInfo(buildInfo.bundle, buildInfoDirectory, host);
90951
+ var changedDtsText;
90952
+ var changedDtsData;
90831
90953
  var emitHost = {
90832
90954
  getPrependNodes: ts.memoize(function () { return __spreadArray(__spreadArray([], prependNodes, true), [ownPrependInput], false); }),
90833
90955
  getCanonicalFileName: host.getCanonicalFileName,
@@ -90843,7 +90965,7 @@ var ts;
90843
90965
  getResolvedProjectReferenceToRedirect: ts.returnUndefined,
90844
90966
  getProjectReferenceRedirect: ts.returnUndefined,
90845
90967
  isSourceOfProjectReferenceRedirect: ts.returnFalse,
90846
- writeFile: function (name, text, writeByteOrderMark) {
90968
+ writeFile: function (name, text, writeByteOrderMark, _onError, _sourceFiles, data) {
90847
90969
  switch (name) {
90848
90970
  case jsFilePath:
90849
90971
  if (jsFileText === text)
@@ -90854,19 +90976,25 @@ var ts;
90854
90976
  return;
90855
90977
  break;
90856
90978
  case buildInfoPath:
90857
- var newBuildInfo = getBuildInfo(text);
90979
+ var newBuildInfo = data.buildInfo;
90858
90980
  newBuildInfo.program = buildInfo.program;
90981
+ if (newBuildInfo.program && changedDtsText !== undefined && config.options.composite) {
90982
+ newBuildInfo.program.outSignature = ts.computeSignature(changedDtsText, changedDtsData, createHash);
90983
+ newBuildInfo.program.dtsChangeTime = ts.getCurrentTime(host).getTime();
90984
+ }
90859
90985
  var _a = buildInfo.bundle, js = _a.js, dts = _a.dts, sourceFiles = _a.sourceFiles;
90860
90986
  newBuildInfo.bundle.js.sources = js.sources;
90861
90987
  if (dts) {
90862
90988
  newBuildInfo.bundle.dts.sources = dts.sources;
90863
90989
  }
90864
90990
  newBuildInfo.bundle.sourceFiles = sourceFiles;
90865
- outputFiles.push({ name: name, text: getBuildInfoText(newBuildInfo), writeByteOrderMark: writeByteOrderMark });
90991
+ outputFiles.push({ name: name, text: getBuildInfoText(newBuildInfo), writeByteOrderMark: writeByteOrderMark, buildInfo: newBuildInfo });
90866
90992
  return;
90867
90993
  case declarationFilePath:
90868
90994
  if (declarationText === text)
90869
90995
  return;
90996
+ changedDtsText = text;
90997
+ changedDtsData = data;
90870
90998
  break;
90871
90999
  case declarationMapPath:
90872
91000
  if (declarationMapText === text)
@@ -90885,6 +91013,7 @@ var ts;
90885
91013
  getSourceFileFromReference: ts.returnUndefined,
90886
91014
  redirectTargetsMap: ts.createMultiMap(),
90887
91015
  getFileIncludeReasons: ts.notImplemented,
91016
+ createHash: createHash,
90888
91017
  };
90889
91018
  emitFiles(ts.notImplementedResolver, emitHost, undefined, ts.getTransformers(config.options, customTransformers));
90890
91019
  return outputFiles;
@@ -95509,7 +95638,6 @@ var ts;
95509
95638
  if (system === void 0) { system = ts.sys; }
95510
95639
  var existingDirectories = new ts.Map();
95511
95640
  var getCanonicalFileName = ts.createGetCanonicalFileName(system.useCaseSensitiveFileNames);
95512
- var computeHash = ts.maybeBind(system, system.createHash) || ts.generateDjb2Hash;
95513
95641
  function getSourceFile(fileName, languageVersionOrOptions, onError) {
95514
95642
  var text;
95515
95643
  try {
@@ -95539,7 +95667,7 @@ var ts;
95539
95667
  function writeFile(fileName, data, writeByteOrderMark, onError) {
95540
95668
  try {
95541
95669
  ts.performance.mark("beforeIOWrite");
95542
- ts.writeFileEnsuringDirectories(fileName, data, writeByteOrderMark, function (path, data, writeByteOrderMark) { return writeFileWorker(path, data, writeByteOrderMark); }, function (path) { return (compilerHost.createDirectory || system.createDirectory)(path); }, function (path) { return directoryExists(path); });
95670
+ 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); });
95543
95671
  ts.performance.mark("afterIOWrite");
95544
95672
  ts.performance.measure("I/O Write", "beforeIOWrite", "afterIOWrite");
95545
95673
  }
@@ -95549,34 +95677,6 @@ var ts;
95549
95677
  }
95550
95678
  }
95551
95679
  }
95552
- var outputFingerprints;
95553
- function writeFileWorker(fileName, data, writeByteOrderMark) {
95554
- if (!ts.isWatchSet(options) || !system.getModifiedTime) {
95555
- system.writeFile(fileName, data, writeByteOrderMark);
95556
- return;
95557
- }
95558
- if (!outputFingerprints) {
95559
- outputFingerprints = new ts.Map();
95560
- }
95561
- var hash = computeHash(data);
95562
- var mtimeBefore = system.getModifiedTime(fileName);
95563
- if (mtimeBefore) {
95564
- var fingerprint = outputFingerprints.get(fileName);
95565
- if (fingerprint &&
95566
- fingerprint.byteOrderMark === writeByteOrderMark &&
95567
- fingerprint.hash === hash &&
95568
- fingerprint.mtime.getTime() === mtimeBefore.getTime()) {
95569
- return;
95570
- }
95571
- }
95572
- system.writeFile(fileName, data, writeByteOrderMark);
95573
- var mtimeAfter = system.getModifiedTime(fileName) || ts.missingFileModifiedTime;
95574
- outputFingerprints.set(fileName, {
95575
- hash: hash,
95576
- byteOrderMark: writeByteOrderMark,
95577
- mtime: mtimeAfter
95578
- });
95579
- }
95580
95680
  function getDefaultLibLocation() {
95581
95681
  return ts.getDirectoryPath(ts.normalizePath(system.getExecutingFilePath()));
95582
95682
  }
@@ -96950,6 +97050,7 @@ var ts;
96950
97050
  getSourceFileFromReference: function (file, ref) { return program.getSourceFileFromReference(file, ref); },
96951
97051
  redirectTargetsMap: redirectTargetsMap,
96952
97052
  getFileIncludeReasons: program.getFileIncludeReasons,
97053
+ createHash: ts.maybeBind(host, host.createHash),
96953
97054
  };
96954
97055
  }
96955
97056
  function writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data) {
@@ -98856,13 +98957,9 @@ var ts;
98856
98957
  function createManyToManyPathMap() {
98857
98958
  function create(forward, reverse, deleted) {
98858
98959
  var map = {
98859
- clone: function () { return create(new ts.Map(forward), new ts.Map(reverse), deleted && new ts.Set(deleted)); },
98860
- forEach: function (fn) { return forward.forEach(fn); },
98861
98960
  getKeys: function (v) { return reverse.get(v); },
98862
98961
  getValues: function (k) { return forward.get(k); },
98863
- hasKey: function (k) { return forward.has(k); },
98864
98962
  keys: function () { return forward.keys(); },
98865
- deletedKeys: function () { return deleted; },
98866
98963
  deleteKey: function (k) {
98867
98964
  (deleted || (deleted = new ts.Set())).add(k);
98868
98965
  var set = forward.get(k);
@@ -98889,11 +98986,6 @@ var ts;
98889
98986
  });
98890
98987
  return map;
98891
98988
  },
98892
- clear: function () {
98893
- forward.clear();
98894
- reverse.clear();
98895
- deleted === null || deleted === void 0 ? void 0 : deleted.clear();
98896
- }
98897
98989
  };
98898
98990
  return map;
98899
98991
  }
@@ -98997,35 +99089,45 @@ var ts;
98997
99089
  }
98998
99090
  BuilderState.canReuseOldState = canReuseOldState;
98999
99091
  function create(newProgram, getCanonicalFileName, oldState, disableUseFileVersionAsSignature) {
99092
+ var _a, _b, _c;
99000
99093
  var fileInfos = new ts.Map();
99001
99094
  var referencedMap = newProgram.getCompilerOptions().module !== ts.ModuleKind.None ? createManyToManyPathMap() : undefined;
99002
99095
  var exportedModulesMap = referencedMap ? createManyToManyPathMap() : undefined;
99003
- var hasCalledUpdateShapeSignature = new ts.Set();
99004
99096
  var useOldState = canReuseOldState(referencedMap, oldState);
99005
99097
  newProgram.getTypeChecker();
99006
- for (var _i = 0, _a = newProgram.getSourceFiles(); _i < _a.length; _i++) {
99007
- var sourceFile = _a[_i];
99098
+ for (var _i = 0, _d = newProgram.getSourceFiles(); _i < _d.length; _i++) {
99099
+ var sourceFile = _d[_i];
99008
99100
  var version_2 = ts.Debug.checkDefined(sourceFile.version, "Program intended to be used with Builder should have source files with versions set");
99009
- var oldInfo = useOldState ? oldState.fileInfos.get(sourceFile.resolvedPath) : undefined;
99101
+ var oldUncommitedSignature = useOldState ? (_a = oldState.oldSignatures) === null || _a === void 0 ? void 0 : _a.get(sourceFile.resolvedPath) : undefined;
99102
+ var signature = oldUncommitedSignature === undefined ?
99103
+ useOldState ? (_b = oldState.fileInfos.get(sourceFile.resolvedPath)) === null || _b === void 0 ? void 0 : _b.signature : undefined :
99104
+ oldUncommitedSignature || undefined;
99010
99105
  if (referencedMap) {
99011
99106
  var newReferences = getReferencedFiles(newProgram, sourceFile, getCanonicalFileName);
99012
99107
  if (newReferences) {
99013
99108
  referencedMap.set(sourceFile.resolvedPath, newReferences);
99014
99109
  }
99015
99110
  if (useOldState) {
99016
- var exportedModules = oldState.exportedModulesMap.getValues(sourceFile.resolvedPath);
99111
+ var oldUncommitedExportedModules = (_c = oldState.oldExportedModulesMap) === null || _c === void 0 ? void 0 : _c.get(sourceFile.resolvedPath);
99112
+ var exportedModules = oldUncommitedExportedModules === undefined ?
99113
+ oldState.exportedModulesMap.getValues(sourceFile.resolvedPath) :
99114
+ oldUncommitedExportedModules || undefined;
99017
99115
  if (exportedModules) {
99018
99116
  exportedModulesMap.set(sourceFile.resolvedPath, exportedModules);
99019
99117
  }
99020
99118
  }
99021
99119
  }
99022
- fileInfos.set(sourceFile.resolvedPath, { version: version_2, signature: oldInfo && oldInfo.signature, affectsGlobalScope: isFileAffectingGlobalScope(sourceFile) || undefined, impliedFormat: sourceFile.impliedNodeFormat });
99120
+ fileInfos.set(sourceFile.resolvedPath, {
99121
+ version: version_2,
99122
+ signature: signature,
99123
+ affectsGlobalScope: isFileAffectingGlobalScope(sourceFile) || undefined,
99124
+ impliedFormat: sourceFile.impliedNodeFormat
99125
+ });
99023
99126
  }
99024
99127
  return {
99025
99128
  fileInfos: fileInfos,
99026
99129
  referencedMap: referencedMap,
99027
99130
  exportedModulesMap: exportedModulesMap,
99028
- hasCalledUpdateShapeSignature: hasCalledUpdateShapeSignature,
99029
99131
  useFileVersionAsSignature: !disableUseFileVersionAsSignature && !useOldState
99030
99132
  };
99031
99133
  }
@@ -99035,52 +99137,36 @@ var ts;
99035
99137
  state.allFileNames = undefined;
99036
99138
  }
99037
99139
  BuilderState.releaseCache = releaseCache;
99038
- function clone(state) {
99140
+ function getFilesAffectedBy(state, programOfThisState, path, cancellationToken, computeHash) {
99039
99141
  var _a, _b;
99040
- return {
99041
- fileInfos: new ts.Map(state.fileInfos),
99042
- referencedMap: (_a = state.referencedMap) === null || _a === void 0 ? void 0 : _a.clone(),
99043
- exportedModulesMap: (_b = state.exportedModulesMap) === null || _b === void 0 ? void 0 : _b.clone(),
99044
- hasCalledUpdateShapeSignature: new ts.Set(state.hasCalledUpdateShapeSignature),
99045
- useFileVersionAsSignature: state.useFileVersionAsSignature,
99046
- };
99142
+ var result = getFilesAffectedByWithOldState(state, programOfThisState, path, cancellationToken, computeHash);
99143
+ (_a = state.oldSignatures) === null || _a === void 0 ? void 0 : _a.clear();
99144
+ (_b = state.oldExportedModulesMap) === null || _b === void 0 ? void 0 : _b.clear();
99145
+ return result;
99047
99146
  }
99048
- BuilderState.clone = clone;
99049
- function getFilesAffectedBy(state, programOfThisState, path, cancellationToken, computeHash, cacheToUpdateSignature, exportedModulesMapCache) {
99050
- var signatureCache = cacheToUpdateSignature || new ts.Map();
99147
+ BuilderState.getFilesAffectedBy = getFilesAffectedBy;
99148
+ function getFilesAffectedByWithOldState(state, programOfThisState, path, cancellationToken, computeHash) {
99051
99149
  var sourceFile = programOfThisState.getSourceFileByPath(path);
99052
99150
  if (!sourceFile) {
99053
99151
  return ts.emptyArray;
99054
99152
  }
99055
- if (!updateShapeSignature(state, programOfThisState, sourceFile, signatureCache, cancellationToken, computeHash, exportedModulesMapCache)) {
99153
+ if (!updateShapeSignature(state, programOfThisState, sourceFile, cancellationToken, computeHash)) {
99056
99154
  return [sourceFile];
99057
99155
  }
99058
- var result = (state.referencedMap ? getFilesAffectedByUpdatedShapeWhenModuleEmit : getFilesAffectedByUpdatedShapeWhenNonModuleEmit)(state, programOfThisState, sourceFile, signatureCache, cancellationToken, computeHash, exportedModulesMapCache);
99059
- if (!cacheToUpdateSignature) {
99060
- updateSignaturesFromCache(state, signatureCache);
99061
- }
99062
- return result;
99156
+ return (state.referencedMap ? getFilesAffectedByUpdatedShapeWhenModuleEmit : getFilesAffectedByUpdatedShapeWhenNonModuleEmit)(state, programOfThisState, sourceFile, cancellationToken, computeHash);
99063
99157
  }
99064
- BuilderState.getFilesAffectedBy = getFilesAffectedBy;
99065
- function updateSignaturesFromCache(state, signatureCache) {
99066
- signatureCache.forEach(function (signature, path) { return updateSignatureOfFile(state, signature, path); });
99067
- }
99068
- BuilderState.updateSignaturesFromCache = updateSignaturesFromCache;
99158
+ BuilderState.getFilesAffectedByWithOldState = getFilesAffectedByWithOldState;
99069
99159
  function updateSignatureOfFile(state, signature, path) {
99070
99160
  state.fileInfos.get(path).signature = signature;
99071
- state.hasCalledUpdateShapeSignature.add(path);
99161
+ (state.hasCalledUpdateShapeSignature || (state.hasCalledUpdateShapeSignature = new ts.Set())).add(path);
99072
99162
  }
99073
99163
  BuilderState.updateSignatureOfFile = updateSignatureOfFile;
99074
- function updateShapeSignature(state, programOfThisState, sourceFile, cacheToUpdateSignature, cancellationToken, computeHash, exportedModulesMapCache, useFileVersionAsSignature) {
99164
+ function updateShapeSignature(state, programOfThisState, sourceFile, cancellationToken, computeHash, useFileVersionAsSignature) {
99165
+ var _a;
99075
99166
  if (useFileVersionAsSignature === void 0) { useFileVersionAsSignature = state.useFileVersionAsSignature; }
99076
- ts.Debug.assert(!!sourceFile);
99077
- ts.Debug.assert(!exportedModulesMapCache || !!state.exportedModulesMap, "Compute visible to outside map only if visibleToOutsideReferencedMap present in the state");
99078
- if (state.hasCalledUpdateShapeSignature.has(sourceFile.resolvedPath) || cacheToUpdateSignature.has(sourceFile.resolvedPath)) {
99167
+ if ((_a = state.hasCalledUpdateShapeSignature) === null || _a === void 0 ? void 0 : _a.has(sourceFile.resolvedPath))
99079
99168
  return false;
99080
- }
99081
99169
  var info = state.fileInfos.get(sourceFile.resolvedPath);
99082
- if (!info)
99083
- return ts.Debug.fail();
99084
99170
  var prevSignature = info.signature;
99085
99171
  var latestSignature;
99086
99172
  if (!sourceFile.isDeclarationFile && !useFileVersionAsSignature) {
@@ -99088,40 +99174,50 @@ var ts;
99088
99174
  var firstDts_1 = ts.firstOrUndefined(emitOutput_1.outputFiles);
99089
99175
  if (firstDts_1) {
99090
99176
  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; })); });
99091
- latestSignature = (computeHash || ts.generateDjb2Hash)(firstDts_1.text);
99092
- if (exportedModulesMapCache && latestSignature !== prevSignature) {
99093
- updateExportedModules(sourceFile, emitOutput_1.exportedModulesFromDeclarationEmit, exportedModulesMapCache);
99177
+ latestSignature = computeSignature(firstDts_1.text, computeHash);
99178
+ if (latestSignature !== prevSignature) {
99179
+ updateExportedModules(state, sourceFile, emitOutput_1.exportedModulesFromDeclarationEmit);
99094
99180
  }
99095
99181
  }
99096
99182
  }
99097
99183
  if (latestSignature === undefined) {
99098
99184
  latestSignature = sourceFile.version;
99099
- if (exportedModulesMapCache && latestSignature !== prevSignature) {
99185
+ if (state.exportedModulesMap && latestSignature !== prevSignature) {
99186
+ (state.oldExportedModulesMap || (state.oldExportedModulesMap = new ts.Map())).set(sourceFile.resolvedPath, state.exportedModulesMap.getValues(sourceFile.resolvedPath) || false);
99100
99187
  var references = state.referencedMap ? state.referencedMap.getValues(sourceFile.resolvedPath) : undefined;
99101
99188
  if (references) {
99102
- exportedModulesMapCache.set(sourceFile.resolvedPath, references);
99189
+ state.exportedModulesMap.set(sourceFile.resolvedPath, references);
99103
99190
  }
99104
99191
  else {
99105
- exportedModulesMapCache.deleteKey(sourceFile.resolvedPath);
99192
+ state.exportedModulesMap.deleteKey(sourceFile.resolvedPath);
99106
99193
  }
99107
99194
  }
99108
99195
  }
99109
- cacheToUpdateSignature.set(sourceFile.resolvedPath, latestSignature);
99196
+ (state.oldSignatures || (state.oldSignatures = new ts.Map())).set(sourceFile.resolvedPath, prevSignature || false);
99197
+ (state.hasCalledUpdateShapeSignature || (state.hasCalledUpdateShapeSignature = new ts.Set())).add(sourceFile.resolvedPath);
99198
+ info.signature = latestSignature;
99110
99199
  return latestSignature !== prevSignature;
99111
99200
  }
99112
99201
  BuilderState.updateShapeSignature = updateShapeSignature;
99113
- function updateExportedModules(sourceFile, exportedModulesFromDeclarationEmit, exportedModulesMapCache) {
99202
+ function computeSignature(text, computeHash) {
99203
+ return (computeHash || ts.generateDjb2Hash)(text);
99204
+ }
99205
+ BuilderState.computeSignature = computeSignature;
99206
+ function updateExportedModules(state, sourceFile, exportedModulesFromDeclarationEmit) {
99207
+ if (!state.exportedModulesMap)
99208
+ return;
99209
+ (state.oldExportedModulesMap || (state.oldExportedModulesMap = new ts.Map())).set(sourceFile.resolvedPath, state.exportedModulesMap.getValues(sourceFile.resolvedPath) || false);
99114
99210
  if (!exportedModulesFromDeclarationEmit) {
99115
- exportedModulesMapCache.deleteKey(sourceFile.resolvedPath);
99211
+ state.exportedModulesMap.deleteKey(sourceFile.resolvedPath);
99116
99212
  return;
99117
99213
  }
99118
99214
  var exportedModules;
99119
99215
  exportedModulesFromDeclarationEmit.forEach(function (symbol) { return addExportedModule(getReferencedFilesFromImportedModuleSymbol(symbol)); });
99120
99216
  if (exportedModules) {
99121
- exportedModulesMapCache.set(sourceFile.resolvedPath, exportedModules);
99217
+ state.exportedModulesMap.set(sourceFile.resolvedPath, exportedModules);
99122
99218
  }
99123
99219
  else {
99124
- exportedModulesMapCache.deleteKey(sourceFile.resolvedPath);
99220
+ state.exportedModulesMap.deleteKey(sourceFile.resolvedPath);
99125
99221
  }
99126
99222
  function addExportedModule(exportedModulePaths) {
99127
99223
  if (exportedModulePaths === null || exportedModulePaths === void 0 ? void 0 : exportedModulePaths.length) {
@@ -99133,15 +99229,6 @@ var ts;
99133
99229
  }
99134
99230
  }
99135
99231
  BuilderState.updateExportedModules = updateExportedModules;
99136
- function updateExportedFilesMapFromCache(state, exportedModulesMapCache) {
99137
- var _a;
99138
- if (exportedModulesMapCache) {
99139
- ts.Debug.assert(!!state.exportedModulesMap);
99140
- (_a = exportedModulesMapCache.deletedKeys()) === null || _a === void 0 ? void 0 : _a.forEach(function (path) { return state.exportedModulesMap.deleteKey(path); });
99141
- exportedModulesMapCache.forEach(function (exportedModules, path) { return state.exportedModulesMap.set(path, exportedModules); });
99142
- }
99143
- }
99144
- BuilderState.updateExportedFilesMapFromCache = updateExportedFilesMapFromCache;
99145
99232
  function getAllDependencies(state, programOfThisState, sourceFile) {
99146
99233
  var compilerOptions = programOfThisState.getCompilerOptions();
99147
99234
  if (ts.outFile(compilerOptions)) {
@@ -99225,7 +99312,7 @@ var ts;
99225
99312
  }
99226
99313
  return getAllFilesExcludingDefaultLibraryFile(state, programOfThisState, sourceFileWithUpdatedShape);
99227
99314
  }
99228
- function getFilesAffectedByUpdatedShapeWhenModuleEmit(state, programOfThisState, sourceFileWithUpdatedShape, cacheToUpdateSignature, cancellationToken, computeHash, exportedModulesMapCache) {
99315
+ function getFilesAffectedByUpdatedShapeWhenModuleEmit(state, programOfThisState, sourceFileWithUpdatedShape, cancellationToken, computeHash) {
99229
99316
  if (isFileAffectingGlobalScope(sourceFileWithUpdatedShape)) {
99230
99317
  return getAllFilesExcludingDefaultLibraryFile(state, programOfThisState, sourceFileWithUpdatedShape);
99231
99318
  }
@@ -99241,7 +99328,7 @@ var ts;
99241
99328
  if (!seenFileNamesMap.has(currentPath)) {
99242
99329
  var currentSourceFile = programOfThisState.getSourceFileByPath(currentPath);
99243
99330
  seenFileNamesMap.set(currentPath, currentSourceFile);
99244
- if (currentSourceFile && updateShapeSignature(state, programOfThisState, currentSourceFile, cacheToUpdateSignature, cancellationToken, computeHash, exportedModulesMapCache)) {
99331
+ if (currentSourceFile && updateShapeSignature(state, programOfThisState, currentSourceFile, cancellationToken, computeHash)) {
99245
99332
  queue.push.apply(queue, getReferencedByPaths(state, currentSourceFile.resolvedPath));
99246
99333
  }
99247
99334
  }
@@ -99256,29 +99343,31 @@ var ts;
99256
99343
  return map1 === map2 || map1 !== undefined && map2 !== undefined && map1.size === map2.size && !ts.forEachKey(map1, function (key) { return !map2.has(key); });
99257
99344
  }
99258
99345
  function createBuilderProgramState(newProgram, getCanonicalFileName, oldState, disableUseFileVersionAsSignature) {
99346
+ var _a, _b;
99259
99347
  var state = ts.BuilderState.create(newProgram, getCanonicalFileName, oldState, disableUseFileVersionAsSignature);
99260
99348
  state.program = newProgram;
99261
99349
  var compilerOptions = newProgram.getCompilerOptions();
99262
99350
  state.compilerOptions = compilerOptions;
99263
- if (!ts.outFile(compilerOptions)) {
99351
+ var outFilePath = ts.outFile(compilerOptions);
99352
+ if (!outFilePath) {
99264
99353
  state.semanticDiagnosticsPerFile = new ts.Map();
99265
99354
  }
99355
+ 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)) {
99356
+ state.outSignature = oldState === null || oldState === void 0 ? void 0 : oldState.outSignature;
99357
+ }
99266
99358
  state.changedFilesSet = new ts.Set();
99359
+ state.dtsChangeTime = compilerOptions.composite ? oldState === null || oldState === void 0 ? void 0 : oldState.dtsChangeTime : undefined;
99267
99360
  var useOldState = ts.BuilderState.canReuseOldState(state.referencedMap, oldState);
99268
99361
  var oldCompilerOptions = useOldState ? oldState.compilerOptions : undefined;
99269
99362
  var canCopySemanticDiagnostics = useOldState && oldState.semanticDiagnosticsPerFile && !!state.semanticDiagnosticsPerFile &&
99270
99363
  !ts.compilerOptionsAffectSemanticDiagnostics(compilerOptions, oldCompilerOptions);
99364
+ var canCopyEmitSignatures = compilerOptions.composite &&
99365
+ (oldState === null || oldState === void 0 ? void 0 : oldState.emitSignatures) &&
99366
+ !outFilePath &&
99367
+ !ts.compilerOptionsAffectDeclarationPath(compilerOptions, oldCompilerOptions);
99271
99368
  if (useOldState) {
99272
- if (!oldState.currentChangedFilePath) {
99273
- var affectedSignatures = oldState.currentAffectedFilesSignatures;
99274
- ts.Debug.assert(!oldState.affectedFiles && (!affectedSignatures || !affectedSignatures.size), "Cannot reuse if only few affected files of currentChangedFile were iterated");
99275
- }
99276
- var changedFilesSet = oldState.changedFilesSet;
99277
- if (canCopySemanticDiagnostics) {
99278
- ts.Debug.assert(!changedFilesSet || !ts.forEachKey(changedFilesSet, function (path) { return oldState.semanticDiagnosticsPerFile.has(path); }), "Semantic diagnostics shouldnt be available for changed files");
99279
- }
99280
- changedFilesSet === null || changedFilesSet === void 0 ? void 0 : changedFilesSet.forEach(function (value) { return state.changedFilesSet.add(value); });
99281
- if (!ts.outFile(compilerOptions) && oldState.affectedFilesPendingEmit) {
99369
+ (_a = oldState.changedFilesSet) === null || _a === void 0 ? void 0 : _a.forEach(function (value) { return state.changedFilesSet.add(value); });
99370
+ if (!outFilePath && oldState.affectedFilesPendingEmit) {
99282
99371
  state.affectedFilesPendingEmit = oldState.affectedFilesPendingEmit.slice();
99283
99372
  state.affectedFilesPendingEmitKind = oldState.affectedFilesPendingEmitKind && new ts.Map(oldState.affectedFilesPendingEmitKind);
99284
99373
  state.affectedFilesPendingEmitIndex = oldState.affectedFilesPendingEmitIndex;
@@ -99295,6 +99384,7 @@ var ts;
99295
99384
  if (!useOldState ||
99296
99385
  !(oldInfo = oldState.fileInfos.get(sourceFilePath)) ||
99297
99386
  oldInfo.version !== info.version ||
99387
+ oldInfo.impliedFormat !== info.impliedFormat ||
99298
99388
  !hasSameKeys(newReferences = referencedMap && referencedMap.getValues(sourceFilePath), oldReferencedMap && oldReferencedMap.getValues(sourceFilePath)) ||
99299
99389
  newReferences && ts.forEachKey(newReferences, function (path) { return !state.fileInfos.has(path) && oldState.fileInfos.has(path); })) {
99300
99390
  state.changedFilesSet.add(sourceFilePath);
@@ -99314,24 +99404,22 @@ var ts;
99314
99404
  state.semanticDiagnosticsFromOldState.add(sourceFilePath);
99315
99405
  }
99316
99406
  }
99407
+ if (canCopyEmitSignatures) {
99408
+ var oldEmitSignature = oldState.emitSignatures.get(sourceFilePath);
99409
+ if (oldEmitSignature)
99410
+ (state.emitSignatures || (state.emitSignatures = new ts.Map())).set(sourceFilePath, oldEmitSignature);
99411
+ }
99317
99412
  });
99318
99413
  if (useOldState && ts.forEachEntry(oldState.fileInfos, function (info, sourceFilePath) { return info.affectsGlobalScope && !state.fileInfos.has(sourceFilePath); })) {
99319
99414
  ts.BuilderState.getAllFilesExcludingDefaultLibraryFile(state, newProgram, undefined)
99320
99415
  .forEach(function (file) { return state.changedFilesSet.add(file.resolvedPath); });
99321
99416
  }
99322
- else if (oldCompilerOptions && !ts.outFile(compilerOptions) && ts.compilerOptionsAffectEmit(compilerOptions, oldCompilerOptions)) {
99417
+ else if (oldCompilerOptions && !outFilePath && ts.compilerOptionsAffectEmit(compilerOptions, oldCompilerOptions)) {
99323
99418
  newProgram.getSourceFiles().forEach(function (f) { return addToAffectedFilesPendingEmit(state, f.resolvedPath, 1); });
99324
99419
  ts.Debug.assert(!state.seenAffectedFiles || !state.seenAffectedFiles.size);
99325
99420
  state.seenAffectedFiles = state.seenAffectedFiles || new ts.Set();
99326
99421
  }
99327
- if (useOldState) {
99328
- ts.forEachEntry(oldState.fileInfos, function (info, sourceFilePath) {
99329
- if (state.fileInfos.has(sourceFilePath) && state.fileInfos.get(sourceFilePath).impliedFormat !== info.impliedFormat) {
99330
- state.changedFilesSet.add(sourceFilePath);
99331
- }
99332
- });
99333
- }
99334
- state.buildInfoEmitPending = !!state.changedFilesSet.size;
99422
+ state.buildInfoEmitPending = !useOldState || state.changedFilesSet.size !== (((_b = oldState.changedFilesSet) === null || _b === void 0 ? void 0 : _b.size) || 0);
99335
99423
  return state;
99336
99424
  }
99337
99425
  function convertToDiagnostics(diagnostics, newProgram, getCanonicalFileName) {
@@ -99364,33 +99452,40 @@ var ts;
99364
99452
  ts.BuilderState.releaseCache(state);
99365
99453
  state.program = undefined;
99366
99454
  }
99367
- function cloneBuilderProgramState(state) {
99368
- var _a;
99369
- var newState = ts.BuilderState.clone(state);
99370
- newState.semanticDiagnosticsPerFile = state.semanticDiagnosticsPerFile && new ts.Map(state.semanticDiagnosticsPerFile);
99371
- newState.changedFilesSet = new ts.Set(state.changedFilesSet);
99372
- newState.affectedFiles = state.affectedFiles;
99373
- newState.affectedFilesIndex = state.affectedFilesIndex;
99374
- newState.currentChangedFilePath = state.currentChangedFilePath;
99375
- newState.currentAffectedFilesSignatures = state.currentAffectedFilesSignatures && new ts.Map(state.currentAffectedFilesSignatures);
99376
- newState.currentAffectedFilesExportedModulesMap = (_a = state.currentAffectedFilesExportedModulesMap) === null || _a === void 0 ? void 0 : _a.clone();
99377
- newState.seenAffectedFiles = state.seenAffectedFiles && new ts.Set(state.seenAffectedFiles);
99378
- newState.cleanedDiagnosticsOfLibFiles = state.cleanedDiagnosticsOfLibFiles;
99379
- newState.semanticDiagnosticsFromOldState = state.semanticDiagnosticsFromOldState && new ts.Set(state.semanticDiagnosticsFromOldState);
99380
- newState.program = state.program;
99381
- newState.compilerOptions = state.compilerOptions;
99382
- newState.affectedFilesPendingEmit = state.affectedFilesPendingEmit && state.affectedFilesPendingEmit.slice();
99383
- newState.affectedFilesPendingEmitKind = state.affectedFilesPendingEmitKind && new ts.Map(state.affectedFilesPendingEmitKind);
99384
- newState.affectedFilesPendingEmitIndex = state.affectedFilesPendingEmitIndex;
99385
- newState.seenEmittedFiles = state.seenEmittedFiles && new ts.Map(state.seenEmittedFiles);
99386
- newState.programEmitComplete = state.programEmitComplete;
99387
- return newState;
99455
+ function backupEmitBuilderProgramState(state) {
99456
+ var outFilePath = ts.outFile(state.compilerOptions);
99457
+ ts.Debug.assert(!state.changedFilesSet.size || outFilePath);
99458
+ return {
99459
+ affectedFilesPendingEmit: state.affectedFilesPendingEmit && state.affectedFilesPendingEmit.slice(),
99460
+ affectedFilesPendingEmitKind: state.affectedFilesPendingEmitKind && new ts.Map(state.affectedFilesPendingEmitKind),
99461
+ affectedFilesPendingEmitIndex: state.affectedFilesPendingEmitIndex,
99462
+ seenEmittedFiles: state.seenEmittedFiles && new ts.Map(state.seenEmittedFiles),
99463
+ programEmitComplete: state.programEmitComplete,
99464
+ emitSignatures: state.emitSignatures && new ts.Map(state.emitSignatures),
99465
+ outSignature: state.outSignature,
99466
+ dtsChangeTime: state.dtsChangeTime,
99467
+ hasChangedEmitSignature: state.hasChangedEmitSignature,
99468
+ changedFilesSet: outFilePath ? new ts.Set(state.changedFilesSet) : undefined,
99469
+ };
99470
+ }
99471
+ function restoreEmitBuilderProgramState(state, backupEmitState) {
99472
+ state.affectedFilesPendingEmit = backupEmitState.affectedFilesPendingEmit;
99473
+ state.affectedFilesPendingEmitKind = backupEmitState.affectedFilesPendingEmitKind;
99474
+ state.affectedFilesPendingEmitIndex = backupEmitState.affectedFilesPendingEmitIndex;
99475
+ state.seenEmittedFiles = backupEmitState.seenEmittedFiles;
99476
+ state.programEmitComplete = backupEmitState.programEmitComplete;
99477
+ state.emitSignatures = backupEmitState.emitSignatures;
99478
+ state.outSignature = backupEmitState.outSignature;
99479
+ state.dtsChangeTime = backupEmitState.dtsChangeTime;
99480
+ state.hasChangedEmitSignature = backupEmitState.hasChangedEmitSignature;
99481
+ if (backupEmitState.changedFilesSet)
99482
+ state.changedFilesSet = backupEmitState.changedFilesSet;
99388
99483
  }
99389
99484
  function assertSourceFileOkWithoutNextAffectedCall(state, sourceFile) {
99390
99485
  ts.Debug.assert(!sourceFile || !state.affectedFiles || state.affectedFiles[state.affectedFilesIndex - 1] !== sourceFile || !state.semanticDiagnosticsPerFile.has(sourceFile.resolvedPath));
99391
99486
  }
99392
99487
  function getNextAffectedFile(state, cancellationToken, computeHash, host) {
99393
- var _a;
99488
+ var _a, _b;
99394
99489
  while (true) {
99395
99490
  var affectedFiles = state.affectedFiles;
99396
99491
  if (affectedFiles) {
@@ -99407,10 +99502,8 @@ var ts;
99407
99502
  }
99408
99503
  state.changedFilesSet.delete(state.currentChangedFilePath);
99409
99504
  state.currentChangedFilePath = undefined;
99410
- ts.BuilderState.updateSignaturesFromCache(state, state.currentAffectedFilesSignatures);
99411
- state.currentAffectedFilesSignatures.clear();
99412
- ts.BuilderState.updateExportedFilesMapFromCache(state, state.currentAffectedFilesExportedModulesMap);
99413
- (_a = state.currentAffectedFilesExportedModulesMap) === null || _a === void 0 ? void 0 : _a.clear();
99505
+ (_a = state.oldSignatures) === null || _a === void 0 ? void 0 : _a.clear();
99506
+ (_b = state.oldExportedModulesMap) === null || _b === void 0 ? void 0 : _b.clear();
99414
99507
  state.affectedFiles = undefined;
99415
99508
  }
99416
99509
  var nextKey = state.changedFilesSet.keys().next();
@@ -99423,12 +99516,7 @@ var ts;
99423
99516
  ts.Debug.assert(!state.semanticDiagnosticsPerFile);
99424
99517
  return program;
99425
99518
  }
99426
- if (!state.currentAffectedFilesSignatures)
99427
- state.currentAffectedFilesSignatures = new ts.Map();
99428
- if (state.exportedModulesMap) {
99429
- state.currentAffectedFilesExportedModulesMap || (state.currentAffectedFilesExportedModulesMap = ts.BuilderState.createManyToManyPathMap());
99430
- }
99431
- state.affectedFiles = ts.BuilderState.getFilesAffectedBy(state, program, nextKey.value, cancellationToken, computeHash, state.currentAffectedFilesSignatures, state.currentAffectedFilesExportedModulesMap);
99519
+ state.affectedFiles = ts.BuilderState.getFilesAffectedByWithOldState(state, program, nextKey.value, cancellationToken, computeHash);
99432
99520
  state.currentChangedFilePath = nextKey.value;
99433
99521
  state.affectedFilesIndex = 0;
99434
99522
  if (!state.seenAffectedFiles)
@@ -99472,14 +99560,12 @@ var ts;
99472
99560
  }
99473
99561
  }
99474
99562
  function handleDtsMayChangeOfAffectedFile(state, affectedFile, cancellationToken, computeHash, host) {
99475
- var _a;
99476
99563
  removeSemanticDiagnosticsOf(state, affectedFile.resolvedPath);
99477
99564
  if (state.allFilesExcludingDefaultLibraryFile === state.affectedFiles) {
99478
99565
  removeDiagnosticsOfLibraryFiles(state);
99479
- ts.BuilderState.updateShapeSignature(state, ts.Debug.checkDefined(state.program), affectedFile, ts.Debug.checkDefined(state.currentAffectedFilesSignatures), cancellationToken, computeHash, state.currentAffectedFilesExportedModulesMap);
99566
+ ts.BuilderState.updateShapeSignature(state, ts.Debug.checkDefined(state.program), affectedFile, cancellationToken, computeHash);
99480
99567
  return;
99481
99568
  }
99482
- 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);
99483
99569
  if (state.compilerOptions.assumeChangesOnlyAffectDirectDependencies)
99484
99570
  return;
99485
99571
  handleDtsMayChangeOfReferencingExportOfAffectedFile(state, affectedFile, cancellationToken, computeHash, host);
@@ -99490,7 +99576,7 @@ var ts;
99490
99576
  var program = ts.Debug.checkDefined(state.program);
99491
99577
  var sourceFile = program.getSourceFileByPath(path);
99492
99578
  if (sourceFile) {
99493
- ts.BuilderState.updateShapeSignature(state, program, sourceFile, ts.Debug.checkDefined(state.currentAffectedFilesSignatures), cancellationToken, computeHash, state.currentAffectedFilesExportedModulesMap, !host.disableUseFileVersionAsSignature);
99579
+ ts.BuilderState.updateShapeSignature(state, program, sourceFile, cancellationToken, computeHash, !host.disableUseFileVersionAsSignature);
99494
99580
  if (ts.getEmitDeclarations(state.compilerOptions)) {
99495
99581
  addToAffectedFilesPendingEmit(state, path, 0);
99496
99582
  }
@@ -99506,24 +99592,10 @@ var ts;
99506
99592
  return !state.semanticDiagnosticsFromOldState.size;
99507
99593
  }
99508
99594
  function isChangedSignature(state, path) {
99509
- var newSignature = ts.Debug.checkDefined(state.currentAffectedFilesSignatures).get(path);
99510
- var oldSignature = ts.Debug.checkDefined(state.fileInfos.get(path)).signature;
99595
+ var oldSignature = ts.Debug.checkDefined(state.oldSignatures).get(path) || undefined;
99596
+ var newSignature = ts.Debug.checkDefined(state.fileInfos.get(path)).signature;
99511
99597
  return newSignature !== oldSignature;
99512
99598
  }
99513
- function forEachKeyOfExportedModulesMap(state, filePath, fn) {
99514
- var keys = state.currentAffectedFilesExportedModulesMap.getKeys(filePath);
99515
- var result = keys && ts.forEachKey(keys, fn);
99516
- if (result)
99517
- return result;
99518
- keys = state.exportedModulesMap.getKeys(filePath);
99519
- return keys && ts.forEachKey(keys, function (exportedFromPath) {
99520
- var _a;
99521
- return !state.currentAffectedFilesExportedModulesMap.hasKey(exportedFromPath) &&
99522
- !((_a = state.currentAffectedFilesExportedModulesMap.deletedKeys()) === null || _a === void 0 ? void 0 : _a.has(exportedFromPath)) ?
99523
- fn(exportedFromPath) :
99524
- undefined;
99525
- });
99526
- }
99527
99599
  function handleDtsMayChangeOfGlobalScope(state, filePath, cancellationToken, computeHash, host) {
99528
99600
  var _a;
99529
99601
  if (!((_a = state.fileInfos.get(filePath)) === null || _a === void 0 ? void 0 : _a.affectsGlobalScope))
@@ -99534,6 +99606,7 @@ var ts;
99534
99606
  return true;
99535
99607
  }
99536
99608
  function handleDtsMayChangeOfReferencingExportOfAffectedFile(state, affectedFile, cancellationToken, computeHash, host) {
99609
+ var _a;
99537
99610
  if (!state.exportedModulesMap || !state.changedFilesSet.has(affectedFile.resolvedPath))
99538
99611
  return;
99539
99612
  if (!isChangedSignature(state, affectedFile.resolvedPath))
@@ -99556,9 +99629,8 @@ var ts;
99556
99629
  }
99557
99630
  }
99558
99631
  }
99559
- ts.Debug.assert(!!state.currentAffectedFilesExportedModulesMap);
99560
99632
  var seenFileAndExportsOfFile = new ts.Set();
99561
- forEachKeyOfExportedModulesMap(state, affectedFile.resolvedPath, function (exportedFromPath) {
99633
+ (_a = state.exportedModulesMap.getKeys(affectedFile.resolvedPath)) === null || _a === void 0 ? void 0 : _a.forEach(function (exportedFromPath) {
99562
99634
  if (handleDtsMayChangeOfGlobalScope(state, exportedFromPath, cancellationToken, computeHash, host))
99563
99635
  return true;
99564
99636
  var references = state.referencedMap.getKeys(exportedFromPath);
@@ -99568,17 +99640,16 @@ var ts;
99568
99640
  });
99569
99641
  }
99570
99642
  function handleDtsMayChangeOfFileAndExportsOfFile(state, filePath, seenFileAndExportsOfFile, cancellationToken, computeHash, host) {
99571
- var _a;
99643
+ var _a, _b;
99572
99644
  if (!ts.tryAddToSet(seenFileAndExportsOfFile, filePath))
99573
99645
  return undefined;
99574
99646
  if (handleDtsMayChangeOfGlobalScope(state, filePath, cancellationToken, computeHash, host))
99575
99647
  return true;
99576
99648
  handleDtsMayChangeOf(state, filePath, cancellationToken, computeHash, host);
99577
- ts.Debug.assert(!!state.currentAffectedFilesExportedModulesMap);
99578
- forEachKeyOfExportedModulesMap(state, filePath, function (exportedFromPath) {
99649
+ (_a = state.exportedModulesMap.getKeys(filePath)) === null || _a === void 0 ? void 0 : _a.forEach(function (exportedFromPath) {
99579
99650
  return handleDtsMayChangeOfFileAndExportsOfFile(state, exportedFromPath, seenFileAndExportsOfFile, cancellationToken, computeHash, host);
99580
99651
  });
99581
- (_a = state.referencedMap.getKeys(filePath)) === null || _a === void 0 ? void 0 : _a.forEach(function (referencingFilePath) {
99652
+ (_b = state.referencedMap.getKeys(filePath)) === null || _b === void 0 ? void 0 : _b.forEach(function (referencingFilePath) {
99582
99653
  return !seenFileAndExportsOfFile.has(referencingFilePath) &&
99583
99654
  handleDtsMayChangeOf(state, referencingFilePath, cancellationToken, computeHash, host);
99584
99655
  });
@@ -99594,12 +99665,12 @@ var ts;
99594
99665
  }
99595
99666
  else {
99596
99667
  state.seenAffectedFiles.add(affected.resolvedPath);
99668
+ state.buildInfoEmitPending = true;
99597
99669
  if (emitKind !== undefined) {
99598
99670
  (state.seenEmittedFiles || (state.seenEmittedFiles = new ts.Map())).set(affected.resolvedPath, emitKind);
99599
99671
  }
99600
99672
  if (isPendingEmit) {
99601
99673
  state.affectedFilesPendingEmitIndex++;
99602
- state.buildInfoEmitPending = true;
99603
99674
  }
99604
99675
  else {
99605
99676
  state.affectedFilesIndex++;
@@ -99631,29 +99702,65 @@ var ts;
99631
99702
  }
99632
99703
  return ts.filterSemanticDiagnostics(diagnostics, state.compilerOptions);
99633
99704
  }
99634
- function getProgramBuildInfo(state, getCanonicalFileName) {
99635
- if (ts.outFile(state.compilerOptions))
99636
- return undefined;
99705
+ function isProgramBundleEmitBuildInfo(info) {
99706
+ return !!ts.outFile(info.options || {});
99707
+ }
99708
+ ts.isProgramBundleEmitBuildInfo = isProgramBundleEmitBuildInfo;
99709
+ function getProgramBuildInfo(state, getCanonicalFileName, host) {
99710
+ var outFilePath = ts.outFile(state.compilerOptions);
99711
+ if (outFilePath && !state.compilerOptions.composite)
99712
+ return;
99637
99713
  var currentDirectory = ts.Debug.checkDefined(state.program).getCurrentDirectory();
99638
99714
  var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(ts.getTsBuildInfoEmitOutputFilePath(state.compilerOptions), currentDirectory));
99715
+ state.dtsChangeTime = state.hasChangedEmitSignature ? ts.getCurrentTime(host).getTime() : state.dtsChangeTime;
99716
+ if (outFilePath) {
99717
+ var fileNames_1 = [];
99718
+ var fileInfos_1 = [];
99719
+ state.program.getRootFileNames().forEach(function (f) {
99720
+ var sourceFile = state.program.getSourceFile(f);
99721
+ if (!sourceFile)
99722
+ return;
99723
+ fileNames_1.push(relativeToBuildInfo(sourceFile.resolvedPath));
99724
+ fileInfos_1.push(sourceFile.version);
99725
+ });
99726
+ var result_15 = {
99727
+ fileNames: fileNames_1,
99728
+ fileInfos: fileInfos_1,
99729
+ options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions, "affectsBundleEmitBuildInfo"),
99730
+ outSignature: state.outSignature,
99731
+ dtsChangeTime: state.dtsChangeTime,
99732
+ };
99733
+ return result_15;
99734
+ }
99639
99735
  var fileNames = [];
99640
99736
  var fileNameToFileId = new ts.Map();
99641
99737
  var fileIdsList;
99642
99738
  var fileNamesToFileIdListId;
99739
+ var emitSignatures;
99643
99740
  var fileInfos = ts.arrayFrom(state.fileInfos.entries(), function (_a) {
99741
+ var _b, _c;
99644
99742
  var key = _a[0], value = _a[1];
99645
99743
  var fileId = toFileId(key);
99646
99744
  ts.Debug.assert(fileNames[fileId - 1] === relativeToBuildInfo(key));
99647
- var signature = state.currentAffectedFilesSignatures && state.currentAffectedFilesSignatures.get(key);
99648
- var actualSignature = signature !== null && signature !== void 0 ? signature : value.signature;
99745
+ var oldSignature = (_b = state.oldSignatures) === null || _b === void 0 ? void 0 : _b.get(key);
99746
+ var actualSignature = oldSignature !== undefined ? oldSignature || undefined : value.signature;
99747
+ if (state.compilerOptions.composite) {
99748
+ var file = state.program.getSourceFileByPath(key);
99749
+ if (!ts.isJsonSourceFile(file) && ts.sourceFileMayBeEmitted(file, state.program)) {
99750
+ var emitSignature = (_c = state.emitSignatures) === null || _c === void 0 ? void 0 : _c.get(key);
99751
+ if (emitSignature !== actualSignature) {
99752
+ (emitSignatures || (emitSignatures = [])).push(emitSignature === undefined ? fileId : [fileId, emitSignature]);
99753
+ }
99754
+ }
99755
+ }
99649
99756
  return value.version === actualSignature ?
99650
99757
  value.affectsGlobalScope || value.impliedFormat ?
99651
99758
  { version: value.version, signature: undefined, affectsGlobalScope: value.affectsGlobalScope, impliedFormat: value.impliedFormat } :
99652
99759
  value.version :
99653
99760
  actualSignature !== undefined ?
99654
- signature === undefined ?
99761
+ oldSignature === undefined ?
99655
99762
  value :
99656
- { version: value.version, signature: signature, affectsGlobalScope: value.affectsGlobalScope, impliedFormat: value.impliedFormat } :
99763
+ { version: value.version, signature: actualSignature, affectsGlobalScope: value.affectsGlobalScope, impliedFormat: value.impliedFormat } :
99657
99764
  { version: value.version, signature: false, affectsGlobalScope: value.affectsGlobalScope, impliedFormat: value.impliedFormat };
99658
99765
  });
99659
99766
  var referencedMap;
@@ -99667,16 +99774,12 @@ var ts;
99667
99774
  if (state.exportedModulesMap) {
99668
99775
  exportedModulesMap = ts.mapDefined(ts.arrayFrom(state.exportedModulesMap.keys()).sort(ts.compareStringsCaseSensitive), function (key) {
99669
99776
  var _a;
99670
- if (state.currentAffectedFilesExportedModulesMap) {
99671
- if ((_a = state.currentAffectedFilesExportedModulesMap.deletedKeys()) === null || _a === void 0 ? void 0 : _a.has(key)) {
99672
- return undefined;
99673
- }
99674
- var newValue = state.currentAffectedFilesExportedModulesMap.getValues(key);
99675
- if (newValue) {
99676
- return [toFileId(key), toFileIdListId(newValue)];
99677
- }
99678
- }
99679
- return [toFileId(key), toFileIdListId(state.exportedModulesMap.getValues(key))];
99777
+ var oldValue = (_a = state.oldExportedModulesMap) === null || _a === void 0 ? void 0 : _a.get(key);
99778
+ if (oldValue === undefined)
99779
+ return [toFileId(key), toFileIdListId(state.exportedModulesMap.getValues(key))];
99780
+ if (oldValue)
99781
+ return [toFileId(key), toFileIdListId(oldValue)];
99782
+ return undefined;
99680
99783
  });
99681
99784
  }
99682
99785
  var semanticDiagnosticsPerFile;
@@ -99687,9 +99790,7 @@ var ts;
99687
99790
  (semanticDiagnosticsPerFile || (semanticDiagnosticsPerFile = [])).push(value.length ?
99688
99791
  [
99689
99792
  toFileId(key),
99690
- state.hasReusableDiagnostic ?
99691
- value :
99692
- convertToReusableDiagnostics(value, relativeToBuildInfo)
99793
+ convertToReusableDiagnostics(value, relativeToBuildInfo)
99693
99794
  ] :
99694
99795
  toFileId(key));
99695
99796
  }
@@ -99704,16 +99805,27 @@ var ts;
99704
99805
  }
99705
99806
  }
99706
99807
  }
99707
- return {
99808
+ var changeFileSet;
99809
+ if (state.changedFilesSet.size) {
99810
+ for (var _d = 0, _e = ts.arrayFrom(state.changedFilesSet.keys()).sort(ts.compareStringsCaseSensitive); _d < _e.length; _d++) {
99811
+ var path = _e[_d];
99812
+ (changeFileSet || (changeFileSet = [])).push(toFileId(path));
99813
+ }
99814
+ }
99815
+ var result = {
99708
99816
  fileNames: fileNames,
99709
99817
  fileInfos: fileInfos,
99710
- options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions, relativeToBuildInfoEnsuringAbsolutePath),
99818
+ options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions, "affectsMultiFileEmitBuildInfo"),
99711
99819
  fileIdsList: fileIdsList,
99712
99820
  referencedMap: referencedMap,
99713
99821
  exportedModulesMap: exportedModulesMap,
99714
99822
  semanticDiagnosticsPerFile: semanticDiagnosticsPerFile,
99715
99823
  affectedFilesPendingEmit: affectedFilesPendingEmit,
99824
+ changeFileSet: changeFileSet,
99825
+ emitSignatures: emitSignatures,
99826
+ dtsChangeTime: state.dtsChangeTime,
99716
99827
  };
99828
+ return result;
99717
99829
  function relativeToBuildInfoEnsuringAbsolutePath(path) {
99718
99830
  return relativeToBuildInfo(ts.getNormalizedAbsolutePath(path, currentDirectory));
99719
99831
  }
@@ -99738,21 +99850,18 @@ var ts;
99738
99850
  }
99739
99851
  return fileIdListId;
99740
99852
  }
99741
- }
99742
- function convertToProgramBuildInfoCompilerOptions(options, relativeToBuildInfo) {
99743
- var result;
99744
- var optionsNameMap = ts.getOptionsNameMap().optionsNameMap;
99745
- for (var _i = 0, _a = ts.getOwnKeys(options).sort(ts.compareStringsCaseSensitive); _i < _a.length; _i++) {
99746
- var name = _a[_i];
99747
- var optionKey = name.toLowerCase();
99748
- var optionInfo = optionsNameMap.get(optionKey);
99749
- if ((optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsEmit) || (optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsSemanticDiagnostics) ||
99750
- optionKey === "strict" ||
99751
- optionKey === "skiplibcheck" || optionKey === "skipdefaultlibcheck") {
99752
- (result || (result = {}))[name] = convertToReusableCompilerOptionValue(optionInfo, options[name], relativeToBuildInfo);
99853
+ function convertToProgramBuildInfoCompilerOptions(options, optionKey) {
99854
+ var result;
99855
+ var optionsNameMap = ts.getOptionsNameMap().optionsNameMap;
99856
+ for (var _i = 0, _a = ts.getOwnKeys(options).sort(ts.compareStringsCaseSensitive); _i < _a.length; _i++) {
99857
+ var name = _a[_i];
99858
+ var optionInfo = optionsNameMap.get(name.toLowerCase());
99859
+ if (optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo[optionKey]) {
99860
+ (result || (result = {}))[name] = convertToReusableCompilerOptionValue(optionInfo, options[name], relativeToBuildInfoEnsuringAbsolutePath);
99861
+ }
99753
99862
  }
99863
+ return result;
99754
99864
  }
99755
- return result;
99756
99865
  }
99757
99866
  function convertToReusableCompilerOptionValue(option, value, relativeToBuildInfo) {
99758
99867
  if (option) {
@@ -99826,6 +99935,10 @@ var ts;
99826
99935
  return { host: host, newProgram: newProgram, oldProgram: oldProgram, configFileParsingDiagnostics: configFileParsingDiagnostics || ts.emptyArray };
99827
99936
  }
99828
99937
  ts.getBuilderCreationParameters = getBuilderCreationParameters;
99938
+ function computeSignature(text, data, computeHash) {
99939
+ return ts.BuilderState.computeSignature((data === null || data === void 0 ? void 0 : data.sourceMapUrlPos) !== undefined ? text.substring(0, data.sourceMapUrlPos) : text, computeHash);
99940
+ }
99941
+ ts.computeSignature = computeSignature;
99829
99942
  function createBuilderProgram(kind, _a) {
99830
99943
  var newProgram = _a.newProgram, host = _a.host, oldProgram = _a.oldProgram, configFileParsingDiagnostics = _a.configFileParsingDiagnostics;
99831
99944
  var oldState = oldProgram && oldProgram.getState();
@@ -99837,28 +99950,28 @@ var ts;
99837
99950
  var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames());
99838
99951
  var computeHash = ts.maybeBind(host, host.createHash);
99839
99952
  var state = createBuilderProgramState(newProgram, getCanonicalFileName, oldState, host.disableUseFileVersionAsSignature);
99840
- var backupState;
99841
- newProgram.getProgramBuildInfo = function () { return getProgramBuildInfo(state, getCanonicalFileName); };
99953
+ var backupEmitState;
99954
+ newProgram.getProgramBuildInfo = function () { return getProgramBuildInfo(state, getCanonicalFileName, host); };
99842
99955
  newProgram = undefined;
99843
99956
  oldProgram = undefined;
99844
99957
  oldState = undefined;
99845
99958
  var getState = function () { return state; };
99846
99959
  var builderProgram = createRedirectedBuilderProgram(getState, configFileParsingDiagnostics);
99847
99960
  builderProgram.getState = getState;
99848
- builderProgram.backupState = function () {
99849
- ts.Debug.assert(backupState === undefined);
99850
- backupState = cloneBuilderProgramState(state);
99961
+ builderProgram.backupEmitState = function () {
99962
+ ts.Debug.assert(backupEmitState === undefined);
99963
+ backupEmitState = backupEmitBuilderProgramState(state);
99851
99964
  };
99852
- builderProgram.restoreState = function () {
99853
- state = ts.Debug.checkDefined(backupState);
99854
- backupState = undefined;
99965
+ builderProgram.restoreEmitState = function () {
99966
+ restoreEmitBuilderProgramState(state, ts.Debug.checkDefined(backupEmitState));
99967
+ backupEmitState = undefined;
99855
99968
  };
99856
99969
  builderProgram.getAllDependencies = function (sourceFile) { return ts.BuilderState.getAllDependencies(state, ts.Debug.checkDefined(state.program), sourceFile); };
99857
99970
  builderProgram.getSemanticDiagnostics = getSemanticDiagnostics;
99858
99971
  builderProgram.emit = emit;
99859
99972
  builderProgram.releaseProgram = function () {
99860
99973
  releaseCache(state);
99861
- backupState = undefined;
99974
+ backupEmitState = undefined;
99862
99975
  };
99863
99976
  if (kind === BuilderProgramKind.SemanticDiagnosticsBuilderProgram) {
99864
99977
  builderProgram.getSemanticDiagnosticsOfNextAffectedFile = getSemanticDiagnosticsOfNextAffectedFile;
@@ -99904,35 +100017,57 @@ var ts;
99904
100017
  affected = program;
99905
100018
  }
99906
100019
  }
99907
- return toAffectedFileEmitResult(state, ts.Debug.checkDefined(state.program).emit(affected === state.program ? undefined : affected, affected !== state.program && ts.getEmitDeclarations(state.compilerOptions) && !customTransformers ?
99908
- getWriteFileUpdatingSignatureCallback(writeFile) :
100020
+ return toAffectedFileEmitResult(state, ts.Debug.checkDefined(state.program).emit(affected === state.program ? undefined : affected, ts.getEmitDeclarations(state.compilerOptions) ?
100021
+ getWriteFileCallback(writeFile, customTransformers) :
99909
100022
  writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles || emitKind === 0, customTransformers), affected, emitKind, isPendingEmitFile);
99910
100023
  }
99911
- function getWriteFileUpdatingSignatureCallback(writeFile) {
100024
+ function getWriteFileCallback(writeFile, customTransformers) {
99912
100025
  return function (fileName, text, writeByteOrderMark, onError, sourceFiles, data) {
99913
- var _a;
100026
+ var _a, _b, _c;
99914
100027
  if (ts.isDeclarationFileName(fileName)) {
99915
- ts.Debug.assert((sourceFiles === null || sourceFiles === void 0 ? void 0 : sourceFiles.length) === 1);
99916
- var file = sourceFiles[0];
99917
- var info = state.fileInfos.get(file.resolvedPath);
99918
- var signature = ((_a = state.currentAffectedFilesSignatures) === null || _a === void 0 ? void 0 : _a.get(file.resolvedPath)) || info.signature;
99919
- if (signature === file.version) {
99920
- var newSignature = (computeHash || ts.generateDjb2Hash)((data === null || data === void 0 ? void 0 : data.sourceMapUrlPos) !== undefined ? text.substring(0, data.sourceMapUrlPos) : text);
99921
- if (newSignature !== file.version) {
99922
- if (host.storeFilesChangingSignatureDuringEmit)
99923
- (state.filesChangingSignature || (state.filesChangingSignature = new ts.Set())).add(file.resolvedPath);
99924
- if (state.exportedModulesMap)
99925
- ts.BuilderState.updateExportedModules(file, file.exportedModulesFromDeclarationEmit, state.currentAffectedFilesExportedModulesMap || (state.currentAffectedFilesExportedModulesMap = ts.BuilderState.createManyToManyPathMap()));
99926
- if (state.affectedFiles && state.affectedFilesIndex < state.affectedFiles.length) {
99927
- state.currentAffectedFilesSignatures.set(file.resolvedPath, newSignature);
100028
+ if (!ts.outFile(state.compilerOptions)) {
100029
+ ts.Debug.assert((sourceFiles === null || sourceFiles === void 0 ? void 0 : sourceFiles.length) === 1);
100030
+ var newSignature = void 0;
100031
+ if (!customTransformers) {
100032
+ var file = sourceFiles[0];
100033
+ var info = state.fileInfos.get(file.resolvedPath);
100034
+ if (info.signature === file.version) {
100035
+ newSignature = computeSignature(text, data, computeHash);
100036
+ if (newSignature !== file.version) {
100037
+ if (host.storeFilesChangingSignatureDuringEmit)
100038
+ (state.filesChangingSignature || (state.filesChangingSignature = new ts.Set())).add(file.resolvedPath);
100039
+ if (state.exportedModulesMap)
100040
+ ts.BuilderState.updateExportedModules(state, file, file.exportedModulesFromDeclarationEmit);
100041
+ if (state.affectedFiles) {
100042
+ var existing = (_a = state.oldSignatures) === null || _a === void 0 ? void 0 : _a.get(file.resolvedPath);
100043
+ if (existing === undefined)
100044
+ (state.oldSignatures || (state.oldSignatures = new ts.Map())).set(file.resolvedPath, info.signature || false);
100045
+ info.signature = newSignature;
100046
+ }
100047
+ else {
100048
+ info.signature = newSignature;
100049
+ (_b = state.oldExportedModulesMap) === null || _b === void 0 ? void 0 : _b.clear();
100050
+ }
100051
+ }
99928
100052
  }
99929
- else {
99930
- info.signature = newSignature;
99931
- if (state.exportedModulesMap)
99932
- ts.BuilderState.updateExportedFilesMapFromCache(state, state.currentAffectedFilesExportedModulesMap);
100053
+ }
100054
+ if (state.compilerOptions.composite) {
100055
+ var filePath = sourceFiles[0].resolvedPath;
100056
+ var oldSignature = (_c = state.emitSignatures) === null || _c === void 0 ? void 0 : _c.get(filePath);
100057
+ newSignature || (newSignature = computeSignature(text, data, computeHash));
100058
+ if (newSignature !== oldSignature) {
100059
+ (state.emitSignatures || (state.emitSignatures = new ts.Map())).set(filePath, newSignature);
100060
+ state.hasChangedEmitSignature = true;
99933
100061
  }
99934
100062
  }
99935
100063
  }
100064
+ else if (state.compilerOptions.composite) {
100065
+ var newSignature = computeSignature(text, data, computeHash);
100066
+ if (newSignature !== state.outSignature) {
100067
+ state.outSignature = newSignature;
100068
+ state.hasChangedEmitSignature = true;
100069
+ }
100070
+ }
99936
100071
  }
99937
100072
  if (writeFile)
99938
100073
  writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data);
@@ -99981,8 +100116,8 @@ var ts;
99981
100116
  }
99982
100117
  }
99983
100118
  }
99984
- return ts.Debug.checkDefined(state.program).emit(targetSourceFile, !ts.outFile(state.compilerOptions) && ts.getEmitDeclarations(state.compilerOptions) && !customTransformers ?
99985
- getWriteFileUpdatingSignatureCallback(writeFile) :
100119
+ return ts.Debug.checkDefined(state.program).emit(targetSourceFile, ts.getEmitDeclarations(state.compilerOptions) ?
100120
+ getWriteFileCallback(writeFile, customTransformers) :
99986
100121
  writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles, customTransformers);
99987
100122
  }
99988
100123
  function getSemanticDiagnosticsOfNextAffectedFile(cancellationToken, ignoreSourceFile) {
@@ -100045,29 +100180,58 @@ var ts;
100045
100180
  { version: fileInfo.version, signature: fileInfo.signature === false ? undefined : fileInfo.version, affectsGlobalScope: fileInfo.affectsGlobalScope, impliedFormat: fileInfo.impliedFormat };
100046
100181
  }
100047
100182
  ts.toBuilderStateFileInfo = toBuilderStateFileInfo;
100048
- function createBuildProgramUsingProgramBuildInfo(program, buildInfoPath, host) {
100049
- var _a;
100183
+ function createBuilderProgramUsingProgramBuildInfo(program, buildInfoPath, host) {
100184
+ var _a, _b, _c, _d;
100050
100185
  var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));
100051
100186
  var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames());
100052
- var filePaths = program.fileNames.map(toPath);
100053
- var filePathsSetList = (_a = program.fileIdsList) === null || _a === void 0 ? void 0 : _a.map(function (fileIds) { return new ts.Set(fileIds.map(toFilePath)); });
100054
- var fileInfos = new ts.Map();
100055
- program.fileInfos.forEach(function (fileInfo, index) { return fileInfos.set(toFilePath(index + 1), toBuilderStateFileInfo(fileInfo)); });
100056
- var state = {
100057
- fileInfos: fileInfos,
100058
- compilerOptions: program.options ? ts.convertToOptionsWithAbsolutePaths(program.options, toAbsolutePath) : {},
100059
- referencedMap: toManyToManyPathMap(program.referencedMap),
100060
- exportedModulesMap: toManyToManyPathMap(program.exportedModulesMap),
100061
- semanticDiagnosticsPerFile: program.semanticDiagnosticsPerFile && ts.arrayToMap(program.semanticDiagnosticsPerFile, function (value) { return toFilePath(ts.isNumber(value) ? value : value[0]); }, function (value) { return ts.isNumber(value) ? ts.emptyArray : value[1]; }),
100062
- hasReusableDiagnostic: true,
100063
- affectedFilesPendingEmit: ts.map(program.affectedFilesPendingEmit, function (value) { return toFilePath(value[0]); }),
100064
- affectedFilesPendingEmitKind: program.affectedFilesPendingEmit && ts.arrayToMap(program.affectedFilesPendingEmit, function (value) { return toFilePath(value[0]); }, function (value) { return value[1]; }),
100065
- affectedFilesPendingEmitIndex: program.affectedFilesPendingEmit && 0,
100066
- };
100187
+ var state;
100188
+ var filePaths;
100189
+ var filePathsSetList;
100190
+ if (isProgramBundleEmitBuildInfo(program)) {
100191
+ state = {
100192
+ fileInfos: new ts.Map(),
100193
+ compilerOptions: program.options ? ts.convertToOptionsWithAbsolutePaths(program.options, toAbsolutePath) : {},
100194
+ dtsChangeTime: program.dtsChangeTime,
100195
+ outSignature: program.outSignature,
100196
+ };
100197
+ }
100198
+ else {
100199
+ filePaths = (_a = program.fileNames) === null || _a === void 0 ? void 0 : _a.map(toPath);
100200
+ filePathsSetList = (_b = program.fileIdsList) === null || _b === void 0 ? void 0 : _b.map(function (fileIds) { return new ts.Set(fileIds.map(toFilePath)); });
100201
+ var fileInfos_2 = new ts.Map();
100202
+ var emitSignatures_1 = ((_c = program.options) === null || _c === void 0 ? void 0 : _c.composite) && !ts.outFile(program.options) ? new ts.Map() : undefined;
100203
+ program.fileInfos.forEach(function (fileInfo, index) {
100204
+ var path = toFilePath(index + 1);
100205
+ var stateFileInfo = toBuilderStateFileInfo(fileInfo);
100206
+ fileInfos_2.set(path, stateFileInfo);
100207
+ if (emitSignatures_1 && stateFileInfo.signature)
100208
+ emitSignatures_1.set(path, stateFileInfo.signature);
100209
+ });
100210
+ (_d = program.emitSignatures) === null || _d === void 0 ? void 0 : _d.forEach(function (value) {
100211
+ if (ts.isNumber(value))
100212
+ emitSignatures_1.delete(toFilePath(value));
100213
+ else
100214
+ emitSignatures_1.set(toFilePath(value[0]), value[1]);
100215
+ });
100216
+ state = {
100217
+ fileInfos: fileInfos_2,
100218
+ compilerOptions: program.options ? ts.convertToOptionsWithAbsolutePaths(program.options, toAbsolutePath) : {},
100219
+ referencedMap: toManyToManyPathMap(program.referencedMap),
100220
+ exportedModulesMap: toManyToManyPathMap(program.exportedModulesMap),
100221
+ semanticDiagnosticsPerFile: program.semanticDiagnosticsPerFile && ts.arrayToMap(program.semanticDiagnosticsPerFile, function (value) { return toFilePath(ts.isNumber(value) ? value : value[0]); }, function (value) { return ts.isNumber(value) ? ts.emptyArray : value[1]; }),
100222
+ hasReusableDiagnostic: true,
100223
+ affectedFilesPendingEmit: ts.map(program.affectedFilesPendingEmit, function (value) { return toFilePath(value[0]); }),
100224
+ affectedFilesPendingEmitKind: program.affectedFilesPendingEmit && ts.arrayToMap(program.affectedFilesPendingEmit, function (value) { return toFilePath(value[0]); }, function (value) { return value[1]; }),
100225
+ affectedFilesPendingEmitIndex: program.affectedFilesPendingEmit && 0,
100226
+ changedFilesSet: new ts.Set(ts.map(program.changeFileSet, toFilePath)),
100227
+ dtsChangeTime: program.dtsChangeTime,
100228
+ emitSignatures: (emitSignatures_1 === null || emitSignatures_1 === void 0 ? void 0 : emitSignatures_1.size) ? emitSignatures_1 : undefined,
100229
+ };
100230
+ }
100067
100231
  return {
100068
100232
  getState: function () { return state; },
100069
- backupState: ts.noop,
100070
- restoreState: ts.noop,
100233
+ backupEmitState: ts.noop,
100234
+ restoreEmitState: ts.noop,
100071
100235
  getProgram: ts.notImplemented,
100072
100236
  getProgramOrUndefined: ts.returnUndefined,
100073
100237
  releaseProgram: ts.noop,
@@ -100112,12 +100276,24 @@ var ts;
100112
100276
  return map;
100113
100277
  }
100114
100278
  }
100115
- ts.createBuildProgramUsingProgramBuildInfo = createBuildProgramUsingProgramBuildInfo;
100279
+ ts.createBuilderProgramUsingProgramBuildInfo = createBuilderProgramUsingProgramBuildInfo;
100280
+ function getBuildInfoFileVersionMap(program, buildInfoPath, host) {
100281
+ var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));
100282
+ var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames());
100283
+ var fileInfos = new ts.Map();
100284
+ program.fileInfos.forEach(function (fileInfo, index) {
100285
+ var path = ts.toPath(program.fileNames[index], buildInfoDirectory, getCanonicalFileName);
100286
+ var version = ts.isString(fileInfo) ? fileInfo : fileInfo.version;
100287
+ fileInfos.set(path, version);
100288
+ });
100289
+ return fileInfos;
100290
+ }
100291
+ ts.getBuildInfoFileVersionMap = getBuildInfoFileVersionMap;
100116
100292
  function createRedirectedBuilderProgram(getState, configFileParsingDiagnostics) {
100117
100293
  return {
100118
100294
  getState: ts.notImplemented,
100119
- backupState: ts.noop,
100120
- restoreState: ts.noop,
100295
+ backupEmitState: ts.noop,
100296
+ restoreEmitState: ts.noop,
100121
100297
  getProgram: getProgram,
100122
100298
  getProgramOrUndefined: function () { return getState().program; },
100123
100299
  releaseProgram: function () { return getState().program = undefined; },
@@ -101068,9 +101244,9 @@ var ts;
101068
101244
  var targets = importedFileNames.map(function (f) { return ts.getNormalizedAbsolutePath(f, cwd); });
101069
101245
  var shouldFilterIgnoredPaths = !ts.every(targets, ts.containsIgnoredPath);
101070
101246
  if (!preferSymlinks) {
101071
- var result_15 = ts.forEach(targets, function (p) { return !(shouldFilterIgnoredPaths && ts.containsIgnoredPath(p)) && cb(p, referenceRedirect === p); });
101072
- if (result_15)
101073
- return result_15;
101247
+ var result_16 = ts.forEach(targets, function (p) { return !(shouldFilterIgnoredPaths && ts.containsIgnoredPath(p)) && cb(p, referenceRedirect === p); });
101248
+ if (result_16)
101249
+ return result_16;
101074
101250
  }
101075
101251
  var symlinkedDirectories = (_a = host.getSymlinkCache) === null || _a === void 0 ? void 0 : _a.call(host).getSymlinkedDirectoriesByRealpath();
101076
101252
  var fullImportedFileName = ts.getNormalizedAbsolutePath(importedFileName, cwd);
@@ -101089,10 +101265,10 @@ var ts;
101089
101265
  for (var _i = 0, symlinkDirectories_1 = symlinkDirectories; _i < symlinkDirectories_1.length; _i++) {
101090
101266
  var symlinkDirectory = symlinkDirectories_1[_i];
101091
101267
  var option = ts.resolvePath(symlinkDirectory, relative);
101092
- var result_16 = cb(option, target === referenceRedirect);
101268
+ var result_17 = cb(option, target === referenceRedirect);
101093
101269
  shouldFilterIgnoredPaths = true;
101094
- if (result_16)
101095
- return result_16;
101270
+ if (result_17)
101271
+ return result_17;
101096
101272
  }
101097
101273
  });
101098
101274
  });
@@ -101924,6 +102100,7 @@ var ts;
101924
102100
  readDirectory: ts.maybeBind(host, host.readDirectory),
101925
102101
  disableUseFileVersionAsSignature: host.disableUseFileVersionAsSignature,
101926
102102
  storeFilesChangingSignatureDuringEmit: host.storeFilesChangingSignatureDuringEmit,
102103
+ now: ts.maybeBind(host, host.now),
101927
102104
  };
101928
102105
  function writeFile(fileName, text, writeByteOrderMark, onError) {
101929
102106
  try {
@@ -101978,6 +102155,7 @@ var ts;
101978
102155
  createProgram: createProgram || ts.createEmitAndSemanticDiagnosticsBuilderProgram,
101979
102156
  disableUseFileVersionAsSignature: system.disableUseFileVersionAsSignature,
101980
102157
  storeFilesChangingSignatureDuringEmit: system.storeFilesChangingSignatureDuringEmit,
102158
+ now: ts.maybeBind(system, system.now),
101981
102159
  };
101982
102160
  }
101983
102161
  ts.createProgramHost = createProgramHost;
@@ -102033,20 +102211,26 @@ var ts;
102033
102211
  var ts;
102034
102212
  (function (ts) {
102035
102213
  function readBuilderProgram(compilerOptions, host) {
102036
- if (ts.outFile(compilerOptions))
102037
- return undefined;
102038
102214
  var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(compilerOptions);
102039
102215
  if (!buildInfoPath)
102040
102216
  return undefined;
102041
- var content = host.readFile(buildInfoPath);
102042
- if (!content)
102043
- return undefined;
102044
- var buildInfo = ts.getBuildInfo(content);
102217
+ var buildInfo;
102218
+ if (host.getBuildInfo) {
102219
+ buildInfo = host.getBuildInfo(buildInfoPath, compilerOptions.configFilePath);
102220
+ if (!buildInfo)
102221
+ return undefined;
102222
+ }
102223
+ else {
102224
+ var content = host.readFile(buildInfoPath);
102225
+ if (!content)
102226
+ return undefined;
102227
+ buildInfo = ts.getBuildInfo(content);
102228
+ }
102045
102229
  if (buildInfo.version !== ts.version)
102046
102230
  return undefined;
102047
102231
  if (!buildInfo.program)
102048
102232
  return undefined;
102049
- return ts.createBuildProgramUsingProgramBuildInfo(buildInfo.program, buildInfoPath, host);
102233
+ return ts.createBuilderProgramUsingProgramBuildInfo(buildInfo.program, buildInfoPath, host);
102050
102234
  }
102051
102235
  ts.readBuilderProgram = readBuilderProgram;
102052
102236
  function createIncrementalCompilerHost(options, system) {
@@ -102055,6 +102239,7 @@ var ts;
102055
102239
  host.createHash = ts.maybeBind(system, system.createHash);
102056
102240
  host.disableUseFileVersionAsSignature = system.disableUseFileVersionAsSignature;
102057
102241
  host.storeFilesChangingSignatureDuringEmit = system.storeFilesChangingSignatureDuringEmit;
102242
+ host.now = ts.maybeBind(system, system.now);
102058
102243
  ts.setGetSourceFileAsHashVersioned(host, system);
102059
102244
  ts.changeCompilerHostLikeToUseCache(host, function (fileName) { return ts.toPath(fileName, host.getCurrentDirectory(), host.getCanonicalFileName); });
102060
102245
  return host;
@@ -102718,11 +102903,14 @@ var ts;
102718
102903
  UpToDateStatusType[UpToDateStatusType["OutputMissing"] = 4] = "OutputMissing";
102719
102904
  UpToDateStatusType[UpToDateStatusType["OutOfDateWithSelf"] = 5] = "OutOfDateWithSelf";
102720
102905
  UpToDateStatusType[UpToDateStatusType["OutOfDateWithUpstream"] = 6] = "OutOfDateWithUpstream";
102721
- UpToDateStatusType[UpToDateStatusType["UpstreamOutOfDate"] = 7] = "UpstreamOutOfDate";
102722
- UpToDateStatusType[UpToDateStatusType["UpstreamBlocked"] = 8] = "UpstreamBlocked";
102723
- UpToDateStatusType[UpToDateStatusType["ComputingUpstream"] = 9] = "ComputingUpstream";
102724
- UpToDateStatusType[UpToDateStatusType["TsVersionOutputOfDate"] = 10] = "TsVersionOutputOfDate";
102725
- UpToDateStatusType[UpToDateStatusType["ContainerOnly"] = 11] = "ContainerOnly";
102906
+ UpToDateStatusType[UpToDateStatusType["OutOfDateBuildInfo"] = 7] = "OutOfDateBuildInfo";
102907
+ UpToDateStatusType[UpToDateStatusType["UpstreamOutOfDate"] = 8] = "UpstreamOutOfDate";
102908
+ UpToDateStatusType[UpToDateStatusType["UpstreamBlocked"] = 9] = "UpstreamBlocked";
102909
+ UpToDateStatusType[UpToDateStatusType["ComputingUpstream"] = 10] = "ComputingUpstream";
102910
+ UpToDateStatusType[UpToDateStatusType["TsVersionOutputOfDate"] = 11] = "TsVersionOutputOfDate";
102911
+ UpToDateStatusType[UpToDateStatusType["UpToDateWithInputFileText"] = 12] = "UpToDateWithInputFileText";
102912
+ UpToDateStatusType[UpToDateStatusType["ContainerOnly"] = 13] = "ContainerOnly";
102913
+ UpToDateStatusType[UpToDateStatusType["ForceBuild"] = 14] = "ForceBuild";
102726
102914
  })(UpToDateStatusType = ts.UpToDateStatusType || (ts.UpToDateStatusType = {}));
102727
102915
  function resolveConfigFileProjectName(project) {
102728
102916
  if (ts.fileExtensionIs(project, ".json")) {
@@ -102760,9 +102948,10 @@ var ts;
102760
102948
  function getOrCreateValueMapFromConfigFileMap(configFileMap, resolved) {
102761
102949
  return getOrCreateValueFromConfigFileMap(configFileMap, resolved, function () { return new ts.Map(); });
102762
102950
  }
102763
- function newer(date1, date2) {
102764
- return date2 > date1 ? date2 : date1;
102951
+ function getCurrentTime(host) {
102952
+ return host.now ? host.now() : new Date();
102765
102953
  }
102954
+ ts.getCurrentTime = getCurrentTime;
102766
102955
  function isCircularBuildOrder(buildOrder) {
102767
102956
  return !!buildOrder && !!buildOrder.buildOrder;
102768
102957
  }
@@ -102846,6 +103035,7 @@ var ts;
102846
103035
  return ts.loadWithTypeDirectiveCache(ts.Debug.checkEachDefined(typeReferenceDirectiveNames), containingFile, redirectedReference, containingFileMode, loader_4);
102847
103036
  };
102848
103037
  }
103038
+ compilerHost.getBuildInfo = function (fileName, configFilePath) { return getBuildInfo(state, fileName, toResolvedConfigFilePath(state, configFilePath), undefined); };
102849
103039
  var _a = ts.createWatchFactory(hostWithWatch, options), watchFile = _a.watchFile, watchDirectory = _a.watchDirectory, writeLog = _a.writeLog;
102850
103040
  var state = {
102851
103041
  host: host,
@@ -102861,8 +103051,9 @@ var ts;
102861
103051
  resolvedConfigFilePaths: new ts.Map(),
102862
103052
  configFileCache: new ts.Map(),
102863
103053
  projectStatus: new ts.Map(),
102864
- buildInfoChecked: new ts.Map(),
102865
103054
  extendedConfigCache: new ts.Map(),
103055
+ buildInfoCache: new ts.Map(),
103056
+ outputTimeStamps: new ts.Map(),
102866
103057
  builderPrograms: new ts.Map(),
102867
103058
  diagnostics: new ts.Map(),
102868
103059
  projectPendingBuild: new ts.Map(),
@@ -102883,6 +103074,7 @@ var ts;
102883
103074
  allWatchedConfigFiles: new ts.Map(),
102884
103075
  allWatchedExtendedConfigFiles: new ts.Map(),
102885
103076
  allWatchedPackageJsonFiles: new ts.Map(),
103077
+ filesWatched: new ts.Map(),
102886
103078
  lastCachedPackageJsonLookups: new ts.Map(),
102887
103079
  timerToBuildInvalidatedProject: undefined,
102888
103080
  reportFileChangeDetected: false,
@@ -102988,11 +103180,12 @@ var ts;
102988
103180
  var noopOnDelete = { onDeleteValue: ts.noop };
102989
103181
  ts.mutateMapSkippingNewValues(state.configFileCache, currentProjects, noopOnDelete);
102990
103182
  ts.mutateMapSkippingNewValues(state.projectStatus, currentProjects, noopOnDelete);
102991
- ts.mutateMapSkippingNewValues(state.buildInfoChecked, currentProjects, noopOnDelete);
102992
103183
  ts.mutateMapSkippingNewValues(state.builderPrograms, currentProjects, noopOnDelete);
102993
103184
  ts.mutateMapSkippingNewValues(state.diagnostics, currentProjects, noopOnDelete);
102994
103185
  ts.mutateMapSkippingNewValues(state.projectPendingBuild, currentProjects, noopOnDelete);
102995
103186
  ts.mutateMapSkippingNewValues(state.projectErrorsReported, currentProjects, noopOnDelete);
103187
+ ts.mutateMapSkippingNewValues(state.buildInfoCache, currentProjects, noopOnDelete);
103188
+ ts.mutateMapSkippingNewValues(state.outputTimeStamps, currentProjects, noopOnDelete);
102996
103189
  if (state.watch) {
102997
103190
  ts.mutateMapSkippingNewValues(state.allWatchedConfigFiles, currentProjects, { onDeleteValue: ts.closeFileWatcher });
102998
103191
  state.allWatchedExtendedConfigFiles.forEach(function (watcher) {
@@ -103284,16 +103477,16 @@ var ts;
103284
103477
  }
103285
103478
  function emit(writeFileCallback, cancellationToken, customTransformers) {
103286
103479
  var _a;
103287
- var _b, _c;
103480
+ var _b, _c, _d;
103288
103481
  ts.Debug.assertIsDefined(program);
103289
103482
  ts.Debug.assert(step === BuildStep.Emit);
103290
- program.backupState();
103483
+ program.backupEmitState();
103291
103484
  var declDiagnostics;
103292
103485
  var reportDeclarationDiagnostics = function (d) { return (declDiagnostics || (declDiagnostics = [])).push(d); };
103293
103486
  var outputFiles = [];
103294
- var emitResult = ts.emitFilesAndReportErrors(program, reportDeclarationDiagnostics, undefined, undefined, function (name, text, writeByteOrderMark) { return outputFiles.push({ name: name, text: text, writeByteOrderMark: writeByteOrderMark }); }, cancellationToken, false, customTransformers || ((_c = (_b = state.host).getCustomTransformers) === null || _c === void 0 ? void 0 : _c.call(_b, project))).emitResult;
103487
+ var emitResult = ts.emitFilesAndReportErrors(program, reportDeclarationDiagnostics, undefined, undefined, function (name, text, writeByteOrderMark, _onError, _sourceFiles, data) { return outputFiles.push({ name: name, text: text, writeByteOrderMark: writeByteOrderMark, buildInfo: data === null || data === void 0 ? void 0 : data.buildInfo }); }, cancellationToken, false, customTransformers || ((_c = (_b = state.host).getCustomTransformers) === null || _c === void 0 ? void 0 : _c.call(_b, project))).emitResult;
103295
103488
  if (declDiagnostics) {
103296
- program.restoreState();
103489
+ program.restoreEmitState();
103297
103490
  (_a = buildErrors(state, projectPath, program, config, declDiagnostics, BuildResultFlags.DeclarationEmitErrors, "Declaration file"), buildResult = _a.buildResult, step = _a.step);
103298
103491
  return {
103299
103492
  emitSkipped: true,
@@ -103302,38 +103495,46 @@ var ts;
103302
103495
  }
103303
103496
  var host = state.host, compilerHost = state.compilerHost;
103304
103497
  var resultFlags = BuildResultFlags.DeclarationOutputUnchanged;
103305
- var newestDeclarationFileContentChangedTime = minimumDate;
103306
- var anyDtsChanged = false;
103498
+ var existingBuildInfo = ((_d = state.buildInfoCache.get(projectPath)) === null || _d === void 0 ? void 0 : _d.buildInfo) || undefined;
103307
103499
  var emitterDiagnostics = ts.createDiagnosticCollection();
103308
103500
  var emittedOutputs = new ts.Map();
103501
+ var options = program.getCompilerOptions();
103502
+ var isIncremental = ts.isIncrementalCompilation(options);
103503
+ var outputTimeStampMap;
103504
+ var now;
103309
103505
  ts.solutionPerformance.mark("beforeOutputFilesWrite");
103310
103506
  outputFiles.forEach(function (_a) {
103311
- var name = _a.name, text = _a.text, writeByteOrderMark = _a.writeByteOrderMark;
103312
- var priorChangeTime;
103313
- if (!anyDtsChanged && ts.isDeclarationFileName(name)) {
103314
- if (host.fileExists(name) && state.readFileWithCache(name) === text) {
103315
- priorChangeTime = host.getModifiedTime(name);
103316
- }
103317
- else {
103507
+ var _b, _c;
103508
+ var name = _a.name, text = _a.text, writeByteOrderMark = _a.writeByteOrderMark, buildInfo = _a.buildInfo;
103509
+ var path = toPath(state, name);
103510
+ emittedOutputs.set(toPath(state, name), name);
103511
+ if (buildInfo) {
103512
+ setBuildInfo(state, buildInfo, projectPath, options);
103513
+ 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)) {
103318
103514
  resultFlags &= ~BuildResultFlags.DeclarationOutputUnchanged;
103319
- anyDtsChanged = true;
103320
103515
  }
103321
103516
  }
103322
- emittedOutputs.set(toPath(state, name), name);
103323
103517
  ts.writeFile(writeFileCallback ? { writeFile: writeFileCallback } : compilerHost, emitterDiagnostics, name, text, writeByteOrderMark);
103324
- if (priorChangeTime !== undefined) {
103325
- newestDeclarationFileContentChangedTime = newer(priorChangeTime, newestDeclarationFileContentChangedTime);
103518
+ if (!isIncremental && state.watch) {
103519
+ (outputTimeStampMap || (outputTimeStampMap = getOutputTimeStampMap(state, projectPath))).set(path, now || (now = getCurrentTime(state.host)));
103326
103520
  }
103327
103521
  });
103328
103522
  ts.solutionPerformance.mark("afterOutputFilesWrite");
103329
103523
  ts.solutionPerformance.measure("OutputFilesWrite", "beforeOutputFilesWrite", "afterOutputFilesWrite");
103330
- finishEmit(emitterDiagnostics, emittedOutputs, newestDeclarationFileContentChangedTime, anyDtsChanged, outputFiles.length ? outputFiles[0].name : ts.getFirstProjectOutput(config, !host.useCaseSensitiveFileNames()), resultFlags);
103524
+ finishEmit(emitterDiagnostics, emittedOutputs, outputFiles.length ? outputFiles[0].name : ts.getFirstProjectOutput(config, !host.useCaseSensitiveFileNames()), resultFlags);
103331
103525
  return emitResult;
103332
103526
  }
103333
103527
  function emitBuildInfo(writeFileCallback, cancellationToken) {
103334
103528
  ts.Debug.assertIsDefined(program);
103335
103529
  ts.Debug.assert(step === BuildStep.EmitBuildInfo);
103336
- var emitResult = program.emitBuildInfo(writeFileCallback, cancellationToken);
103530
+ var emitResult = program.emitBuildInfo(function (name, text, writeByteOrderMark, onError, sourceFiles, data) {
103531
+ if (data === null || data === void 0 ? void 0 : data.buildInfo)
103532
+ setBuildInfo(state, data.buildInfo, projectPath, program.getCompilerOptions());
103533
+ if (writeFileCallback)
103534
+ writeFileCallback(name, text, writeByteOrderMark, onError, sourceFiles, data);
103535
+ else
103536
+ state.compilerHost.writeFile(name, text, writeByteOrderMark, onError, sourceFiles, data);
103537
+ }, cancellationToken);
103337
103538
  if (emitResult.diagnostics.length) {
103338
103539
  reportErrors(state, emitResult.diagnostics);
103339
103540
  state.diagnostics.set(projectPath, __spreadArray(__spreadArray([], state.diagnostics.get(projectPath), true), emitResult.diagnostics, true));
@@ -103346,7 +103547,7 @@ var ts;
103346
103547
  step = BuildStep.QueueReferencingProjects;
103347
103548
  return emitResult;
103348
103549
  }
103349
- function finishEmit(emitterDiagnostics, emittedOutputs, priorNewestUpdateTime, newestDeclarationFileContentChangedTimeIsMaximumDate, oldestOutputFileName, resultFlags) {
103550
+ function finishEmit(emitterDiagnostics, emittedOutputs, oldestOutputFileName, resultFlags) {
103350
103551
  var _a;
103351
103552
  var emitDiagnostics = emitterDiagnostics.getDiagnostics();
103352
103553
  if (emitDiagnostics.length) {
@@ -103356,13 +103557,11 @@ var ts;
103356
103557
  if (state.write) {
103357
103558
  emittedOutputs.forEach(function (name) { return listEmittedFile(state, config, name); });
103358
103559
  }
103359
- var newestDeclarationFileContentChangedTime = updateOutputTimestampsWorker(state, config, priorNewestUpdateTime, ts.Diagnostics.Updating_unchanged_output_timestamps_of_project_0, emittedOutputs);
103560
+ updateOutputTimestampsWorker(state, config, projectPath, ts.Diagnostics.Updating_unchanged_output_timestamps_of_project_0, emittedOutputs);
103360
103561
  state.diagnostics.delete(projectPath);
103361
103562
  state.projectStatus.set(projectPath, {
103362
103563
  type: ts.UpToDateStatusType.UpToDate,
103363
- newestDeclarationFileContentChangedTime: newestDeclarationFileContentChangedTimeIsMaximumDate ?
103364
- maximumDate :
103365
- newestDeclarationFileContentChangedTime,
103564
+ newestDeclarationFileContentChangedTime: getDtsChangeTime(state, config.options, projectPath),
103366
103565
  oldestOutputFileName: oldestOutputFileName
103367
103566
  });
103368
103567
  afterProgramDone(state, program, config);
@@ -103395,12 +103594,21 @@ var ts;
103395
103594
  ts.Debug.assert(!!outputFiles.length);
103396
103595
  var emitterDiagnostics = ts.createDiagnosticCollection();
103397
103596
  var emittedOutputs = new ts.Map();
103597
+ var resultFlags = BuildResultFlags.DeclarationOutputUnchanged;
103598
+ var existingBuildInfo = state.buildInfoCache.get(projectPath).buildInfo;
103398
103599
  outputFiles.forEach(function (_a) {
103399
- var name = _a.name, text = _a.text, writeByteOrderMark = _a.writeByteOrderMark;
103600
+ var _b, _c;
103601
+ var name = _a.name, text = _a.text, writeByteOrderMark = _a.writeByteOrderMark, buildInfo = _a.buildInfo;
103400
103602
  emittedOutputs.set(toPath(state, name), name);
103603
+ if (buildInfo) {
103604
+ setBuildInfo(state, buildInfo, projectPath, config.options);
103605
+ if (((_b = buildInfo.program) === null || _b === void 0 ? void 0 : _b.dtsChangeTime) !== ((_c = existingBuildInfo.program) === null || _c === void 0 ? void 0 : _c.dtsChangeTime)) {
103606
+ resultFlags &= ~BuildResultFlags.DeclarationOutputUnchanged;
103607
+ }
103608
+ }
103401
103609
  ts.writeFile(writeFileCallback ? { writeFile: writeFileCallback } : compilerHost, emitterDiagnostics, name, text, writeByteOrderMark);
103402
103610
  });
103403
- var emitDiagnostics = finishEmit(emitterDiagnostics, emittedOutputs, minimumDate, false, outputFiles[0].name, BuildResultFlags.DeclarationOutputUnchanged);
103611
+ var emitDiagnostics = finishEmit(emitterDiagnostics, emittedOutputs, outputFiles[0].name, resultFlags);
103404
103612
  return { emitSkipped: false, diagnostics: emitDiagnostics };
103405
103613
  }
103406
103614
  function executeSteps(till, cancellationToken, writeFile, customTransformers) {
@@ -103502,7 +103710,7 @@ var ts;
103502
103710
  }
103503
103711
  continue;
103504
103712
  }
103505
- if (status.type === ts.UpToDateStatusType.UpToDateWithUpstreamTypes) {
103713
+ if (status.type === ts.UpToDateStatusType.UpToDateWithUpstreamTypes || status.type === ts.UpToDateStatusType.UpToDateWithInputFileText) {
103506
103714
  reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config));
103507
103715
  return {
103508
103716
  kind: InvalidatedProjectKind.UpdateOutputFileStamps,
@@ -103587,7 +103795,7 @@ var ts;
103587
103795
  state.projectCompilerOptions = state.baseCompilerOptions;
103588
103796
  }
103589
103797
  function buildErrors(state, resolvedPath, program, config, diagnostics, buildResult, errorType) {
103590
- var canEmitBuildInfo = !(buildResult & BuildResultFlags.SyntaxErrors) && program && !ts.outFile(program.getCompilerOptions());
103798
+ var canEmitBuildInfo = program && !ts.outFile(program.getCompilerOptions());
103591
103799
  reportAndStoreErrors(state, resolvedPath, diagnostics);
103592
103800
  state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.Unbuildable, reason: errorType + " errors" });
103593
103801
  if (canEmitBuildInfo)
@@ -103595,8 +103803,100 @@ var ts;
103595
103803
  afterProgramDone(state, program, config);
103596
103804
  return { buildResult: buildResult, step: BuildStep.QueueReferencingProjects };
103597
103805
  }
103806
+ function isFileWatcherWithModifiedTime(value) {
103807
+ return !!value.watcher;
103808
+ }
103809
+ function getModifiedTime(state, fileName) {
103810
+ var path = toPath(state, fileName);
103811
+ var existing = state.filesWatched.get(path);
103812
+ if (state.watch && !!existing) {
103813
+ if (!isFileWatcherWithModifiedTime(existing))
103814
+ return existing;
103815
+ if (existing.modifiedTime)
103816
+ return existing.modifiedTime;
103817
+ }
103818
+ var result = ts.getModifiedTime(state.host, fileName);
103819
+ if (state.watch) {
103820
+ if (existing)
103821
+ existing.modifiedTime = result;
103822
+ else
103823
+ state.filesWatched.set(path, result);
103824
+ }
103825
+ return result;
103826
+ }
103827
+ function watchFile(state, file, callback, pollingInterval, options, watchType, project) {
103828
+ var path = toPath(state, file);
103829
+ var existing = state.filesWatched.get(path);
103830
+ if (existing && isFileWatcherWithModifiedTime(existing)) {
103831
+ existing.callbacks.push(callback);
103832
+ }
103833
+ else {
103834
+ var watcher = state.watchFile(file, function (fileName, eventKind, modifiedTime) {
103835
+ var existing = ts.Debug.checkDefined(state.filesWatched.get(path));
103836
+ ts.Debug.assert(isFileWatcherWithModifiedTime(existing));
103837
+ existing.modifiedTime = modifiedTime;
103838
+ existing.callbacks.forEach(function (cb) { return cb(fileName, eventKind, modifiedTime); });
103839
+ }, pollingInterval, options, watchType, project);
103840
+ state.filesWatched.set(path, { callbacks: [callback], watcher: watcher, modifiedTime: existing });
103841
+ }
103842
+ return {
103843
+ close: function () {
103844
+ var existing = ts.Debug.checkDefined(state.filesWatched.get(path));
103845
+ ts.Debug.assert(isFileWatcherWithModifiedTime(existing));
103846
+ if (existing.callbacks.length === 1) {
103847
+ state.filesWatched.delete(path);
103848
+ ts.closeFileWatcherOf(existing);
103849
+ }
103850
+ else {
103851
+ ts.unorderedRemoveItem(existing.callbacks, callback);
103852
+ }
103853
+ }
103854
+ };
103855
+ }
103856
+ function getOutputTimeStampMap(state, resolvedConfigFilePath) {
103857
+ if (!state.watch)
103858
+ return undefined;
103859
+ var result = state.outputTimeStamps.get(resolvedConfigFilePath);
103860
+ if (!result)
103861
+ state.outputTimeStamps.set(resolvedConfigFilePath, result = new ts.Map());
103862
+ return result;
103863
+ }
103864
+ function setBuildInfo(state, buildInfo, resolvedConfigPath, options) {
103865
+ var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(options);
103866
+ var existing = getBuildInfoCacheEntry(state, buildInfoPath, resolvedConfigPath);
103867
+ if (existing) {
103868
+ existing.buildInfo = buildInfo;
103869
+ existing.modifiedTime = getCurrentTime(state.host);
103870
+ }
103871
+ else {
103872
+ state.buildInfoCache.set(resolvedConfigPath, { path: toPath(state, buildInfoPath), buildInfo: buildInfo, modifiedTime: getCurrentTime(state.host) });
103873
+ }
103874
+ }
103875
+ function getBuildInfoCacheEntry(state, buildInfoPath, resolvedConfigPath) {
103876
+ var path = toPath(state, buildInfoPath);
103877
+ var existing = state.buildInfoCache.get(resolvedConfigPath);
103878
+ return (existing === null || existing === void 0 ? void 0 : existing.path) === path ? existing : undefined;
103879
+ }
103880
+ function getBuildInfo(state, buildInfoPath, resolvedConfigPath, modifiedTime) {
103881
+ var path = toPath(state, buildInfoPath);
103882
+ var existing = state.buildInfoCache.get(resolvedConfigPath);
103883
+ if (existing !== undefined && existing.path === path) {
103884
+ return existing.buildInfo || undefined;
103885
+ }
103886
+ ts.solutionPerformance.mark("beforeGetBuildInfo");
103887
+ ts.solutionPerformance.mark("beforeBuildInfoRead");
103888
+ var value = state.readFileWithCache(buildInfoPath);
103889
+ ts.solutionPerformance.mark("afterBuildInfoRead");
103890
+ ts.solutionPerformance.measure("BuildInfoRead", "beforeBuildInfoRead", "afterBuildInfoRead");
103891
+ var buildInfo = value ? ts.getBuildInfo(value) : undefined;
103892
+ ts.Debug.assert(modifiedTime || !buildInfo);
103893
+ state.buildInfoCache.set(resolvedConfigPath, { path: path, buildInfo: buildInfo || false, modifiedTime: modifiedTime || ts.missingFileModifiedTime });
103894
+ ts.solutionPerformance.mark("afterGetBuildInfo");
103895
+ ts.solutionPerformance.measure("GetBuildInfo", "beforeGetBuildInfo", "afterGetBuildInfo");
103896
+ return buildInfo;
103897
+ }
103598
103898
  function checkConfigFileUpToDateStatus(state, configFile, oldestOutputFileTime, oldestOutputFileName) {
103599
- var tsconfigTime = ts.getModifiedTime(state.host, configFile);
103899
+ var tsconfigTime = getModifiedTime(state, configFile);
103600
103900
  if (oldestOutputFileTime < tsconfigTime) {
103601
103901
  return {
103602
103902
  type: ts.UpToDateStatusType.OutOfDateWithSelf,
@@ -103606,76 +103906,22 @@ var ts;
103606
103906
  }
103607
103907
  }
103608
103908
  function getUpToDateStatusWorker(state, project, resolvedPath) {
103609
- var force = !!state.options.force;
103610
- var newestInputFileName = undefined;
103611
- var newestInputFileTime = minimumDate;
103612
- var host = state.host;
103613
- for (var _i = 0, _a = project.fileNames; _i < _a.length; _i++) {
103614
- var inputFile = _a[_i];
103615
- if (!host.fileExists(inputFile)) {
103616
- return {
103617
- type: ts.UpToDateStatusType.Unbuildable,
103618
- reason: inputFile + " does not exist"
103619
- };
103620
- }
103621
- if (!force) {
103622
- var inputTime = ts.getModifiedTime(host, inputFile);
103623
- if (inputTime > newestInputFileTime) {
103624
- newestInputFileName = inputFile;
103625
- newestInputFileTime = inputTime;
103626
- }
103627
- }
103628
- }
103909
+ var _a, _b, _c;
103629
103910
  if (!project.fileNames.length && !ts.canJsonReportNoInputFiles(project.raw)) {
103630
103911
  return {
103631
103912
  type: ts.UpToDateStatusType.ContainerOnly
103632
103913
  };
103633
103914
  }
103634
- var outputs = ts.getAllProjectOutputs(project, !host.useCaseSensitiveFileNames());
103635
- var oldestOutputFileName = "(none)";
103636
- var oldestOutputFileTime = maximumDate;
103637
- var newestOutputFileName = "(none)";
103638
- var newestOutputFileTime = minimumDate;
103639
- var missingOutputFileName;
103640
- var newestDeclarationFileContentChangedTime = minimumDate;
103641
- var isOutOfDateWithInputs = false;
103642
- if (!force) {
103643
- for (var _b = 0, outputs_1 = outputs; _b < outputs_1.length; _b++) {
103644
- var output = outputs_1[_b];
103645
- if (!host.fileExists(output)) {
103646
- missingOutputFileName = output;
103647
- break;
103648
- }
103649
- var outputTime = ts.getModifiedTime(host, output);
103650
- if (outputTime < oldestOutputFileTime) {
103651
- oldestOutputFileTime = outputTime;
103652
- oldestOutputFileName = output;
103653
- }
103654
- if (outputTime < newestInputFileTime) {
103655
- isOutOfDateWithInputs = true;
103656
- break;
103657
- }
103658
- if (outputTime > newestOutputFileTime) {
103659
- newestOutputFileTime = outputTime;
103660
- newestOutputFileName = output;
103661
- }
103662
- if (ts.isDeclarationFileName(output)) {
103663
- var outputModifiedTime = ts.getModifiedTime(host, output);
103664
- newestDeclarationFileContentChangedTime = newer(newestDeclarationFileContentChangedTime, outputModifiedTime);
103665
- }
103666
- }
103667
- }
103668
- var pseudoUpToDate = false;
103669
- var usesPrepend = false;
103670
- var upstreamChangedProject;
103915
+ var referenceStatuses;
103916
+ var force = !!state.options.force;
103671
103917
  if (project.projectReferences) {
103672
103918
  state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.ComputingUpstream });
103673
- for (var _c = 0, _d = project.projectReferences; _c < _d.length; _c++) {
103674
- var ref = _d[_c];
103675
- usesPrepend = usesPrepend || !!(ref.prepend);
103919
+ for (var _i = 0, _d = project.projectReferences; _i < _d.length; _i++) {
103920
+ var ref = _d[_i];
103676
103921
  var resolvedRef = ts.resolveProjectReferencePath(ref);
103677
103922
  var resolvedRefPath = toResolvedConfigFilePath(state, resolvedRef);
103678
- var refStatus = getUpToDateStatus(state, parseConfigFile(state, resolvedRef, resolvedRefPath), resolvedRefPath);
103923
+ var resolvedConfig = parseConfigFile(state, resolvedRef, resolvedRefPath);
103924
+ var refStatus = getUpToDateStatus(state, resolvedConfig, resolvedRefPath);
103679
103925
  if (refStatus.type === ts.UpToDateStatusType.ComputingUpstream ||
103680
103926
  refStatus.type === ts.UpToDateStatusType.ContainerOnly) {
103681
103927
  continue;
@@ -103694,68 +103940,169 @@ var ts;
103694
103940
  upstreamProjectName: ref.path
103695
103941
  };
103696
103942
  }
103697
- if (!force && !missingOutputFileName) {
103698
- if (refStatus.newestInputFileTime && refStatus.newestInputFileTime <= oldestOutputFileTime) {
103699
- continue;
103700
- }
103701
- if (refStatus.newestDeclarationFileContentChangedTime && refStatus.newestDeclarationFileContentChangedTime <= oldestOutputFileTime) {
103702
- pseudoUpToDate = true;
103703
- upstreamChangedProject = ref.path;
103704
- continue;
103705
- }
103706
- ts.Debug.assert(oldestOutputFileName !== undefined, "Should have an oldest output filename here");
103943
+ if (!force)
103944
+ (referenceStatuses || (referenceStatuses = [])).push({ ref: ref, refStatus: refStatus, resolvedRefPath: resolvedRefPath, resolvedConfig: resolvedConfig });
103945
+ }
103946
+ }
103947
+ if (force)
103948
+ return { type: ts.UpToDateStatusType.ForceBuild };
103949
+ var host = state.host;
103950
+ var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(project.options);
103951
+ var oldestOutputFileName = "(none)";
103952
+ var oldestOutputFileTime = maximumDate;
103953
+ var buildInfoTime;
103954
+ var buildInfoProgram;
103955
+ var buildInfoVersionMap;
103956
+ var newestDeclarationFileContentChangedTime;
103957
+ if (buildInfoPath) {
103958
+ var buildInfoCacheEntry_1 = getBuildInfoCacheEntry(state, buildInfoPath, resolvedPath);
103959
+ buildInfoTime = (buildInfoCacheEntry_1 === null || buildInfoCacheEntry_1 === void 0 ? void 0 : buildInfoCacheEntry_1.modifiedTime) || ts.getModifiedTime(host, buildInfoPath);
103960
+ if (buildInfoTime === ts.missingFileModifiedTime) {
103961
+ if (!buildInfoCacheEntry_1) {
103962
+ state.buildInfoCache.set(resolvedPath, {
103963
+ path: toPath(state, buildInfoPath),
103964
+ buildInfo: false,
103965
+ modifiedTime: buildInfoTime
103966
+ });
103967
+ }
103968
+ return {
103969
+ type: ts.UpToDateStatusType.OutputMissing,
103970
+ missingOutputFileName: buildInfoPath
103971
+ };
103972
+ }
103973
+ var buildInfo = ts.Debug.checkDefined(getBuildInfo(state, buildInfoPath, resolvedPath, buildInfoTime));
103974
+ if ((buildInfo.bundle || buildInfo.program) && buildInfo.version !== ts.version) {
103975
+ return {
103976
+ type: ts.UpToDateStatusType.TsVersionOutputOfDate,
103977
+ version: buildInfo.version
103978
+ };
103979
+ }
103980
+ if (buildInfo.program) {
103981
+ if (((_a = buildInfo.program.changeFileSet) === null || _a === void 0 ? void 0 : _a.length) ||
103982
+ (!project.options.noEmit && ((_b = buildInfo.program.affectedFilesPendingEmit) === null || _b === void 0 ? void 0 : _b.length))) {
103707
103983
  return {
103708
- type: ts.UpToDateStatusType.OutOfDateWithUpstream,
103709
- outOfDateOutputFileName: oldestOutputFileName,
103710
- newerProjectName: ref.path
103984
+ type: ts.UpToDateStatusType.OutOfDateBuildInfo,
103985
+ buildInfoFile: buildInfoPath
103711
103986
  };
103712
103987
  }
103988
+ buildInfoProgram = buildInfo.program;
103713
103989
  }
103990
+ oldestOutputFileTime = buildInfoTime;
103991
+ oldestOutputFileName = buildInfoPath;
103992
+ newestDeclarationFileContentChangedTime = ((_c = buildInfo.program) === null || _c === void 0 ? void 0 : _c.dtsChangeTime) ? new Date(buildInfo.program.dtsChangeTime) : undefined;
103714
103993
  }
103715
- if (missingOutputFileName !== undefined) {
103716
- return {
103717
- type: ts.UpToDateStatusType.OutputMissing,
103718
- missingOutputFileName: missingOutputFileName
103719
- };
103994
+ var newestInputFileName = undefined;
103995
+ var newestInputFileTime = minimumDate;
103996
+ var pseudoInputUptodate = false;
103997
+ for (var _e = 0, _f = project.fileNames; _e < _f.length; _e++) {
103998
+ var inputFile = _f[_e];
103999
+ var inputTime = getModifiedTime(state, inputFile);
104000
+ if (inputTime === ts.missingFileModifiedTime) {
104001
+ return {
104002
+ type: ts.UpToDateStatusType.Unbuildable,
104003
+ reason: inputFile + " does not exist"
104004
+ };
104005
+ }
104006
+ if (buildInfoTime && buildInfoTime < inputTime) {
104007
+ var version_3 = void 0;
104008
+ var currentVersion = void 0;
104009
+ if (buildInfoProgram) {
104010
+ if (!buildInfoVersionMap)
104011
+ buildInfoVersionMap = ts.getBuildInfoFileVersionMap(buildInfoProgram, buildInfoPath, host);
104012
+ version_3 = buildInfoVersionMap.get(toPath(state, inputFile));
104013
+ var text = version_3 ? state.readFileWithCache(inputFile) : undefined;
104014
+ currentVersion = text && (host.createHash || ts.generateDjb2Hash)(text);
104015
+ if (version_3 && version_3 === currentVersion)
104016
+ pseudoInputUptodate = true;
104017
+ }
104018
+ if (!version_3 || version_3 !== currentVersion) {
104019
+ return {
104020
+ type: ts.UpToDateStatusType.OutOfDateWithSelf,
104021
+ outOfDateOutputFileName: buildInfoPath,
104022
+ newerInputFileName: inputFile
104023
+ };
104024
+ }
104025
+ }
104026
+ if (inputTime > newestInputFileTime) {
104027
+ newestInputFileName = inputFile;
104028
+ newestInputFileTime = inputTime;
104029
+ }
103720
104030
  }
103721
- if (isOutOfDateWithInputs) {
103722
- return {
103723
- type: ts.UpToDateStatusType.OutOfDateWithSelf,
103724
- outOfDateOutputFileName: oldestOutputFileName,
103725
- newerInputFileName: newestInputFileName
103726
- };
104031
+ if (!buildInfoPath) {
104032
+ var outputs = ts.getAllProjectOutputs(project, !host.useCaseSensitiveFileNames());
104033
+ var outputTimeStampMap = getOutputTimeStampMap(state, resolvedPath);
104034
+ for (var _g = 0, outputs_1 = outputs; _g < outputs_1.length; _g++) {
104035
+ var output = outputs_1[_g];
104036
+ var path = toPath(state, output);
104037
+ var outputTime = outputTimeStampMap === null || outputTimeStampMap === void 0 ? void 0 : outputTimeStampMap.get(path);
104038
+ if (!outputTime) {
104039
+ outputTime = ts.getModifiedTime(state.host, output);
104040
+ outputTimeStampMap === null || outputTimeStampMap === void 0 ? void 0 : outputTimeStampMap.set(path, outputTime);
104041
+ }
104042
+ if (outputTime === ts.missingFileModifiedTime) {
104043
+ return {
104044
+ type: ts.UpToDateStatusType.OutputMissing,
104045
+ missingOutputFileName: output
104046
+ };
104047
+ }
104048
+ if (outputTime < oldestOutputFileTime) {
104049
+ oldestOutputFileTime = outputTime;
104050
+ oldestOutputFileName = output;
104051
+ }
104052
+ if (outputTime < newestInputFileTime) {
104053
+ return {
104054
+ type: ts.UpToDateStatusType.OutOfDateWithSelf,
104055
+ outOfDateOutputFileName: oldestOutputFileName,
104056
+ newerInputFileName: newestInputFileName
104057
+ };
104058
+ }
104059
+ }
103727
104060
  }
103728
- else {
103729
- var configStatus = checkConfigFileUpToDateStatus(state, project.options.configFilePath, oldestOutputFileTime, oldestOutputFileName);
103730
- if (configStatus)
103731
- return configStatus;
103732
- var extendedConfigStatus = ts.forEach(project.options.configFile.extendedSourceFiles || ts.emptyArray, function (configFile) { return checkConfigFileUpToDateStatus(state, configFile, oldestOutputFileTime, oldestOutputFileName); });
103733
- if (extendedConfigStatus)
103734
- return extendedConfigStatus;
103735
- var dependentPackageFileStatus = ts.forEach(state.lastCachedPackageJsonLookups.get(resolvedPath) || ts.emptyArray, function (_a) {
103736
- var path = _a[0];
103737
- return checkConfigFileUpToDateStatus(state, path, oldestOutputFileTime, oldestOutputFileName);
103738
- });
103739
- if (dependentPackageFileStatus)
103740
- return dependentPackageFileStatus;
103741
- }
103742
- if (!force && !state.buildInfoChecked.has(resolvedPath)) {
103743
- state.buildInfoChecked.set(resolvedPath, true);
103744
- var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(project.options);
103745
- if (buildInfoPath) {
103746
- ts.solutionPerformance.mark("beforeBuildInfoRead");
103747
- var value = state.readFileWithCache(buildInfoPath);
103748
- ts.solutionPerformance.mark("afterBuildInfoRead");
103749
- ts.solutionPerformance.measure("BuildInfoRead", "beforeBuildInfoRead", "afterBuildInfoRead");
103750
- var buildInfo = value && ts.getBuildInfo(value);
103751
- if (buildInfo && (buildInfo.bundle || buildInfo.program) && buildInfo.version !== ts.version) {
104061
+ var seenRefs = buildInfoPath ? new ts.Set() : undefined;
104062
+ var buildInfoCacheEntry = state.buildInfoCache.get(resolvedPath);
104063
+ seenRefs === null || seenRefs === void 0 ? void 0 : seenRefs.add(resolvedPath);
104064
+ var pseudoUpToDate = false;
104065
+ var usesPrepend = false;
104066
+ var upstreamChangedProject;
104067
+ if (referenceStatuses) {
104068
+ for (var _h = 0, referenceStatuses_1 = referenceStatuses; _h < referenceStatuses_1.length; _h++) {
104069
+ var _j = referenceStatuses_1[_h], ref = _j.ref, refStatus = _j.refStatus, resolvedConfig = _j.resolvedConfig, resolvedRefPath = _j.resolvedRefPath;
104070
+ usesPrepend = usesPrepend || !!(ref.prepend);
104071
+ if (refStatus.newestInputFileTime && refStatus.newestInputFileTime <= oldestOutputFileTime) {
104072
+ continue;
104073
+ }
104074
+ if (buildInfoCacheEntry && hasSameBuildInfo(state, buildInfoCacheEntry, seenRefs, resolvedConfig, resolvedRefPath)) {
103752
104075
  return {
103753
- type: ts.UpToDateStatusType.TsVersionOutputOfDate,
103754
- version: buildInfo.version
104076
+ type: ts.UpToDateStatusType.OutOfDateWithUpstream,
104077
+ outOfDateOutputFileName: buildInfoPath,
104078
+ newerProjectName: ref.path
103755
104079
  };
103756
104080
  }
104081
+ if (refStatus.newestDeclarationFileContentChangedTime && refStatus.newestDeclarationFileContentChangedTime <= oldestOutputFileTime) {
104082
+ pseudoUpToDate = true;
104083
+ upstreamChangedProject = ref.path;
104084
+ continue;
104085
+ }
104086
+ ts.Debug.assert(oldestOutputFileName !== undefined, "Should have an oldest output filename here");
104087
+ return {
104088
+ type: ts.UpToDateStatusType.OutOfDateWithUpstream,
104089
+ outOfDateOutputFileName: oldestOutputFileName,
104090
+ newerProjectName: ref.path
104091
+ };
103757
104092
  }
103758
104093
  }
104094
+ var configStatus = checkConfigFileUpToDateStatus(state, project.options.configFilePath, oldestOutputFileTime, oldestOutputFileName);
104095
+ if (configStatus)
104096
+ return configStatus;
104097
+ var extendedConfigStatus = ts.forEach(project.options.configFile.extendedSourceFiles || ts.emptyArray, function (configFile) { return checkConfigFileUpToDateStatus(state, configFile, oldestOutputFileTime, oldestOutputFileName); });
104098
+ if (extendedConfigStatus)
104099
+ return extendedConfigStatus;
104100
+ var dependentPackageFileStatus = ts.forEach(state.lastCachedPackageJsonLookups.get(resolvedPath) || ts.emptyArray, function (_a) {
104101
+ var path = _a[0];
104102
+ return checkConfigFileUpToDateStatus(state, path, oldestOutputFileTime, oldestOutputFileName);
104103
+ });
104104
+ if (dependentPackageFileStatus)
104105
+ return dependentPackageFileStatus;
103759
104106
  if (usesPrepend && pseudoUpToDate) {
103760
104107
  return {
103761
104108
  type: ts.UpToDateStatusType.OutOfDateWithPrepend,
@@ -103764,15 +104111,36 @@ var ts;
103764
104111
  };
103765
104112
  }
103766
104113
  return {
103767
- type: pseudoUpToDate ? ts.UpToDateStatusType.UpToDateWithUpstreamTypes : ts.UpToDateStatusType.UpToDate,
104114
+ type: pseudoUpToDate ?
104115
+ ts.UpToDateStatusType.UpToDateWithUpstreamTypes :
104116
+ pseudoInputUptodate ?
104117
+ ts.UpToDateStatusType.UpToDateWithInputFileText :
104118
+ ts.UpToDateStatusType.UpToDate,
103768
104119
  newestDeclarationFileContentChangedTime: newestDeclarationFileContentChangedTime,
103769
104120
  newestInputFileTime: newestInputFileTime,
103770
- newestOutputFileTime: newestOutputFileTime,
103771
104121
  newestInputFileName: newestInputFileName,
103772
- newestOutputFileName: newestOutputFileName,
103773
104122
  oldestOutputFileName: oldestOutputFileName
103774
104123
  };
103775
104124
  }
104125
+ function hasSameBuildInfo(state, buildInfoCacheEntry, seenRefs, resolvedConfig, resolvedRefPath) {
104126
+ if (seenRefs.has(resolvedRefPath))
104127
+ return false;
104128
+ seenRefs.add(resolvedRefPath);
104129
+ var refBuildInfo = state.buildInfoCache.get(resolvedRefPath);
104130
+ if (refBuildInfo.path === buildInfoCacheEntry.path)
104131
+ return true;
104132
+ if (resolvedConfig.projectReferences) {
104133
+ for (var _i = 0, _a = resolvedConfig.projectReferences; _i < _a.length; _i++) {
104134
+ var ref = _a[_i];
104135
+ var resolvedRef = ts.resolveProjectReferencePath(ref);
104136
+ var resolvedRefPath_1 = toResolvedConfigFilePath(state, resolvedRef);
104137
+ var resolvedConfig_1 = parseConfigFile(state, resolvedRef, resolvedRefPath_1);
104138
+ if (hasSameBuildInfo(state, buildInfoCacheEntry, seenRefs, resolvedConfig_1, resolvedRefPath_1))
104139
+ return true;
104140
+ }
104141
+ }
104142
+ return false;
104143
+ }
103776
104144
  function getUpToDateStatus(state, project, resolvedPath) {
103777
104145
  if (project === undefined) {
103778
104146
  return { type: ts.UpToDateStatusType.Unbuildable, reason: "File deleted mid-build" };
@@ -103788,42 +104156,68 @@ var ts;
103788
104156
  state.projectStatus.set(resolvedPath, actual);
103789
104157
  return actual;
103790
104158
  }
103791
- function updateOutputTimestampsWorker(state, proj, priorNewestUpdateTime, verboseMessage, skipOutputs) {
104159
+ function updateOutputTimestampsWorker(state, proj, projectPath, verboseMessage, skipOutputs) {
103792
104160
  if (proj.options.noEmit)
103793
- return priorNewestUpdateTime;
104161
+ return;
104162
+ var now;
103794
104163
  ts.solutionPerformance.mark("beforeUpdateOutputTimestamps");
103795
- var host = state.host;
103796
- var outputs = ts.getAllProjectOutputs(proj, !host.useCaseSensitiveFileNames());
103797
- if (!skipOutputs || outputs.length !== skipOutputs.size) {
103798
- var reportVerbose = !!state.options.verbose;
103799
- var now = host.now ? host.now() : new Date();
103800
- for (var _i = 0, outputs_2 = outputs; _i < outputs_2.length; _i++) {
103801
- var file = outputs_2[_i];
103802
- if (skipOutputs && skipOutputs.has(toPath(state, file))) {
103803
- continue;
103804
- }
103805
- if (reportVerbose) {
103806
- reportVerbose = false;
104164
+ var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(proj.options);
104165
+ if (buildInfoPath) {
104166
+ if (!(skipOutputs === null || skipOutputs === void 0 ? void 0 : skipOutputs.has(toPath(state, buildInfoPath)))) {
104167
+ if (!!state.options.verbose)
103807
104168
  reportStatus(state, verboseMessage, proj.options.configFilePath);
104169
+ state.host.setModifiedTime(buildInfoPath, now = getCurrentTime(state.host));
104170
+ getBuildInfoCacheEntry(state, buildInfoPath, projectPath).modifiedTime = now;
104171
+ }
104172
+ state.outputTimeStamps.delete(projectPath);
104173
+ }
104174
+ else {
104175
+ var host = state.host;
104176
+ var outputs = ts.getAllProjectOutputs(proj, !host.useCaseSensitiveFileNames());
104177
+ var outputTimeStampMap_1 = getOutputTimeStampMap(state, projectPath);
104178
+ var modifiedOutputs_1 = outputTimeStampMap_1 ? new ts.Set() : undefined;
104179
+ if (!skipOutputs || outputs.length !== skipOutputs.size) {
104180
+ var reportVerbose = !!state.options.verbose;
104181
+ for (var _i = 0, outputs_2 = outputs; _i < outputs_2.length; _i++) {
104182
+ var file = outputs_2[_i];
104183
+ var path = toPath(state, file);
104184
+ if (skipOutputs === null || skipOutputs === void 0 ? void 0 : skipOutputs.has(path))
104185
+ continue;
104186
+ if (reportVerbose) {
104187
+ reportVerbose = false;
104188
+ reportStatus(state, verboseMessage, proj.options.configFilePath);
104189
+ }
104190
+ host.setModifiedTime(file, now || (now = getCurrentTime(state.host)));
104191
+ if (outputTimeStampMap_1) {
104192
+ outputTimeStampMap_1.set(path, now);
104193
+ modifiedOutputs_1.add(path);
104194
+ }
103808
104195
  }
103809
- if (ts.isDeclarationFileName(file)) {
103810
- priorNewestUpdateTime = newer(priorNewestUpdateTime, ts.getModifiedTime(host, file));
103811
- }
103812
- host.setModifiedTime(file, now);
103813
104196
  }
104197
+ outputTimeStampMap_1 === null || outputTimeStampMap_1 === void 0 ? void 0 : outputTimeStampMap_1.forEach(function (_value, key) {
104198
+ if (!(skipOutputs === null || skipOutputs === void 0 ? void 0 : skipOutputs.has(key)) && !modifiedOutputs_1.has(key))
104199
+ outputTimeStampMap_1.delete(key);
104200
+ });
103814
104201
  }
103815
104202
  ts.solutionPerformance.mark("afterUpdateOutputTimestamps");
103816
104203
  ts.solutionPerformance.measure("UpdateOutputTimestamps", "beforeUpdateOutputTimestamps", "afterUpdateOutputTimestamps");
103817
- return priorNewestUpdateTime;
104204
+ }
104205
+ function getDtsChangeTime(state, options, resolvedConfigPath) {
104206
+ var _a;
104207
+ if (!options.composite)
104208
+ return undefined;
104209
+ var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(options);
104210
+ var buildInfo = getBuildInfo(state, buildInfoPath, resolvedConfigPath, undefined);
104211
+ 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;
103818
104212
  }
103819
104213
  function updateOutputTimestamps(state, proj, resolvedPath) {
103820
104214
  if (state.options.dry) {
103821
104215
  return reportStatus(state, ts.Diagnostics.A_non_dry_build_would_update_timestamps_for_output_of_project_0, proj.options.configFilePath);
103822
104216
  }
103823
- var priorNewestUpdateTime = updateOutputTimestampsWorker(state, proj, minimumDate, ts.Diagnostics.Updating_output_timestamps_of_project_0);
104217
+ updateOutputTimestampsWorker(state, proj, resolvedPath, ts.Diagnostics.Updating_output_timestamps_of_project_0);
103824
104218
  state.projectStatus.set(resolvedPath, {
103825
104219
  type: ts.UpToDateStatusType.UpToDate,
103826
- newestDeclarationFileContentChangedTime: priorNewestUpdateTime,
104220
+ newestDeclarationFileContentChangedTime: getDtsChangeTime(state, proj.options, resolvedPath),
103827
104221
  oldestOutputFileName: ts.getFirstProjectOutput(proj, !state.host.useCaseSensitiveFileNames())
103828
104222
  });
103829
104223
  }
@@ -103862,6 +104256,7 @@ var ts;
103862
104256
  }
103863
104257
  break;
103864
104258
  }
104259
+ case ts.UpToDateStatusType.UpToDateWithInputFileText:
103865
104260
  case ts.UpToDateStatusType.UpToDateWithUpstreamTypes:
103866
104261
  case ts.UpToDateStatusType.OutOfDateWithPrepend:
103867
104262
  if (!(buildResult & BuildResultFlags.DeclarationOutputUnchanged)) {
@@ -104040,12 +104435,10 @@ var ts;
104040
104435
  function watchConfigFile(state, resolved, resolvedPath, parsed) {
104041
104436
  if (!state.watch || state.allWatchedConfigFiles.has(resolvedPath))
104042
104437
  return;
104043
- state.allWatchedConfigFiles.set(resolvedPath, state.watchFile(resolved, function () {
104044
- invalidateProjectAndScheduleBuilds(state, resolvedPath, ts.ConfigFileProgramReloadLevel.Full);
104045
- }, ts.PollingInterval.High, parsed === null || parsed === void 0 ? void 0 : parsed.watchOptions, ts.WatchType.ConfigFile, resolved));
104438
+ 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));
104046
104439
  }
104047
104440
  function watchExtendedConfigFiles(state, resolvedPath, parsed) {
104048
- ts.updateSharedExtendedConfigFileWatcher(resolvedPath, parsed === null || parsed === void 0 ? void 0 : parsed.options, state.allWatchedExtendedConfigFiles, function (extendedConfigFileName, extendedConfigFilePath) { return state.watchFile(extendedConfigFileName, function () {
104441
+ ts.updateSharedExtendedConfigFileWatcher(resolvedPath, parsed === null || parsed === void 0 ? void 0 : parsed.options, state.allWatchedExtendedConfigFiles, function (extendedConfigFileName, extendedConfigFilePath) { return watchFile(state, extendedConfigFileName, function () {
104049
104442
  var _a;
104050
104443
  return (_a = state.allWatchedExtendedConfigFiles.get(extendedConfigFilePath)) === null || _a === void 0 ? void 0 : _a.projects.forEach(function (projectConfigFilePath) {
104051
104444
  return invalidateProjectAndScheduleBuilds(state, projectConfigFilePath, ts.ConfigFileProgramReloadLevel.Full);
@@ -104077,7 +104470,7 @@ var ts;
104077
104470
  if (!state.watch)
104078
104471
  return;
104079
104472
  ts.mutateMap(getOrCreateValueMapFromConfigFileMap(state.allWatchedInputFiles, resolvedPath), ts.arrayToMap(parsed.fileNames, function (fileName) { return toPath(state, fileName); }), {
104080
- createNewValue: function (_path, input) { return state.watchFile(input, function () { return invalidateProjectAndScheduleBuilds(state, resolvedPath, ts.ConfigFileProgramReloadLevel.None); }, ts.PollingInterval.Low, parsed === null || parsed === void 0 ? void 0 : parsed.watchOptions, ts.WatchType.SourceFile, resolved); },
104473
+ 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); },
104081
104474
  onDeleteValue: ts.closeFileWatcher,
104082
104475
  });
104083
104476
  }
@@ -104085,7 +104478,7 @@ var ts;
104085
104478
  if (!state.watch || !state.lastCachedPackageJsonLookups)
104086
104479
  return;
104087
104480
  ts.mutateMap(getOrCreateValueMapFromConfigFileMap(state.allWatchedPackageJsonFiles, resolvedPath), new ts.Map(state.lastCachedPackageJsonLookups.get(resolvedPath)), {
104088
- createNewValue: function (path, _input) { return state.watchFile(path, function () { return invalidateProjectAndScheduleBuilds(state, resolvedPath, ts.ConfigFileProgramReloadLevel.None); }, ts.PollingInterval.High, parsed === null || parsed === void 0 ? void 0 : parsed.watchOptions, ts.WatchType.PackageJson, resolved); },
104481
+ createNewValue: function (path, _input) { return watchFile(state, path, function () { return invalidateProjectAndScheduleBuilds(state, resolvedPath, ts.ConfigFileProgramReloadLevel.None); }, ts.PollingInterval.High, parsed === null || parsed === void 0 ? void 0 : parsed.watchOptions, ts.WatchType.PackageJson, resolved); },
104089
104482
  onDeleteValue: ts.closeFileWatcher,
104090
104483
  });
104091
104484
  }
@@ -104210,25 +104603,26 @@ var ts;
104210
104603
  }
104211
104604
  }
104212
104605
  function reportUpToDateStatus(state, configFileName, status) {
104213
- if (state.options.force && (status.type === ts.UpToDateStatusType.UpToDate || status.type === ts.UpToDateStatusType.UpToDateWithUpstreamTypes)) {
104214
- return reportStatus(state, ts.Diagnostics.Project_0_is_being_forcibly_rebuilt, relName(state, configFileName));
104215
- }
104216
104606
  switch (status.type) {
104217
104607
  case ts.UpToDateStatusType.OutOfDateWithSelf:
104218
- return reportStatus(state, ts.Diagnostics.Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2, relName(state, configFileName), relName(state, status.outOfDateOutputFileName), relName(state, status.newerInputFileName));
104608
+ 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));
104219
104609
  case ts.UpToDateStatusType.OutOfDateWithUpstream:
104220
- return reportStatus(state, ts.Diagnostics.Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2, relName(state, configFileName), relName(state, status.outOfDateOutputFileName), relName(state, status.newerProjectName));
104610
+ 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));
104221
104611
  case ts.UpToDateStatusType.OutputMissing:
104222
104612
  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));
104613
+ case ts.UpToDateStatusType.OutOfDateBuildInfo:
104614
+ 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));
104223
104615
  case ts.UpToDateStatusType.UpToDate:
104224
104616
  if (status.newestInputFileTime !== undefined) {
104225
- return reportStatus(state, ts.Diagnostics.Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2, relName(state, configFileName), relName(state, status.newestInputFileName || ""), relName(state, status.oldestOutputFileName || ""));
104617
+ 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 || ""));
104226
104618
  }
104227
104619
  break;
104228
104620
  case ts.UpToDateStatusType.OutOfDateWithPrepend:
104229
104621
  return reportStatus(state, ts.Diagnostics.Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed, relName(state, configFileName), relName(state, status.newerProjectName));
104230
104622
  case ts.UpToDateStatusType.UpToDateWithUpstreamTypes:
104231
104623
  return reportStatus(state, ts.Diagnostics.Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies, relName(state, configFileName));
104624
+ case ts.UpToDateStatusType.UpToDateWithInputFileText:
104625
+ return reportStatus(state, ts.Diagnostics.Project_0_is_up_to_date_but_needs_update_to_timestamps_of_output_files_that_are_older_than_input_files, relName(state, configFileName));
104232
104626
  case ts.UpToDateStatusType.UpstreamOutOfDate:
104233
104627
  return reportStatus(state, ts.Diagnostics.Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date, relName(state, configFileName), relName(state, status.upstreamProjectName));
104234
104628
  case ts.UpToDateStatusType.UpstreamBlocked:
@@ -104239,6 +104633,8 @@ var ts;
104239
104633
  return reportStatus(state, ts.Diagnostics.Failed_to_parse_file_0_Colon_1, relName(state, configFileName), status.reason);
104240
104634
  case ts.UpToDateStatusType.TsVersionOutputOfDate:
104241
104635
  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);
104636
+ case ts.UpToDateStatusType.ForceBuild:
104637
+ return reportStatus(state, ts.Diagnostics.Project_0_is_being_forcibly_rebuilt, relName(state, configFileName));
104242
104638
  case ts.UpToDateStatusType.ContainerOnly:
104243
104639
  case ts.UpToDateStatusType.ComputingUpstream:
104244
104640
  break;