@typescript-deploys/pr-build 5.0.0-pr-52403-9 → 5.0.0-pr-52450-10

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
@@ -23,7 +23,7 @@ var __export = (target, all) => {
23
23
 
24
24
  // src/compiler/corePublic.ts
25
25
  var versionMajorMinor = "5.0";
26
- var version = `${versionMajorMinor}.0-insiders.20230125`;
26
+ var version = `${versionMajorMinor}.0-insiders.20230127`;
27
27
 
28
28
  // src/compiler/core.ts
29
29
  var emptyArray = [];
@@ -7270,6 +7270,7 @@ var Diagnostics = {
7270
7270
  Use_the_package_json_imports_field_when_resolving_imports: diag(6409, 3 /* Message */, "Use_the_package_json_imports_field_when_resolving_imports_6409", "Use the package.json 'imports' field when resolving imports."),
7271
7271
  Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports: diag(6410, 3 /* Message */, "Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports_6410", "Conditions to set in addition to the resolver-specific defaults when resolving imports."),
7272
7272
  true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false: diag(6411, 3 /* Message */, "true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false_6411", "`true` when 'moduleResolution' is 'node16', 'nodenext', or 'bundler'; otherwise `false`."),
7273
+ Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_but_not_any_more: diag(6412, 3 /* Message */, "Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_6412", "Project '{0}' is out of date because buildinfo file '{1}' indicates that file '{2}' was root file of compilation but not any more."),
7273
7274
  The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1: diag(6500, 3 /* 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}'"),
7274
7275
  The_expected_type_comes_from_this_index_signature: diag(6501, 3 /* Message */, "The_expected_type_comes_from_this_index_signature_6501", "The expected type comes from this index signature."),
7275
7276
  The_expected_type_comes_from_the_return_type_of_this_signature: diag(6502, 3 /* Message */, "The_expected_type_comes_from_the_return_type_of_this_signature_6502", "The expected type comes from the return type of this signature."),
@@ -11724,6 +11725,20 @@ function getScriptTargetFeatures() {
11724
11725
  BigUint64Array: ["at"],
11725
11726
  ObjectConstructor: ["hasOwn"],
11726
11727
  Error: ["cause"]
11728
+ },
11729
+ es2023: {
11730
+ Array: ["findLastIndex", "findLast"],
11731
+ Int8Array: ["findLastIndex", "findLast"],
11732
+ Uint8Array: ["findLastIndex", "findLast"],
11733
+ Uint8ClampedArray: ["findLastIndex", "findLast"],
11734
+ Int16Array: ["findLastIndex", "findLast"],
11735
+ Uint16Array: ["findLastIndex", "findLast"],
11736
+ Int32Array: ["findLastIndex", "findLast"],
11737
+ Uint32Array: ["findLastIndex", "findLast"],
11738
+ Float32Array: ["findLastIndex", "findLast"],
11739
+ Float64Array: ["findLastIndex", "findLast"],
11740
+ BigInt64Array: ["findLastIndex", "findLast"],
11741
+ BigUint64Array: ["findLastIndex", "findLast"]
11727
11742
  }
11728
11743
  };
11729
11744
  }
@@ -15890,6 +15905,22 @@ function getAllowSyntheticDefaultImports(compilerOptions) {
15890
15905
  function moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution) {
15891
15906
  return moduleResolution >= 3 /* Node16 */ && moduleResolution <= 99 /* NodeNext */ || moduleResolution === 100 /* Bundler */;
15892
15907
  }
