@typescript-deploys/pr-build 5.0.0-pr-52382-14 → 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 +135 -46
- package/lib/tsserver.js +132 -55
- package/lib/tsserverlibrary.js +131 -55
- package/lib/typescript.js +130 -55
- package/lib/typingsInstaller.js +8 -5658
- 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;
|
|
@@ -28525,7 +28556,7 @@ var Parser;
|
|
|
28525
28556
|
return Tristate.False;
|
|
28526
28557
|
}
|
|
28527
28558
|
if (languageVariant === 1 /* JSX */) {
|
|
28528
|
-
|
|
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
|
|
28567
|
+
return Tristate.False;
|
|
28537
28568
|
default:
|
|
28538
|
-
return
|
|
28569
|
+
return Tristate.Unknown;
|
|
28539
28570
|
}
|
|
28540
28571
|
} else if (third === 27 /* CommaToken */ || third === 63 /* EqualsToken */) {
|
|
28541
|
-
return
|
|
28572
|
+
return Tristate.True;
|
|
28542
28573
|
}
|
|
28543
|
-
return
|
|
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
|
-
|
|
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 (
|
|
41800
|
-
const conditions =
|
|
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) };
|
|
@@ -64726,7 +64753,7 @@ function createTypeChecker(host) {
|
|
|
64726
64753
|
return getNonMissingTypeOfSymbol(symbol);
|
|
64727
64754
|
}
|
|
64728
64755
|
function getControlFlowContainer(node) {
|
|
64729
|
-
return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 265 /* ModuleBlock */ || node2.kind === 308 /* SourceFile */ || node2.kind ===
|
|
64756
|
+
return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 265 /* ModuleBlock */ || node2.kind === 308 /* SourceFile */ || node2.kind === 169 /* PropertyDeclaration */);
|
|
64730
64757
|
}
|
|
64731
64758
|
function isSymbolAssigned(symbol) {
|
|
64732
64759
|
if (!symbol.valueDeclaration) {
|
|
@@ -64987,14 +65014,13 @@ function createTypeChecker(host) {
|
|
|
64987
65014
|
const isParameter2 = getRootDeclaration(declaration).kind === 166 /* Parameter */;
|
|
64988
65015
|
const declarationContainer = getControlFlowContainer(declaration);
|
|
64989
65016
|
let flowContainer = getControlFlowContainer(node);
|
|
64990
|
-
const isCatch = flowContainer.kind === 295 /* CatchClause */;
|
|
64991
65017
|
const isOuterVariable = flowContainer !== declarationContainer;
|
|
64992
65018
|
const isSpreadDestructuringAssignmentTarget = node.parent && node.parent.parent && isSpreadAssignment(node.parent) && isDestructuringAssignmentTarget(node.parent.parent);
|
|
64993
65019
|
const isModuleExports = symbol.flags & 134217728 /* ModuleExports */;
|
|
64994
65020
|
while (flowContainer !== declarationContainer && (flowContainer.kind === 215 /* FunctionExpression */ || flowContainer.kind === 216 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstVariable(localOrExportSymbol) && type !== autoArrayType || isParameter2 && !isSymbolAssigned(localOrExportSymbol))) {
|
|
64995
65021
|
flowContainer = getControlFlowContainer(flowContainer);
|
|
64996
65022
|
}
|
|
64997
|
-
const assumeInitialized = isParameter2 ||
|
|
65023
|
+
const assumeInitialized = isParameter2 || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) || type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */)) !== 0 || isInTypeQuery(node) || isInAmbientOrTypeNode(node) || node.parent.kind === 278 /* ExportSpecifier */) || node.parent.kind === 232 /* NonNullExpression */ || declaration.kind === 257 /* VariableDeclaration */ && declaration.exclamationToken || declaration.flags & 16777216 /* Ambient */;
|
|
64998
65024
|
const initialType = assumeInitialized ? isParameter2 ? removeOptionalityFromDeclaredType(type, declaration) : type : type === autoType || type === autoArrayType ? undefinedType : getOptionalType(type);
|
|
64999
65025
|
const flowType = getFlowTypeOfReference(node, type, initialType, flowContainer);
|
|
65000
65026
|
if (!isEvolvingArrayOperationTarget(node) && (type === autoType || type === autoArrayType)) {
|
|
@@ -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,10 +106299,10 @@ function emitUsingBuildInfoWorker(config, host, getCommandLine, customTransforme
|
|
|
106273
106299
|
);
|
|
106274
106300
|
return outputFiles;
|
|
106275
106301
|
}
|
|
106276
|
-
var createPrinterWithDefaults = memoize(() => createPrinter({}));
|
|
106277
|
-
var createPrinterWithRemoveComments = memoize(() => createPrinter({ removeComments: true }));
|
|
106278
|
-
var createPrinterWithRemoveCommentsNeverAsciiEscape = memoize(() => createPrinter({ removeComments: true, neverAsciiEscape: true }));
|
|
106279
|
-
var createPrinterWithRemoveCommentsOmitTrailingSemicolon = memoize(() => createPrinter({ removeComments: true, omitTrailingSemicolon: true }));
|
|
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 }));
|
|
106280
106306
|
function createPrinter(printerOptions = {}, handlers = {}) {
|
|
106281
106307
|
const {
|
|
106282
106308
|
hasGlobalName,
|
|
@@ -116220,14 +116246,17 @@ function getBuildInfo2(state, bundle) {
|
|
|
116220
116246
|
const latestChangedDtsFile = state.latestChangedDtsFile ? relativeToBuildInfoEnsuringAbsolutePath(state.latestChangedDtsFile) : void 0;
|
|
116221
116247
|
const fileNames = [];
|
|
116222
116248
|
const fileNameToFileId = /* @__PURE__ */ new Map();
|
|
116249
|
+
const root = [];
|
|
116223
116250
|
if (outFile(state.compilerOptions)) {
|
|
116224
116251
|
const fileInfos2 = arrayFrom(state.fileInfos.entries(), ([key, value]) => {
|
|
116225
|
-
toFileId(key);
|
|
116252
|
+
const fileId = toFileId(key);
|
|
116253
|
+
tryAddRoot(key, fileId);
|
|
116226
116254
|
return value.impliedFormat ? { version: value.version, impliedFormat: value.impliedFormat, signature: void 0, affectsGlobalScope: void 0 } : value.version;
|
|
116227
116255
|
});
|
|
116228
116256
|
const program2 = {
|
|
116229
116257
|
fileNames,
|
|
116230
116258
|
fileInfos: fileInfos2,
|
|
116259
|
+
root,
|
|
116231
116260
|
options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions),
|
|
116232
116261
|
outSignature: state.outSignature,
|
|
116233
116262
|
latestChangedDtsFile,
|
|
@@ -116255,6 +116284,7 @@ function getBuildInfo2(state, bundle) {
|
|
|
116255
116284
|
const fileInfos = arrayFrom(state.fileInfos.entries(), ([key, value]) => {
|
|
116256
116285
|
var _a3, _b2;
|
|
116257
116286
|
const fileId = toFileId(key);
|
|
116287
|
+
tryAddRoot(key, fileId);
|
|
116258
116288
|
Debug.assert(fileNames[fileId - 1] === relativeToBuildInfo(key));
|
|
116259
116289
|
const oldSignature = (_a3 = state.oldSignatures) == null ? void 0 : _a3.get(key);
|
|
116260
116290
|
const actualSignature = oldSignature !== void 0 ? oldSignature || void 0 : value.signature;
|
|
@@ -116354,6 +116384,7 @@ function getBuildInfo2(state, bundle) {
|
|
|
116354
116384
|
const program = {
|
|
116355
116385
|
fileNames,
|
|
116356
116386
|
fileInfos,
|
|
116387
|
+
root,
|
|
116357
116388
|
options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions),
|
|
116358
116389
|
fileIdsList,
|
|
116359
116390
|
referencedMap,
|
|
@@ -116389,6 +116420,24 @@ function getBuildInfo2(state, bundle) {
|
|
|
116389
116420
|
}
|
|
116390
116421
|
return fileIdListId;
|
|
116391
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
|
+
}
|
|
116392
116441
|
function convertToProgramBuildInfoCompilerOptions(options) {
|
|
116393
116442
|
let result;
|
|
116394
116443
|
const { optionsNameMap } = getOptionsNameMap();
|
|
@@ -116896,12 +116945,28 @@ function getBuildInfoFileVersionMap(program, buildInfoPath, host) {
|
|
|
116896
116945
|
const buildInfoDirectory = getDirectoryPath(getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));
|
|
116897
116946
|
const getCanonicalFileName = createGetCanonicalFileName(host.useCaseSensitiveFileNames());
|
|
116898
116947
|
const fileInfos = /* @__PURE__ */ new Map();
|
|
116948
|
+
let rootIndex = 0;
|
|
116949
|
+
const roots = [];
|
|
116899
116950
|
program.fileInfos.forEach((fileInfo, index) => {
|
|
116900
116951
|
const path = toPath(program.fileNames[index], buildInfoDirectory, getCanonicalFileName);
|
|
116901
116952
|
const version2 = isString(fileInfo) ? fileInfo : fileInfo.version;
|
|
116902
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
|
+
}
|
|
116903
116968
|
});
|
|
116904
|
-
return fileInfos;
|
|
116969
|
+
return { fileInfos, roots };
|
|
116905
116970
|
}
|
|
116906
116971
|
function createRedirectedBuilderProgram(getState, configFileParsingDiagnostics) {
|
|
116907
116972
|
return {
|
|
@@ -120013,7 +120078,7 @@ function getNextInvalidatedProjectCreateInfo(state, buildOrder, reportQueue) {
|
|
|
120013
120078
|
}
|
|
120014
120079
|
continue;
|
|
120015
120080
|
}
|
|
120016
|
-
if (status.type === 2 /* UpToDateWithUpstreamTypes */ || status.type ===
|
|
120081
|
+
if (status.type === 2 /* UpToDateWithUpstreamTypes */ || status.type === 15 /* UpToDateWithInputFileText */) {
|
|
120017
120082
|
reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config));
|
|
120018
120083
|
return {
|
|
120019
120084
|
kind: 2 /* UpdateOutputFileStamps */,
|
|
@@ -120025,7 +120090,7 @@ function getNextInvalidatedProjectCreateInfo(state, buildOrder, reportQueue) {
|
|
|
120025
120090
|
};
|
|
120026
120091
|
}
|
|
120027
120092
|
}
|
|
120028
|
-
if (status.type ===
|
|
120093
|
+
if (status.type === 12 /* UpstreamBlocked */) {
|
|
120029
120094
|
verboseReportProjectStatus(state, project, status);
|
|
120030
120095
|
reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config));
|
|
120031
120096
|
projectPendingBuild.delete(projectPath);
|
|
@@ -120039,7 +120104,7 @@ function getNextInvalidatedProjectCreateInfo(state, buildOrder, reportQueue) {
|
|
|
120039
120104
|
}
|
|
120040
120105
|
continue;
|
|
120041
120106
|
}
|
|
120042
|
-
if (status.type ===
|
|
120107
|
+
if (status.type === 16 /* ContainerOnly */) {
|
|
120043
120108
|
verboseReportProjectStatus(state, project, status);
|
|
120044
120109
|
reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config));
|
|
120045
120110
|
projectPendingBuild.delete(projectPath);
|
|
@@ -120226,31 +120291,31 @@ function getUpToDateStatusWorker(state, project, resolvedPath) {
|
|
|
120226
120291
|
var _a2, _b;
|
|
120227
120292
|
if (!project.fileNames.length && !canJsonReportNoInputFiles(project.raw)) {
|
|
120228
120293
|
return {
|
|
120229
|
-
type:
|
|
120294
|
+
type: 16 /* ContainerOnly */
|
|
120230
120295
|
};
|
|
120231
120296
|
}
|
|
120232
120297
|
let referenceStatuses;
|
|
120233
120298
|
const force = !!state.options.force;
|
|
120234
120299
|
if (project.projectReferences) {
|
|
120235
|
-
state.projectStatus.set(resolvedPath, { type:
|
|
120300
|
+
state.projectStatus.set(resolvedPath, { type: 13 /* ComputingUpstream */ });
|
|
120236
120301
|
for (const ref of project.projectReferences) {
|
|
120237
120302
|
const resolvedRef = resolveProjectReferencePath(ref);
|
|
120238
120303
|
const resolvedRefPath = toResolvedConfigFilePath(state, resolvedRef);
|
|
120239
120304
|
const resolvedConfig = parseConfigFile(state, resolvedRef, resolvedRefPath);
|
|
120240
120305
|
const refStatus = getUpToDateStatus(state, resolvedConfig, resolvedRefPath);
|
|
120241
|
-
if (refStatus.type ===
|
|
120306
|
+
if (refStatus.type === 13 /* ComputingUpstream */ || refStatus.type === 16 /* ContainerOnly */) {
|
|
120242
120307
|
continue;
|
|
120243
120308
|
}
|
|
120244
|
-
if (refStatus.type === 0 /* Unbuildable */ || refStatus.type ===
|
|
120309
|
+
if (refStatus.type === 0 /* Unbuildable */ || refStatus.type === 12 /* UpstreamBlocked */) {
|
|
120245
120310
|
return {
|
|
120246
|
-
type:
|
|
120311
|
+
type: 12 /* UpstreamBlocked */,
|
|
120247
120312
|
upstreamProjectName: ref.path,
|
|
120248
|
-
upstreamProjectBlocked: refStatus.type ===
|
|
120313
|
+
upstreamProjectBlocked: refStatus.type === 12 /* UpstreamBlocked */
|
|
120249
120314
|
};
|
|
120250
120315
|
}
|
|
120251
120316
|
if (refStatus.type !== 1 /* UpToDate */) {
|
|
120252
120317
|
return {
|
|
120253
|
-
type:
|
|
120318
|
+
type: 11 /* UpstreamOutOfDate */,
|
|
120254
120319
|
upstreamProjectName: ref.path
|
|
120255
120320
|
};
|
|
120256
120321
|
}
|
|
@@ -120259,7 +120324,7 @@ function getUpToDateStatusWorker(state, project, resolvedPath) {
|
|
|
120259
120324
|
}
|
|
120260
120325
|
}
|
|
120261
120326
|
if (force)
|
|
120262
|
-
return { type:
|
|
120327
|
+
return { type: 17 /* ForceBuild */ };
|
|
120263
120328
|
const { host } = state;
|
|
120264
120329
|
const buildInfoPath = getTsBuildInfoEmitOutputFilePath(project.options);
|
|
120265
120330
|
let oldestOutputFileName;
|
|
@@ -120292,7 +120357,7 @@ function getUpToDateStatusWorker(state, project, resolvedPath) {
|
|
|
120292
120357
|
}
|
|
120293
120358
|
if ((buildInfo.bundle || buildInfo.program) && buildInfo.version !== version) {
|
|
120294
120359
|
return {
|
|
120295
|
-
type:
|
|
120360
|
+
type: 14 /* TsVersionOutputOfDate */,
|
|
120296
120361
|
version: buildInfo.version
|
|
120297
120362
|
};
|
|
120298
120363
|
}
|
|
@@ -120317,6 +120382,7 @@ function getUpToDateStatusWorker(state, project, resolvedPath) {
|
|
|
120317
120382
|
let newestInputFileName = void 0;
|
|
120318
120383
|
let newestInputFileTime = minimumDate;
|
|
120319
120384
|
let pseudoInputUpToDate = false;
|
|
120385
|
+
const seenRoots = /* @__PURE__ */ new Set();
|
|
120320
120386
|
for (const inputFile of project.fileNames) {
|
|
120321
120387
|
const inputTime = getModifiedTime2(state, inputFile);
|
|
120322
120388
|
if (inputTime === missingFileModifiedTime) {
|
|
@@ -120331,7 +120397,7 @@ function getUpToDateStatusWorker(state, project, resolvedPath) {
|
|
|
120331
120397
|
if (buildInfoProgram) {
|
|
120332
120398
|
if (!buildInfoVersionMap)
|
|
120333
120399
|
buildInfoVersionMap = getBuildInfoFileVersionMap(buildInfoProgram, buildInfoPath, host);
|
|
120334
|
-
version2 = buildInfoVersionMap.get(toPath2(state, inputFile));
|
|
120400
|
+
version2 = buildInfoVersionMap.fileInfos.get(toPath2(state, inputFile));
|
|
120335
120401
|
const text = version2 ? state.readFileWithCache(inputFile) : void 0;
|
|
120336
120402
|
currentVersion = text !== void 0 ? getSourceFileVersionAsHashFromText(host, text) : void 0;
|
|
120337
120403
|
if (version2 && version2 === currentVersion)
|
|
@@ -120349,6 +120415,21 @@ function getUpToDateStatusWorker(state, project, resolvedPath) {
|
|
|
120349
120415
|
newestInputFileName = inputFile;
|
|
120350
120416
|
newestInputFileTime = inputTime;
|
|
120351
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
|
+
}
|
|
120352
120433
|
}
|
|
120353
120434
|
if (!buildInfoPath) {
|
|
120354
120435
|
const outputs = getAllProjectOutputs(project, !host.useCaseSensitiveFileNames());
|
|
@@ -120430,7 +120511,7 @@ function getUpToDateStatusWorker(state, project, resolvedPath) {
|
|
|
120430
120511
|
};
|
|
120431
120512
|
}
|
|
120432
120513
|
return {
|
|
120433
|
-
type: pseudoUpToDate ? 2 /* UpToDateWithUpstreamTypes */ : pseudoInputUpToDate ?
|
|
120514
|
+
type: pseudoUpToDate ? 2 /* UpToDateWithUpstreamTypes */ : pseudoInputUpToDate ? 15 /* UpToDateWithInputFileText */ : 1 /* UpToDate */,
|
|
120434
120515
|
newestInputFileTime,
|
|
120435
120516
|
newestInputFileName,
|
|
120436
120517
|
oldestOutputFileName
|
|
@@ -120549,7 +120630,7 @@ function queueReferencingProjects(state, project, projectPath, projectIndex, con
|
|
|
120549
120630
|
}
|
|
120550
120631
|
break;
|
|
120551
120632
|
}
|
|
120552
|
-
case
|
|
120633
|
+
case 15 /* UpToDateWithInputFileText */:
|
|
120553
120634
|
case 2 /* UpToDateWithUpstreamTypes */:
|
|
120554
120635
|
case 3 /* OutOfDateWithPrepend */:
|
|
120555
120636
|
if (!(buildResult & 2 /* DeclarationOutputUnchanged */)) {
|
|
@@ -120560,7 +120641,7 @@ function queueReferencingProjects(state, project, projectPath, projectIndex, con
|
|
|
120560
120641
|
});
|
|
120561
120642
|
}
|
|
120562
120643
|
break;
|
|
120563
|
-
case
|
|
120644
|
+
case 12 /* UpstreamBlocked */:
|
|
120564
120645
|
if (toResolvedConfigFilePath(state, resolveProjectName(state, status.upstreamProjectName)) === projectPath) {
|
|
120565
120646
|
clearProjectStatus(state, nextProjectPath);
|
|
120566
120647
|
}
|
|
@@ -121011,6 +121092,14 @@ function reportUpToDateStatus(state, configFileName, status) {
|
|
|
121011
121092
|
relName(state, configFileName),
|
|
121012
121093
|
relName(state, status.buildInfoFile)
|
|
121013
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
|
+
);
|
|
121014
121103
|
case 1 /* UpToDate */:
|
|
121015
121104
|
if (status.newestInputFileTime !== void 0) {
|
|
121016
121105
|
return reportStatus(
|
|
@@ -121035,20 +121124,20 @@ function reportUpToDateStatus(state, configFileName, status) {
|
|
|
121035
121124
|
Diagnostics.Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies,
|
|
121036
121125
|
relName(state, configFileName)
|
|
121037
121126
|
);
|
|
121038
|
-
case
|
|
121127
|
+
case 15 /* UpToDateWithInputFileText */:
|
|
121039
121128
|
return reportStatus(
|
|
121040
121129
|
state,
|
|
121041
121130
|
Diagnostics.Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_files,
|
|
121042
121131
|
relName(state, configFileName)
|
|
121043
121132
|
);
|
|
121044
|
-
case
|
|
121133
|
+
case 11 /* UpstreamOutOfDate */:
|
|
121045
121134
|
return reportStatus(
|
|
121046
121135
|
state,
|
|
121047
121136
|
Diagnostics.Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date,
|
|
121048
121137
|
relName(state, configFileName),
|
|
121049
121138
|
relName(state, status.upstreamProjectName)
|
|
121050
121139
|
);
|
|
121051
|
-
case
|
|
121140
|
+
case 12 /* UpstreamBlocked */:
|
|
121052
121141
|
return reportStatus(
|
|
121053
121142
|
state,
|
|
121054
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,
|
|
@@ -121062,7 +121151,7 @@ function reportUpToDateStatus(state, configFileName, status) {
|
|
|
121062
121151
|
relName(state, configFileName),
|
|
121063
121152
|
status.reason
|
|
121064
121153
|
);
|
|
121065
|
-
case
|
|
121154
|
+
case 14 /* TsVersionOutputOfDate */:
|
|
121066
121155
|
return reportStatus(
|
|
121067
121156
|
state,
|
|
121068
121157
|
Diagnostics.Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2,
|
|
@@ -121070,14 +121159,14 @@ function reportUpToDateStatus(state, configFileName, status) {
|
|
|
121070
121159
|
status.version,
|
|
121071
121160
|
version
|
|
121072
121161
|
);
|
|
121073
|
-
case
|
|
121162
|
+
case 17 /* ForceBuild */:
|
|
121074
121163
|
return reportStatus(
|
|
121075
121164
|
state,
|
|
121076
121165
|
Diagnostics.Project_0_is_being_forcibly_rebuilt,
|
|
121077
121166
|
relName(state, configFileName)
|
|
121078
121167
|
);
|
|
121079
|
-
case
|
|
121080
|
-
case
|
|
121168
|
+
case 16 /* ContainerOnly */:
|
|
121169
|
+
case 13 /* ComputingUpstream */:
|
|
121081
121170
|
break;
|
|
121082
121171
|
default:
|
|
121083
121172
|
assertType(status);
|