@typescript-deploys/pr-build 5.0.0-pr-52403-9 → 5.0.0-pr-52434-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/tsc.js +134 -37
- package/lib/tsserver.js +151 -58
- package/lib/tsserverlibrary.js +147 -59
- package/lib/typescript.js +142 -59
- package/lib/typingsInstaller.js +3 -2
- package/package.json +1 -1
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.
|
|
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;
|
|
@@ -33731,7 +33762,7 @@ var commandOptionsWithoutBuild = [
|
|
|
33731
33762
|
{
|
|
33732
33763
|
name: "allowArbitraryExtensions",
|
|
33733
33764
|
type: "boolean",
|
|
33734
|
-
|
|
33765
|
+
affectsProgramStructure: true,
|
|
33735
33766
|
category: Diagnostics.Modules,
|
|
33736
33767
|
description: Diagnostics.Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present,
|
|
33737
33768
|
defaultValueDescription: false
|
|
@@ -41796,8 +41827,8 @@ function tryGetModuleNameAsNodeModule({ path, isRedirect }, { getCanonicalFileNa
|
|
|
41796
41827
|
if (typeof cachedPackageJson === "object" || cachedPackageJson === void 0 && host.fileExists(packageJsonPath)) {
|
|
41797
41828
|
const packageJsonContent = (cachedPackageJson == null ? void 0 : cachedPackageJson.contents.packageJsonContent) || JSON.parse(host.readFile(packageJsonPath));
|
|
41798
41829
|
const importMode = overrideMode || importingSourceFile.impliedNodeFormat;
|
|
41799
|
-
if (
|
|
41800
|
-
const conditions =
|
|
41830
|
+
if (getResolvePackageJsonExports(options)) {
|
|
41831
|
+
const conditions = getConditions(options, importMode === 99 /* ESNext */);
|
|
41801
41832
|
const fromExports = packageJsonContent.exports && typeof packageJsonContent.name === "string" ? tryGetModuleNameFromExports(options, path, packageRootPath, getPackageNameFromTypesPackageName(packageJsonContent.name), packageJsonContent.exports, conditions) : void 0;
|
|
41802
41833
|
if (fromExports) {
|
|
41803
41834
|
const withJsExtension = !hasTSFileExtension(fromExports.moduleFileToTry) ? fromExports : { moduleFileToTry: removeFileExtension(fromExports.moduleFileToTry) + tryGetJSExtensionForFile(fromExports.moduleFileToTry, options) };
|
|
@@ -46308,7 +46339,7 @@ function createTypeChecker(host) {
|
|
|
46308
46339
|
return writer ? symbolToStringWorker(writer).getText() : usingSingleLineStringWriter(symbolToStringWorker);
|
|
46309
46340
|
function symbolToStringWorker(writer2) {
|
|
46310
46341
|
const entity = builder(symbol, meaning, enclosingDeclaration, nodeFlags);
|
|
46311
|
-
const printer = (enclosingDeclaration == null ? void 0 : enclosingDeclaration.kind) === 308 /* SourceFile */ ?
|
|
46342
|
+
const printer = (enclosingDeclaration == null ? void 0 : enclosingDeclaration.kind) === 308 /* SourceFile */ ? createPrinterWithRemoveCommentsNeverAsciiEscape() : createPrinterWithRemoveComments();
|
|
46312
46343
|
const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration);
|
|
46313
46344
|
printer.writeNode(
|
|
46314
46345
|
4 /* Unspecified */,
|
|
@@ -46330,7 +46361,7 @@ function createTypeChecker(host) {
|
|
|
46330
46361
|
sigOutput = kind === 1 /* Construct */ ? 177 /* ConstructSignature */ : 176 /* CallSignature */;
|
|
46331
46362
|
}
|
|
46332
46363
|
const sig = nodeBuilder.signatureToSignatureDeclaration(signature, sigOutput, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | 512 /* WriteTypeParametersInQualifiedName */);
|
|
46333
|
-
const printer =
|
|
46364
|
+
const printer = createPrinterWithRemoveCommentsOmitTrailingSemicolon();
|
|
46334
46365
|
const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration);
|
|
46335
46366
|
printer.writeNode(
|
|
46336
46367
|
4 /* Unspecified */,
|
|
@@ -46347,8 +46378,7 @@ function createTypeChecker(host) {
|
|
|
46347
46378
|
const typeNode = nodeBuilder.typeToTypeNode(type, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | (noTruncation ? 1 /* NoTruncation */ : 0));
|
|
46348
46379
|
if (typeNode === void 0)
|
|
46349
46380
|
return Debug.fail("should always get typenode");
|
|
46350
|
-
const
|
|
46351
|
-
const printer = createPrinter(options);
|
|
46381
|
+
const printer = type !== unresolvedType ? createPrinterWithRemoveComments() : createPrinterWithDefaults();
|
|
46352
46382
|
const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration);
|
|
46353
46383
|
printer.writeNode(
|
|
46354
46384
|
4 /* Unspecified */,
|
|
@@ -49699,7 +49729,7 @@ function createTypeChecker(host) {
|
|
|
49699
49729
|
typePredicate.type && nodeBuilder.typeToTypeNode(typePredicate.type, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | 512 /* WriteTypeParametersInQualifiedName */)
|
|
49700
49730
|
// TODO: GH#18217
|
|
49701
49731
|
);
|
|
49702
|
-
const printer =
|
|
49732
|
+
const printer = createPrinterWithRemoveComments();
|
|
49703
49733
|
const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration);
|
|
49704
49734
|
printer.writeNode(
|
|
49705
49735
|
4 /* Unspecified */,
|
|
@@ -78254,10 +78284,10 @@ function createTypeChecker(host) {
|
|
|
78254
78284
|
if (typeAnnotationNode) {
|
|
78255
78285
|
checkTypeAssignableTo(checkExpressionCached(node.expression), getTypeFromTypeNode(typeAnnotationNode), node.expression);
|
|
78256
78286
|
}
|
|
78257
|
-
const isIllegalExportDefaultInCJS = !node.isExportEquals && compilerOptions.verbatimModuleSyntax && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */);
|
|
78287
|
+
const isIllegalExportDefaultInCJS = !node.isExportEquals && !(node.flags & 16777216 /* Ambient */) && compilerOptions.verbatimModuleSyntax && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */);
|
|
78258
78288
|
if (node.expression.kind === 79 /* Identifier */) {
|
|
78259
78289
|
const id = node.expression;
|
|
78260
|
-
const sym = resolveEntityName(
|
|
78290
|
+
const sym = getExportSymbolOfValueSymbolIfExported(resolveEntityName(
|
|
78261
78291
|
id,
|
|
78262
78292
|
67108863 /* All */,
|
|
78263
78293
|
/*ignoreErrors*/
|
|
@@ -78265,7 +78295,7 @@ function createTypeChecker(host) {
|
|
|
78265
78295
|
/*dontResolveAlias*/
|
|
78266
78296
|
true,
|
|
78267
78297
|
node
|
|
78268
|
-
);
|
|
78298
|
+
));
|
|
78269
78299
|
if (sym) {
|
|
78270
78300
|
markAliasReferenced(sym, id);
|
|
78271
78301
|
if (getAllSymbolFlags(sym) & 111551 /* Value */) {
|
|
@@ -106273,6 +106303,10 @@ function emitUsingBuildInfoWorker(config, host, getCommandLine, customTransforme
|
|
|
106273
106303
|
);
|
|
106274
106304
|
return outputFiles;
|
|
106275
106305
|
}
|
|
106306
|
+
var createPrinterWithDefaults = /* @__PURE__ */ memoize(() => createPrinter({}));
|
|
106307
|
+
var createPrinterWithRemoveComments = /* @__PURE__ */ memoize(() => createPrinter({ removeComments: true }));
|
|
106308
|
+
var createPrinterWithRemoveCommentsNeverAsciiEscape = /* @__PURE__ */ memoize(() => createPrinter({ removeComments: true, neverAsciiEscape: true }));
|
|
106309
|
+
var createPrinterWithRemoveCommentsOmitTrailingSemicolon = /* @__PURE__ */ memoize(() => createPrinter({ removeComments: true, omitTrailingSemicolon: true }));
|
|
106276
106310
|
function createPrinter(printerOptions = {}, handlers = {}) {
|
|
106277
106311
|
const {
|
|
106278
106312
|
hasGlobalName,
|
|
@@ -116216,14 +116250,17 @@ function getBuildInfo2(state, bundle) {
|
|
|
116216
116250
|
const latestChangedDtsFile = state.latestChangedDtsFile ? relativeToBuildInfoEnsuringAbsolutePath(state.latestChangedDtsFile) : void 0;
|
|
116217
116251
|
const fileNames = [];
|
|
116218
116252
|
const fileNameToFileId = /* @__PURE__ */ new Map();
|
|
116253
|
+
const root = [];
|
|
116219
116254
|
if (outFile(state.compilerOptions)) {
|
|
116220
116255
|
const fileInfos2 = arrayFrom(state.fileInfos.entries(), ([key, value]) => {
|
|
116221
|
-
toFileId(key);
|
|
116256
|
+
const fileId = toFileId(key);
|
|
116257
|
+
tryAddRoot(key, fileId);
|
|
116222
116258
|
return value.impliedFormat ? { version: value.version, impliedFormat: value.impliedFormat, signature: void 0, affectsGlobalScope: void 0 } : value.version;
|
|
116223
116259
|
});
|
|
116224
116260
|
const program2 = {
|
|
116225
116261
|
fileNames,
|
|
116226
116262
|
fileInfos: fileInfos2,
|
|
116263
|
+
root,
|
|
116227
116264
|
options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions),
|
|
116228
116265
|
outSignature: state.outSignature,
|
|
116229
116266
|
latestChangedDtsFile,
|
|
@@ -116251,6 +116288,7 @@ function getBuildInfo2(state, bundle) {
|
|
|
116251
116288
|
const fileInfos = arrayFrom(state.fileInfos.entries(), ([key, value]) => {
|
|
116252
116289
|
var _a3, _b2;
|
|
116253
116290
|
const fileId = toFileId(key);
|
|
116291
|
+
tryAddRoot(key, fileId);
|
|
116254
116292
|
Debug.assert(fileNames[fileId - 1] === relativeToBuildInfo(key));
|
|
116255
116293
|
const oldSignature = (_a3 = state.oldSignatures) == null ? void 0 : _a3.get(key);
|
|
116256
116294
|
const actualSignature = oldSignature !== void 0 ? oldSignature || void 0 : value.signature;
|
|
@@ -116350,6 +116388,7 @@ function getBuildInfo2(state, bundle) {
|
|
|
116350
116388
|
const program = {
|
|
116351
116389
|
fileNames,
|
|
116352
116390
|
fileInfos,
|
|
116391
|
+
root,
|
|
116353
116392
|
options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions),
|
|
116354
116393
|
fileIdsList,
|
|
116355
116394
|
referencedMap,
|
|
@@ -116385,6 +116424,24 @@ function getBuildInfo2(state, bundle) {
|
|
|
116385
116424
|
}
|
|
116386
116425
|
return fileIdListId;
|
|
116387
116426
|
}
|
|
116427
|
+
function tryAddRoot(path, fileId) {
|
|
116428
|
+
const file = state.program.getSourceFile(path);
|
|
116429
|
+
if (!state.program.getFileIncludeReasons().get(file.path).some((r) => r.kind === 0 /* RootFile */))
|
|
116430
|
+
return;
|
|
116431
|
+
if (!root.length)
|
|
116432
|
+
return root.push(fileId);
|
|
116433
|
+
const last2 = root[root.length - 1];
|
|
116434
|
+
const isLastStartEnd = isArray(last2);
|
|
116435
|
+
if (isLastStartEnd && last2[1] === fileId - 1)
|
|
116436
|
+
return last2[1] = fileId;
|
|
116437
|
+
if (isLastStartEnd || root.length === 1 || last2 !== fileId - 1)
|
|
116438
|
+
return root.push(fileId);
|
|
116439
|
+
const lastButOne = root[root.length - 2];
|
|
116440
|
+
if (!isNumber(lastButOne) || lastButOne !== last2 - 1)
|
|
116441
|
+
return root.push(fileId);
|
|
116442
|
+
root[root.length - 2] = [lastButOne, fileId];
|
|
116443
|
+
return root.length = root.length - 1;
|
|
116444
|
+
}
|
|
116388
116445
|
function convertToProgramBuildInfoCompilerOptions(options) {
|
|
116389
116446
|
let result;
|
|
116390
116447
|
const { optionsNameMap } = getOptionsNameMap();
|
|
@@ -116892,12 +116949,28 @@ function getBuildInfoFileVersionMap(program, buildInfoPath, host) {
|
|
|
116892
116949
|
const buildInfoDirectory = getDirectoryPath(getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));
|
|
116893
116950
|
const getCanonicalFileName = createGetCanonicalFileName(host.useCaseSensitiveFileNames());
|
|
116894
116951
|
const fileInfos = /* @__PURE__ */ new Map();
|
|
116952
|
+
let rootIndex = 0;
|
|
116953
|
+
const roots = [];
|
|
116895
116954
|
program.fileInfos.forEach((fileInfo, index) => {
|
|
116896
116955
|
const path = toPath(program.fileNames[index], buildInfoDirectory, getCanonicalFileName);
|
|
116897
116956
|
const version2 = isString(fileInfo) ? fileInfo : fileInfo.version;
|
|
116898
116957
|
fileInfos.set(path, version2);
|
|
116958
|
+
if (rootIndex < program.root.length) {
|
|
116959
|
+
const current = program.root[rootIndex];
|
|
116960
|
+
const fileId = index + 1;
|
|
116961
|
+
if (isArray(current)) {
|
|
116962
|
+
if (current[0] <= fileId && fileId <= current[1]) {
|
|
116963
|
+
roots.push(path);
|
|
116964
|
+
if (current[1] === fileId)
|
|
116965
|
+
rootIndex++;
|
|
116966
|
+
}
|
|
116967
|
+
} else if (current === fileId) {
|
|
116968
|
+
roots.push(path);
|
|
116969
|
+
rootIndex++;
|
|
116970
|
+
}
|
|
116971
|
+
}
|
|
116899
116972
|
});
|
|
116900
|
-
return fileInfos;
|
|
116973
|
+
return { fileInfos, roots };
|
|
116901
116974
|
}
|
|
116902
116975
|
function createRedirectedBuilderProgram(getState, configFileParsingDiagnostics) {
|
|
116903
116976
|
return {
|
|
@@ -120009,7 +120082,7 @@ function getNextInvalidatedProjectCreateInfo(state, buildOrder, reportQueue) {
|
|
|
120009
120082
|
}
|
|
120010
120083
|
continue;
|
|
120011
120084
|
}
|
|
120012
|
-
if (status.type === 2 /* UpToDateWithUpstreamTypes */ || status.type ===
|
|
120085
|
+
if (status.type === 2 /* UpToDateWithUpstreamTypes */ || status.type === 15 /* UpToDateWithInputFileText */) {
|
|
120013
120086
|
reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config));
|
|
120014
120087
|
return {
|
|
120015
120088
|
kind: 2 /* UpdateOutputFileStamps */,
|
|
@@ -120021,7 +120094,7 @@ function getNextInvalidatedProjectCreateInfo(state, buildOrder, reportQueue) {
|
|
|
120021
120094
|
};
|
|
120022
120095
|
}
|
|
120023
120096
|
}
|
|
120024
|
-
if (status.type ===
|
|
120097
|
+
if (status.type === 12 /* UpstreamBlocked */) {
|
|
120025
120098
|
verboseReportProjectStatus(state, project, status);
|
|
120026
120099
|
reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config));
|
|
120027
120100
|
projectPendingBuild.delete(projectPath);
|
|
@@ -120035,7 +120108,7 @@ function getNextInvalidatedProjectCreateInfo(state, buildOrder, reportQueue) {
|
|
|
120035
120108
|
}
|
|
120036
120109
|
continue;
|
|
120037
120110
|
}
|
|
120038
|
-
if (status.type ===
|
|
120111
|
+
if (status.type === 16 /* ContainerOnly */) {
|
|
120039
120112
|
verboseReportProjectStatus(state, project, status);
|
|
120040
120113
|
reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config));
|
|
120041
120114
|
projectPendingBuild.delete(projectPath);
|
|
@@ -120222,31 +120295,31 @@ function getUpToDateStatusWorker(state, project, resolvedPath) {
|
|
|
120222
120295
|
var _a2, _b;
|
|
120223
120296
|
if (!project.fileNames.length && !canJsonReportNoInputFiles(project.raw)) {
|
|
120224
120297
|
return {
|
|
120225
|
-
type:
|
|
120298
|
+
type: 16 /* ContainerOnly */
|
|
120226
120299
|
};
|
|
120227
120300
|
}
|
|
120228
120301
|
let referenceStatuses;
|
|
120229
120302
|
const force = !!state.options.force;
|
|
120230
120303
|
if (project.projectReferences) {
|
|
120231
|
-
state.projectStatus.set(resolvedPath, { type:
|
|
120304
|
+
state.projectStatus.set(resolvedPath, { type: 13 /* ComputingUpstream */ });
|
|
120232
120305
|
for (const ref of project.projectReferences) {
|
|
120233
120306
|
const resolvedRef = resolveProjectReferencePath(ref);
|
|
120234
120307
|
const resolvedRefPath = toResolvedConfigFilePath(state, resolvedRef);
|
|
120235
120308
|
const resolvedConfig = parseConfigFile(state, resolvedRef, resolvedRefPath);
|
|
120236
120309
|
const refStatus = getUpToDateStatus(state, resolvedConfig, resolvedRefPath);
|
|
120237
|
-
if (refStatus.type ===
|
|
120310
|
+
if (refStatus.type === 13 /* ComputingUpstream */ || refStatus.type === 16 /* ContainerOnly */) {
|
|
120238
120311
|
continue;
|
|
120239
120312
|
}
|
|
120240
|
-
if (refStatus.type === 0 /* Unbuildable */ || refStatus.type ===
|
|
120313
|
+
if (refStatus.type === 0 /* Unbuildable */ || refStatus.type === 12 /* UpstreamBlocked */) {
|
|
120241
120314
|
return {
|
|
120242
|
-
type:
|
|
120315
|
+
type: 12 /* UpstreamBlocked */,
|
|
120243
120316
|
upstreamProjectName: ref.path,
|
|
120244
|
-
upstreamProjectBlocked: refStatus.type ===
|
|
120317
|
+
upstreamProjectBlocked: refStatus.type === 12 /* UpstreamBlocked */
|
|
120245
120318
|
};
|
|
120246
120319
|
}
|
|
120247
120320
|
if (refStatus.type !== 1 /* UpToDate */) {
|
|
120248
120321
|
return {
|
|
120249
|
-
type:
|
|
120322
|
+
type: 11 /* UpstreamOutOfDate */,
|
|
120250
120323
|
upstreamProjectName: ref.path
|
|
120251
120324
|
};
|
|
120252
120325
|
}
|
|
@@ -120255,7 +120328,7 @@ function getUpToDateStatusWorker(state, project, resolvedPath) {
|
|
|
120255
120328
|
}
|
|
120256
120329
|
}
|
|
120257
120330
|
if (force)
|
|
120258
|
-
return { type:
|
|
120331
|
+
return { type: 17 /* ForceBuild */ };
|
|
120259
120332
|
const { host } = state;
|
|
120260
120333
|
const buildInfoPath = getTsBuildInfoEmitOutputFilePath(project.options);
|
|
120261
120334
|
let oldestOutputFileName;
|
|
@@ -120288,7 +120361,7 @@ function getUpToDateStatusWorker(state, project, resolvedPath) {
|
|
|
120288
120361
|
}
|
|
120289
120362
|
if ((buildInfo.bundle || buildInfo.program) && buildInfo.version !== version) {
|
|
120290
120363
|
return {
|
|
120291
|
-
type:
|
|
120364
|
+
type: 14 /* TsVersionOutputOfDate */,
|
|
120292
120365
|
version: buildInfo.version
|
|
120293
120366
|
};
|
|
120294
120367
|
}
|
|
@@ -120313,6 +120386,7 @@ function getUpToDateStatusWorker(state, project, resolvedPath) {
|
|
|
120313
120386
|
let newestInputFileName = void 0;
|
|
120314
120387
|
let newestInputFileTime = minimumDate;
|
|
120315
120388
|
let pseudoInputUpToDate = false;
|
|
120389
|
+
const seenRoots = /* @__PURE__ */ new Set();
|
|
120316
120390
|
for (const inputFile of project.fileNames) {
|
|
120317
120391
|
const inputTime = getModifiedTime2(state, inputFile);
|
|
120318
120392
|
if (inputTime === missingFileModifiedTime) {
|
|
@@ -120327,7 +120401,7 @@ function getUpToDateStatusWorker(state, project, resolvedPath) {
|
|
|
120327
120401
|
if (buildInfoProgram) {
|
|
120328
120402
|
if (!buildInfoVersionMap)
|
|
120329
120403
|
buildInfoVersionMap = getBuildInfoFileVersionMap(buildInfoProgram, buildInfoPath, host);
|
|
120330
|
-
version2 = buildInfoVersionMap.get(toPath2(state, inputFile));
|
|
120404
|
+
version2 = buildInfoVersionMap.fileInfos.get(toPath2(state, inputFile));
|
|
120331
120405
|
const text = version2 ? state.readFileWithCache(inputFile) : void 0;
|
|
120332
120406
|
currentVersion = text !== void 0 ? getSourceFileVersionAsHashFromText(host, text) : void 0;
|
|
120333
120407
|
if (version2 && version2 === currentVersion)
|
|
@@ -120345,6 +120419,21 @@ function getUpToDateStatusWorker(state, project, resolvedPath) {
|
|
|
120345
120419
|
newestInputFileName = inputFile;
|
|
120346
120420
|
newestInputFileTime = inputTime;
|
|
120347
120421
|
}
|
|
120422
|
+
if (buildInfoProgram)
|
|
120423
|
+
seenRoots.add(toPath2(state, inputFile));
|
|
120424
|
+
}
|
|
120425
|
+
if (buildInfoProgram) {
|
|
120426
|
+
if (!buildInfoVersionMap)
|
|
120427
|
+
buildInfoVersionMap = getBuildInfoFileVersionMap(buildInfoProgram, buildInfoPath, host);
|
|
120428
|
+
for (const existingRoot of buildInfoVersionMap.roots) {
|
|
120429
|
+
if (!seenRoots.has(existingRoot)) {
|
|
120430
|
+
return {
|
|
120431
|
+
type: 10 /* OutOfDateRoots */,
|
|
120432
|
+
buildInfoFile: buildInfoPath,
|
|
120433
|
+
inputFile: existingRoot
|
|
120434
|
+
};
|
|
120435
|
+
}
|
|
120436
|
+
}
|
|
120348
120437
|
}
|
|
120349
120438
|
if (!buildInfoPath) {
|
|
120350
120439
|
const outputs = getAllProjectOutputs(project, !host.useCaseSensitiveFileNames());
|
|
@@ -120426,7 +120515,7 @@ function getUpToDateStatusWorker(state, project, resolvedPath) {
|
|
|
120426
120515
|
};
|
|
120427
120516
|
}
|
|
120428
120517
|
return {
|
|
120429
|
-
type: pseudoUpToDate ? 2 /* UpToDateWithUpstreamTypes */ : pseudoInputUpToDate ?
|
|
120518
|
+
type: pseudoUpToDate ? 2 /* UpToDateWithUpstreamTypes */ : pseudoInputUpToDate ? 15 /* UpToDateWithInputFileText */ : 1 /* UpToDate */,
|
|
120430
120519
|
newestInputFileTime,
|
|
120431
120520
|
newestInputFileName,
|
|
120432
120521
|
oldestOutputFileName
|
|
@@ -120545,7 +120634,7 @@ function queueReferencingProjects(state, project, projectPath, projectIndex, con
|
|
|
120545
120634
|
}
|
|
120546
120635
|
break;
|
|
120547
120636
|
}
|
|
120548
|
-
case
|
|
120637
|
+
case 15 /* UpToDateWithInputFileText */:
|
|
120549
120638
|
case 2 /* UpToDateWithUpstreamTypes */:
|
|
120550
120639
|
case 3 /* OutOfDateWithPrepend */:
|
|
120551
120640
|
if (!(buildResult & 2 /* DeclarationOutputUnchanged */)) {
|
|
@@ -120556,7 +120645,7 @@ function queueReferencingProjects(state, project, projectPath, projectIndex, con
|
|
|
120556
120645
|
});
|
|
120557
120646
|
}
|
|
120558
120647
|
break;
|
|
120559
|
-
case
|
|
120648
|
+
case 12 /* UpstreamBlocked */:
|
|
120560
120649
|
if (toResolvedConfigFilePath(state, resolveProjectName(state, status.upstreamProjectName)) === projectPath) {
|
|
120561
120650
|
clearProjectStatus(state, nextProjectPath);
|
|
120562
120651
|
}
|
|
@@ -121007,6 +121096,14 @@ function reportUpToDateStatus(state, configFileName, status) {
|
|
|
121007
121096
|
relName(state, configFileName),
|
|
121008
121097
|
relName(state, status.buildInfoFile)
|
|
121009
121098
|
);
|
|
121099
|
+
case 10 /* OutOfDateRoots */:
|
|
121100
|
+
return reportStatus(
|
|
121101
|
+
state,
|
|
121102
|
+
Diagnostics.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_but_not_any_more,
|
|
121103
|
+
relName(state, configFileName),
|
|
121104
|
+
relName(state, status.buildInfoFile),
|
|
121105
|
+
relName(state, status.inputFile)
|
|
121106
|
+
);
|
|
121010
121107
|
case 1 /* UpToDate */:
|
|
121011
121108
|
if (status.newestInputFileTime !== void 0) {
|
|
121012
121109
|
return reportStatus(
|
|
@@ -121031,20 +121128,20 @@ function reportUpToDateStatus(state, configFileName, status) {
|
|
|
121031
121128
|
Diagnostics.Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies,
|
|
121032
121129
|
relName(state, configFileName)
|
|
121033
121130
|
);
|
|
121034
|
-
case
|
|
121131
|
+
case 15 /* UpToDateWithInputFileText */:
|
|
121035
121132
|
return reportStatus(
|
|
121036
121133
|
state,
|
|
121037
121134
|
Diagnostics.Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_files,
|
|
121038
121135
|
relName(state, configFileName)
|
|
121039
121136
|
);
|
|
121040
|
-
case
|
|
121137
|
+
case 11 /* UpstreamOutOfDate */:
|
|
121041
121138
|
return reportStatus(
|
|
121042
121139
|
state,
|
|
121043
121140
|
Diagnostics.Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date,
|
|
121044
121141
|
relName(state, configFileName),
|
|
121045
121142
|
relName(state, status.upstreamProjectName)
|
|
121046
121143
|
);
|
|
121047
|
-
case
|
|
121144
|
+
case 12 /* UpstreamBlocked */:
|
|
121048
121145
|
return reportStatus(
|
|
121049
121146
|
state,
|
|
121050
121147
|
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 +121155,7 @@ function reportUpToDateStatus(state, configFileName, status) {
|
|
|
121058
121155
|
relName(state, configFileName),
|
|
121059
121156
|
status.reason
|
|
121060
121157
|
);
|
|
121061
|
-
case
|
|
121158
|
+
case 14 /* TsVersionOutputOfDate */:
|
|
121062
121159
|
return reportStatus(
|
|
121063
121160
|
state,
|
|
121064
121161
|
Diagnostics.Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2,
|
|
@@ -121066,14 +121163,14 @@ function reportUpToDateStatus(state, configFileName, status) {
|
|
|
121066
121163
|
status.version,
|
|
121067
121164
|
version
|
|
121068
121165
|
);
|
|
121069
|
-
case
|
|
121166
|
+
case 17 /* ForceBuild */:
|
|
121070
121167
|
return reportStatus(
|
|
121071
121168
|
state,
|
|
121072
121169
|
Diagnostics.Project_0_is_being_forcibly_rebuilt,
|
|
121073
121170
|
relName(state, configFileName)
|
|
121074
121171
|
);
|
|
121075
|
-
case
|
|
121076
|
-
case
|
|
121172
|
+
case 16 /* ContainerOnly */:
|
|
121173
|
+
case 13 /* ComputingUpstream */:
|
|
121077
121174
|
break;
|
|
121078
121175
|
default:
|
|
121079
121176
|
assertType(status);
|