@vortex-ai/cli 0.1.41 → 0.1.45
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/.turbo/turbo-build.log +3 -3
- package/README.md +9 -2
- package/dist/index.js +1073 -947
- package/dist/index.mjs +1065 -939
- package/package.json +1 -1
- package/src/commands/config.ts +73 -0
- package/src/index.ts +26 -1
package/dist/index.mjs
CHANGED
|
@@ -2260,7 +2260,7 @@ var require_typescript = __commonJS({
|
|
|
2260
2260
|
usingSingleLineStringWriter: () => usingSingleLineStringWriter,
|
|
2261
2261
|
utf16EncodeAsString: () => utf16EncodeAsString,
|
|
2262
2262
|
validateLocaleAndSetLanguage: () => validateLocaleAndSetLanguage,
|
|
2263
|
-
version: () =>
|
|
2263
|
+
version: () => version2,
|
|
2264
2264
|
versionMajorMinor: () => versionMajorMinor,
|
|
2265
2265
|
visitArray: () => visitArray,
|
|
2266
2266
|
visitCommaListElements: () => visitCommaListElements,
|
|
@@ -2284,7 +2284,7 @@ var require_typescript = __commonJS({
|
|
|
2284
2284
|
});
|
|
2285
2285
|
module2.exports = __toCommonJS(typescript_exports);
|
|
2286
2286
|
var versionMajorMinor = "5.9";
|
|
2287
|
-
var
|
|
2287
|
+
var version2 = "5.9.2";
|
|
2288
2288
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2289
2289
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2290
2290
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -3668,10 +3668,10 @@ var require_typescript = __commonJS({
|
|
|
3668
3668
|
function and(f, g) {
|
|
3669
3669
|
return (arg) => f(arg) && g(arg);
|
|
3670
3670
|
}
|
|
3671
|
-
function or(...
|
|
3671
|
+
function or(...fs5) {
|
|
3672
3672
|
return (...args) => {
|
|
3673
3673
|
let lastResult;
|
|
3674
|
-
for (const f of
|
|
3674
|
+
for (const f of fs5) {
|
|
3675
3675
|
lastResult = f(...args);
|
|
3676
3676
|
if (lastResult) {
|
|
3677
3677
|
return lastResult;
|
|
@@ -4920,9 +4920,9 @@ ${lanes.join("\n")}
|
|
|
4920
4920
|
* Tests whether a version matches the range. This is equivalent to `satisfies(version, range, { includePrerelease: true })`.
|
|
4921
4921
|
* in `node-semver`.
|
|
4922
4922
|
*/
|
|
4923
|
-
test(
|
|
4924
|
-
if (typeof
|
|
4925
|
-
return testDisjunction(
|
|
4923
|
+
test(version22) {
|
|
4924
|
+
if (typeof version22 === "string") version22 = new Version(version22);
|
|
4925
|
+
return testDisjunction(version22, this._alternatives);
|
|
4926
4926
|
}
|
|
4927
4927
|
toString() {
|
|
4928
4928
|
return formatDisjunction(this._alternatives);
|
|
@@ -4956,14 +4956,14 @@ ${lanes.join("\n")}
|
|
|
4956
4956
|
const match = partialRegExp.exec(text);
|
|
4957
4957
|
if (!match) return void 0;
|
|
4958
4958
|
const [, major, minor = "*", patch = "*", prerelease, build2] = match;
|
|
4959
|
-
const
|
|
4959
|
+
const version22 = new Version(
|
|
4960
4960
|
isWildcard(major) ? 0 : parseInt(major, 10),
|
|
4961
4961
|
isWildcard(major) || isWildcard(minor) ? 0 : parseInt(minor, 10),
|
|
4962
4962
|
isWildcard(major) || isWildcard(minor) || isWildcard(patch) ? 0 : parseInt(patch, 10),
|
|
4963
4963
|
prerelease,
|
|
4964
4964
|
build2
|
|
4965
4965
|
);
|
|
4966
|
-
return { version:
|
|
4966
|
+
return { version: version22, major, minor, patch };
|
|
4967
4967
|
}
|
|
4968
4968
|
function parseHyphen(left, right, comparators) {
|
|
4969
4969
|
const leftResult = parsePartial(left);
|
|
@@ -4983,46 +4983,46 @@ ${lanes.join("\n")}
|
|
|
4983
4983
|
function parseComparator(operator, text, comparators) {
|
|
4984
4984
|
const result = parsePartial(text);
|
|
4985
4985
|
if (!result) return false;
|
|
4986
|
-
const { version:
|
|
4986
|
+
const { version: version22, major, minor, patch } = result;
|
|
4987
4987
|
if (!isWildcard(major)) {
|
|
4988
4988
|
switch (operator) {
|
|
4989
4989
|
case "~":
|
|
4990
|
-
comparators.push(createComparator(">=",
|
|
4990
|
+
comparators.push(createComparator(">=", version22));
|
|
4991
4991
|
comparators.push(createComparator(
|
|
4992
4992
|
"<",
|
|
4993
|
-
|
|
4993
|
+
version22.increment(
|
|
4994
4994
|
isWildcard(minor) ? "major" : "minor"
|
|
4995
4995
|
)
|
|
4996
4996
|
));
|
|
4997
4997
|
break;
|
|
4998
4998
|
case "^":
|
|
4999
|
-
comparators.push(createComparator(">=",
|
|
4999
|
+
comparators.push(createComparator(">=", version22));
|
|
5000
5000
|
comparators.push(createComparator(
|
|
5001
5001
|
"<",
|
|
5002
|
-
|
|
5003
|
-
|
|
5002
|
+
version22.increment(
|
|
5003
|
+
version22.major > 0 || isWildcard(minor) ? "major" : version22.minor > 0 || isWildcard(patch) ? "minor" : "patch"
|
|
5004
5004
|
)
|
|
5005
5005
|
));
|
|
5006
5006
|
break;
|
|
5007
5007
|
case "<":
|
|
5008
5008
|
case ">=":
|
|
5009
5009
|
comparators.push(
|
|
5010
|
-
isWildcard(minor) || isWildcard(patch) ? createComparator(operator,
|
|
5010
|
+
isWildcard(minor) || isWildcard(patch) ? createComparator(operator, version22.with({ prerelease: "0" })) : createComparator(operator, version22)
|
|
5011
5011
|
);
|
|
5012
5012
|
break;
|
|
5013
5013
|
case "<=":
|
|
5014
5014
|
case ">":
|
|
5015
5015
|
comparators.push(
|
|
5016
|
-
isWildcard(minor) ? createComparator(operator === "<=" ? "<" : ">=",
|
|
5016
|
+
isWildcard(minor) ? createComparator(operator === "<=" ? "<" : ">=", version22.increment("major").with({ prerelease: "0" })) : isWildcard(patch) ? createComparator(operator === "<=" ? "<" : ">=", version22.increment("minor").with({ prerelease: "0" })) : createComparator(operator, version22)
|
|
5017
5017
|
);
|
|
5018
5018
|
break;
|
|
5019
5019
|
case "=":
|
|
5020
5020
|
case void 0:
|
|
5021
5021
|
if (isWildcard(minor) || isWildcard(patch)) {
|
|
5022
|
-
comparators.push(createComparator(">=",
|
|
5023
|
-
comparators.push(createComparator("<",
|
|
5022
|
+
comparators.push(createComparator(">=", version22.with({ prerelease: "0" })));
|
|
5023
|
+
comparators.push(createComparator("<", version22.increment(isWildcard(minor) ? "major" : "minor").with({ prerelease: "0" })));
|
|
5024
5024
|
} else {
|
|
5025
|
-
comparators.push(createComparator("=",
|
|
5025
|
+
comparators.push(createComparator("=", version22));
|
|
5026
5026
|
}
|
|
5027
5027
|
break;
|
|
5028
5028
|
default:
|
|
@@ -5039,21 +5039,21 @@ ${lanes.join("\n")}
|
|
|
5039
5039
|
function createComparator(operator, operand) {
|
|
5040
5040
|
return { operator, operand };
|
|
5041
5041
|
}
|
|
5042
|
-
function testDisjunction(
|
|
5042
|
+
function testDisjunction(version22, alternatives) {
|
|
5043
5043
|
if (alternatives.length === 0) return true;
|
|
5044
5044
|
for (const alternative of alternatives) {
|
|
5045
|
-
if (testAlternative(
|
|
5045
|
+
if (testAlternative(version22, alternative)) return true;
|
|
5046
5046
|
}
|
|
5047
5047
|
return false;
|
|
5048
5048
|
}
|
|
5049
|
-
function testAlternative(
|
|
5049
|
+
function testAlternative(version22, comparators) {
|
|
5050
5050
|
for (const comparator of comparators) {
|
|
5051
|
-
if (!testComparator(
|
|
5051
|
+
if (!testComparator(version22, comparator.operator, comparator.operand)) return false;
|
|
5052
5052
|
}
|
|
5053
5053
|
return true;
|
|
5054
5054
|
}
|
|
5055
|
-
function testComparator(
|
|
5056
|
-
const cmp =
|
|
5055
|
+
function testComparator(version22, operator, operand) {
|
|
5056
|
+
const cmp = version22.compareTo(operand);
|
|
5057
5057
|
switch (operator) {
|
|
5058
5058
|
case "<":
|
|
5059
5059
|
return cmp < 0;
|
|
@@ -5246,7 +5246,7 @@ ${lanes.join("\n")}
|
|
|
5246
5246
|
var tracing;
|
|
5247
5247
|
var tracingEnabled;
|
|
5248
5248
|
((tracingEnabled2) => {
|
|
5249
|
-
let
|
|
5249
|
+
let fs5;
|
|
5250
5250
|
let traceCount = 0;
|
|
5251
5251
|
let traceFd = 0;
|
|
5252
5252
|
let mode;
|
|
@@ -5255,9 +5255,9 @@ ${lanes.join("\n")}
|
|
|
5255
5255
|
const legend = [];
|
|
5256
5256
|
function startTracing2(tracingMode, traceDir, configFilePath) {
|
|
5257
5257
|
Debug.assert(!tracing, "Tracing already started");
|
|
5258
|
-
if (
|
|
5258
|
+
if (fs5 === void 0) {
|
|
5259
5259
|
try {
|
|
5260
|
-
|
|
5260
|
+
fs5 = __require("fs");
|
|
5261
5261
|
} catch (e) {
|
|
5262
5262
|
throw new Error(`tracing requires having fs
|
|
5263
5263
|
(original error: ${e.message || e})`);
|
|
@@ -5268,8 +5268,8 @@ ${lanes.join("\n")}
|
|
|
5268
5268
|
if (legendPath === void 0) {
|
|
5269
5269
|
legendPath = combinePaths(traceDir, "legend.json");
|
|
5270
5270
|
}
|
|
5271
|
-
if (!
|
|
5272
|
-
|
|
5271
|
+
if (!fs5.existsSync(traceDir)) {
|
|
5272
|
+
fs5.mkdirSync(traceDir, { recursive: true });
|
|
5273
5273
|
}
|
|
5274
5274
|
const countPart = mode === "build" ? `.${process.pid}-${++traceCount}` : mode === "server" ? `.${process.pid}` : ``;
|
|
5275
5275
|
const tracePath = combinePaths(traceDir, `trace${countPart}.json`);
|
|
@@ -5279,10 +5279,10 @@ ${lanes.join("\n")}
|
|
|
5279
5279
|
tracePath,
|
|
5280
5280
|
typesPath
|
|
5281
5281
|
});
|
|
5282
|
-
traceFd =
|
|
5282
|
+
traceFd = fs5.openSync(tracePath, "w");
|
|
5283
5283
|
tracing = tracingEnabled2;
|
|
5284
5284
|
const meta = { cat: "__metadata", ph: "M", ts: 1e3 * timestamp(), pid: 1, tid: 1 };
|
|
5285
|
-
|
|
5285
|
+
fs5.writeSync(
|
|
5286
5286
|
traceFd,
|
|
5287
5287
|
"[\n" + [{ name: "process_name", args: { name: "tsc" }, ...meta }, { name: "thread_name", args: { name: "Main" }, ...meta }, { name: "TracingStartedInBrowser", ...meta, cat: "disabled-by-default-devtools.timeline" }].map((v) => JSON.stringify(v)).join(",\n")
|
|
5288
5288
|
);
|
|
@@ -5291,10 +5291,10 @@ ${lanes.join("\n")}
|
|
|
5291
5291
|
function stopTracing() {
|
|
5292
5292
|
Debug.assert(tracing, "Tracing is not in progress");
|
|
5293
5293
|
Debug.assert(!!typeCatalog.length === (mode !== "server"));
|
|
5294
|
-
|
|
5294
|
+
fs5.writeSync(traceFd, `
|
|
5295
5295
|
]
|
|
5296
5296
|
`);
|
|
5297
|
-
|
|
5297
|
+
fs5.closeSync(traceFd);
|
|
5298
5298
|
tracing = void 0;
|
|
5299
5299
|
if (typeCatalog.length) {
|
|
5300
5300
|
dumpTypes(typeCatalog);
|
|
@@ -5366,11 +5366,11 @@ ${lanes.join("\n")}
|
|
|
5366
5366
|
function writeEvent(eventType, phase, name, args, extras, time = 1e3 * timestamp()) {
|
|
5367
5367
|
if (mode === "server" && phase === "checkTypes") return;
|
|
5368
5368
|
mark("beginTracing");
|
|
5369
|
-
|
|
5369
|
+
fs5.writeSync(traceFd, `,
|
|
5370
5370
|
{"pid":1,"tid":1,"ph":"${eventType}","cat":"${phase}","ts":${time},"name":"${name}"`);
|
|
5371
|
-
if (extras)
|
|
5372
|
-
if (args)
|
|
5373
|
-
|
|
5371
|
+
if (extras) fs5.writeSync(traceFd, `,${extras}`);
|
|
5372
|
+
if (args) fs5.writeSync(traceFd, `,"args":${JSON.stringify(args)}`);
|
|
5373
|
+
fs5.writeSync(traceFd, `}`);
|
|
5374
5374
|
mark("endTracing");
|
|
5375
5375
|
measure("Tracing", "beginTracing", "endTracing");
|
|
5376
5376
|
}
|
|
@@ -5392,9 +5392,9 @@ ${lanes.join("\n")}
|
|
|
5392
5392
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
|
|
5393
5393
|
mark("beginDumpTypes");
|
|
5394
5394
|
const typesPath = legend[legend.length - 1].typesPath;
|
|
5395
|
-
const typesFd =
|
|
5395
|
+
const typesFd = fs5.openSync(typesPath, "w");
|
|
5396
5396
|
const recursionIdentityMap = /* @__PURE__ */ new Map();
|
|
5397
|
-
|
|
5397
|
+
fs5.writeSync(typesFd, "[");
|
|
5398
5398
|
const numTypes = types.length;
|
|
5399
5399
|
for (let i = 0; i < numTypes; i++) {
|
|
5400
5400
|
const type = types[i];
|
|
@@ -5490,13 +5490,13 @@ ${lanes.join("\n")}
|
|
|
5490
5490
|
flags: Debug.formatTypeFlags(type.flags).split("|"),
|
|
5491
5491
|
display
|
|
5492
5492
|
};
|
|
5493
|
-
|
|
5493
|
+
fs5.writeSync(typesFd, JSON.stringify(descriptor));
|
|
5494
5494
|
if (i < numTypes - 1) {
|
|
5495
|
-
|
|
5495
|
+
fs5.writeSync(typesFd, ",\n");
|
|
5496
5496
|
}
|
|
5497
5497
|
}
|
|
5498
|
-
|
|
5499
|
-
|
|
5498
|
+
fs5.writeSync(typesFd, "]\n");
|
|
5499
|
+
fs5.closeSync(typesFd);
|
|
5500
5500
|
mark("endDumpTypes");
|
|
5501
5501
|
measure("Dump types", "beginDumpTypes", "endDumpTypes");
|
|
5502
5502
|
}
|
|
@@ -5504,7 +5504,7 @@ ${lanes.join("\n")}
|
|
|
5504
5504
|
if (!legendPath) {
|
|
5505
5505
|
return;
|
|
5506
5506
|
}
|
|
5507
|
-
|
|
5507
|
+
fs5.writeFileSync(legendPath, JSON.stringify(legend));
|
|
5508
5508
|
}
|
|
5509
5509
|
tracingEnabled2.dumpLegend = dumpLegend;
|
|
5510
5510
|
})(tracingEnabled || (tracingEnabled = {}));
|
|
@@ -7886,17 +7886,17 @@ ${lanes.join("\n")}
|
|
|
7886
7886
|
}
|
|
7887
7887
|
function createSingleWatcherPerName(cache, useCaseSensitiveFileNames2, name, callback, createWatcher) {
|
|
7888
7888
|
const toCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2);
|
|
7889
|
-
const
|
|
7890
|
-
const existing = cache.get(
|
|
7889
|
+
const path5 = toCanonicalFileName(name);
|
|
7890
|
+
const existing = cache.get(path5);
|
|
7891
7891
|
if (existing) {
|
|
7892
7892
|
existing.callbacks.push(callback);
|
|
7893
7893
|
} else {
|
|
7894
|
-
cache.set(
|
|
7894
|
+
cache.set(path5, {
|
|
7895
7895
|
watcher: createWatcher(
|
|
7896
7896
|
// Cant infer types correctly so lets satisfy checker
|
|
7897
7897
|
(param1, param2, param3) => {
|
|
7898
7898
|
var _a;
|
|
7899
|
-
return (_a = cache.get(
|
|
7899
|
+
return (_a = cache.get(path5)) == null ? void 0 : _a.callbacks.slice().forEach((cb) => cb(param1, param2, param3));
|
|
7900
7900
|
}
|
|
7901
7901
|
),
|
|
7902
7902
|
callbacks: [callback]
|
|
@@ -7904,10 +7904,10 @@ ${lanes.join("\n")}
|
|
|
7904
7904
|
}
|
|
7905
7905
|
return {
|
|
7906
7906
|
close: () => {
|
|
7907
|
-
const watcher = cache.get(
|
|
7907
|
+
const watcher = cache.get(path5);
|
|
7908
7908
|
if (!watcher) return;
|
|
7909
7909
|
if (!orderedRemoveItem(watcher.callbacks, callback) || watcher.callbacks.length) return;
|
|
7910
|
-
cache.delete(
|
|
7910
|
+
cache.delete(path5);
|
|
7911
7911
|
closeFileWatcherOf(watcher);
|
|
7912
7912
|
}
|
|
7913
7913
|
};
|
|
@@ -8159,13 +8159,13 @@ ${lanes.join("\n")}
|
|
|
8159
8159
|
(newChildWatches || (newChildWatches = [])).push(childWatcher);
|
|
8160
8160
|
}
|
|
8161
8161
|
}
|
|
8162
|
-
function isIgnoredPath(
|
|
8163
|
-
return some(ignoredPaths, (searchPath) => isInPath(
|
|
8162
|
+
function isIgnoredPath(path5, options) {
|
|
8163
|
+
return some(ignoredPaths, (searchPath) => isInPath(path5, searchPath)) || isIgnoredByWatchOptions(path5, options, useCaseSensitiveFileNames2, getCurrentDirectory);
|
|
8164
8164
|
}
|
|
8165
|
-
function isInPath(
|
|
8166
|
-
if (
|
|
8165
|
+
function isInPath(path5, searchPath) {
|
|
8166
|
+
if (path5.includes(searchPath)) return true;
|
|
8167
8167
|
if (useCaseSensitiveFileNames2) return false;
|
|
8168
|
-
return toCanonicalFilePath(
|
|
8168
|
+
return toCanonicalFilePath(path5).includes(searchPath);
|
|
8169
8169
|
}
|
|
8170
8170
|
}
|
|
8171
8171
|
var FileSystemEntryKind = /* @__PURE__ */ ((FileSystemEntryKind2) => {
|
|
@@ -8543,8 +8543,8 @@ ${lanes.join("\n")}
|
|
|
8543
8543
|
}
|
|
8544
8544
|
function patchWriteFileEnsuringDirectory(sys2) {
|
|
8545
8545
|
const originalWriteFile = sys2.writeFile;
|
|
8546
|
-
sys2.writeFile = (
|
|
8547
|
-
|
|
8546
|
+
sys2.writeFile = (path5, data, writeBom) => writeFileEnsuringDirectories(
|
|
8547
|
+
path5,
|
|
8548
8548
|
data,
|
|
8549
8549
|
!!writeBom,
|
|
8550
8550
|
(path22, data2, writeByteOrderMark) => originalWriteFile.call(sys2, path22, data2, writeByteOrderMark),
|
|
@@ -8588,7 +8588,7 @@ ${lanes.join("\n")}
|
|
|
8588
8588
|
// Node 4.0 `fs.watch` function supports the "recursive" option on both OSX and Windows
|
|
8589
8589
|
// (ref: https://github.com/nodejs/node/pull/2649 and https://github.com/Microsoft/TypeScript/issues/4643)
|
|
8590
8590
|
fsSupportsRecursiveFsWatch,
|
|
8591
|
-
getAccessibleSortedChildDirectories: (
|
|
8591
|
+
getAccessibleSortedChildDirectories: (path5) => getAccessibleFileSystemEntries(path5).directories,
|
|
8592
8592
|
realpath,
|
|
8593
8593
|
tscWatchFile: process.env.TSC_WATCHFILE,
|
|
8594
8594
|
useNonPollingWatchers: !!process.env.TSC_NONPOLLING_WATCHER,
|
|
@@ -8615,7 +8615,7 @@ ${lanes.join("\n")}
|
|
|
8615
8615
|
watchFile: watchFile2,
|
|
8616
8616
|
watchDirectory,
|
|
8617
8617
|
preferNonRecursiveWatch: !fsSupportsRecursiveFsWatch,
|
|
8618
|
-
resolvePath: (
|
|
8618
|
+
resolvePath: (path5) => _path.resolve(path5),
|
|
8619
8619
|
fileExists,
|
|
8620
8620
|
directoryExists,
|
|
8621
8621
|
getAccessibleFileSystemEntries,
|
|
@@ -8650,8 +8650,8 @@ ${lanes.join("\n")}
|
|
|
8650
8650
|
}
|
|
8651
8651
|
return process.memoryUsage().heapUsed;
|
|
8652
8652
|
},
|
|
8653
|
-
getFileSize(
|
|
8654
|
-
const stat = statSync(
|
|
8653
|
+
getFileSize(path5) {
|
|
8654
|
+
const stat = statSync(path5);
|
|
8655
8655
|
if (stat == null ? void 0 : stat.isFile()) {
|
|
8656
8656
|
return stat.size;
|
|
8657
8657
|
}
|
|
@@ -8695,14 +8695,14 @@ ${lanes.join("\n")}
|
|
|
8695
8695
|
}
|
|
8696
8696
|
};
|
|
8697
8697
|
return nodeSystem;
|
|
8698
|
-
function statSync(
|
|
8698
|
+
function statSync(path5) {
|
|
8699
8699
|
try {
|
|
8700
|
-
return _fs.statSync(
|
|
8700
|
+
return _fs.statSync(path5, statSyncOptions);
|
|
8701
8701
|
} catch {
|
|
8702
8702
|
return void 0;
|
|
8703
8703
|
}
|
|
8704
8704
|
}
|
|
8705
|
-
function enableCPUProfiler(
|
|
8705
|
+
function enableCPUProfiler(path5, cb) {
|
|
8706
8706
|
if (activeSession) {
|
|
8707
8707
|
cb();
|
|
8708
8708
|
return false;
|
|
@@ -8717,7 +8717,7 @@ ${lanes.join("\n")}
|
|
|
8717
8717
|
session.post("Profiler.enable", () => {
|
|
8718
8718
|
session.post("Profiler.start", () => {
|
|
8719
8719
|
activeSession = session;
|
|
8720
|
-
profilePath =
|
|
8720
|
+
profilePath = path5;
|
|
8721
8721
|
cb();
|
|
8722
8722
|
});
|
|
8723
8723
|
});
|
|
@@ -8861,9 +8861,9 @@ ${lanes.join("\n")}
|
|
|
8861
8861
|
}
|
|
8862
8862
|
}
|
|
8863
8863
|
}
|
|
8864
|
-
function getAccessibleFileSystemEntries(
|
|
8864
|
+
function getAccessibleFileSystemEntries(path5) {
|
|
8865
8865
|
try {
|
|
8866
|
-
const entries = _fs.readdirSync(
|
|
8866
|
+
const entries = _fs.readdirSync(path5 || ".", { withFileTypes: true });
|
|
8867
8867
|
const files = [];
|
|
8868
8868
|
const directories = [];
|
|
8869
8869
|
for (const dirent of entries) {
|
|
@@ -8873,7 +8873,7 @@ ${lanes.join("\n")}
|
|
|
8873
8873
|
}
|
|
8874
8874
|
let stat;
|
|
8875
8875
|
if (typeof dirent === "string" || dirent.isSymbolicLink()) {
|
|
8876
|
-
const name = combinePaths(
|
|
8876
|
+
const name = combinePaths(path5, entry);
|
|
8877
8877
|
stat = statSync(name);
|
|
8878
8878
|
if (!stat) {
|
|
8879
8879
|
continue;
|
|
@@ -8894,11 +8894,11 @@ ${lanes.join("\n")}
|
|
|
8894
8894
|
return emptyFileSystemEntries;
|
|
8895
8895
|
}
|
|
8896
8896
|
}
|
|
8897
|
-
function readDirectory(
|
|
8898
|
-
return matchFiles(
|
|
8897
|
+
function readDirectory(path5, extensions, excludes, includes, depth) {
|
|
8898
|
+
return matchFiles(path5, extensions, excludes, includes, useCaseSensitiveFileNames2, process.cwd(), depth, getAccessibleFileSystemEntries, realpath);
|
|
8899
8899
|
}
|
|
8900
|
-
function fileSystemEntryExists(
|
|
8901
|
-
const stat = statSync(
|
|
8900
|
+
function fileSystemEntryExists(path5, entryKind) {
|
|
8901
|
+
const stat = statSync(path5);
|
|
8902
8902
|
if (!stat) {
|
|
8903
8903
|
return false;
|
|
8904
8904
|
}
|
|
@@ -8911,47 +8911,47 @@ ${lanes.join("\n")}
|
|
|
8911
8911
|
return false;
|
|
8912
8912
|
}
|
|
8913
8913
|
}
|
|
8914
|
-
function fileExists(
|
|
8914
|
+
function fileExists(path5) {
|
|
8915
8915
|
return fileSystemEntryExists(
|
|
8916
|
-
|
|
8916
|
+
path5,
|
|
8917
8917
|
0
|
|
8918
8918
|
/* File */
|
|
8919
8919
|
);
|
|
8920
8920
|
}
|
|
8921
|
-
function directoryExists(
|
|
8921
|
+
function directoryExists(path5) {
|
|
8922
8922
|
return fileSystemEntryExists(
|
|
8923
|
-
|
|
8923
|
+
path5,
|
|
8924
8924
|
1
|
|
8925
8925
|
/* Directory */
|
|
8926
8926
|
);
|
|
8927
8927
|
}
|
|
8928
|
-
function getDirectories(
|
|
8929
|
-
return getAccessibleFileSystemEntries(
|
|
8928
|
+
function getDirectories(path5) {
|
|
8929
|
+
return getAccessibleFileSystemEntries(path5).directories.slice();
|
|
8930
8930
|
}
|
|
8931
|
-
function fsRealPathHandlingLongPath(
|
|
8932
|
-
return
|
|
8931
|
+
function fsRealPathHandlingLongPath(path5) {
|
|
8932
|
+
return path5.length < 260 ? _fs.realpathSync.native(path5) : _fs.realpathSync(path5);
|
|
8933
8933
|
}
|
|
8934
|
-
function realpath(
|
|
8934
|
+
function realpath(path5) {
|
|
8935
8935
|
try {
|
|
8936
|
-
return fsRealpath(
|
|
8936
|
+
return fsRealpath(path5);
|
|
8937
8937
|
} catch {
|
|
8938
|
-
return
|
|
8938
|
+
return path5;
|
|
8939
8939
|
}
|
|
8940
8940
|
}
|
|
8941
|
-
function getModifiedTime3(
|
|
8941
|
+
function getModifiedTime3(path5) {
|
|
8942
8942
|
var _a;
|
|
8943
|
-
return (_a = statSync(
|
|
8943
|
+
return (_a = statSync(path5)) == null ? void 0 : _a.mtime;
|
|
8944
8944
|
}
|
|
8945
|
-
function setModifiedTime(
|
|
8945
|
+
function setModifiedTime(path5, time) {
|
|
8946
8946
|
try {
|
|
8947
|
-
_fs.utimesSync(
|
|
8947
|
+
_fs.utimesSync(path5, time, time);
|
|
8948
8948
|
} catch {
|
|
8949
8949
|
return;
|
|
8950
8950
|
}
|
|
8951
8951
|
}
|
|
8952
|
-
function deleteFile(
|
|
8952
|
+
function deleteFile(path5) {
|
|
8953
8953
|
try {
|
|
8954
|
-
return _fs.unlinkSync(
|
|
8954
|
+
return _fs.unlinkSync(path5);
|
|
8955
8955
|
} catch {
|
|
8956
8956
|
return;
|
|
8957
8957
|
}
|
|
@@ -8991,41 +8991,41 @@ ${lanes.join("\n")}
|
|
|
8991
8991
|
function isAnyDirectorySeparator(charCode) {
|
|
8992
8992
|
return charCode === 47 || charCode === 92;
|
|
8993
8993
|
}
|
|
8994
|
-
function isUrl(
|
|
8995
|
-
return getEncodedRootLength(
|
|
8994
|
+
function isUrl(path5) {
|
|
8995
|
+
return getEncodedRootLength(path5) < 0;
|
|
8996
8996
|
}
|
|
8997
|
-
function isRootedDiskPath(
|
|
8998
|
-
return getEncodedRootLength(
|
|
8997
|
+
function isRootedDiskPath(path5) {
|
|
8998
|
+
return getEncodedRootLength(path5) > 0;
|
|
8999
8999
|
}
|
|
9000
|
-
function isDiskPathRoot(
|
|
9001
|
-
const rootLength = getEncodedRootLength(
|
|
9002
|
-
return rootLength > 0 && rootLength ===
|
|
9000
|
+
function isDiskPathRoot(path5) {
|
|
9001
|
+
const rootLength = getEncodedRootLength(path5);
|
|
9002
|
+
return rootLength > 0 && rootLength === path5.length;
|
|
9003
9003
|
}
|
|
9004
|
-
function pathIsAbsolute(
|
|
9005
|
-
return getEncodedRootLength(
|
|
9004
|
+
function pathIsAbsolute(path5) {
|
|
9005
|
+
return getEncodedRootLength(path5) !== 0;
|
|
9006
9006
|
}
|
|
9007
|
-
function pathIsRelative(
|
|
9008
|
-
return /^\.\.?(?:$|[\\/])/.test(
|
|
9007
|
+
function pathIsRelative(path5) {
|
|
9008
|
+
return /^\.\.?(?:$|[\\/])/.test(path5);
|
|
9009
9009
|
}
|
|
9010
|
-
function pathIsBareSpecifier(
|
|
9011
|
-
return !pathIsAbsolute(
|
|
9010
|
+
function pathIsBareSpecifier(path5) {
|
|
9011
|
+
return !pathIsAbsolute(path5) && !pathIsRelative(path5);
|
|
9012
9012
|
}
|
|
9013
9013
|
function hasExtension(fileName) {
|
|
9014
9014
|
return getBaseFileName(fileName).includes(".");
|
|
9015
9015
|
}
|
|
9016
|
-
function fileExtensionIs(
|
|
9017
|
-
return
|
|
9016
|
+
function fileExtensionIs(path5, extension) {
|
|
9017
|
+
return path5.length > extension.length && endsWith(path5, extension);
|
|
9018
9018
|
}
|
|
9019
|
-
function fileExtensionIsOneOf(
|
|
9019
|
+
function fileExtensionIsOneOf(path5, extensions) {
|
|
9020
9020
|
for (const extension of extensions) {
|
|
9021
|
-
if (fileExtensionIs(
|
|
9021
|
+
if (fileExtensionIs(path5, extension)) {
|
|
9022
9022
|
return true;
|
|
9023
9023
|
}
|
|
9024
9024
|
}
|
|
9025
9025
|
return false;
|
|
9026
9026
|
}
|
|
9027
|
-
function hasTrailingDirectorySeparator(
|
|
9028
|
-
return
|
|
9027
|
+
function hasTrailingDirectorySeparator(path5) {
|
|
9028
|
+
return path5.length > 0 && isAnyDirectorySeparator(path5.charCodeAt(path5.length - 1));
|
|
9029
9029
|
}
|
|
9030
9030
|
function isVolumeCharacter(charCode) {
|
|
9031
9031
|
return charCode >= 97 && charCode <= 122 || charCode >= 65 && charCode <= 90;
|
|
@@ -9039,111 +9039,111 @@ ${lanes.join("\n")}
|
|
|
9039
9039
|
}
|
|
9040
9040
|
return -1;
|
|
9041
9041
|
}
|
|
9042
|
-
function getEncodedRootLength(
|
|
9043
|
-
if (!
|
|
9044
|
-
const ch0 =
|
|
9042
|
+
function getEncodedRootLength(path5) {
|
|
9043
|
+
if (!path5) return 0;
|
|
9044
|
+
const ch0 = path5.charCodeAt(0);
|
|
9045
9045
|
if (ch0 === 47 || ch0 === 92) {
|
|
9046
|
-
if (
|
|
9047
|
-
const p1 =
|
|
9048
|
-
if (p1 < 0) return
|
|
9046
|
+
if (path5.charCodeAt(1) !== ch0) return 1;
|
|
9047
|
+
const p1 = path5.indexOf(ch0 === 47 ? directorySeparator : altDirectorySeparator, 2);
|
|
9048
|
+
if (p1 < 0) return path5.length;
|
|
9049
9049
|
return p1 + 1;
|
|
9050
9050
|
}
|
|
9051
|
-
if (isVolumeCharacter(ch0) &&
|
|
9052
|
-
const ch2 =
|
|
9051
|
+
if (isVolumeCharacter(ch0) && path5.charCodeAt(1) === 58) {
|
|
9052
|
+
const ch2 = path5.charCodeAt(2);
|
|
9053
9053
|
if (ch2 === 47 || ch2 === 92) return 3;
|
|
9054
|
-
if (
|
|
9054
|
+
if (path5.length === 2) return 2;
|
|
9055
9055
|
}
|
|
9056
|
-
const schemeEnd =
|
|
9056
|
+
const schemeEnd = path5.indexOf(urlSchemeSeparator);
|
|
9057
9057
|
if (schemeEnd !== -1) {
|
|
9058
9058
|
const authorityStart = schemeEnd + urlSchemeSeparator.length;
|
|
9059
|
-
const authorityEnd =
|
|
9059
|
+
const authorityEnd = path5.indexOf(directorySeparator, authorityStart);
|
|
9060
9060
|
if (authorityEnd !== -1) {
|
|
9061
|
-
const scheme =
|
|
9062
|
-
const authority =
|
|
9063
|
-
if (scheme === "file" && (authority === "" || authority === "localhost") && isVolumeCharacter(
|
|
9064
|
-
const volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(
|
|
9061
|
+
const scheme = path5.slice(0, schemeEnd);
|
|
9062
|
+
const authority = path5.slice(authorityStart, authorityEnd);
|
|
9063
|
+
if (scheme === "file" && (authority === "" || authority === "localhost") && isVolumeCharacter(path5.charCodeAt(authorityEnd + 1))) {
|
|
9064
|
+
const volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path5, authorityEnd + 2);
|
|
9065
9065
|
if (volumeSeparatorEnd !== -1) {
|
|
9066
|
-
if (
|
|
9066
|
+
if (path5.charCodeAt(volumeSeparatorEnd) === 47) {
|
|
9067
9067
|
return ~(volumeSeparatorEnd + 1);
|
|
9068
9068
|
}
|
|
9069
|
-
if (volumeSeparatorEnd ===
|
|
9069
|
+
if (volumeSeparatorEnd === path5.length) {
|
|
9070
9070
|
return ~volumeSeparatorEnd;
|
|
9071
9071
|
}
|
|
9072
9072
|
}
|
|
9073
9073
|
}
|
|
9074
9074
|
return ~(authorityEnd + 1);
|
|
9075
9075
|
}
|
|
9076
|
-
return ~
|
|
9076
|
+
return ~path5.length;
|
|
9077
9077
|
}
|
|
9078
9078
|
return 0;
|
|
9079
9079
|
}
|
|
9080
|
-
function getRootLength(
|
|
9081
|
-
const rootLength = getEncodedRootLength(
|
|
9080
|
+
function getRootLength(path5) {
|
|
9081
|
+
const rootLength = getEncodedRootLength(path5);
|
|
9082
9082
|
return rootLength < 0 ? ~rootLength : rootLength;
|
|
9083
9083
|
}
|
|
9084
|
-
function getDirectoryPath(
|
|
9085
|
-
|
|
9086
|
-
const rootLength = getRootLength(
|
|
9087
|
-
if (rootLength ===
|
|
9088
|
-
|
|
9089
|
-
return
|
|
9090
|
-
}
|
|
9091
|
-
function getBaseFileName(
|
|
9092
|
-
|
|
9093
|
-
const rootLength = getRootLength(
|
|
9094
|
-
if (rootLength ===
|
|
9095
|
-
|
|
9096
|
-
const name =
|
|
9084
|
+
function getDirectoryPath(path5) {
|
|
9085
|
+
path5 = normalizeSlashes(path5);
|
|
9086
|
+
const rootLength = getRootLength(path5);
|
|
9087
|
+
if (rootLength === path5.length) return path5;
|
|
9088
|
+
path5 = removeTrailingDirectorySeparator(path5);
|
|
9089
|
+
return path5.slice(0, Math.max(rootLength, path5.lastIndexOf(directorySeparator)));
|
|
9090
|
+
}
|
|
9091
|
+
function getBaseFileName(path5, extensions, ignoreCase) {
|
|
9092
|
+
path5 = normalizeSlashes(path5);
|
|
9093
|
+
const rootLength = getRootLength(path5);
|
|
9094
|
+
if (rootLength === path5.length) return "";
|
|
9095
|
+
path5 = removeTrailingDirectorySeparator(path5);
|
|
9096
|
+
const name = path5.slice(Math.max(getRootLength(path5), path5.lastIndexOf(directorySeparator) + 1));
|
|
9097
9097
|
const extension = extensions !== void 0 && ignoreCase !== void 0 ? getAnyExtensionFromPath(name, extensions, ignoreCase) : void 0;
|
|
9098
9098
|
return extension ? name.slice(0, name.length - extension.length) : name;
|
|
9099
9099
|
}
|
|
9100
|
-
function tryGetExtensionFromPath(
|
|
9100
|
+
function tryGetExtensionFromPath(path5, extension, stringEqualityComparer) {
|
|
9101
9101
|
if (!startsWith(extension, ".")) extension = "." + extension;
|
|
9102
|
-
if (
|
|
9103
|
-
const pathExtension =
|
|
9102
|
+
if (path5.length >= extension.length && path5.charCodeAt(path5.length - extension.length) === 46) {
|
|
9103
|
+
const pathExtension = path5.slice(path5.length - extension.length);
|
|
9104
9104
|
if (stringEqualityComparer(pathExtension, extension)) {
|
|
9105
9105
|
return pathExtension;
|
|
9106
9106
|
}
|
|
9107
9107
|
}
|
|
9108
9108
|
}
|
|
9109
|
-
function getAnyExtensionFromPathWorker(
|
|
9109
|
+
function getAnyExtensionFromPathWorker(path5, extensions, stringEqualityComparer) {
|
|
9110
9110
|
if (typeof extensions === "string") {
|
|
9111
|
-
return tryGetExtensionFromPath(
|
|
9111
|
+
return tryGetExtensionFromPath(path5, extensions, stringEqualityComparer) || "";
|
|
9112
9112
|
}
|
|
9113
9113
|
for (const extension of extensions) {
|
|
9114
|
-
const result = tryGetExtensionFromPath(
|
|
9114
|
+
const result = tryGetExtensionFromPath(path5, extension, stringEqualityComparer);
|
|
9115
9115
|
if (result) return result;
|
|
9116
9116
|
}
|
|
9117
9117
|
return "";
|
|
9118
9118
|
}
|
|
9119
|
-
function getAnyExtensionFromPath(
|
|
9119
|
+
function getAnyExtensionFromPath(path5, extensions, ignoreCase) {
|
|
9120
9120
|
if (extensions) {
|
|
9121
|
-
return getAnyExtensionFromPathWorker(removeTrailingDirectorySeparator(
|
|
9121
|
+
return getAnyExtensionFromPathWorker(removeTrailingDirectorySeparator(path5), extensions, ignoreCase ? equateStringsCaseInsensitive : equateStringsCaseSensitive);
|
|
9122
9122
|
}
|
|
9123
|
-
const baseFileName = getBaseFileName(
|
|
9123
|
+
const baseFileName = getBaseFileName(path5);
|
|
9124
9124
|
const extensionIndex = baseFileName.lastIndexOf(".");
|
|
9125
9125
|
if (extensionIndex >= 0) {
|
|
9126
9126
|
return baseFileName.substring(extensionIndex);
|
|
9127
9127
|
}
|
|
9128
9128
|
return "";
|
|
9129
9129
|
}
|
|
9130
|
-
function pathComponents(
|
|
9131
|
-
const root =
|
|
9132
|
-
const rest =
|
|
9130
|
+
function pathComponents(path5, rootLength) {
|
|
9131
|
+
const root = path5.substring(0, rootLength);
|
|
9132
|
+
const rest = path5.substring(rootLength).split(directorySeparator);
|
|
9133
9133
|
if (rest.length && !lastOrUndefined(rest)) rest.pop();
|
|
9134
9134
|
return [root, ...rest];
|
|
9135
9135
|
}
|
|
9136
|
-
function getPathComponents(
|
|
9137
|
-
|
|
9138
|
-
return pathComponents(
|
|
9136
|
+
function getPathComponents(path5, currentDirectory = "") {
|
|
9137
|
+
path5 = combinePaths(currentDirectory, path5);
|
|
9138
|
+
return pathComponents(path5, getRootLength(path5));
|
|
9139
9139
|
}
|
|
9140
9140
|
function getPathFromPathComponents(pathComponents2, length2) {
|
|
9141
9141
|
if (pathComponents2.length === 0) return "";
|
|
9142
9142
|
const root = pathComponents2[0] && ensureTrailingDirectorySeparator(pathComponents2[0]);
|
|
9143
9143
|
return root + pathComponents2.slice(1, length2).join(directorySeparator);
|
|
9144
9144
|
}
|
|
9145
|
-
function normalizeSlashes(
|
|
9146
|
-
return
|
|
9145
|
+
function normalizeSlashes(path5) {
|
|
9146
|
+
return path5.includes("\\") ? path5.replace(backslashRegExp, directorySeparator) : path5;
|
|
9147
9147
|
}
|
|
9148
9148
|
function reducePathComponents(components) {
|
|
9149
9149
|
if (!some(components)) return [];
|
|
@@ -9164,39 +9164,39 @@ ${lanes.join("\n")}
|
|
|
9164
9164
|
}
|
|
9165
9165
|
return reduced;
|
|
9166
9166
|
}
|
|
9167
|
-
function combinePaths(
|
|
9168
|
-
if (
|
|
9167
|
+
function combinePaths(path5, ...paths) {
|
|
9168
|
+
if (path5) path5 = normalizeSlashes(path5);
|
|
9169
9169
|
for (let relativePath of paths) {
|
|
9170
9170
|
if (!relativePath) continue;
|
|
9171
9171
|
relativePath = normalizeSlashes(relativePath);
|
|
9172
|
-
if (!
|
|
9173
|
-
|
|
9172
|
+
if (!path5 || getRootLength(relativePath) !== 0) {
|
|
9173
|
+
path5 = relativePath;
|
|
9174
9174
|
} else {
|
|
9175
|
-
|
|
9175
|
+
path5 = ensureTrailingDirectorySeparator(path5) + relativePath;
|
|
9176
9176
|
}
|
|
9177
9177
|
}
|
|
9178
|
-
return
|
|
9178
|
+
return path5;
|
|
9179
9179
|
}
|
|
9180
|
-
function resolvePath(
|
|
9181
|
-
return normalizePath(some(paths) ? combinePaths(
|
|
9180
|
+
function resolvePath(path5, ...paths) {
|
|
9181
|
+
return normalizePath(some(paths) ? combinePaths(path5, ...paths) : normalizeSlashes(path5));
|
|
9182
9182
|
}
|
|
9183
|
-
function getNormalizedPathComponents(
|
|
9184
|
-
return reducePathComponents(getPathComponents(
|
|
9183
|
+
function getNormalizedPathComponents(path5, currentDirectory) {
|
|
9184
|
+
return reducePathComponents(getPathComponents(path5, currentDirectory));
|
|
9185
9185
|
}
|
|
9186
|
-
function getNormalizedAbsolutePath(
|
|
9187
|
-
let rootLength = getRootLength(
|
|
9186
|
+
function getNormalizedAbsolutePath(path5, currentDirectory) {
|
|
9187
|
+
let rootLength = getRootLength(path5);
|
|
9188
9188
|
if (rootLength === 0 && currentDirectory) {
|
|
9189
|
-
|
|
9190
|
-
rootLength = getRootLength(
|
|
9189
|
+
path5 = combinePaths(currentDirectory, path5);
|
|
9190
|
+
rootLength = getRootLength(path5);
|
|
9191
9191
|
} else {
|
|
9192
|
-
|
|
9192
|
+
path5 = normalizeSlashes(path5);
|
|
9193
9193
|
}
|
|
9194
|
-
const simpleNormalized = simpleNormalizePath(
|
|
9194
|
+
const simpleNormalized = simpleNormalizePath(path5);
|
|
9195
9195
|
if (simpleNormalized !== void 0) {
|
|
9196
9196
|
return simpleNormalized.length > rootLength ? removeTrailingDirectorySeparator(simpleNormalized) : simpleNormalized;
|
|
9197
9197
|
}
|
|
9198
|
-
const length2 =
|
|
9199
|
-
const root =
|
|
9198
|
+
const length2 = path5.length;
|
|
9199
|
+
const root = path5.substring(0, rootLength);
|
|
9200
9200
|
let normalized;
|
|
9201
9201
|
let index = rootLength;
|
|
9202
9202
|
let segmentStart = index;
|
|
@@ -9204,23 +9204,23 @@ ${lanes.join("\n")}
|
|
|
9204
9204
|
let seenNonDotDotSegment = rootLength !== 0;
|
|
9205
9205
|
while (index < length2) {
|
|
9206
9206
|
segmentStart = index;
|
|
9207
|
-
let ch =
|
|
9207
|
+
let ch = path5.charCodeAt(index);
|
|
9208
9208
|
while (ch === 47 && index + 1 < length2) {
|
|
9209
9209
|
index++;
|
|
9210
|
-
ch =
|
|
9210
|
+
ch = path5.charCodeAt(index);
|
|
9211
9211
|
}
|
|
9212
9212
|
if (index > segmentStart) {
|
|
9213
|
-
normalized ?? (normalized =
|
|
9213
|
+
normalized ?? (normalized = path5.substring(0, segmentStart - 1));
|
|
9214
9214
|
segmentStart = index;
|
|
9215
9215
|
}
|
|
9216
|
-
let segmentEnd =
|
|
9216
|
+
let segmentEnd = path5.indexOf(directorySeparator, index + 1);
|
|
9217
9217
|
if (segmentEnd === -1) {
|
|
9218
9218
|
segmentEnd = length2;
|
|
9219
9219
|
}
|
|
9220
9220
|
const segmentLength = segmentEnd - segmentStart;
|
|
9221
|
-
if (segmentLength === 1 &&
|
|
9222
|
-
normalized ?? (normalized =
|
|
9223
|
-
} else if (segmentLength === 2 &&
|
|
9221
|
+
if (segmentLength === 1 && path5.charCodeAt(index) === 46) {
|
|
9222
|
+
normalized ?? (normalized = path5.substring(0, normalizedUpTo));
|
|
9223
|
+
} else if (segmentLength === 2 && path5.charCodeAt(index) === 46 && path5.charCodeAt(index + 1) === 46) {
|
|
9224
9224
|
if (!seenNonDotDotSegment) {
|
|
9225
9225
|
if (normalized !== void 0) {
|
|
9226
9226
|
normalized += normalized.length === rootLength ? ".." : "/..";
|
|
@@ -9229,9 +9229,9 @@ ${lanes.join("\n")}
|
|
|
9229
9229
|
}
|
|
9230
9230
|
} else if (normalized === void 0) {
|
|
9231
9231
|
if (normalizedUpTo - 2 >= 0) {
|
|
9232
|
-
normalized =
|
|
9232
|
+
normalized = path5.substring(0, Math.max(rootLength, path5.lastIndexOf(directorySeparator, normalizedUpTo - 2)));
|
|
9233
9233
|
} else {
|
|
9234
|
-
normalized =
|
|
9234
|
+
normalized = path5.substring(0, normalizedUpTo);
|
|
9235
9235
|
}
|
|
9236
9236
|
} else {
|
|
9237
9237
|
const lastSlash = normalized.lastIndexOf(directorySeparator);
|
|
@@ -9249,36 +9249,36 @@ ${lanes.join("\n")}
|
|
|
9249
9249
|
normalized += directorySeparator;
|
|
9250
9250
|
}
|
|
9251
9251
|
seenNonDotDotSegment = true;
|
|
9252
|
-
normalized +=
|
|
9252
|
+
normalized += path5.substring(segmentStart, segmentEnd);
|
|
9253
9253
|
} else {
|
|
9254
9254
|
seenNonDotDotSegment = true;
|
|
9255
9255
|
normalizedUpTo = segmentEnd;
|
|
9256
9256
|
}
|
|
9257
9257
|
index = segmentEnd + 1;
|
|
9258
9258
|
}
|
|
9259
|
-
return normalized ?? (length2 > rootLength ? removeTrailingDirectorySeparator(
|
|
9259
|
+
return normalized ?? (length2 > rootLength ? removeTrailingDirectorySeparator(path5) : path5);
|
|
9260
9260
|
}
|
|
9261
|
-
function normalizePath(
|
|
9262
|
-
|
|
9263
|
-
let normalized = simpleNormalizePath(
|
|
9261
|
+
function normalizePath(path5) {
|
|
9262
|
+
path5 = normalizeSlashes(path5);
|
|
9263
|
+
let normalized = simpleNormalizePath(path5);
|
|
9264
9264
|
if (normalized !== void 0) {
|
|
9265
9265
|
return normalized;
|
|
9266
9266
|
}
|
|
9267
|
-
normalized = getNormalizedAbsolutePath(
|
|
9268
|
-
return normalized && hasTrailingDirectorySeparator(
|
|
9267
|
+
normalized = getNormalizedAbsolutePath(path5, "");
|
|
9268
|
+
return normalized && hasTrailingDirectorySeparator(path5) ? ensureTrailingDirectorySeparator(normalized) : normalized;
|
|
9269
9269
|
}
|
|
9270
|
-
function simpleNormalizePath(
|
|
9271
|
-
if (!relativePathSegmentRegExp.test(
|
|
9272
|
-
return
|
|
9270
|
+
function simpleNormalizePath(path5) {
|
|
9271
|
+
if (!relativePathSegmentRegExp.test(path5)) {
|
|
9272
|
+
return path5;
|
|
9273
9273
|
}
|
|
9274
|
-
let simplified =
|
|
9274
|
+
let simplified = path5.replace(/\/\.\//g, "/");
|
|
9275
9275
|
if (simplified.startsWith("./")) {
|
|
9276
9276
|
simplified = simplified.slice(2);
|
|
9277
9277
|
}
|
|
9278
|
-
if (simplified !==
|
|
9279
|
-
|
|
9280
|
-
if (!relativePathSegmentRegExp.test(
|
|
9281
|
-
return
|
|
9278
|
+
if (simplified !== path5) {
|
|
9279
|
+
path5 = simplified;
|
|
9280
|
+
if (!relativePathSegmentRegExp.test(path5)) {
|
|
9281
|
+
return path5;
|
|
9282
9282
|
}
|
|
9283
9283
|
}
|
|
9284
9284
|
return void 0;
|
|
@@ -9294,31 +9294,31 @@ ${lanes.join("\n")}
|
|
|
9294
9294
|
const nonCanonicalizedPath = isRootedDiskPath(fileName) ? normalizePath(fileName) : getNormalizedAbsolutePath(fileName, basePath);
|
|
9295
9295
|
return getCanonicalFileName(nonCanonicalizedPath);
|
|
9296
9296
|
}
|
|
9297
|
-
function removeTrailingDirectorySeparator(
|
|
9298
|
-
if (hasTrailingDirectorySeparator(
|
|
9299
|
-
return
|
|
9297
|
+
function removeTrailingDirectorySeparator(path5) {
|
|
9298
|
+
if (hasTrailingDirectorySeparator(path5)) {
|
|
9299
|
+
return path5.substr(0, path5.length - 1);
|
|
9300
9300
|
}
|
|
9301
|
-
return
|
|
9301
|
+
return path5;
|
|
9302
9302
|
}
|
|
9303
|
-
function ensureTrailingDirectorySeparator(
|
|
9304
|
-
if (!hasTrailingDirectorySeparator(
|
|
9305
|
-
return
|
|
9303
|
+
function ensureTrailingDirectorySeparator(path5) {
|
|
9304
|
+
if (!hasTrailingDirectorySeparator(path5)) {
|
|
9305
|
+
return path5 + directorySeparator;
|
|
9306
9306
|
}
|
|
9307
|
-
return
|
|
9307
|
+
return path5;
|
|
9308
9308
|
}
|
|
9309
|
-
function ensurePathIsNonModuleName(
|
|
9310
|
-
return !pathIsAbsolute(
|
|
9309
|
+
function ensurePathIsNonModuleName(path5) {
|
|
9310
|
+
return !pathIsAbsolute(path5) && !pathIsRelative(path5) ? "./" + path5 : path5;
|
|
9311
9311
|
}
|
|
9312
|
-
function changeAnyExtension(
|
|
9313
|
-
const pathext = extensions !== void 0 && ignoreCase !== void 0 ? getAnyExtensionFromPath(
|
|
9314
|
-
return pathext ?
|
|
9312
|
+
function changeAnyExtension(path5, ext, extensions, ignoreCase) {
|
|
9313
|
+
const pathext = extensions !== void 0 && ignoreCase !== void 0 ? getAnyExtensionFromPath(path5, extensions, ignoreCase) : getAnyExtensionFromPath(path5);
|
|
9314
|
+
return pathext ? path5.slice(0, path5.length - pathext.length) + (startsWith(ext, ".") ? ext : "." + ext) : path5;
|
|
9315
9315
|
}
|
|
9316
|
-
function changeFullExtension(
|
|
9317
|
-
const declarationExtension = getDeclarationFileExtension(
|
|
9316
|
+
function changeFullExtension(path5, newExtension) {
|
|
9317
|
+
const declarationExtension = getDeclarationFileExtension(path5);
|
|
9318
9318
|
if (declarationExtension) {
|
|
9319
|
-
return
|
|
9319
|
+
return path5.slice(0, path5.length - declarationExtension.length) + (startsWith(newExtension, ".") ? newExtension : "." + newExtension);
|
|
9320
9320
|
}
|
|
9321
|
-
return changeAnyExtension(
|
|
9321
|
+
return changeAnyExtension(path5, newExtension);
|
|
9322
9322
|
}
|
|
9323
9323
|
var relativePathSegmentRegExp = /\/\/|(?:^|\/)\.\.?(?:$|\/)/;
|
|
9324
9324
|
function comparePathsWorker(a, b, componentComparer) {
|
|
@@ -20771,8 +20771,8 @@ ${lanes.join("\n")}
|
|
|
20771
20771
|
function getResolvedExternalModuleName(host, file, referenceFile) {
|
|
20772
20772
|
return file.moduleName || getExternalModuleNameFromPath(host, file.fileName, referenceFile && referenceFile.fileName);
|
|
20773
20773
|
}
|
|
20774
|
-
function getCanonicalAbsolutePath(host,
|
|
20775
|
-
return host.getCanonicalFileName(getNormalizedAbsolutePath(
|
|
20774
|
+
function getCanonicalAbsolutePath(host, path5) {
|
|
20775
|
+
return host.getCanonicalFileName(getNormalizedAbsolutePath(path5, host.getCurrentDirectory()));
|
|
20776
20776
|
}
|
|
20777
20777
|
function getExternalModuleNameFromDeclaration(host, resolver, declaration) {
|
|
20778
20778
|
const file = resolver.getExternalModuleFileFromDeclaration(declaration);
|
|
@@ -20815,20 +20815,20 @@ ${lanes.join("\n")}
|
|
|
20815
20815
|
}
|
|
20816
20816
|
function getDeclarationEmitOutputFilePathWorker(fileName, options, host) {
|
|
20817
20817
|
const outputDir = options.declarationDir || options.outDir;
|
|
20818
|
-
const
|
|
20819
|
-
const declarationExtension = getDeclarationEmitExtensionForPath(
|
|
20820
|
-
return removeFileExtension(
|
|
20818
|
+
const path5 = outputDir ? getSourceFilePathInNewDirWorker(fileName, outputDir, host.getCurrentDirectory(), host.getCommonSourceDirectory(), (f) => host.getCanonicalFileName(f)) : fileName;
|
|
20819
|
+
const declarationExtension = getDeclarationEmitExtensionForPath(path5);
|
|
20820
|
+
return removeFileExtension(path5) + declarationExtension;
|
|
20821
20821
|
}
|
|
20822
|
-
function getDeclarationEmitExtensionForPath(
|
|
20823
|
-
return fileExtensionIsOneOf(
|
|
20822
|
+
function getDeclarationEmitExtensionForPath(path5) {
|
|
20823
|
+
return fileExtensionIsOneOf(path5, [
|
|
20824
20824
|
".mjs",
|
|
20825
20825
|
".mts"
|
|
20826
20826
|
/* Mts */
|
|
20827
|
-
]) ? ".d.mts" : fileExtensionIsOneOf(
|
|
20827
|
+
]) ? ".d.mts" : fileExtensionIsOneOf(path5, [
|
|
20828
20828
|
".cjs",
|
|
20829
20829
|
".cts"
|
|
20830
20830
|
/* Cts */
|
|
20831
|
-
]) ? ".d.cts" : fileExtensionIsOneOf(
|
|
20831
|
+
]) ? ".d.cts" : fileExtensionIsOneOf(path5, [
|
|
20832
20832
|
".json"
|
|
20833
20833
|
/* Json */
|
|
20834
20834
|
]) ? `.d.json.ts` : (
|
|
@@ -20836,8 +20836,8 @@ ${lanes.join("\n")}
|
|
|
20836
20836
|
".d.ts"
|
|
20837
20837
|
);
|
|
20838
20838
|
}
|
|
20839
|
-
function getPossibleOriginalInputExtensionForExtension(
|
|
20840
|
-
return fileExtensionIsOneOf(
|
|
20839
|
+
function getPossibleOriginalInputExtensionForExtension(path5) {
|
|
20840
|
+
return fileExtensionIsOneOf(path5, [
|
|
20841
20841
|
".d.mts",
|
|
20842
20842
|
".mjs",
|
|
20843
20843
|
".mts"
|
|
@@ -20846,7 +20846,7 @@ ${lanes.join("\n")}
|
|
|
20846
20846
|
".mts",
|
|
20847
20847
|
".mjs"
|
|
20848
20848
|
/* Mjs */
|
|
20849
|
-
] : fileExtensionIsOneOf(
|
|
20849
|
+
] : fileExtensionIsOneOf(path5, [
|
|
20850
20850
|
".d.cts",
|
|
20851
20851
|
".cjs",
|
|
20852
20852
|
".cts"
|
|
@@ -20855,7 +20855,7 @@ ${lanes.join("\n")}
|
|
|
20855
20855
|
".cts",
|
|
20856
20856
|
".cjs"
|
|
20857
20857
|
/* Cjs */
|
|
20858
|
-
] : fileExtensionIsOneOf(
|
|
20858
|
+
] : fileExtensionIsOneOf(path5, [`.d.json.ts`]) ? [
|
|
20859
20859
|
".json"
|
|
20860
20860
|
/* Json */
|
|
20861
20861
|
] : [
|
|
@@ -20940,12 +20940,12 @@ ${lanes.join("\n")}
|
|
|
20940
20940
|
createDirectory(directoryPath);
|
|
20941
20941
|
}
|
|
20942
20942
|
}
|
|
20943
|
-
function writeFileEnsuringDirectories(
|
|
20943
|
+
function writeFileEnsuringDirectories(path5, data, writeByteOrderMark, writeFile2, createDirectory, directoryExists) {
|
|
20944
20944
|
try {
|
|
20945
|
-
writeFile2(
|
|
20945
|
+
writeFile2(path5, data, writeByteOrderMark);
|
|
20946
20946
|
} catch {
|
|
20947
|
-
ensureDirectoriesExist(getDirectoryPath(normalizePath(
|
|
20948
|
-
writeFile2(
|
|
20947
|
+
ensureDirectoriesExist(getDirectoryPath(normalizePath(path5)), createDirectory, directoryExists);
|
|
20948
|
+
writeFile2(path5, data, writeByteOrderMark);
|
|
20949
20949
|
}
|
|
20950
20950
|
}
|
|
20951
20951
|
function getLineOfLocalPosition(sourceFile, pos) {
|
|
@@ -21645,20 +21645,20 @@ ${lanes.join("\n")}
|
|
|
21645
21645
|
}
|
|
21646
21646
|
return getStringFromExpandedCharCodes(expandedCharCodes);
|
|
21647
21647
|
}
|
|
21648
|
-
function readJsonOrUndefined(
|
|
21649
|
-
const jsonText = isString(hostOrText) ? hostOrText : hostOrText.readFile(
|
|
21648
|
+
function readJsonOrUndefined(path5, hostOrText) {
|
|
21649
|
+
const jsonText = isString(hostOrText) ? hostOrText : hostOrText.readFile(path5);
|
|
21650
21650
|
if (!jsonText) return void 0;
|
|
21651
21651
|
let result = tryParseJson(jsonText);
|
|
21652
21652
|
if (result === void 0) {
|
|
21653
|
-
const looseResult = parseConfigFileTextToJson(
|
|
21653
|
+
const looseResult = parseConfigFileTextToJson(path5, jsonText);
|
|
21654
21654
|
if (!looseResult.error) {
|
|
21655
21655
|
result = looseResult.config;
|
|
21656
21656
|
}
|
|
21657
21657
|
}
|
|
21658
21658
|
return result;
|
|
21659
21659
|
}
|
|
21660
|
-
function readJson(
|
|
21661
|
-
return readJsonOrUndefined(
|
|
21660
|
+
function readJson(path5, host) {
|
|
21661
|
+
return readJsonOrUndefined(path5, host) || {};
|
|
21662
21662
|
}
|
|
21663
21663
|
function tryParseJson(text) {
|
|
21664
21664
|
try {
|
|
@@ -22808,7 +22808,7 @@ ${lanes.join("\n")}
|
|
|
22808
22808
|
getSymlinkedFiles: () => symlinkedFiles,
|
|
22809
22809
|
getSymlinkedDirectories: () => symlinkedDirectories,
|
|
22810
22810
|
getSymlinkedDirectoriesByRealpath: () => symlinkedDirectoriesByRealpath,
|
|
22811
|
-
setSymlinkedFile: (
|
|
22811
|
+
setSymlinkedFile: (path5, real) => (symlinkedFiles || (symlinkedFiles = /* @__PURE__ */ new Map())).set(path5, real),
|
|
22812
22812
|
setSymlinkedDirectory: (symlink, real) => {
|
|
22813
22813
|
let symlinkPath = toPath(symlink, cwd, getCanonicalFileName);
|
|
22814
22814
|
if (!containsIgnoredPath(symlinkPath)) {
|
|
@@ -22868,8 +22868,8 @@ ${lanes.join("\n")}
|
|
|
22868
22868
|
function stripLeadingDirectorySeparator(s) {
|
|
22869
22869
|
return isAnyDirectorySeparator(s.charCodeAt(0)) ? s.slice(1) : void 0;
|
|
22870
22870
|
}
|
|
22871
|
-
function tryRemoveDirectoryPrefix(
|
|
22872
|
-
const withoutPrefix = tryRemovePrefix(
|
|
22871
|
+
function tryRemoveDirectoryPrefix(path5, dirPath, getCanonicalFileName) {
|
|
22872
|
+
const withoutPrefix = tryRemovePrefix(path5, dirPath, getCanonicalFileName);
|
|
22873
22873
|
return withoutPrefix === void 0 ? void 0 : stripLeadingDirectorySeparator(withoutPrefix);
|
|
22874
22874
|
}
|
|
22875
22875
|
var reservedCharacterPattern = /[^\w\s/]/g;
|
|
@@ -22995,25 +22995,25 @@ ${lanes.join("\n")}
|
|
|
22995
22995
|
function replaceWildcardCharacter(match, singleAsteriskRegexFragment) {
|
|
22996
22996
|
return match === "*" ? singleAsteriskRegexFragment : match === "?" ? "[^/]" : "\\" + match;
|
|
22997
22997
|
}
|
|
22998
|
-
function getFileMatcherPatterns(
|
|
22999
|
-
|
|
22998
|
+
function getFileMatcherPatterns(path5, excludes, includes, useCaseSensitiveFileNames2, currentDirectory) {
|
|
22999
|
+
path5 = normalizePath(path5);
|
|
23000
23000
|
currentDirectory = normalizePath(currentDirectory);
|
|
23001
|
-
const absolutePath = combinePaths(currentDirectory,
|
|
23001
|
+
const absolutePath = combinePaths(currentDirectory, path5);
|
|
23002
23002
|
return {
|
|
23003
23003
|
includeFilePatterns: map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), (pattern) => `^${pattern}$`),
|
|
23004
23004
|
includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"),
|
|
23005
23005
|
includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"),
|
|
23006
23006
|
excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"),
|
|
23007
|
-
basePaths: getBasePaths(
|
|
23007
|
+
basePaths: getBasePaths(path5, includes, useCaseSensitiveFileNames2)
|
|
23008
23008
|
};
|
|
23009
23009
|
}
|
|
23010
23010
|
function getRegexFromPattern(pattern, useCaseSensitiveFileNames2) {
|
|
23011
23011
|
return new RegExp(pattern, useCaseSensitiveFileNames2 ? "" : "i");
|
|
23012
23012
|
}
|
|
23013
|
-
function matchFiles(
|
|
23014
|
-
|
|
23013
|
+
function matchFiles(path5, extensions, excludes, includes, useCaseSensitiveFileNames2, currentDirectory, depth, getFileSystemEntries, realpath) {
|
|
23014
|
+
path5 = normalizePath(path5);
|
|
23015
23015
|
currentDirectory = normalizePath(currentDirectory);
|
|
23016
|
-
const patterns = getFileMatcherPatterns(
|
|
23016
|
+
const patterns = getFileMatcherPatterns(path5, excludes, includes, useCaseSensitiveFileNames2, currentDirectory);
|
|
23017
23017
|
const includeFileRegexes = patterns.includeFilePatterns && patterns.includeFilePatterns.map((pattern) => getRegexFromPattern(pattern, useCaseSensitiveFileNames2));
|
|
23018
23018
|
const includeDirectoryRegex = patterns.includeDirectoryPattern && getRegexFromPattern(patterns.includeDirectoryPattern, useCaseSensitiveFileNames2);
|
|
23019
23019
|
const excludeRegex = patterns.excludePattern && getRegexFromPattern(patterns.excludePattern, useCaseSensitiveFileNames2);
|
|
@@ -23058,17 +23058,17 @@ ${lanes.join("\n")}
|
|
|
23058
23058
|
}
|
|
23059
23059
|
}
|
|
23060
23060
|
}
|
|
23061
|
-
function getBasePaths(
|
|
23062
|
-
const basePaths = [
|
|
23061
|
+
function getBasePaths(path5, includes, useCaseSensitiveFileNames2) {
|
|
23062
|
+
const basePaths = [path5];
|
|
23063
23063
|
if (includes) {
|
|
23064
23064
|
const includeBasePaths = [];
|
|
23065
23065
|
for (const include of includes) {
|
|
23066
|
-
const absolute = isRootedDiskPath(include) ? include : normalizePath(combinePaths(
|
|
23066
|
+
const absolute = isRootedDiskPath(include) ? include : normalizePath(combinePaths(path5, include));
|
|
23067
23067
|
includeBasePaths.push(getIncludeBasePath(absolute));
|
|
23068
23068
|
}
|
|
23069
23069
|
includeBasePaths.sort(getStringComparer(!useCaseSensitiveFileNames2));
|
|
23070
23070
|
for (const includeBasePath of includeBasePaths) {
|
|
23071
|
-
if (every(basePaths, (basePath) => !containsPath(basePath, includeBasePath,
|
|
23071
|
+
if (every(basePaths, (basePath) => !containsPath(basePath, includeBasePath, path5, !useCaseSensitiveFileNames2))) {
|
|
23072
23072
|
basePaths.push(includeBasePath);
|
|
23073
23073
|
}
|
|
23074
23074
|
}
|
|
@@ -23332,24 +23332,24 @@ ${lanes.join("\n")}
|
|
|
23332
23332
|
".json"
|
|
23333
23333
|
/* Json */
|
|
23334
23334
|
];
|
|
23335
|
-
function removeFileExtension(
|
|
23335
|
+
function removeFileExtension(path5) {
|
|
23336
23336
|
for (const ext of extensionsToRemove) {
|
|
23337
|
-
const extensionless = tryRemoveExtension(
|
|
23337
|
+
const extensionless = tryRemoveExtension(path5, ext);
|
|
23338
23338
|
if (extensionless !== void 0) {
|
|
23339
23339
|
return extensionless;
|
|
23340
23340
|
}
|
|
23341
23341
|
}
|
|
23342
|
-
return
|
|
23342
|
+
return path5;
|
|
23343
23343
|
}
|
|
23344
|
-
function tryRemoveExtension(
|
|
23345
|
-
return fileExtensionIs(
|
|
23344
|
+
function tryRemoveExtension(path5, extension) {
|
|
23345
|
+
return fileExtensionIs(path5, extension) ? removeExtension(path5, extension) : void 0;
|
|
23346
23346
|
}
|
|
23347
|
-
function removeExtension(
|
|
23348
|
-
return
|
|
23347
|
+
function removeExtension(path5, extension) {
|
|
23348
|
+
return path5.substring(0, path5.length - extension.length);
|
|
23349
23349
|
}
|
|
23350
|
-
function changeExtension(
|
|
23350
|
+
function changeExtension(path5, newExtension) {
|
|
23351
23351
|
return changeAnyExtension(
|
|
23352
|
-
|
|
23352
|
+
path5,
|
|
23353
23353
|
newExtension,
|
|
23354
23354
|
extensionsToRemove,
|
|
23355
23355
|
/*ignoreCase*/
|
|
@@ -23375,8 +23375,8 @@ ${lanes.join("\n")}
|
|
|
23375
23375
|
let matchableStringSet;
|
|
23376
23376
|
let patterns;
|
|
23377
23377
|
const pathList = getOwnKeys(paths);
|
|
23378
|
-
for (const
|
|
23379
|
-
const patternOrStr = tryParsePattern(
|
|
23378
|
+
for (const path5 of pathList) {
|
|
23379
|
+
const patternOrStr = tryParsePattern(path5);
|
|
23380
23380
|
if (patternOrStr === void 0) {
|
|
23381
23381
|
continue;
|
|
23382
23382
|
} else if (typeof patternOrStr === "string") {
|
|
@@ -23403,15 +23403,15 @@ ${lanes.join("\n")}
|
|
|
23403
23403
|
function resolutionExtensionIsTSOrJson(ext) {
|
|
23404
23404
|
return extensionIsTS(ext) || ext === ".json";
|
|
23405
23405
|
}
|
|
23406
|
-
function extensionFromPath(
|
|
23407
|
-
const ext = tryGetExtensionFromPath2(
|
|
23408
|
-
return ext !== void 0 ? ext : Debug.fail(`File ${
|
|
23406
|
+
function extensionFromPath(path5) {
|
|
23407
|
+
const ext = tryGetExtensionFromPath2(path5);
|
|
23408
|
+
return ext !== void 0 ? ext : Debug.fail(`File ${path5} has unknown extension.`);
|
|
23409
23409
|
}
|
|
23410
|
-
function isAnySupportedFileExtension(
|
|
23411
|
-
return tryGetExtensionFromPath2(
|
|
23410
|
+
function isAnySupportedFileExtension(path5) {
|
|
23411
|
+
return tryGetExtensionFromPath2(path5) !== void 0;
|
|
23412
23412
|
}
|
|
23413
|
-
function tryGetExtensionFromPath2(
|
|
23414
|
-
return find(extensionsToRemove, (e) => fileExtensionIs(
|
|
23413
|
+
function tryGetExtensionFromPath2(path5) {
|
|
23414
|
+
return find(extensionsToRemove, (e) => fileExtensionIs(path5, e));
|
|
23415
23415
|
}
|
|
23416
23416
|
function isCheckJsEnabledForFile(sourceFile, compilerOptions) {
|
|
23417
23417
|
return sourceFile.checkJsDirective ? sourceFile.checkJsDirective.enabled : compilerOptions.checkJs;
|
|
@@ -23720,8 +23720,8 @@ ${lanes.join("\n")}
|
|
|
23720
23720
|
return false;
|
|
23721
23721
|
}
|
|
23722
23722
|
}
|
|
23723
|
-
function containsIgnoredPath(
|
|
23724
|
-
return some(ignoredPaths, (p) =>
|
|
23723
|
+
function containsIgnoredPath(path5) {
|
|
23724
|
+
return some(ignoredPaths, (p) => path5.includes(p));
|
|
23725
23725
|
}
|
|
23726
23726
|
function getContainingNodeArray(node) {
|
|
23727
23727
|
if (!node.parent) return void 0;
|
|
@@ -43517,7 +43517,7 @@ ${lanes.join("\n")}
|
|
|
43517
43517
|
const typeReferenceDirectives = context.typeReferenceDirectives;
|
|
43518
43518
|
const libReferenceDirectives = context.libReferenceDirectives;
|
|
43519
43519
|
forEach(toArray(entryOrList), (arg) => {
|
|
43520
|
-
const { types, lib, path:
|
|
43520
|
+
const { types, lib, path: path5, ["resolution-mode"]: res, preserve: _preserve } = arg.arguments;
|
|
43521
43521
|
const preserve = _preserve === "true" ? true : void 0;
|
|
43522
43522
|
if (arg.arguments["no-default-lib"] === "true") {
|
|
43523
43523
|
context.hasNoDefaultLib = true;
|
|
@@ -43526,8 +43526,8 @@ ${lanes.join("\n")}
|
|
|
43526
43526
|
typeReferenceDirectives.push({ pos: types.pos, end: types.end, fileName: types.value, ...parsed ? { resolutionMode: parsed } : {}, ...preserve ? { preserve } : {} });
|
|
43527
43527
|
} else if (lib) {
|
|
43528
43528
|
libReferenceDirectives.push({ pos: lib.pos, end: lib.end, fileName: lib.value, ...preserve ? { preserve } : {} });
|
|
43529
|
-
} else if (
|
|
43530
|
-
referencedFiles.push({ pos:
|
|
43529
|
+
} else if (path5) {
|
|
43530
|
+
referencedFiles.push({ pos: path5.pos, end: path5.end, fileName: path5.value, ...preserve ? { preserve } : {} });
|
|
43531
43531
|
} else {
|
|
43532
43532
|
reportDiagnostic(arg.range.pos, arg.range.end - arg.range.pos, Diagnostics.Invalid_reference_directive_syntax);
|
|
43533
43533
|
}
|
|
@@ -45956,9 +45956,9 @@ ${lanes.join("\n")}
|
|
|
45956
45956
|
if (specs[0] === defaultIncludeSpec) return void 0;
|
|
45957
45957
|
return specs;
|
|
45958
45958
|
}
|
|
45959
|
-
function matchesSpecs(
|
|
45959
|
+
function matchesSpecs(path5, includeSpecs, excludeSpecs, host) {
|
|
45960
45960
|
if (!includeSpecs) return returnTrue;
|
|
45961
|
-
const patterns = getFileMatcherPatterns(
|
|
45961
|
+
const patterns = getFileMatcherPatterns(path5, excludeSpecs, includeSpecs, host.useCaseSensitiveFileNames, host.getCurrentDirectory());
|
|
45962
45962
|
const excludeRe = patterns.excludePattern && getRegexFromPattern(patterns.excludePattern, host.useCaseSensitiveFileNames);
|
|
45963
45963
|
const includeRe = patterns.includeFilePattern && getRegexFromPattern(patterns.includeFilePattern, host.useCaseSensitiveFileNames);
|
|
45964
45964
|
if (includeRe) {
|
|
@@ -46603,9 +46603,9 @@ ${lanes.join("\n")}
|
|
|
46603
46603
|
const setPropertyInResultIfNotUndefined = (propertyName) => {
|
|
46604
46604
|
if (ownConfig.raw[propertyName]) return;
|
|
46605
46605
|
if (extendsRaw[propertyName]) {
|
|
46606
|
-
result[propertyName] = map(extendsRaw[propertyName], (
|
|
46606
|
+
result[propertyName] = map(extendsRaw[propertyName], (path5) => startsWithConfigDirTemplate(path5) || isRootedDiskPath(path5) ? path5 : combinePaths(
|
|
46607
46607
|
relativeDifference || (relativeDifference = convertToRelativePath(getDirectoryPath(extendedConfigPath), basePath, createGetCanonicalFileName(host.useCaseSensitiveFileNames))),
|
|
46608
|
-
|
|
46608
|
+
path5
|
|
46609
46609
|
));
|
|
46610
46610
|
}
|
|
46611
46611
|
};
|
|
@@ -46759,11 +46759,11 @@ ${lanes.join("\n")}
|
|
|
46759
46759
|
return void 0;
|
|
46760
46760
|
}
|
|
46761
46761
|
function getExtendedConfig(sourceFile, extendedConfigPath, host, resolutionStack, errors, extendedConfigCache, result) {
|
|
46762
|
-
const
|
|
46762
|
+
const path5 = host.useCaseSensitiveFileNames ? extendedConfigPath : toFileNameLowerCase(extendedConfigPath);
|
|
46763
46763
|
let value;
|
|
46764
46764
|
let extendedResult;
|
|
46765
46765
|
let extendedConfig;
|
|
46766
|
-
if (extendedConfigCache && (value = extendedConfigCache.get(
|
|
46766
|
+
if (extendedConfigCache && (value = extendedConfigCache.get(path5))) {
|
|
46767
46767
|
({ extendedResult, extendedConfig } = value);
|
|
46768
46768
|
} else {
|
|
46769
46769
|
extendedResult = readJsonConfigFile(extendedConfigPath, (path22) => host.readFile(path22));
|
|
@@ -46781,7 +46781,7 @@ ${lanes.join("\n")}
|
|
|
46781
46781
|
);
|
|
46782
46782
|
}
|
|
46783
46783
|
if (extendedConfigCache) {
|
|
46784
|
-
extendedConfigCache.set(
|
|
46784
|
+
extendedConfigCache.set(path5, { extendedResult, extendedConfig });
|
|
46785
46785
|
}
|
|
46786
46786
|
}
|
|
46787
46787
|
if (sourceFile) {
|
|
@@ -47049,24 +47049,24 @@ ${lanes.join("\n")}
|
|
|
47049
47049
|
}
|
|
47050
47050
|
const match = getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames2);
|
|
47051
47051
|
if (match) {
|
|
47052
|
-
const { key, path:
|
|
47052
|
+
const { key, path: path5, flags } = match;
|
|
47053
47053
|
const existingPath = wildCardKeyToPath.get(key);
|
|
47054
47054
|
const existingFlags = existingPath !== void 0 ? wildcardDirectories[existingPath] : void 0;
|
|
47055
47055
|
if (existingFlags === void 0 || existingFlags < flags) {
|
|
47056
|
-
wildcardDirectories[existingPath !== void 0 ? existingPath :
|
|
47057
|
-
if (existingPath === void 0) wildCardKeyToPath.set(key,
|
|
47056
|
+
wildcardDirectories[existingPath !== void 0 ? existingPath : path5] = flags;
|
|
47057
|
+
if (existingPath === void 0) wildCardKeyToPath.set(key, path5);
|
|
47058
47058
|
if (flags === 1) {
|
|
47059
47059
|
recursiveKeys.push(key);
|
|
47060
47060
|
}
|
|
47061
47061
|
}
|
|
47062
47062
|
}
|
|
47063
47063
|
}
|
|
47064
|
-
for (const
|
|
47065
|
-
if (hasProperty(wildcardDirectories,
|
|
47064
|
+
for (const path5 in wildcardDirectories) {
|
|
47065
|
+
if (hasProperty(wildcardDirectories, path5)) {
|
|
47066
47066
|
for (const recursiveKey of recursiveKeys) {
|
|
47067
|
-
const key = toCanonicalKey(
|
|
47067
|
+
const key = toCanonicalKey(path5, useCaseSensitiveFileNames2);
|
|
47068
47068
|
if (key !== recursiveKey && containsPath(recursiveKey, key, basePath, !useCaseSensitiveFileNames2)) {
|
|
47069
|
-
delete wildcardDirectories[
|
|
47069
|
+
delete wildcardDirectories[path5];
|
|
47070
47070
|
}
|
|
47071
47071
|
}
|
|
47072
47072
|
}
|
|
@@ -47074,8 +47074,8 @@ ${lanes.join("\n")}
|
|
|
47074
47074
|
}
|
|
47075
47075
|
return wildcardDirectories;
|
|
47076
47076
|
}
|
|
47077
|
-
function toCanonicalKey(
|
|
47078
|
-
return useCaseSensitiveFileNames2 ?
|
|
47077
|
+
function toCanonicalKey(path5, useCaseSensitiveFileNames2) {
|
|
47078
|
+
return useCaseSensitiveFileNames2 ? path5 : toFileNameLowerCase(path5);
|
|
47079
47079
|
}
|
|
47080
47080
|
function getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames2) {
|
|
47081
47081
|
const match = wildcardDirectoryPattern.exec(spec);
|
|
@@ -47091,10 +47091,10 @@ ${lanes.join("\n")}
|
|
|
47091
47091
|
};
|
|
47092
47092
|
}
|
|
47093
47093
|
if (isImplicitGlob(spec.substring(spec.lastIndexOf(directorySeparator) + 1))) {
|
|
47094
|
-
const
|
|
47094
|
+
const path5 = removeTrailingDirectorySeparator(spec);
|
|
47095
47095
|
return {
|
|
47096
|
-
key: toCanonicalKey(
|
|
47097
|
-
path:
|
|
47096
|
+
key: toCanonicalKey(path5, useCaseSensitiveFileNames2),
|
|
47097
|
+
path: path5,
|
|
47098
47098
|
flags: 1
|
|
47099
47099
|
/* Recursive */
|
|
47100
47100
|
};
|
|
@@ -47333,11 +47333,11 @@ ${lanes.join("\n")}
|
|
|
47333
47333
|
}
|
|
47334
47334
|
return;
|
|
47335
47335
|
}
|
|
47336
|
-
const
|
|
47336
|
+
const path5 = normalizePath(combinePaths(baseDirectory, fileName));
|
|
47337
47337
|
if (state.traceEnabled) {
|
|
47338
|
-
trace(state.host, Diagnostics.package_json_has_0_field_1_that_references_2, fieldName, fileName,
|
|
47338
|
+
trace(state.host, Diagnostics.package_json_has_0_field_1_that_references_2, fieldName, fileName, path5);
|
|
47339
47339
|
}
|
|
47340
|
-
return
|
|
47340
|
+
return path5;
|
|
47341
47341
|
}
|
|
47342
47342
|
function readPackageJsonTypesFields(jsonContent, baseDirectory, state) {
|
|
47343
47343
|
return readPackageJsonPathField(jsonContent, "typings", baseDirectory, state) || readPackageJsonPathField(jsonContent, "types", baseDirectory, state);
|
|
@@ -47384,7 +47384,7 @@ ${lanes.join("\n")}
|
|
|
47384
47384
|
}
|
|
47385
47385
|
var typeScriptVersion;
|
|
47386
47386
|
function getPackageJsonTypesVersionsPaths(typesVersions) {
|
|
47387
|
-
if (!typeScriptVersion) typeScriptVersion = new Version(
|
|
47387
|
+
if (!typeScriptVersion) typeScriptVersion = new Version(version2);
|
|
47388
47388
|
for (const key in typesVersions) {
|
|
47389
47389
|
if (!hasProperty(typesVersions, key)) continue;
|
|
47390
47390
|
const keyRange = VersionRange.tryParse(key);
|
|
@@ -47851,13 +47851,13 @@ ${lanes.join("\n")}
|
|
|
47851
47851
|
directoryToModuleNameMap.update(options2);
|
|
47852
47852
|
}
|
|
47853
47853
|
function getOrCreateCacheForDirectory(directoryName, redirectedReference) {
|
|
47854
|
-
const
|
|
47855
|
-
return getOrCreateCache(directoryToModuleNameMap, redirectedReference,
|
|
47854
|
+
const path5 = toPath(directoryName, currentDirectory, getCanonicalFileName);
|
|
47855
|
+
return getOrCreateCache(directoryToModuleNameMap, redirectedReference, path5, () => createModeAwareCache());
|
|
47856
47856
|
}
|
|
47857
47857
|
function getFromDirectoryCache(name, mode, directoryName, redirectedReference) {
|
|
47858
47858
|
var _a, _b;
|
|
47859
|
-
const
|
|
47860
|
-
return (_b = (_a = directoryToModuleNameMap.getMapOfCacheRedirects(redirectedReference)) == null ? void 0 : _a.get(
|
|
47859
|
+
const path5 = toPath(directoryName, currentDirectory, getCanonicalFileName);
|
|
47860
|
+
return (_b = (_a = directoryToModuleNameMap.getMapOfCacheRedirects(redirectedReference)) == null ? void 0 : _a.get(path5)) == null ? void 0 : _b.get(name, mode);
|
|
47861
47861
|
}
|
|
47862
47862
|
}
|
|
47863
47863
|
function createModeAwareCacheKey(specifier, mode) {
|
|
@@ -47934,14 +47934,14 @@ ${lanes.join("\n")}
|
|
|
47934
47934
|
return directoryPathMap.get(toPath(directory, currentDirectory, getCanonicalFileName));
|
|
47935
47935
|
}
|
|
47936
47936
|
function set(directory, result) {
|
|
47937
|
-
const
|
|
47938
|
-
if (directoryPathMap.has(
|
|
47937
|
+
const path5 = toPath(directory, currentDirectory, getCanonicalFileName);
|
|
47938
|
+
if (directoryPathMap.has(path5)) {
|
|
47939
47939
|
return;
|
|
47940
47940
|
}
|
|
47941
|
-
directoryPathMap.set(
|
|
47941
|
+
directoryPathMap.set(path5, result);
|
|
47942
47942
|
const resolvedFileName = getResolvedFileName(result);
|
|
47943
|
-
const commonPrefix = resolvedFileName && getCommonPrefix(
|
|
47944
|
-
let current =
|
|
47943
|
+
const commonPrefix = resolvedFileName && getCommonPrefix(path5, resolvedFileName);
|
|
47944
|
+
let current = path5;
|
|
47945
47945
|
while (current !== commonPrefix) {
|
|
47946
47946
|
const parent2 = getDirectoryPath(current);
|
|
47947
47947
|
if (parent2 === current || directoryPathMap.has(parent2)) {
|
|
@@ -48505,16 +48505,16 @@ ${lanes.join("\n")}
|
|
|
48505
48505
|
const combined = combinePaths(containingDirectory, moduleName);
|
|
48506
48506
|
const parts = getPathComponents(combined);
|
|
48507
48507
|
const lastPart = lastOrUndefined(parts);
|
|
48508
|
-
const
|
|
48509
|
-
return { path:
|
|
48508
|
+
const path5 = lastPart === "." || lastPart === ".." ? ensureTrailingDirectorySeparator(normalizePath(combined)) : normalizePath(combined);
|
|
48509
|
+
return { path: path5, parts };
|
|
48510
48510
|
}
|
|
48511
|
-
function realPath(
|
|
48511
|
+
function realPath(path5, host, traceEnabled) {
|
|
48512
48512
|
if (!host.realpath) {
|
|
48513
|
-
return
|
|
48513
|
+
return path5;
|
|
48514
48514
|
}
|
|
48515
|
-
const real = normalizePath(host.realpath(
|
|
48515
|
+
const real = normalizePath(host.realpath(path5));
|
|
48516
48516
|
if (traceEnabled) {
|
|
48517
|
-
trace(host, Diagnostics.Resolving_real_path_for_0_result_1,
|
|
48517
|
+
trace(host, Diagnostics.Resolving_real_path_for_0_result_1, path5, real);
|
|
48518
48518
|
}
|
|
48519
48519
|
return real;
|
|
48520
48520
|
}
|
|
@@ -48559,25 +48559,25 @@ ${lanes.join("\n")}
|
|
|
48559
48559
|
return void 0;
|
|
48560
48560
|
}
|
|
48561
48561
|
var nodeModulesPathPart = "/node_modules/";
|
|
48562
|
-
function pathContainsNodeModules(
|
|
48563
|
-
return
|
|
48562
|
+
function pathContainsNodeModules(path5) {
|
|
48563
|
+
return path5.includes(nodeModulesPathPart);
|
|
48564
48564
|
}
|
|
48565
48565
|
function parseNodeModuleFromPath(resolved, isFolder) {
|
|
48566
|
-
const
|
|
48567
|
-
const idx =
|
|
48566
|
+
const path5 = normalizePath(resolved);
|
|
48567
|
+
const idx = path5.lastIndexOf(nodeModulesPathPart);
|
|
48568
48568
|
if (idx === -1) {
|
|
48569
48569
|
return void 0;
|
|
48570
48570
|
}
|
|
48571
48571
|
const indexAfterNodeModules = idx + nodeModulesPathPart.length;
|
|
48572
|
-
let indexAfterPackageName = moveToNextDirectorySeparatorIfAvailable(
|
|
48573
|
-
if (
|
|
48574
|
-
indexAfterPackageName = moveToNextDirectorySeparatorIfAvailable(
|
|
48572
|
+
let indexAfterPackageName = moveToNextDirectorySeparatorIfAvailable(path5, indexAfterNodeModules, isFolder);
|
|
48573
|
+
if (path5.charCodeAt(indexAfterNodeModules) === 64) {
|
|
48574
|
+
indexAfterPackageName = moveToNextDirectorySeparatorIfAvailable(path5, indexAfterPackageName, isFolder);
|
|
48575
48575
|
}
|
|
48576
|
-
return
|
|
48576
|
+
return path5.slice(0, indexAfterPackageName);
|
|
48577
48577
|
}
|
|
48578
|
-
function moveToNextDirectorySeparatorIfAvailable(
|
|
48579
|
-
const nextSeparatorIndex =
|
|
48580
|
-
return nextSeparatorIndex === -1 ? isFolder ?
|
|
48578
|
+
function moveToNextDirectorySeparatorIfAvailable(path5, prevSeparatorIndex, isFolder) {
|
|
48579
|
+
const nextSeparatorIndex = path5.indexOf(directorySeparator, prevSeparatorIndex + 1);
|
|
48580
|
+
return nextSeparatorIndex === -1 ? isFolder ? path5.length : prevSeparatorIndex : nextSeparatorIndex;
|
|
48581
48581
|
}
|
|
48582
48582
|
function loadModuleFromFileNoPackageId(extensions, candidate, onlyRecordFailures, state) {
|
|
48583
48583
|
return noPackageId(loadModuleFromFile(extensions, candidate, onlyRecordFailures, state));
|
|
@@ -48719,8 +48719,8 @@ ${lanes.join("\n")}
|
|
|
48719
48719
|
return extensions & 4 && !isDeclarationFileName(candidate + originalExtension) && tryExtension(`.d${originalExtension}.ts`) || void 0;
|
|
48720
48720
|
}
|
|
48721
48721
|
function tryExtension(ext, resolvedUsingTsExtension) {
|
|
48722
|
-
const
|
|
48723
|
-
return
|
|
48722
|
+
const path5 = tryFile(candidate + ext, onlyRecordFailures, state);
|
|
48723
|
+
return path5 === void 0 ? void 0 : { path: path5, ext, resolvedUsingTsExtension: !state.candidateIsFromPackageJsonField && resolvedUsingTsExtension };
|
|
48724
48724
|
}
|
|
48725
48725
|
}
|
|
48726
48726
|
function tryFile(fileName, onlyRecordFailures, state) {
|
|
@@ -48932,9 +48932,9 @@ ${lanes.join("\n")}
|
|
|
48932
48932
|
state
|
|
48933
48933
|
);
|
|
48934
48934
|
if (peerPackageJson) {
|
|
48935
|
-
const
|
|
48936
|
-
result += `+${key}@${
|
|
48937
|
-
if (state.traceEnabled) trace(state.host, Diagnostics.Found_peerDependency_0_with_1_version, key,
|
|
48935
|
+
const version22 = peerPackageJson.contents.packageJsonContent.version;
|
|
48936
|
+
result += `+${key}@${version22}`;
|
|
48937
|
+
if (state.traceEnabled) trace(state.host, Diagnostics.Found_peerDependency_0_with_1_version, key, version22);
|
|
48938
48938
|
} else {
|
|
48939
48939
|
if (state.traceEnabled) trace(state.host, Diagnostics.Failed_to_find_peerDependency_0, key);
|
|
48940
48940
|
}
|
|
@@ -49032,7 +49032,7 @@ ${lanes.join("\n")}
|
|
|
49032
49032
|
false
|
|
49033
49033
|
);
|
|
49034
49034
|
if (state.traceEnabled) {
|
|
49035
|
-
trace(state.host, Diagnostics.package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2, versionPaths.version,
|
|
49035
|
+
trace(state.host, Diagnostics.package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2, versionPaths.version, version2, moduleName);
|
|
49036
49036
|
}
|
|
49037
49037
|
const pathPatterns = tryParsePatterns(versionPaths.paths);
|
|
49038
49038
|
const result = tryLoadModuleUsingPaths(extensions, moduleName, candidate, versionPaths.paths, pathPatterns, loader, onlyRecordFailuresForPackageFile || onlyRecordFailuresForIndex, state);
|
|
@@ -49416,10 +49416,10 @@ ${lanes.join("\n")}
|
|
|
49416
49416
|
/*value*/
|
|
49417
49417
|
void 0
|
|
49418
49418
|
);
|
|
49419
|
-
function toAbsolutePath(
|
|
49419
|
+
function toAbsolutePath(path5) {
|
|
49420
49420
|
var _a2, _b2;
|
|
49421
|
-
if (
|
|
49422
|
-
return getNormalizedAbsolutePath(
|
|
49421
|
+
if (path5 === void 0) return path5;
|
|
49422
|
+
return getNormalizedAbsolutePath(path5, (_b2 = (_a2 = state.host).getCurrentDirectory) == null ? void 0 : _b2.call(_a2));
|
|
49423
49423
|
}
|
|
49424
49424
|
function combineDirectoryPath(root, dir) {
|
|
49425
49425
|
return ensureTrailingDirectorySeparator(combinePaths(root, dir));
|
|
@@ -49514,7 +49514,7 @@ ${lanes.join("\n")}
|
|
|
49514
49514
|
if (!startsWith(key, "types@")) return false;
|
|
49515
49515
|
const range = VersionRange.tryParse(key.substring("types@".length));
|
|
49516
49516
|
if (!range) return false;
|
|
49517
|
-
return range.test(
|
|
49517
|
+
return range.test(version2);
|
|
49518
49518
|
}
|
|
49519
49519
|
function loadModuleFromNearestNodeModulesDirectory(extensions, moduleName, directory, state, cache, redirectedReference) {
|
|
49520
49520
|
return loadModuleFromNearestNodeModulesDirectoryWorker(
|
|
@@ -49650,7 +49650,7 @@ ${lanes.join("\n")}
|
|
|
49650
49650
|
const versionPaths = rest !== "" && packageInfo ? getVersionPathsOfPackageJsonInfo(packageInfo, state) : void 0;
|
|
49651
49651
|
if (versionPaths) {
|
|
49652
49652
|
if (state.traceEnabled) {
|
|
49653
|
-
trace(state.host, Diagnostics.package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2, versionPaths.version,
|
|
49653
|
+
trace(state.host, Diagnostics.package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2, versionPaths.version, version2, rest);
|
|
49654
49654
|
}
|
|
49655
49655
|
const packageDirectoryExists = nodeModulesDirectoryExists && directoryProbablyExists(packageDirectory, state.host);
|
|
49656
49656
|
const pathPatterns = tryParsePatterns(versionPaths.paths);
|
|
@@ -49670,10 +49670,10 @@ ${lanes.join("\n")}
|
|
|
49670
49670
|
trace(state.host, Diagnostics.Module_name_0_matched_pattern_1, moduleName, matchedPatternText);
|
|
49671
49671
|
}
|
|
49672
49672
|
const resolved = forEach(paths[matchedPatternText], (subst) => {
|
|
49673
|
-
const
|
|
49674
|
-
const candidate = normalizePath(combinePaths(baseDirectory,
|
|
49673
|
+
const path5 = matchedStar ? replaceFirstStar(subst, matchedStar) : subst;
|
|
49674
|
+
const candidate = normalizePath(combinePaths(baseDirectory, path5));
|
|
49675
49675
|
if (state.traceEnabled) {
|
|
49676
|
-
trace(state.host, Diagnostics.Trying_substitution_0_candidate_module_location_Colon_1, subst,
|
|
49676
|
+
trace(state.host, Diagnostics.Trying_substitution_0_candidate_module_location_Colon_1, subst, path5);
|
|
49677
49677
|
}
|
|
49678
49678
|
const extension = tryGetExtensionFromPath2(subst);
|
|
49679
49679
|
if (extension !== void 0) {
|
|
@@ -53826,10 +53826,10 @@ ${lanes.join("\n")}
|
|
|
53826
53826
|
if (a === void 0 || b === void 0) return false;
|
|
53827
53827
|
return comparePaths(a, b, ignoreCase) === 0;
|
|
53828
53828
|
}
|
|
53829
|
-
function countPathComponents(
|
|
53829
|
+
function countPathComponents(path5) {
|
|
53830
53830
|
let count = 0;
|
|
53831
|
-
for (let i = startsWith(
|
|
53832
|
-
if (
|
|
53831
|
+
for (let i = startsWith(path5, "./") ? 2 : 0; i < path5.length; i++) {
|
|
53832
|
+
if (path5.charCodeAt(i) === 47) count++;
|
|
53833
53833
|
}
|
|
53834
53834
|
return count;
|
|
53835
53835
|
}
|
|
@@ -53946,9 +53946,9 @@ ${lanes.join("\n")}
|
|
|
53946
53946
|
host,
|
|
53947
53947
|
/*preferSymlinks*/
|
|
53948
53948
|
true,
|
|
53949
|
-
(
|
|
53950
|
-
const isInNodeModules = pathContainsNodeModules(
|
|
53951
|
-
allFileNames.set(
|
|
53949
|
+
(path5, isRedirect) => {
|
|
53950
|
+
const isInNodeModules = pathContainsNodeModules(path5);
|
|
53951
|
+
allFileNames.set(path5, { path: info.getCanonicalFileName(path5), isRedirect, isInNodeModules });
|
|
53952
53952
|
importedFileFromNodeModules = importedFileFromNodeModules || isInNodeModules;
|
|
53953
53953
|
}
|
|
53954
53954
|
);
|
|
@@ -53956,8 +53956,8 @@ ${lanes.join("\n")}
|
|
|
53956
53956
|
for (let directory = info.canonicalSourceDirectory; allFileNames.size !== 0; ) {
|
|
53957
53957
|
const directoryStart = ensureTrailingDirectorySeparator(directory);
|
|
53958
53958
|
let pathsInDirectory;
|
|
53959
|
-
allFileNames.forEach(({ path:
|
|
53960
|
-
if (startsWith(
|
|
53959
|
+
allFileNames.forEach(({ path: path5, isRedirect, isInNodeModules }, fileName) => {
|
|
53960
|
+
if (startsWith(path5, directoryStart)) {
|
|
53961
53961
|
(pathsInDirectory || (pathsInDirectory = [])).push({ path: fileName, isRedirect, isInNodeModules });
|
|
53962
53962
|
allFileNames.delete(fileName);
|
|
53963
53963
|
}
|
|
@@ -54260,17 +54260,17 @@ ${lanes.join("\n")}
|
|
|
54260
54260
|
}
|
|
54261
54261
|
return processEnding(shortest, allowedEndings, compilerOptions);
|
|
54262
54262
|
}
|
|
54263
|
-
function tryGetModuleNameAsNodeModule({ path:
|
|
54263
|
+
function tryGetModuleNameAsNodeModule({ path: path5, isRedirect }, { getCanonicalFileName, canonicalSourceDirectory }, importingSourceFile, host, options, userPreferences, packageNameOnly, overrideMode) {
|
|
54264
54264
|
if (!host.fileExists || !host.readFile) {
|
|
54265
54265
|
return void 0;
|
|
54266
54266
|
}
|
|
54267
|
-
const parts = getNodeModulePathParts(
|
|
54267
|
+
const parts = getNodeModulePathParts(path5);
|
|
54268
54268
|
if (!parts) {
|
|
54269
54269
|
return void 0;
|
|
54270
54270
|
}
|
|
54271
54271
|
const preferences = getModuleSpecifierPreferences(userPreferences, host, options, importingSourceFile);
|
|
54272
54272
|
const allowedEndings = preferences.getAllowedEndingsInPreferredOrder();
|
|
54273
|
-
let moduleSpecifier =
|
|
54273
|
+
let moduleSpecifier = path5;
|
|
54274
54274
|
let isPackageRootPath = false;
|
|
54275
54275
|
if (!packageNameOnly) {
|
|
54276
54276
|
let packageRootIndex = parts.packageRootIndex;
|
|
@@ -54291,7 +54291,7 @@ ${lanes.join("\n")}
|
|
|
54291
54291
|
break;
|
|
54292
54292
|
}
|
|
54293
54293
|
if (!moduleFileName) moduleFileName = moduleFileToTry;
|
|
54294
|
-
packageRootIndex =
|
|
54294
|
+
packageRootIndex = path5.indexOf(directorySeparator, packageRootIndex + 1);
|
|
54295
54295
|
if (packageRootIndex === -1) {
|
|
54296
54296
|
moduleSpecifier = processEnding(moduleFileName, allowedEndings, options, host);
|
|
54297
54297
|
break;
|
|
@@ -54311,9 +54311,9 @@ ${lanes.join("\n")}
|
|
|
54311
54311
|
return getEmitModuleResolutionKind(options) === 1 && packageName === nodeModulesDirectoryName ? void 0 : packageName;
|
|
54312
54312
|
function tryDirectoryWithPackageJson(packageRootIndex) {
|
|
54313
54313
|
var _a, _b;
|
|
54314
|
-
const packageRootPath =
|
|
54314
|
+
const packageRootPath = path5.substring(0, packageRootIndex);
|
|
54315
54315
|
const packageJsonPath = combinePaths(packageRootPath, "package.json");
|
|
54316
|
-
let moduleFileToTry =
|
|
54316
|
+
let moduleFileToTry = path5;
|
|
54317
54317
|
let maybeBlockedByTypesVersions = false;
|
|
54318
54318
|
const cachedPackageJson = (_b = (_a = host.getPackageJsonInfoCache) == null ? void 0 : _a.call(host)) == null ? void 0 : _b.getPackageJsonInfo(packageJsonPath);
|
|
54319
54319
|
if (isPackageJsonInfo(cachedPackageJson) || cachedPackageJson === void 0 && host.fileExists(packageJsonPath)) {
|
|
@@ -54326,7 +54326,7 @@ ${lanes.join("\n")}
|
|
|
54326
54326
|
const fromExports = (packageJsonContent == null ? void 0 : packageJsonContent.exports) ? tryGetModuleNameFromExports(
|
|
54327
54327
|
options,
|
|
54328
54328
|
host,
|
|
54329
|
-
|
|
54329
|
+
path5,
|
|
54330
54330
|
packageRootPath,
|
|
54331
54331
|
packageName2,
|
|
54332
54332
|
packageJsonContent.exports,
|
|
@@ -54336,12 +54336,12 @@ ${lanes.join("\n")}
|
|
|
54336
54336
|
return { ...fromExports, verbatimFromExports: true };
|
|
54337
54337
|
}
|
|
54338
54338
|
if (packageJsonContent == null ? void 0 : packageJsonContent.exports) {
|
|
54339
|
-
return { moduleFileToTry:
|
|
54339
|
+
return { moduleFileToTry: path5, blockedByExports: true };
|
|
54340
54340
|
}
|
|
54341
54341
|
}
|
|
54342
54342
|
const versionPaths = (packageJsonContent == null ? void 0 : packageJsonContent.typesVersions) ? getPackageJsonTypesVersionsPaths(packageJsonContent.typesVersions) : void 0;
|
|
54343
54343
|
if (versionPaths) {
|
|
54344
|
-
const subModuleName =
|
|
54344
|
+
const subModuleName = path5.slice(packageRootPath.length + 1);
|
|
54345
54345
|
const fromPaths = tryGetModuleNameFromPaths(
|
|
54346
54346
|
subModuleName,
|
|
54347
54347
|
versionPaths.paths,
|
|
@@ -54376,7 +54376,7 @@ ${lanes.join("\n")}
|
|
|
54376
54376
|
return { moduleFileToTry };
|
|
54377
54377
|
}
|
|
54378
54378
|
}
|
|
54379
|
-
function tryGetAnyFileFromPath(host,
|
|
54379
|
+
function tryGetAnyFileFromPath(host, path5) {
|
|
54380
54380
|
if (!host.fileExists) return;
|
|
54381
54381
|
const extensions = flatten(getSupportedExtensions({ allowJs: true }, [{ extension: "node", isMixedContent: false }, {
|
|
54382
54382
|
extension: "json",
|
|
@@ -54385,15 +54385,15 @@ ${lanes.join("\n")}
|
|
|
54385
54385
|
/* JSON */
|
|
54386
54386
|
}]));
|
|
54387
54387
|
for (const e of extensions) {
|
|
54388
|
-
const fullPath =
|
|
54388
|
+
const fullPath = path5 + e;
|
|
54389
54389
|
if (host.fileExists(fullPath)) {
|
|
54390
54390
|
return fullPath;
|
|
54391
54391
|
}
|
|
54392
54392
|
}
|
|
54393
54393
|
}
|
|
54394
|
-
function getPathsRelativeToRootDirs(
|
|
54394
|
+
function getPathsRelativeToRootDirs(path5, rootDirs, getCanonicalFileName) {
|
|
54395
54395
|
return mapDefined(rootDirs, (rootDir) => {
|
|
54396
|
-
const relativePath = getRelativePathIfInSameVolume(
|
|
54396
|
+
const relativePath = getRelativePathIfInSameVolume(path5, rootDir, getCanonicalFileName);
|
|
54397
54397
|
return relativePath !== void 0 && isPathRelativeToParent(relativePath) ? void 0 : relativePath;
|
|
54398
54398
|
});
|
|
54399
54399
|
}
|
|
@@ -54510,10 +54510,10 @@ ${lanes.join("\n")}
|
|
|
54510
54510
|
return void 0;
|
|
54511
54511
|
}
|
|
54512
54512
|
}
|
|
54513
|
-
function getRelativePathIfInSameVolume(
|
|
54513
|
+
function getRelativePathIfInSameVolume(path5, directoryPath, getCanonicalFileName) {
|
|
54514
54514
|
const relativePath = getRelativePathToDirectoryOrUrl(
|
|
54515
54515
|
directoryPath,
|
|
54516
|
-
|
|
54516
|
+
path5,
|
|
54517
54517
|
directoryPath,
|
|
54518
54518
|
getCanonicalFileName,
|
|
54519
54519
|
/*isAbsolutePathAnUrl*/
|
|
@@ -54521,8 +54521,8 @@ ${lanes.join("\n")}
|
|
|
54521
54521
|
);
|
|
54522
54522
|
return isRootedDiskPath(relativePath) ? void 0 : relativePath;
|
|
54523
54523
|
}
|
|
54524
|
-
function isPathRelativeToParent(
|
|
54525
|
-
return startsWith(
|
|
54524
|
+
function isPathRelativeToParent(path5) {
|
|
54525
|
+
return startsWith(path5, "..");
|
|
54526
54526
|
}
|
|
54527
54527
|
function getDefaultResolutionModeForFile(file, host, compilerOptions) {
|
|
54528
54528
|
return isFullSourceFile(file) ? host.getDefaultResolutionModeForFile(file) : getDefaultResolutionModeForFileWorker(file, compilerOptions);
|
|
@@ -69556,10 +69556,10 @@ ${lanes.join("\n")}
|
|
|
69556
69556
|
const text = identifier.escapedText;
|
|
69557
69557
|
if (text) {
|
|
69558
69558
|
const parentSymbol = name.kind === 167 ? getUnresolvedSymbolForEntityName(name.left) : name.kind === 212 ? getUnresolvedSymbolForEntityName(name.expression) : void 0;
|
|
69559
|
-
const
|
|
69560
|
-
let result = unresolvedSymbols.get(
|
|
69559
|
+
const path5 = parentSymbol ? `${getSymbolPath(parentSymbol)}.${text}` : text;
|
|
69560
|
+
let result = unresolvedSymbols.get(path5);
|
|
69561
69561
|
if (!result) {
|
|
69562
|
-
unresolvedSymbols.set(
|
|
69562
|
+
unresolvedSymbols.set(path5, result = createSymbol(
|
|
69563
69563
|
524288,
|
|
69564
69564
|
text,
|
|
69565
69565
|
1048576
|
|
@@ -74360,24 +74360,24 @@ ${lanes.join("\n")}
|
|
|
74360
74360
|
}
|
|
74361
74361
|
return;
|
|
74362
74362
|
}
|
|
74363
|
-
let
|
|
74363
|
+
let path5 = "";
|
|
74364
74364
|
const secondaryRootErrors = [];
|
|
74365
74365
|
while (stack.length) {
|
|
74366
74366
|
const [msg, ...args] = stack.pop();
|
|
74367
74367
|
switch (msg.code) {
|
|
74368
74368
|
case Diagnostics.Types_of_property_0_are_incompatible.code: {
|
|
74369
|
-
if (
|
|
74370
|
-
|
|
74369
|
+
if (path5.indexOf("new ") === 0) {
|
|
74370
|
+
path5 = `(${path5})`;
|
|
74371
74371
|
}
|
|
74372
74372
|
const str = "" + args[0];
|
|
74373
|
-
if (
|
|
74374
|
-
|
|
74373
|
+
if (path5.length === 0) {
|
|
74374
|
+
path5 = `${str}`;
|
|
74375
74375
|
} else if (isIdentifierText(str, getEmitScriptTarget(compilerOptions))) {
|
|
74376
|
-
|
|
74376
|
+
path5 = `${path5}.${str}`;
|
|
74377
74377
|
} else if (str[0] === "[" && str[str.length - 1] === "]") {
|
|
74378
|
-
|
|
74378
|
+
path5 = `${path5}${str}`;
|
|
74379
74379
|
} else {
|
|
74380
|
-
|
|
74380
|
+
path5 = `${path5}[${str}]`;
|
|
74381
74381
|
}
|
|
74382
74382
|
break;
|
|
74383
74383
|
}
|
|
@@ -74385,7 +74385,7 @@ ${lanes.join("\n")}
|
|
|
74385
74385
|
case Diagnostics.Construct_signature_return_types_0_and_1_are_incompatible.code:
|
|
74386
74386
|
case Diagnostics.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code:
|
|
74387
74387
|
case Diagnostics.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code: {
|
|
74388
|
-
if (
|
|
74388
|
+
if (path5.length === 0) {
|
|
74389
74389
|
let mappedMsg = msg;
|
|
74390
74390
|
if (msg.code === Diagnostics.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code) {
|
|
74391
74391
|
mappedMsg = Diagnostics.Call_signature_return_types_0_and_1_are_incompatible;
|
|
@@ -74396,7 +74396,7 @@ ${lanes.join("\n")}
|
|
|
74396
74396
|
} else {
|
|
74397
74397
|
const prefix = msg.code === Diagnostics.Construct_signature_return_types_0_and_1_are_incompatible.code || msg.code === Diagnostics.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code ? "new " : "";
|
|
74398
74398
|
const params = msg.code === Diagnostics.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code || msg.code === Diagnostics.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code ? "" : "...";
|
|
74399
|
-
|
|
74399
|
+
path5 = `${prefix}${path5}(${params})`;
|
|
74400
74400
|
}
|
|
74401
74401
|
break;
|
|
74402
74402
|
}
|
|
@@ -74412,10 +74412,10 @@ ${lanes.join("\n")}
|
|
|
74412
74412
|
return Debug.fail(`Unhandled Diagnostic: ${msg.code}`);
|
|
74413
74413
|
}
|
|
74414
74414
|
}
|
|
74415
|
-
if (
|
|
74415
|
+
if (path5) {
|
|
74416
74416
|
reportError(
|
|
74417
|
-
|
|
74418
|
-
|
|
74417
|
+
path5[path5.length - 1] === ")" ? Diagnostics.The_types_returned_by_0_are_incompatible_between_these_types : Diagnostics.The_types_of_0_are_incompatible_between_these_types,
|
|
74418
|
+
path5
|
|
74419
74419
|
);
|
|
74420
74420
|
} else {
|
|
74421
74421
|
secondaryRootErrors.shift();
|
|
@@ -123699,7 +123699,7 @@ ${lanes.join("\n")}
|
|
|
123699
123699
|
}
|
|
123700
123700
|
}
|
|
123701
123701
|
function createImportCallExpressionAMD(arg, containsLexicalThis) {
|
|
123702
|
-
const
|
|
123702
|
+
const resolve4 = factory2.createUniqueName("resolve");
|
|
123703
123703
|
const reject = factory2.createUniqueName("reject");
|
|
123704
123704
|
const parameters = [
|
|
123705
123705
|
factory2.createParameterDeclaration(
|
|
@@ -123708,7 +123708,7 @@ ${lanes.join("\n")}
|
|
|
123708
123708
|
/*dotDotDotToken*/
|
|
123709
123709
|
void 0,
|
|
123710
123710
|
/*name*/
|
|
123711
|
-
|
|
123711
|
+
resolve4
|
|
123712
123712
|
),
|
|
123713
123713
|
factory2.createParameterDeclaration(
|
|
123714
123714
|
/*modifiers*/
|
|
@@ -123725,7 +123725,7 @@ ${lanes.join("\n")}
|
|
|
123725
123725
|
factory2.createIdentifier("require"),
|
|
123726
123726
|
/*typeArguments*/
|
|
123727
123727
|
void 0,
|
|
123728
|
-
[factory2.createArrayLiteralExpression([arg || factory2.createOmittedExpression()]),
|
|
123728
|
+
[factory2.createArrayLiteralExpression([arg || factory2.createOmittedExpression()]), resolve4, reject]
|
|
123729
123729
|
)
|
|
123730
123730
|
)
|
|
123731
123731
|
]);
|
|
@@ -129483,9 +129483,9 @@ ${lanes.join("\n")}
|
|
|
129483
129483
|
function createAddOutput() {
|
|
129484
129484
|
let outputs;
|
|
129485
129485
|
return { addOutput, getOutputs };
|
|
129486
|
-
function addOutput(
|
|
129487
|
-
if (
|
|
129488
|
-
(outputs || (outputs = [])).push(
|
|
129486
|
+
function addOutput(path5) {
|
|
129487
|
+
if (path5) {
|
|
129488
|
+
(outputs || (outputs = [])).push(path5);
|
|
129489
129489
|
}
|
|
129490
129490
|
}
|
|
129491
129491
|
function getOutputs() {
|
|
@@ -129644,7 +129644,7 @@ ${lanes.join("\n")}
|
|
|
129644
129644
|
emitSkipped = true;
|
|
129645
129645
|
return;
|
|
129646
129646
|
}
|
|
129647
|
-
const buildInfo = host.getBuildInfo() || { version };
|
|
129647
|
+
const buildInfo = host.getBuildInfo() || { version: version2 };
|
|
129648
129648
|
writeFile(
|
|
129649
129649
|
host,
|
|
129650
129650
|
emitterDiagnostics,
|
|
@@ -134711,7 +134711,7 @@ ${lanes.join("\n")}
|
|
|
134711
134711
|
return {
|
|
134712
134712
|
useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
|
|
134713
134713
|
fileExists,
|
|
134714
|
-
readFile: (
|
|
134714
|
+
readFile: (path5, encoding) => host.readFile(path5, encoding),
|
|
134715
134715
|
directoryExists: host.directoryExists && directoryExists,
|
|
134716
134716
|
getDirectories,
|
|
134717
134717
|
readDirectory,
|
|
@@ -134728,8 +134728,8 @@ ${lanes.join("\n")}
|
|
|
134728
134728
|
function getCachedFileSystemEntries(rootDirPath) {
|
|
134729
134729
|
return cachedReadDirectoryResult.get(ensureTrailingDirectorySeparator(rootDirPath));
|
|
134730
134730
|
}
|
|
134731
|
-
function getCachedFileSystemEntriesForBaseDir(
|
|
134732
|
-
const entries = getCachedFileSystemEntries(getDirectoryPath(
|
|
134731
|
+
function getCachedFileSystemEntriesForBaseDir(path5) {
|
|
134732
|
+
const entries = getCachedFileSystemEntries(getDirectoryPath(path5));
|
|
134733
134733
|
if (!entries) {
|
|
134734
134734
|
return entries;
|
|
134735
134735
|
}
|
|
@@ -134784,8 +134784,8 @@ ${lanes.join("\n")}
|
|
|
134784
134784
|
return index >= 0;
|
|
134785
134785
|
}
|
|
134786
134786
|
function writeFile2(fileName, data, writeByteOrderMark) {
|
|
134787
|
-
const
|
|
134788
|
-
const result = getCachedFileSystemEntriesForBaseDir(
|
|
134787
|
+
const path5 = toPath3(fileName);
|
|
134788
|
+
const result = getCachedFileSystemEntriesForBaseDir(path5);
|
|
134789
134789
|
if (result) {
|
|
134790
134790
|
updateFilesOfFileSystemEntry(
|
|
134791
134791
|
result,
|
|
@@ -134797,17 +134797,17 @@ ${lanes.join("\n")}
|
|
|
134797
134797
|
return host.writeFile(fileName, data, writeByteOrderMark);
|
|
134798
134798
|
}
|
|
134799
134799
|
function fileExists(fileName) {
|
|
134800
|
-
const
|
|
134801
|
-
const result = getCachedFileSystemEntriesForBaseDir(
|
|
134800
|
+
const path5 = toPath3(fileName);
|
|
134801
|
+
const result = getCachedFileSystemEntriesForBaseDir(path5);
|
|
134802
134802
|
return result && hasEntry(result.sortedAndCanonicalizedFiles, getCanonicalFileName(getBaseNameOfFileName(fileName))) || host.fileExists(fileName);
|
|
134803
134803
|
}
|
|
134804
134804
|
function directoryExists(dirPath) {
|
|
134805
|
-
const
|
|
134806
|
-
return cachedReadDirectoryResult.has(ensureTrailingDirectorySeparator(
|
|
134805
|
+
const path5 = toPath3(dirPath);
|
|
134806
|
+
return cachedReadDirectoryResult.has(ensureTrailingDirectorySeparator(path5)) || host.directoryExists(dirPath);
|
|
134807
134807
|
}
|
|
134808
134808
|
function createDirectory(dirPath) {
|
|
134809
|
-
const
|
|
134810
|
-
const result = getCachedFileSystemEntriesForBaseDir(
|
|
134809
|
+
const path5 = toPath3(dirPath);
|
|
134810
|
+
const result = getCachedFileSystemEntriesForBaseDir(path5);
|
|
134811
134811
|
if (result) {
|
|
134812
134812
|
const baseName = getBaseNameOfFileName(dirPath);
|
|
134813
134813
|
const canonicalizedBaseName = getCanonicalFileName(baseName);
|
|
@@ -134835,15 +134835,15 @@ ${lanes.join("\n")}
|
|
|
134835
134835
|
}
|
|
134836
134836
|
return host.readDirectory(rootDir, extensions, excludes, includes, depth);
|
|
134837
134837
|
function getFileSystemEntries(dir) {
|
|
134838
|
-
const
|
|
134839
|
-
if (
|
|
134840
|
-
return rootResult || getFileSystemEntriesFromHost(dir,
|
|
134838
|
+
const path5 = toPath3(dir);
|
|
134839
|
+
if (path5 === rootDirPath) {
|
|
134840
|
+
return rootResult || getFileSystemEntriesFromHost(dir, path5);
|
|
134841
134841
|
}
|
|
134842
|
-
const result = tryReadDirectory2(dir,
|
|
134843
|
-
return result !== void 0 ? result || getFileSystemEntriesFromHost(dir,
|
|
134842
|
+
const result = tryReadDirectory2(dir, path5);
|
|
134843
|
+
return result !== void 0 ? result || getFileSystemEntriesFromHost(dir, path5) : emptyFileSystemEntries;
|
|
134844
134844
|
}
|
|
134845
|
-
function getFileSystemEntriesFromHost(dir,
|
|
134846
|
-
if (rootSymLinkResult &&
|
|
134845
|
+
function getFileSystemEntriesFromHost(dir, path5) {
|
|
134846
|
+
if (rootSymLinkResult && path5 === rootDirPath) return rootSymLinkResult;
|
|
134847
134847
|
const result = {
|
|
134848
134848
|
files: map(host.readDirectory(
|
|
134849
134849
|
dir,
|
|
@@ -134856,7 +134856,7 @@ ${lanes.join("\n")}
|
|
|
134856
134856
|
), getBaseNameOfFileName) || emptyArray,
|
|
134857
134857
|
directories: host.getDirectories(dir) || emptyArray
|
|
134858
134858
|
};
|
|
134859
|
-
if (
|
|
134859
|
+
if (path5 === rootDirPath) rootSymLinkResult = result;
|
|
134860
134860
|
return result;
|
|
134861
134861
|
}
|
|
134862
134862
|
}
|
|
@@ -135315,15 +135315,15 @@ ${lanes.join("\n")}
|
|
|
135315
135315
|
return getDirectoryPath(normalizePath(system.getExecutingFilePath()));
|
|
135316
135316
|
}
|
|
135317
135317
|
const newLine = getNewLineCharacter(options);
|
|
135318
|
-
const realpath = system.realpath && ((
|
|
135318
|
+
const realpath = system.realpath && ((path5) => system.realpath(path5));
|
|
135319
135319
|
const compilerHost = {
|
|
135320
135320
|
getSourceFile: createGetSourceFile((fileName) => compilerHost.readFile(fileName), setParentNodes),
|
|
135321
135321
|
getDefaultLibLocation,
|
|
135322
135322
|
getDefaultLibFileName: (options2) => combinePaths(getDefaultLibLocation(), getDefaultLibFileName(options2)),
|
|
135323
135323
|
writeFile: createWriteFileMeasuringIO(
|
|
135324
|
-
(
|
|
135325
|
-
(
|
|
135326
|
-
(
|
|
135324
|
+
(path5, data, writeByteOrderMark) => system.writeFile(path5, data, writeByteOrderMark),
|
|
135325
|
+
(path5) => (compilerHost.createDirectory || system.createDirectory)(path5),
|
|
135326
|
+
(path5) => directoryExists(path5)
|
|
135327
135327
|
),
|
|
135328
135328
|
getCurrentDirectory: memoize(() => system.getCurrentDirectory()),
|
|
135329
135329
|
useCaseSensitiveFileNames: () => system.useCaseSensitiveFileNames,
|
|
@@ -135334,9 +135334,9 @@ ${lanes.join("\n")}
|
|
|
135334
135334
|
trace: (s) => system.write(s + newLine),
|
|
135335
135335
|
directoryExists: (directoryName) => system.directoryExists(directoryName),
|
|
135336
135336
|
getEnvironmentVariable: (name) => system.getEnvironmentVariable ? system.getEnvironmentVariable(name) : "",
|
|
135337
|
-
getDirectories: (
|
|
135337
|
+
getDirectories: (path5) => system.getDirectories(path5),
|
|
135338
135338
|
realpath,
|
|
135339
|
-
readDirectory: (
|
|
135339
|
+
readDirectory: (path5, extensions, include, exclude, depth) => system.readDirectory(path5, extensions, include, exclude, depth),
|
|
135340
135340
|
createDirectory: (d) => system.createDirectory(d),
|
|
135341
135341
|
createHash: maybeBind(system, system.createHash)
|
|
135342
135342
|
};
|
|
@@ -135775,13 +135775,13 @@ ${lanes.join("\n")}
|
|
|
135775
135775
|
}
|
|
135776
135776
|
function getLibraryNameFromLibFileName(libFileName) {
|
|
135777
135777
|
const components = libFileName.split(".");
|
|
135778
|
-
let
|
|
135778
|
+
let path5 = components[1];
|
|
135779
135779
|
let i = 2;
|
|
135780
135780
|
while (components[i] && components[i] !== "d") {
|
|
135781
|
-
|
|
135781
|
+
path5 += (i === 2 ? "/" : "-") + components[i];
|
|
135782
135782
|
i++;
|
|
135783
135783
|
}
|
|
135784
|
-
return "@typescript/lib-" +
|
|
135784
|
+
return "@typescript/lib-" + path5;
|
|
135785
135785
|
}
|
|
135786
135786
|
function isReferencedFile(reason) {
|
|
135787
135787
|
switch (reason == null ? void 0 : reason.kind) {
|
|
@@ -136857,18 +136857,18 @@ ${lanes.join("\n")}
|
|
|
136857
136857
|
filesByName.set(newSourceFile.path, newSourceFile);
|
|
136858
136858
|
}
|
|
136859
136859
|
const oldFilesByNameMap = oldProgram.getFilesByNameMap();
|
|
136860
|
-
oldFilesByNameMap.forEach((oldFile,
|
|
136860
|
+
oldFilesByNameMap.forEach((oldFile, path5) => {
|
|
136861
136861
|
if (!oldFile) {
|
|
136862
|
-
filesByName.set(
|
|
136862
|
+
filesByName.set(path5, oldFile);
|
|
136863
136863
|
return;
|
|
136864
136864
|
}
|
|
136865
|
-
if (oldFile.path ===
|
|
136865
|
+
if (oldFile.path === path5) {
|
|
136866
136866
|
if (oldProgram.isSourceFileFromExternalLibrary(oldFile)) {
|
|
136867
136867
|
sourceFilesFoundSearchingNodeModules.set(oldFile.path, true);
|
|
136868
136868
|
}
|
|
136869
136869
|
return;
|
|
136870
136870
|
}
|
|
136871
|
-
filesByName.set(
|
|
136871
|
+
filesByName.set(path5, filesByName.get(oldFile.path));
|
|
136872
136872
|
});
|
|
136873
136873
|
const isConfigIdentical = oldOptions.configFile && oldOptions.configFile === options.configFile || !oldOptions.configFile && !options.configFile && !optionsHaveChanges(oldOptions, options, optionDeclarations);
|
|
136874
136874
|
programDiagnostics.reuseStateFromOldProgram(oldProgram.getProgramDiagnosticsContainer(), isConfigIdentical);
|
|
@@ -136906,9 +136906,9 @@ ${lanes.join("\n")}
|
|
|
136906
136906
|
getModeForResolutionAtIndex: getModeForResolutionAtIndex2,
|
|
136907
136907
|
readFile: (f) => host.readFile(f),
|
|
136908
136908
|
fileExists: (f) => {
|
|
136909
|
-
const
|
|
136910
|
-
if (getSourceFileByPath(
|
|
136911
|
-
if (missingFileNames.has(
|
|
136909
|
+
const path5 = toPath3(f);
|
|
136910
|
+
if (getSourceFileByPath(path5)) return true;
|
|
136911
|
+
if (missingFileNames.has(path5)) return false;
|
|
136912
136912
|
return host.fileExists(f);
|
|
136913
136913
|
},
|
|
136914
136914
|
realpath: maybeBind(host, host.realpath),
|
|
@@ -137048,8 +137048,8 @@ ${lanes.join("\n")}
|
|
|
137048
137048
|
function getSourceFile(fileName) {
|
|
137049
137049
|
return getSourceFileByPath(toPath3(fileName));
|
|
137050
137050
|
}
|
|
137051
|
-
function getSourceFileByPath(
|
|
137052
|
-
return filesByName.get(
|
|
137051
|
+
function getSourceFileByPath(path5) {
|
|
137052
|
+
return filesByName.get(path5) || void 0;
|
|
137053
137053
|
}
|
|
137054
137054
|
function getDiagnosticsHelper(sourceFile, getDiagnostics2, cancellationToken) {
|
|
137055
137055
|
if (sourceFile) {
|
|
@@ -137692,16 +137692,16 @@ ${lanes.join("\n")}
|
|
|
137692
137692
|
addFilePreprocessingFileExplainingDiagnostic(existingFile, reason, Diagnostics.File_name_0_differs_from_already_included_file_name_1_only_in_casing, [fileName, existingFile.fileName]);
|
|
137693
137693
|
}
|
|
137694
137694
|
}
|
|
137695
|
-
function createRedirectedSourceFile(redirectTarget, unredirected, fileName,
|
|
137695
|
+
function createRedirectedSourceFile(redirectTarget, unredirected, fileName, path5, resolvedPath, originalFileName, sourceFileOptions) {
|
|
137696
137696
|
var _a2;
|
|
137697
137697
|
const redirect = parseNodeFactory.createRedirectedSourceFile({ redirectTarget, unredirected });
|
|
137698
137698
|
redirect.fileName = fileName;
|
|
137699
|
-
redirect.path =
|
|
137699
|
+
redirect.path = path5;
|
|
137700
137700
|
redirect.resolvedPath = resolvedPath;
|
|
137701
137701
|
redirect.originalFileName = originalFileName;
|
|
137702
137702
|
redirect.packageJsonLocations = ((_a2 = sourceFileOptions.packageJsonLocations) == null ? void 0 : _a2.length) ? sourceFileOptions.packageJsonLocations : void 0;
|
|
137703
137703
|
redirect.packageJsonScope = sourceFileOptions.packageJsonScope;
|
|
137704
|
-
sourceFilesFoundSearchingNodeModules.set(
|
|
137704
|
+
sourceFilesFoundSearchingNodeModules.set(path5, currentNodeModulesDepth > 0);
|
|
137705
137705
|
return redirect;
|
|
137706
137706
|
}
|
|
137707
137707
|
function findSourceFile(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId) {
|
|
@@ -137723,18 +137723,18 @@ ${lanes.join("\n")}
|
|
|
137723
137723
|
}
|
|
137724
137724
|
function findSourceFileWorker(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId) {
|
|
137725
137725
|
var _a2, _b2;
|
|
137726
|
-
const
|
|
137726
|
+
const path5 = toPath3(fileName);
|
|
137727
137727
|
if (useSourceOfProjectReferenceRedirect) {
|
|
137728
|
-
let source = getRedirectFromOutput(
|
|
137728
|
+
let source = getRedirectFromOutput(path5);
|
|
137729
137729
|
if (!source && host.realpath && options.preserveSymlinks && isDeclarationFileName(fileName) && fileName.includes(nodeModulesPathPart)) {
|
|
137730
137730
|
const realPath2 = toPath3(host.realpath(fileName));
|
|
137731
|
-
if (realPath2 !==
|
|
137731
|
+
if (realPath2 !== path5) source = getRedirectFromOutput(realPath2);
|
|
137732
137732
|
}
|
|
137733
137733
|
if (source == null ? void 0 : source.source) {
|
|
137734
137734
|
const file2 = findSourceFile(source.source, isDefaultLib, ignoreNoDefaultLib, reason, packageId);
|
|
137735
137735
|
if (file2) addFileToFilesByName(
|
|
137736
137736
|
file2,
|
|
137737
|
-
|
|
137737
|
+
path5,
|
|
137738
137738
|
fileName,
|
|
137739
137739
|
/*redirectedPath*/
|
|
137740
137740
|
void 0
|
|
@@ -137743,8 +137743,8 @@ ${lanes.join("\n")}
|
|
|
137743
137743
|
}
|
|
137744
137744
|
}
|
|
137745
137745
|
const originalFileName = fileName;
|
|
137746
|
-
if (filesByName.has(
|
|
137747
|
-
const file2 = filesByName.get(
|
|
137746
|
+
if (filesByName.has(path5)) {
|
|
137747
|
+
const file2 = filesByName.get(path5);
|
|
137748
137748
|
const addedReason = addFileIncludeReason(
|
|
137749
137749
|
file2 || void 0,
|
|
137750
137750
|
reason,
|
|
@@ -137810,28 +137810,28 @@ ${lanes.join("\n")}
|
|
|
137810
137810
|
const packageIdKey = packageIdToString(packageId);
|
|
137811
137811
|
const fileFromPackageId = packageIdToSourceFile.get(packageIdKey);
|
|
137812
137812
|
if (fileFromPackageId) {
|
|
137813
|
-
const dupFile = createRedirectedSourceFile(fileFromPackageId, file, fileName,
|
|
137813
|
+
const dupFile = createRedirectedSourceFile(fileFromPackageId, file, fileName, path5, toPath3(fileName), originalFileName, sourceFileOptions);
|
|
137814
137814
|
redirectTargetsMap.add(fileFromPackageId.path, fileName);
|
|
137815
|
-
addFileToFilesByName(dupFile,
|
|
137815
|
+
addFileToFilesByName(dupFile, path5, fileName, redirectedPath);
|
|
137816
137816
|
addFileIncludeReason(
|
|
137817
137817
|
dupFile,
|
|
137818
137818
|
reason,
|
|
137819
137819
|
/*checkExisting*/
|
|
137820
137820
|
false
|
|
137821
137821
|
);
|
|
137822
|
-
sourceFileToPackageName.set(
|
|
137822
|
+
sourceFileToPackageName.set(path5, packageIdToPackageName(packageId));
|
|
137823
137823
|
processingOtherFiles.push(dupFile);
|
|
137824
137824
|
return dupFile;
|
|
137825
137825
|
} else if (file) {
|
|
137826
137826
|
packageIdToSourceFile.set(packageIdKey, file);
|
|
137827
|
-
sourceFileToPackageName.set(
|
|
137827
|
+
sourceFileToPackageName.set(path5, packageIdToPackageName(packageId));
|
|
137828
137828
|
}
|
|
137829
137829
|
}
|
|
137830
|
-
addFileToFilesByName(file,
|
|
137830
|
+
addFileToFilesByName(file, path5, fileName, redirectedPath);
|
|
137831
137831
|
if (file) {
|
|
137832
|
-
sourceFilesFoundSearchingNodeModules.set(
|
|
137832
|
+
sourceFilesFoundSearchingNodeModules.set(path5, currentNodeModulesDepth > 0);
|
|
137833
137833
|
file.fileName = fileName;
|
|
137834
|
-
file.path =
|
|
137834
|
+
file.path = path5;
|
|
137835
137835
|
file.resolvedPath = toPath3(fileName);
|
|
137836
137836
|
file.originalFileName = originalFileName;
|
|
137837
137837
|
file.packageJsonLocations = ((_b2 = sourceFileOptions.packageJsonLocations) == null ? void 0 : _b2.length) ? sourceFileOptions.packageJsonLocations : void 0;
|
|
@@ -137843,7 +137843,7 @@ ${lanes.join("\n")}
|
|
|
137843
137843
|
false
|
|
137844
137844
|
);
|
|
137845
137845
|
if (host.useCaseSensitiveFileNames()) {
|
|
137846
|
-
const pathLowerCase = toFileNameLowerCase(
|
|
137846
|
+
const pathLowerCase = toFileNameLowerCase(path5);
|
|
137847
137847
|
const existingFile = filesByNameIgnoreCase.get(pathLowerCase);
|
|
137848
137848
|
if (existingFile) {
|
|
137849
137849
|
reportFileNamesDifferOnlyInCasingError(fileName, existingFile, reason);
|
|
@@ -137876,18 +137876,18 @@ ${lanes.join("\n")}
|
|
|
137876
137876
|
}
|
|
137877
137877
|
return false;
|
|
137878
137878
|
}
|
|
137879
|
-
function addFileToFilesByName(file,
|
|
137879
|
+
function addFileToFilesByName(file, path5, fileName, redirectedPath) {
|
|
137880
137880
|
if (redirectedPath) {
|
|
137881
137881
|
updateFilesByNameMap(fileName, redirectedPath, file);
|
|
137882
|
-
updateFilesByNameMap(fileName,
|
|
137882
|
+
updateFilesByNameMap(fileName, path5, file || false);
|
|
137883
137883
|
} else {
|
|
137884
|
-
updateFilesByNameMap(fileName,
|
|
137884
|
+
updateFilesByNameMap(fileName, path5, file);
|
|
137885
137885
|
}
|
|
137886
137886
|
}
|
|
137887
|
-
function updateFilesByNameMap(fileName,
|
|
137888
|
-
filesByName.set(
|
|
137889
|
-
if (file !== void 0) missingFileNames.delete(
|
|
137890
|
-
else missingFileNames.set(
|
|
137887
|
+
function updateFilesByNameMap(fileName, path5, file) {
|
|
137888
|
+
filesByName.set(path5, file);
|
|
137889
|
+
if (file !== void 0) missingFileNames.delete(path5);
|
|
137890
|
+
else missingFileNames.set(path5, fileName);
|
|
137891
137891
|
}
|
|
137892
137892
|
function getRedirectFromSourceFile(fileName) {
|
|
137893
137893
|
return mapSourceFileToResolvedRef == null ? void 0 : mapSourceFileToResolvedRef.get(toPath3(fileName));
|
|
@@ -137895,8 +137895,8 @@ ${lanes.join("\n")}
|
|
|
137895
137895
|
function forEachResolvedProjectReference2(cb) {
|
|
137896
137896
|
return forEachResolvedProjectReference(resolvedProjectReferences, cb);
|
|
137897
137897
|
}
|
|
137898
|
-
function getRedirectFromOutput(
|
|
137899
|
-
return mapOutputFileToResolvedRef == null ? void 0 : mapOutputFileToResolvedRef.get(
|
|
137898
|
+
function getRedirectFromOutput(path5) {
|
|
137899
|
+
return mapOutputFileToResolvedRef == null ? void 0 : mapOutputFileToResolvedRef.get(path5);
|
|
137900
137900
|
}
|
|
137901
137901
|
function isSourceOfProjectReferenceRedirect(fileName) {
|
|
137902
137902
|
return useSourceOfProjectReferenceRedirect && !!getRedirectFromSourceFile(fileName);
|
|
@@ -138196,7 +138196,7 @@ ${lanes.join("\n")}
|
|
|
138196
138196
|
const getCommonSourceDirectory3 = memoize(() => getCommonSourceDirectoryOfConfig(resolvedRef.commandLine, !host.useCaseSensitiveFileNames()));
|
|
138197
138197
|
commandLine.fileNames.forEach((fileName) => {
|
|
138198
138198
|
if (isDeclarationFileName(fileName)) return;
|
|
138199
|
-
const
|
|
138199
|
+
const path5 = toPath3(fileName);
|
|
138200
138200
|
let outputDts;
|
|
138201
138201
|
if (!fileExtensionIs(
|
|
138202
138202
|
fileName,
|
|
@@ -138210,7 +138210,7 @@ ${lanes.join("\n")}
|
|
|
138210
138210
|
outputDts = outDts;
|
|
138211
138211
|
}
|
|
138212
138212
|
}
|
|
138213
|
-
mapSourceFileToResolvedRef.set(
|
|
138213
|
+
mapSourceFileToResolvedRef.set(path5, { resolvedRef, outputDts });
|
|
138214
138214
|
});
|
|
138215
138215
|
}
|
|
138216
138216
|
if (commandLine.projectReferences) {
|
|
@@ -138898,9 +138898,9 @@ ${lanes.join("\n")}
|
|
|
138898
138898
|
host.compilerHost.fileExists = fileExists;
|
|
138899
138899
|
let directoryExists;
|
|
138900
138900
|
if (originalDirectoryExists) {
|
|
138901
|
-
directoryExists = host.compilerHost.directoryExists = (
|
|
138902
|
-
if (originalDirectoryExists.call(host.compilerHost,
|
|
138903
|
-
handleDirectoryCouldBeSymlink(
|
|
138901
|
+
directoryExists = host.compilerHost.directoryExists = (path5) => {
|
|
138902
|
+
if (originalDirectoryExists.call(host.compilerHost, path5)) {
|
|
138903
|
+
handleDirectoryCouldBeSymlink(path5);
|
|
138904
138904
|
return true;
|
|
138905
138905
|
}
|
|
138906
138906
|
if (!host.getResolvedProjectReferences()) return false;
|
|
@@ -138919,14 +138919,14 @@ ${lanes.join("\n")}
|
|
|
138919
138919
|
});
|
|
138920
138920
|
}
|
|
138921
138921
|
return fileOrDirectoryExistsUsingSource(
|
|
138922
|
-
|
|
138922
|
+
path5,
|
|
138923
138923
|
/*isFile*/
|
|
138924
138924
|
false
|
|
138925
138925
|
);
|
|
138926
138926
|
};
|
|
138927
138927
|
}
|
|
138928
138928
|
if (originalGetDirectories) {
|
|
138929
|
-
host.compilerHost.getDirectories = (
|
|
138929
|
+
host.compilerHost.getDirectories = (path5) => !host.getResolvedProjectReferences() || originalDirectoryExists && originalDirectoryExists.call(host.compilerHost, path5) ? originalGetDirectories.call(host.compilerHost, path5) : [];
|
|
138930
138930
|
}
|
|
138931
138931
|
if (originalRealpath) {
|
|
138932
138932
|
host.compilerHost.realpath = (s) => {
|
|
@@ -139564,7 +139564,7 @@ ${lanes.join("\n")}
|
|
|
139564
139564
|
const useOldState = canReuseOldState(referencedMap, oldState);
|
|
139565
139565
|
newProgram.getTypeChecker();
|
|
139566
139566
|
for (const sourceFile of newProgram.getSourceFiles()) {
|
|
139567
|
-
const
|
|
139567
|
+
const version22 = Debug.checkDefined(sourceFile.version, "Program intended to be used with Builder should have source files with versions set");
|
|
139568
139568
|
const oldUncommittedSignature = useOldState ? (_a = oldState.oldSignatures) == null ? void 0 : _a.get(sourceFile.resolvedPath) : void 0;
|
|
139569
139569
|
const signature = oldUncommittedSignature === void 0 ? useOldState ? (_b = oldState.fileInfos.get(sourceFile.resolvedPath)) == null ? void 0 : _b.signature : void 0 : oldUncommittedSignature || void 0;
|
|
139570
139570
|
if (referencedMap) {
|
|
@@ -139574,7 +139574,7 @@ ${lanes.join("\n")}
|
|
|
139574
139574
|
}
|
|
139575
139575
|
}
|
|
139576
139576
|
fileInfos.set(sourceFile.resolvedPath, {
|
|
139577
|
-
version:
|
|
139577
|
+
version: version22,
|
|
139578
139578
|
signature,
|
|
139579
139579
|
// No need to calculate affectsGlobalScope with --out since its not used at all
|
|
139580
139580
|
affectsGlobalScope: !options.outFile ? isFileAffectingGlobalScope(sourceFile) || void 0 : void 0,
|
|
@@ -139593,12 +139593,12 @@ ${lanes.join("\n")}
|
|
|
139593
139593
|
state.allFileNames = void 0;
|
|
139594
139594
|
}
|
|
139595
139595
|
BuilderState2.releaseCache = releaseCache2;
|
|
139596
|
-
function getFilesAffectedBy(state, programOfThisState,
|
|
139596
|
+
function getFilesAffectedBy(state, programOfThisState, path5, cancellationToken, host) {
|
|
139597
139597
|
var _a;
|
|
139598
139598
|
const result = getFilesAffectedByWithOldState(
|
|
139599
139599
|
state,
|
|
139600
139600
|
programOfThisState,
|
|
139601
|
-
|
|
139601
|
+
path5,
|
|
139602
139602
|
cancellationToken,
|
|
139603
139603
|
host
|
|
139604
139604
|
);
|
|
@@ -139606,8 +139606,8 @@ ${lanes.join("\n")}
|
|
|
139606
139606
|
return result;
|
|
139607
139607
|
}
|
|
139608
139608
|
BuilderState2.getFilesAffectedBy = getFilesAffectedBy;
|
|
139609
|
-
function getFilesAffectedByWithOldState(state, programOfThisState,
|
|
139610
|
-
const sourceFile = programOfThisState.getSourceFileByPath(
|
|
139609
|
+
function getFilesAffectedByWithOldState(state, programOfThisState, path5, cancellationToken, host) {
|
|
139610
|
+
const sourceFile = programOfThisState.getSourceFileByPath(path5);
|
|
139611
139611
|
if (!sourceFile) {
|
|
139612
139612
|
return emptyArray;
|
|
139613
139613
|
}
|
|
@@ -139617,9 +139617,9 @@ ${lanes.join("\n")}
|
|
|
139617
139617
|
return (state.referencedMap ? getFilesAffectedByUpdatedShapeWhenModuleEmit : getFilesAffectedByUpdatedShapeWhenNonModuleEmit)(state, programOfThisState, sourceFile, cancellationToken, host);
|
|
139618
139618
|
}
|
|
139619
139619
|
BuilderState2.getFilesAffectedByWithOldState = getFilesAffectedByWithOldState;
|
|
139620
|
-
function updateSignatureOfFile(state, signature,
|
|
139621
|
-
state.fileInfos.get(
|
|
139622
|
-
(state.hasCalledUpdateShapeSignature || (state.hasCalledUpdateShapeSignature = /* @__PURE__ */ new Set())).add(
|
|
139620
|
+
function updateSignatureOfFile(state, signature, path5) {
|
|
139621
|
+
state.fileInfos.get(path5).signature = signature;
|
|
139622
|
+
(state.hasCalledUpdateShapeSignature || (state.hasCalledUpdateShapeSignature = /* @__PURE__ */ new Set())).add(path5);
|
|
139623
139623
|
}
|
|
139624
139624
|
BuilderState2.updateSignatureOfFile = updateSignatureOfFile;
|
|
139625
139625
|
function computeDtsSignature(programOfThisState, sourceFile, cancellationToken, host, onNewSignature) {
|
|
@@ -139688,10 +139688,10 @@ ${lanes.join("\n")}
|
|
|
139688
139688
|
const seenMap = /* @__PURE__ */ new Set();
|
|
139689
139689
|
const queue = [sourceFile.resolvedPath];
|
|
139690
139690
|
while (queue.length) {
|
|
139691
|
-
const
|
|
139692
|
-
if (!seenMap.has(
|
|
139693
|
-
seenMap.add(
|
|
139694
|
-
const references = state.referencedMap.getValues(
|
|
139691
|
+
const path5 = queue.pop();
|
|
139692
|
+
if (!seenMap.has(path5)) {
|
|
139693
|
+
seenMap.add(path5);
|
|
139694
|
+
const references = state.referencedMap.getValues(path5);
|
|
139695
139695
|
if (references) {
|
|
139696
139696
|
for (const key of references.keys()) {
|
|
139697
139697
|
queue.push(key);
|
|
@@ -139699,9 +139699,9 @@ ${lanes.join("\n")}
|
|
|
139699
139699
|
}
|
|
139700
139700
|
}
|
|
139701
139701
|
}
|
|
139702
|
-
return arrayFrom(mapDefinedIterator(seenMap.keys(), (
|
|
139702
|
+
return arrayFrom(mapDefinedIterator(seenMap.keys(), (path5) => {
|
|
139703
139703
|
var _a;
|
|
139704
|
-
return ((_a = programOfThisState.getSourceFileByPath(
|
|
139704
|
+
return ((_a = programOfThisState.getSourceFileByPath(path5)) == null ? void 0 : _a.fileName) ?? path5;
|
|
139705
139705
|
}));
|
|
139706
139706
|
}
|
|
139707
139707
|
BuilderState2.getAllDependencies = getAllDependencies;
|
|
@@ -139880,7 +139880,7 @@ ${lanes.join("\n")}
|
|
|
139880
139880
|
oldInfo.version !== info.version || // Implied formats dont match
|
|
139881
139881
|
oldInfo.impliedFormat !== info.impliedFormat || // Referenced files changed
|
|
139882
139882
|
!hasSameKeys(newReferences = referencedMap && referencedMap.getValues(sourceFilePath), oldReferencedMap && oldReferencedMap.getValues(sourceFilePath)) || // Referenced file was deleted in the new program
|
|
139883
|
-
newReferences && forEachKey(newReferences, (
|
|
139883
|
+
newReferences && forEachKey(newReferences, (path5) => !state.fileInfos.has(path5) && oldState.fileInfos.has(path5))) {
|
|
139884
139884
|
addFileToChangeSet(sourceFilePath);
|
|
139885
139885
|
} else {
|
|
139886
139886
|
const sourceFile = newProgram.getSourceFileByPath(sourceFilePath);
|
|
@@ -139946,8 +139946,8 @@ ${lanes.join("\n")}
|
|
|
139946
139946
|
}
|
|
139947
139947
|
if (useOldState && state.semanticDiagnosticsPerFile.size !== state.fileInfos.size && oldState.checkPending !== state.checkPending) state.buildInfoEmitPending = true;
|
|
139948
139948
|
return state;
|
|
139949
|
-
function addFileToChangeSet(
|
|
139950
|
-
state.changedFilesSet.add(
|
|
139949
|
+
function addFileToChangeSet(path5) {
|
|
139950
|
+
state.changedFilesSet.add(path5);
|
|
139951
139951
|
if (outFilePath) {
|
|
139952
139952
|
canCopySemanticDiagnostics = false;
|
|
139953
139953
|
canCopyEmitDiagnostics = false;
|
|
@@ -140011,9 +140011,9 @@ ${lanes.join("\n")}
|
|
|
140011
140011
|
result.relatedInformation = relatedInformation ? relatedInformation.length ? relatedInformation.map((r) => convertToDiagnosticRelatedInformation(r, diagnosticFilePath, newProgram, toPathInBuildInfoDirectory)) : [] : void 0;
|
|
140012
140012
|
return result;
|
|
140013
140013
|
});
|
|
140014
|
-
function toPathInBuildInfoDirectory(
|
|
140014
|
+
function toPathInBuildInfoDirectory(path5) {
|
|
140015
140015
|
buildInfoDirectory ?? (buildInfoDirectory = getDirectoryPath(getNormalizedAbsolutePath(getTsBuildInfoEmitOutputFilePath(newProgram.getCompilerOptions()), newProgram.getCurrentDirectory())));
|
|
140016
|
-
return toPath(
|
|
140016
|
+
return toPath(path5, buildInfoDirectory, newProgram.getCanonicalFileName);
|
|
140017
140017
|
}
|
|
140018
140018
|
}
|
|
140019
140019
|
function convertToDiagnosticRelatedInformation(diagnostic, diagnosticFilePath, newProgram, toPath3) {
|
|
@@ -140088,10 +140088,10 @@ ${lanes.join("\n")}
|
|
|
140088
140088
|
state.affectedFilesPendingEmit = void 0;
|
|
140089
140089
|
state.programEmitPending = void 0;
|
|
140090
140090
|
}
|
|
140091
|
-
(_b = state.affectedFilesPendingEmit) == null ? void 0 : _b.forEach((emitKind,
|
|
140091
|
+
(_b = state.affectedFilesPendingEmit) == null ? void 0 : _b.forEach((emitKind, path5) => {
|
|
140092
140092
|
const pending = !isForDtsErrors ? emitKind & 7 : emitKind & (7 | 48);
|
|
140093
|
-
if (!pending) state.affectedFilesPendingEmit.delete(
|
|
140094
|
-
else state.affectedFilesPendingEmit.set(
|
|
140093
|
+
if (!pending) state.affectedFilesPendingEmit.delete(path5);
|
|
140094
|
+
else state.affectedFilesPendingEmit.set(path5, pending);
|
|
140095
140095
|
});
|
|
140096
140096
|
if (state.programEmitPending) {
|
|
140097
140097
|
const pending = !isForDtsErrors ? state.programEmitPending & 7 : state.programEmitPending & (7 | 48);
|
|
@@ -140111,11 +140111,11 @@ ${lanes.join("\n")}
|
|
|
140111
140111
|
function getNextAffectedFilePendingEmit(state, emitOnlyDtsFiles, isForDtsErrors) {
|
|
140112
140112
|
var _a;
|
|
140113
140113
|
if (!((_a = state.affectedFilesPendingEmit) == null ? void 0 : _a.size)) return void 0;
|
|
140114
|
-
return forEachEntry(state.affectedFilesPendingEmit, (emitKind,
|
|
140114
|
+
return forEachEntry(state.affectedFilesPendingEmit, (emitKind, path5) => {
|
|
140115
140115
|
var _a2;
|
|
140116
|
-
const affectedFile = state.program.getSourceFileByPath(
|
|
140116
|
+
const affectedFile = state.program.getSourceFileByPath(path5);
|
|
140117
140117
|
if (!affectedFile || !sourceFileMayBeEmitted(affectedFile, state.program)) {
|
|
140118
|
-
state.affectedFilesPendingEmit.delete(
|
|
140118
|
+
state.affectedFilesPendingEmit.delete(path5);
|
|
140119
140119
|
return void 0;
|
|
140120
140120
|
}
|
|
140121
140121
|
const seenKind = (_a2 = state.seenEmittedFiles) == null ? void 0 : _a2.get(affectedFile.resolvedPath);
|
|
@@ -140131,11 +140131,11 @@ ${lanes.join("\n")}
|
|
|
140131
140131
|
function getNextPendingEmitDiagnosticsFile(state, isForDtsErrors) {
|
|
140132
140132
|
var _a;
|
|
140133
140133
|
if (!((_a = state.emitDiagnosticsPerFile) == null ? void 0 : _a.size)) return void 0;
|
|
140134
|
-
return forEachEntry(state.emitDiagnosticsPerFile, (diagnostics,
|
|
140134
|
+
return forEachEntry(state.emitDiagnosticsPerFile, (diagnostics, path5) => {
|
|
140135
140135
|
var _a2;
|
|
140136
|
-
const affectedFile = state.program.getSourceFileByPath(
|
|
140136
|
+
const affectedFile = state.program.getSourceFileByPath(path5);
|
|
140137
140137
|
if (!affectedFile || !sourceFileMayBeEmitted(affectedFile, state.program)) {
|
|
140138
|
-
state.emitDiagnosticsPerFile.delete(
|
|
140138
|
+
state.emitDiagnosticsPerFile.delete(path5);
|
|
140139
140139
|
return void 0;
|
|
140140
140140
|
}
|
|
140141
140141
|
const seenKind = ((_a2 = state.seenEmittedFiles) == null ? void 0 : _a2.get(affectedFile.resolvedPath)) || 0;
|
|
@@ -140170,10 +140170,10 @@ ${lanes.join("\n")}
|
|
|
140170
140170
|
host
|
|
140171
140171
|
);
|
|
140172
140172
|
}
|
|
140173
|
-
function handleDtsMayChangeOf(state,
|
|
140174
|
-
removeSemanticDiagnosticsOf(state,
|
|
140175
|
-
if (!state.changedFilesSet.has(
|
|
140176
|
-
const sourceFile = state.program.getSourceFileByPath(
|
|
140173
|
+
function handleDtsMayChangeOf(state, path5, invalidateJsFiles, cancellationToken, host) {
|
|
140174
|
+
removeSemanticDiagnosticsOf(state, path5);
|
|
140175
|
+
if (!state.changedFilesSet.has(path5)) {
|
|
140176
|
+
const sourceFile = state.program.getSourceFileByPath(path5);
|
|
140177
140177
|
if (sourceFile) {
|
|
140178
140178
|
BuilderState.updateShapeSignature(
|
|
140179
140179
|
state,
|
|
@@ -140187,13 +140187,13 @@ ${lanes.join("\n")}
|
|
|
140187
140187
|
if (invalidateJsFiles) {
|
|
140188
140188
|
addToAffectedFilesPendingEmit(
|
|
140189
140189
|
state,
|
|
140190
|
-
|
|
140190
|
+
path5,
|
|
140191
140191
|
getBuilderFileEmit(state.compilerOptions)
|
|
140192
140192
|
);
|
|
140193
140193
|
} else if (getEmitDeclarations(state.compilerOptions)) {
|
|
140194
140194
|
addToAffectedFilesPendingEmit(
|
|
140195
140195
|
state,
|
|
140196
|
-
|
|
140196
|
+
path5,
|
|
140197
140197
|
state.compilerOptions.declarationMap ? 56 : 24
|
|
140198
140198
|
/* Dts */
|
|
140199
140199
|
);
|
|
@@ -140201,17 +140201,17 @@ ${lanes.join("\n")}
|
|
|
140201
140201
|
}
|
|
140202
140202
|
}
|
|
140203
140203
|
}
|
|
140204
|
-
function removeSemanticDiagnosticsOf(state,
|
|
140204
|
+
function removeSemanticDiagnosticsOf(state, path5) {
|
|
140205
140205
|
if (!state.semanticDiagnosticsFromOldState) {
|
|
140206
140206
|
return true;
|
|
140207
140207
|
}
|
|
140208
|
-
state.semanticDiagnosticsFromOldState.delete(
|
|
140209
|
-
state.semanticDiagnosticsPerFile.delete(
|
|
140208
|
+
state.semanticDiagnosticsFromOldState.delete(path5);
|
|
140209
|
+
state.semanticDiagnosticsPerFile.delete(path5);
|
|
140210
140210
|
return !state.semanticDiagnosticsFromOldState.size;
|
|
140211
140211
|
}
|
|
140212
|
-
function isChangedSignature(state,
|
|
140213
|
-
const oldSignature = Debug.checkDefined(state.oldSignatures).get(
|
|
140214
|
-
const newSignature = Debug.checkDefined(state.fileInfos.get(
|
|
140212
|
+
function isChangedSignature(state, path5) {
|
|
140213
|
+
const oldSignature = Debug.checkDefined(state.oldSignatures).get(path5) || void 0;
|
|
140214
|
+
const newSignature = Debug.checkDefined(state.fileInfos.get(path5)).signature;
|
|
140215
140215
|
return newSignature !== oldSignature;
|
|
140216
140216
|
}
|
|
140217
140217
|
function handleDtsMayChangeOfGlobalScope(state, filePath, invalidateJsFiles, cancellationToken, host) {
|
|
@@ -140318,13 +140318,13 @@ ${lanes.join("\n")}
|
|
|
140318
140318
|
}
|
|
140319
140319
|
function getBinderAndCheckerDiagnosticsOfFile(state, sourceFile, cancellationToken, semanticDiagnosticsPerFile) {
|
|
140320
140320
|
semanticDiagnosticsPerFile ?? (semanticDiagnosticsPerFile = state.semanticDiagnosticsPerFile);
|
|
140321
|
-
const
|
|
140322
|
-
const cachedDiagnostics = semanticDiagnosticsPerFile.get(
|
|
140321
|
+
const path5 = sourceFile.resolvedPath;
|
|
140322
|
+
const cachedDiagnostics = semanticDiagnosticsPerFile.get(path5);
|
|
140323
140323
|
if (cachedDiagnostics) {
|
|
140324
140324
|
return filterSemanticDiagnostics(cachedDiagnostics, state.compilerOptions);
|
|
140325
140325
|
}
|
|
140326
140326
|
const diagnostics = state.program.getBindAndCheckDiagnostics(sourceFile, cancellationToken);
|
|
140327
|
-
semanticDiagnosticsPerFile.set(
|
|
140327
|
+
semanticDiagnosticsPerFile.set(path5, diagnostics);
|
|
140328
140328
|
state.buildInfoEmitPending = true;
|
|
140329
140329
|
return filterSemanticDiagnostics(diagnostics, state.compilerOptions);
|
|
140330
140330
|
}
|
|
@@ -140378,7 +140378,7 @@ ${lanes.join("\n")}
|
|
|
140378
140378
|
root: arrayFrom(rootFileNames, (r) => relativeToBuildInfo(r)),
|
|
140379
140379
|
errors: state.hasErrors ? true : void 0,
|
|
140380
140380
|
checkPending: state.checkPending,
|
|
140381
|
-
version
|
|
140381
|
+
version: version2
|
|
140382
140382
|
};
|
|
140383
140383
|
return buildInfo2;
|
|
140384
140384
|
}
|
|
@@ -140410,7 +140410,7 @@ ${lanes.join("\n")}
|
|
|
140410
140410
|
// Actual value
|
|
140411
140411
|
errors: state.hasErrors ? true : void 0,
|
|
140412
140412
|
checkPending: state.checkPending,
|
|
140413
|
-
version
|
|
140413
|
+
version: version2
|
|
140414
140414
|
};
|
|
140415
140415
|
return buildInfo2;
|
|
140416
140416
|
}
|
|
@@ -140472,11 +140472,11 @@ ${lanes.join("\n")}
|
|
|
140472
140472
|
if ((_b = state.affectedFilesPendingEmit) == null ? void 0 : _b.size) {
|
|
140473
140473
|
const fullEmitForOptions = getBuilderFileEmit(state.compilerOptions);
|
|
140474
140474
|
const seenFiles = /* @__PURE__ */ new Set();
|
|
140475
|
-
for (const
|
|
140476
|
-
if (tryAddToSet(seenFiles,
|
|
140477
|
-
const file = state.program.getSourceFileByPath(
|
|
140475
|
+
for (const path5 of arrayFrom(state.affectedFilesPendingEmit.keys()).sort(compareStringsCaseSensitive)) {
|
|
140476
|
+
if (tryAddToSet(seenFiles, path5)) {
|
|
140477
|
+
const file = state.program.getSourceFileByPath(path5);
|
|
140478
140478
|
if (!file || !sourceFileMayBeEmitted(file, state.program)) continue;
|
|
140479
|
-
const fileId = toFileId(
|
|
140479
|
+
const fileId = toFileId(path5), pendingEmit = state.affectedFilesPendingEmit.get(path5);
|
|
140480
140480
|
affectedFilesPendingEmit = append(
|
|
140481
140481
|
affectedFilesPendingEmit,
|
|
140482
140482
|
pendingEmit === fullEmitForOptions ? fileId : (
|
|
@@ -140507,20 +140507,20 @@ ${lanes.join("\n")}
|
|
|
140507
140507
|
latestChangedDtsFile,
|
|
140508
140508
|
errors: state.hasErrors ? true : void 0,
|
|
140509
140509
|
checkPending: state.checkPending,
|
|
140510
|
-
version
|
|
140510
|
+
version: version2
|
|
140511
140511
|
};
|
|
140512
140512
|
return buildInfo;
|
|
140513
|
-
function relativeToBuildInfoEnsuringAbsolutePath(
|
|
140514
|
-
return relativeToBuildInfo(getNormalizedAbsolutePath(
|
|
140513
|
+
function relativeToBuildInfoEnsuringAbsolutePath(path5) {
|
|
140514
|
+
return relativeToBuildInfo(getNormalizedAbsolutePath(path5, currentDirectory));
|
|
140515
140515
|
}
|
|
140516
|
-
function relativeToBuildInfo(
|
|
140517
|
-
return ensurePathIsNonModuleName(getRelativePathFromDirectory(buildInfoDirectory,
|
|
140516
|
+
function relativeToBuildInfo(path5) {
|
|
140517
|
+
return ensurePathIsNonModuleName(getRelativePathFromDirectory(buildInfoDirectory, path5, state.program.getCanonicalFileName));
|
|
140518
140518
|
}
|
|
140519
|
-
function toFileId(
|
|
140520
|
-
let fileId = fileNameToFileId.get(
|
|
140519
|
+
function toFileId(path5) {
|
|
140520
|
+
let fileId = fileNameToFileId.get(path5);
|
|
140521
140521
|
if (fileId === void 0) {
|
|
140522
|
-
fileNames.push(relativeToBuildInfo(
|
|
140523
|
-
fileNameToFileId.set(
|
|
140522
|
+
fileNames.push(relativeToBuildInfo(path5));
|
|
140523
|
+
fileNameToFileId.set(path5, fileId = fileNames.length);
|
|
140524
140524
|
}
|
|
140525
140525
|
return fileId;
|
|
140526
140526
|
}
|
|
@@ -140534,8 +140534,8 @@ ${lanes.join("\n")}
|
|
|
140534
140534
|
}
|
|
140535
140535
|
return fileIdListId;
|
|
140536
140536
|
}
|
|
140537
|
-
function tryAddRoot(
|
|
140538
|
-
const file = state.program.getSourceFile(
|
|
140537
|
+
function tryAddRoot(path5, fileId) {
|
|
140538
|
+
const file = state.program.getSourceFile(path5);
|
|
140539
140539
|
if (!state.program.getFileIncludeReasons().get(file.path).some(
|
|
140540
140540
|
(r) => r.kind === 0
|
|
140541
140541
|
/* RootFile */
|
|
@@ -140552,10 +140552,10 @@ ${lanes.join("\n")}
|
|
|
140552
140552
|
}
|
|
140553
140553
|
function toResolvedRoot() {
|
|
140554
140554
|
let result;
|
|
140555
|
-
rootFileNames.forEach((
|
|
140556
|
-
const file = state.program.getSourceFileByPath(
|
|
140557
|
-
if (file &&
|
|
140558
|
-
result = append(result, [toFileId(file.resolvedPath), toFileId(
|
|
140555
|
+
rootFileNames.forEach((path5) => {
|
|
140556
|
+
const file = state.program.getSourceFileByPath(path5);
|
|
140557
|
+
if (file && path5 !== file.resolvedPath) {
|
|
140558
|
+
result = append(result, [toFileId(file.resolvedPath), toFileId(path5)]);
|
|
140559
140559
|
}
|
|
140560
140560
|
});
|
|
140561
140561
|
return result;
|
|
@@ -140663,8 +140663,8 @@ ${lanes.join("\n")}
|
|
|
140663
140663
|
function toChangeFileSet() {
|
|
140664
140664
|
let changeFileSet;
|
|
140665
140665
|
if (state.changedFilesSet.size) {
|
|
140666
|
-
for (const
|
|
140667
|
-
changeFileSet = append(changeFileSet, toFileId(
|
|
140666
|
+
for (const path5 of arrayFrom(state.changedFilesSet.keys()).sort(compareStringsCaseSensitive)) {
|
|
140667
|
+
changeFileSet = append(changeFileSet, toFileId(path5));
|
|
140668
140668
|
}
|
|
140669
140669
|
}
|
|
140670
140670
|
return changeFileSet;
|
|
@@ -141163,8 +141163,8 @@ ${lanes.join("\n")}
|
|
|
141163
141163
|
const changedFilesSet = new Set(map(buildInfo.changeFileSet, toFilePath));
|
|
141164
141164
|
if (isIncrementalBundleEmitBuildInfo(buildInfo)) {
|
|
141165
141165
|
buildInfo.fileInfos.forEach((fileInfo, index) => {
|
|
141166
|
-
const
|
|
141167
|
-
fileInfos.set(
|
|
141166
|
+
const path5 = toFilePath(index + 1);
|
|
141167
|
+
fileInfos.set(path5, isString(fileInfo) ? { version: fileInfo, signature: void 0, affectsGlobalScope: void 0, impliedFormat: void 0 } : fileInfo);
|
|
141168
141168
|
});
|
|
141169
141169
|
state = {
|
|
141170
141170
|
fileInfos,
|
|
@@ -141183,10 +141183,10 @@ ${lanes.join("\n")}
|
|
|
141183
141183
|
filePathsSetList = (_b = buildInfo.fileIdsList) == null ? void 0 : _b.map((fileIds) => new Set(fileIds.map(toFilePath)));
|
|
141184
141184
|
const emitSignatures = ((_c = buildInfo.options) == null ? void 0 : _c.composite) && !buildInfo.options.outFile ? /* @__PURE__ */ new Map() : void 0;
|
|
141185
141185
|
buildInfo.fileInfos.forEach((fileInfo, index) => {
|
|
141186
|
-
const
|
|
141186
|
+
const path5 = toFilePath(index + 1);
|
|
141187
141187
|
const stateFileInfo = toBuilderStateFileInfoForMultiEmit(fileInfo);
|
|
141188
|
-
fileInfos.set(
|
|
141189
|
-
if (emitSignatures && stateFileInfo.signature) emitSignatures.set(
|
|
141188
|
+
fileInfos.set(path5, stateFileInfo);
|
|
141189
|
+
if (emitSignatures && stateFileInfo.signature) emitSignatures.set(path5, stateFileInfo.signature);
|
|
141190
141190
|
});
|
|
141191
141191
|
(_d = buildInfo.emitSignatures) == null ? void 0 : _d.forEach((value) => {
|
|
141192
141192
|
if (isNumber(value)) emitSignatures.delete(toFilePath(value));
|
|
@@ -141240,11 +141240,11 @@ ${lanes.join("\n")}
|
|
|
141240
141240
|
close: noop,
|
|
141241
141241
|
hasChangedEmitSignature: returnFalse
|
|
141242
141242
|
};
|
|
141243
|
-
function toPathInBuildInfoDirectory(
|
|
141244
|
-
return toPath(
|
|
141243
|
+
function toPathInBuildInfoDirectory(path5) {
|
|
141244
|
+
return toPath(path5, buildInfoDirectory, getCanonicalFileName);
|
|
141245
141245
|
}
|
|
141246
|
-
function toAbsolutePath(
|
|
141247
|
-
return getNormalizedAbsolutePath(
|
|
141246
|
+
function toAbsolutePath(path5) {
|
|
141247
|
+
return getNormalizedAbsolutePath(path5, buildInfoDirectory);
|
|
141248
141248
|
}
|
|
141249
141249
|
function toFilePath(fileId) {
|
|
141250
141250
|
return filePaths[fileId - 1];
|
|
@@ -141283,30 +141283,30 @@ ${lanes.join("\n")}
|
|
|
141283
141283
|
const roots = /* @__PURE__ */ new Map();
|
|
141284
141284
|
const resolvedRoots = new Map(program2.resolvedRoot);
|
|
141285
141285
|
program2.fileInfos.forEach((fileInfo, index) => {
|
|
141286
|
-
const
|
|
141287
|
-
const
|
|
141288
|
-
fileInfos.set(
|
|
141286
|
+
const path5 = toPath(program2.fileNames[index], buildInfoDirectory, getCanonicalFileName);
|
|
141287
|
+
const version22 = isString(fileInfo) ? fileInfo : fileInfo.version;
|
|
141288
|
+
fileInfos.set(path5, version22);
|
|
141289
141289
|
if (rootIndex < program2.root.length) {
|
|
141290
141290
|
const current = program2.root[rootIndex];
|
|
141291
141291
|
const fileId = index + 1;
|
|
141292
141292
|
if (isArray(current)) {
|
|
141293
141293
|
if (current[0] <= fileId && fileId <= current[1]) {
|
|
141294
|
-
addRoot(fileId,
|
|
141294
|
+
addRoot(fileId, path5);
|
|
141295
141295
|
if (current[1] === fileId) rootIndex++;
|
|
141296
141296
|
}
|
|
141297
141297
|
} else if (current === fileId) {
|
|
141298
|
-
addRoot(fileId,
|
|
141298
|
+
addRoot(fileId, path5);
|
|
141299
141299
|
rootIndex++;
|
|
141300
141300
|
}
|
|
141301
141301
|
}
|
|
141302
141302
|
});
|
|
141303
141303
|
return { fileInfos, roots };
|
|
141304
|
-
function addRoot(fileId,
|
|
141304
|
+
function addRoot(fileId, path5) {
|
|
141305
141305
|
const root = resolvedRoots.get(fileId);
|
|
141306
141306
|
if (root) {
|
|
141307
|
-
roots.set(toPath(program2.fileNames[root - 1], buildInfoDirectory, getCanonicalFileName),
|
|
141307
|
+
roots.set(toPath(program2.fileNames[root - 1], buildInfoDirectory, getCanonicalFileName), path5);
|
|
141308
141308
|
} else {
|
|
141309
|
-
roots.set(
|
|
141309
|
+
roots.set(path5, void 0);
|
|
141310
141310
|
}
|
|
141311
141311
|
}
|
|
141312
141312
|
}
|
|
@@ -141381,11 +141381,11 @@ ${lanes.join("\n")}
|
|
|
141381
141381
|
newConfigFileParsingDiagnostics
|
|
141382
141382
|
);
|
|
141383
141383
|
}
|
|
141384
|
-
function removeIgnoredPath(
|
|
141385
|
-
if (endsWith(
|
|
141386
|
-
return removeSuffix(
|
|
141384
|
+
function removeIgnoredPath(path5) {
|
|
141385
|
+
if (endsWith(path5, "/node_modules/.staging")) {
|
|
141386
|
+
return removeSuffix(path5, "/.staging");
|
|
141387
141387
|
}
|
|
141388
|
-
return some(ignoredPaths, (searchPath) =>
|
|
141388
|
+
return some(ignoredPaths, (searchPath) => path5.includes(searchPath)) ? void 0 : path5;
|
|
141389
141389
|
}
|
|
141390
141390
|
function perceivedOsRootLengthForWatching(pathComponents2, length2) {
|
|
141391
141391
|
if (length2 <= 1) return 1;
|
|
@@ -141411,8 +141411,8 @@ ${lanes.join("\n")}
|
|
|
141411
141411
|
const perceivedOsRootLength = perceivedOsRootLengthForWatching(pathComponents2, length2);
|
|
141412
141412
|
return length2 > perceivedOsRootLength + 1;
|
|
141413
141413
|
}
|
|
141414
|
-
function canWatchDirectoryOrFilePath(
|
|
141415
|
-
return canWatchDirectoryOrFile(getPathComponents(
|
|
141414
|
+
function canWatchDirectoryOrFilePath(path5) {
|
|
141415
|
+
return canWatchDirectoryOrFile(getPathComponents(path5));
|
|
141416
141416
|
}
|
|
141417
141417
|
function canWatchAtTypes(atTypes) {
|
|
141418
141418
|
return canWatchAffectedPackageJsonOrNodeModulesOfAtTypes(getDirectoryPath(atTypes));
|
|
@@ -141706,11 +141706,11 @@ ${lanes.join("\n")}
|
|
|
141706
141706
|
filesWithChangedSetOfUnresolvedImports = void 0;
|
|
141707
141707
|
return collected;
|
|
141708
141708
|
}
|
|
141709
|
-
function isFileWithInvalidatedNonRelativeUnresolvedImports(
|
|
141709
|
+
function isFileWithInvalidatedNonRelativeUnresolvedImports(path5) {
|
|
141710
141710
|
if (!filesWithInvalidatedNonRelativeUnresolvedImports) {
|
|
141711
141711
|
return false;
|
|
141712
141712
|
}
|
|
141713
|
-
const value = filesWithInvalidatedNonRelativeUnresolvedImports.get(
|
|
141713
|
+
const value = filesWithInvalidatedNonRelativeUnresolvedImports.get(path5);
|
|
141714
141714
|
return !!value && !!value.length;
|
|
141715
141715
|
}
|
|
141716
141716
|
function createHasInvalidatedResolutions(customHasInvalidatedResolutions, customHasInvalidatedLibResolutions) {
|
|
@@ -141718,7 +141718,7 @@ ${lanes.join("\n")}
|
|
|
141718
141718
|
const collected = filesWithInvalidatedResolutions;
|
|
141719
141719
|
filesWithInvalidatedResolutions = void 0;
|
|
141720
141720
|
return {
|
|
141721
|
-
hasInvalidatedResolutions: (
|
|
141721
|
+
hasInvalidatedResolutions: (path5) => customHasInvalidatedResolutions(path5) || allModuleAndTypeResolutionsAreInvalidated || !!(collected == null ? void 0 : collected.has(path5)) || isFileWithInvalidatedNonRelativeUnresolvedImports(path5),
|
|
141722
141722
|
hasInvalidatedLibResolutions: (libFileName) => {
|
|
141723
141723
|
var _a;
|
|
141724
141724
|
return customHasInvalidatedLibResolutions(libFileName) || !!((_a = resolvedLibraries == null ? void 0 : resolvedLibraries.get(libFileName)) == null ? void 0 : _a.isInvalidated);
|
|
@@ -141774,11 +141774,11 @@ ${lanes.join("\n")}
|
|
|
141774
141774
|
if (expected) impliedFormatPackageJsons.set(newFile.resolvedPath, newFile.packageJsonLocations);
|
|
141775
141775
|
else impliedFormatPackageJsons.delete(newFile.resolvedPath);
|
|
141776
141776
|
});
|
|
141777
|
-
impliedFormatPackageJsons.forEach((existing,
|
|
141778
|
-
const newFile = newProgram == null ? void 0 : newProgram.getSourceFileByPath(
|
|
141779
|
-
if (!newFile || newFile.resolvedPath !==
|
|
141777
|
+
impliedFormatPackageJsons.forEach((existing, path5) => {
|
|
141778
|
+
const newFile = newProgram == null ? void 0 : newProgram.getSourceFileByPath(path5);
|
|
141779
|
+
if (!newFile || newFile.resolvedPath !== path5) {
|
|
141780
141780
|
existing.forEach((location) => fileWatchesOfAffectingLocations.get(location).files--);
|
|
141781
|
-
impliedFormatPackageJsons.delete(
|
|
141781
|
+
impliedFormatPackageJsons.delete(path5);
|
|
141782
141782
|
}
|
|
141783
141783
|
});
|
|
141784
141784
|
}
|
|
@@ -141797,16 +141797,16 @@ ${lanes.join("\n")}
|
|
|
141797
141797
|
packageDirWatchers.delete(packageDirPath);
|
|
141798
141798
|
}
|
|
141799
141799
|
}
|
|
141800
|
-
function closeDirectoryWatchesOfFailedLookup(watcher,
|
|
141800
|
+
function closeDirectoryWatchesOfFailedLookup(watcher, path5) {
|
|
141801
141801
|
if (watcher.refCount === 0) {
|
|
141802
|
-
directoryWatchesOfFailedLookups.delete(
|
|
141802
|
+
directoryWatchesOfFailedLookups.delete(path5);
|
|
141803
141803
|
watcher.watcher.close();
|
|
141804
141804
|
}
|
|
141805
141805
|
}
|
|
141806
|
-
function closeFileWatcherOfAffectingLocation(watcher,
|
|
141806
|
+
function closeFileWatcherOfAffectingLocation(watcher, path5) {
|
|
141807
141807
|
var _a;
|
|
141808
141808
|
if (watcher.files === 0 && watcher.resolutions === 0 && !((_a = watcher.symlinks) == null ? void 0 : _a.size)) {
|
|
141809
|
-
fileWatchesOfAffectingLocations.delete(
|
|
141809
|
+
fileWatchesOfAffectingLocations.delete(path5);
|
|
141810
141810
|
watcher.watcher.close();
|
|
141811
141811
|
}
|
|
141812
141812
|
}
|
|
@@ -141825,10 +141825,10 @@ ${lanes.join("\n")}
|
|
|
141825
141825
|
logChanges
|
|
141826
141826
|
}) {
|
|
141827
141827
|
var _a;
|
|
141828
|
-
const
|
|
141829
|
-
const resolutionsInFile = perFileCache.get(
|
|
141828
|
+
const path5 = resolutionHost.toPath(containingFile);
|
|
141829
|
+
const resolutionsInFile = perFileCache.get(path5) || perFileCache.set(path5, createModeAwareCache()).get(path5);
|
|
141830
141830
|
const resolvedModules = [];
|
|
141831
|
-
const hasInvalidatedNonRelativeUnresolvedImport = logChanges && isFileWithInvalidatedNonRelativeUnresolvedImports(
|
|
141831
|
+
const hasInvalidatedNonRelativeUnresolvedImport = logChanges && isFileWithInvalidatedNonRelativeUnresolvedImports(path5);
|
|
141832
141832
|
const program2 = resolutionHost.getCurrentProgram();
|
|
141833
141833
|
const oldRedirect = program2 && ((_a = program2.getRedirectFromSourceFile(containingFile)) == null ? void 0 : _a.resolvedRef);
|
|
141834
141834
|
const unmatchedRedirects = oldRedirect ? !redirectedReference || redirectedReference.sourceFile.path !== oldRedirect.sourceFile.path : !!redirectedReference;
|
|
@@ -141846,13 +141846,13 @@ ${lanes.join("\n")}
|
|
|
141846
141846
|
}
|
|
141847
141847
|
resolutionsInFile.set(name, mode, resolution);
|
|
141848
141848
|
if (resolution !== existingResolution) {
|
|
141849
|
-
watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution,
|
|
141849
|
+
watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path5, getResolutionWithResolvedFileName, deferWatchingNonRelativeResolution);
|
|
141850
141850
|
if (existingResolution) {
|
|
141851
|
-
stopWatchFailedLookupLocationOfResolution(existingResolution,
|
|
141851
|
+
stopWatchFailedLookupLocationOfResolution(existingResolution, path5, getResolutionWithResolvedFileName);
|
|
141852
141852
|
}
|
|
141853
141853
|
}
|
|
141854
141854
|
if (logChanges && filesWithChangedSetOfUnresolvedImports && !resolutionIsEqualTo(existingResolution, resolution)) {
|
|
141855
|
-
filesWithChangedSetOfUnresolvedImports.push(
|
|
141855
|
+
filesWithChangedSetOfUnresolvedImports.push(path5);
|
|
141856
141856
|
logChanges = false;
|
|
141857
141857
|
}
|
|
141858
141858
|
} else {
|
|
@@ -141883,7 +141883,7 @@ ${lanes.join("\n")}
|
|
|
141883
141883
|
if (resolutionsInFile.size() !== seenNamesInFile.size()) {
|
|
141884
141884
|
resolutionsInFile.forEach((resolution, name, mode) => {
|
|
141885
141885
|
if (!seenNamesInFile.has(name, mode)) {
|
|
141886
|
-
stopWatchFailedLookupLocationOfResolution(resolution,
|
|
141886
|
+
stopWatchFailedLookupLocationOfResolution(resolution, path5, getResolutionWithResolvedFileName);
|
|
141887
141887
|
resolutionsInFile.delete(name, mode);
|
|
141888
141888
|
}
|
|
141889
141889
|
});
|
|
@@ -141957,18 +141957,18 @@ ${lanes.join("\n")}
|
|
|
141957
141957
|
if (!resolution || resolution.isInvalidated) {
|
|
141958
141958
|
const existingResolution = resolution;
|
|
141959
141959
|
resolution = resolveLibrary(libraryName, resolveFrom, options, host, libraryResolutionCache);
|
|
141960
|
-
const
|
|
141960
|
+
const path5 = resolutionHost.toPath(resolveFrom);
|
|
141961
141961
|
watchFailedLookupLocationsOfExternalModuleResolutions(
|
|
141962
141962
|
libraryName,
|
|
141963
141963
|
resolution,
|
|
141964
|
-
|
|
141964
|
+
path5,
|
|
141965
141965
|
getResolvedModuleFromResolution,
|
|
141966
141966
|
/*deferWatchingNonRelativeResolution*/
|
|
141967
141967
|
false
|
|
141968
141968
|
);
|
|
141969
141969
|
resolvedLibraries.set(libFileName, resolution);
|
|
141970
141970
|
if (existingResolution) {
|
|
141971
|
-
stopWatchFailedLookupLocationOfResolution(existingResolution,
|
|
141971
|
+
stopWatchFailedLookupLocationOfResolution(existingResolution, path5, getResolvedModuleFromResolution);
|
|
141972
141972
|
}
|
|
141973
141973
|
} else {
|
|
141974
141974
|
if (isTraceEnabled(options, host)) {
|
|
@@ -141987,8 +141987,8 @@ ${lanes.join("\n")}
|
|
|
141987
141987
|
}
|
|
141988
141988
|
function resolveSingleModuleNameWithoutWatching(moduleName, containingFile) {
|
|
141989
141989
|
var _a, _b;
|
|
141990
|
-
const
|
|
141991
|
-
const resolutionsInFile = resolvedModuleNames.get(
|
|
141990
|
+
const path5 = resolutionHost.toPath(containingFile);
|
|
141991
|
+
const resolutionsInFile = resolvedModuleNames.get(path5);
|
|
141992
141992
|
const resolution = resolutionsInFile == null ? void 0 : resolutionsInFile.get(
|
|
141993
141993
|
moduleName,
|
|
141994
141994
|
/*mode*/
|
|
@@ -142145,13 +142145,13 @@ ${lanes.join("\n")}
|
|
|
142145
142145
|
(symlinkWatcher.symlinks ?? (symlinkWatcher.symlinks = /* @__PURE__ */ new Set())).add(affectingLocation);
|
|
142146
142146
|
}
|
|
142147
142147
|
}
|
|
142148
|
-
function invalidateAffectingFileWatcher(
|
|
142148
|
+
function invalidateAffectingFileWatcher(path5, packageJsonMap) {
|
|
142149
142149
|
var _a;
|
|
142150
|
-
const watcher = fileWatchesOfAffectingLocations.get(
|
|
142151
|
-
if (watcher == null ? void 0 : watcher.resolutions) (affectingPathChecks ?? (affectingPathChecks = /* @__PURE__ */ new Set())).add(
|
|
142152
|
-
if (watcher == null ? void 0 : watcher.files) (affectingPathChecksForFile ?? (affectingPathChecksForFile = /* @__PURE__ */ new Set())).add(
|
|
142150
|
+
const watcher = fileWatchesOfAffectingLocations.get(path5);
|
|
142151
|
+
if (watcher == null ? void 0 : watcher.resolutions) (affectingPathChecks ?? (affectingPathChecks = /* @__PURE__ */ new Set())).add(path5);
|
|
142152
|
+
if (watcher == null ? void 0 : watcher.files) (affectingPathChecksForFile ?? (affectingPathChecksForFile = /* @__PURE__ */ new Set())).add(path5);
|
|
142153
142153
|
(_a = watcher == null ? void 0 : watcher.symlinks) == null ? void 0 : _a.forEach((path22) => invalidateAffectingFileWatcher(path22, packageJsonMap));
|
|
142154
|
-
packageJsonMap == null ? void 0 : packageJsonMap.delete(resolutionHost.toPath(
|
|
142154
|
+
packageJsonMap == null ? void 0 : packageJsonMap.delete(resolutionHost.toPath(path5));
|
|
142155
142155
|
}
|
|
142156
142156
|
function watchFailedLookupLocationOfNonRelativeModuleResolutions() {
|
|
142157
142157
|
nonRelativeExternalModuleResolutions.forEach(watchFailedLookupLocationOfResolution);
|
|
@@ -142390,7 +142390,7 @@ ${lanes.join("\n")}
|
|
|
142390
142390
|
function invalidatePackageJsonMap() {
|
|
142391
142391
|
const packageJsonMap = moduleResolutionCache.getPackageJsonInfoCache().getInternalMap();
|
|
142392
142392
|
if (packageJsonMap && (failedLookupChecks || startsWithPathChecks || isInDirectoryChecks)) {
|
|
142393
|
-
packageJsonMap.forEach((_value,
|
|
142393
|
+
packageJsonMap.forEach((_value, path5) => isInvalidatedFailedLookup(path5) ? packageJsonMap.delete(path5) : void 0);
|
|
142394
142394
|
}
|
|
142395
142395
|
}
|
|
142396
142396
|
function invalidateResolutionsOfFailedLookupLocations() {
|
|
@@ -143008,9 +143008,9 @@ ${lanes.join("\n")}
|
|
|
143008
143008
|
getDefaultLibLocation: maybeBind(host, host.getDefaultLibLocation),
|
|
143009
143009
|
getDefaultLibFileName: (options) => host.getDefaultLibFileName(options),
|
|
143010
143010
|
writeFile: createWriteFileMeasuringIO(
|
|
143011
|
-
(
|
|
143012
|
-
(
|
|
143013
|
-
(
|
|
143011
|
+
(path5, data, writeByteOrderMark) => host.writeFile(path5, data, writeByteOrderMark),
|
|
143012
|
+
(path5) => host.createDirectory(path5),
|
|
143013
|
+
(path5) => host.directoryExists(path5)
|
|
143014
143014
|
),
|
|
143015
143015
|
getCurrentDirectory: memoize(() => host.getCurrentDirectory()),
|
|
143016
143016
|
useCaseSensitiveFileNames: () => useCaseSensitiveFileNames2,
|
|
@@ -143081,16 +143081,16 @@ ${lanes.join("\n")}
|
|
|
143081
143081
|
getCurrentDirectory: memoize(() => system.getCurrentDirectory()),
|
|
143082
143082
|
getDefaultLibLocation,
|
|
143083
143083
|
getDefaultLibFileName: (options) => combinePaths(getDefaultLibLocation(), getDefaultLibFileName(options)),
|
|
143084
|
-
fileExists: (
|
|
143085
|
-
readFile: (
|
|
143086
|
-
directoryExists: (
|
|
143087
|
-
getDirectories: (
|
|
143088
|
-
readDirectory: (
|
|
143084
|
+
fileExists: (path5) => system.fileExists(path5),
|
|
143085
|
+
readFile: (path5, encoding) => system.readFile(path5, encoding),
|
|
143086
|
+
directoryExists: (path5) => system.directoryExists(path5),
|
|
143087
|
+
getDirectories: (path5) => system.getDirectories(path5),
|
|
143088
|
+
readDirectory: (path5, extensions, exclude, include, depth) => system.readDirectory(path5, extensions, exclude, include, depth),
|
|
143089
143089
|
realpath: maybeBind(system, system.realpath),
|
|
143090
143090
|
getEnvironmentVariable: maybeBind(system, system.getEnvironmentVariable),
|
|
143091
143091
|
trace: (s) => system.write(s + system.newLine),
|
|
143092
|
-
createDirectory: (
|
|
143093
|
-
writeFile: (
|
|
143092
|
+
createDirectory: (path5) => system.createDirectory(path5),
|
|
143093
|
+
writeFile: (path5, data, writeByteOrderMark) => system.writeFile(path5, data, writeByteOrderMark),
|
|
143094
143094
|
createHash: maybeBind(system, system.createHash),
|
|
143095
143095
|
createProgram: createProgram2 || createEmitAndSemanticDiagnosticsBuilderProgram,
|
|
143096
143096
|
storeSignatureInfo: system.storeSignatureInfo,
|
|
@@ -143185,7 +143185,7 @@ ${lanes.join("\n")}
|
|
|
143185
143185
|
if (!content) return void 0;
|
|
143186
143186
|
buildInfo = getBuildInfo(buildInfoPath, content);
|
|
143187
143187
|
}
|
|
143188
|
-
if (!buildInfo || buildInfo.version !==
|
|
143188
|
+
if (!buildInfo || buildInfo.version !== version2 || !isIncrementalBuildInfo(buildInfo)) return void 0;
|
|
143189
143189
|
return createBuilderProgramUsingIncrementalBuildInfo(buildInfo, buildInfoPath, host);
|
|
143190
143190
|
}
|
|
143191
143191
|
function createIncrementalCompilerHost(options, system = sys) {
|
|
@@ -143403,7 +143403,7 @@ ${lanes.join("\n")}
|
|
|
143403
143403
|
originalWriteFile,
|
|
143404
143404
|
readFileWithCache
|
|
143405
143405
|
} = changeCompilerHostLikeToUseCache(compilerHost, toPath3);
|
|
143406
|
-
if (isProgramUptoDate(getCurrentProgram(), rootFileNames, compilerOptions, (
|
|
143406
|
+
if (isProgramUptoDate(getCurrentProgram(), rootFileNames, compilerOptions, (path5) => getSourceVersion(path5, readFileWithCache), (fileName) => compilerHost.fileExists(fileName), hasInvalidatedResolutions, hasInvalidatedLibResolutions, hasChangedAutomaticTypeDirectiveNames, getParsedCommandLine, projectReferences)) {
|
|
143407
143407
|
if (hasChangedConfigFileParsingErrors) {
|
|
143408
143408
|
if (reportFileChangeDetectedOnCreateProgram) {
|
|
143409
143409
|
reportWatchDiagnostic(Diagnostics.File_change_detected_Starting_incremental_compilation);
|
|
@@ -143497,14 +143497,14 @@ ${lanes.join("\n")}
|
|
|
143497
143497
|
return typeof hostSourceFile.version === "boolean";
|
|
143498
143498
|
}
|
|
143499
143499
|
function fileExists(fileName) {
|
|
143500
|
-
const
|
|
143501
|
-
if (isFileMissingOnHost(sourceFilesCache.get(
|
|
143500
|
+
const path5 = toPath3(fileName);
|
|
143501
|
+
if (isFileMissingOnHost(sourceFilesCache.get(path5))) {
|
|
143502
143502
|
return false;
|
|
143503
143503
|
}
|
|
143504
143504
|
return directoryStructureHost.fileExists(fileName);
|
|
143505
143505
|
}
|
|
143506
|
-
function getVersionedSourceFileByPath(fileName,
|
|
143507
|
-
const hostSourceFile = sourceFilesCache.get(
|
|
143506
|
+
function getVersionedSourceFileByPath(fileName, path5, languageVersionOrOptions, onError, shouldCreateNewSourceFile) {
|
|
143507
|
+
const hostSourceFile = sourceFilesCache.get(path5);
|
|
143508
143508
|
if (isFileMissingOnHost(hostSourceFile)) {
|
|
143509
143509
|
return void 0;
|
|
143510
143510
|
}
|
|
@@ -143516,41 +143516,41 @@ ${lanes.join("\n")}
|
|
|
143516
143516
|
hostSourceFile.sourceFile = sourceFile;
|
|
143517
143517
|
hostSourceFile.version = sourceFile.version;
|
|
143518
143518
|
if (!hostSourceFile.fileWatcher) {
|
|
143519
|
-
hostSourceFile.fileWatcher = watchFilePath(
|
|
143519
|
+
hostSourceFile.fileWatcher = watchFilePath(path5, fileName, onSourceFileChange, 250, watchOptions, WatchType.SourceFile);
|
|
143520
143520
|
}
|
|
143521
143521
|
} else {
|
|
143522
143522
|
if (hostSourceFile.fileWatcher) {
|
|
143523
143523
|
hostSourceFile.fileWatcher.close();
|
|
143524
143524
|
}
|
|
143525
|
-
sourceFilesCache.set(
|
|
143525
|
+
sourceFilesCache.set(path5, false);
|
|
143526
143526
|
}
|
|
143527
143527
|
} else {
|
|
143528
143528
|
if (sourceFile) {
|
|
143529
|
-
const fileWatcher = watchFilePath(
|
|
143530
|
-
sourceFilesCache.set(
|
|
143529
|
+
const fileWatcher = watchFilePath(path5, fileName, onSourceFileChange, 250, watchOptions, WatchType.SourceFile);
|
|
143530
|
+
sourceFilesCache.set(path5, { sourceFile, version: sourceFile.version, fileWatcher });
|
|
143531
143531
|
} else {
|
|
143532
|
-
sourceFilesCache.set(
|
|
143532
|
+
sourceFilesCache.set(path5, false);
|
|
143533
143533
|
}
|
|
143534
143534
|
}
|
|
143535
143535
|
return sourceFile;
|
|
143536
143536
|
}
|
|
143537
143537
|
return hostSourceFile.sourceFile;
|
|
143538
143538
|
}
|
|
143539
|
-
function nextSourceFileVersion(
|
|
143540
|
-
const hostSourceFile = sourceFilesCache.get(
|
|
143539
|
+
function nextSourceFileVersion(path5) {
|
|
143540
|
+
const hostSourceFile = sourceFilesCache.get(path5);
|
|
143541
143541
|
if (hostSourceFile !== void 0) {
|
|
143542
143542
|
if (isFileMissingOnHost(hostSourceFile)) {
|
|
143543
|
-
sourceFilesCache.set(
|
|
143543
|
+
sourceFilesCache.set(path5, { version: false });
|
|
143544
143544
|
} else {
|
|
143545
143545
|
hostSourceFile.version = false;
|
|
143546
143546
|
}
|
|
143547
143547
|
}
|
|
143548
143548
|
}
|
|
143549
|
-
function getSourceVersion(
|
|
143550
|
-
const hostSourceFile = sourceFilesCache.get(
|
|
143549
|
+
function getSourceVersion(path5, readFileWithCache) {
|
|
143550
|
+
const hostSourceFile = sourceFilesCache.get(path5);
|
|
143551
143551
|
if (!hostSourceFile) return void 0;
|
|
143552
143552
|
if (hostSourceFile.version) return hostSourceFile.version;
|
|
143553
|
-
const text = readFileWithCache(
|
|
143553
|
+
const text = readFileWithCache(path5);
|
|
143554
143554
|
return text !== void 0 ? getSourceFileVersionAsHashFromText(compilerHost, text) : void 0;
|
|
143555
143555
|
}
|
|
143556
143556
|
function onReleaseOldSourceFile(oldSourceFile, _oldOptions, hasSourceFileByPath) {
|
|
@@ -143729,28 +143729,28 @@ ${lanes.join("\n")}
|
|
|
143729
143729
|
}
|
|
143730
143730
|
function onReleaseParsedCommandLine(fileName) {
|
|
143731
143731
|
var _a;
|
|
143732
|
-
const
|
|
143733
|
-
const config2 = parsedConfigs == null ? void 0 : parsedConfigs.get(
|
|
143732
|
+
const path5 = toPath3(fileName);
|
|
143733
|
+
const config2 = parsedConfigs == null ? void 0 : parsedConfigs.get(path5);
|
|
143734
143734
|
if (!config2) return;
|
|
143735
|
-
parsedConfigs.delete(
|
|
143735
|
+
parsedConfigs.delete(path5);
|
|
143736
143736
|
if (config2.watchedDirectories) clearMap(config2.watchedDirectories, closeFileWatcherOf);
|
|
143737
143737
|
(_a = config2.watcher) == null ? void 0 : _a.close();
|
|
143738
|
-
clearSharedExtendedConfigFileWatcher(
|
|
143738
|
+
clearSharedExtendedConfigFileWatcher(path5, sharedExtendedConfigFileWatchers);
|
|
143739
143739
|
}
|
|
143740
|
-
function watchFilePath(
|
|
143741
|
-
return watchFile2(file, (fileName, eventKind) => callback(fileName, eventKind,
|
|
143740
|
+
function watchFilePath(path5, file, callback, pollingInterval, options, watchType) {
|
|
143741
|
+
return watchFile2(file, (fileName, eventKind) => callback(fileName, eventKind, path5), pollingInterval, options, watchType);
|
|
143742
143742
|
}
|
|
143743
|
-
function onSourceFileChange(fileName, eventKind,
|
|
143744
|
-
updateCachedSystemWithFile(fileName,
|
|
143745
|
-
if (eventKind === 2 && sourceFilesCache.has(
|
|
143746
|
-
resolutionCache.invalidateResolutionOfFile(
|
|
143743
|
+
function onSourceFileChange(fileName, eventKind, path5) {
|
|
143744
|
+
updateCachedSystemWithFile(fileName, path5, eventKind);
|
|
143745
|
+
if (eventKind === 2 && sourceFilesCache.has(path5)) {
|
|
143746
|
+
resolutionCache.invalidateResolutionOfFile(path5);
|
|
143747
143747
|
}
|
|
143748
|
-
nextSourceFileVersion(
|
|
143748
|
+
nextSourceFileVersion(path5);
|
|
143749
143749
|
scheduleProgramUpdate();
|
|
143750
143750
|
}
|
|
143751
|
-
function updateCachedSystemWithFile(fileName,
|
|
143751
|
+
function updateCachedSystemWithFile(fileName, path5, eventKind) {
|
|
143752
143752
|
if (cachedDirectoryStructureHost) {
|
|
143753
|
-
cachedDirectoryStructureHost.addOrDeleteFile(fileName,
|
|
143753
|
+
cachedDirectoryStructureHost.addOrDeleteFile(fileName, path5, eventKind);
|
|
143754
143754
|
}
|
|
143755
143755
|
}
|
|
143756
143756
|
function watchMissingFilePath(missingFilePath, missingFileName) {
|
|
@@ -143971,9 +143971,9 @@ ${lanes.join("\n")}
|
|
|
143971
143971
|
}
|
|
143972
143972
|
function createSolutionBuilderHostBase(system, createProgram2, reportDiagnostic, reportSolutionBuilderStatus) {
|
|
143973
143973
|
const host = createProgramHost(system, createProgram2);
|
|
143974
|
-
host.getModifiedTime = system.getModifiedTime ? (
|
|
143975
|
-
host.setModifiedTime = system.setModifiedTime ? (
|
|
143976
|
-
host.deleteFile = system.deleteFile ? (
|
|
143974
|
+
host.getModifiedTime = system.getModifiedTime ? (path5) => system.getModifiedTime(path5) : returnUndefined;
|
|
143975
|
+
host.setModifiedTime = system.setModifiedTime ? (path5, date) => system.setModifiedTime(path5, date) : noop;
|
|
143976
|
+
host.deleteFile = system.deleteFile ? (path5) => system.deleteFile(path5) : noop;
|
|
143977
143977
|
host.reportDiagnostic = reportDiagnostic || createDiagnosticReporter(system);
|
|
143978
143978
|
host.reportSolutionBuilderStatus = reportSolutionBuilderStatus || createBuilderStatusReporter(system);
|
|
143979
143979
|
host.now = maybeBind(system, system.now);
|
|
@@ -144144,8 +144144,8 @@ ${lanes.join("\n")}
|
|
|
144144
144144
|
}
|
|
144145
144145
|
function toResolvedConfigFilePath(state, fileName) {
|
|
144146
144146
|
const { resolvedConfigFilePaths } = state;
|
|
144147
|
-
const
|
|
144148
|
-
if (
|
|
144147
|
+
const path5 = resolvedConfigFilePaths.get(fileName);
|
|
144148
|
+
if (path5 !== void 0) return path5;
|
|
144149
144149
|
const resolvedPath = toPath2(state, fileName);
|
|
144150
144150
|
resolvedConfigFilePaths.set(fileName, resolvedPath);
|
|
144151
144151
|
return resolvedPath;
|
|
@@ -144533,7 +144533,7 @@ ${lanes.join("\n")}
|
|
|
144533
144533
|
void 0,
|
|
144534
144534
|
(name, text, writeByteOrderMark, onError, sourceFiles, data) => {
|
|
144535
144535
|
var _a2;
|
|
144536
|
-
const
|
|
144536
|
+
const path5 = toPath2(state, name);
|
|
144537
144537
|
emittedOutputs.set(toPath2(state, name), name);
|
|
144538
144538
|
if (data == null ? void 0 : data.buildInfo) {
|
|
144539
144539
|
now || (now = getCurrentTime(state.host));
|
|
@@ -144563,7 +144563,7 @@ ${lanes.join("\n")}
|
|
|
144563
144563
|
);
|
|
144564
144564
|
if (data == null ? void 0 : data.differsOnlyInMap) state.host.setModifiedTime(name, modifiedTime);
|
|
144565
144565
|
else if (!isIncremental && state.watch) {
|
|
144566
|
-
(outputTimeStampMap || (outputTimeStampMap = getOutputTimeStampMap(state, projectPath))).set(
|
|
144566
|
+
(outputTimeStampMap || (outputTimeStampMap = getOutputTimeStampMap(state, projectPath))).set(path5, now || (now = getCurrentTime(state.host)));
|
|
144567
144567
|
}
|
|
144568
144568
|
},
|
|
144569
144569
|
cancellationToken,
|
|
@@ -144747,8 +144747,8 @@ ${lanes.join("\n")}
|
|
|
144747
144747
|
return !!value.watcher;
|
|
144748
144748
|
}
|
|
144749
144749
|
function getModifiedTime2(state, fileName) {
|
|
144750
|
-
const
|
|
144751
|
-
const existing = state.filesWatched.get(
|
|
144750
|
+
const path5 = toPath2(state, fileName);
|
|
144751
|
+
const existing = state.filesWatched.get(path5);
|
|
144752
144752
|
if (state.watch && !!existing) {
|
|
144753
144753
|
if (!isFileWatcherWithModifiedTime(existing)) return existing;
|
|
144754
144754
|
if (existing.modifiedTime) return existing.modifiedTime;
|
|
@@ -144756,20 +144756,20 @@ ${lanes.join("\n")}
|
|
|
144756
144756
|
const result = getModifiedTime(state.host, fileName);
|
|
144757
144757
|
if (state.watch) {
|
|
144758
144758
|
if (existing) existing.modifiedTime = result;
|
|
144759
|
-
else state.filesWatched.set(
|
|
144759
|
+
else state.filesWatched.set(path5, result);
|
|
144760
144760
|
}
|
|
144761
144761
|
return result;
|
|
144762
144762
|
}
|
|
144763
144763
|
function watchFile(state, file, callback, pollingInterval, options, watchType, project) {
|
|
144764
|
-
const
|
|
144765
|
-
const existing = state.filesWatched.get(
|
|
144764
|
+
const path5 = toPath2(state, file);
|
|
144765
|
+
const existing = state.filesWatched.get(path5);
|
|
144766
144766
|
if (existing && isFileWatcherWithModifiedTime(existing)) {
|
|
144767
144767
|
existing.callbacks.push(callback);
|
|
144768
144768
|
} else {
|
|
144769
144769
|
const watcher = state.watchFile(
|
|
144770
144770
|
file,
|
|
144771
144771
|
(fileName, eventKind, modifiedTime) => {
|
|
144772
|
-
const existing2 = Debug.checkDefined(state.filesWatched.get(
|
|
144772
|
+
const existing2 = Debug.checkDefined(state.filesWatched.get(path5));
|
|
144773
144773
|
Debug.assert(isFileWatcherWithModifiedTime(existing2));
|
|
144774
144774
|
existing2.modifiedTime = modifiedTime;
|
|
144775
144775
|
existing2.callbacks.forEach((cb) => cb(fileName, eventKind, modifiedTime));
|
|
@@ -144779,14 +144779,14 @@ ${lanes.join("\n")}
|
|
|
144779
144779
|
watchType,
|
|
144780
144780
|
project
|
|
144781
144781
|
);
|
|
144782
|
-
state.filesWatched.set(
|
|
144782
|
+
state.filesWatched.set(path5, { callbacks: [callback], watcher, modifiedTime: existing });
|
|
144783
144783
|
}
|
|
144784
144784
|
return {
|
|
144785
144785
|
close: () => {
|
|
144786
|
-
const existing2 = Debug.checkDefined(state.filesWatched.get(
|
|
144786
|
+
const existing2 = Debug.checkDefined(state.filesWatched.get(path5));
|
|
144787
144787
|
Debug.assert(isFileWatcherWithModifiedTime(existing2));
|
|
144788
144788
|
if (existing2.callbacks.length === 1) {
|
|
144789
|
-
state.filesWatched.delete(
|
|
144789
|
+
state.filesWatched.delete(path5);
|
|
144790
144790
|
closeFileWatcherOf(existing2);
|
|
144791
144791
|
} else {
|
|
144792
144792
|
unorderedRemoveItem(existing2.callbacks, callback);
|
|
@@ -144801,19 +144801,19 @@ ${lanes.join("\n")}
|
|
|
144801
144801
|
return result;
|
|
144802
144802
|
}
|
|
144803
144803
|
function getBuildInfoCacheEntry(state, buildInfoPath, resolvedConfigPath) {
|
|
144804
|
-
const
|
|
144804
|
+
const path5 = toPath2(state, buildInfoPath);
|
|
144805
144805
|
const existing = state.buildInfoCache.get(resolvedConfigPath);
|
|
144806
|
-
return (existing == null ? void 0 : existing.path) ===
|
|
144806
|
+
return (existing == null ? void 0 : existing.path) === path5 ? existing : void 0;
|
|
144807
144807
|
}
|
|
144808
144808
|
function getBuildInfo3(state, buildInfoPath, resolvedConfigPath, modifiedTime) {
|
|
144809
|
-
const
|
|
144809
|
+
const path5 = toPath2(state, buildInfoPath);
|
|
144810
144810
|
const existing = state.buildInfoCache.get(resolvedConfigPath);
|
|
144811
|
-
if (existing !== void 0 && existing.path ===
|
|
144811
|
+
if (existing !== void 0 && existing.path === path5) {
|
|
144812
144812
|
return existing.buildInfo || void 0;
|
|
144813
144813
|
}
|
|
144814
144814
|
const value = state.readFileWithCache(buildInfoPath);
|
|
144815
144815
|
const buildInfo = value ? getBuildInfo(buildInfoPath, value) : void 0;
|
|
144816
|
-
state.buildInfoCache.set(resolvedConfigPath, { path:
|
|
144816
|
+
state.buildInfoCache.set(resolvedConfigPath, { path: path5, buildInfo: buildInfo || false, modifiedTime: modifiedTime || missingFileModifiedTime });
|
|
144817
144817
|
return buildInfo;
|
|
144818
144818
|
}
|
|
144819
144819
|
function checkConfigFileUpToDateStatus(state, configFile, oldestOutputFileTime, oldestOutputFileName) {
|
|
@@ -144888,7 +144888,7 @@ ${lanes.join("\n")}
|
|
|
144888
144888
|
};
|
|
144889
144889
|
}
|
|
144890
144890
|
const incrementalBuildInfo = isIncremental && isIncrementalBuildInfo(buildInfo) ? buildInfo : void 0;
|
|
144891
|
-
if ((incrementalBuildInfo || !isIncremental) && buildInfo.version !==
|
|
144891
|
+
if ((incrementalBuildInfo || !isIncremental) && buildInfo.version !== version2) {
|
|
144892
144892
|
return {
|
|
144893
144893
|
type: 14,
|
|
144894
144894
|
version: buildInfo.version
|
|
@@ -144944,17 +144944,17 @@ ${lanes.join("\n")}
|
|
|
144944
144944
|
}
|
|
144945
144945
|
const inputPath = toPath2(state, inputFile);
|
|
144946
144946
|
if (buildInfoTime < inputTime) {
|
|
144947
|
-
let
|
|
144947
|
+
let version22;
|
|
144948
144948
|
let currentVersion;
|
|
144949
144949
|
if (incrementalBuildInfo) {
|
|
144950
144950
|
if (!buildInfoVersionMap) buildInfoVersionMap = getBuildInfoFileVersionMap(incrementalBuildInfo, buildInfoPath, host);
|
|
144951
144951
|
const resolvedInputPath = buildInfoVersionMap.roots.get(inputPath);
|
|
144952
|
-
|
|
144953
|
-
const text =
|
|
144952
|
+
version22 = buildInfoVersionMap.fileInfos.get(resolvedInputPath ?? inputPath);
|
|
144953
|
+
const text = version22 ? state.readFileWithCache(resolvedInputPath ?? inputFile) : void 0;
|
|
144954
144954
|
currentVersion = text !== void 0 ? getSourceFileVersionAsHashFromText(host, text) : void 0;
|
|
144955
|
-
if (
|
|
144955
|
+
if (version22 && version22 === currentVersion) pseudoInputUpToDate = true;
|
|
144956
144956
|
}
|
|
144957
|
-
if (!
|
|
144957
|
+
if (!version22 || version22 !== currentVersion) {
|
|
144958
144958
|
return {
|
|
144959
144959
|
type: 5,
|
|
144960
144960
|
outOfDateOutputFileName: buildInfoPath,
|
|
@@ -144994,11 +144994,11 @@ ${lanes.join("\n")}
|
|
|
144994
144994
|
const outputTimeStampMap = getOutputTimeStampMap(state, resolvedPath);
|
|
144995
144995
|
for (const output of outputs) {
|
|
144996
144996
|
if (output === buildInfoPath) continue;
|
|
144997
|
-
const
|
|
144998
|
-
let outputTime = outputTimeStampMap == null ? void 0 : outputTimeStampMap.get(
|
|
144997
|
+
const path5 = toPath2(state, output);
|
|
144998
|
+
let outputTime = outputTimeStampMap == null ? void 0 : outputTimeStampMap.get(path5);
|
|
144999
144999
|
if (!outputTime) {
|
|
145000
145000
|
outputTime = getModifiedTime(state.host, output);
|
|
145001
|
-
outputTimeStampMap == null ? void 0 : outputTimeStampMap.set(
|
|
145001
|
+
outputTimeStampMap == null ? void 0 : outputTimeStampMap.set(path5, outputTime);
|
|
145002
145002
|
}
|
|
145003
145003
|
if (outputTime === missingFileModifiedTime) {
|
|
145004
145004
|
return {
|
|
@@ -145052,7 +145052,7 @@ ${lanes.join("\n")}
|
|
|
145052
145052
|
const packageJsonLookups = state.lastCachedPackageJsonLookups.get(resolvedPath);
|
|
145053
145053
|
const dependentPackageFileStatus = packageJsonLookups && forEachKey(
|
|
145054
145054
|
packageJsonLookups,
|
|
145055
|
-
(
|
|
145055
|
+
(path5) => checkConfigFileUpToDateStatus(state, path5, oldestOutputFileTime, oldestOutputFileName)
|
|
145056
145056
|
);
|
|
145057
145057
|
if (dependentPackageFileStatus) return dependentPackageFileStatus;
|
|
145058
145058
|
return {
|
|
@@ -145102,8 +145102,8 @@ ${lanes.join("\n")}
|
|
|
145102
145102
|
if (!skipOutputs || outputs.length !== skipOutputs.size) {
|
|
145103
145103
|
let reportVerbose = !!state.options.verbose;
|
|
145104
145104
|
for (const file of outputs) {
|
|
145105
|
-
const
|
|
145106
|
-
if (skipOutputs == null ? void 0 : skipOutputs.has(
|
|
145105
|
+
const path5 = toPath2(state, file);
|
|
145106
|
+
if (skipOutputs == null ? void 0 : skipOutputs.has(path5)) continue;
|
|
145107
145107
|
if (reportVerbose) {
|
|
145108
145108
|
reportVerbose = false;
|
|
145109
145109
|
reportStatus(state, verboseMessage, proj.options.configFilePath);
|
|
@@ -145111,8 +145111,8 @@ ${lanes.join("\n")}
|
|
|
145111
145111
|
host.setModifiedTime(file, now || (now = getCurrentTime(state.host)));
|
|
145112
145112
|
if (file === buildInfoPath) getBuildInfoCacheEntry(state, buildInfoPath, projectPath).modifiedTime = now;
|
|
145113
145113
|
else if (outputTimeStampMap) {
|
|
145114
|
-
outputTimeStampMap.set(
|
|
145115
|
-
modifiedOutputs.add(
|
|
145114
|
+
outputTimeStampMap.set(path5, now);
|
|
145115
|
+
modifiedOutputs.add(path5);
|
|
145116
145116
|
}
|
|
145117
145117
|
}
|
|
145118
145118
|
}
|
|
@@ -145540,8 +145540,8 @@ ${lanes.join("\n")}
|
|
|
145540
145540
|
close: () => stopWatching(state)
|
|
145541
145541
|
};
|
|
145542
145542
|
}
|
|
145543
|
-
function relName(state,
|
|
145544
|
-
return convertToRelativePath(
|
|
145543
|
+
function relName(state, path5) {
|
|
145544
|
+
return convertToRelativePath(path5, state.compilerHost.getCurrentDirectory(), state.compilerHost.getCanonicalFileName);
|
|
145545
145545
|
}
|
|
145546
145546
|
function reportStatus(state, message, ...args) {
|
|
145547
145547
|
state.host.reportSolutionBuilderStatus(createCompilerDiagnostic(message, ...args));
|
|
@@ -145707,7 +145707,7 @@ ${lanes.join("\n")}
|
|
|
145707
145707
|
Diagnostics.Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2,
|
|
145708
145708
|
relName(state, configFileName),
|
|
145709
145709
|
status.version,
|
|
145710
|
-
|
|
145710
|
+
version2
|
|
145711
145711
|
);
|
|
145712
145712
|
case 17:
|
|
145713
145713
|
return reportStatus(
|
|
@@ -145760,13 +145760,13 @@ ${lanes.join("\n")}
|
|
|
145760
145760
|
} else if (file.isDeclarationFile) {
|
|
145761
145761
|
return "Definitions";
|
|
145762
145762
|
}
|
|
145763
|
-
const
|
|
145764
|
-
if (fileExtensionIsOneOf(
|
|
145763
|
+
const path5 = file.path;
|
|
145764
|
+
if (fileExtensionIsOneOf(path5, supportedTSExtensionsFlat)) {
|
|
145765
145765
|
return "TypeScript";
|
|
145766
|
-
} else if (fileExtensionIsOneOf(
|
|
145766
|
+
} else if (fileExtensionIsOneOf(path5, supportedJSExtensionsFlat)) {
|
|
145767
145767
|
return "JavaScript";
|
|
145768
145768
|
} else if (fileExtensionIs(
|
|
145769
|
-
|
|
145769
|
+
path5,
|
|
145770
145770
|
".json"
|
|
145771
145771
|
/* Json */
|
|
145772
145772
|
)) {
|
|
@@ -145795,7 +145795,7 @@ ${lanes.join("\n")}
|
|
|
145795
145795
|
return !!commandLine.options.all ? toSorted(optionDeclarations.concat(tscBuildOption), (a, b) => compareStringsCaseInsensitive(a.name, b.name)) : filter(optionDeclarations.concat(tscBuildOption), (v) => !!v.showInSimplifiedHelpView);
|
|
145796
145796
|
}
|
|
145797
145797
|
function printVersion(sys2) {
|
|
145798
|
-
sys2.write(getDiagnosticText(Diagnostics.Version_0,
|
|
145798
|
+
sys2.write(getDiagnosticText(Diagnostics.Version_0, version2) + sys2.newLine);
|
|
145799
145799
|
}
|
|
145800
145800
|
function createColors(sys2) {
|
|
145801
145801
|
const showColors = defaultIsPretty(sys2);
|
|
@@ -146047,7 +146047,7 @@ ${lanes.join("\n")}
|
|
|
146047
146047
|
}
|
|
146048
146048
|
function printEasyHelp(sys2, simpleOptions) {
|
|
146049
146049
|
const colors = createColors(sys2);
|
|
146050
|
-
let output = [...getHeader(sys2, `${getDiagnosticText(Diagnostics.tsc_Colon_The_TypeScript_Compiler)} - ${getDiagnosticText(Diagnostics.Version_0,
|
|
146050
|
+
let output = [...getHeader(sys2, `${getDiagnosticText(Diagnostics.tsc_Colon_The_TypeScript_Compiler)} - ${getDiagnosticText(Diagnostics.Version_0, version2)}`)];
|
|
146051
146051
|
output.push(colors.bold(getDiagnosticText(Diagnostics.COMMON_COMMANDS)) + sys2.newLine + sys2.newLine);
|
|
146052
146052
|
example("tsc", Diagnostics.Compiles_the_current_project_tsconfig_json_in_the_working_directory);
|
|
146053
146053
|
example("tsc app.ts util.ts", Diagnostics.Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options);
|
|
@@ -146094,7 +146094,7 @@ ${lanes.join("\n")}
|
|
|
146094
146094
|
}
|
|
146095
146095
|
}
|
|
146096
146096
|
function printAllHelp(sys2, compilerOptions, buildOptions, watchOptions) {
|
|
146097
|
-
let output = [...getHeader(sys2, `${getDiagnosticText(Diagnostics.tsc_Colon_The_TypeScript_Compiler)} - ${getDiagnosticText(Diagnostics.Version_0,
|
|
146097
|
+
let output = [...getHeader(sys2, `${getDiagnosticText(Diagnostics.tsc_Colon_The_TypeScript_Compiler)} - ${getDiagnosticText(Diagnostics.Version_0, version2)}`)];
|
|
146098
146098
|
output = [...output, ...generateSectionOptionsOutput(
|
|
146099
146099
|
sys2,
|
|
146100
146100
|
getDiagnosticText(Diagnostics.ALL_COMPILER_OPTIONS),
|
|
@@ -146126,7 +146126,7 @@ ${lanes.join("\n")}
|
|
|
146126
146126
|
}
|
|
146127
146127
|
}
|
|
146128
146128
|
function printBuildHelp(sys2, buildOptions) {
|
|
146129
|
-
let output = [...getHeader(sys2, `${getDiagnosticText(Diagnostics.tsc_Colon_The_TypeScript_Compiler)} - ${getDiagnosticText(Diagnostics.Version_0,
|
|
146129
|
+
let output = [...getHeader(sys2, `${getDiagnosticText(Diagnostics.tsc_Colon_The_TypeScript_Compiler)} - ${getDiagnosticText(Diagnostics.Version_0, version2)}`)];
|
|
146130
146130
|
output = [...output, ...generateSectionOptionsOutput(
|
|
146131
146131
|
sys2,
|
|
146132
146132
|
getDiagnosticText(Diagnostics.BUILD_OPTIONS),
|
|
@@ -146378,7 +146378,7 @@ ${lanes.join("\n")}
|
|
|
146378
146378
|
);
|
|
146379
146379
|
}
|
|
146380
146380
|
}
|
|
146381
|
-
const commandLine = parseCommandLine(commandLineArgs, (
|
|
146381
|
+
const commandLine = parseCommandLine(commandLineArgs, (path5) => system.readFile(path5));
|
|
146382
146382
|
if (commandLine.options.generateCpuProfile && system.enableCPUProfiler) {
|
|
146383
146383
|
system.enableCPUProfiler(commandLine.options.generateCpuProfile, () => executeCommandLineWorker(
|
|
146384
146384
|
system,
|
|
@@ -148254,12 +148254,12 @@ ${lanes.join("\n")}
|
|
|
148254
148254
|
return nodeCoreModules.has(moduleName) ? "node" : moduleName;
|
|
148255
148255
|
}
|
|
148256
148256
|
function loadSafeList(host, safeListPath) {
|
|
148257
|
-
const result = readConfigFile(safeListPath, (
|
|
148257
|
+
const result = readConfigFile(safeListPath, (path5) => host.readFile(path5));
|
|
148258
148258
|
return new Map(Object.entries(result.config));
|
|
148259
148259
|
}
|
|
148260
148260
|
function loadTypesMap(host, typesMapPath) {
|
|
148261
148261
|
var _a;
|
|
148262
|
-
const result = readConfigFile(typesMapPath, (
|
|
148262
|
+
const result = readConfigFile(typesMapPath, (path5) => host.readFile(path5));
|
|
148263
148263
|
if ((_a = result.config) == null ? void 0 : _a.simpleMap) {
|
|
148264
148264
|
return new Map(Object.entries(result.config.simpleMap));
|
|
148265
148265
|
}
|
|
@@ -148271,9 +148271,9 @@ ${lanes.join("\n")}
|
|
|
148271
148271
|
}
|
|
148272
148272
|
const inferredTypings = /* @__PURE__ */ new Map();
|
|
148273
148273
|
fileNames = mapDefined(fileNames, (fileName) => {
|
|
148274
|
-
const
|
|
148275
|
-
if (hasJSFileExtension(
|
|
148276
|
-
return
|
|
148274
|
+
const path5 = normalizePath(fileName);
|
|
148275
|
+
if (hasJSFileExtension(path5)) {
|
|
148276
|
+
return path5;
|
|
148277
148277
|
}
|
|
148278
148278
|
});
|
|
148279
148279
|
const filesToWatch = [];
|
|
@@ -148335,7 +148335,7 @@ ${lanes.join("\n")}
|
|
|
148335
148335
|
let manifestTypingNames;
|
|
148336
148336
|
if (host.fileExists(manifestPath)) {
|
|
148337
148337
|
filesToWatch2.push(manifestPath);
|
|
148338
|
-
manifest = readConfigFile(manifestPath, (
|
|
148338
|
+
manifest = readConfigFile(manifestPath, (path5) => host.readFile(path5)).config;
|
|
148339
148339
|
manifestTypingNames = flatMap([manifest.dependencies, manifest.devDependencies, manifest.optionalDependencies, manifest.peerDependencies], getOwnKeys);
|
|
148340
148340
|
addInferredTypings(manifestTypingNames, `Typing names in '${manifestPath}' dependencies`);
|
|
148341
148341
|
}
|
|
@@ -148369,7 +148369,7 @@ ${lanes.join("\n")}
|
|
|
148369
148369
|
if (log) log(`Searching for typing names in ${packagesFolderPath}; all files: ${JSON.stringify(dependencyManifestNames)}`);
|
|
148370
148370
|
for (const manifestPath2 of dependencyManifestNames) {
|
|
148371
148371
|
const normalizedFileName = normalizePath(manifestPath2);
|
|
148372
|
-
const result2 = readConfigFile(normalizedFileName, (
|
|
148372
|
+
const result2 = readConfigFile(normalizedFileName, (path5) => host.readFile(path5));
|
|
148373
148373
|
const manifest2 = result2.config;
|
|
148374
148374
|
if (!manifest2.name) {
|
|
148375
148375
|
continue;
|
|
@@ -151149,14 +151149,14 @@ ${lanes.join("\n")}
|
|
|
151149
151149
|
function tryGetDirectories(host, directoryName) {
|
|
151150
151150
|
return tryIOAndConsumeErrors(host, host.getDirectories, directoryName) || [];
|
|
151151
151151
|
}
|
|
151152
|
-
function tryReadDirectory(host,
|
|
151153
|
-
return tryIOAndConsumeErrors(host, host.readDirectory,
|
|
151152
|
+
function tryReadDirectory(host, path5, extensions, exclude, include) {
|
|
151153
|
+
return tryIOAndConsumeErrors(host, host.readDirectory, path5, extensions, exclude, include) || emptyArray;
|
|
151154
151154
|
}
|
|
151155
|
-
function tryFileExists(host,
|
|
151156
|
-
return tryIOAndConsumeErrors(host, host.fileExists,
|
|
151155
|
+
function tryFileExists(host, path5) {
|
|
151156
|
+
return tryIOAndConsumeErrors(host, host.fileExists, path5);
|
|
151157
151157
|
}
|
|
151158
|
-
function tryDirectoryExists(host,
|
|
151159
|
-
return tryAndIgnoreErrors(() => directoryProbablyExists(
|
|
151158
|
+
function tryDirectoryExists(host, path5) {
|
|
151159
|
+
return tryAndIgnoreErrors(() => directoryProbablyExists(path5, host)) || false;
|
|
151160
151160
|
}
|
|
151161
151161
|
function tryAndIgnoreErrors(cb) {
|
|
151162
151162
|
try {
|
|
@@ -151998,13 +151998,13 @@ ${lanes.join("\n")}
|
|
|
151998
151998
|
function getIsExcluded(excludePatterns, host) {
|
|
151999
151999
|
var _a;
|
|
152000
152000
|
const realpathsWithSymlinks = (_a = host.getSymlinkCache) == null ? void 0 : _a.call(host).getSymlinkedDirectoriesByRealpath();
|
|
152001
|
-
return ({ fileName, path:
|
|
152001
|
+
return ({ fileName, path: path5 }) => {
|
|
152002
152002
|
if (excludePatterns.some((p) => p.test(fileName))) return true;
|
|
152003
152003
|
if ((realpathsWithSymlinks == null ? void 0 : realpathsWithSymlinks.size) && pathContainsNodeModules(fileName)) {
|
|
152004
152004
|
let dir = getDirectoryPath(fileName);
|
|
152005
152005
|
return forEachAncestorDirectoryStoppingAtGlobalCache(
|
|
152006
152006
|
host,
|
|
152007
|
-
getDirectoryPath(
|
|
152007
|
+
getDirectoryPath(path5),
|
|
152008
152008
|
(dirPath) => {
|
|
152009
152009
|
const symlinks = realpathsWithSymlinks.get(ensureTrailingDirectorySeparator(dirPath));
|
|
152010
152010
|
if (symlinks) {
|
|
@@ -153659,38 +153659,38 @@ ${lanes.join("\n")}
|
|
|
153659
153659
|
}
|
|
153660
153660
|
return settingsOrHost;
|
|
153661
153661
|
}
|
|
153662
|
-
function acquireDocument(fileName, compilationSettings, scriptSnapshot,
|
|
153663
|
-
const
|
|
153662
|
+
function acquireDocument(fileName, compilationSettings, scriptSnapshot, version22, scriptKind, languageVersionOrOptions) {
|
|
153663
|
+
const path5 = toPath(fileName, currentDirectory, getCanonicalFileName);
|
|
153664
153664
|
const key = getKeyForCompilationSettings(getCompilationSettings(compilationSettings));
|
|
153665
|
-
return acquireDocumentWithKey(fileName,
|
|
153665
|
+
return acquireDocumentWithKey(fileName, path5, compilationSettings, key, scriptSnapshot, version22, scriptKind, languageVersionOrOptions);
|
|
153666
153666
|
}
|
|
153667
|
-
function acquireDocumentWithKey(fileName,
|
|
153667
|
+
function acquireDocumentWithKey(fileName, path5, compilationSettings, key, scriptSnapshot, version22, scriptKind, languageVersionOrOptions) {
|
|
153668
153668
|
return acquireOrUpdateDocument(
|
|
153669
153669
|
fileName,
|
|
153670
|
-
|
|
153670
|
+
path5,
|
|
153671
153671
|
compilationSettings,
|
|
153672
153672
|
key,
|
|
153673
153673
|
scriptSnapshot,
|
|
153674
|
-
|
|
153674
|
+
version22,
|
|
153675
153675
|
/*acquiring*/
|
|
153676
153676
|
true,
|
|
153677
153677
|
scriptKind,
|
|
153678
153678
|
languageVersionOrOptions
|
|
153679
153679
|
);
|
|
153680
153680
|
}
|
|
153681
|
-
function updateDocument(fileName, compilationSettings, scriptSnapshot,
|
|
153682
|
-
const
|
|
153681
|
+
function updateDocument(fileName, compilationSettings, scriptSnapshot, version22, scriptKind, languageVersionOrOptions) {
|
|
153682
|
+
const path5 = toPath(fileName, currentDirectory, getCanonicalFileName);
|
|
153683
153683
|
const key = getKeyForCompilationSettings(getCompilationSettings(compilationSettings));
|
|
153684
|
-
return updateDocumentWithKey(fileName,
|
|
153684
|
+
return updateDocumentWithKey(fileName, path5, compilationSettings, key, scriptSnapshot, version22, scriptKind, languageVersionOrOptions);
|
|
153685
153685
|
}
|
|
153686
|
-
function updateDocumentWithKey(fileName,
|
|
153686
|
+
function updateDocumentWithKey(fileName, path5, compilationSettings, key, scriptSnapshot, version22, scriptKind, languageVersionOrOptions) {
|
|
153687
153687
|
return acquireOrUpdateDocument(
|
|
153688
153688
|
fileName,
|
|
153689
|
-
|
|
153689
|
+
path5,
|
|
153690
153690
|
getCompilationSettings(compilationSettings),
|
|
153691
153691
|
key,
|
|
153692
153692
|
scriptSnapshot,
|
|
153693
|
-
|
|
153693
|
+
version22,
|
|
153694
153694
|
/*acquiring*/
|
|
153695
153695
|
false,
|
|
153696
153696
|
scriptKind,
|
|
@@ -153702,7 +153702,7 @@ ${lanes.join("\n")}
|
|
|
153702
153702
|
Debug.assert(scriptKind === void 0 || !entry || entry.sourceFile.scriptKind === scriptKind, `Script kind should match provided ScriptKind:${scriptKind} and sourceFile.scriptKind: ${entry == null ? void 0 : entry.sourceFile.scriptKind}, !entry: ${!entry}`);
|
|
153703
153703
|
return entry;
|
|
153704
153704
|
}
|
|
153705
|
-
function acquireOrUpdateDocument(fileName,
|
|
153705
|
+
function acquireOrUpdateDocument(fileName, path5, compilationSettingsOrHost, key, scriptSnapshot, version22, acquiring, scriptKind, languageVersionOrOptions) {
|
|
153706
153706
|
var _a, _b, _c, _d;
|
|
153707
153707
|
scriptKind = ensureScriptKind(fileName, scriptKind);
|
|
153708
153708
|
const compilationSettings = getCompilationSettings(compilationSettingsOrHost);
|
|
@@ -153710,7 +153710,7 @@ ${lanes.join("\n")}
|
|
|
153710
153710
|
const scriptTarget = scriptKind === 6 ? 100 : getEmitScriptTarget(compilationSettings);
|
|
153711
153711
|
const sourceFileOptions = typeof languageVersionOrOptions === "object" ? languageVersionOrOptions : {
|
|
153712
153712
|
languageVersion: scriptTarget,
|
|
153713
|
-
impliedNodeFormat: host && getImpliedNodeFormatForFile(
|
|
153713
|
+
impliedNodeFormat: host && getImpliedNodeFormatForFile(path5, (_d = (_c = (_b = (_a = host.getCompilerHost) == null ? void 0 : _a.call(host)) == null ? void 0 : _b.getModuleResolutionCache) == null ? void 0 : _c.call(_b)) == null ? void 0 : _d.getPackageJsonInfoCache(), host, compilationSettings),
|
|
153714
153714
|
setExternalModuleIndicator: getSetExternalModuleIndicator(compilationSettings),
|
|
153715
153715
|
jsDocParsingMode
|
|
153716
153716
|
};
|
|
@@ -153723,15 +153723,15 @@ ${lanes.join("\n")}
|
|
|
153723
153723
|
if (buckets.size > oldBucketCount) {
|
|
153724
153724
|
tracing.instant(tracing.Phase.Session, "createdDocumentRegistryBucket", { configFilePath: compilationSettings.configFilePath, key: keyWithMode });
|
|
153725
153725
|
}
|
|
153726
|
-
const otherBucketKey = !isDeclarationFileName(
|
|
153726
|
+
const otherBucketKey = !isDeclarationFileName(path5) && forEachEntry(buckets, (bucket2, bucketKey) => bucketKey !== keyWithMode && bucket2.has(path5) && bucketKey);
|
|
153727
153727
|
if (otherBucketKey) {
|
|
153728
|
-
tracing.instant(tracing.Phase.Session, "documentRegistryBucketOverlap", { path:
|
|
153728
|
+
tracing.instant(tracing.Phase.Session, "documentRegistryBucketOverlap", { path: path5, key1: otherBucketKey, key2: keyWithMode });
|
|
153729
153729
|
}
|
|
153730
153730
|
}
|
|
153731
|
-
const bucketEntry = bucket.get(
|
|
153731
|
+
const bucketEntry = bucket.get(path5);
|
|
153732
153732
|
let entry = bucketEntry && getDocumentRegistryEntry(bucketEntry, scriptKind);
|
|
153733
153733
|
if (!entry && externalCache) {
|
|
153734
|
-
const sourceFile = externalCache.getDocument(keyWithMode,
|
|
153734
|
+
const sourceFile = externalCache.getDocument(keyWithMode, path5);
|
|
153735
153735
|
if (sourceFile && sourceFile.scriptKind === scriptKind && sourceFile.text === getSnapshotText(scriptSnapshot)) {
|
|
153736
153736
|
Debug.assert(acquiring);
|
|
153737
153737
|
entry = {
|
|
@@ -153746,13 +153746,13 @@ ${lanes.join("\n")}
|
|
|
153746
153746
|
fileName,
|
|
153747
153747
|
scriptSnapshot,
|
|
153748
153748
|
sourceFileOptions,
|
|
153749
|
-
|
|
153749
|
+
version22,
|
|
153750
153750
|
/*setNodeParents*/
|
|
153751
153751
|
false,
|
|
153752
153752
|
scriptKind
|
|
153753
153753
|
);
|
|
153754
153754
|
if (externalCache) {
|
|
153755
|
-
externalCache.setDocument(keyWithMode,
|
|
153755
|
+
externalCache.setDocument(keyWithMode, path5, sourceFile);
|
|
153756
153756
|
}
|
|
153757
153757
|
entry = {
|
|
153758
153758
|
sourceFile,
|
|
@@ -153760,10 +153760,10 @@ ${lanes.join("\n")}
|
|
|
153760
153760
|
};
|
|
153761
153761
|
setBucketEntry();
|
|
153762
153762
|
} else {
|
|
153763
|
-
if (entry.sourceFile.version !==
|
|
153764
|
-
entry.sourceFile = updateLanguageServiceSourceFile(entry.sourceFile, scriptSnapshot,
|
|
153763
|
+
if (entry.sourceFile.version !== version22) {
|
|
153764
|
+
entry.sourceFile = updateLanguageServiceSourceFile(entry.sourceFile, scriptSnapshot, version22, scriptSnapshot.getChangeRange(entry.sourceFile.scriptSnapshot));
|
|
153765
153765
|
if (externalCache) {
|
|
153766
|
-
externalCache.setDocument(keyWithMode,
|
|
153766
|
+
externalCache.setDocument(keyWithMode, path5, entry.sourceFile);
|
|
153767
153767
|
}
|
|
153768
153768
|
}
|
|
153769
153769
|
if (acquiring) {
|
|
@@ -153774,35 +153774,35 @@ ${lanes.join("\n")}
|
|
|
153774
153774
|
return entry.sourceFile;
|
|
153775
153775
|
function setBucketEntry() {
|
|
153776
153776
|
if (!bucketEntry) {
|
|
153777
|
-
bucket.set(
|
|
153777
|
+
bucket.set(path5, entry);
|
|
153778
153778
|
} else if (isDocumentRegistryEntry(bucketEntry)) {
|
|
153779
153779
|
const scriptKindMap = /* @__PURE__ */ new Map();
|
|
153780
153780
|
scriptKindMap.set(bucketEntry.sourceFile.scriptKind, bucketEntry);
|
|
153781
153781
|
scriptKindMap.set(scriptKind, entry);
|
|
153782
|
-
bucket.set(
|
|
153782
|
+
bucket.set(path5, scriptKindMap);
|
|
153783
153783
|
} else {
|
|
153784
153784
|
bucketEntry.set(scriptKind, entry);
|
|
153785
153785
|
}
|
|
153786
153786
|
}
|
|
153787
153787
|
}
|
|
153788
153788
|
function releaseDocument(fileName, compilationSettings, scriptKind, impliedNodeFormat) {
|
|
153789
|
-
const
|
|
153789
|
+
const path5 = toPath(fileName, currentDirectory, getCanonicalFileName);
|
|
153790
153790
|
const key = getKeyForCompilationSettings(compilationSettings);
|
|
153791
|
-
return releaseDocumentWithKey(
|
|
153791
|
+
return releaseDocumentWithKey(path5, key, scriptKind, impliedNodeFormat);
|
|
153792
153792
|
}
|
|
153793
|
-
function releaseDocumentWithKey(
|
|
153793
|
+
function releaseDocumentWithKey(path5, key, scriptKind, impliedNodeFormat) {
|
|
153794
153794
|
const bucket = Debug.checkDefined(buckets.get(getDocumentRegistryBucketKeyWithMode(key, impliedNodeFormat)));
|
|
153795
|
-
const bucketEntry = bucket.get(
|
|
153795
|
+
const bucketEntry = bucket.get(path5);
|
|
153796
153796
|
const entry = getDocumentRegistryEntry(bucketEntry, scriptKind);
|
|
153797
153797
|
entry.languageServiceRefCount--;
|
|
153798
153798
|
Debug.assert(entry.languageServiceRefCount >= 0);
|
|
153799
153799
|
if (entry.languageServiceRefCount === 0) {
|
|
153800
153800
|
if (isDocumentRegistryEntry(bucketEntry)) {
|
|
153801
|
-
bucket.delete(
|
|
153801
|
+
bucket.delete(path5);
|
|
153802
153802
|
} else {
|
|
153803
153803
|
bucketEntry.delete(scriptKind);
|
|
153804
153804
|
if (bucketEntry.size === 1) {
|
|
153805
|
-
bucket.set(
|
|
153805
|
+
bucket.set(path5, firstDefinedIterator(bucketEntry.values(), identity));
|
|
153806
153806
|
}
|
|
153807
153807
|
}
|
|
153808
153808
|
}
|
|
@@ -153838,10 +153838,10 @@ ${lanes.join("\n")}
|
|
|
153838
153838
|
}
|
|
153839
153839
|
function getPathUpdater(oldFileOrDirPath, newFileOrDirPath, getCanonicalFileName, sourceMapper) {
|
|
153840
153840
|
const canonicalOldPath = getCanonicalFileName(oldFileOrDirPath);
|
|
153841
|
-
return (
|
|
153842
|
-
const originalPath = sourceMapper && sourceMapper.tryGetSourcePosition({ fileName:
|
|
153843
|
-
const updatedPath = getUpdatedPath(originalPath ? originalPath.fileName :
|
|
153844
|
-
return originalPath ? updatedPath === void 0 ? void 0 : makeCorrespondingRelativeChange(originalPath.fileName, updatedPath,
|
|
153841
|
+
return (path5) => {
|
|
153842
|
+
const originalPath = sourceMapper && sourceMapper.tryGetSourcePosition({ fileName: path5, pos: 0 });
|
|
153843
|
+
const updatedPath = getUpdatedPath(originalPath ? originalPath.fileName : path5);
|
|
153844
|
+
return originalPath ? updatedPath === void 0 ? void 0 : makeCorrespondingRelativeChange(originalPath.fileName, updatedPath, path5, getCanonicalFileName) : updatedPath;
|
|
153845
153845
|
};
|
|
153846
153846
|
function getUpdatedPath(pathToUpdate) {
|
|
153847
153847
|
if (getCanonicalFileName(pathToUpdate) === canonicalOldPath) return newFileOrDirPath;
|
|
@@ -153917,10 +153917,10 @@ ${lanes.join("\n")}
|
|
|
153917
153917
|
}
|
|
153918
153918
|
return false;
|
|
153919
153919
|
}
|
|
153920
|
-
function relativePath(
|
|
153920
|
+
function relativePath(path5) {
|
|
153921
153921
|
return getRelativePathFromDirectory(
|
|
153922
153922
|
configDir,
|
|
153923
|
-
|
|
153923
|
+
path5,
|
|
153924
153924
|
/*ignoreCase*/
|
|
153925
153925
|
!useCaseSensitiveFileNames2
|
|
153926
153926
|
);
|
|
@@ -154728,8 +154728,8 @@ ${lanes.join("\n")}
|
|
|
154728
154728
|
return toPath(fileName, currentDirectory, getCanonicalFileName);
|
|
154729
154729
|
}
|
|
154730
154730
|
function getDocumentPositionMapper2(generatedFileName, sourceFileName) {
|
|
154731
|
-
const
|
|
154732
|
-
const value = documentPositionMappers.get(
|
|
154731
|
+
const path5 = toPath3(generatedFileName);
|
|
154732
|
+
const value = documentPositionMappers.get(path5);
|
|
154733
154733
|
if (value) return value;
|
|
154734
154734
|
let mapper;
|
|
154735
154735
|
if (host.getDocumentPositionMapper) {
|
|
@@ -154743,7 +154743,7 @@ ${lanes.join("\n")}
|
|
|
154743
154743
|
(f) => !host.fileExists || host.fileExists(f) ? host.readFile(f) : void 0
|
|
154744
154744
|
);
|
|
154745
154745
|
}
|
|
154746
|
-
documentPositionMappers.set(
|
|
154746
|
+
documentPositionMappers.set(path5, mapper || identitySourceMapConsumer);
|
|
154747
154747
|
return mapper || identitySourceMapConsumer;
|
|
154748
154748
|
}
|
|
154749
154749
|
function tryGetSourcePosition(info) {
|
|
@@ -154771,21 +154771,21 @@ ${lanes.join("\n")}
|
|
|
154771
154771
|
function getSourceFile(fileName) {
|
|
154772
154772
|
const program2 = host.getProgram();
|
|
154773
154773
|
if (!program2) return void 0;
|
|
154774
|
-
const
|
|
154775
|
-
const file = program2.getSourceFileByPath(
|
|
154776
|
-
return file && file.resolvedPath ===
|
|
154774
|
+
const path5 = toPath3(fileName);
|
|
154775
|
+
const file = program2.getSourceFileByPath(path5);
|
|
154776
|
+
return file && file.resolvedPath === path5 ? file : void 0;
|
|
154777
154777
|
}
|
|
154778
154778
|
function getOrCreateSourceFileLike(fileName) {
|
|
154779
|
-
const
|
|
154780
|
-
const fileFromCache = sourceFileLike.get(
|
|
154779
|
+
const path5 = toPath3(fileName);
|
|
154780
|
+
const fileFromCache = sourceFileLike.get(path5);
|
|
154781
154781
|
if (fileFromCache !== void 0) return fileFromCache ? fileFromCache : void 0;
|
|
154782
154782
|
if (!host.readFile || host.fileExists && !host.fileExists(fileName)) {
|
|
154783
|
-
sourceFileLike.set(
|
|
154783
|
+
sourceFileLike.set(path5, false);
|
|
154784
154784
|
return void 0;
|
|
154785
154785
|
}
|
|
154786
154786
|
const text = host.readFile(fileName);
|
|
154787
154787
|
const file = text ? createSourceFileLike(text) : false;
|
|
154788
|
-
sourceFileLike.set(
|
|
154788
|
+
sourceFileLike.set(path5, file);
|
|
154789
154789
|
return file ? file : void 0;
|
|
154790
154790
|
}
|
|
154791
154791
|
function getSourceFileLike(fileName) {
|
|
@@ -162612,7 +162612,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
162612
162612
|
throw new Error("Could not find file: '" + fileName + "'.");
|
|
162613
162613
|
}
|
|
162614
162614
|
const scriptKind = getScriptKind(fileName, this.host);
|
|
162615
|
-
const
|
|
162615
|
+
const version22 = this.host.getScriptVersion(fileName);
|
|
162616
162616
|
let sourceFile;
|
|
162617
162617
|
if (this.currentFileName !== fileName) {
|
|
162618
162618
|
const options = {
|
|
@@ -162632,17 +162632,17 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
162632
162632
|
fileName,
|
|
162633
162633
|
scriptSnapshot,
|
|
162634
162634
|
options,
|
|
162635
|
-
|
|
162635
|
+
version22,
|
|
162636
162636
|
/*setNodeParents*/
|
|
162637
162637
|
true,
|
|
162638
162638
|
scriptKind
|
|
162639
162639
|
);
|
|
162640
|
-
} else if (this.currentFileVersion !==
|
|
162640
|
+
} else if (this.currentFileVersion !== version22) {
|
|
162641
162641
|
const editRange = scriptSnapshot.getChangeRange(this.currentFileScriptSnapshot);
|
|
162642
|
-
sourceFile = updateLanguageServiceSourceFile(this.currentSourceFile, scriptSnapshot,
|
|
162642
|
+
sourceFile = updateLanguageServiceSourceFile(this.currentSourceFile, scriptSnapshot, version22, editRange);
|
|
162643
162643
|
}
|
|
162644
162644
|
if (sourceFile) {
|
|
162645
|
-
this.currentFileVersion =
|
|
162645
|
+
this.currentFileVersion = version22;
|
|
162646
162646
|
this.currentFileName = fileName;
|
|
162647
162647
|
this.currentFileScriptSnapshot = scriptSnapshot;
|
|
162648
162648
|
this.currentSourceFile = sourceFile;
|
|
@@ -162650,18 +162650,18 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
162650
162650
|
return this.currentSourceFile;
|
|
162651
162651
|
}
|
|
162652
162652
|
};
|
|
162653
|
-
function setSourceFileFields(sourceFile, scriptSnapshot,
|
|
162654
|
-
sourceFile.version =
|
|
162653
|
+
function setSourceFileFields(sourceFile, scriptSnapshot, version22) {
|
|
162654
|
+
sourceFile.version = version22;
|
|
162655
162655
|
sourceFile.scriptSnapshot = scriptSnapshot;
|
|
162656
162656
|
}
|
|
162657
|
-
function createLanguageServiceSourceFile(fileName, scriptSnapshot, scriptTargetOrOptions,
|
|
162657
|
+
function createLanguageServiceSourceFile(fileName, scriptSnapshot, scriptTargetOrOptions, version22, setNodeParents, scriptKind) {
|
|
162658
162658
|
const sourceFile = createSourceFile(fileName, getSnapshotText(scriptSnapshot), scriptTargetOrOptions, setNodeParents, scriptKind);
|
|
162659
|
-
setSourceFileFields(sourceFile, scriptSnapshot,
|
|
162659
|
+
setSourceFileFields(sourceFile, scriptSnapshot, version22);
|
|
162660
162660
|
return sourceFile;
|
|
162661
162661
|
}
|
|
162662
|
-
function updateLanguageServiceSourceFile(sourceFile, scriptSnapshot,
|
|
162662
|
+
function updateLanguageServiceSourceFile(sourceFile, scriptSnapshot, version22, textChangeRange, aggressiveChecks) {
|
|
162663
162663
|
if (textChangeRange) {
|
|
162664
|
-
if (
|
|
162664
|
+
if (version22 !== sourceFile.version) {
|
|
162665
162665
|
let newText;
|
|
162666
162666
|
const prefix = textChangeRange.span.start !== 0 ? sourceFile.text.substr(0, textChangeRange.span.start) : "";
|
|
162667
162667
|
const suffix = textSpanEnd(textChangeRange.span) !== sourceFile.text.length ? sourceFile.text.substr(textSpanEnd(textChangeRange.span)) : "";
|
|
@@ -162672,7 +162672,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
162672
162672
|
newText = prefix && suffix ? prefix + changedText + suffix : prefix ? prefix + changedText : changedText + suffix;
|
|
162673
162673
|
}
|
|
162674
162674
|
const newSourceFile = updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks);
|
|
162675
|
-
setSourceFileFields(newSourceFile, scriptSnapshot,
|
|
162675
|
+
setSourceFileFields(newSourceFile, scriptSnapshot, version22);
|
|
162676
162676
|
newSourceFile.nameTable = void 0;
|
|
162677
162677
|
if (sourceFile !== newSourceFile && sourceFile.scriptSnapshot) {
|
|
162678
162678
|
if (sourceFile.scriptSnapshot.dispose) {
|
|
@@ -162693,7 +162693,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
162693
162693
|
sourceFile.fileName,
|
|
162694
162694
|
scriptSnapshot,
|
|
162695
162695
|
options,
|
|
162696
|
-
|
|
162696
|
+
version22,
|
|
162697
162697
|
/*setNodeParents*/
|
|
162698
162698
|
true,
|
|
162699
162699
|
sourceFile.scriptKind
|
|
@@ -162877,12 +162877,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
162877
162877
|
directoryExists: (directoryName) => {
|
|
162878
162878
|
return directoryProbablyExists(directoryName, host);
|
|
162879
162879
|
},
|
|
162880
|
-
getDirectories: (
|
|
162881
|
-
return host.getDirectories ? host.getDirectories(
|
|
162880
|
+
getDirectories: (path5) => {
|
|
162881
|
+
return host.getDirectories ? host.getDirectories(path5) : [];
|
|
162882
162882
|
},
|
|
162883
|
-
readDirectory: (
|
|
162883
|
+
readDirectory: (path5, extensions, exclude, include, depth) => {
|
|
162884
162884
|
Debug.checkDefined(host.readDirectory, "'LanguageServiceHost.readDirectory' must be implemented to correctly process 'projectReferences'");
|
|
162885
|
-
return host.readDirectory(
|
|
162885
|
+
return host.readDirectory(path5, extensions, exclude, include, depth);
|
|
162886
162886
|
},
|
|
162887
162887
|
onReleaseOldSourceFile,
|
|
162888
162888
|
onReleaseParsedCommandLine,
|
|
@@ -162945,11 +162945,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
162945
162945
|
program2.getTypeChecker();
|
|
162946
162946
|
return;
|
|
162947
162947
|
function getParsedCommandLine(fileName) {
|
|
162948
|
-
const
|
|
162949
|
-
const existing = parsedCommandLines == null ? void 0 : parsedCommandLines.get(
|
|
162948
|
+
const path5 = toPath(fileName, currentDirectory, getCanonicalFileName);
|
|
162949
|
+
const existing = parsedCommandLines == null ? void 0 : parsedCommandLines.get(path5);
|
|
162950
162950
|
if (existing !== void 0) return existing || void 0;
|
|
162951
162951
|
const result = host.getParsedCommandLine ? host.getParsedCommandLine(fileName) : getParsedCommandLineOfConfigFileUsingSourceFile(fileName);
|
|
162952
|
-
(parsedCommandLines || (parsedCommandLines = /* @__PURE__ */ new Map())).set(
|
|
162952
|
+
(parsedCommandLines || (parsedCommandLines = /* @__PURE__ */ new Map())).set(path5, result || false);
|
|
162953
162953
|
return result;
|
|
162954
162954
|
}
|
|
162955
162955
|
function getParsedCommandLineOfConfigFileUsingSourceFile(configFileName) {
|
|
@@ -162991,7 +162991,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
162991
162991
|
function getOrCreateSourceFile(fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile) {
|
|
162992
162992
|
return getOrCreateSourceFileByPath(fileName, toPath(fileName, currentDirectory, getCanonicalFileName), languageVersionOrOptions, onError, shouldCreateNewSourceFile);
|
|
162993
162993
|
}
|
|
162994
|
-
function getOrCreateSourceFileByPath(fileName,
|
|
162994
|
+
function getOrCreateSourceFileByPath(fileName, path5, languageVersionOrOptions, _onError, shouldCreateNewSourceFile) {
|
|
162995
162995
|
Debug.assert(compilerHost, "getOrCreateSourceFileByPath called after typical CompilerHost lifetime, check the callstack something with a reference to an old host.");
|
|
162996
162996
|
const scriptSnapshot = host.getScriptSnapshot(fileName);
|
|
162997
162997
|
if (!scriptSnapshot) {
|
|
@@ -163000,17 +163000,17 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
163000
163000
|
const scriptKind = getScriptKind(fileName, host);
|
|
163001
163001
|
const scriptVersion = host.getScriptVersion(fileName);
|
|
163002
163002
|
if (!shouldCreateNewSourceFile) {
|
|
163003
|
-
const oldSourceFile = program2 && program2.getSourceFileByPath(
|
|
163003
|
+
const oldSourceFile = program2 && program2.getSourceFileByPath(path5);
|
|
163004
163004
|
if (oldSourceFile) {
|
|
163005
163005
|
if (scriptKind === oldSourceFile.scriptKind || releasedScriptKinds.has(oldSourceFile.resolvedPath)) {
|
|
163006
|
-
return documentRegistry.updateDocumentWithKey(fileName,
|
|
163006
|
+
return documentRegistry.updateDocumentWithKey(fileName, path5, host, documentRegistryBucketKey, scriptSnapshot, scriptVersion, scriptKind, languageVersionOrOptions);
|
|
163007
163007
|
} else {
|
|
163008
163008
|
documentRegistry.releaseDocumentWithKey(oldSourceFile.resolvedPath, documentRegistry.getKeyForCompilationSettings(program2.getCompilerOptions()), oldSourceFile.scriptKind, oldSourceFile.impliedNodeFormat);
|
|
163009
163009
|
releasedScriptKinds.add(oldSourceFile.resolvedPath);
|
|
163010
163010
|
}
|
|
163011
163011
|
}
|
|
163012
163012
|
}
|
|
163013
|
-
return documentRegistry.acquireDocumentWithKey(fileName,
|
|
163013
|
+
return documentRegistry.acquireDocumentWithKey(fileName, path5, host, documentRegistryBucketKey, scriptSnapshot, scriptVersion, scriptKind, languageVersionOrOptions);
|
|
163014
163014
|
}
|
|
163015
163015
|
}
|
|
163016
163016
|
function getProgram() {
|
|
@@ -163616,7 +163616,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
163616
163616
|
return isArray(action) ? Promise.all(action.map((a) => applySingleCodeActionCommand(a))) : applySingleCodeActionCommand(action);
|
|
163617
163617
|
}
|
|
163618
163618
|
function applySingleCodeActionCommand(action) {
|
|
163619
|
-
const getPath = (
|
|
163619
|
+
const getPath = (path5) => toPath(path5, currentDirectory, getCanonicalFileName);
|
|
163620
163620
|
Debug.assertEqual(action.type, "install package");
|
|
163621
163621
|
return host.installPackage ? host.installPackage({ fileName: getPath(action.file), packageName: action.packageName }) : Promise.reject("Host does not implement `installPackage`");
|
|
163622
163622
|
}
|
|
@@ -163960,8 +163960,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
163960
163960
|
function isLetterOrDigit(char) {
|
|
163961
163961
|
return char >= 97 && char <= 122 || char >= 65 && char <= 90 || char >= 48 && char <= 57;
|
|
163962
163962
|
}
|
|
163963
|
-
function isNodeModulesFile(
|
|
163964
|
-
return
|
|
163963
|
+
function isNodeModulesFile(path5) {
|
|
163964
|
+
return path5.includes("/node_modules/");
|
|
163965
163965
|
}
|
|
163966
163966
|
}
|
|
163967
163967
|
function getRenameInfo2(fileName, position, preferences) {
|
|
@@ -177595,11 +177595,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
177595
177595
|
}
|
|
177596
177596
|
});
|
|
177597
177597
|
}
|
|
177598
|
-
function generateJSDocParamTagsForDestructuring(
|
|
177598
|
+
function generateJSDocParamTagsForDestructuring(path5, pattern, initializer, dotDotDotToken, isJs, isSnippet, checker, options, preferences) {
|
|
177599
177599
|
if (!isJs) {
|
|
177600
177600
|
return [
|
|
177601
177601
|
getJSDocParamAnnotation(
|
|
177602
|
-
|
|
177602
|
+
path5,
|
|
177603
177603
|
initializer,
|
|
177604
177604
|
dotDotDotToken,
|
|
177605
177605
|
isJs,
|
|
@@ -177613,7 +177613,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
177613
177613
|
)
|
|
177614
177614
|
];
|
|
177615
177615
|
}
|
|
177616
|
-
return patternWorker(
|
|
177616
|
+
return patternWorker(path5, pattern, initializer, dotDotDotToken, { tabstop: 1 });
|
|
177617
177617
|
function patternWorker(path22, pattern2, initializer2, dotDotDotToken2, counter) {
|
|
177618
177618
|
if (isObjectBindingPattern(pattern2) && !dotDotDotToken2) {
|
|
177619
177619
|
const oldTabstop = counter.tabstop;
|
|
@@ -182236,21 +182236,21 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
182236
182236
|
function getFragmentDirectory(fragment) {
|
|
182237
182237
|
return containsSlash(fragment) ? hasTrailingDirectorySeparator(fragment) ? fragment : getDirectoryPath(fragment) : void 0;
|
|
182238
182238
|
}
|
|
182239
|
-
function getCompletionsForPathMapping(
|
|
182240
|
-
const parsedPath = tryParsePattern(
|
|
182239
|
+
function getCompletionsForPathMapping(path5, patterns, fragment, packageDirectory, extensionOptions, isExports, isImports, program2, host, moduleSpecifierResolutionHost) {
|
|
182240
|
+
const parsedPath = tryParsePattern(path5);
|
|
182241
182241
|
if (!parsedPath) {
|
|
182242
182242
|
return emptyArray;
|
|
182243
182243
|
}
|
|
182244
182244
|
if (typeof parsedPath === "string") {
|
|
182245
182245
|
return justPathMappingName(
|
|
182246
|
-
|
|
182246
|
+
path5,
|
|
182247
182247
|
"script"
|
|
182248
182248
|
/* scriptElement */
|
|
182249
182249
|
);
|
|
182250
182250
|
}
|
|
182251
182251
|
const remainingFragment = tryRemovePrefix(fragment, parsedPath.prefix);
|
|
182252
182252
|
if (remainingFragment === void 0) {
|
|
182253
|
-
const starIsFullPathComponent = endsWith(
|
|
182253
|
+
const starIsFullPathComponent = endsWith(path5, "/*");
|
|
182254
182254
|
return starIsFullPathComponent ? justPathMappingName(
|
|
182255
182255
|
parsedPath.prefix,
|
|
182256
182256
|
"directory"
|
|
@@ -182336,9 +182336,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
182336
182336
|
function getDirectoryMatches(directoryName) {
|
|
182337
182337
|
return mapDefined(tryGetDirectories(host, directoryName), (dir) => dir === "node_modules" ? void 0 : directoryResult(dir));
|
|
182338
182338
|
}
|
|
182339
|
-
function trimPrefixAndSuffix(
|
|
182339
|
+
function trimPrefixAndSuffix(path5, prefix) {
|
|
182340
182340
|
return firstDefined(matchingSuffixes, (suffix) => {
|
|
182341
|
-
const inner = withoutStartAndEnd(normalizePath(
|
|
182341
|
+
const inner = withoutStartAndEnd(normalizePath(path5), prefix, suffix);
|
|
182342
182342
|
return inner === void 0 ? void 0 : removeLeadingDirectorySeparator(inner);
|
|
182343
182343
|
});
|
|
182344
182344
|
}
|
|
@@ -182346,8 +182346,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
182346
182346
|
function withoutStartAndEnd(s, start, end) {
|
|
182347
182347
|
return startsWith(s, start) && endsWith(s, end) ? s.slice(start.length, s.length - end.length) : void 0;
|
|
182348
182348
|
}
|
|
182349
|
-
function removeLeadingDirectorySeparator(
|
|
182350
|
-
return
|
|
182349
|
+
function removeLeadingDirectorySeparator(path5) {
|
|
182350
|
+
return path5[0] === directorySeparator ? path5.slice(1) : path5;
|
|
182351
182351
|
}
|
|
182352
182352
|
function getAmbientModuleCompletions(fragment, fragmentDirectory, checker) {
|
|
182353
182353
|
const ambientModules = checker.getAmbientModules().map((sym) => stripQuotes(sym.name));
|
|
@@ -182462,10 +182462,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
182462
182462
|
/* ESNext */
|
|
182463
182463
|
) ? void 0 : createTextSpan(textStart + offset, length2);
|
|
182464
182464
|
}
|
|
182465
|
-
function isPathRelativeToScript(
|
|
182466
|
-
if (
|
|
182467
|
-
const slashIndex =
|
|
182468
|
-
const slashCharCode =
|
|
182465
|
+
function isPathRelativeToScript(path5) {
|
|
182466
|
+
if (path5 && path5.length >= 2 && path5.charCodeAt(0) === 46) {
|
|
182467
|
+
const slashIndex = path5.length >= 3 && path5.charCodeAt(1) === 46 ? 2 : 1;
|
|
182468
|
+
const slashCharCode = path5.charCodeAt(slashIndex);
|
|
182469
182469
|
return slashCharCode === 47 || slashCharCode === 92;
|
|
182470
182470
|
}
|
|
182471
182471
|
return false;
|
|
@@ -186880,7 +186880,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
186880
186880
|
return ts_textChanges_exports.ChangeTracker.with(
|
|
186881
186881
|
{ host, formatContext, preferences },
|
|
186882
186882
|
(changeTracker) => {
|
|
186883
|
-
const parsed = contents.map((c) =>
|
|
186883
|
+
const parsed = contents.map((c) => parse3(sourceFile, c));
|
|
186884
186884
|
const flattenedLocations = focusLocations && flatten(focusLocations);
|
|
186885
186885
|
for (const nodes of parsed) {
|
|
186886
186886
|
placeNodeGroup(
|
|
@@ -186893,7 +186893,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
186893
186893
|
}
|
|
186894
186894
|
);
|
|
186895
186895
|
}
|
|
186896
|
-
function
|
|
186896
|
+
function parse3(sourceFile, content) {
|
|
186897
186897
|
const nodeKinds = [
|
|
186898
186898
|
{
|
|
186899
186899
|
parse: () => createSourceFile(
|
|
@@ -197743,7 +197743,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
197743
197743
|
usingSingleLineStringWriter: () => usingSingleLineStringWriter,
|
|
197744
197744
|
utf16EncodeAsString: () => utf16EncodeAsString,
|
|
197745
197745
|
validateLocaleAndSetLanguage: () => validateLocaleAndSetLanguage,
|
|
197746
|
-
version: () =>
|
|
197746
|
+
version: () => version2,
|
|
197747
197747
|
versionMajorMinor: () => versionMajorMinor,
|
|
197748
197748
|
visitArray: () => visitArray,
|
|
197749
197749
|
visitCommaListElements: () => visitCommaListElements,
|
|
@@ -197768,7 +197768,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
197768
197768
|
var enableDeprecationWarnings = true;
|
|
197769
197769
|
var typeScriptVersion2;
|
|
197770
197770
|
function getTypeScriptVersion() {
|
|
197771
|
-
return typeScriptVersion2 ?? (typeScriptVersion2 = new Version(
|
|
197771
|
+
return typeScriptVersion2 ?? (typeScriptVersion2 = new Version(version2));
|
|
197772
197772
|
}
|
|
197773
197773
|
function formatDeprecationMessage(name, error2, errorAfter, since, message) {
|
|
197774
197774
|
let deprecationMessage = error2 ? "DeprecationError: " : "DeprecationWarning: ";
|
|
@@ -197808,12 +197808,12 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
197808
197808
|
};
|
|
197809
197809
|
}
|
|
197810
197810
|
function createDeprecation(name, options = {}) {
|
|
197811
|
-
const
|
|
197811
|
+
const version22 = typeof options.typeScriptVersion === "string" ? new Version(options.typeScriptVersion) : options.typeScriptVersion ?? getTypeScriptVersion();
|
|
197812
197812
|
const errorAfter = typeof options.errorAfter === "string" ? new Version(options.errorAfter) : options.errorAfter;
|
|
197813
197813
|
const warnAfter = typeof options.warnAfter === "string" ? new Version(options.warnAfter) : options.warnAfter;
|
|
197814
197814
|
const since = typeof options.since === "string" ? new Version(options.since) : options.since ?? warnAfter;
|
|
197815
|
-
const error2 = options.error || errorAfter &&
|
|
197816
|
-
const warn = !warnAfter ||
|
|
197815
|
+
const error2 = options.error || errorAfter && version22.compareTo(errorAfter) >= 0;
|
|
197816
|
+
const warn = !warnAfter || version22.compareTo(warnAfter) >= 0;
|
|
197817
197817
|
return error2 ? createErrorDeprecation(name, errorAfter, since, options.message) : warn ? createWarningDeprecation(name, errorAfter, since, options.message) : noop;
|
|
197818
197818
|
}
|
|
197819
197819
|
function wrapFunction(deprecation, func) {
|
|
@@ -198208,11 +198208,11 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
198208
198208
|
this.log.writeLine(`Adding entry into typings cache: '${packageName}' => '${typingFile}'`);
|
|
198209
198209
|
}
|
|
198210
198210
|
const info = npmLock.packages && getProperty(npmLock.packages, `node_modules/${key}`) || getProperty(npmLock.dependencies, key);
|
|
198211
|
-
const
|
|
198212
|
-
if (!
|
|
198211
|
+
const version22 = info && info.version;
|
|
198212
|
+
if (!version22) {
|
|
198213
198213
|
continue;
|
|
198214
198214
|
}
|
|
198215
|
-
const newTyping = { typingLocation: typingFile, version: new Version(
|
|
198215
|
+
const newTyping = { typingLocation: typingFile, version: new Version(version22) };
|
|
198216
198216
|
this.packageNameToTypingLocation.set(packageName, newTyping);
|
|
198217
198217
|
}
|
|
198218
198218
|
}
|
|
@@ -198277,7 +198277,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
198277
198277
|
this.sendResponse({
|
|
198278
198278
|
kind: EventBeginInstallTypes,
|
|
198279
198279
|
eventId: requestId,
|
|
198280
|
-
typingsInstallerVersion:
|
|
198280
|
+
typingsInstallerVersion: version2,
|
|
198281
198281
|
projectName: req.projectName
|
|
198282
198282
|
});
|
|
198283
198283
|
const scopedTypings = filteredTypings.map(typingsName);
|
|
@@ -198319,7 +198319,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
198319
198319
|
projectName: req.projectName,
|
|
198320
198320
|
packagesToInstall: scopedTypings,
|
|
198321
198321
|
installSuccess: ok,
|
|
198322
|
-
typingsInstallerVersion:
|
|
198322
|
+
typingsInstallerVersion: version2
|
|
198323
198323
|
};
|
|
198324
198324
|
this.sendResponse(response);
|
|
198325
198325
|
}
|
|
@@ -198436,17 +198436,17 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
198436
198436
|
function createNormalizedPathMap() {
|
|
198437
198437
|
const map2 = /* @__PURE__ */ new Map();
|
|
198438
198438
|
return {
|
|
198439
|
-
get(
|
|
198440
|
-
return map2.get(
|
|
198439
|
+
get(path5) {
|
|
198440
|
+
return map2.get(path5);
|
|
198441
198441
|
},
|
|
198442
|
-
set(
|
|
198443
|
-
map2.set(
|
|
198442
|
+
set(path5, value) {
|
|
198443
|
+
map2.set(path5, value);
|
|
198444
198444
|
},
|
|
198445
|
-
contains(
|
|
198446
|
-
return map2.has(
|
|
198445
|
+
contains(path5) {
|
|
198446
|
+
return map2.has(path5);
|
|
198447
198447
|
},
|
|
198448
|
-
remove(
|
|
198449
|
-
map2.delete(
|
|
198448
|
+
remove(path5) {
|
|
198449
|
+
map2.delete(path5);
|
|
198450
198450
|
}
|
|
198451
198451
|
};
|
|
198452
198452
|
}
|
|
@@ -198959,12 +198959,12 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
198959
198959
|
return fileName[0] === "^" || (fileName.includes("walkThroughSnippet:/") || fileName.includes("untitled:/")) && getBaseFileName(fileName)[0] === "^" || fileName.includes(":^") && !fileName.includes(directorySeparator);
|
|
198960
198960
|
}
|
|
198961
198961
|
var ScriptInfo = class {
|
|
198962
|
-
constructor(host, fileName, scriptKind, hasMixedContent,
|
|
198962
|
+
constructor(host, fileName, scriptKind, hasMixedContent, path5, initialVersion) {
|
|
198963
198963
|
this.host = host;
|
|
198964
198964
|
this.fileName = fileName;
|
|
198965
198965
|
this.scriptKind = scriptKind;
|
|
198966
198966
|
this.hasMixedContent = hasMixedContent;
|
|
198967
|
-
this.path =
|
|
198967
|
+
this.path = path5;
|
|
198968
198968
|
this.containingProjects = [];
|
|
198969
198969
|
this.isDynamic = isDynamicFileName(fileName);
|
|
198970
198970
|
this.textStorage = new TextStorage(host, this, initialVersion);
|
|
@@ -199599,8 +199599,8 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
199599
199599
|
useCaseSensitiveFileNames() {
|
|
199600
199600
|
return this.projectService.host.useCaseSensitiveFileNames;
|
|
199601
199601
|
}
|
|
199602
|
-
readDirectory(
|
|
199603
|
-
return this.directoryStructureHost.readDirectory(
|
|
199602
|
+
readDirectory(path5, extensions, exclude, include, depth) {
|
|
199603
|
+
return this.directoryStructureHost.readDirectory(path5, extensions, exclude, include, depth);
|
|
199604
199604
|
}
|
|
199605
199605
|
readFile(fileName) {
|
|
199606
199606
|
return this.projectService.host.readFile(fileName);
|
|
@@ -199609,8 +199609,8 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
199609
199609
|
return this.projectService.host.writeFile(fileName, content);
|
|
199610
199610
|
}
|
|
199611
199611
|
fileExists(file) {
|
|
199612
|
-
const
|
|
199613
|
-
return !!this.projectService.getScriptInfoForPath(
|
|
199612
|
+
const path5 = this.toPath(file);
|
|
199613
|
+
return !!this.projectService.getScriptInfoForPath(path5) || !this.isWatchedMissingFile(path5) && this.directoryStructureHost.fileExists(file);
|
|
199614
199614
|
}
|
|
199615
199615
|
/** @internal */
|
|
199616
199616
|
resolveModuleNameLiterals(moduleLiterals, containingFile, redirectedReference, options, containingSourceFile, reusedNames) {
|
|
@@ -199635,11 +199635,11 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
199635
199635
|
resolveLibrary(libraryName, resolveFrom, options, libFileName) {
|
|
199636
199636
|
return this.resolutionCache.resolveLibrary(libraryName, resolveFrom, options, libFileName);
|
|
199637
199637
|
}
|
|
199638
|
-
directoryExists(
|
|
199639
|
-
return this.directoryStructureHost.directoryExists(
|
|
199638
|
+
directoryExists(path5) {
|
|
199639
|
+
return this.directoryStructureHost.directoryExists(path5);
|
|
199640
199640
|
}
|
|
199641
|
-
getDirectories(
|
|
199642
|
-
return this.directoryStructureHost.getDirectories(
|
|
199641
|
+
getDirectories(path5) {
|
|
199642
|
+
return this.directoryStructureHost.getDirectories(path5);
|
|
199643
199643
|
}
|
|
199644
199644
|
/** @internal */
|
|
199645
199645
|
getCachedDirectoryStructureHost() {
|
|
@@ -199902,16 +199902,16 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
199902
199902
|
}
|
|
199903
199903
|
}));
|
|
199904
199904
|
}
|
|
199905
|
-
getSourceFile(
|
|
199905
|
+
getSourceFile(path5) {
|
|
199906
199906
|
if (!this.program) {
|
|
199907
199907
|
return void 0;
|
|
199908
199908
|
}
|
|
199909
|
-
return this.program.getSourceFileByPath(
|
|
199909
|
+
return this.program.getSourceFileByPath(path5);
|
|
199910
199910
|
}
|
|
199911
199911
|
/** @internal */
|
|
199912
|
-
getSourceFileOrConfigFile(
|
|
199912
|
+
getSourceFileOrConfigFile(path5) {
|
|
199913
199913
|
const options = this.program.getCompilerOptions();
|
|
199914
|
-
return
|
|
199914
|
+
return path5 === options.configFilePath ? options.configFile : this.getSourceFile(path5);
|
|
199915
199915
|
}
|
|
199916
199916
|
close() {
|
|
199917
199917
|
var _a;
|
|
@@ -200088,8 +200088,8 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
200088
200088
|
}
|
|
200089
200089
|
// add a root file that doesnt exist on host
|
|
200090
200090
|
addMissingFileRoot(fileName) {
|
|
200091
|
-
const
|
|
200092
|
-
this.rootFilesMap.set(
|
|
200091
|
+
const path5 = this.projectService.toPath(fileName);
|
|
200092
|
+
this.rootFilesMap.set(path5, { fileName });
|
|
200093
200093
|
this.markAsDirty();
|
|
200094
200094
|
}
|
|
200095
200095
|
removeFile(info, fileExists, detachFromProject) {
|
|
@@ -200255,22 +200255,22 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
200255
200255
|
const toRemove = new Map(this.typingWatchers);
|
|
200256
200256
|
if (!this.typingWatchers) this.typingWatchers = /* @__PURE__ */ new Map();
|
|
200257
200257
|
this.typingWatchers.isInvoked = false;
|
|
200258
|
-
const createProjectWatcher = (
|
|
200259
|
-
const canonicalPath = this.toPath(
|
|
200258
|
+
const createProjectWatcher = (path5, typingsWatcherType) => {
|
|
200259
|
+
const canonicalPath = this.toPath(path5);
|
|
200260
200260
|
toRemove.delete(canonicalPath);
|
|
200261
200261
|
if (!this.typingWatchers.has(canonicalPath)) {
|
|
200262
200262
|
const watchType = typingsWatcherType === "FileWatcher" ? WatchType.TypingInstallerLocationFile : WatchType.TypingInstallerLocationDirectory;
|
|
200263
200263
|
this.typingWatchers.set(
|
|
200264
200264
|
canonicalPath,
|
|
200265
200265
|
canWatchDirectoryOrFilePath(canonicalPath) ? typingsWatcherType === "FileWatcher" ? this.projectService.watchFactory.watchFile(
|
|
200266
|
-
|
|
200266
|
+
path5,
|
|
200267
200267
|
() => !this.typingWatchers.isInvoked ? this.onTypingInstallerWatchInvoke() : this.writeLog(`TypingWatchers already invoked`),
|
|
200268
200268
|
2e3,
|
|
200269
200269
|
this.projectService.getWatchOptions(this),
|
|
200270
200270
|
watchType,
|
|
200271
200271
|
this
|
|
200272
200272
|
) : this.projectService.watchFactory.watchDirectory(
|
|
200273
|
-
|
|
200273
|
+
path5,
|
|
200274
200274
|
(f) => {
|
|
200275
200275
|
if (this.typingWatchers.isInvoked) return this.writeLog(`TypingWatchers already invoked`);
|
|
200276
200276
|
if (!fileExtensionIs(
|
|
@@ -200285,7 +200285,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
200285
200285
|
this.projectService.getWatchOptions(this),
|
|
200286
200286
|
watchType,
|
|
200287
200287
|
this
|
|
200288
|
-
) : (this.writeLog(`Skipping watcher creation at ${
|
|
200288
|
+
) : (this.writeLog(`Skipping watcher creation at ${path5}:: ${getDetailWatchInfo(watchType, this)}`), noopFileWatcher)
|
|
200289
200289
|
);
|
|
200290
200290
|
}
|
|
200291
200291
|
};
|
|
@@ -200330,9 +200330,9 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
200330
200330
|
/* DirectoryWatcher */
|
|
200331
200331
|
);
|
|
200332
200332
|
}
|
|
200333
|
-
toRemove.forEach((watch,
|
|
200333
|
+
toRemove.forEach((watch, path5) => {
|
|
200334
200334
|
watch.close();
|
|
200335
|
-
this.typingWatchers.delete(
|
|
200335
|
+
this.typingWatchers.delete(path5);
|
|
200336
200336
|
});
|
|
200337
200337
|
}
|
|
200338
200338
|
/** @internal */
|
|
@@ -200366,9 +200366,9 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
200366
200366
|
let hasNewProgram = false;
|
|
200367
200367
|
if (this.program && (!oldProgram || this.program !== oldProgram && this.program.structureIsReused !== 2)) {
|
|
200368
200368
|
hasNewProgram = true;
|
|
200369
|
-
this.rootFilesMap.forEach((value,
|
|
200369
|
+
this.rootFilesMap.forEach((value, path5) => {
|
|
200370
200370
|
var _a2;
|
|
200371
|
-
const file = this.program.getSourceFileByPath(
|
|
200371
|
+
const file = this.program.getSourceFileByPath(path5);
|
|
200372
200372
|
const info = value.info;
|
|
200373
200373
|
if (!file || ((_a2 = value.info) == null ? void 0 : _a2.path) === file.resolvedPath) return;
|
|
200374
200374
|
value.info = this.projectService.getScriptInfo(file.fileName);
|
|
@@ -200524,8 +200524,8 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
200524
200524
|
);
|
|
200525
200525
|
return fileWatcher;
|
|
200526
200526
|
}
|
|
200527
|
-
isWatchedMissingFile(
|
|
200528
|
-
return !!this.missingFilesMap && this.missingFilesMap.has(
|
|
200527
|
+
isWatchedMissingFile(path5) {
|
|
200528
|
+
return !!this.missingFilesMap && this.missingFilesMap.has(path5);
|
|
200529
200529
|
}
|
|
200530
200530
|
/** @internal */
|
|
200531
200531
|
addGeneratedFileWatch(generatedFile, sourceFile) {
|
|
@@ -200534,17 +200534,17 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
200534
200534
|
this.generatedFilesMap = this.createGeneratedFileWatcher(generatedFile);
|
|
200535
200535
|
}
|
|
200536
200536
|
} else {
|
|
200537
|
-
const
|
|
200537
|
+
const path5 = this.toPath(sourceFile);
|
|
200538
200538
|
if (this.generatedFilesMap) {
|
|
200539
200539
|
if (isGeneratedFileWatcher(this.generatedFilesMap)) {
|
|
200540
200540
|
Debug.fail(`${this.projectName} Expected to not have --out watcher for generated file with options: ${JSON.stringify(this.compilerOptions)}`);
|
|
200541
200541
|
return;
|
|
200542
200542
|
}
|
|
200543
|
-
if (this.generatedFilesMap.has(
|
|
200543
|
+
if (this.generatedFilesMap.has(path5)) return;
|
|
200544
200544
|
} else {
|
|
200545
200545
|
this.generatedFilesMap = /* @__PURE__ */ new Map();
|
|
200546
200546
|
}
|
|
200547
|
-
this.generatedFilesMap.set(
|
|
200547
|
+
this.generatedFilesMap.set(path5, this.createGeneratedFileWatcher(generatedFile));
|
|
200548
200548
|
}
|
|
200549
200549
|
}
|
|
200550
200550
|
createGeneratedFileWatcher(generatedFile) {
|
|
@@ -200944,7 +200944,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
200944
200944
|
isDefaultProjectForOpenFiles() {
|
|
200945
200945
|
return !!forEachEntry(
|
|
200946
200946
|
this.projectService.openFiles,
|
|
200947
|
-
(_projectRootPath,
|
|
200947
|
+
(_projectRootPath, path5) => this.projectService.tryGetDefaultProjectForFile(this.projectService.getScriptInfoForPath(path5)) === this
|
|
200948
200948
|
);
|
|
200949
200949
|
}
|
|
200950
200950
|
/** @internal */
|
|
@@ -202118,33 +202118,33 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
202118
202118
|
getCurrentDirectory: () => service.host.getCurrentDirectory(),
|
|
202119
202119
|
useCaseSensitiveFileNames: service.host.useCaseSensitiveFileNames
|
|
202120
202120
|
};
|
|
202121
|
-
function watchFile2(
|
|
202121
|
+
function watchFile2(path5, callback) {
|
|
202122
202122
|
return getOrCreateFileWatcher(
|
|
202123
202123
|
watchedFiles,
|
|
202124
|
-
|
|
202124
|
+
path5,
|
|
202125
202125
|
callback,
|
|
202126
|
-
(id) => ({ eventName: CreateFileWatcherEvent, data: { id, path:
|
|
202126
|
+
(id) => ({ eventName: CreateFileWatcherEvent, data: { id, path: path5 } })
|
|
202127
202127
|
);
|
|
202128
202128
|
}
|
|
202129
|
-
function watchDirectory(
|
|
202129
|
+
function watchDirectory(path5, callback, recursive) {
|
|
202130
202130
|
return getOrCreateFileWatcher(
|
|
202131
202131
|
recursive ? watchedDirectoriesRecursive : watchedDirectories,
|
|
202132
|
-
|
|
202132
|
+
path5,
|
|
202133
202133
|
callback,
|
|
202134
202134
|
(id) => ({
|
|
202135
202135
|
eventName: CreateDirectoryWatcherEvent,
|
|
202136
202136
|
data: {
|
|
202137
202137
|
id,
|
|
202138
|
-
path:
|
|
202138
|
+
path: path5,
|
|
202139
202139
|
recursive: !!recursive,
|
|
202140
202140
|
// Special case node_modules as we watch it for changes to closed script infos as well
|
|
202141
|
-
ignoreUpdate: !
|
|
202141
|
+
ignoreUpdate: !path5.endsWith("/node_modules") ? true : void 0
|
|
202142
202142
|
}
|
|
202143
202143
|
})
|
|
202144
202144
|
);
|
|
202145
202145
|
}
|
|
202146
|
-
function getOrCreateFileWatcher({ pathToId, idToCallbacks },
|
|
202147
|
-
const key = service.toPath(
|
|
202146
|
+
function getOrCreateFileWatcher({ pathToId, idToCallbacks }, path5, callback, event) {
|
|
202147
|
+
const key = service.toPath(path5);
|
|
202148
202148
|
let id = pathToId.get(key);
|
|
202149
202149
|
if (!id) pathToId.set(key, id = ids++);
|
|
202150
202150
|
let callbacks = idToCallbacks.get(id);
|
|
@@ -202313,13 +202313,13 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
202313
202313
|
return getNormalizedAbsolutePath(fileName, this.host.getCurrentDirectory());
|
|
202314
202314
|
}
|
|
202315
202315
|
/** @internal */
|
|
202316
|
-
setDocument(key,
|
|
202317
|
-
const info = Debug.checkDefined(this.getScriptInfoForPath(
|
|
202316
|
+
setDocument(key, path5, sourceFile) {
|
|
202317
|
+
const info = Debug.checkDefined(this.getScriptInfoForPath(path5));
|
|
202318
202318
|
info.cacheSourceFile = { key, sourceFile };
|
|
202319
202319
|
}
|
|
202320
202320
|
/** @internal */
|
|
202321
|
-
getDocument(key,
|
|
202322
|
-
const info = this.getScriptInfoForPath(
|
|
202321
|
+
getDocument(key, path5) {
|
|
202322
|
+
const info = this.getScriptInfoForPath(path5);
|
|
202323
202323
|
return info && info.cacheSourceFile && info.cacheSourceFile.key === key ? info.cacheSourceFile.sourceFile : void 0;
|
|
202324
202324
|
}
|
|
202325
202325
|
/** @internal */
|
|
@@ -202441,7 +202441,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
202441
202441
|
const event = {
|
|
202442
202442
|
eventName: ProjectsUpdatedInBackgroundEvent,
|
|
202443
202443
|
data: {
|
|
202444
|
-
openFiles: arrayFrom(this.openFiles.keys(), (
|
|
202444
|
+
openFiles: arrayFrom(this.openFiles.keys(), (path5) => this.getScriptInfoForPath(path5).fileName)
|
|
202445
202445
|
}
|
|
202446
202446
|
};
|
|
202447
202447
|
this.eventHandler(event);
|
|
@@ -202663,11 +202663,11 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
202663
202663
|
}
|
|
202664
202664
|
delayUpdateSourceInfoProjects(sourceInfos) {
|
|
202665
202665
|
if (sourceInfos) {
|
|
202666
|
-
sourceInfos.forEach((_value,
|
|
202666
|
+
sourceInfos.forEach((_value, path5) => this.delayUpdateProjectsOfScriptInfoPath(path5));
|
|
202667
202667
|
}
|
|
202668
202668
|
}
|
|
202669
|
-
delayUpdateProjectsOfScriptInfoPath(
|
|
202670
|
-
const info = this.getScriptInfoForPath(
|
|
202669
|
+
delayUpdateProjectsOfScriptInfoPath(path5) {
|
|
202670
|
+
const info = this.getScriptInfoForPath(path5);
|
|
202671
202671
|
if (info) {
|
|
202672
202672
|
this.delayUpdateProjectGraphs(
|
|
202673
202673
|
info.containingProjects,
|
|
@@ -202761,8 +202761,8 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
202761
202761
|
const project = this.getConfiguredProjectByCanonicalConfigFilePath(projectCanonicalPath);
|
|
202762
202762
|
if (!project) return;
|
|
202763
202763
|
if (configuredProjectForConfig !== project && this.getHostPreferences().includeCompletionsForModuleExports) {
|
|
202764
|
-
const
|
|
202765
|
-
if (find((_a = project.getCurrentProgram()) == null ? void 0 : _a.getResolvedProjectReferences(), (ref) => (ref == null ? void 0 : ref.sourceFile.path) ===
|
|
202764
|
+
const path5 = this.toPath(configFileName);
|
|
202765
|
+
if (find((_a = project.getCurrentProgram()) == null ? void 0 : _a.getResolvedProjectReferences(), (ref) => (ref == null ? void 0 : ref.sourceFile.path) === path5)) {
|
|
202766
202766
|
project.markAutoImportProviderAsDirty();
|
|
202767
202767
|
}
|
|
202768
202768
|
}
|
|
@@ -202817,10 +202817,10 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
202817
202817
|
});
|
|
202818
202818
|
return;
|
|
202819
202819
|
}
|
|
202820
|
-
const
|
|
202821
|
-
project.resolutionCache.removeResolutionsFromProjectReferenceRedirects(
|
|
202820
|
+
const path5 = this.toPath(canonicalConfigFilePath);
|
|
202821
|
+
project.resolutionCache.removeResolutionsFromProjectReferenceRedirects(path5);
|
|
202822
202822
|
this.delayUpdateProjectGraph(project);
|
|
202823
|
-
if (this.getHostPreferences().includeCompletionsForModuleExports && find((_c = project.getCurrentProgram()) == null ? void 0 : _c.getResolvedProjectReferences(), (ref) => (ref == null ? void 0 : ref.sourceFile.path) ===
|
|
202823
|
+
if (this.getHostPreferences().includeCompletionsForModuleExports && find((_c = project.getCurrentProgram()) == null ? void 0 : _c.getResolvedProjectReferences(), (ref) => (ref == null ? void 0 : ref.sourceFile.path) === path5)) {
|
|
202824
202824
|
project.markAutoImportProviderAsDirty();
|
|
202825
202825
|
}
|
|
202826
202826
|
}
|
|
@@ -202845,20 +202845,20 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
202845
202845
|
canonicalConfigFilePath,
|
|
202846
202846
|
"Change in config file detected"
|
|
202847
202847
|
);
|
|
202848
|
-
this.openFiles.forEach((_projectRootPath,
|
|
202848
|
+
this.openFiles.forEach((_projectRootPath, path5) => {
|
|
202849
202849
|
var _a, _b;
|
|
202850
|
-
const configFileForOpenFile = this.configFileForOpenFiles.get(
|
|
202851
|
-
if (!((_a = configFileExistenceInfo.openFilesImpactedByConfigFile) == null ? void 0 : _a.has(
|
|
202852
|
-
this.configFileForOpenFiles.delete(
|
|
202853
|
-
const info = this.getScriptInfoForPath(
|
|
202850
|
+
const configFileForOpenFile = this.configFileForOpenFiles.get(path5);
|
|
202851
|
+
if (!((_a = configFileExistenceInfo.openFilesImpactedByConfigFile) == null ? void 0 : _a.has(path5))) return;
|
|
202852
|
+
this.configFileForOpenFiles.delete(path5);
|
|
202853
|
+
const info = this.getScriptInfoForPath(path5);
|
|
202854
202854
|
const newConfigFileNameForInfo = this.getConfigFileNameForFile(
|
|
202855
202855
|
info,
|
|
202856
202856
|
/*findFromCacheOnly*/
|
|
202857
202857
|
false
|
|
202858
202858
|
);
|
|
202859
202859
|
if (!newConfigFileNameForInfo) return;
|
|
202860
|
-
if (!((_b = this.pendingOpenFileProjectUpdates) == null ? void 0 : _b.has(
|
|
202861
|
-
(this.pendingOpenFileProjectUpdates ?? (this.pendingOpenFileProjectUpdates = /* @__PURE__ */ new Map())).set(
|
|
202860
|
+
if (!((_b = this.pendingOpenFileProjectUpdates) == null ? void 0 : _b.has(path5))) {
|
|
202861
|
+
(this.pendingOpenFileProjectUpdates ?? (this.pendingOpenFileProjectUpdates = /* @__PURE__ */ new Map())).set(path5, configFileForOpenFile);
|
|
202862
202862
|
}
|
|
202863
202863
|
});
|
|
202864
202864
|
this.delayEnsureProjectForOpenFiles();
|
|
@@ -202953,8 +202953,8 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
202953
202953
|
return project;
|
|
202954
202954
|
}
|
|
202955
202955
|
assignOrphanScriptInfosToInferredProject() {
|
|
202956
|
-
this.openFiles.forEach((projectRootPath,
|
|
202957
|
-
const info = this.getScriptInfoForPath(
|
|
202956
|
+
this.openFiles.forEach((projectRootPath, path5) => {
|
|
202957
|
+
const info = this.getScriptInfoForPath(path5);
|
|
202958
202958
|
if (info.isOrphan()) {
|
|
202959
202959
|
this.assignOrphanScriptInfoToInferredProject(info, projectRootPath);
|
|
202960
202960
|
}
|
|
@@ -203266,8 +203266,8 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
203266
203266
|
this.configuredProjects.forEach(printProjectWithoutFileNames);
|
|
203267
203267
|
this.inferredProjects.forEach(printProjectWithoutFileNames);
|
|
203268
203268
|
this.logger.info("Open files: ");
|
|
203269
|
-
this.openFiles.forEach((projectRootPath,
|
|
203270
|
-
const info = this.getScriptInfoForPath(
|
|
203269
|
+
this.openFiles.forEach((projectRootPath, path5) => {
|
|
203270
|
+
const info = this.getScriptInfoForPath(path5);
|
|
203271
203271
|
this.logger.info(` FileName: ${info.fileName} ProjectRootPath: ${projectRootPath}`);
|
|
203272
203272
|
this.logger.info(` Projects: ${info.containingProjects.map((p) => p.getProjectName())}`);
|
|
203273
203273
|
});
|
|
@@ -203358,7 +203358,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
203358
203358
|
configFileName: configFileName(),
|
|
203359
203359
|
projectType: project instanceof ExternalProject ? "external" : "configured",
|
|
203360
203360
|
languageServiceEnabled: project.languageServiceEnabled,
|
|
203361
|
-
version
|
|
203361
|
+
version: version2
|
|
203362
203362
|
};
|
|
203363
203363
|
this.eventHandler({ eventName: ProjectInfoTelemetryEvent, data });
|
|
203364
203364
|
function configFileName() {
|
|
@@ -203593,12 +203593,12 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
203593
203593
|
const newRootFile = propertyReader.getFileName(f);
|
|
203594
203594
|
const fileName = toNormalizedPath(newRootFile);
|
|
203595
203595
|
const isDynamic = isDynamicFileName(fileName);
|
|
203596
|
-
let
|
|
203596
|
+
let path5;
|
|
203597
203597
|
if (!isDynamic && !project.fileExists(newRootFile)) {
|
|
203598
|
-
|
|
203599
|
-
const existingValue = projectRootFilesMap.get(
|
|
203598
|
+
path5 = normalizedPathToPath(fileName, this.currentDirectory, this.toCanonicalFileName);
|
|
203599
|
+
const existingValue = projectRootFilesMap.get(path5);
|
|
203600
203600
|
if (existingValue) {
|
|
203601
|
-
if (((_a = existingValue.info) == null ? void 0 : _a.path) ===
|
|
203601
|
+
if (((_a = existingValue.info) == null ? void 0 : _a.path) === path5) {
|
|
203602
203602
|
project.removeFile(
|
|
203603
203603
|
existingValue.info,
|
|
203604
203604
|
/*fileExists*/
|
|
@@ -203610,7 +203610,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
203610
203610
|
}
|
|
203611
203611
|
existingValue.fileName = fileName;
|
|
203612
203612
|
} else {
|
|
203613
|
-
projectRootFilesMap.set(
|
|
203613
|
+
projectRootFilesMap.set(path5, { fileName });
|
|
203614
203614
|
}
|
|
203615
203615
|
} else {
|
|
203616
203616
|
const scriptKind = propertyReader.getScriptKind(f, this.hostConfiguration.extraFileExtensions);
|
|
@@ -203624,8 +203624,8 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
203624
203624
|
/*deferredDeleteOk*/
|
|
203625
203625
|
false
|
|
203626
203626
|
));
|
|
203627
|
-
|
|
203628
|
-
const existingValue = projectRootFilesMap.get(
|
|
203627
|
+
path5 = scriptInfo.path;
|
|
203628
|
+
const existingValue = projectRootFilesMap.get(path5);
|
|
203629
203629
|
if (!existingValue || existingValue.info !== scriptInfo) {
|
|
203630
203630
|
project.addRoot(scriptInfo, fileName);
|
|
203631
203631
|
if (scriptInfo.isScriptOpen()) {
|
|
@@ -203635,11 +203635,11 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
203635
203635
|
existingValue.fileName = fileName;
|
|
203636
203636
|
}
|
|
203637
203637
|
}
|
|
203638
|
-
newRootScriptInfoMap.set(
|
|
203638
|
+
newRootScriptInfoMap.set(path5, true);
|
|
203639
203639
|
}
|
|
203640
203640
|
if (projectRootFilesMap.size > newRootScriptInfoMap.size) {
|
|
203641
|
-
projectRootFilesMap.forEach((value,
|
|
203642
|
-
if (!newRootScriptInfoMap.has(
|
|
203641
|
+
projectRootFilesMap.forEach((value, path5) => {
|
|
203642
|
+
if (!newRootScriptInfoMap.has(path5)) {
|
|
203643
203643
|
if (value.info) {
|
|
203644
203644
|
project.removeFile(
|
|
203645
203645
|
value.info,
|
|
@@ -203648,7 +203648,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
203648
203648
|
true
|
|
203649
203649
|
);
|
|
203650
203650
|
} else {
|
|
203651
|
-
projectRootFilesMap.delete(
|
|
203651
|
+
projectRootFilesMap.delete(path5);
|
|
203652
203652
|
}
|
|
203653
203653
|
}
|
|
203654
203654
|
});
|
|
@@ -203885,8 +203885,8 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
203885
203885
|
}
|
|
203886
203886
|
/** @internal */
|
|
203887
203887
|
getScriptInfoOrConfig(uncheckedFileName) {
|
|
203888
|
-
const
|
|
203889
|
-
const info = this.getScriptInfoForNormalizedPath(
|
|
203888
|
+
const path5 = toNormalizedPath(uncheckedFileName);
|
|
203889
|
+
const info = this.getScriptInfoForNormalizedPath(path5);
|
|
203890
203890
|
if (info) return info;
|
|
203891
203891
|
const configProject = this.configuredProjects.get(this.toPath(uncheckedFileName));
|
|
203892
203892
|
return configProject && configProject.getCompilerOptions().configFile;
|
|
@@ -203898,7 +203898,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
203898
203898
|
this.filenameToScriptInfo.entries(),
|
|
203899
203899
|
(entry) => entry[1].deferredDelete ? void 0 : entry
|
|
203900
203900
|
),
|
|
203901
|
-
([
|
|
203901
|
+
([path5, scriptInfo]) => ({ path: path5, fileName: scriptInfo.fileName })
|
|
203902
203902
|
);
|
|
203903
203903
|
this.logger.msg(
|
|
203904
203904
|
`Could not find file ${JSON.stringify(fileName)}.
|
|
@@ -203930,7 +203930,7 @@ All files are: ${JSON.stringify(names)}`,
|
|
|
203930
203930
|
if (!projects) {
|
|
203931
203931
|
projects = createMultiMap();
|
|
203932
203932
|
projects.add(toAddInfo.path, project);
|
|
203933
|
-
} else if (!forEachEntry(projects, (projs,
|
|
203933
|
+
} else if (!forEachEntry(projects, (projs, path5) => path5 === toAddInfo.path ? false : contains(projs, project))) {
|
|
203934
203934
|
projects.add(toAddInfo.path, project);
|
|
203935
203935
|
}
|
|
203936
203936
|
}
|
|
@@ -204092,8 +204092,8 @@ All files are: ${JSON.stringify(names)}`,
|
|
|
204092
204092
|
}
|
|
204093
204093
|
getOrCreateScriptInfoWorker(fileName, currentDirectory, openedByClient, fileContent, scriptKind, hasMixedContent, hostToQueryFileExistsOn, deferredDeleteOk) {
|
|
204094
204094
|
Debug.assert(fileContent === void 0 || openedByClient, "ScriptInfo needs to be opened by client to be able to set its user defined content");
|
|
204095
|
-
const
|
|
204096
|
-
let info = this.filenameToScriptInfo.get(
|
|
204095
|
+
const path5 = normalizedPathToPath(fileName, currentDirectory, this.toCanonicalFileName);
|
|
204096
|
+
let info = this.filenameToScriptInfo.get(path5);
|
|
204097
204097
|
if (!info) {
|
|
204098
204098
|
const isDynamic = isDynamicFileName(fileName);
|
|
204099
204099
|
Debug.assert(isRootedDiskPath(fileName) || isDynamic || openedByClient, "", () => `${JSON.stringify({ fileName, currentDirectory, hostCurrentDirectory: this.currentDirectory, openKeys: arrayFrom(this.openFilesWithNonRootedDiskPath.keys()) })}
|
|
@@ -204105,7 +204105,7 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
204105
204105
|
if (!openedByClient && !isDynamic && !(hostToQueryFileExistsOn || this.host).fileExists(fileName)) {
|
|
204106
204106
|
return;
|
|
204107
204107
|
}
|
|
204108
|
-
info = new ScriptInfo(this.host, fileName, scriptKind, hasMixedContent,
|
|
204108
|
+
info = new ScriptInfo(this.host, fileName, scriptKind, hasMixedContent, path5, this.filenameToScriptInfoVersion.get(path5));
|
|
204109
204109
|
this.filenameToScriptInfo.set(info.path, info);
|
|
204110
204110
|
this.filenameToScriptInfoVersion.delete(info.path);
|
|
204111
204111
|
if (!openedByClient) {
|
|
@@ -204252,9 +204252,9 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
204252
204252
|
getSourceFileLike(fileName, projectNameOrProject, declarationInfo) {
|
|
204253
204253
|
const project = projectNameOrProject.projectName ? projectNameOrProject : this.findProject(projectNameOrProject);
|
|
204254
204254
|
if (project) {
|
|
204255
|
-
const
|
|
204256
|
-
const sourceFile = project.getSourceFile(
|
|
204257
|
-
if (sourceFile && sourceFile.resolvedPath ===
|
|
204255
|
+
const path5 = project.toPath(fileName);
|
|
204256
|
+
const sourceFile = project.getSourceFile(path5);
|
|
204257
|
+
if (sourceFile && sourceFile.resolvedPath === path5) return sourceFile;
|
|
204258
204258
|
}
|
|
204259
204259
|
const info = this.getOrCreateScriptInfoNotOpenedByClient(
|
|
204260
204260
|
fileName,
|
|
@@ -204420,8 +204420,8 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
204420
204420
|
}
|
|
204421
204421
|
});
|
|
204422
204422
|
});
|
|
204423
|
-
this.openFiles.forEach((_projectRootPath,
|
|
204424
|
-
const info = this.getScriptInfoForPath(
|
|
204423
|
+
this.openFiles.forEach((_projectRootPath, path5) => {
|
|
204424
|
+
const info = this.getScriptInfoForPath(path5);
|
|
204425
204425
|
if (find(info.containingProjects, isExternalProject)) return;
|
|
204426
204426
|
this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(
|
|
204427
204427
|
info,
|
|
@@ -204474,14 +204474,14 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
204474
204474
|
const pendingOpenFileProjectUpdates = this.pendingOpenFileProjectUpdates;
|
|
204475
204475
|
this.pendingOpenFileProjectUpdates = void 0;
|
|
204476
204476
|
pendingOpenFileProjectUpdates == null ? void 0 : pendingOpenFileProjectUpdates.forEach(
|
|
204477
|
-
(_config,
|
|
204478
|
-
this.getScriptInfoForPath(
|
|
204477
|
+
(_config, path5) => this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(
|
|
204478
|
+
this.getScriptInfoForPath(path5),
|
|
204479
204479
|
5
|
|
204480
204480
|
/* Create */
|
|
204481
204481
|
)
|
|
204482
204482
|
);
|
|
204483
|
-
this.openFiles.forEach((projectRootPath,
|
|
204484
|
-
const info = this.getScriptInfoForPath(
|
|
204483
|
+
this.openFiles.forEach((projectRootPath, path5) => {
|
|
204484
|
+
const info = this.getScriptInfoForPath(path5);
|
|
204485
204485
|
if (info.isOrphan()) {
|
|
204486
204486
|
this.assignOrphanScriptInfoToInferredProject(info, projectRootPath);
|
|
204487
204487
|
} else {
|
|
@@ -204992,9 +204992,9 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
204992
204992
|
}
|
|
204993
204993
|
});
|
|
204994
204994
|
if (!toRemoveConfiguredProjects.size) return toRemoveConfiguredProjects;
|
|
204995
|
-
forEachEntry(this.openFiles, (_projectRootPath,
|
|
204996
|
-
if (openFilesWithRetainedConfiguredProject == null ? void 0 : openFilesWithRetainedConfiguredProject.has(
|
|
204997
|
-
const info = this.getScriptInfoForPath(
|
|
204995
|
+
forEachEntry(this.openFiles, (_projectRootPath, path5) => {
|
|
204996
|
+
if (openFilesWithRetainedConfiguredProject == null ? void 0 : openFilesWithRetainedConfiguredProject.has(path5)) return;
|
|
204997
|
+
const info = this.getScriptInfoForPath(path5);
|
|
204998
204998
|
if (find(info.containingProjects, isExternalProject)) return;
|
|
204999
204999
|
const result = this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(
|
|
205000
205000
|
info,
|
|
@@ -205043,8 +205043,8 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
205043
205043
|
sourceInfos = info.sourceMapFilePath.sourceInfos;
|
|
205044
205044
|
}
|
|
205045
205045
|
if (!sourceInfos) return;
|
|
205046
|
-
if (!forEachKey(sourceInfos, (
|
|
205047
|
-
const info2 = this.getScriptInfoForPath(
|
|
205046
|
+
if (!forEachKey(sourceInfos, (path5) => {
|
|
205047
|
+
const info2 = this.getScriptInfoForPath(path5);
|
|
205048
205048
|
return !!info2 && (info2.isScriptOpen() || !info2.isOrphan());
|
|
205049
205049
|
})) {
|
|
205050
205050
|
return;
|
|
@@ -205068,7 +205068,7 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
205068
205068
|
sourceInfos = info.sourceMapFilePath.sourceInfos;
|
|
205069
205069
|
}
|
|
205070
205070
|
if (sourceInfos) {
|
|
205071
|
-
sourceInfos.forEach((_value,
|
|
205071
|
+
sourceInfos.forEach((_value, path5) => toRemoveScriptInfos.delete(path5));
|
|
205072
205072
|
}
|
|
205073
205073
|
}
|
|
205074
205074
|
});
|
|
@@ -205551,9 +205551,9 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
205551
205551
|
}
|
|
205552
205552
|
);
|
|
205553
205553
|
}
|
|
205554
|
-
watchPackageJsonFile(file,
|
|
205554
|
+
watchPackageJsonFile(file, path5, project) {
|
|
205555
205555
|
Debug.assert(project !== void 0);
|
|
205556
|
-
let result = (this.packageJsonFilesMap ?? (this.packageJsonFilesMap = /* @__PURE__ */ new Map())).get(
|
|
205556
|
+
let result = (this.packageJsonFilesMap ?? (this.packageJsonFilesMap = /* @__PURE__ */ new Map())).get(path5);
|
|
205557
205557
|
if (!result) {
|
|
205558
205558
|
let watcher = this.watchFactory.watchFile(
|
|
205559
205559
|
file,
|
|
@@ -205561,11 +205561,11 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
205561
205561
|
switch (eventKind) {
|
|
205562
205562
|
case 0:
|
|
205563
205563
|
case 1:
|
|
205564
|
-
this.packageJsonCache.addOrUpdate(fileName,
|
|
205564
|
+
this.packageJsonCache.addOrUpdate(fileName, path5);
|
|
205565
205565
|
this.onPackageJsonChange(result);
|
|
205566
205566
|
break;
|
|
205567
205567
|
case 2:
|
|
205568
|
-
this.packageJsonCache.delete(
|
|
205568
|
+
this.packageJsonCache.delete(path5);
|
|
205569
205569
|
this.onPackageJsonChange(result);
|
|
205570
205570
|
result.projects.clear();
|
|
205571
205571
|
result.close();
|
|
@@ -205582,11 +205582,11 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
205582
205582
|
if (result.projects.size || !watcher) return;
|
|
205583
205583
|
watcher.close();
|
|
205584
205584
|
watcher = void 0;
|
|
205585
|
-
(_a = this.packageJsonFilesMap) == null ? void 0 : _a.delete(
|
|
205586
|
-
this.packageJsonCache.invalidate(
|
|
205585
|
+
(_a = this.packageJsonFilesMap) == null ? void 0 : _a.delete(path5);
|
|
205586
|
+
this.packageJsonCache.invalidate(path5);
|
|
205587
205587
|
}
|
|
205588
205588
|
};
|
|
205589
|
-
this.packageJsonFilesMap.set(
|
|
205589
|
+
this.packageJsonFilesMap.set(path5, result);
|
|
205590
205590
|
}
|
|
205591
205591
|
result.projects.add(project);
|
|
205592
205592
|
(project.packageJsonWatches ?? (project.packageJsonWatches = /* @__PURE__ */ new Set())).add(result);
|
|
@@ -205776,14 +205776,14 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
205776
205776
|
);
|
|
205777
205777
|
}
|
|
205778
205778
|
};
|
|
205779
|
-
function addOrUpdate(fileName,
|
|
205779
|
+
function addOrUpdate(fileName, path5) {
|
|
205780
205780
|
const packageJsonInfo = Debug.checkDefined(createPackageJsonInfo(fileName, host.host));
|
|
205781
|
-
packageJsons.set(
|
|
205782
|
-
directoriesWithoutPackageJson.delete(getDirectoryPath(
|
|
205781
|
+
packageJsons.set(path5, packageJsonInfo);
|
|
205782
|
+
directoriesWithoutPackageJson.delete(getDirectoryPath(path5));
|
|
205783
205783
|
}
|
|
205784
|
-
function invalidate(
|
|
205785
|
-
packageJsons.delete(
|
|
205786
|
-
directoriesWithoutPackageJson.delete(getDirectoryPath(
|
|
205784
|
+
function invalidate(path5) {
|
|
205785
|
+
packageJsons.delete(path5);
|
|
205786
|
+
directoriesWithoutPackageJson.delete(getDirectoryPath(path5));
|
|
205787
205787
|
}
|
|
205788
205788
|
function directoryHasPackageJson(directory) {
|
|
205789
205789
|
return packageJsons.has(combinePaths(directory, "package.json")) ? -1 : directoriesWithoutPackageJson.has(directory) ? 0 : 3;
|
|
@@ -205980,8 +205980,8 @@ ${json}${newLine}`;
|
|
|
205980
205980
|
function combineProjectOutput(defaultValue, getValue, projects, action) {
|
|
205981
205981
|
const outputs = flatMapToMutable(isArray(projects) ? projects : projects.projects, (project) => action(project, defaultValue));
|
|
205982
205982
|
if (!isArray(projects) && projects.symLinkedProjects) {
|
|
205983
|
-
projects.symLinkedProjects.forEach((projects2,
|
|
205984
|
-
const value = getValue(
|
|
205983
|
+
projects.symLinkedProjects.forEach((projects2, path5) => {
|
|
205984
|
+
const value = getValue(path5);
|
|
205985
205985
|
outputs.push(...flatMap(projects2, (project) => action(project, value)));
|
|
205986
205986
|
});
|
|
205987
205987
|
}
|
|
@@ -206127,9 +206127,9 @@ ${json}${newLine}`;
|
|
|
206127
206127
|
});
|
|
206128
206128
|
return results.filter((o) => o.references.length !== 0);
|
|
206129
206129
|
}
|
|
206130
|
-
function forEachProjectInProjects(projects,
|
|
206130
|
+
function forEachProjectInProjects(projects, path5, cb) {
|
|
206131
206131
|
for (const project of isArray(projects) ? projects : projects.projects) {
|
|
206132
|
-
cb(project,
|
|
206132
|
+
cb(project, path5);
|
|
206133
206133
|
}
|
|
206134
206134
|
if (!isArray(projects) && projects.symLinkedProjects) {
|
|
206135
206135
|
projects.symLinkedProjects.forEach((symlinkedProjects, symlinkedPath) => {
|
|
@@ -206143,8 +206143,8 @@ ${json}${newLine}`;
|
|
|
206143
206143
|
const resultsMap = /* @__PURE__ */ new Map();
|
|
206144
206144
|
const queue = createQueue();
|
|
206145
206145
|
queue.enqueue({ project: defaultProject, location: initialLocation });
|
|
206146
|
-
forEachProjectInProjects(projects, initialLocation.fileName, (project,
|
|
206147
|
-
const location = { fileName:
|
|
206146
|
+
forEachProjectInProjects(projects, initialLocation.fileName, (project, path5) => {
|
|
206147
|
+
const location = { fileName: path5, pos: initialLocation.pos };
|
|
206148
206148
|
queue.enqueue({ project, location });
|
|
206149
206149
|
});
|
|
206150
206150
|
const projectService = defaultProject.projectService;
|
|
@@ -206326,7 +206326,7 @@ ${json}${newLine}`;
|
|
|
206326
206326
|
"status"
|
|
206327
206327
|
/* Status */
|
|
206328
206328
|
]: () => {
|
|
206329
|
-
const response = { version };
|
|
206329
|
+
const response = { version: version2 };
|
|
206330
206330
|
return this.requiredResponse(response);
|
|
206331
206331
|
},
|
|
206332
206332
|
[
|
|
@@ -207986,8 +207986,8 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
207986
207986
|
nodeModulesPathParts.packageRootIndex
|
|
207987
207987
|
);
|
|
207988
207988
|
const packageName = getPackageNameFromTypesPackageName(unmangleScopedPackageName(packageNamePathPart));
|
|
207989
|
-
const
|
|
207990
|
-
if (entrypoints && some(entrypoints, (e) => project.toPath(e) ===
|
|
207989
|
+
const path5 = project.toPath(fileName);
|
|
207990
|
+
if (entrypoints && some(entrypoints, (e) => project.toPath(e) === path5)) {
|
|
207991
207991
|
return (_b = auxiliaryProject.resolutionCache.resolveSingleModuleNameWithoutWatching(packageName, resolveFromFile).resolvedModule) == null ? void 0 : _b.resolvedFileName;
|
|
207992
207992
|
} else {
|
|
207993
207993
|
const pathToFileInPackage = fileName.substring(nodeModulesPathParts.packageRootIndex + 1);
|
|
@@ -208767,7 +208767,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
208767
208767
|
}
|
|
208768
208768
|
return combineProjectOutput(
|
|
208769
208769
|
info,
|
|
208770
|
-
(
|
|
208770
|
+
(path5) => this.projectService.getScriptInfoForPath(path5),
|
|
208771
208771
|
projects,
|
|
208772
208772
|
(project, info2) => {
|
|
208773
208773
|
if (!project.compileOnSaveEnabled || !project.languageServiceEnabled || project.isOrphan()) {
|
|
@@ -208794,7 +208794,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
208794
208794
|
return args.richResponse ? { emitSkipped: true, diagnostics: [] } : false;
|
|
208795
208795
|
}
|
|
208796
208796
|
const scriptInfo = project.getScriptInfo(file);
|
|
208797
|
-
const { emitSkipped, diagnostics } = project.emitFile(scriptInfo, (
|
|
208797
|
+
const { emitSkipped, diagnostics } = project.emitFile(scriptInfo, (path5, data, writeByteOrderMark) => this.host.writeFile(path5, data, writeByteOrderMark));
|
|
208798
208798
|
return args.richResponse ? {
|
|
208799
208799
|
emitSkipped,
|
|
208800
208800
|
diagnostics: args.includeLinePosition ? this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(diagnostics) : diagnostics.map((d) => formatDiagnosticToProtocol(
|
|
@@ -209884,11 +209884,11 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
|
|
|
209884
209884
|
this.minVersion = 0;
|
|
209885
209885
|
this.currentVersion = 0;
|
|
209886
209886
|
}
|
|
209887
|
-
versionToIndex(
|
|
209888
|
-
if (
|
|
209887
|
+
versionToIndex(version22) {
|
|
209888
|
+
if (version22 < this.minVersion || version22 > this.currentVersion) {
|
|
209889
209889
|
return void 0;
|
|
209890
209890
|
}
|
|
209891
|
-
return
|
|
209891
|
+
return version22 % _ScriptVersionCache2.maxVersions;
|
|
209892
209892
|
}
|
|
209893
209893
|
currentVersionToIndex() {
|
|
209894
209894
|
return this.currentVersion % _ScriptVersionCache2.maxVersions;
|
|
@@ -209973,8 +209973,8 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
|
|
|
209973
209973
|
_ScriptVersionCache.maxVersions = 8;
|
|
209974
209974
|
var ScriptVersionCache = _ScriptVersionCache;
|
|
209975
209975
|
var LineIndexSnapshot = class _LineIndexSnapshot {
|
|
209976
|
-
constructor(
|
|
209977
|
-
this.version =
|
|
209976
|
+
constructor(version22, cache, index, changesSincePreviousVersion = emptyArray2) {
|
|
209977
|
+
this.version = version22;
|
|
209978
209978
|
this.cache = cache;
|
|
209979
209979
|
this.index = index;
|
|
209980
209980
|
this.changesSincePreviousVersion = changesSincePreviousVersion;
|
|
@@ -210450,8 +210450,8 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
|
|
|
210450
210450
|
installPackage(options) {
|
|
210451
210451
|
this.packageInstallId++;
|
|
210452
210452
|
const request = { kind: "installPackage", ...options, id: this.packageInstallId };
|
|
210453
|
-
const promise = new Promise((
|
|
210454
|
-
(this.packageInstalledPromise ?? (this.packageInstalledPromise = /* @__PURE__ */ new Map())).set(this.packageInstallId, { resolve:
|
|
210453
|
+
const promise = new Promise((resolve4, reject) => {
|
|
210454
|
+
(this.packageInstalledPromise ?? (this.packageInstalledPromise = /* @__PURE__ */ new Map())).set(this.packageInstallId, { resolve: resolve4, reject });
|
|
210455
210455
|
});
|
|
210456
210456
|
this.installer.send(request);
|
|
210457
210457
|
return promise;
|
|
@@ -210855,8 +210855,8 @@ var require_dist4 = __commonJS({
|
|
|
210855
210855
|
});
|
|
210856
210856
|
module.exports = __toCommonJS(index_exports);
|
|
210857
210857
|
var import_typescript = __toESM2(require_typescript());
|
|
210858
|
-
var
|
|
210859
|
-
var
|
|
210858
|
+
var fs5 = __toESM2(__require("fs"));
|
|
210859
|
+
var path5 = __toESM2(__require("path"));
|
|
210860
210860
|
var import_crypto = __toESM2(__require("crypto"));
|
|
210861
210861
|
var FALLBACK_KEYWORD_BLOCKLIST = /* @__PURE__ */ new Set([
|
|
210862
210862
|
"if",
|
|
@@ -210885,7 +210885,7 @@ var require_dist4 = __commonJS({
|
|
|
210885
210885
|
"throw"
|
|
210886
210886
|
]);
|
|
210887
210887
|
function chunkFile(filePath) {
|
|
210888
|
-
const source =
|
|
210888
|
+
const source = fs5.readFileSync(
|
|
210889
210889
|
filePath,
|
|
210890
210890
|
"utf-8"
|
|
210891
210891
|
);
|
|
@@ -210897,7 +210897,7 @@ var require_dist4 = __commonJS({
|
|
|
210897
210897
|
);
|
|
210898
210898
|
const chunks = [];
|
|
210899
210899
|
function getLanguage(file) {
|
|
210900
|
-
return
|
|
210900
|
+
return path5.extname(file).replace(".", "");
|
|
210901
210901
|
}
|
|
210902
210902
|
function getLine(pos) {
|
|
210903
210903
|
return sourceFile.getLineAndCharacterOfPosition(pos).line + 1;
|
|
@@ -211155,8 +211155,8 @@ var require_dist4 = __commonJS({
|
|
|
211155
211155
|
}
|
|
211156
211156
|
visit(sourceFile);
|
|
211157
211157
|
if (chunks.length === 0 && source.trim().length > 0) {
|
|
211158
|
-
const filename =
|
|
211159
|
-
const basename2 =
|
|
211158
|
+
const filename = path5.basename(filePath);
|
|
211159
|
+
const basename2 = path5.basename(filePath, path5.extname(filePath));
|
|
211160
211160
|
const hash = getHash(source);
|
|
211161
211161
|
const deps = /* @__PURE__ */ new Set();
|
|
211162
211162
|
const pyRegex = /(?:^|\n)\s*(?:from|import)\s+([a-zA-Z0-9_.]+)/g;
|
|
@@ -213734,8 +213734,8 @@ ${lines.join("\n")}${output.split("\n").length > 15 ? `
|
|
|
213734
213734
|
}
|
|
213735
213735
|
}
|
|
213736
213736
|
};
|
|
213737
|
-
var
|
|
213738
|
-
var
|
|
213737
|
+
var fs5 = __toESM2(__require("fs"));
|
|
213738
|
+
var path5 = __toESM2(__require("path"));
|
|
213739
213739
|
var FileReadTool4 = class {
|
|
213740
213740
|
name = "read_file";
|
|
213741
213741
|
description = 'Read the contents of a file from the codebase. Args: {"path": "relative file path", "startLine": "optional start line", "endLine": "optional end line"}. Returns file contents.';
|
|
@@ -213748,19 +213748,19 @@ ${lines.join("\n")}${output.split("\n").length > 15 ? `
|
|
|
213748
213748
|
if (!filePath) {
|
|
213749
213749
|
return "Error: 'path' argument is required.";
|
|
213750
213750
|
}
|
|
213751
|
-
const absolutePath =
|
|
213751
|
+
const absolutePath = path5.resolve(this.cwd, filePath);
|
|
213752
213752
|
if (!absolutePath.startsWith(this.cwd)) {
|
|
213753
213753
|
return "Error: Cannot read files outside the workspace directory.";
|
|
213754
213754
|
}
|
|
213755
|
-
const basename3 =
|
|
213755
|
+
const basename3 = path5.basename(absolutePath);
|
|
213756
213756
|
if (basename3.startsWith(".env") || basename3 === ".vortexenv") {
|
|
213757
213757
|
return "Error: Cannot read environment/secret files.";
|
|
213758
213758
|
}
|
|
213759
|
-
if (!
|
|
213759
|
+
if (!fs5.existsSync(absolutePath)) {
|
|
213760
213760
|
return `Error: File not found: ${filePath}`;
|
|
213761
213761
|
}
|
|
213762
213762
|
try {
|
|
213763
|
-
const content =
|
|
213763
|
+
const content = fs5.readFileSync(absolutePath, "utf8");
|
|
213764
213764
|
const lines = content.split("\n");
|
|
213765
213765
|
const startLine = args.startLine ? Math.max(1, parseInt(args.startLine, 10)) : 1;
|
|
213766
213766
|
const endLine = args.endLine ? Math.min(lines.length, parseInt(args.endLine, 10)) : Math.min(lines.length, 100);
|
|
@@ -214290,11 +214290,66 @@ var require_dist6 = __commonJS({
|
|
|
214290
214290
|
}
|
|
214291
214291
|
});
|
|
214292
214292
|
|
|
214293
|
+
// package.json
|
|
214294
|
+
var require_package = __commonJS({
|
|
214295
|
+
"package.json"(exports, module) {
|
|
214296
|
+
module.exports = {
|
|
214297
|
+
name: "@vortex-ai/cli",
|
|
214298
|
+
version: "0.1.41",
|
|
214299
|
+
description: "Vortex CLI - The main entry point",
|
|
214300
|
+
main: "./dist/index.js",
|
|
214301
|
+
bin: {
|
|
214302
|
+
vortex: "./dist/index.js"
|
|
214303
|
+
},
|
|
214304
|
+
scripts: {
|
|
214305
|
+
build: "tsup src/index.ts --format cjs,esm --external @xenova/transformers && cp ../db/prisma/schema.prisma ./schema.prisma",
|
|
214306
|
+
dev: "tsx src/index.ts",
|
|
214307
|
+
watch: "tsup src/index.ts --format cjs,esm --watch",
|
|
214308
|
+
lint: "eslint .",
|
|
214309
|
+
"check-types": "tsc --noEmit",
|
|
214310
|
+
postinstall: `node -e "const fs=require('fs'); if(fs.existsSync('./schema.prisma')){require('child_process').execSync('npx prisma generate --schema=./schema.prisma', {stdio:'inherit'})}"`
|
|
214311
|
+
},
|
|
214312
|
+
dependencies: {
|
|
214313
|
+
"@octokit/rest": "^22.0.1",
|
|
214314
|
+
"@types/marked-terminal": "^6.1.1",
|
|
214315
|
+
"@google/genai": "^2.5.0",
|
|
214316
|
+
"groq-sdk": "^1.2.1",
|
|
214317
|
+
"@prisma/client": "^5.14.0",
|
|
214318
|
+
prisma: "^5.14.0",
|
|
214319
|
+
ignore: "^7.0.5",
|
|
214320
|
+
minisearch: "^7.2.0",
|
|
214321
|
+
"@xenova/transformers": "^2.17.2",
|
|
214322
|
+
boxen: "7",
|
|
214323
|
+
chalk: "^5.6.2",
|
|
214324
|
+
commander: "^12.1.0",
|
|
214325
|
+
dotenv: "^17.4.2",
|
|
214326
|
+
marked: "^15.0.12",
|
|
214327
|
+
"marked-terminal": "^7.3.0",
|
|
214328
|
+
ora: "^9.4.0",
|
|
214329
|
+
"parse-diff": "^0.12.0",
|
|
214330
|
+
zod: "^4.4.3"
|
|
214331
|
+
},
|
|
214332
|
+
devDependencies: {
|
|
214333
|
+
"@vortex/engine": "workspace:*",
|
|
214334
|
+
"@vortex/github": "workspace:*",
|
|
214335
|
+
"@vortex/git": "workspace:*",
|
|
214336
|
+
"@vortex/shared": "workspace:*",
|
|
214337
|
+
"@vortex/retrieval": "workspace:*",
|
|
214338
|
+
"@vortex/db": "workspace:*",
|
|
214339
|
+
"@vortex/typescript-config": "workspace:*",
|
|
214340
|
+
tsup: "^8.0.2",
|
|
214341
|
+
tsx: "^4.21.0",
|
|
214342
|
+
typescript: "5.9.2"
|
|
214343
|
+
}
|
|
214344
|
+
};
|
|
214345
|
+
}
|
|
214346
|
+
});
|
|
214347
|
+
|
|
214293
214348
|
// src/index.ts
|
|
214294
214349
|
import { Command as Command2 } from "commander";
|
|
214295
|
-
import * as
|
|
214296
|
-
import * as
|
|
214297
|
-
import * as
|
|
214350
|
+
import * as path4 from "path";
|
|
214351
|
+
import * as dotenv2 from "dotenv";
|
|
214352
|
+
import * as os2 from "os";
|
|
214298
214353
|
|
|
214299
214354
|
// src/commands/init.ts
|
|
214300
214355
|
var import_engine = __toESM(require_dist5());
|
|
@@ -215062,26 +215117,93 @@ cacheCommand.command("clear").description("Clear all entries from the LLM cache"
|
|
|
215062
215117
|
}
|
|
215063
215118
|
});
|
|
215064
215119
|
|
|
215120
|
+
// src/commands/config.ts
|
|
215121
|
+
import * as fs4 from "fs";
|
|
215122
|
+
import * as os from "os";
|
|
215123
|
+
import * as path3 from "path";
|
|
215124
|
+
import * as dotenv from "dotenv";
|
|
215125
|
+
var envPath = path3.resolve(os.homedir(), ".vortexenv");
|
|
215126
|
+
function readEnv() {
|
|
215127
|
+
if (!fs4.existsSync(envPath)) return {};
|
|
215128
|
+
const content = fs4.readFileSync(envPath, "utf-8");
|
|
215129
|
+
return dotenv.parse(content);
|
|
215130
|
+
}
|
|
215131
|
+
function writeEnv(env) {
|
|
215132
|
+
const content = Object.entries(env).map(([k, v]) => `${k}="${v.replace(/"/g, '\\"')}"`).join("\n");
|
|
215133
|
+
fs4.writeFileSync(envPath, content + "\n", { mode: 384 });
|
|
215134
|
+
}
|
|
215135
|
+
async function configSet(provider, value) {
|
|
215136
|
+
const { default: chalk2 } = await import("chalk");
|
|
215137
|
+
const providerUpper = provider.toUpperCase();
|
|
215138
|
+
let envKey = "";
|
|
215139
|
+
if (providerUpper === "GEMINI") {
|
|
215140
|
+
envKey = "GEMINI_API_KEY";
|
|
215141
|
+
} else if (providerUpper === "GROQ") {
|
|
215142
|
+
envKey = "GROQ_API_KEY";
|
|
215143
|
+
} else {
|
|
215144
|
+
console.log(chalk2.red(`Invalid option: ${chalk2.bold(provider)}. Supported options are 'gemini' and 'groq'.`));
|
|
215145
|
+
console.log(chalk2.gray(`Usage: vortex config set gemini <your-key>`));
|
|
215146
|
+
process.exit(1);
|
|
215147
|
+
}
|
|
215148
|
+
const env = readEnv();
|
|
215149
|
+
env[envKey] = value;
|
|
215150
|
+
writeEnv(env);
|
|
215151
|
+
console.log(chalk2.green(`\u2713 Successfully set ${chalk2.bold(envKey)}`));
|
|
215152
|
+
}
|
|
215153
|
+
async function configGet(key) {
|
|
215154
|
+
const { default: chalk2 } = await import("chalk");
|
|
215155
|
+
const env = readEnv();
|
|
215156
|
+
if (env[key]) {
|
|
215157
|
+
console.log(env[key]);
|
|
215158
|
+
} else {
|
|
215159
|
+
console.log(chalk2.gray(`Key ${chalk2.bold(key)} is not set.`));
|
|
215160
|
+
}
|
|
215161
|
+
}
|
|
215162
|
+
async function configList() {
|
|
215163
|
+
const { default: chalk2 } = await import("chalk");
|
|
215164
|
+
const env = readEnv();
|
|
215165
|
+
const keys = Object.keys(env);
|
|
215166
|
+
if (keys.length === 0) {
|
|
215167
|
+
console.log(chalk2.gray("No configuration values set in ~/.vortexenv"));
|
|
215168
|
+
return;
|
|
215169
|
+
}
|
|
215170
|
+
console.log(chalk2.blue.bold("\nVortex Global Configuration:\n"));
|
|
215171
|
+
for (const [k, v] of Object.entries(env)) {
|
|
215172
|
+
let masked = "***";
|
|
215173
|
+
if (v.length > 10) {
|
|
215174
|
+
masked = `${v.substring(0, 4)}...${v.substring(v.length - 4)}`;
|
|
215175
|
+
} else if (v.length > 0) {
|
|
215176
|
+
masked = v;
|
|
215177
|
+
}
|
|
215178
|
+
console.log(` ${chalk2.cyan.bold(k)}: ${chalk2.gray(masked)}`);
|
|
215179
|
+
}
|
|
215180
|
+
console.log(`
|
|
215181
|
+
Location: ${chalk2.gray(envPath)}
|
|
215182
|
+
`);
|
|
215183
|
+
}
|
|
215184
|
+
|
|
215065
215185
|
// src/index.ts
|
|
215066
|
-
|
|
215186
|
+
process.env.DOTENV_CONFIG_QUIET = "true";
|
|
215187
|
+
var monorepoEnv = path4.resolve(__dirname, "../../../.env");
|
|
215067
215188
|
if (__require("fs").existsSync(monorepoEnv)) {
|
|
215068
|
-
const envConfig =
|
|
215189
|
+
const envConfig = dotenv2.parse(__require("fs").readFileSync(monorepoEnv));
|
|
215069
215190
|
for (const k in envConfig) {
|
|
215070
215191
|
if (k === "NODE_ENV") continue;
|
|
215071
215192
|
if (!process.env[k]) process.env[k] = envConfig[k];
|
|
215072
215193
|
}
|
|
215073
215194
|
}
|
|
215074
|
-
|
|
215075
|
-
var cwdEnv =
|
|
215195
|
+
dotenv2.config({ path: path4.resolve(os2.homedir(), ".vortexenv"), override: true });
|
|
215196
|
+
var cwdEnv = path4.resolve(process.cwd(), ".env");
|
|
215076
215197
|
if (__require("fs").existsSync(cwdEnv)) {
|
|
215077
|
-
const envConfig =
|
|
215198
|
+
const envConfig = dotenv2.parse(__require("fs").readFileSync(cwdEnv));
|
|
215078
215199
|
for (const k in envConfig) {
|
|
215079
215200
|
if (k === "NODE_ENV") continue;
|
|
215080
215201
|
process.env[k] = envConfig[k];
|
|
215081
215202
|
}
|
|
215082
215203
|
}
|
|
215083
215204
|
var program = new Command2();
|
|
215084
|
-
|
|
215205
|
+
var { version } = require_package();
|
|
215206
|
+
program.name("vortex").description("Developer Intelligence & PR Review Engine").version(version);
|
|
215085
215207
|
program.hook("preAction", (thisCommand, actionCommand) => {
|
|
215086
215208
|
if (actionCommand.opts().cache === false) {
|
|
215087
215209
|
process.env.VORTEX_DISABLE_CACHE = "true";
|
|
@@ -215097,6 +215219,10 @@ program.command("solve-issue").description("Autonomously solve a GitHub issue us
|
|
|
215097
215219
|
program.command("suggest").description("Generate AI-powered code suggestions using repository patterns and historical intelligence").requiredOption("--file <path>", "Target file path").option("--apply", "Apply suggestions automatically").option("--deep", "Enable advanced contextual suggestions").option("--no-cache", "Disable LLM response caching").action(suggestCommand);
|
|
215098
215220
|
program.command("fix-nitbits").description("Automatically fix formatting, comments, tests, CI issues, and repository-specific patterns").option("--safe", "Apply only deterministic safe fixes").option("--dry-run", "Preview fixes without modifying files").option("--files <paths>", "Comma-separated list of target files").action(fixNitbitsCommand);
|
|
215099
215221
|
program.command("analyze").description("Analyze other contributors' PRs using repository history and architectural intelligence").requiredOption("--pr <number>", "Pull request number", Number).option("--deep", "Enable advanced PR intelligence analysis").option("--no-cache", "Disable LLM response caching").action(analyzeCommand);
|
|
215222
|
+
var configCmd = program.command("config").description("Manage global configuration and API keys");
|
|
215223
|
+
configCmd.command("set <provider> <key>").description("Set an API key for a specific provider (gemini or groq)").action(configSet);
|
|
215224
|
+
configCmd.command("get <key>").description("Get a global configuration value").action(configGet);
|
|
215225
|
+
configCmd.command("list").description("List all global configuration values").action(configList);
|
|
215100
215226
|
program.addCommand(cacheCommand);
|
|
215101
215227
|
program.parse();
|
|
215102
215228
|
/*! Bundled license information:
|