15908
+ function getResolvePackageJsonExports(compilerOptions) {
15909
+ const moduleResolution = getEmitModuleResolutionKind(compilerOptions);
15910
+ if (!moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution)) {
15911
+ return false;
15912
+ }
15913
+ if (compilerOptions.resolvePackageJsonExports !== void 0) {
15914
+ return compilerOptions.resolvePackageJsonExports;
15915
+ }
15916
+ switch (moduleResolution) {
15917
+ case 3 /* Node16 */:
15918
+ case 99 /* NodeNext */:
15919
+ case 100 /* Bundler */:
15920
+ return true;
15921
+ }
15922
+ return false;
15923
+ }
15893
15924
  function getResolveJsonModule(compilerOptions) {
15894
15925
  if (compilerOptions.resolveJsonModule !== void 0) {
15895
15926
  return compilerOptions.resolveJsonModule;
@@ -28525,7 +28556,7 @@ var Parser;
28525
28556
  return Tristate.False;
28526
28557
  }
28527
28558
  if (languageVariant === 1 /* JSX */) {
28528
- const isArrowFunctionInJsx = lookAhead(() => {
28559
+ return lookAhead(() => {
28529
28560
  parseOptional(85 /* ConstKeyword */);
28530
28561
  const third = nextToken();
28531
28562
  if (third === 94 /* ExtendsKeyword */) {
@@ -28533,19 +28564,15 @@ var Parser;
28533
28564
  switch (fourth) {
28534
28565
  case 63 /* EqualsToken */:
28535
28566
  case 31 /* GreaterThanToken */:
28536
- return false;
28567
+ return Tristate.False;
28537
28568
  default:
28538
- return true;
28569
+ return Tristate.Unknown;
28539
28570
  }
28540
28571
  } else if (third === 27 /* CommaToken */ || third === 63 /* EqualsToken */) {
28541
- return true;
28572
+ return Tristate.True;
28542
28573
  }
28543
- return false;
28574
+ return Tristate.False;
28544
28575
  });
28545
- if (isArrowFunctionInJsx) {
28546
- return Tristate.True;
28547
- }
28548
- return Tristate.False;
28549
28576
  }
28550
28577
  return Tristate.Unknown;
28551
28578
  }
@@ -33731,7 +33758,7 @@ var commandOptionsWithoutBuild = [
33731
33758
  {
33732
33759
  name: "allowArbitraryExtensions",
33733
33760
  type: "boolean",
33734
- affectsModuleResolution: true,
33761
+ affectsProgramStructure: true,
33735
33762
  category: Diagnostics.Modules,
33736
33763
  description: Diagnostics.Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present,
33737
33764
  defaultValueDescription: false
@@ -41796,8 +41823,8 @@ function tryGetModuleNameAsNodeModule({ path, isRedirect }, { getCanonicalFileNa
41796
41823
  if (typeof cachedPackageJson === "object" || cachedPackageJson === void 0 && host.fileExists(packageJsonPath)) {
41797
41824
  const packageJsonContent = (cachedPackageJson == null ? void 0 : cachedPackageJson.contents.packageJsonContent) || JSON.parse(host.readFile(packageJsonPath));
41798
41825
  const importMode = overrideMode || importingSourceFile.impliedNodeFormat;
41799
- if (getEmitModuleResolutionKind(options) === 3 /* Node16 */ || getEmitModuleResolutionKind(options) === 99 /* NodeNext */) {
41800
- const conditions = ["node", importMode === 99 /* ESNext */ ? "import" : "require", "types"];
41826
+ if (getResolvePackageJsonExports(options)) {
41827
+ const conditions = getConditions(options, importMode === 99 /* ESNext */);
41801
41828
  const fromExports = packageJsonContent.exports && typeof packageJsonContent.name === "string" ? tryGetModuleNameFromExports(options, path, packageRootPath, getPackageNameFromTypesPackageName(packageJsonContent.name), packageJsonContent.exports, conditions) : void 0;
41802
41829
  if (fromExports) {
41803
41830
  const withJsExtension = !hasTSFileExtension(fromExports.moduleFileToTry) ? fromExports : { moduleFileToTry: removeFileExtension(fromExports.moduleFileToTry) + tryGetJSExtensionForFile(fromExports.moduleFileToTry, options) };
@@ -46308,7 +46335,7 @@ function createTypeChecker(host) {
46308
46335
  return writer ? symbolToStringWorker(writer).getText() : usingSingleLineStringWriter(symbolToStringWorker);
46309
46336
  function symbolToStringWorker(writer2) {
46310
46337
  const entity = builder(symbol, meaning, enclosingDeclaration, nodeFlags);
46311
- const printer = (enclosingDeclaration == null ? void 0 : enclosingDeclaration.kind) === 308 /* SourceFile */ ? createPrinter({ removeComments: true, neverAsciiEscape: true }) : createPrinter({ removeComments: true });
46338
+ const printer = (enclosingDeclaration == null ? void 0 : enclosingDeclaration.kind) === 308 /* SourceFile */ ? createPrinterWithRemoveCommentsNeverAsciiEscape() : createPrinterWithRemoveComments();
46312
46339
  const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration);
46313
46340
  printer.writeNode(
46314
46341
  4 /* Unspecified */,
@@ -46330,7 +46357,7 @@ function createTypeChecker(host) {
46330
46357
  sigOutput = kind === 1 /* Construct */ ? 177 /* ConstructSignature */ : 176 /* CallSignature */;
46331
46358
  }
46332
46359
  const sig = nodeBuilder.signatureToSignatureDeclaration(signature, sigOutput, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | 512 /* WriteTypeParametersInQualifiedName */);
46333
- const printer = createPrinter({ removeComments: true, omitTrailingSemicolon: true });
46360
+ const printer = createPrinterWithRemoveCommentsOmitTrailingSemicolon();
46334
46361
  const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration);
46335
46362
  printer.writeNode(
46336
46363
  4 /* Unspecified */,
@@ -46347,8 +46374,7 @@ function createTypeChecker(host) {
46347
46374
  const typeNode = nodeBuilder.typeToTypeNode(type, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | (noTruncation ? 1 /* NoTruncation */ : 0));
46348
46375
  if (typeNode === void 0)
46349
46376
  return Debug.fail("should always get typenode");
46350
- const options = { removeComments: type !== unresolvedType };
46351
- const printer = createPrinter(options);
46377
+ const printer = type !== unresolvedType ? createPrinterWithRemoveComments() : createPrinterWithDefaults();
46352
46378
  const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration);
46353
46379
  printer.writeNode(
46354
46380
  4 /* Unspecified */,
@@ -49699,7 +49725,7 @@ function createTypeChecker(host) {
49699
49725
  typePredicate.type && nodeBuilder.typeToTypeNode(typePredicate.type, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | 512 /* WriteTypeParametersInQualifiedName */)
49700
49726
  // TODO: GH#18217
49701
49727
  );
49702
- const printer = createPrinter({ removeComments: true });
49728
+ const printer = createPrinterWithRemoveComments();
49703
49729
  const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration);
49704
49730
  printer.writeNode(
49705
49731
  4 /* Unspecified */,
@@ -78254,7 +78280,7 @@ function createTypeChecker(host) {
78254
78280
  if (typeAnnotationNode) {
78255
78281
  checkTypeAssignableTo(checkExpressionCached(node.expression), getTypeFromTypeNode(typeAnnotationNode), node.expression);
78256
78282
  }
78257
- const isIllegalExportDefaultInCJS = !node.isExportEquals && compilerOptions.verbatimModuleSyntax && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */);
78283
+ const isIllegalExportDefaultInCJS = !node.isExportEquals && !(node.flags & 16777216 /* Ambient */) && compilerOptions.verbatimModuleSyntax && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */);
78258
78284
  if (node.expression.kind === 79 /* Identifier */) {
78259
78285
  const id = node.expression;
78260
78286
  const sym = resolveEntityName(
@@ -106273,6 +106299,10 @@ function emitUsingBuildInfoWorker(config, host, getCommandLine, customTransforme
106273
106299
  );
106274
106300
  return outputFiles;
106275
106301
  }
106302
+ var createPrinterWithDefaults = /* @__PURE__ */ memoize(() => createPrinter({}));
106303
+ var createPrinterWithRemoveComments = /* @__PURE__ */ memoize(() => createPrinter({ removeComments: true }));
106304
+ var createPrinterWithRemoveCommentsNeverAsciiEscape = /* @__PURE__ */ memoize(() => createPrinter({ removeComments: true, neverAsciiEscape: true }));
106305
+ var createPrinterWithRemoveCommentsOmitTrailingSemicolon = /* @__PURE__ */ memoize(() => createPrinter({ removeComments: true, omitTrailingSemicolon: true }));
106276
106306
  function createPrinter(printerOptions = {}, handlers = {}) {
106277
106307
  const {
106278
106308
  hasGlobalName,
@@ -116216,14 +116246,17 @@ function getBuildInfo2(state, bundle) {
116216
116246
  const latestChangedDtsFile = state.latestChangedDtsFile ? relativeToBuildInfoEnsuringAbsolutePath(state.latestChangedDtsFile) : void 0;
116217
116247
  const fileNames = [];
116218
116248
  const fileNameToFileId = /* @__PURE__ */ new Map();
116249
+ const root = [];
116219
116250
  if (outFile(state.compilerOptions)) {
116220
116251
  const fileInfos2 = arrayFrom(state.fileInfos.entries(), ([key, value]) => {
116221
- toFileId(key);
116252
+ const fileId = toFileId(key);
116253
+ tryAddRoot(key, fileId);
116222
116254
  return value.impliedFormat ? { version: value.version, impliedFormat: value.impliedFormat, signature: void 0, affectsGlobalScope: void 0 } : value.version;
116223
116255
  });
116224
116256
  const program2 = {
116225
116257
  fileNames,
116226
116258
  fileInfos: fileInfos2,
116259
+ root,
116227
116260
  options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions),
116228
116261
  outSignature: state.outSignature,
116229
116262
  latestChangedDtsFile,
@@ -116251,6 +116284,7 @@ function getBuildInfo2(state, bundle) {
116251
116284
  const fileInfos = arrayFrom(state.fileInfos.entries(), ([key, value]) => {
116252
116285
  var _a3, _b2;
116253
116286
  const fileId = toFileId(key);
116287
+ tryAddRoot(key, fileId);
116254
116288
  Debug.assert(fileNames[fileId - 1] === relativeToBuildInfo(key));
116255
116289
  const oldSignature = (_a3 = state.oldSignatures) == null ? void 0 : _a3.get(key);
116256
116290
  const actualSignature = oldSignature !== void 0 ? oldSignature || void 0 : value.signature;
@@ -116350,6 +116384,7 @@ function getBuildInfo2(state, bundle) {
116350
116384
  const program = {
116351
116385
  fileNames,
116352
116386
  fileInfos,
116387
+ root,
116353
116388
  options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions),
116354
116389
  fileIdsList,
116355
116390
  referencedMap,
@@ -116385,6 +116420,24 @@ function getBuildInfo2(state, bundle) {
116385
116420
  }
116386
116421
  return fileIdListId;
116387
116422
  }
116423
+ function tryAddRoot(path, fileId) {
116424
+ const file = state.program.getSourceFile(path);
116425
+ if (!state.program.getFileIncludeReasons().get(file.path).some((r) => r.kind === 0 /* RootFile */))
116426
+ return;
116427
+ if (!root.length)
116428
+ return root.push(fileId);
116429
+ const last2 = root[root.length - 1];
116430
+ const isLastStartEnd = isArray(last2);
116431
+ if (isLastStartEnd && last2[1] === fileId - 1)
116432
+ return last2[1] = fileId;
116433
+ if (isLastStartEnd || root.length === 1 || last2 !== fileId - 1)
116434
+ return root.push(fileId);
116435
+ const lastButOne = root[root.length - 2];
116436
+ if (!isNumber(lastButOne) || lastButOne !== last2 - 1)
116437
+ return root.push(fileId);
116438
+ root[root.length - 2] = [lastButOne, fileId];
116439
+ return root.length = root.length - 1;
116440
+ }
116388
116441
  function convertToProgramBuildInfoCompilerOptions(options) {
116389
116442
  let result;
116390
116443
  const { optionsNameMap } = getOptionsNameMap();
@@ -116892,12 +116945,28 @@ function getBuildInfoFileVersionMap(program, buildInfoPath, host) {
116892
116945
  const buildInfoDirectory = getDirectoryPath(getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));
116893
116946
  const getCanonicalFileName = createGetCanonicalFileName(host.useCaseSensitiveFileNames());
116894
116947
  const fileInfos = /* @__PURE__ */ new Map();
116948
+ let rootIndex = 0;
116949
+ const roots = [];
116895
116950
  program.fileInfos.forEach((fileInfo, index) => {
116896
116951
  const path = toPath(program.fileNames[index], buildInfoDirectory, getCanonicalFileName);
116897
116952
  const version2 = isString(fileInfo) ? fileInfo : fileInfo.version;
116898
116953
  fileInfos.set(path, version2);
116954
+ if (rootIndex < program.root.length) {
116955
+ const current = program.root[rootIndex];
116956
+ const fileId = index + 1;
116957
+ if (isArray(current)) {
116958
+ if (current[0] <= fileId && fileId <= current[1]) {
116959
+ roots.push(path);
116960
+ if (current[1] === fileId)
116961
+ rootIndex++;
116962
+ }
116963
+ } else if (current === fileId) {
116964
+ roots.push(path);
116965
+ rootIndex++;
116966
+ }
116967
+ }
116899
116968
  });
116900
- return fileInfos;
116969
+ return { fileInfos, roots };
116901
116970
  }
116902
116971
  function createRedirectedBuilderProgram(getState, configFileParsingDiagnostics) {
116903
116972
  return {
@@ -120009,7 +120078,7 @@ function getNextInvalidatedProjectCreateInfo(state, buildOrder, reportQueue) {
120009
120078
  }
120010
120079
  continue;
120011
120080
  }
120012
- if (status.type === 2 /* UpToDateWithUpstreamTypes */ || status.type === 14 /* UpToDateWithInputFileText */) {
120081
+ if (status.type === 2 /* UpToDateWithUpstreamTypes */ || status.type === 15 /* UpToDateWithInputFileText */) {
120013
120082
  reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config));
120014
120083
  return {
120015
120084
  kind: 2 /* UpdateOutputFileStamps */,
@@ -120021,7 +120090,7 @@ function getNextInvalidatedProjectCreateInfo(state, buildOrder, reportQueue) {
120021
120090
  };
120022
120091
  }
120023
120092
  }
120024
- if (status.type === 11 /* UpstreamBlocked */) {
120093
+ if (status.type === 12 /* UpstreamBlocked */) {
120025
120094
  verboseReportProjectStatus(state, project, status);
120026
120095
  reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config));
120027
120096
  projectPendingBuild.delete(projectPath);
@@ -120035,7 +120104,7 @@ function getNextInvalidatedProjectCreateInfo(state, buildOrder, reportQueue) {
120035
120104
  }
120036
120105
  continue;
120037
120106
  }
120038
- if (status.type === 15 /* ContainerOnly */) {
120107
+ if (status.type === 16 /* ContainerOnly */) {
120039
120108
  verboseReportProjectStatus(state, project, status);
120040
120109
  reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config));
120041
120110
  projectPendingBuild.delete(projectPath);
@@ -120222,31 +120291,31 @@ function getUpToDateStatusWorker(state, project, resolvedPath) {
120222
120291
  var _a2, _b;
120223
120292
  if (!project.fileNames.length && !canJsonReportNoInputFiles(project.raw)) {
120224
120293
  return {
120225
- type: 15 /* ContainerOnly */
120294
+ type: 16 /* ContainerOnly */
120226
120295
  };
120227
120296
  }
120228
120297
  let referenceStatuses;
120229
120298
  const force = !!state.options.force;
120230
120299
  if (project.projectReferences) {
120231
- state.projectStatus.set(resolvedPath, { type: 12 /* ComputingUpstream */ });
120300
+ state.projectStatus.set(resolvedPath, { type: 13 /* ComputingUpstream */ });
120232
120301
  for (const ref of project.projectReferences) {
120233
120302
  const resolvedRef = resolveProjectReferencePath(ref);
120234
120303
  const resolvedRefPath = toResolvedConfigFilePath(state, resolvedRef);
120235
120304
  const resolvedConfig = parseConfigFile(state, resolvedRef, resolvedRefPath);
120236
120305
  const refStatus = getUpToDateStatus(state, resolvedConfig, resolvedRefPath);
120237
- if (refStatus.type === 12 /* ComputingUpstream */ || refStatus.type === 15 /* ContainerOnly */) {
120306
+ if (refStatus.type === 13 /* ComputingUpstream */ || refStatus.type === 16 /* ContainerOnly */) {
120238
120307
  continue;
120239
120308
  }
120240
- if (refStatus.type === 0 /* Unbuildable */ || refStatus.type === 11 /* UpstreamBlocked */) {
120309
+ if (refStatus.type === 0 /* Unbuildable */ || refStatus.type === 12 /* UpstreamBlocked */) {
120241
120310
  return {
120242
- type: 11 /* UpstreamBlocked */,
120311
+ type: 12 /* UpstreamBlocked */,
120243
120312
  upstreamProjectName: ref.path,
120244
- upstreamProjectBlocked: refStatus.type === 11 /* UpstreamBlocked */
120313
+ upstreamProjectBlocked: refStatus.type === 12 /* UpstreamBlocked */
120245
120314
  };
120246
120315
  }
120247
120316
  if (refStatus.type !== 1 /* UpToDate */) {
120248
120317
  return {
120249
- type: 10 /* UpstreamOutOfDate */,
120318
+ type: 11 /* UpstreamOutOfDate */,
120250
120319
  upstreamProjectName: ref.path
120251
120320
  };
120252
120321
  }
@@ -120255,7 +120324,7 @@ function getUpToDateStatusWorker(state, project, resolvedPath) {
120255
120324
  }
120256
120325
  }
120257
120326
  if (force)
120258
- return { type: 16 /* ForceBuild */ };
120327
+ return { type: 17 /* ForceBuild */ };
120259
120328
  const { host } = state;
120260
120329
  const buildInfoPath = getTsBuildInfoEmitOutputFilePath(project.options);
120261
120330
  let oldestOutputFileName;
@@ -120288,7 +120357,7 @@ function getUpToDateStatusWorker(state, project, resolvedPath) {
120288
120357
  }
120289
120358
  if ((buildInfo.bundle || buildInfo.program) && buildInfo.version !== version) {
120290
120359
  return {
120291
- type: 13 /* TsVersionOutputOfDate */,
120360
+ type: 14 /* TsVersionOutputOfDate */,
120292
120361
  version: buildInfo.version
120293
120362
  };
120294
120363
  }
@@ -120313,6 +120382,7 @@ function getUpToDateStatusWorker(state, project, resolvedPath) {
120313
120382
  let newestInputFileName = void 0;
120314
120383
  let newestInputFileTime = minimumDate;
120315
120384
  let pseudoInputUpToDate = false;
120385
+ const seenRoots = /* @__PURE__ */ new Set();
120316
120386
  for (const inputFile of project.fileNames) {
120317
120387
  const inputTime = getModifiedTime2(state, inputFile);
120318
120388
  if (inputTime === missingFileModifiedTime) {
@@ -120327,7 +120397,7 @@ function getUpToDateStatusWorker(state, project, resolvedPath) {
120327
120397
  if (buildInfoProgram) {
120328
120398
  if (!buildInfoVersionMap)
120329
120399
  buildInfoVersionMap = getBuildInfoFileVersionMap(buildInfoProgram, buildInfoPath, host);
120330
- version2 = buildInfoVersionMap.get(toPath2(state, inputFile));
120400
+ version2 = buildInfoVersionMap.fileInfos.get(toPath2(state, inputFile));
120331
120401
  const text = version2 ? state.readFileWithCache(inputFile) : void 0;
120332
120402
  currentVersion = text !== void 0 ? getSourceFileVersionAsHashFromText(host, text) : void 0;
120333
120403
  if (version2 && version2 === currentVersion)
@@ -120345,6 +120415,21 @@ function getUpToDateStatusWorker(state, project, resolvedPath) {
120345
120415
  newestInputFileName = inputFile;
120346
120416
  newestInputFileTime = inputTime;
120347
120417
  }
120418
+ if (buildInfoProgram)
120419
+ seenRoots.add(toPath2(state, inputFile));
120420
+ }
120421
+ if (buildInfoProgram) {
120422
+ if (!buildInfoVersionMap)
120423
+ buildInfoVersionMap = getBuildInfoFileVersionMap(buildInfoProgram, buildInfoPath, host);
120424
+ for (const existingRoot of buildInfoVersionMap.roots) {
120425
+ if (!seenRoots.has(existingRoot)) {
120426
+ return {
120427
+ type: 10 /* OutOfDateRoots */,
120428
+ buildInfoFile: buildInfoPath,
120429
+ inputFile: existingRoot
120430
+ };
120431
+ }
120432
+ }
120348
120433
  }
120349
120434
  if (!buildInfoPath) {
120350
120435
  const outputs = getAllProjectOutputs(project, !host.useCaseSensitiveFileNames());
@@ -120426,7 +120511,7 @@ function getUpToDateStatusWorker(state, project, resolvedPath) {
120426
120511
  };
120427
120512
  }
120428
120513
  return {
120429
- type: pseudoUpToDate ? 2 /* UpToDateWithUpstreamTypes */ : pseudoInputUpToDate ? 14 /* UpToDateWithInputFileText */ : 1 /* UpToDate */,
120514
+ type: pseudoUpToDate ? 2 /* UpToDateWithUpstreamTypes */ : pseudoInputUpToDate ? 15 /* UpToDateWithInputFileText */ : 1 /* UpToDate */,
120430
120515
  newestInputFileTime,
120431
120516
  newestInputFileName,
120432
120517
  oldestOutputFileName
@@ -120545,7 +120630,7 @@ function queueReferencingProjects(state, project, projectPath, projectIndex, con
120545
120630
  }
120546
120631
  break;
120547
120632
  }
120548
- case 14 /* UpToDateWithInputFileText */:
120633
+ case 15 /* UpToDateWithInputFileText */:
120549
120634
  case 2 /* UpToDateWithUpstreamTypes */:
120550
120635
  case 3 /* OutOfDateWithPrepend */:
120551
120636
  if (!(buildResult & 2 /* DeclarationOutputUnchanged */)) {
@@ -120556,7 +120641,7 @@ function queueReferencingProjects(state, project, projectPath, projectIndex, con
120556
120641
  });
120557
120642
  }
120558
120643
  break;
120559
- case 11 /* UpstreamBlocked */:
120644
+ case 12 /* UpstreamBlocked */:
120560
120645
  if (toResolvedConfigFilePath(state, resolveProjectName(state, status.upstreamProjectName)) === projectPath) {
120561
120646
  clearProjectStatus(state, nextProjectPath);
120562
120647
  }
@@ -121007,6 +121092,14 @@ function reportUpToDateStatus(state, configFileName, status) {
121007
121092
  relName(state, configFileName),
121008
121093
  relName(state, status.buildInfoFile)
121009
121094
  );
121095
+ case 10 /* OutOfDateRoots */:
121096
+ return reportStatus(
121097
+ state,
121098
+ Diagnostics.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_but_not_any_more,
121099
+ relName(state, configFileName),
121100
+ relName(state, status.buildInfoFile),
121101
+ relName(state, status.inputFile)
121102
+ );
121010
121103
  case 1 /* UpToDate */:
121011
121104
  if (status.newestInputFileTime !== void 0) {
121012
121105
  return reportStatus(
@@ -121031,20 +121124,20 @@ function reportUpToDateStatus(state, configFileName, status) {
121031
121124
  Diagnostics.Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies,
121032
121125
  relName(state, configFileName)
121033
121126
  );
121034
- case 14 /* UpToDateWithInputFileText */:
121127
+ case 15 /* UpToDateWithInputFileText */:
121035
121128
  return reportStatus(
121036
121129
  state,
121037
121130
  Diagnostics.Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_files,
121038
121131
  relName(state, configFileName)
121039
121132
  );
121040
- case 10 /* UpstreamOutOfDate */:
121133
+ case 11 /* UpstreamOutOfDate */:
121041
121134
  return reportStatus(
121042
121135
  state,
121043
121136
  Diagnostics.Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date,
121044
121137
  relName(state, configFileName),
121045
121138
  relName(state, status.upstreamProjectName)
121046
121139
  );
121047
- case 11 /* UpstreamBlocked */:
121140
+ case 12 /* UpstreamBlocked */:
121048
121141
  return reportStatus(
121049
121142
  state,
121050
121143
  status.upstreamProjectBlocked ? Diagnostics.Project_0_can_t_be_built_because_its_dependency_1_was_not_built : Diagnostics.Project_0_can_t_be_built_because_its_dependency_1_has_errors,
@@ -121058,7 +121151,7 @@ function reportUpToDateStatus(state, configFileName, status) {
121058
121151
  relName(state, configFileName),
121059
121152
  status.reason
121060
121153
  );
121061
- case 13 /* TsVersionOutputOfDate */:
121154
+ case 14 /* TsVersionOutputOfDate */:
121062
121155
  return reportStatus(
121063
121156
  state,
121064
121157
  Diagnostics.Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2,
@@ -121066,14 +121159,14 @@ function reportUpToDateStatus(state, configFileName, status) {
121066
121159
  status.version,
121067
121160
  version
121068
121161
  );
121069
- case 16 /* ForceBuild */:
121162
+ case 17 /* ForceBuild */:
121070
121163
  return reportStatus(
121071
121164
  state,
121072
121165
  Diagnostics.Project_0_is_being_forcibly_rebuilt,
121073
121166
  relName(state, configFileName)
121074
121167
  );
121075
- case 15 /* ContainerOnly */:
121076
- case 12 /* ComputingUpstream */:
121168
+ case 16 /* ContainerOnly */:
121169
+ case 13 /* ComputingUpstream */:
121077
121170
  break;
121078
121171
  default:
121079
121172
  assertType(status);