@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.js
CHANGED
|
@@ -68,7 +68,7 @@ var require_dist = __commonJS({
|
|
|
68
68
|
});
|
|
69
69
|
module2.exports = __toCommonJS(index_exports);
|
|
70
70
|
var import_child_process2 = require("child_process");
|
|
71
|
-
var
|
|
71
|
+
var path5 = __toESM2(require("path"));
|
|
72
72
|
function runGitCmd(cmd, cwd) {
|
|
73
73
|
try {
|
|
74
74
|
return (0, import_child_process2.execSync)(`git ${cmd}`, { cwd, encoding: "utf8", stdio: ["ignore", "pipe", "ignore"] }).trim();
|
|
@@ -90,7 +90,7 @@ var require_dist = __commonJS({
|
|
|
90
90
|
function listTrackedFiles(cwd) {
|
|
91
91
|
const root = getGitRoot2(cwd);
|
|
92
92
|
const output = runGitCmd("ls-files", root);
|
|
93
|
-
return output.split("\n").filter((line) => line.length > 0).map((file) =>
|
|
93
|
+
return output.split("\n").filter((line) => line.length > 0).map((file) => path5.join(root, file));
|
|
94
94
|
}
|
|
95
95
|
function getLatestCommitHash(cwd, filePath) {
|
|
96
96
|
if (filePath) {
|
|
@@ -2367,7 +2367,7 @@ var require_typescript = __commonJS({
|
|
|
2367
2367
|
usingSingleLineStringWriter: () => usingSingleLineStringWriter,
|
|
2368
2368
|
utf16EncodeAsString: () => utf16EncodeAsString,
|
|
2369
2369
|
validateLocaleAndSetLanguage: () => validateLocaleAndSetLanguage,
|
|
2370
|
-
version: () =>
|
|
2370
|
+
version: () => version2,
|
|
2371
2371
|
versionMajorMinor: () => versionMajorMinor,
|
|
2372
2372
|
visitArray: () => visitArray,
|
|
2373
2373
|
visitCommaListElements: () => visitCommaListElements,
|
|
@@ -2391,7 +2391,7 @@ var require_typescript = __commonJS({
|
|
|
2391
2391
|
});
|
|
2392
2392
|
module3.exports = __toCommonJS(typescript_exports);
|
|
2393
2393
|
var versionMajorMinor = "5.9";
|
|
2394
|
-
var
|
|
2394
|
+
var version2 = "5.9.2";
|
|
2395
2395
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2396
2396
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2397
2397
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -3775,10 +3775,10 @@ var require_typescript = __commonJS({
|
|
|
3775
3775
|
function and(f, g) {
|
|
3776
3776
|
return (arg) => f(arg) && g(arg);
|
|
3777
3777
|
}
|
|
3778
|
-
function or(...
|
|
3778
|
+
function or(...fs5) {
|
|
3779
3779
|
return (...args) => {
|
|
3780
3780
|
let lastResult;
|
|
3781
|
-
for (const f of
|
|
3781
|
+
for (const f of fs5) {
|
|
3782
3782
|
lastResult = f(...args);
|
|
3783
3783
|
if (lastResult) {
|
|
3784
3784
|
return lastResult;
|
|
@@ -5027,9 +5027,9 @@ ${lanes.join("\n")}
|
|
|
5027
5027
|
* Tests whether a version matches the range. This is equivalent to `satisfies(version, range, { includePrerelease: true })`.
|
|
5028
5028
|
* in `node-semver`.
|
|
5029
5029
|
*/
|
|
5030
|
-
test(
|
|
5031
|
-
if (typeof
|
|
5032
|
-
return testDisjunction(
|
|
5030
|
+
test(version22) {
|
|
5031
|
+
if (typeof version22 === "string") version22 = new Version(version22);
|
|
5032
|
+
return testDisjunction(version22, this._alternatives);
|
|
5033
5033
|
}
|
|
5034
5034
|
toString() {
|
|
5035
5035
|
return formatDisjunction(this._alternatives);
|
|
@@ -5063,14 +5063,14 @@ ${lanes.join("\n")}
|
|
|
5063
5063
|
const match = partialRegExp.exec(text);
|
|
5064
5064
|
if (!match) return void 0;
|
|
5065
5065
|
const [, major, minor = "*", patch = "*", prerelease, build2] = match;
|
|
5066
|
-
const
|
|
5066
|
+
const version22 = new Version(
|
|
5067
5067
|
isWildcard(major) ? 0 : parseInt(major, 10),
|
|
5068
5068
|
isWildcard(major) || isWildcard(minor) ? 0 : parseInt(minor, 10),
|
|
5069
5069
|
isWildcard(major) || isWildcard(minor) || isWildcard(patch) ? 0 : parseInt(patch, 10),
|
|
5070
5070
|
prerelease,
|
|
5071
5071
|
build2
|
|
5072
5072
|
);
|
|
5073
|
-
return { version:
|
|
5073
|
+
return { version: version22, major, minor, patch };
|
|
5074
5074
|
}
|
|
5075
5075
|
function parseHyphen(left, right, comparators) {
|
|
5076
5076
|
const leftResult = parsePartial(left);
|
|
@@ -5090,46 +5090,46 @@ ${lanes.join("\n")}
|
|
|
5090
5090
|
function parseComparator(operator, text, comparators) {
|
|
5091
5091
|
const result = parsePartial(text);
|
|
5092
5092
|
if (!result) return false;
|
|
5093
|
-
const { version:
|
|
5093
|
+
const { version: version22, major, minor, patch } = result;
|
|
5094
5094
|
if (!isWildcard(major)) {
|
|
5095
5095
|
switch (operator) {
|
|
5096
5096
|
case "~":
|
|
5097
|
-
comparators.push(createComparator(">=",
|
|
5097
|
+
comparators.push(createComparator(">=", version22));
|
|
5098
5098
|
comparators.push(createComparator(
|
|
5099
5099
|
"<",
|
|
5100
|
-
|
|
5100
|
+
version22.increment(
|
|
5101
5101
|
isWildcard(minor) ? "major" : "minor"
|
|
5102
5102
|
)
|
|
5103
5103
|
));
|
|
5104
5104
|
break;
|
|
5105
5105
|
case "^":
|
|
5106
|
-
comparators.push(createComparator(">=",
|
|
5106
|
+
comparators.push(createComparator(">=", version22));
|
|
5107
5107
|
comparators.push(createComparator(
|
|
5108
5108
|
"<",
|
|
5109
|
-
|
|
5110
|
-
|
|
5109
|
+
version22.increment(
|
|
5110
|
+
version22.major > 0 || isWildcard(minor) ? "major" : version22.minor > 0 || isWildcard(patch) ? "minor" : "patch"
|
|
5111
5111
|
)
|
|
5112
5112
|
));
|
|
5113
5113
|
break;
|
|
5114
5114
|
case "<":
|
|
5115
5115
|
case ">=":
|
|
5116
5116
|
comparators.push(
|
|
5117
|
-
isWildcard(minor) || isWildcard(patch) ? createComparator(operator,
|
|
5117
|
+
isWildcard(minor) || isWildcard(patch) ? createComparator(operator, version22.with({ prerelease: "0" })) : createComparator(operator, version22)
|
|
5118
5118
|
);
|
|
5119
5119
|
break;
|
|
5120
5120
|
case "<=":
|
|
5121
5121
|
case ">":
|
|
5122
5122
|
comparators.push(
|
|
5123
|
-
isWildcard(minor) ? createComparator(operator === "<=" ? "<" : ">=",
|
|
5123
|
+
isWildcard(minor) ? createComparator(operator === "<=" ? "<" : ">=", version22.increment("major").with({ prerelease: "0" })) : isWildcard(patch) ? createComparator(operator === "<=" ? "<" : ">=", version22.increment("minor").with({ prerelease: "0" })) : createComparator(operator, version22)
|
|
5124
5124
|
);
|
|
5125
5125
|
break;
|
|
5126
5126
|
case "=":
|
|
5127
5127
|
case void 0:
|
|
5128
5128
|
if (isWildcard(minor) || isWildcard(patch)) {
|
|
5129
|
-
comparators.push(createComparator(">=",
|
|
5130
|
-
comparators.push(createComparator("<",
|
|
5129
|
+
comparators.push(createComparator(">=", version22.with({ prerelease: "0" })));
|
|
5130
|
+
comparators.push(createComparator("<", version22.increment(isWildcard(minor) ? "major" : "minor").with({ prerelease: "0" })));
|
|
5131
5131
|
} else {
|
|
5132
|
-
comparators.push(createComparator("=",
|
|
5132
|
+
comparators.push(createComparator("=", version22));
|
|
5133
5133
|
}
|
|
5134
5134
|
break;
|
|
5135
5135
|
default:
|
|
@@ -5146,21 +5146,21 @@ ${lanes.join("\n")}
|
|
|
5146
5146
|
function createComparator(operator, operand) {
|
|
5147
5147
|
return { operator, operand };
|
|
5148
5148
|
}
|
|
5149
|
-
function testDisjunction(
|
|
5149
|
+
function testDisjunction(version22, alternatives) {
|
|
5150
5150
|
if (alternatives.length === 0) return true;
|
|
5151
5151
|
for (const alternative of alternatives) {
|
|
5152
|
-
if (testAlternative(
|
|
5152
|
+
if (testAlternative(version22, alternative)) return true;
|
|
5153
5153
|
}
|
|
5154
5154
|
return false;
|
|
5155
5155
|
}
|
|
5156
|
-
function testAlternative(
|
|
5156
|
+
function testAlternative(version22, comparators) {
|
|
5157
5157
|
for (const comparator of comparators) {
|
|
5158
|
-
if (!testComparator(
|
|
5158
|
+
if (!testComparator(version22, comparator.operator, comparator.operand)) return false;
|
|
5159
5159
|
}
|
|
5160
5160
|
return true;
|
|
5161
5161
|
}
|
|
5162
|
-
function testComparator(
|
|
5163
|
-
const cmp =
|
|
5162
|
+
function testComparator(version22, operator, operand) {
|
|
5163
|
+
const cmp = version22.compareTo(operand);
|
|
5164
5164
|
switch (operator) {
|
|
5165
5165
|
case "<":
|
|
5166
5166
|
return cmp < 0;
|
|
@@ -5353,7 +5353,7 @@ ${lanes.join("\n")}
|
|
|
5353
5353
|
var tracing;
|
|
5354
5354
|
var tracingEnabled;
|
|
5355
5355
|
((tracingEnabled2) => {
|
|
5356
|
-
let
|
|
5356
|
+
let fs5;
|
|
5357
5357
|
let traceCount = 0;
|
|
5358
5358
|
let traceFd = 0;
|
|
5359
5359
|
let mode;
|
|
@@ -5362,9 +5362,9 @@ ${lanes.join("\n")}
|
|
|
5362
5362
|
const legend = [];
|
|
5363
5363
|
function startTracing2(tracingMode, traceDir, configFilePath) {
|
|
5364
5364
|
Debug.assert(!tracing, "Tracing already started");
|
|
5365
|
-
if (
|
|
5365
|
+
if (fs5 === void 0) {
|
|
5366
5366
|
try {
|
|
5367
|
-
|
|
5367
|
+
fs5 = require("fs");
|
|
5368
5368
|
} catch (e) {
|
|
5369
5369
|
throw new Error(`tracing requires having fs
|
|
5370
5370
|
(original error: ${e.message || e})`);
|
|
@@ -5375,8 +5375,8 @@ ${lanes.join("\n")}
|
|
|
5375
5375
|
if (legendPath === void 0) {
|
|
5376
5376
|
legendPath = combinePaths(traceDir, "legend.json");
|
|
5377
5377
|
}
|
|
5378
|
-
if (!
|
|
5379
|
-
|
|
5378
|
+
if (!fs5.existsSync(traceDir)) {
|
|
5379
|
+
fs5.mkdirSync(traceDir, { recursive: true });
|
|
5380
5380
|
}
|
|
5381
5381
|
const countPart = mode === "build" ? `.${process.pid}-${++traceCount}` : mode === "server" ? `.${process.pid}` : ``;
|
|
5382
5382
|
const tracePath = combinePaths(traceDir, `trace${countPart}.json`);
|
|
@@ -5386,10 +5386,10 @@ ${lanes.join("\n")}
|
|
|
5386
5386
|
tracePath,
|
|
5387
5387
|
typesPath
|
|
5388
5388
|
});
|
|
5389
|
-
traceFd =
|
|
5389
|
+
traceFd = fs5.openSync(tracePath, "w");
|
|
5390
5390
|
tracing = tracingEnabled2;
|
|
5391
5391
|
const meta = { cat: "__metadata", ph: "M", ts: 1e3 * timestamp(), pid: 1, tid: 1 };
|
|
5392
|
-
|
|
5392
|
+
fs5.writeSync(
|
|
5393
5393
|
traceFd,
|
|
5394
5394
|
"[\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")
|
|
5395
5395
|
);
|
|
@@ -5398,10 +5398,10 @@ ${lanes.join("\n")}
|
|
|
5398
5398
|
function stopTracing() {
|
|
5399
5399
|
Debug.assert(tracing, "Tracing is not in progress");
|
|
5400
5400
|
Debug.assert(!!typeCatalog.length === (mode !== "server"));
|
|
5401
|
-
|
|
5401
|
+
fs5.writeSync(traceFd, `
|
|
5402
5402
|
]
|
|
5403
5403
|
`);
|
|
5404
|
-
|
|
5404
|
+
fs5.closeSync(traceFd);
|
|
5405
5405
|
tracing = void 0;
|
|
5406
5406
|
if (typeCatalog.length) {
|
|
5407
5407
|
dumpTypes(typeCatalog);
|
|
@@ -5473,11 +5473,11 @@ ${lanes.join("\n")}
|
|
|
5473
5473
|
function writeEvent(eventType, phase, name, args, extras, time = 1e3 * timestamp()) {
|
|
5474
5474
|
if (mode === "server" && phase === "checkTypes") return;
|
|
5475
5475
|
mark("beginTracing");
|
|
5476
|
-
|
|
5476
|
+
fs5.writeSync(traceFd, `,
|
|
5477
5477
|
{"pid":1,"tid":1,"ph":"${eventType}","cat":"${phase}","ts":${time},"name":"${name}"`);
|
|
5478
|
-
if (extras)
|
|
5479
|
-
if (args)
|
|
5480
|
-
|
|
5478
|
+
if (extras) fs5.writeSync(traceFd, `,${extras}`);
|
|
5479
|
+
if (args) fs5.writeSync(traceFd, `,"args":${JSON.stringify(args)}`);
|
|
5480
|
+
fs5.writeSync(traceFd, `}`);
|
|
5481
5481
|
mark("endTracing");
|
|
5482
5482
|
measure("Tracing", "beginTracing", "endTracing");
|
|
5483
5483
|
}
|
|
@@ -5499,9 +5499,9 @@ ${lanes.join("\n")}
|
|
|
5499
5499
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
|
|
5500
5500
|
mark("beginDumpTypes");
|
|
5501
5501
|
const typesPath = legend[legend.length - 1].typesPath;
|
|
5502
|
-
const typesFd =
|
|
5502
|
+
const typesFd = fs5.openSync(typesPath, "w");
|
|
5503
5503
|
const recursionIdentityMap = /* @__PURE__ */ new Map();
|
|
5504
|
-
|
|
5504
|
+
fs5.writeSync(typesFd, "[");
|
|
5505
5505
|
const numTypes = types.length;
|
|
5506
5506
|
for (let i = 0; i < numTypes; i++) {
|
|
5507
5507
|
const type = types[i];
|
|
@@ -5597,13 +5597,13 @@ ${lanes.join("\n")}
|
|
|
5597
5597
|
flags: Debug.formatTypeFlags(type.flags).split("|"),
|
|
5598
5598
|
display
|
|
5599
5599
|
};
|
|
5600
|
-
|
|
5600
|
+
fs5.writeSync(typesFd, JSON.stringify(descriptor));
|
|
5601
5601
|
if (i < numTypes - 1) {
|
|
5602
|
-
|
|
5602
|
+
fs5.writeSync(typesFd, ",\n");
|
|
5603
5603
|
}
|
|
5604
5604
|
}
|
|
5605
|
-
|
|
5606
|
-
|
|
5605
|
+
fs5.writeSync(typesFd, "]\n");
|
|
5606
|
+
fs5.closeSync(typesFd);
|
|
5607
5607
|
mark("endDumpTypes");
|
|
5608
5608
|
measure("Dump types", "beginDumpTypes", "endDumpTypes");
|
|
5609
5609
|
}
|
|
@@ -5611,7 +5611,7 @@ ${lanes.join("\n")}
|
|
|
5611
5611
|
if (!legendPath) {
|
|
5612
5612
|
return;
|
|
5613
5613
|
}
|
|
5614
|
-
|
|
5614
|
+
fs5.writeFileSync(legendPath, JSON.stringify(legend));
|
|
5615
5615
|
}
|
|
5616
5616
|
tracingEnabled2.dumpLegend = dumpLegend;
|
|
5617
5617
|
})(tracingEnabled || (tracingEnabled = {}));
|
|
@@ -7993,17 +7993,17 @@ ${lanes.join("\n")}
|
|
|
7993
7993
|
}
|
|
7994
7994
|
function createSingleWatcherPerName(cache, useCaseSensitiveFileNames2, name, callback, createWatcher) {
|
|
7995
7995
|
const toCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2);
|
|
7996
|
-
const
|
|
7997
|
-
const existing = cache.get(
|
|
7996
|
+
const path5 = toCanonicalFileName(name);
|
|
7997
|
+
const existing = cache.get(path5);
|
|
7998
7998
|
if (existing) {
|
|
7999
7999
|
existing.callbacks.push(callback);
|
|
8000
8000
|
} else {
|
|
8001
|
-
cache.set(
|
|
8001
|
+
cache.set(path5, {
|
|
8002
8002
|
watcher: createWatcher(
|
|
8003
8003
|
// Cant infer types correctly so lets satisfy checker
|
|
8004
8004
|
(param1, param2, param3) => {
|
|
8005
8005
|
var _a;
|
|
8006
|
-
return (_a = cache.get(
|
|
8006
|
+
return (_a = cache.get(path5)) == null ? void 0 : _a.callbacks.slice().forEach((cb) => cb(param1, param2, param3));
|
|
8007
8007
|
}
|
|
8008
8008
|
),
|
|
8009
8009
|
callbacks: [callback]
|
|
@@ -8011,10 +8011,10 @@ ${lanes.join("\n")}
|
|
|
8011
8011
|
}
|
|
8012
8012
|
return {
|
|
8013
8013
|
close: () => {
|
|
8014
|
-
const watcher = cache.get(
|
|
8014
|
+
const watcher = cache.get(path5);
|
|
8015
8015
|
if (!watcher) return;
|
|
8016
8016
|
if (!orderedRemoveItem(watcher.callbacks, callback) || watcher.callbacks.length) return;
|
|
8017
|
-
cache.delete(
|
|
8017
|
+
cache.delete(path5);
|
|
8018
8018
|
closeFileWatcherOf(watcher);
|
|
8019
8019
|
}
|
|
8020
8020
|
};
|
|
@@ -8266,13 +8266,13 @@ ${lanes.join("\n")}
|
|
|
8266
8266
|
(newChildWatches || (newChildWatches = [])).push(childWatcher);
|
|
8267
8267
|
}
|
|
8268
8268
|
}
|
|
8269
|
-
function isIgnoredPath(
|
|
8270
|
-
return some(ignoredPaths, (searchPath) => isInPath(
|
|
8269
|
+
function isIgnoredPath(path5, options) {
|
|
8270
|
+
return some(ignoredPaths, (searchPath) => isInPath(path5, searchPath)) || isIgnoredByWatchOptions(path5, options, useCaseSensitiveFileNames2, getCurrentDirectory);
|
|
8271
8271
|
}
|
|
8272
|
-
function isInPath(
|
|
8273
|
-
if (
|
|
8272
|
+
function isInPath(path5, searchPath) {
|
|
8273
|
+
if (path5.includes(searchPath)) return true;
|
|
8274
8274
|
if (useCaseSensitiveFileNames2) return false;
|
|
8275
|
-
return toCanonicalFilePath(
|
|
8275
|
+
return toCanonicalFilePath(path5).includes(searchPath);
|
|
8276
8276
|
}
|
|
8277
8277
|
}
|
|
8278
8278
|
var FileSystemEntryKind = /* @__PURE__ */ ((FileSystemEntryKind2) => {
|
|
@@ -8650,8 +8650,8 @@ ${lanes.join("\n")}
|
|
|
8650
8650
|
}
|
|
8651
8651
|
function patchWriteFileEnsuringDirectory(sys2) {
|
|
8652
8652
|
const originalWriteFile = sys2.writeFile;
|
|
8653
|
-
sys2.writeFile = (
|
|
8654
|
-
|
|
8653
|
+
sys2.writeFile = (path5, data, writeBom) => writeFileEnsuringDirectories(
|
|
8654
|
+
path5,
|
|
8655
8655
|
data,
|
|
8656
8656
|
!!writeBom,
|
|
8657
8657
|
(path22, data2, writeByteOrderMark) => originalWriteFile.call(sys2, path22, data2, writeByteOrderMark),
|
|
@@ -8695,7 +8695,7 @@ ${lanes.join("\n")}
|
|
|
8695
8695
|
// Node 4.0 `fs.watch` function supports the "recursive" option on both OSX and Windows
|
|
8696
8696
|
// (ref: https://github.com/nodejs/node/pull/2649 and https://github.com/Microsoft/TypeScript/issues/4643)
|
|
8697
8697
|
fsSupportsRecursiveFsWatch,
|
|
8698
|
-
getAccessibleSortedChildDirectories: (
|
|
8698
|
+
getAccessibleSortedChildDirectories: (path5) => getAccessibleFileSystemEntries(path5).directories,
|
|
8699
8699
|
realpath,
|
|
8700
8700
|
tscWatchFile: process.env.TSC_WATCHFILE,
|
|
8701
8701
|
useNonPollingWatchers: !!process.env.TSC_NONPOLLING_WATCHER,
|
|
@@ -8722,7 +8722,7 @@ ${lanes.join("\n")}
|
|
|
8722
8722
|
watchFile: watchFile2,
|
|
8723
8723
|
watchDirectory,
|
|
8724
8724
|
preferNonRecursiveWatch: !fsSupportsRecursiveFsWatch,
|
|
8725
|
-
resolvePath: (
|
|
8725
|
+
resolvePath: (path5) => _path.resolve(path5),
|
|
8726
8726
|
fileExists,
|
|
8727
8727
|
directoryExists,
|
|
8728
8728
|
getAccessibleFileSystemEntries,
|
|
@@ -8757,8 +8757,8 @@ ${lanes.join("\n")}
|
|
|
8757
8757
|
}
|
|
8758
8758
|
return process.memoryUsage().heapUsed;
|
|
8759
8759
|
},
|
|
8760
|
-
getFileSize(
|
|
8761
|
-
const stat = statSync(
|
|
8760
|
+
getFileSize(path5) {
|
|
8761
|
+
const stat = statSync(path5);
|
|
8762
8762
|
if (stat == null ? void 0 : stat.isFile()) {
|
|
8763
8763
|
return stat.size;
|
|
8764
8764
|
}
|
|
@@ -8802,14 +8802,14 @@ ${lanes.join("\n")}
|
|
|
8802
8802
|
}
|
|
8803
8803
|
};
|
|
8804
8804
|
return nodeSystem;
|
|
8805
|
-
function statSync(
|
|
8805
|
+
function statSync(path5) {
|
|
8806
8806
|
try {
|
|
8807
|
-
return _fs.statSync(
|
|
8807
|
+
return _fs.statSync(path5, statSyncOptions);
|
|
8808
8808
|
} catch {
|
|
8809
8809
|
return void 0;
|
|
8810
8810
|
}
|
|
8811
8811
|
}
|
|
8812
|
-
function enableCPUProfiler(
|
|
8812
|
+
function enableCPUProfiler(path5, cb) {
|
|
8813
8813
|
if (activeSession) {
|
|
8814
8814
|
cb();
|
|
8815
8815
|
return false;
|
|
@@ -8824,7 +8824,7 @@ ${lanes.join("\n")}
|
|
|
8824
8824
|
session.post("Profiler.enable", () => {
|
|
8825
8825
|
session.post("Profiler.start", () => {
|
|
8826
8826
|
activeSession = session;
|
|
8827
|
-
profilePath =
|
|
8827
|
+
profilePath = path5;
|
|
8828
8828
|
cb();
|
|
8829
8829
|
});
|
|
8830
8830
|
});
|
|
@@ -8968,9 +8968,9 @@ ${lanes.join("\n")}
|
|
|
8968
8968
|
}
|
|
8969
8969
|
}
|
|
8970
8970
|
}
|
|
8971
|
-
function getAccessibleFileSystemEntries(
|
|
8971
|
+
function getAccessibleFileSystemEntries(path5) {
|
|
8972
8972
|
try {
|
|
8973
|
-
const entries = _fs.readdirSync(
|
|
8973
|
+
const entries = _fs.readdirSync(path5 || ".", { withFileTypes: true });
|
|
8974
8974
|
const files = [];
|
|
8975
8975
|
const directories = [];
|
|
8976
8976
|
for (const dirent of entries) {
|
|
@@ -8980,7 +8980,7 @@ ${lanes.join("\n")}
|
|
|
8980
8980
|
}
|
|
8981
8981
|
let stat;
|
|
8982
8982
|
if (typeof dirent === "string" || dirent.isSymbolicLink()) {
|
|
8983
|
-
const name = combinePaths(
|
|
8983
|
+
const name = combinePaths(path5, entry);
|
|
8984
8984
|
stat = statSync(name);
|
|
8985
8985
|
if (!stat) {
|
|
8986
8986
|
continue;
|
|
@@ -9001,11 +9001,11 @@ ${lanes.join("\n")}
|
|
|
9001
9001
|
return emptyFileSystemEntries;
|
|
9002
9002
|
}
|
|
9003
9003
|
}
|
|
9004
|
-
function readDirectory(
|
|
9005
|
-
return matchFiles(
|
|
9004
|
+
function readDirectory(path5, extensions, excludes, includes, depth) {
|
|
9005
|
+
return matchFiles(path5, extensions, excludes, includes, useCaseSensitiveFileNames2, process.cwd(), depth, getAccessibleFileSystemEntries, realpath);
|
|
9006
9006
|
}
|
|
9007
|
-
function fileSystemEntryExists(
|
|
9008
|
-
const stat = statSync(
|
|
9007
|
+
function fileSystemEntryExists(path5, entryKind) {
|
|
9008
|
+
const stat = statSync(path5);
|
|
9009
9009
|
if (!stat) {
|
|
9010
9010
|
return false;
|
|
9011
9011
|
}
|
|
@@ -9018,47 +9018,47 @@ ${lanes.join("\n")}
|
|
|
9018
9018
|
return false;
|
|
9019
9019
|
}
|
|
9020
9020
|
}
|
|
9021
|
-
function fileExists(
|
|
9021
|
+
function fileExists(path5) {
|
|
9022
9022
|
return fileSystemEntryExists(
|
|
9023
|
-
|
|
9023
|
+
path5,
|
|
9024
9024
|
0
|
|
9025
9025
|
/* File */
|
|
9026
9026
|
);
|
|
9027
9027
|
}
|
|
9028
|
-
function directoryExists(
|
|
9028
|
+
function directoryExists(path5) {
|
|
9029
9029
|
return fileSystemEntryExists(
|
|
9030
|
-
|
|
9030
|
+
path5,
|
|
9031
9031
|
1
|
|
9032
9032
|
/* Directory */
|
|
9033
9033
|
);
|
|
9034
9034
|
}
|
|
9035
|
-
function getDirectories(
|
|
9036
|
-
return getAccessibleFileSystemEntries(
|
|
9035
|
+
function getDirectories(path5) {
|
|
9036
|
+
return getAccessibleFileSystemEntries(path5).directories.slice();
|
|
9037
9037
|
}
|
|
9038
|
-
function fsRealPathHandlingLongPath(
|
|
9039
|
-
return
|
|
9038
|
+
function fsRealPathHandlingLongPath(path5) {
|
|
9039
|
+
return path5.length < 260 ? _fs.realpathSync.native(path5) : _fs.realpathSync(path5);
|
|
9040
9040
|
}
|
|
9041
|
-
function realpath(
|
|
9041
|
+
function realpath(path5) {
|
|
9042
9042
|
try {
|
|
9043
|
-
return fsRealpath(
|
|
9043
|
+
return fsRealpath(path5);
|
|
9044
9044
|
} catch {
|
|
9045
|
-
return
|
|
9045
|
+
return path5;
|
|
9046
9046
|
}
|
|
9047
9047
|
}
|
|
9048
|
-
function getModifiedTime3(
|
|
9048
|
+
function getModifiedTime3(path5) {
|
|
9049
9049
|
var _a;
|
|
9050
|
-
return (_a = statSync(
|
|
9050
|
+
return (_a = statSync(path5)) == null ? void 0 : _a.mtime;
|
|
9051
9051
|
}
|
|
9052
|
-
function setModifiedTime(
|
|
9052
|
+
function setModifiedTime(path5, time) {
|
|
9053
9053
|
try {
|
|
9054
|
-
_fs.utimesSync(
|
|
9054
|
+
_fs.utimesSync(path5, time, time);
|
|
9055
9055
|
} catch {
|
|
9056
9056
|
return;
|
|
9057
9057
|
}
|
|
9058
9058
|
}
|
|
9059
|
-
function deleteFile(
|
|
9059
|
+
function deleteFile(path5) {
|
|
9060
9060
|
try {
|
|
9061
|
-
return _fs.unlinkSync(
|
|
9061
|
+
return _fs.unlinkSync(path5);
|
|
9062
9062
|
} catch {
|
|
9063
9063
|
return;
|
|
9064
9064
|
}
|
|
@@ -9098,41 +9098,41 @@ ${lanes.join("\n")}
|
|
|
9098
9098
|
function isAnyDirectorySeparator(charCode) {
|
|
9099
9099
|
return charCode === 47 || charCode === 92;
|
|
9100
9100
|
}
|
|
9101
|
-
function isUrl(
|
|
9102
|
-
return getEncodedRootLength(
|
|
9101
|
+
function isUrl(path5) {
|
|
9102
|
+
return getEncodedRootLength(path5) < 0;
|
|
9103
9103
|
}
|
|
9104
|
-
function isRootedDiskPath(
|
|
9105
|
-
return getEncodedRootLength(
|
|
9104
|
+
function isRootedDiskPath(path5) {
|
|
9105
|
+
return getEncodedRootLength(path5) > 0;
|
|
9106
9106
|
}
|
|
9107
|
-
function isDiskPathRoot(
|
|
9108
|
-
const rootLength = getEncodedRootLength(
|
|
9109
|
-
return rootLength > 0 && rootLength ===
|
|
9107
|
+
function isDiskPathRoot(path5) {
|
|
9108
|
+
const rootLength = getEncodedRootLength(path5);
|
|
9109
|
+
return rootLength > 0 && rootLength === path5.length;
|
|
9110
9110
|
}
|
|
9111
|
-
function pathIsAbsolute(
|
|
9112
|
-
return getEncodedRootLength(
|
|
9111
|
+
function pathIsAbsolute(path5) {
|
|
9112
|
+
return getEncodedRootLength(path5) !== 0;
|
|
9113
9113
|
}
|
|
9114
|
-
function pathIsRelative(
|
|
9115
|
-
return /^\.\.?(?:$|[\\/])/.test(
|
|
9114
|
+
function pathIsRelative(path5) {
|
|
9115
|
+
return /^\.\.?(?:$|[\\/])/.test(path5);
|
|
9116
9116
|
}
|
|
9117
|
-
function pathIsBareSpecifier(
|
|
9118
|
-
return !pathIsAbsolute(
|
|
9117
|
+
function pathIsBareSpecifier(path5) {
|
|
9118
|
+
return !pathIsAbsolute(path5) && !pathIsRelative(path5);
|
|
9119
9119
|
}
|
|
9120
9120
|
function hasExtension(fileName) {
|
|
9121
9121
|
return getBaseFileName(fileName).includes(".");
|
|
9122
9122
|
}
|
|
9123
|
-
function fileExtensionIs(
|
|
9124
|
-
return
|
|
9123
|
+
function fileExtensionIs(path5, extension) {
|
|
9124
|
+
return path5.length > extension.length && endsWith(path5, extension);
|
|
9125
9125
|
}
|
|
9126
|
-
function fileExtensionIsOneOf(
|
|
9126
|
+
function fileExtensionIsOneOf(path5, extensions) {
|
|
9127
9127
|
for (const extension of extensions) {
|
|
9128
|
-
if (fileExtensionIs(
|
|
9128
|
+
if (fileExtensionIs(path5, extension)) {
|
|
9129
9129
|
return true;
|
|
9130
9130
|
}
|
|
9131
9131
|
}
|
|
9132
9132
|
return false;
|
|
9133
9133
|
}
|
|
9134
|
-
function hasTrailingDirectorySeparator(
|
|
9135
|
-
return
|
|
9134
|
+
function hasTrailingDirectorySeparator(path5) {
|
|
9135
|
+
return path5.length > 0 && isAnyDirectorySeparator(path5.charCodeAt(path5.length - 1));
|
|
9136
9136
|
}
|
|
9137
9137
|
function isVolumeCharacter(charCode) {
|
|
9138
9138
|
return charCode >= 97 && charCode <= 122 || charCode >= 65 && charCode <= 90;
|
|
@@ -9146,111 +9146,111 @@ ${lanes.join("\n")}
|
|
|
9146
9146
|
}
|
|
9147
9147
|
return -1;
|
|
9148
9148
|
}
|
|
9149
|
-
function getEncodedRootLength(
|
|
9150
|
-
if (!
|
|
9151
|
-
const ch0 =
|
|
9149
|
+
function getEncodedRootLength(path5) {
|
|
9150
|
+
if (!path5) return 0;
|
|
9151
|
+
const ch0 = path5.charCodeAt(0);
|
|
9152
9152
|
if (ch0 === 47 || ch0 === 92) {
|
|
9153
|
-
if (
|
|
9154
|
-
const p1 =
|
|
9155
|
-
if (p1 < 0) return
|
|
9153
|
+
if (path5.charCodeAt(1) !== ch0) return 1;
|
|
9154
|
+
const p1 = path5.indexOf(ch0 === 47 ? directorySeparator : altDirectorySeparator, 2);
|
|
9155
|
+
if (p1 < 0) return path5.length;
|
|
9156
9156
|
return p1 + 1;
|
|
9157
9157
|
}
|
|
9158
|
-
if (isVolumeCharacter(ch0) &&
|
|
9159
|
-
const ch2 =
|
|
9158
|
+
if (isVolumeCharacter(ch0) && path5.charCodeAt(1) === 58) {
|
|
9159
|
+
const ch2 = path5.charCodeAt(2);
|
|
9160
9160
|
if (ch2 === 47 || ch2 === 92) return 3;
|
|
9161
|
-
if (
|
|
9161
|
+
if (path5.length === 2) return 2;
|
|
9162
9162
|
}
|
|
9163
|
-
const schemeEnd =
|
|
9163
|
+
const schemeEnd = path5.indexOf(urlSchemeSeparator);
|
|
9164
9164
|
if (schemeEnd !== -1) {
|
|
9165
9165
|
const authorityStart = schemeEnd + urlSchemeSeparator.length;
|
|
9166
|
-
const authorityEnd =
|
|
9166
|
+
const authorityEnd = path5.indexOf(directorySeparator, authorityStart);
|
|
9167
9167
|
if (authorityEnd !== -1) {
|
|
9168
|
-
const scheme =
|
|
9169
|
-
const authority =
|
|
9170
|
-
if (scheme === "file" && (authority === "" || authority === "localhost") && isVolumeCharacter(
|
|
9171
|
-
const volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(
|
|
9168
|
+
const scheme = path5.slice(0, schemeEnd);
|
|
9169
|
+
const authority = path5.slice(authorityStart, authorityEnd);
|
|
9170
|
+
if (scheme === "file" && (authority === "" || authority === "localhost") && isVolumeCharacter(path5.charCodeAt(authorityEnd + 1))) {
|
|
9171
|
+
const volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path5, authorityEnd + 2);
|
|
9172
9172
|
if (volumeSeparatorEnd !== -1) {
|
|
9173
|
-
if (
|
|
9173
|
+
if (path5.charCodeAt(volumeSeparatorEnd) === 47) {
|
|
9174
9174
|
return ~(volumeSeparatorEnd + 1);
|
|
9175
9175
|
}
|
|
9176
|
-
if (volumeSeparatorEnd ===
|
|
9176
|
+
if (volumeSeparatorEnd === path5.length) {
|
|
9177
9177
|
return ~volumeSeparatorEnd;
|
|
9178
9178
|
}
|
|
9179
9179
|
}
|
|
9180
9180
|
}
|
|
9181
9181
|
return ~(authorityEnd + 1);
|
|
9182
9182
|
}
|
|
9183
|
-
return ~
|
|
9183
|
+
return ~path5.length;
|
|
9184
9184
|
}
|
|
9185
9185
|
return 0;
|
|
9186
9186
|
}
|
|
9187
|
-
function getRootLength(
|
|
9188
|
-
const rootLength = getEncodedRootLength(
|
|
9187
|
+
function getRootLength(path5) {
|
|
9188
|
+
const rootLength = getEncodedRootLength(path5);
|
|
9189
9189
|
return rootLength < 0 ? ~rootLength : rootLength;
|
|
9190
9190
|
}
|
|
9191
|
-
function getDirectoryPath(
|
|
9192
|
-
|
|
9193
|
-
const rootLength = getRootLength(
|
|
9194
|
-
if (rootLength ===
|
|
9195
|
-
|
|
9196
|
-
return
|
|
9197
|
-
}
|
|
9198
|
-
function getBaseFileName(
|
|
9199
|
-
|
|
9200
|
-
const rootLength = getRootLength(
|
|
9201
|
-
if (rootLength ===
|
|
9202
|
-
|
|
9203
|
-
const name =
|
|
9191
|
+
function getDirectoryPath(path5) {
|
|
9192
|
+
path5 = normalizeSlashes(path5);
|
|
9193
|
+
const rootLength = getRootLength(path5);
|
|
9194
|
+
if (rootLength === path5.length) return path5;
|
|
9195
|
+
path5 = removeTrailingDirectorySeparator(path5);
|
|
9196
|
+
return path5.slice(0, Math.max(rootLength, path5.lastIndexOf(directorySeparator)));
|
|
9197
|
+
}
|
|
9198
|
+
function getBaseFileName(path5, extensions, ignoreCase) {
|
|
9199
|
+
path5 = normalizeSlashes(path5);
|
|
9200
|
+
const rootLength = getRootLength(path5);
|
|
9201
|
+
if (rootLength === path5.length) return "";
|
|
9202
|
+
path5 = removeTrailingDirectorySeparator(path5);
|
|
9203
|
+
const name = path5.slice(Math.max(getRootLength(path5), path5.lastIndexOf(directorySeparator) + 1));
|
|
9204
9204
|
const extension = extensions !== void 0 && ignoreCase !== void 0 ? getAnyExtensionFromPath(name, extensions, ignoreCase) : void 0;
|
|
9205
9205
|
return extension ? name.slice(0, name.length - extension.length) : name;
|
|
9206
9206
|
}
|
|
9207
|
-
function tryGetExtensionFromPath(
|
|
9207
|
+
function tryGetExtensionFromPath(path5, extension, stringEqualityComparer) {
|
|
9208
9208
|
if (!startsWith(extension, ".")) extension = "." + extension;
|
|
9209
|
-
if (
|
|
9210
|
-
const pathExtension =
|
|
9209
|
+
if (path5.length >= extension.length && path5.charCodeAt(path5.length - extension.length) === 46) {
|
|
9210
|
+
const pathExtension = path5.slice(path5.length - extension.length);
|
|
9211
9211
|
if (stringEqualityComparer(pathExtension, extension)) {
|
|
9212
9212
|
return pathExtension;
|
|
9213
9213
|
}
|
|
9214
9214
|
}
|
|
9215
9215
|
}
|
|
9216
|
-
function getAnyExtensionFromPathWorker(
|
|
9216
|
+
function getAnyExtensionFromPathWorker(path5, extensions, stringEqualityComparer) {
|
|
9217
9217
|
if (typeof extensions === "string") {
|
|
9218
|
-
return tryGetExtensionFromPath(
|
|
9218
|
+
return tryGetExtensionFromPath(path5, extensions, stringEqualityComparer) || "";
|
|
9219
9219
|
}
|
|
9220
9220
|
for (const extension of extensions) {
|
|
9221
|
-
const result = tryGetExtensionFromPath(
|
|
9221
|
+
const result = tryGetExtensionFromPath(path5, extension, stringEqualityComparer);
|
|
9222
9222
|
if (result) return result;
|
|
9223
9223
|
}
|
|
9224
9224
|
return "";
|
|
9225
9225
|
}
|
|
9226
|
-
function getAnyExtensionFromPath(
|
|
9226
|
+
function getAnyExtensionFromPath(path5, extensions, ignoreCase) {
|
|
9227
9227
|
if (extensions) {
|
|
9228
|
-
return getAnyExtensionFromPathWorker(removeTrailingDirectorySeparator(
|
|
9228
|
+
return getAnyExtensionFromPathWorker(removeTrailingDirectorySeparator(path5), extensions, ignoreCase ? equateStringsCaseInsensitive : equateStringsCaseSensitive);
|
|
9229
9229
|
}
|
|
9230
|
-
const baseFileName = getBaseFileName(
|
|
9230
|
+
const baseFileName = getBaseFileName(path5);
|
|
9231
9231
|
const extensionIndex = baseFileName.lastIndexOf(".");
|
|
9232
9232
|
if (extensionIndex >= 0) {
|
|
9233
9233
|
return baseFileName.substring(extensionIndex);
|
|
9234
9234
|
}
|
|
9235
9235
|
return "";
|
|
9236
9236
|
}
|
|
9237
|
-
function pathComponents(
|
|
9238
|
-
const root =
|
|
9239
|
-
const rest =
|
|
9237
|
+
function pathComponents(path5, rootLength) {
|
|
9238
|
+
const root = path5.substring(0, rootLength);
|
|
9239
|
+
const rest = path5.substring(rootLength).split(directorySeparator);
|
|
9240
9240
|
if (rest.length && !lastOrUndefined(rest)) rest.pop();
|
|
9241
9241
|
return [root, ...rest];
|
|
9242
9242
|
}
|
|
9243
|
-
function getPathComponents(
|
|
9244
|
-
|
|
9245
|
-
return pathComponents(
|
|
9243
|
+
function getPathComponents(path5, currentDirectory = "") {
|
|
9244
|
+
path5 = combinePaths(currentDirectory, path5);
|
|
9245
|
+
return pathComponents(path5, getRootLength(path5));
|
|
9246
9246
|
}
|
|
9247
9247
|
function getPathFromPathComponents(pathComponents2, length2) {
|
|
9248
9248
|
if (pathComponents2.length === 0) return "";
|
|
9249
9249
|
const root = pathComponents2[0] && ensureTrailingDirectorySeparator(pathComponents2[0]);
|
|
9250
9250
|
return root + pathComponents2.slice(1, length2).join(directorySeparator);
|
|
9251
9251
|
}
|
|
9252
|
-
function normalizeSlashes(
|
|
9253
|
-
return
|
|
9252
|
+
function normalizeSlashes(path5) {
|
|
9253
|
+
return path5.includes("\\") ? path5.replace(backslashRegExp, directorySeparator) : path5;
|
|
9254
9254
|
}
|
|
9255
9255
|
function reducePathComponents(components) {
|
|
9256
9256
|
if (!some(components)) return [];
|
|
@@ -9271,39 +9271,39 @@ ${lanes.join("\n")}
|
|
|
9271
9271
|
}
|
|
9272
9272
|
return reduced;
|
|
9273
9273
|
}
|
|
9274
|
-
function combinePaths(
|
|
9275
|
-
if (
|
|
9274
|
+
function combinePaths(path5, ...paths) {
|
|
9275
|
+
if (path5) path5 = normalizeSlashes(path5);
|
|
9276
9276
|
for (let relativePath of paths) {
|
|
9277
9277
|
if (!relativePath) continue;
|
|
9278
9278
|
relativePath = normalizeSlashes(relativePath);
|
|
9279
|
-
if (!
|
|
9280
|
-
|
|
9279
|
+
if (!path5 || getRootLength(relativePath) !== 0) {
|
|
9280
|
+
path5 = relativePath;
|
|
9281
9281
|
} else {
|
|
9282
|
-
|
|
9282
|
+
path5 = ensureTrailingDirectorySeparator(path5) + relativePath;
|
|
9283
9283
|
}
|
|
9284
9284
|
}
|
|
9285
|
-
return
|
|
9285
|
+
return path5;
|
|
9286
9286
|
}
|
|
9287
|
-
function resolvePath(
|
|
9288
|
-
return normalizePath(some(paths) ? combinePaths(
|
|
9287
|
+
function resolvePath(path5, ...paths) {
|
|
9288
|
+
return normalizePath(some(paths) ? combinePaths(path5, ...paths) : normalizeSlashes(path5));
|
|
9289
9289
|
}
|
|
9290
|
-
function getNormalizedPathComponents(
|
|
9291
|
-
return reducePathComponents(getPathComponents(
|
|
9290
|
+
function getNormalizedPathComponents(path5, currentDirectory) {
|
|
9291
|
+
return reducePathComponents(getPathComponents(path5, currentDirectory));
|
|
9292
9292
|
}
|
|
9293
|
-
function getNormalizedAbsolutePath(
|
|
9294
|
-
let rootLength = getRootLength(
|
|
9293
|
+
function getNormalizedAbsolutePath(path5, currentDirectory) {
|
|
9294
|
+
let rootLength = getRootLength(path5);
|
|
9295
9295
|
if (rootLength === 0 && currentDirectory) {
|
|
9296
|
-
|
|
9297
|
-
rootLength = getRootLength(
|
|
9296
|
+
path5 = combinePaths(currentDirectory, path5);
|
|
9297
|
+
rootLength = getRootLength(path5);
|
|
9298
9298
|
} else {
|
|
9299
|
-
|
|
9299
|
+
path5 = normalizeSlashes(path5);
|
|
9300
9300
|
}
|
|
9301
|
-
const simpleNormalized = simpleNormalizePath(
|
|
9301
|
+
const simpleNormalized = simpleNormalizePath(path5);
|
|
9302
9302
|
if (simpleNormalized !== void 0) {
|
|
9303
9303
|
return simpleNormalized.length > rootLength ? removeTrailingDirectorySeparator(simpleNormalized) : simpleNormalized;
|
|
9304
9304
|
}
|
|
9305
|
-
const length2 =
|
|
9306
|
-
const root =
|
|
9305
|
+
const length2 = path5.length;
|
|
9306
|
+
const root = path5.substring(0, rootLength);
|
|
9307
9307
|
let normalized;
|
|
9308
9308
|
let index = rootLength;
|
|
9309
9309
|
let segmentStart = index;
|
|
@@ -9311,23 +9311,23 @@ ${lanes.join("\n")}
|
|
|
9311
9311
|
let seenNonDotDotSegment = rootLength !== 0;
|
|
9312
9312
|
while (index < length2) {
|
|
9313
9313
|
segmentStart = index;
|
|
9314
|
-
let ch =
|
|
9314
|
+
let ch = path5.charCodeAt(index);
|
|
9315
9315
|
while (ch === 47 && index + 1 < length2) {
|
|
9316
9316
|
index++;
|
|
9317
|
-
ch =
|
|
9317
|
+
ch = path5.charCodeAt(index);
|
|
9318
9318
|
}
|
|
9319
9319
|
if (index > segmentStart) {
|
|
9320
|
-
normalized ?? (normalized =
|
|
9320
|
+
normalized ?? (normalized = path5.substring(0, segmentStart - 1));
|
|
9321
9321
|
segmentStart = index;
|
|
9322
9322
|
}
|
|
9323
|
-
let segmentEnd =
|
|
9323
|
+
let segmentEnd = path5.indexOf(directorySeparator, index + 1);
|
|
9324
9324
|
if (segmentEnd === -1) {
|
|
9325
9325
|
segmentEnd = length2;
|
|
9326
9326
|
}
|
|
9327
9327
|
const segmentLength = segmentEnd - segmentStart;
|
|
9328
|
-
if (segmentLength === 1 &&
|
|
9329
|
-
normalized ?? (normalized =
|
|
9330
|
-
} else if (segmentLength === 2 &&
|
|
9328
|
+
if (segmentLength === 1 && path5.charCodeAt(index) === 46) {
|
|
9329
|
+
normalized ?? (normalized = path5.substring(0, normalizedUpTo));
|
|
9330
|
+
} else if (segmentLength === 2 && path5.charCodeAt(index) === 46 && path5.charCodeAt(index + 1) === 46) {
|
|
9331
9331
|
if (!seenNonDotDotSegment) {
|
|
9332
9332
|
if (normalized !== void 0) {
|
|
9333
9333
|
normalized += normalized.length === rootLength ? ".." : "/..";
|
|
@@ -9336,9 +9336,9 @@ ${lanes.join("\n")}
|
|
|
9336
9336
|
}
|
|
9337
9337
|
} else if (normalized === void 0) {
|
|
9338
9338
|
if (normalizedUpTo - 2 >= 0) {
|
|
9339
|
-
normalized =
|
|
9339
|
+
normalized = path5.substring(0, Math.max(rootLength, path5.lastIndexOf(directorySeparator, normalizedUpTo - 2)));
|
|
9340
9340
|
} else {
|
|
9341
|
-
normalized =
|
|
9341
|
+
normalized = path5.substring(0, normalizedUpTo);
|
|
9342
9342
|
}
|
|
9343
9343
|
} else {
|
|
9344
9344
|
const lastSlash = normalized.lastIndexOf(directorySeparator);
|
|
@@ -9356,36 +9356,36 @@ ${lanes.join("\n")}
|
|
|
9356
9356
|
normalized += directorySeparator;
|
|
9357
9357
|
}
|
|
9358
9358
|
seenNonDotDotSegment = true;
|
|
9359
|
-
normalized +=
|
|
9359
|
+
normalized += path5.substring(segmentStart, segmentEnd);
|
|
9360
9360
|
} else {
|
|
9361
9361
|
seenNonDotDotSegment = true;
|
|
9362
9362
|
normalizedUpTo = segmentEnd;
|
|
9363
9363
|
}
|
|
9364
9364
|
index = segmentEnd + 1;
|
|
9365
9365
|
}
|
|
9366
|
-
return normalized ?? (length2 > rootLength ? removeTrailingDirectorySeparator(
|
|
9366
|
+
return normalized ?? (length2 > rootLength ? removeTrailingDirectorySeparator(path5) : path5);
|
|
9367
9367
|
}
|
|
9368
|
-
function normalizePath(
|
|
9369
|
-
|
|
9370
|
-
let normalized = simpleNormalizePath(
|
|
9368
|
+
function normalizePath(path5) {
|
|
9369
|
+
path5 = normalizeSlashes(path5);
|
|
9370
|
+
let normalized = simpleNormalizePath(path5);
|
|
9371
9371
|
if (normalized !== void 0) {
|
|
9372
9372
|
return normalized;
|
|
9373
9373
|
}
|
|
9374
|
-
normalized = getNormalizedAbsolutePath(
|
|
9375
|
-
return normalized && hasTrailingDirectorySeparator(
|
|
9374
|
+
normalized = getNormalizedAbsolutePath(path5, "");
|
|
9375
|
+
return normalized && hasTrailingDirectorySeparator(path5) ? ensureTrailingDirectorySeparator(normalized) : normalized;
|
|
9376
9376
|
}
|
|
9377
|
-
function simpleNormalizePath(
|
|
9378
|
-
if (!relativePathSegmentRegExp.test(
|
|
9379
|
-
return
|
|
9377
|
+
function simpleNormalizePath(path5) {
|
|
9378
|
+
if (!relativePathSegmentRegExp.test(path5)) {
|
|
9379
|
+
return path5;
|
|
9380
9380
|
}
|
|
9381
|
-
let simplified =
|
|
9381
|
+
let simplified = path5.replace(/\/\.\//g, "/");
|
|
9382
9382
|
if (simplified.startsWith("./")) {
|
|
9383
9383
|
simplified = simplified.slice(2);
|
|
9384
9384
|
}
|
|
9385
|
-
if (simplified !==
|
|
9386
|
-
|
|
9387
|
-
if (!relativePathSegmentRegExp.test(
|
|
9388
|
-
return
|
|
9385
|
+
if (simplified !== path5) {
|
|
9386
|
+
path5 = simplified;
|
|
9387
|
+
if (!relativePathSegmentRegExp.test(path5)) {
|
|
9388
|
+
return path5;
|
|
9389
9389
|
}
|
|
9390
9390
|
}
|
|
9391
9391
|
return void 0;
|
|
@@ -9401,31 +9401,31 @@ ${lanes.join("\n")}
|
|
|
9401
9401
|
const nonCanonicalizedPath = isRootedDiskPath(fileName) ? normalizePath(fileName) : getNormalizedAbsolutePath(fileName, basePath);
|
|
9402
9402
|
return getCanonicalFileName(nonCanonicalizedPath);
|
|
9403
9403
|
}
|
|
9404
|
-
function removeTrailingDirectorySeparator(
|
|
9405
|
-
if (hasTrailingDirectorySeparator(
|
|
9406
|
-
return
|
|
9404
|
+
function removeTrailingDirectorySeparator(path5) {
|
|
9405
|
+
if (hasTrailingDirectorySeparator(path5)) {
|
|
9406
|
+
return path5.substr(0, path5.length - 1);
|
|
9407
9407
|
}
|
|
9408
|
-
return
|
|
9408
|
+
return path5;
|
|
9409
9409
|
}
|
|
9410
|
-
function ensureTrailingDirectorySeparator(
|
|
9411
|
-
if (!hasTrailingDirectorySeparator(
|
|
9412
|
-
return
|
|
9410
|
+
function ensureTrailingDirectorySeparator(path5) {
|
|
9411
|
+
if (!hasTrailingDirectorySeparator(path5)) {
|
|
9412
|
+
return path5 + directorySeparator;
|
|
9413
9413
|
}
|
|
9414
|
-
return
|
|
9414
|
+
return path5;
|
|
9415
9415
|
}
|
|
9416
|
-
function ensurePathIsNonModuleName(
|
|
9417
|
-
return !pathIsAbsolute(
|
|
9416
|
+
function ensurePathIsNonModuleName(path5) {
|
|
9417
|
+
return !pathIsAbsolute(path5) && !pathIsRelative(path5) ? "./" + path5 : path5;
|
|
9418
9418
|
}
|
|
9419
|
-
function changeAnyExtension(
|
|
9420
|
-
const pathext = extensions !== void 0 && ignoreCase !== void 0 ? getAnyExtensionFromPath(
|
|
9421
|
-
return pathext ?
|
|
9419
|
+
function changeAnyExtension(path5, ext, extensions, ignoreCase) {
|
|
9420
|
+
const pathext = extensions !== void 0 && ignoreCase !== void 0 ? getAnyExtensionFromPath(path5, extensions, ignoreCase) : getAnyExtensionFromPath(path5);
|
|
9421
|
+
return pathext ? path5.slice(0, path5.length - pathext.length) + (startsWith(ext, ".") ? ext : "." + ext) : path5;
|
|
9422
9422
|
}
|
|
9423
|
-
function changeFullExtension(
|
|
9424
|
-
const declarationExtension = getDeclarationFileExtension(
|
|
9423
|
+
function changeFullExtension(path5, newExtension) {
|
|
9424
|
+
const declarationExtension = getDeclarationFileExtension(path5);
|
|
9425
9425
|
if (declarationExtension) {
|
|
9426
|
-
return
|
|
9426
|
+
return path5.slice(0, path5.length - declarationExtension.length) + (startsWith(newExtension, ".") ? newExtension : "." + newExtension);
|
|
9427
9427
|
}
|
|
9428
|
-
return changeAnyExtension(
|
|
9428
|
+
return changeAnyExtension(path5, newExtension);
|
|
9429
9429
|
}
|
|
9430
9430
|
var relativePathSegmentRegExp = /\/\/|(?:^|\/)\.\.?(?:$|\/)/;
|
|
9431
9431
|
function comparePathsWorker(a, b, componentComparer) {
|
|
@@ -20878,8 +20878,8 @@ ${lanes.join("\n")}
|
|
|
20878
20878
|
function getResolvedExternalModuleName(host, file, referenceFile) {
|
|
20879
20879
|
return file.moduleName || getExternalModuleNameFromPath(host, file.fileName, referenceFile && referenceFile.fileName);
|
|
20880
20880
|
}
|
|
20881
|
-
function getCanonicalAbsolutePath(host,
|
|
20882
|
-
return host.getCanonicalFileName(getNormalizedAbsolutePath(
|
|
20881
|
+
function getCanonicalAbsolutePath(host, path5) {
|
|
20882
|
+
return host.getCanonicalFileName(getNormalizedAbsolutePath(path5, host.getCurrentDirectory()));
|
|
20883
20883
|
}
|
|
20884
20884
|
function getExternalModuleNameFromDeclaration(host, resolver, declaration) {
|
|
20885
20885
|
const file = resolver.getExternalModuleFileFromDeclaration(declaration);
|
|
@@ -20922,20 +20922,20 @@ ${lanes.join("\n")}
|
|
|
20922
20922
|
}
|
|
20923
20923
|
function getDeclarationEmitOutputFilePathWorker(fileName, options, host) {
|
|
20924
20924
|
const outputDir = options.declarationDir || options.outDir;
|
|
20925
|
-
const
|
|
20926
|
-
const declarationExtension = getDeclarationEmitExtensionForPath(
|
|
20927
|
-
return removeFileExtension(
|
|
20925
|
+
const path5 = outputDir ? getSourceFilePathInNewDirWorker(fileName, outputDir, host.getCurrentDirectory(), host.getCommonSourceDirectory(), (f) => host.getCanonicalFileName(f)) : fileName;
|
|
20926
|
+
const declarationExtension = getDeclarationEmitExtensionForPath(path5);
|
|
20927
|
+
return removeFileExtension(path5) + declarationExtension;
|
|
20928
20928
|
}
|
|
20929
|
-
function getDeclarationEmitExtensionForPath(
|
|
20930
|
-
return fileExtensionIsOneOf(
|
|
20929
|
+
function getDeclarationEmitExtensionForPath(path5) {
|
|
20930
|
+
return fileExtensionIsOneOf(path5, [
|
|
20931
20931
|
".mjs",
|
|
20932
20932
|
".mts"
|
|
20933
20933
|
/* Mts */
|
|
20934
|
-
]) ? ".d.mts" : fileExtensionIsOneOf(
|
|
20934
|
+
]) ? ".d.mts" : fileExtensionIsOneOf(path5, [
|
|
20935
20935
|
".cjs",
|
|
20936
20936
|
".cts"
|
|
20937
20937
|
/* Cts */
|
|
20938
|
-
]) ? ".d.cts" : fileExtensionIsOneOf(
|
|
20938
|
+
]) ? ".d.cts" : fileExtensionIsOneOf(path5, [
|
|
20939
20939
|
".json"
|
|
20940
20940
|
/* Json */
|
|
20941
20941
|
]) ? `.d.json.ts` : (
|
|
@@ -20943,8 +20943,8 @@ ${lanes.join("\n")}
|
|
|
20943
20943
|
".d.ts"
|
|
20944
20944
|
);
|
|
20945
20945
|
}
|
|
20946
|
-
function getPossibleOriginalInputExtensionForExtension(
|
|
20947
|
-
return fileExtensionIsOneOf(
|
|
20946
|
+
function getPossibleOriginalInputExtensionForExtension(path5) {
|
|
20947
|
+
return fileExtensionIsOneOf(path5, [
|
|
20948
20948
|
".d.mts",
|
|
20949
20949
|
".mjs",
|
|
20950
20950
|
".mts"
|
|
@@ -20953,7 +20953,7 @@ ${lanes.join("\n")}
|
|
|
20953
20953
|
".mts",
|
|
20954
20954
|
".mjs"
|
|
20955
20955
|
/* Mjs */
|
|
20956
|
-
] : fileExtensionIsOneOf(
|
|
20956
|
+
] : fileExtensionIsOneOf(path5, [
|
|
20957
20957
|
".d.cts",
|
|
20958
20958
|
".cjs",
|
|
20959
20959
|
".cts"
|
|
@@ -20962,7 +20962,7 @@ ${lanes.join("\n")}
|
|
|
20962
20962
|
".cts",
|
|
20963
20963
|
".cjs"
|
|
20964
20964
|
/* Cjs */
|
|
20965
|
-
] : fileExtensionIsOneOf(
|
|
20965
|
+
] : fileExtensionIsOneOf(path5, [`.d.json.ts`]) ? [
|
|
20966
20966
|
".json"
|
|
20967
20967
|
/* Json */
|
|
20968
20968
|
] : [
|
|
@@ -21047,12 +21047,12 @@ ${lanes.join("\n")}
|
|
|
21047
21047
|
createDirectory(directoryPath);
|
|
21048
21048
|
}
|
|
21049
21049
|
}
|
|
21050
|
-
function writeFileEnsuringDirectories(
|
|
21050
|
+
function writeFileEnsuringDirectories(path5, data, writeByteOrderMark, writeFile2, createDirectory, directoryExists) {
|
|
21051
21051
|
try {
|
|
21052
|
-
writeFile2(
|
|
21052
|
+
writeFile2(path5, data, writeByteOrderMark);
|
|
21053
21053
|
} catch {
|
|
21054
|
-
ensureDirectoriesExist(getDirectoryPath(normalizePath(
|
|
21055
|
-
writeFile2(
|
|
21054
|
+
ensureDirectoriesExist(getDirectoryPath(normalizePath(path5)), createDirectory, directoryExists);
|
|
21055
|
+
writeFile2(path5, data, writeByteOrderMark);
|
|
21056
21056
|
}
|
|
21057
21057
|
}
|
|
21058
21058
|
function getLineOfLocalPosition(sourceFile, pos) {
|
|
@@ -21752,20 +21752,20 @@ ${lanes.join("\n")}
|
|
|
21752
21752
|
}
|
|
21753
21753
|
return getStringFromExpandedCharCodes(expandedCharCodes);
|
|
21754
21754
|
}
|
|
21755
|
-
function readJsonOrUndefined(
|
|
21756
|
-
const jsonText = isString(hostOrText) ? hostOrText : hostOrText.readFile(
|
|
21755
|
+
function readJsonOrUndefined(path5, hostOrText) {
|
|
21756
|
+
const jsonText = isString(hostOrText) ? hostOrText : hostOrText.readFile(path5);
|
|
21757
21757
|
if (!jsonText) return void 0;
|
|
21758
21758
|
let result = tryParseJson(jsonText);
|
|
21759
21759
|
if (result === void 0) {
|
|
21760
|
-
const looseResult = parseConfigFileTextToJson(
|
|
21760
|
+
const looseResult = parseConfigFileTextToJson(path5, jsonText);
|
|
21761
21761
|
if (!looseResult.error) {
|
|
21762
21762
|
result = looseResult.config;
|
|
21763
21763
|
}
|
|
21764
21764
|
}
|
|
21765
21765
|
return result;
|
|
21766
21766
|
}
|
|
21767
|
-
function readJson(
|
|
21768
|
-
return readJsonOrUndefined(
|
|
21767
|
+
function readJson(path5, host) {
|
|
21768
|
+
return readJsonOrUndefined(path5, host) || {};
|
|
21769
21769
|
}
|
|
21770
21770
|
function tryParseJson(text) {
|
|
21771
21771
|
try {
|
|
@@ -22915,7 +22915,7 @@ ${lanes.join("\n")}
|
|
|
22915
22915
|
getSymlinkedFiles: () => symlinkedFiles,
|
|
22916
22916
|
getSymlinkedDirectories: () => symlinkedDirectories,
|
|
22917
22917
|
getSymlinkedDirectoriesByRealpath: () => symlinkedDirectoriesByRealpath,
|
|
22918
|
-
setSymlinkedFile: (
|
|
22918
|
+
setSymlinkedFile: (path5, real) => (symlinkedFiles || (symlinkedFiles = /* @__PURE__ */ new Map())).set(path5, real),
|
|
22919
22919
|
setSymlinkedDirectory: (symlink, real) => {
|
|
22920
22920
|
let symlinkPath = toPath(symlink, cwd, getCanonicalFileName);
|
|
22921
22921
|
if (!containsIgnoredPath(symlinkPath)) {
|
|
@@ -22975,8 +22975,8 @@ ${lanes.join("\n")}
|
|
|
22975
22975
|
function stripLeadingDirectorySeparator(s) {
|
|
22976
22976
|
return isAnyDirectorySeparator(s.charCodeAt(0)) ? s.slice(1) : void 0;
|
|
22977
22977
|
}
|
|
22978
|
-
function tryRemoveDirectoryPrefix(
|
|
22979
|
-
const withoutPrefix = tryRemovePrefix(
|
|
22978
|
+
function tryRemoveDirectoryPrefix(path5, dirPath, getCanonicalFileName) {
|
|
22979
|
+
const withoutPrefix = tryRemovePrefix(path5, dirPath, getCanonicalFileName);
|
|
22980
22980
|
return withoutPrefix === void 0 ? void 0 : stripLeadingDirectorySeparator(withoutPrefix);
|
|
22981
22981
|
}
|
|
22982
22982
|
var reservedCharacterPattern = /[^\w\s/]/g;
|
|
@@ -23102,25 +23102,25 @@ ${lanes.join("\n")}
|
|
|
23102
23102
|
function replaceWildcardCharacter(match, singleAsteriskRegexFragment) {
|
|
23103
23103
|
return match === "*" ? singleAsteriskRegexFragment : match === "?" ? "[^/]" : "\\" + match;
|
|
23104
23104
|
}
|
|
23105
|
-
function getFileMatcherPatterns(
|
|
23106
|
-
|
|
23105
|
+
function getFileMatcherPatterns(path5, excludes, includes, useCaseSensitiveFileNames2, currentDirectory) {
|
|
23106
|
+
path5 = normalizePath(path5);
|
|
23107
23107
|
currentDirectory = normalizePath(currentDirectory);
|
|
23108
|
-
const absolutePath = combinePaths(currentDirectory,
|
|
23108
|
+
const absolutePath = combinePaths(currentDirectory, path5);
|
|
23109
23109
|
return {
|
|
23110
23110
|
includeFilePatterns: map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), (pattern) => `^${pattern}$`),
|
|
23111
23111
|
includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"),
|
|
23112
23112
|
includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"),
|
|
23113
23113
|
excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"),
|
|
23114
|
-
basePaths: getBasePaths(
|
|
23114
|
+
basePaths: getBasePaths(path5, includes, useCaseSensitiveFileNames2)
|
|
23115
23115
|
};
|
|
23116
23116
|
}
|
|
23117
23117
|
function getRegexFromPattern(pattern, useCaseSensitiveFileNames2) {
|
|
23118
23118
|
return new RegExp(pattern, useCaseSensitiveFileNames2 ? "" : "i");
|
|
23119
23119
|
}
|
|
23120
|
-
function matchFiles(
|
|
23121
|
-
|
|
23120
|
+
function matchFiles(path5, extensions, excludes, includes, useCaseSensitiveFileNames2, currentDirectory, depth, getFileSystemEntries, realpath) {
|
|
23121
|
+
path5 = normalizePath(path5);
|
|
23122
23122
|
currentDirectory = normalizePath(currentDirectory);
|
|
23123
|
-
const patterns = getFileMatcherPatterns(
|
|
23123
|
+
const patterns = getFileMatcherPatterns(path5, excludes, includes, useCaseSensitiveFileNames2, currentDirectory);
|
|
23124
23124
|
const includeFileRegexes = patterns.includeFilePatterns && patterns.includeFilePatterns.map((pattern) => getRegexFromPattern(pattern, useCaseSensitiveFileNames2));
|
|
23125
23125
|
const includeDirectoryRegex = patterns.includeDirectoryPattern && getRegexFromPattern(patterns.includeDirectoryPattern, useCaseSensitiveFileNames2);
|
|
23126
23126
|
const excludeRegex = patterns.excludePattern && getRegexFromPattern(patterns.excludePattern, useCaseSensitiveFileNames2);
|
|
@@ -23165,17 +23165,17 @@ ${lanes.join("\n")}
|
|
|
23165
23165
|
}
|
|
23166
23166
|
}
|
|
23167
23167
|
}
|
|
23168
|
-
function getBasePaths(
|
|
23169
|
-
const basePaths = [
|
|
23168
|
+
function getBasePaths(path5, includes, useCaseSensitiveFileNames2) {
|
|
23169
|
+
const basePaths = [path5];
|
|
23170
23170
|
if (includes) {
|
|
23171
23171
|
const includeBasePaths = [];
|
|
23172
23172
|
for (const include of includes) {
|
|
23173
|
-
const absolute = isRootedDiskPath(include) ? include : normalizePath(combinePaths(
|
|
23173
|
+
const absolute = isRootedDiskPath(include) ? include : normalizePath(combinePaths(path5, include));
|
|
23174
23174
|
includeBasePaths.push(getIncludeBasePath(absolute));
|
|
23175
23175
|
}
|
|
23176
23176
|
includeBasePaths.sort(getStringComparer(!useCaseSensitiveFileNames2));
|
|
23177
23177
|
for (const includeBasePath of includeBasePaths) {
|
|
23178
|
-
if (every(basePaths, (basePath) => !containsPath(basePath, includeBasePath,
|
|
23178
|
+
if (every(basePaths, (basePath) => !containsPath(basePath, includeBasePath, path5, !useCaseSensitiveFileNames2))) {
|
|
23179
23179
|
basePaths.push(includeBasePath);
|
|
23180
23180
|
}
|
|
23181
23181
|
}
|
|
@@ -23439,24 +23439,24 @@ ${lanes.join("\n")}
|
|
|
23439
23439
|
".json"
|
|
23440
23440
|
/* Json */
|
|
23441
23441
|
];
|
|
23442
|
-
function removeFileExtension(
|
|
23442
|
+
function removeFileExtension(path5) {
|
|
23443
23443
|
for (const ext of extensionsToRemove) {
|
|
23444
|
-
const extensionless = tryRemoveExtension(
|
|
23444
|
+
const extensionless = tryRemoveExtension(path5, ext);
|
|
23445
23445
|
if (extensionless !== void 0) {
|
|
23446
23446
|
return extensionless;
|
|
23447
23447
|
}
|
|
23448
23448
|
}
|
|
23449
|
-
return
|
|
23449
|
+
return path5;
|
|
23450
23450
|
}
|
|
23451
|
-
function tryRemoveExtension(
|
|
23452
|
-
return fileExtensionIs(
|
|
23451
|
+
function tryRemoveExtension(path5, extension) {
|
|
23452
|
+
return fileExtensionIs(path5, extension) ? removeExtension(path5, extension) : void 0;
|
|
23453
23453
|
}
|
|
23454
|
-
function removeExtension(
|
|
23455
|
-
return
|
|
23454
|
+
function removeExtension(path5, extension) {
|
|
23455
|
+
return path5.substring(0, path5.length - extension.length);
|
|
23456
23456
|
}
|
|
23457
|
-
function changeExtension(
|
|
23457
|
+
function changeExtension(path5, newExtension) {
|
|
23458
23458
|
return changeAnyExtension(
|
|
23459
|
-
|
|
23459
|
+
path5,
|
|
23460
23460
|
newExtension,
|
|
23461
23461
|
extensionsToRemove,
|
|
23462
23462
|
/*ignoreCase*/
|
|
@@ -23482,8 +23482,8 @@ ${lanes.join("\n")}
|
|
|
23482
23482
|
let matchableStringSet;
|
|
23483
23483
|
let patterns;
|
|
23484
23484
|
const pathList = getOwnKeys(paths);
|
|
23485
|
-
for (const
|
|
23486
|
-
const patternOrStr = tryParsePattern(
|
|
23485
|
+
for (const path5 of pathList) {
|
|
23486
|
+
const patternOrStr = tryParsePattern(path5);
|
|
23487
23487
|
if (patternOrStr === void 0) {
|
|
23488
23488
|
continue;
|
|
23489
23489
|
} else if (typeof patternOrStr === "string") {
|
|
@@ -23510,15 +23510,15 @@ ${lanes.join("\n")}
|
|
|
23510
23510
|
function resolutionExtensionIsTSOrJson(ext) {
|
|
23511
23511
|
return extensionIsTS(ext) || ext === ".json";
|
|
23512
23512
|
}
|
|
23513
|
-
function extensionFromPath(
|
|
23514
|
-
const ext = tryGetExtensionFromPath2(
|
|
23515
|
-
return ext !== void 0 ? ext : Debug.fail(`File ${
|
|
23513
|
+
function extensionFromPath(path5) {
|
|
23514
|
+
const ext = tryGetExtensionFromPath2(path5);
|
|
23515
|
+
return ext !== void 0 ? ext : Debug.fail(`File ${path5} has unknown extension.`);
|
|
23516
23516
|
}
|
|
23517
|
-
function isAnySupportedFileExtension(
|
|
23518
|
-
return tryGetExtensionFromPath2(
|
|
23517
|
+
function isAnySupportedFileExtension(path5) {
|
|
23518
|
+
return tryGetExtensionFromPath2(path5) !== void 0;
|
|
23519
23519
|
}
|
|
23520
|
-
function tryGetExtensionFromPath2(
|
|
23521
|
-
return find(extensionsToRemove, (e) => fileExtensionIs(
|
|
23520
|
+
function tryGetExtensionFromPath2(path5) {
|
|
23521
|
+
return find(extensionsToRemove, (e) => fileExtensionIs(path5, e));
|
|
23522
23522
|
}
|
|
23523
23523
|
function isCheckJsEnabledForFile(sourceFile, compilerOptions) {
|
|
23524
23524
|
return sourceFile.checkJsDirective ? sourceFile.checkJsDirective.enabled : compilerOptions.checkJs;
|
|
@@ -23827,8 +23827,8 @@ ${lanes.join("\n")}
|
|
|
23827
23827
|
return false;
|
|
23828
23828
|
}
|
|
23829
23829
|
}
|
|
23830
|
-
function containsIgnoredPath(
|
|
23831
|
-
return some(ignoredPaths, (p) =>
|
|
23830
|
+
function containsIgnoredPath(path5) {
|
|
23831
|
+
return some(ignoredPaths, (p) => path5.includes(p));
|
|
23832
23832
|
}
|
|
23833
23833
|
function getContainingNodeArray(node) {
|
|
23834
23834
|
if (!node.parent) return void 0;
|
|
@@ -43624,7 +43624,7 @@ ${lanes.join("\n")}
|
|
|
43624
43624
|
const typeReferenceDirectives = context.typeReferenceDirectives;
|
|
43625
43625
|
const libReferenceDirectives = context.libReferenceDirectives;
|
|
43626
43626
|
forEach(toArray(entryOrList), (arg) => {
|
|
43627
|
-
const { types, lib, path:
|
|
43627
|
+
const { types, lib, path: path5, ["resolution-mode"]: res, preserve: _preserve } = arg.arguments;
|
|
43628
43628
|
const preserve = _preserve === "true" ? true : void 0;
|
|
43629
43629
|
if (arg.arguments["no-default-lib"] === "true") {
|
|
43630
43630
|
context.hasNoDefaultLib = true;
|
|
@@ -43633,8 +43633,8 @@ ${lanes.join("\n")}
|
|
|
43633
43633
|
typeReferenceDirectives.push({ pos: types.pos, end: types.end, fileName: types.value, ...parsed ? { resolutionMode: parsed } : {}, ...preserve ? { preserve } : {} });
|
|
43634
43634
|
} else if (lib) {
|
|
43635
43635
|
libReferenceDirectives.push({ pos: lib.pos, end: lib.end, fileName: lib.value, ...preserve ? { preserve } : {} });
|
|
43636
|
-
} else if (
|
|
43637
|
-
referencedFiles.push({ pos:
|
|
43636
|
+
} else if (path5) {
|
|
43637
|
+
referencedFiles.push({ pos: path5.pos, end: path5.end, fileName: path5.value, ...preserve ? { preserve } : {} });
|
|
43638
43638
|
} else {
|
|
43639
43639
|
reportDiagnostic(arg.range.pos, arg.range.end - arg.range.pos, Diagnostics.Invalid_reference_directive_syntax);
|
|
43640
43640
|
}
|
|
@@ -46063,9 +46063,9 @@ ${lanes.join("\n")}
|
|
|
46063
46063
|
if (specs[0] === defaultIncludeSpec) return void 0;
|
|
46064
46064
|
return specs;
|
|
46065
46065
|
}
|
|
46066
|
-
function matchesSpecs(
|
|
46066
|
+
function matchesSpecs(path5, includeSpecs, excludeSpecs, host) {
|
|
46067
46067
|
if (!includeSpecs) return returnTrue;
|
|
46068
|
-
const patterns = getFileMatcherPatterns(
|
|
46068
|
+
const patterns = getFileMatcherPatterns(path5, excludeSpecs, includeSpecs, host.useCaseSensitiveFileNames, host.getCurrentDirectory());
|
|
46069
46069
|
const excludeRe = patterns.excludePattern && getRegexFromPattern(patterns.excludePattern, host.useCaseSensitiveFileNames);
|
|
46070
46070
|
const includeRe = patterns.includeFilePattern && getRegexFromPattern(patterns.includeFilePattern, host.useCaseSensitiveFileNames);
|
|
46071
46071
|
if (includeRe) {
|
|
@@ -46710,9 +46710,9 @@ ${lanes.join("\n")}
|
|
|
46710
46710
|
const setPropertyInResultIfNotUndefined = (propertyName) => {
|
|
46711
46711
|
if (ownConfig.raw[propertyName]) return;
|
|
46712
46712
|
if (extendsRaw[propertyName]) {
|
|
46713
|
-
result[propertyName] = map(extendsRaw[propertyName], (
|
|
46713
|
+
result[propertyName] = map(extendsRaw[propertyName], (path5) => startsWithConfigDirTemplate(path5) || isRootedDiskPath(path5) ? path5 : combinePaths(
|
|
46714
46714
|
relativeDifference || (relativeDifference = convertToRelativePath(getDirectoryPath(extendedConfigPath), basePath, createGetCanonicalFileName(host.useCaseSensitiveFileNames))),
|
|
46715
|
-
|
|
46715
|
+
path5
|
|
46716
46716
|
));
|
|
46717
46717
|
}
|
|
46718
46718
|
};
|
|
@@ -46866,11 +46866,11 @@ ${lanes.join("\n")}
|
|
|
46866
46866
|
return void 0;
|
|
46867
46867
|
}
|
|
46868
46868
|
function getExtendedConfig(sourceFile, extendedConfigPath, host, resolutionStack, errors, extendedConfigCache, result) {
|
|
46869
|
-
const
|
|
46869
|
+
const path5 = host.useCaseSensitiveFileNames ? extendedConfigPath : toFileNameLowerCase(extendedConfigPath);
|
|
46870
46870
|
let value;
|
|
46871
46871
|
let extendedResult;
|
|
46872
46872
|
let extendedConfig;
|
|
46873
|
-
if (extendedConfigCache && (value = extendedConfigCache.get(
|
|
46873
|
+
if (extendedConfigCache && (value = extendedConfigCache.get(path5))) {
|
|
46874
46874
|
({ extendedResult, extendedConfig } = value);
|
|
46875
46875
|
} else {
|
|
46876
46876
|
extendedResult = readJsonConfigFile(extendedConfigPath, (path22) => host.readFile(path22));
|
|
@@ -46888,7 +46888,7 @@ ${lanes.join("\n")}
|
|
|
46888
46888
|
);
|
|
46889
46889
|
}
|
|
46890
46890
|
if (extendedConfigCache) {
|
|
46891
|
-
extendedConfigCache.set(
|
|
46891
|
+
extendedConfigCache.set(path5, { extendedResult, extendedConfig });
|
|
46892
46892
|
}
|
|
46893
46893
|
}
|
|
46894
46894
|
if (sourceFile) {
|
|
@@ -47156,24 +47156,24 @@ ${lanes.join("\n")}
|
|
|
47156
47156
|
}
|
|
47157
47157
|
const match = getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames2);
|
|
47158
47158
|
if (match) {
|
|
47159
|
-
const { key, path:
|
|
47159
|
+
const { key, path: path5, flags } = match;
|
|
47160
47160
|
const existingPath = wildCardKeyToPath.get(key);
|
|
47161
47161
|
const existingFlags = existingPath !== void 0 ? wildcardDirectories[existingPath] : void 0;
|
|
47162
47162
|
if (existingFlags === void 0 || existingFlags < flags) {
|
|
47163
|
-
wildcardDirectories[existingPath !== void 0 ? existingPath :
|
|
47164
|
-
if (existingPath === void 0) wildCardKeyToPath.set(key,
|
|
47163
|
+
wildcardDirectories[existingPath !== void 0 ? existingPath : path5] = flags;
|
|
47164
|
+
if (existingPath === void 0) wildCardKeyToPath.set(key, path5);
|
|
47165
47165
|
if (flags === 1) {
|
|
47166
47166
|
recursiveKeys.push(key);
|
|
47167
47167
|
}
|
|
47168
47168
|
}
|
|
47169
47169
|
}
|
|
47170
47170
|
}
|
|
47171
|
-
for (const
|
|
47172
|
-
if (hasProperty(wildcardDirectories,
|
|
47171
|
+
for (const path5 in wildcardDirectories) {
|
|
47172
|
+
if (hasProperty(wildcardDirectories, path5)) {
|
|
47173
47173
|
for (const recursiveKey of recursiveKeys) {
|
|
47174
|
-
const key = toCanonicalKey(
|
|
47174
|
+
const key = toCanonicalKey(path5, useCaseSensitiveFileNames2);
|
|
47175
47175
|
if (key !== recursiveKey && containsPath(recursiveKey, key, basePath, !useCaseSensitiveFileNames2)) {
|
|
47176
|
-
delete wildcardDirectories[
|
|
47176
|
+
delete wildcardDirectories[path5];
|
|
47177
47177
|
}
|
|
47178
47178
|
}
|
|
47179
47179
|
}
|
|
@@ -47181,8 +47181,8 @@ ${lanes.join("\n")}
|
|
|
47181
47181
|
}
|
|
47182
47182
|
return wildcardDirectories;
|
|
47183
47183
|
}
|
|
47184
|
-
function toCanonicalKey(
|
|
47185
|
-
return useCaseSensitiveFileNames2 ?
|
|
47184
|
+
function toCanonicalKey(path5, useCaseSensitiveFileNames2) {
|
|
47185
|
+
return useCaseSensitiveFileNames2 ? path5 : toFileNameLowerCase(path5);
|
|
47186
47186
|
}
|
|
47187
47187
|
function getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames2) {
|
|
47188
47188
|
const match = wildcardDirectoryPattern.exec(spec);
|
|
@@ -47198,10 +47198,10 @@ ${lanes.join("\n")}
|
|
|
47198
47198
|
};
|
|
47199
47199
|
}
|
|
47200
47200
|
if (isImplicitGlob(spec.substring(spec.lastIndexOf(directorySeparator) + 1))) {
|
|
47201
|
-
const
|
|
47201
|
+
const path5 = removeTrailingDirectorySeparator(spec);
|
|
47202
47202
|
return {
|
|
47203
|
-
key: toCanonicalKey(
|
|
47204
|
-
path:
|
|
47203
|
+
key: toCanonicalKey(path5, useCaseSensitiveFileNames2),
|
|
47204
|
+
path: path5,
|
|
47205
47205
|
flags: 1
|
|
47206
47206
|
/* Recursive */
|
|
47207
47207
|
};
|
|
@@ -47440,11 +47440,11 @@ ${lanes.join("\n")}
|
|
|
47440
47440
|
}
|
|
47441
47441
|
return;
|
|
47442
47442
|
}
|
|
47443
|
-
const
|
|
47443
|
+
const path5 = normalizePath(combinePaths(baseDirectory, fileName));
|
|
47444
47444
|
if (state.traceEnabled) {
|
|
47445
|
-
trace(state.host, Diagnostics.package_json_has_0_field_1_that_references_2, fieldName, fileName,
|
|
47445
|
+
trace(state.host, Diagnostics.package_json_has_0_field_1_that_references_2, fieldName, fileName, path5);
|
|
47446
47446
|
}
|
|
47447
|
-
return
|
|
47447
|
+
return path5;
|
|
47448
47448
|
}
|
|
47449
47449
|
function readPackageJsonTypesFields(jsonContent, baseDirectory, state) {
|
|
47450
47450
|
return readPackageJsonPathField(jsonContent, "typings", baseDirectory, state) || readPackageJsonPathField(jsonContent, "types", baseDirectory, state);
|
|
@@ -47491,7 +47491,7 @@ ${lanes.join("\n")}
|
|
|
47491
47491
|
}
|
|
47492
47492
|
var typeScriptVersion;
|
|
47493
47493
|
function getPackageJsonTypesVersionsPaths(typesVersions) {
|
|
47494
|
-
if (!typeScriptVersion) typeScriptVersion = new Version(
|
|
47494
|
+
if (!typeScriptVersion) typeScriptVersion = new Version(version2);
|
|
47495
47495
|
for (const key in typesVersions) {
|
|
47496
47496
|
if (!hasProperty(typesVersions, key)) continue;
|
|
47497
47497
|
const keyRange = VersionRange.tryParse(key);
|
|
@@ -47958,13 +47958,13 @@ ${lanes.join("\n")}
|
|
|
47958
47958
|
directoryToModuleNameMap.update(options2);
|
|
47959
47959
|
}
|
|
47960
47960
|
function getOrCreateCacheForDirectory(directoryName, redirectedReference) {
|
|
47961
|
-
const
|
|
47962
|
-
return getOrCreateCache(directoryToModuleNameMap, redirectedReference,
|
|
47961
|
+
const path5 = toPath(directoryName, currentDirectory, getCanonicalFileName);
|
|
47962
|
+
return getOrCreateCache(directoryToModuleNameMap, redirectedReference, path5, () => createModeAwareCache());
|
|
47963
47963
|
}
|
|
47964
47964
|
function getFromDirectoryCache(name, mode, directoryName, redirectedReference) {
|
|
47965
47965
|
var _a, _b;
|
|
47966
|
-
const
|
|
47967
|
-
return (_b = (_a = directoryToModuleNameMap.getMapOfCacheRedirects(redirectedReference)) == null ? void 0 : _a.get(
|
|
47966
|
+
const path5 = toPath(directoryName, currentDirectory, getCanonicalFileName);
|
|
47967
|
+
return (_b = (_a = directoryToModuleNameMap.getMapOfCacheRedirects(redirectedReference)) == null ? void 0 : _a.get(path5)) == null ? void 0 : _b.get(name, mode);
|
|
47968
47968
|
}
|
|
47969
47969
|
}
|
|
47970
47970
|
function createModeAwareCacheKey(specifier, mode) {
|
|
@@ -48041,14 +48041,14 @@ ${lanes.join("\n")}
|
|
|
48041
48041
|
return directoryPathMap.get(toPath(directory, currentDirectory, getCanonicalFileName));
|
|
48042
48042
|
}
|
|
48043
48043
|
function set(directory, result) {
|
|
48044
|
-
const
|
|
48045
|
-
if (directoryPathMap.has(
|
|
48044
|
+
const path5 = toPath(directory, currentDirectory, getCanonicalFileName);
|
|
48045
|
+
if (directoryPathMap.has(path5)) {
|
|
48046
48046
|
return;
|
|
48047
48047
|
}
|
|
48048
|
-
directoryPathMap.set(
|
|
48048
|
+
directoryPathMap.set(path5, result);
|
|
48049
48049
|
const resolvedFileName = getResolvedFileName(result);
|
|
48050
|
-
const commonPrefix = resolvedFileName && getCommonPrefix(
|
|
48051
|
-
let current =
|
|
48050
|
+
const commonPrefix = resolvedFileName && getCommonPrefix(path5, resolvedFileName);
|
|
48051
|
+
let current = path5;
|
|
48052
48052
|
while (current !== commonPrefix) {
|
|
48053
48053
|
const parent2 = getDirectoryPath(current);
|
|
48054
48054
|
if (parent2 === current || directoryPathMap.has(parent2)) {
|
|
@@ -48612,16 +48612,16 @@ ${lanes.join("\n")}
|
|
|
48612
48612
|
const combined = combinePaths(containingDirectory, moduleName);
|
|
48613
48613
|
const parts = getPathComponents(combined);
|
|
48614
48614
|
const lastPart = lastOrUndefined(parts);
|
|
48615
|
-
const
|
|
48616
|
-
return { path:
|
|
48615
|
+
const path5 = lastPart === "." || lastPart === ".." ? ensureTrailingDirectorySeparator(normalizePath(combined)) : normalizePath(combined);
|
|
48616
|
+
return { path: path5, parts };
|
|
48617
48617
|
}
|
|
48618
|
-
function realPath(
|
|
48618
|
+
function realPath(path5, host, traceEnabled) {
|
|
48619
48619
|
if (!host.realpath) {
|
|
48620
|
-
return
|
|
48620
|
+
return path5;
|
|
48621
48621
|
}
|
|
48622
|
-
const real = normalizePath(host.realpath(
|
|
48622
|
+
const real = normalizePath(host.realpath(path5));
|
|
48623
48623
|
if (traceEnabled) {
|
|
48624
|
-
trace(host, Diagnostics.Resolving_real_path_for_0_result_1,
|
|
48624
|
+
trace(host, Diagnostics.Resolving_real_path_for_0_result_1, path5, real);
|
|
48625
48625
|
}
|
|
48626
48626
|
return real;
|
|
48627
48627
|
}
|
|
@@ -48666,25 +48666,25 @@ ${lanes.join("\n")}
|
|
|
48666
48666
|
return void 0;
|
|
48667
48667
|
}
|
|
48668
48668
|
var nodeModulesPathPart = "/node_modules/";
|
|
48669
|
-
function pathContainsNodeModules(
|
|
48670
|
-
return
|
|
48669
|
+
function pathContainsNodeModules(path5) {
|
|
48670
|
+
return path5.includes(nodeModulesPathPart);
|
|
48671
48671
|
}
|
|
48672
48672
|
function parseNodeModuleFromPath(resolved, isFolder) {
|
|
48673
|
-
const
|
|
48674
|
-
const idx =
|
|
48673
|
+
const path5 = normalizePath(resolved);
|
|
48674
|
+
const idx = path5.lastIndexOf(nodeModulesPathPart);
|
|
48675
48675
|
if (idx === -1) {
|
|
48676
48676
|
return void 0;
|
|
48677
48677
|
}
|
|
48678
48678
|
const indexAfterNodeModules = idx + nodeModulesPathPart.length;
|
|
48679
|
-
let indexAfterPackageName = moveToNextDirectorySeparatorIfAvailable(
|
|
48680
|
-
if (
|
|
48681
|
-
indexAfterPackageName = moveToNextDirectorySeparatorIfAvailable(
|
|
48679
|
+
let indexAfterPackageName = moveToNextDirectorySeparatorIfAvailable(path5, indexAfterNodeModules, isFolder);
|
|
48680
|
+
if (path5.charCodeAt(indexAfterNodeModules) === 64) {
|
|
48681
|
+
indexAfterPackageName = moveToNextDirectorySeparatorIfAvailable(path5, indexAfterPackageName, isFolder);
|
|
48682
48682
|
}
|
|
48683
|
-
return
|
|
48683
|
+
return path5.slice(0, indexAfterPackageName);
|
|
48684
48684
|
}
|
|
48685
|
-
function moveToNextDirectorySeparatorIfAvailable(
|
|
48686
|
-
const nextSeparatorIndex =
|
|
48687
|
-
return nextSeparatorIndex === -1 ? isFolder ?
|
|
48685
|
+
function moveToNextDirectorySeparatorIfAvailable(path5, prevSeparatorIndex, isFolder) {
|
|
48686
|
+
const nextSeparatorIndex = path5.indexOf(directorySeparator, prevSeparatorIndex + 1);
|
|
48687
|
+
return nextSeparatorIndex === -1 ? isFolder ? path5.length : prevSeparatorIndex : nextSeparatorIndex;
|
|
48688
48688
|
}
|
|
48689
48689
|
function loadModuleFromFileNoPackageId(extensions, candidate, onlyRecordFailures, state) {
|
|
48690
48690
|
return noPackageId(loadModuleFromFile(extensions, candidate, onlyRecordFailures, state));
|
|
@@ -48826,8 +48826,8 @@ ${lanes.join("\n")}
|
|
|
48826
48826
|
return extensions & 4 && !isDeclarationFileName(candidate + originalExtension) && tryExtension(`.d${originalExtension}.ts`) || void 0;
|
|
48827
48827
|
}
|
|
48828
48828
|
function tryExtension(ext, resolvedUsingTsExtension) {
|
|
48829
|
-
const
|
|
48830
|
-
return
|
|
48829
|
+
const path5 = tryFile(candidate + ext, onlyRecordFailures, state);
|
|
48830
|
+
return path5 === void 0 ? void 0 : { path: path5, ext, resolvedUsingTsExtension: !state.candidateIsFromPackageJsonField && resolvedUsingTsExtension };
|
|
48831
48831
|
}
|
|
48832
48832
|
}
|
|
48833
48833
|
function tryFile(fileName, onlyRecordFailures, state) {
|
|
@@ -49039,9 +49039,9 @@ ${lanes.join("\n")}
|
|
|
49039
49039
|
state
|
|
49040
49040
|
);
|
|
49041
49041
|
if (peerPackageJson) {
|
|
49042
|
-
const
|
|
49043
|
-
result += `+${key}@${
|
|
49044
|
-
if (state.traceEnabled) trace(state.host, Diagnostics.Found_peerDependency_0_with_1_version, key,
|
|
49042
|
+
const version22 = peerPackageJson.contents.packageJsonContent.version;
|
|
49043
|
+
result += `+${key}@${version22}`;
|
|
49044
|
+
if (state.traceEnabled) trace(state.host, Diagnostics.Found_peerDependency_0_with_1_version, key, version22);
|
|
49045
49045
|
} else {
|
|
49046
49046
|
if (state.traceEnabled) trace(state.host, Diagnostics.Failed_to_find_peerDependency_0, key);
|
|
49047
49047
|
}
|
|
@@ -49139,7 +49139,7 @@ ${lanes.join("\n")}
|
|
|
49139
49139
|
false
|
|
49140
49140
|
);
|
|
49141
49141
|
if (state.traceEnabled) {
|
|
49142
|
-
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,
|
|
49142
|
+
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);
|
|
49143
49143
|
}
|
|
49144
49144
|
const pathPatterns = tryParsePatterns(versionPaths.paths);
|
|
49145
49145
|
const result = tryLoadModuleUsingPaths(extensions, moduleName, candidate, versionPaths.paths, pathPatterns, loader, onlyRecordFailuresForPackageFile || onlyRecordFailuresForIndex, state);
|
|
@@ -49523,10 +49523,10 @@ ${lanes.join("\n")}
|
|
|
49523
49523
|
/*value*/
|
|
49524
49524
|
void 0
|
|
49525
49525
|
);
|
|
49526
|
-
function toAbsolutePath(
|
|
49526
|
+
function toAbsolutePath(path5) {
|
|
49527
49527
|
var _a2, _b2;
|
|
49528
|
-
if (
|
|
49529
|
-
return getNormalizedAbsolutePath(
|
|
49528
|
+
if (path5 === void 0) return path5;
|
|
49529
|
+
return getNormalizedAbsolutePath(path5, (_b2 = (_a2 = state.host).getCurrentDirectory) == null ? void 0 : _b2.call(_a2));
|
|
49530
49530
|
}
|
|
49531
49531
|
function combineDirectoryPath(root, dir) {
|
|
49532
49532
|
return ensureTrailingDirectorySeparator(combinePaths(root, dir));
|
|
@@ -49621,7 +49621,7 @@ ${lanes.join("\n")}
|
|
|
49621
49621
|
if (!startsWith(key, "types@")) return false;
|
|
49622
49622
|
const range = VersionRange.tryParse(key.substring("types@".length));
|
|
49623
49623
|
if (!range) return false;
|
|
49624
|
-
return range.test(
|
|
49624
|
+
return range.test(version2);
|
|
49625
49625
|
}
|
|
49626
49626
|
function loadModuleFromNearestNodeModulesDirectory(extensions, moduleName, directory, state, cache, redirectedReference) {
|
|
49627
49627
|
return loadModuleFromNearestNodeModulesDirectoryWorker(
|
|
@@ -49757,7 +49757,7 @@ ${lanes.join("\n")}
|
|
|
49757
49757
|
const versionPaths = rest !== "" && packageInfo ? getVersionPathsOfPackageJsonInfo(packageInfo, state) : void 0;
|
|
49758
49758
|
if (versionPaths) {
|
|
49759
49759
|
if (state.traceEnabled) {
|
|
49760
|
-
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,
|
|
49760
|
+
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);
|
|
49761
49761
|
}
|
|
49762
49762
|
const packageDirectoryExists = nodeModulesDirectoryExists && directoryProbablyExists(packageDirectory, state.host);
|
|
49763
49763
|
const pathPatterns = tryParsePatterns(versionPaths.paths);
|
|
@@ -49777,10 +49777,10 @@ ${lanes.join("\n")}
|
|
|
49777
49777
|
trace(state.host, Diagnostics.Module_name_0_matched_pattern_1, moduleName, matchedPatternText);
|
|
49778
49778
|
}
|
|
49779
49779
|
const resolved = forEach(paths[matchedPatternText], (subst) => {
|
|
49780
|
-
const
|
|
49781
|
-
const candidate = normalizePath(combinePaths(baseDirectory,
|
|
49780
|
+
const path5 = matchedStar ? replaceFirstStar(subst, matchedStar) : subst;
|
|
49781
|
+
const candidate = normalizePath(combinePaths(baseDirectory, path5));
|
|
49782
49782
|
if (state.traceEnabled) {
|
|
49783
|
-
trace(state.host, Diagnostics.Trying_substitution_0_candidate_module_location_Colon_1, subst,
|
|
49783
|
+
trace(state.host, Diagnostics.Trying_substitution_0_candidate_module_location_Colon_1, subst, path5);
|
|
49784
49784
|
}
|
|
49785
49785
|
const extension = tryGetExtensionFromPath2(subst);
|
|
49786
49786
|
if (extension !== void 0) {
|
|
@@ -53933,10 +53933,10 @@ ${lanes.join("\n")}
|
|
|
53933
53933
|
if (a === void 0 || b === void 0) return false;
|
|
53934
53934
|
return comparePaths(a, b, ignoreCase) === 0;
|
|
53935
53935
|
}
|
|
53936
|
-
function countPathComponents(
|
|
53936
|
+
function countPathComponents(path5) {
|
|
53937
53937
|
let count = 0;
|
|
53938
|
-
for (let i = startsWith(
|
|
53939
|
-
if (
|
|
53938
|
+
for (let i = startsWith(path5, "./") ? 2 : 0; i < path5.length; i++) {
|
|
53939
|
+
if (path5.charCodeAt(i) === 47) count++;
|
|
53940
53940
|
}
|
|
53941
53941
|
return count;
|
|
53942
53942
|
}
|
|
@@ -54053,9 +54053,9 @@ ${lanes.join("\n")}
|
|
|
54053
54053
|
host,
|
|
54054
54054
|
/*preferSymlinks*/
|
|
54055
54055
|
true,
|
|
54056
|
-
(
|
|
54057
|
-
const isInNodeModules = pathContainsNodeModules(
|
|
54058
|
-
allFileNames.set(
|
|
54056
|
+
(path5, isRedirect) => {
|
|
54057
|
+
const isInNodeModules = pathContainsNodeModules(path5);
|
|
54058
|
+
allFileNames.set(path5, { path: info.getCanonicalFileName(path5), isRedirect, isInNodeModules });
|
|
54059
54059
|
importedFileFromNodeModules = importedFileFromNodeModules || isInNodeModules;
|
|
54060
54060
|
}
|
|
54061
54061
|
);
|
|
@@ -54063,8 +54063,8 @@ ${lanes.join("\n")}
|
|
|
54063
54063
|
for (let directory = info.canonicalSourceDirectory; allFileNames.size !== 0; ) {
|
|
54064
54064
|
const directoryStart = ensureTrailingDirectorySeparator(directory);
|
|
54065
54065
|
let pathsInDirectory;
|
|
54066
|
-
allFileNames.forEach(({ path:
|
|
54067
|
-
if (startsWith(
|
|
54066
|
+
allFileNames.forEach(({ path: path5, isRedirect, isInNodeModules }, fileName) => {
|
|
54067
|
+
if (startsWith(path5, directoryStart)) {
|
|
54068
54068
|
(pathsInDirectory || (pathsInDirectory = [])).push({ path: fileName, isRedirect, isInNodeModules });
|
|
54069
54069
|
allFileNames.delete(fileName);
|
|
54070
54070
|
}
|
|
@@ -54367,17 +54367,17 @@ ${lanes.join("\n")}
|
|
|
54367
54367
|
}
|
|
54368
54368
|
return processEnding(shortest, allowedEndings, compilerOptions);
|
|
54369
54369
|
}
|
|
54370
|
-
function tryGetModuleNameAsNodeModule({ path:
|
|
54370
|
+
function tryGetModuleNameAsNodeModule({ path: path5, isRedirect }, { getCanonicalFileName, canonicalSourceDirectory }, importingSourceFile, host, options, userPreferences, packageNameOnly, overrideMode) {
|
|
54371
54371
|
if (!host.fileExists || !host.readFile) {
|
|
54372
54372
|
return void 0;
|
|
54373
54373
|
}
|
|
54374
|
-
const parts = getNodeModulePathParts(
|
|
54374
|
+
const parts = getNodeModulePathParts(path5);
|
|
54375
54375
|
if (!parts) {
|
|
54376
54376
|
return void 0;
|
|
54377
54377
|
}
|
|
54378
54378
|
const preferences = getModuleSpecifierPreferences(userPreferences, host, options, importingSourceFile);
|
|
54379
54379
|
const allowedEndings = preferences.getAllowedEndingsInPreferredOrder();
|
|
54380
|
-
let moduleSpecifier =
|
|
54380
|
+
let moduleSpecifier = path5;
|
|
54381
54381
|
let isPackageRootPath = false;
|
|
54382
54382
|
if (!packageNameOnly) {
|
|
54383
54383
|
let packageRootIndex = parts.packageRootIndex;
|
|
@@ -54398,7 +54398,7 @@ ${lanes.join("\n")}
|
|
|
54398
54398
|
break;
|
|
54399
54399
|
}
|
|
54400
54400
|
if (!moduleFileName) moduleFileName = moduleFileToTry;
|
|
54401
|
-
packageRootIndex =
|
|
54401
|
+
packageRootIndex = path5.indexOf(directorySeparator, packageRootIndex + 1);
|
|
54402
54402
|
if (packageRootIndex === -1) {
|
|
54403
54403
|
moduleSpecifier = processEnding(moduleFileName, allowedEndings, options, host);
|
|
54404
54404
|
break;
|
|
@@ -54418,9 +54418,9 @@ ${lanes.join("\n")}
|
|
|
54418
54418
|
return getEmitModuleResolutionKind(options) === 1 && packageName === nodeModulesDirectoryName ? void 0 : packageName;
|
|
54419
54419
|
function tryDirectoryWithPackageJson(packageRootIndex) {
|
|
54420
54420
|
var _a, _b;
|
|
54421
|
-
const packageRootPath =
|
|
54421
|
+
const packageRootPath = path5.substring(0, packageRootIndex);
|
|
54422
54422
|
const packageJsonPath = combinePaths(packageRootPath, "package.json");
|
|
54423
|
-
let moduleFileToTry =
|
|
54423
|
+
let moduleFileToTry = path5;
|
|
54424
54424
|
let maybeBlockedByTypesVersions = false;
|
|
54425
54425
|
const cachedPackageJson = (_b = (_a = host.getPackageJsonInfoCache) == null ? void 0 : _a.call(host)) == null ? void 0 : _b.getPackageJsonInfo(packageJsonPath);
|
|
54426
54426
|
if (isPackageJsonInfo(cachedPackageJson) || cachedPackageJson === void 0 && host.fileExists(packageJsonPath)) {
|
|
@@ -54433,7 +54433,7 @@ ${lanes.join("\n")}
|
|
|
54433
54433
|
const fromExports = (packageJsonContent == null ? void 0 : packageJsonContent.exports) ? tryGetModuleNameFromExports(
|
|
54434
54434
|
options,
|
|
54435
54435
|
host,
|
|
54436
|
-
|
|
54436
|
+
path5,
|
|
54437
54437
|
packageRootPath,
|
|
54438
54438
|
packageName2,
|
|
54439
54439
|
packageJsonContent.exports,
|
|
@@ -54443,12 +54443,12 @@ ${lanes.join("\n")}
|
|
|
54443
54443
|
return { ...fromExports, verbatimFromExports: true };
|
|
54444
54444
|
}
|
|
54445
54445
|
if (packageJsonContent == null ? void 0 : packageJsonContent.exports) {
|
|
54446
|
-
return { moduleFileToTry:
|
|
54446
|
+
return { moduleFileToTry: path5, blockedByExports: true };
|
|
54447
54447
|
}
|
|
54448
54448
|
}
|
|
54449
54449
|
const versionPaths = (packageJsonContent == null ? void 0 : packageJsonContent.typesVersions) ? getPackageJsonTypesVersionsPaths(packageJsonContent.typesVersions) : void 0;
|
|
54450
54450
|
if (versionPaths) {
|
|
54451
|
-
const subModuleName =
|
|
54451
|
+
const subModuleName = path5.slice(packageRootPath.length + 1);
|
|
54452
54452
|
const fromPaths = tryGetModuleNameFromPaths(
|
|
54453
54453
|
subModuleName,
|
|
54454
54454
|
versionPaths.paths,
|
|
@@ -54483,7 +54483,7 @@ ${lanes.join("\n")}
|
|
|
54483
54483
|
return { moduleFileToTry };
|
|
54484
54484
|
}
|
|
54485
54485
|
}
|
|
54486
|
-
function tryGetAnyFileFromPath(host,
|
|
54486
|
+
function tryGetAnyFileFromPath(host, path5) {
|
|
54487
54487
|
if (!host.fileExists) return;
|
|
54488
54488
|
const extensions = flatten(getSupportedExtensions({ allowJs: true }, [{ extension: "node", isMixedContent: false }, {
|
|
54489
54489
|
extension: "json",
|
|
@@ -54492,15 +54492,15 @@ ${lanes.join("\n")}
|
|
|
54492
54492
|
/* JSON */
|
|
54493
54493
|
}]));
|
|
54494
54494
|
for (const e of extensions) {
|
|
54495
|
-
const fullPath =
|
|
54495
|
+
const fullPath = path5 + e;
|
|
54496
54496
|
if (host.fileExists(fullPath)) {
|
|
54497
54497
|
return fullPath;
|
|
54498
54498
|
}
|
|
54499
54499
|
}
|
|
54500
54500
|
}
|
|
54501
|
-
function getPathsRelativeToRootDirs(
|
|
54501
|
+
function getPathsRelativeToRootDirs(path5, rootDirs, getCanonicalFileName) {
|
|
54502
54502
|
return mapDefined(rootDirs, (rootDir) => {
|
|
54503
|
-
const relativePath = getRelativePathIfInSameVolume(
|
|
54503
|
+
const relativePath = getRelativePathIfInSameVolume(path5, rootDir, getCanonicalFileName);
|
|
54504
54504
|
return relativePath !== void 0 && isPathRelativeToParent(relativePath) ? void 0 : relativePath;
|
|
54505
54505
|
});
|
|
54506
54506
|
}
|
|
@@ -54617,10 +54617,10 @@ ${lanes.join("\n")}
|
|
|
54617
54617
|
return void 0;
|
|
54618
54618
|
}
|
|
54619
54619
|
}
|
|
54620
|
-
function getRelativePathIfInSameVolume(
|
|
54620
|
+
function getRelativePathIfInSameVolume(path5, directoryPath, getCanonicalFileName) {
|
|
54621
54621
|
const relativePath = getRelativePathToDirectoryOrUrl(
|
|
54622
54622
|
directoryPath,
|
|
54623
|
-
|
|
54623
|
+
path5,
|
|
54624
54624
|
directoryPath,
|
|
54625
54625
|
getCanonicalFileName,
|
|
54626
54626
|
/*isAbsolutePathAnUrl*/
|
|
@@ -54628,8 +54628,8 @@ ${lanes.join("\n")}
|
|
|
54628
54628
|
);
|
|
54629
54629
|
return isRootedDiskPath(relativePath) ? void 0 : relativePath;
|
|
54630
54630
|
}
|
|
54631
|
-
function isPathRelativeToParent(
|
|
54632
|
-
return startsWith(
|
|
54631
|
+
function isPathRelativeToParent(path5) {
|
|
54632
|
+
return startsWith(path5, "..");
|
|
54633
54633
|
}
|
|
54634
54634
|
function getDefaultResolutionModeForFile(file, host, compilerOptions) {
|
|
54635
54635
|
return isFullSourceFile(file) ? host.getDefaultResolutionModeForFile(file) : getDefaultResolutionModeForFileWorker(file, compilerOptions);
|
|
@@ -69663,10 +69663,10 @@ ${lanes.join("\n")}
|
|
|
69663
69663
|
const text = identifier.escapedText;
|
|
69664
69664
|
if (text) {
|
|
69665
69665
|
const parentSymbol = name.kind === 167 ? getUnresolvedSymbolForEntityName(name.left) : name.kind === 212 ? getUnresolvedSymbolForEntityName(name.expression) : void 0;
|
|
69666
|
-
const
|
|
69667
|
-
let result = unresolvedSymbols.get(
|
|
69666
|
+
const path5 = parentSymbol ? `${getSymbolPath(parentSymbol)}.${text}` : text;
|
|
69667
|
+
let result = unresolvedSymbols.get(path5);
|
|
69668
69668
|
if (!result) {
|
|
69669
|
-
unresolvedSymbols.set(
|
|
69669
|
+
unresolvedSymbols.set(path5, result = createSymbol(
|
|
69670
69670
|
524288,
|
|
69671
69671
|
text,
|
|
69672
69672
|
1048576
|
|
@@ -74467,24 +74467,24 @@ ${lanes.join("\n")}
|
|
|
74467
74467
|
}
|
|
74468
74468
|
return;
|
|
74469
74469
|
}
|
|
74470
|
-
let
|
|
74470
|
+
let path5 = "";
|
|
74471
74471
|
const secondaryRootErrors = [];
|
|
74472
74472
|
while (stack.length) {
|
|
74473
74473
|
const [msg, ...args] = stack.pop();
|
|
74474
74474
|
switch (msg.code) {
|
|
74475
74475
|
case Diagnostics.Types_of_property_0_are_incompatible.code: {
|
|
74476
|
-
if (
|
|
74477
|
-
|
|
74476
|
+
if (path5.indexOf("new ") === 0) {
|
|
74477
|
+
path5 = `(${path5})`;
|
|
74478
74478
|
}
|
|
74479
74479
|
const str = "" + args[0];
|
|
74480
|
-
if (
|
|
74481
|
-
|
|
74480
|
+
if (path5.length === 0) {
|
|
74481
|
+
path5 = `${str}`;
|
|
74482
74482
|
} else if (isIdentifierText(str, getEmitScriptTarget(compilerOptions))) {
|
|
74483
|
-
|
|
74483
|
+
path5 = `${path5}.${str}`;
|
|
74484
74484
|
} else if (str[0] === "[" && str[str.length - 1] === "]") {
|
|
74485
|
-
|
|
74485
|
+
path5 = `${path5}${str}`;
|
|
74486
74486
|
} else {
|
|
74487
|
-
|
|
74487
|
+
path5 = `${path5}[${str}]`;
|
|
74488
74488
|
}
|
|
74489
74489
|
break;
|
|
74490
74490
|
}
|
|
@@ -74492,7 +74492,7 @@ ${lanes.join("\n")}
|
|
|
74492
74492
|
case Diagnostics.Construct_signature_return_types_0_and_1_are_incompatible.code:
|
|
74493
74493
|
case Diagnostics.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code:
|
|
74494
74494
|
case Diagnostics.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code: {
|
|
74495
|
-
if (
|
|
74495
|
+
if (path5.length === 0) {
|
|
74496
74496
|
let mappedMsg = msg;
|
|
74497
74497
|
if (msg.code === Diagnostics.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code) {
|
|
74498
74498
|
mappedMsg = Diagnostics.Call_signature_return_types_0_and_1_are_incompatible;
|
|
@@ -74503,7 +74503,7 @@ ${lanes.join("\n")}
|
|
|
74503
74503
|
} else {
|
|
74504
74504
|
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 " : "";
|
|
74505
74505
|
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 ? "" : "...";
|
|
74506
|
-
|
|
74506
|
+
path5 = `${prefix}${path5}(${params})`;
|
|
74507
74507
|
}
|
|
74508
74508
|
break;
|
|
74509
74509
|
}
|
|
@@ -74519,10 +74519,10 @@ ${lanes.join("\n")}
|
|
|
74519
74519
|
return Debug.fail(`Unhandled Diagnostic: ${msg.code}`);
|
|
74520
74520
|
}
|
|
74521
74521
|
}
|
|
74522
|
-
if (
|
|
74522
|
+
if (path5) {
|
|
74523
74523
|
reportError(
|
|
74524
|
-
|
|
74525
|
-
|
|
74524
|
+
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,
|
|
74525
|
+
path5
|
|
74526
74526
|
);
|
|
74527
74527
|
} else {
|
|
74528
74528
|
secondaryRootErrors.shift();
|
|
@@ -123806,7 +123806,7 @@ ${lanes.join("\n")}
|
|
|
123806
123806
|
}
|
|
123807
123807
|
}
|
|
123808
123808
|
function createImportCallExpressionAMD(arg, containsLexicalThis) {
|
|
123809
|
-
const
|
|
123809
|
+
const resolve4 = factory2.createUniqueName("resolve");
|
|
123810
123810
|
const reject = factory2.createUniqueName("reject");
|
|
123811
123811
|
const parameters = [
|
|
123812
123812
|
factory2.createParameterDeclaration(
|
|
@@ -123815,7 +123815,7 @@ ${lanes.join("\n")}
|
|
|
123815
123815
|
/*dotDotDotToken*/
|
|
123816
123816
|
void 0,
|
|
123817
123817
|
/*name*/
|
|
123818
|
-
|
|
123818
|
+
resolve4
|
|
123819
123819
|
),
|
|
123820
123820
|
factory2.createParameterDeclaration(
|
|
123821
123821
|
/*modifiers*/
|
|
@@ -123832,7 +123832,7 @@ ${lanes.join("\n")}
|
|
|
123832
123832
|
factory2.createIdentifier("require"),
|
|
123833
123833
|
/*typeArguments*/
|
|
123834
123834
|
void 0,
|
|
123835
|
-
[factory2.createArrayLiteralExpression([arg || factory2.createOmittedExpression()]),
|
|
123835
|
+
[factory2.createArrayLiteralExpression([arg || factory2.createOmittedExpression()]), resolve4, reject]
|
|
123836
123836
|
)
|
|
123837
123837
|
)
|
|
123838
123838
|
]);
|
|
@@ -129590,9 +129590,9 @@ ${lanes.join("\n")}
|
|
|
129590
129590
|
function createAddOutput() {
|
|
129591
129591
|
let outputs;
|
|
129592
129592
|
return { addOutput, getOutputs };
|
|
129593
|
-
function addOutput(
|
|
129594
|
-
if (
|
|
129595
|
-
(outputs || (outputs = [])).push(
|
|
129593
|
+
function addOutput(path5) {
|
|
129594
|
+
if (path5) {
|
|
129595
|
+
(outputs || (outputs = [])).push(path5);
|
|
129596
129596
|
}
|
|
129597
129597
|
}
|
|
129598
129598
|
function getOutputs() {
|
|
@@ -129751,7 +129751,7 @@ ${lanes.join("\n")}
|
|
|
129751
129751
|
emitSkipped = true;
|
|
129752
129752
|
return;
|
|
129753
129753
|
}
|
|
129754
|
-
const buildInfo = host.getBuildInfo() || { version };
|
|
129754
|
+
const buildInfo = host.getBuildInfo() || { version: version2 };
|
|
129755
129755
|
writeFile(
|
|
129756
129756
|
host,
|
|
129757
129757
|
emitterDiagnostics,
|
|
@@ -134818,7 +134818,7 @@ ${lanes.join("\n")}
|
|
|
134818
134818
|
return {
|
|
134819
134819
|
useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
|
|
134820
134820
|
fileExists,
|
|
134821
|
-
readFile: (
|
|
134821
|
+
readFile: (path5, encoding) => host.readFile(path5, encoding),
|
|
134822
134822
|
directoryExists: host.directoryExists && directoryExists,
|
|
134823
134823
|
getDirectories,
|
|
134824
134824
|
readDirectory,
|
|
@@ -134835,8 +134835,8 @@ ${lanes.join("\n")}
|
|
|
134835
134835
|
function getCachedFileSystemEntries(rootDirPath) {
|
|
134836
134836
|
return cachedReadDirectoryResult.get(ensureTrailingDirectorySeparator(rootDirPath));
|
|
134837
134837
|
}
|
|
134838
|
-
function getCachedFileSystemEntriesForBaseDir(
|
|
134839
|
-
const entries = getCachedFileSystemEntries(getDirectoryPath(
|
|
134838
|
+
function getCachedFileSystemEntriesForBaseDir(path5) {
|
|
134839
|
+
const entries = getCachedFileSystemEntries(getDirectoryPath(path5));
|
|
134840
134840
|
if (!entries) {
|
|
134841
134841
|
return entries;
|
|
134842
134842
|
}
|
|
@@ -134891,8 +134891,8 @@ ${lanes.join("\n")}
|
|
|
134891
134891
|
return index >= 0;
|
|
134892
134892
|
}
|
|
134893
134893
|
function writeFile2(fileName, data, writeByteOrderMark) {
|
|
134894
|
-
const
|
|
134895
|
-
const result = getCachedFileSystemEntriesForBaseDir(
|
|
134894
|
+
const path5 = toPath3(fileName);
|
|
134895
|
+
const result = getCachedFileSystemEntriesForBaseDir(path5);
|
|
134896
134896
|
if (result) {
|
|
134897
134897
|
updateFilesOfFileSystemEntry(
|
|
134898
134898
|
result,
|
|
@@ -134904,17 +134904,17 @@ ${lanes.join("\n")}
|
|
|
134904
134904
|
return host.writeFile(fileName, data, writeByteOrderMark);
|
|
134905
134905
|
}
|
|
134906
134906
|
function fileExists(fileName) {
|
|
134907
|
-
const
|
|
134908
|
-
const result = getCachedFileSystemEntriesForBaseDir(
|
|
134907
|
+
const path5 = toPath3(fileName);
|
|
134908
|
+
const result = getCachedFileSystemEntriesForBaseDir(path5);
|
|
134909
134909
|
return result && hasEntry(result.sortedAndCanonicalizedFiles, getCanonicalFileName(getBaseNameOfFileName(fileName))) || host.fileExists(fileName);
|
|
134910
134910
|
}
|
|
134911
134911
|
function directoryExists(dirPath) {
|
|
134912
|
-
const
|
|
134913
|
-
return cachedReadDirectoryResult.has(ensureTrailingDirectorySeparator(
|
|
134912
|
+
const path5 = toPath3(dirPath);
|
|
134913
|
+
return cachedReadDirectoryResult.has(ensureTrailingDirectorySeparator(path5)) || host.directoryExists(dirPath);
|
|
134914
134914
|
}
|
|
134915
134915
|
function createDirectory(dirPath) {
|
|
134916
|
-
const
|
|
134917
|
-
const result = getCachedFileSystemEntriesForBaseDir(
|
|
134916
|
+
const path5 = toPath3(dirPath);
|
|
134917
|
+
const result = getCachedFileSystemEntriesForBaseDir(path5);
|
|
134918
134918
|
if (result) {
|
|
134919
134919
|
const baseName = getBaseNameOfFileName(dirPath);
|
|
134920
134920
|
const canonicalizedBaseName = getCanonicalFileName(baseName);
|
|
@@ -134942,15 +134942,15 @@ ${lanes.join("\n")}
|
|
|
134942
134942
|
}
|
|
134943
134943
|
return host.readDirectory(rootDir, extensions, excludes, includes, depth);
|
|
134944
134944
|
function getFileSystemEntries(dir) {
|
|
134945
|
-
const
|
|
134946
|
-
if (
|
|
134947
|
-
return rootResult || getFileSystemEntriesFromHost(dir,
|
|
134945
|
+
const path5 = toPath3(dir);
|
|
134946
|
+
if (path5 === rootDirPath) {
|
|
134947
|
+
return rootResult || getFileSystemEntriesFromHost(dir, path5);
|
|
134948
134948
|
}
|
|
134949
|
-
const result = tryReadDirectory2(dir,
|
|
134950
|
-
return result !== void 0 ? result || getFileSystemEntriesFromHost(dir,
|
|
134949
|
+
const result = tryReadDirectory2(dir, path5);
|
|
134950
|
+
return result !== void 0 ? result || getFileSystemEntriesFromHost(dir, path5) : emptyFileSystemEntries;
|
|
134951
134951
|
}
|
|
134952
|
-
function getFileSystemEntriesFromHost(dir,
|
|
134953
|
-
if (rootSymLinkResult &&
|
|
134952
|
+
function getFileSystemEntriesFromHost(dir, path5) {
|
|
134953
|
+
if (rootSymLinkResult && path5 === rootDirPath) return rootSymLinkResult;
|
|
134954
134954
|
const result = {
|
|
134955
134955
|
files: map(host.readDirectory(
|
|
134956
134956
|
dir,
|
|
@@ -134963,7 +134963,7 @@ ${lanes.join("\n")}
|
|
|
134963
134963
|
), getBaseNameOfFileName) || emptyArray,
|
|
134964
134964
|
directories: host.getDirectories(dir) || emptyArray
|
|
134965
134965
|
};
|
|
134966
|
-
if (
|
|
134966
|
+
if (path5 === rootDirPath) rootSymLinkResult = result;
|
|
134967
134967
|
return result;
|
|
134968
134968
|
}
|
|
134969
134969
|
}
|
|
@@ -135422,15 +135422,15 @@ ${lanes.join("\n")}
|
|
|
135422
135422
|
return getDirectoryPath(normalizePath(system.getExecutingFilePath()));
|
|
135423
135423
|
}
|
|
135424
135424
|
const newLine = getNewLineCharacter(options);
|
|
135425
|
-
const realpath = system.realpath && ((
|
|
135425
|
+
const realpath = system.realpath && ((path5) => system.realpath(path5));
|
|
135426
135426
|
const compilerHost = {
|
|
135427
135427
|
getSourceFile: createGetSourceFile((fileName) => compilerHost.readFile(fileName), setParentNodes),
|
|
135428
135428
|
getDefaultLibLocation,
|
|
135429
135429
|
getDefaultLibFileName: (options2) => combinePaths(getDefaultLibLocation(), getDefaultLibFileName(options2)),
|
|
135430
135430
|
writeFile: createWriteFileMeasuringIO(
|
|
135431
|
-
(
|
|
135432
|
-
(
|
|
135433
|
-
(
|
|
135431
|
+
(path5, data, writeByteOrderMark) => system.writeFile(path5, data, writeByteOrderMark),
|
|
135432
|
+
(path5) => (compilerHost.createDirectory || system.createDirectory)(path5),
|
|
135433
|
+
(path5) => directoryExists(path5)
|
|
135434
135434
|
),
|
|
135435
135435
|
getCurrentDirectory: memoize(() => system.getCurrentDirectory()),
|
|
135436
135436
|
useCaseSensitiveFileNames: () => system.useCaseSensitiveFileNames,
|
|
@@ -135441,9 +135441,9 @@ ${lanes.join("\n")}
|
|
|
135441
135441
|
trace: (s) => system.write(s + newLine),
|
|
135442
135442
|
directoryExists: (directoryName) => system.directoryExists(directoryName),
|
|
135443
135443
|
getEnvironmentVariable: (name) => system.getEnvironmentVariable ? system.getEnvironmentVariable(name) : "",
|
|
135444
|
-
getDirectories: (
|
|
135444
|
+
getDirectories: (path5) => system.getDirectories(path5),
|
|
135445
135445
|
realpath,
|
|
135446
|
-
readDirectory: (
|
|
135446
|
+
readDirectory: (path5, extensions, include, exclude, depth) => system.readDirectory(path5, extensions, include, exclude, depth),
|
|
135447
135447
|
createDirectory: (d) => system.createDirectory(d),
|
|
135448
135448
|
createHash: maybeBind(system, system.createHash)
|
|
135449
135449
|
};
|
|
@@ -135882,13 +135882,13 @@ ${lanes.join("\n")}
|
|
|
135882
135882
|
}
|
|
135883
135883
|
function getLibraryNameFromLibFileName(libFileName) {
|
|
135884
135884
|
const components = libFileName.split(".");
|
|
135885
|
-
let
|
|
135885
|
+
let path5 = components[1];
|
|
135886
135886
|
let i = 2;
|
|
135887
135887
|
while (components[i] && components[i] !== "d") {
|
|
135888
|
-
|
|
135888
|
+
path5 += (i === 2 ? "/" : "-") + components[i];
|
|
135889
135889
|
i++;
|
|
135890
135890
|
}
|
|
135891
|
-
return "@typescript/lib-" +
|
|
135891
|
+
return "@typescript/lib-" + path5;
|
|
135892
135892
|
}
|
|
135893
135893
|
function isReferencedFile(reason) {
|
|
135894
135894
|
switch (reason == null ? void 0 : reason.kind) {
|
|
@@ -136964,18 +136964,18 @@ ${lanes.join("\n")}
|
|
|
136964
136964
|
filesByName.set(newSourceFile.path, newSourceFile);
|
|
136965
136965
|
}
|
|
136966
136966
|
const oldFilesByNameMap = oldProgram.getFilesByNameMap();
|
|
136967
|
-
oldFilesByNameMap.forEach((oldFile,
|
|
136967
|
+
oldFilesByNameMap.forEach((oldFile, path5) => {
|
|
136968
136968
|
if (!oldFile) {
|
|
136969
|
-
filesByName.set(
|
|
136969
|
+
filesByName.set(path5, oldFile);
|
|
136970
136970
|
return;
|
|
136971
136971
|
}
|
|
136972
|
-
if (oldFile.path ===
|
|
136972
|
+
if (oldFile.path === path5) {
|
|
136973
136973
|
if (oldProgram.isSourceFileFromExternalLibrary(oldFile)) {
|
|
136974
136974
|
sourceFilesFoundSearchingNodeModules.set(oldFile.path, true);
|
|
136975
136975
|
}
|
|
136976
136976
|
return;
|
|
136977
136977
|
}
|
|
136978
|
-
filesByName.set(
|
|
136978
|
+
filesByName.set(path5, filesByName.get(oldFile.path));
|
|
136979
136979
|
});
|
|
136980
136980
|
const isConfigIdentical = oldOptions.configFile && oldOptions.configFile === options.configFile || !oldOptions.configFile && !options.configFile && !optionsHaveChanges(oldOptions, options, optionDeclarations);
|
|
136981
136981
|
programDiagnostics.reuseStateFromOldProgram(oldProgram.getProgramDiagnosticsContainer(), isConfigIdentical);
|
|
@@ -137013,9 +137013,9 @@ ${lanes.join("\n")}
|
|
|
137013
137013
|
getModeForResolutionAtIndex: getModeForResolutionAtIndex2,
|
|
137014
137014
|
readFile: (f) => host.readFile(f),
|
|
137015
137015
|
fileExists: (f) => {
|
|
137016
|
-
const
|
|
137017
|
-
if (getSourceFileByPath(
|
|
137018
|
-
if (missingFileNames.has(
|
|
137016
|
+
const path5 = toPath3(f);
|
|
137017
|
+
if (getSourceFileByPath(path5)) return true;
|
|
137018
|
+
if (missingFileNames.has(path5)) return false;
|
|
137019
137019
|
return host.fileExists(f);
|
|
137020
137020
|
},
|
|
137021
137021
|
realpath: maybeBind(host, host.realpath),
|
|
@@ -137155,8 +137155,8 @@ ${lanes.join("\n")}
|
|
|
137155
137155
|
function getSourceFile(fileName) {
|
|
137156
137156
|
return getSourceFileByPath(toPath3(fileName));
|
|
137157
137157
|
}
|
|
137158
|
-
function getSourceFileByPath(
|
|
137159
|
-
return filesByName.get(
|
|
137158
|
+
function getSourceFileByPath(path5) {
|
|
137159
|
+
return filesByName.get(path5) || void 0;
|
|
137160
137160
|
}
|
|
137161
137161
|
function getDiagnosticsHelper(sourceFile, getDiagnostics2, cancellationToken) {
|
|
137162
137162
|
if (sourceFile) {
|
|
@@ -137799,16 +137799,16 @@ ${lanes.join("\n")}
|
|
|
137799
137799
|
addFilePreprocessingFileExplainingDiagnostic(existingFile, reason, Diagnostics.File_name_0_differs_from_already_included_file_name_1_only_in_casing, [fileName, existingFile.fileName]);
|
|
137800
137800
|
}
|
|
137801
137801
|
}
|
|
137802
|
-
function createRedirectedSourceFile(redirectTarget, unredirected, fileName,
|
|
137802
|
+
function createRedirectedSourceFile(redirectTarget, unredirected, fileName, path5, resolvedPath, originalFileName, sourceFileOptions) {
|
|
137803
137803
|
var _a2;
|
|
137804
137804
|
const redirect = parseNodeFactory.createRedirectedSourceFile({ redirectTarget, unredirected });
|
|
137805
137805
|
redirect.fileName = fileName;
|
|
137806
|
-
redirect.path =
|
|
137806
|
+
redirect.path = path5;
|
|
137807
137807
|
redirect.resolvedPath = resolvedPath;
|
|
137808
137808
|
redirect.originalFileName = originalFileName;
|
|
137809
137809
|
redirect.packageJsonLocations = ((_a2 = sourceFileOptions.packageJsonLocations) == null ? void 0 : _a2.length) ? sourceFileOptions.packageJsonLocations : void 0;
|
|
137810
137810
|
redirect.packageJsonScope = sourceFileOptions.packageJsonScope;
|
|
137811
|
-
sourceFilesFoundSearchingNodeModules.set(
|
|
137811
|
+
sourceFilesFoundSearchingNodeModules.set(path5, currentNodeModulesDepth > 0);
|
|
137812
137812
|
return redirect;
|
|
137813
137813
|
}
|
|
137814
137814
|
function findSourceFile(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId) {
|
|
@@ -137830,18 +137830,18 @@ ${lanes.join("\n")}
|
|
|
137830
137830
|
}
|
|
137831
137831
|
function findSourceFileWorker(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId) {
|
|
137832
137832
|
var _a2, _b2;
|
|
137833
|
-
const
|
|
137833
|
+
const path5 = toPath3(fileName);
|
|
137834
137834
|
if (useSourceOfProjectReferenceRedirect) {
|
|
137835
|
-
let source = getRedirectFromOutput(
|
|
137835
|
+
let source = getRedirectFromOutput(path5);
|
|
137836
137836
|
if (!source && host.realpath && options.preserveSymlinks && isDeclarationFileName(fileName) && fileName.includes(nodeModulesPathPart)) {
|
|
137837
137837
|
const realPath2 = toPath3(host.realpath(fileName));
|
|
137838
|
-
if (realPath2 !==
|
|
137838
|
+
if (realPath2 !== path5) source = getRedirectFromOutput(realPath2);
|
|
137839
137839
|
}
|
|
137840
137840
|
if (source == null ? void 0 : source.source) {
|
|
137841
137841
|
const file2 = findSourceFile(source.source, isDefaultLib, ignoreNoDefaultLib, reason, packageId);
|
|
137842
137842
|
if (file2) addFileToFilesByName(
|
|
137843
137843
|
file2,
|
|
137844
|
-
|
|
137844
|
+
path5,
|
|
137845
137845
|
fileName,
|
|
137846
137846
|
/*redirectedPath*/
|
|
137847
137847
|
void 0
|
|
@@ -137850,8 +137850,8 @@ ${lanes.join("\n")}
|
|
|
137850
137850
|
}
|
|
137851
137851
|
}
|
|
137852
137852
|
const originalFileName = fileName;
|
|
137853
|
-
if (filesByName.has(
|
|
137854
|
-
const file2 = filesByName.get(
|
|
137853
|
+
if (filesByName.has(path5)) {
|
|
137854
|
+
const file2 = filesByName.get(path5);
|
|
137855
137855
|
const addedReason = addFileIncludeReason(
|
|
137856
137856
|
file2 || void 0,
|
|
137857
137857
|
reason,
|
|
@@ -137917,28 +137917,28 @@ ${lanes.join("\n")}
|
|
|
137917
137917
|
const packageIdKey = packageIdToString(packageId);
|
|
137918
137918
|
const fileFromPackageId = packageIdToSourceFile.get(packageIdKey);
|
|
137919
137919
|
if (fileFromPackageId) {
|
|
137920
|
-
const dupFile = createRedirectedSourceFile(fileFromPackageId, file, fileName,
|
|
137920
|
+
const dupFile = createRedirectedSourceFile(fileFromPackageId, file, fileName, path5, toPath3(fileName), originalFileName, sourceFileOptions);
|
|
137921
137921
|
redirectTargetsMap.add(fileFromPackageId.path, fileName);
|
|
137922
|
-
addFileToFilesByName(dupFile,
|
|
137922
|
+
addFileToFilesByName(dupFile, path5, fileName, redirectedPath);
|
|
137923
137923
|
addFileIncludeReason(
|
|
137924
137924
|
dupFile,
|
|
137925
137925
|
reason,
|
|
137926
137926
|
/*checkExisting*/
|
|
137927
137927
|
false
|
|
137928
137928
|
);
|
|
137929
|
-
sourceFileToPackageName.set(
|
|
137929
|
+
sourceFileToPackageName.set(path5, packageIdToPackageName(packageId));
|
|
137930
137930
|
processingOtherFiles.push(dupFile);
|
|
137931
137931
|
return dupFile;
|
|
137932
137932
|
} else if (file) {
|
|
137933
137933
|
packageIdToSourceFile.set(packageIdKey, file);
|
|
137934
|
-
sourceFileToPackageName.set(
|
|
137934
|
+
sourceFileToPackageName.set(path5, packageIdToPackageName(packageId));
|
|
137935
137935
|
}
|
|
137936
137936
|
}
|
|
137937
|
-
addFileToFilesByName(file,
|
|
137937
|
+
addFileToFilesByName(file, path5, fileName, redirectedPath);
|
|
137938
137938
|
if (file) {
|
|
137939
|
-
sourceFilesFoundSearchingNodeModules.set(
|
|
137939
|
+
sourceFilesFoundSearchingNodeModules.set(path5, currentNodeModulesDepth > 0);
|
|
137940
137940
|
file.fileName = fileName;
|
|
137941
|
-
file.path =
|
|
137941
|
+
file.path = path5;
|
|
137942
137942
|
file.resolvedPath = toPath3(fileName);
|
|
137943
137943
|
file.originalFileName = originalFileName;
|
|
137944
137944
|
file.packageJsonLocations = ((_b2 = sourceFileOptions.packageJsonLocations) == null ? void 0 : _b2.length) ? sourceFileOptions.packageJsonLocations : void 0;
|
|
@@ -137950,7 +137950,7 @@ ${lanes.join("\n")}
|
|
|
137950
137950
|
false
|
|
137951
137951
|
);
|
|
137952
137952
|
if (host.useCaseSensitiveFileNames()) {
|
|
137953
|
-
const pathLowerCase = toFileNameLowerCase(
|
|
137953
|
+
const pathLowerCase = toFileNameLowerCase(path5);
|
|
137954
137954
|
const existingFile = filesByNameIgnoreCase.get(pathLowerCase);
|
|
137955
137955
|
if (existingFile) {
|
|
137956
137956
|
reportFileNamesDifferOnlyInCasingError(fileName, existingFile, reason);
|
|
@@ -137983,18 +137983,18 @@ ${lanes.join("\n")}
|
|
|
137983
137983
|
}
|
|
137984
137984
|
return false;
|
|
137985
137985
|
}
|
|
137986
|
-
function addFileToFilesByName(file,
|
|
137986
|
+
function addFileToFilesByName(file, path5, fileName, redirectedPath) {
|
|
137987
137987
|
if (redirectedPath) {
|
|
137988
137988
|
updateFilesByNameMap(fileName, redirectedPath, file);
|
|
137989
|
-
updateFilesByNameMap(fileName,
|
|
137989
|
+
updateFilesByNameMap(fileName, path5, file || false);
|
|
137990
137990
|
} else {
|
|
137991
|
-
updateFilesByNameMap(fileName,
|
|
137991
|
+
updateFilesByNameMap(fileName, path5, file);
|
|
137992
137992
|
}
|
|
137993
137993
|
}
|
|
137994
|
-
function updateFilesByNameMap(fileName,
|
|
137995
|
-
filesByName.set(
|
|
137996
|
-
if (file !== void 0) missingFileNames.delete(
|
|
137997
|
-
else missingFileNames.set(
|
|
137994
|
+
function updateFilesByNameMap(fileName, path5, file) {
|
|
137995
|
+
filesByName.set(path5, file);
|
|
137996
|
+
if (file !== void 0) missingFileNames.delete(path5);
|
|
137997
|
+
else missingFileNames.set(path5, fileName);
|
|
137998
137998
|
}
|
|
137999
137999
|
function getRedirectFromSourceFile(fileName) {
|
|
138000
138000
|
return mapSourceFileToResolvedRef == null ? void 0 : mapSourceFileToResolvedRef.get(toPath3(fileName));
|
|
@@ -138002,8 +138002,8 @@ ${lanes.join("\n")}
|
|
|
138002
138002
|
function forEachResolvedProjectReference2(cb) {
|
|
138003
138003
|
return forEachResolvedProjectReference(resolvedProjectReferences, cb);
|
|
138004
138004
|
}
|
|
138005
|
-
function getRedirectFromOutput(
|
|
138006
|
-
return mapOutputFileToResolvedRef == null ? void 0 : mapOutputFileToResolvedRef.get(
|
|
138005
|
+
function getRedirectFromOutput(path5) {
|
|
138006
|
+
return mapOutputFileToResolvedRef == null ? void 0 : mapOutputFileToResolvedRef.get(path5);
|
|
138007
138007
|
}
|
|
138008
138008
|
function isSourceOfProjectReferenceRedirect(fileName) {
|
|
138009
138009
|
return useSourceOfProjectReferenceRedirect && !!getRedirectFromSourceFile(fileName);
|
|
@@ -138303,7 +138303,7 @@ ${lanes.join("\n")}
|
|
|
138303
138303
|
const getCommonSourceDirectory3 = memoize(() => getCommonSourceDirectoryOfConfig(resolvedRef.commandLine, !host.useCaseSensitiveFileNames()));
|
|
138304
138304
|
commandLine.fileNames.forEach((fileName) => {
|
|
138305
138305
|
if (isDeclarationFileName(fileName)) return;
|
|
138306
|
-
const
|
|
138306
|
+
const path5 = toPath3(fileName);
|
|
138307
138307
|
let outputDts;
|
|
138308
138308
|
if (!fileExtensionIs(
|
|
138309
138309
|
fileName,
|
|
@@ -138317,7 +138317,7 @@ ${lanes.join("\n")}
|
|
|
138317
138317
|
outputDts = outDts;
|
|
138318
138318
|
}
|
|
138319
138319
|
}
|
|
138320
|
-
mapSourceFileToResolvedRef.set(
|
|
138320
|
+
mapSourceFileToResolvedRef.set(path5, { resolvedRef, outputDts });
|
|
138321
138321
|
});
|
|
138322
138322
|
}
|
|
138323
138323
|
if (commandLine.projectReferences) {
|
|
@@ -139005,9 +139005,9 @@ ${lanes.join("\n")}
|
|
|
139005
139005
|
host.compilerHost.fileExists = fileExists;
|
|
139006
139006
|
let directoryExists;
|
|
139007
139007
|
if (originalDirectoryExists) {
|
|
139008
|
-
directoryExists = host.compilerHost.directoryExists = (
|
|
139009
|
-
if (originalDirectoryExists.call(host.compilerHost,
|
|
139010
|
-
handleDirectoryCouldBeSymlink(
|
|
139008
|
+
directoryExists = host.compilerHost.directoryExists = (path5) => {
|
|
139009
|
+
if (originalDirectoryExists.call(host.compilerHost, path5)) {
|
|
139010
|
+
handleDirectoryCouldBeSymlink(path5);
|
|
139011
139011
|
return true;
|
|
139012
139012
|
}
|
|
139013
139013
|
if (!host.getResolvedProjectReferences()) return false;
|
|
@@ -139026,14 +139026,14 @@ ${lanes.join("\n")}
|
|
|
139026
139026
|
});
|
|
139027
139027
|
}
|
|
139028
139028
|
return fileOrDirectoryExistsUsingSource(
|
|
139029
|
-
|
|
139029
|
+
path5,
|
|
139030
139030
|
/*isFile*/
|
|
139031
139031
|
false
|
|
139032
139032
|
);
|
|
139033
139033
|
};
|
|
139034
139034
|
}
|
|
139035
139035
|
if (originalGetDirectories) {
|
|
139036
|
-
host.compilerHost.getDirectories = (
|
|
139036
|
+
host.compilerHost.getDirectories = (path5) => !host.getResolvedProjectReferences() || originalDirectoryExists && originalDirectoryExists.call(host.compilerHost, path5) ? originalGetDirectories.call(host.compilerHost, path5) : [];
|
|
139037
139037
|
}
|
|
139038
139038
|
if (originalRealpath) {
|
|
139039
139039
|
host.compilerHost.realpath = (s) => {
|
|
@@ -139671,7 +139671,7 @@ ${lanes.join("\n")}
|
|
|
139671
139671
|
const useOldState = canReuseOldState(referencedMap, oldState);
|
|
139672
139672
|
newProgram.getTypeChecker();
|
|
139673
139673
|
for (const sourceFile of newProgram.getSourceFiles()) {
|
|
139674
|
-
const
|
|
139674
|
+
const version22 = Debug.checkDefined(sourceFile.version, "Program intended to be used with Builder should have source files with versions set");
|
|
139675
139675
|
const oldUncommittedSignature = useOldState ? (_a = oldState.oldSignatures) == null ? void 0 : _a.get(sourceFile.resolvedPath) : void 0;
|
|
139676
139676
|
const signature = oldUncommittedSignature === void 0 ? useOldState ? (_b = oldState.fileInfos.get(sourceFile.resolvedPath)) == null ? void 0 : _b.signature : void 0 : oldUncommittedSignature || void 0;
|
|
139677
139677
|
if (referencedMap) {
|
|
@@ -139681,7 +139681,7 @@ ${lanes.join("\n")}
|
|
|
139681
139681
|
}
|
|
139682
139682
|
}
|
|
139683
139683
|
fileInfos.set(sourceFile.resolvedPath, {
|
|
139684
|
-
version:
|
|
139684
|
+
version: version22,
|
|
139685
139685
|
signature,
|
|
139686
139686
|
// No need to calculate affectsGlobalScope with --out since its not used at all
|
|
139687
139687
|
affectsGlobalScope: !options.outFile ? isFileAffectingGlobalScope(sourceFile) || void 0 : void 0,
|
|
@@ -139700,12 +139700,12 @@ ${lanes.join("\n")}
|
|
|
139700
139700
|
state.allFileNames = void 0;
|
|
139701
139701
|
}
|
|
139702
139702
|
BuilderState2.releaseCache = releaseCache2;
|
|
139703
|
-
function getFilesAffectedBy(state, programOfThisState,
|
|
139703
|
+
function getFilesAffectedBy(state, programOfThisState, path5, cancellationToken, host) {
|
|
139704
139704
|
var _a;
|
|
139705
139705
|
const result = getFilesAffectedByWithOldState(
|
|
139706
139706
|
state,
|
|
139707
139707
|
programOfThisState,
|
|
139708
|
-
|
|
139708
|
+
path5,
|
|
139709
139709
|
cancellationToken,
|
|
139710
139710
|
host
|
|
139711
139711
|
);
|
|
@@ -139713,8 +139713,8 @@ ${lanes.join("\n")}
|
|
|
139713
139713
|
return result;
|
|
139714
139714
|
}
|
|
139715
139715
|
BuilderState2.getFilesAffectedBy = getFilesAffectedBy;
|
|
139716
|
-
function getFilesAffectedByWithOldState(state, programOfThisState,
|
|
139717
|
-
const sourceFile = programOfThisState.getSourceFileByPath(
|
|
139716
|
+
function getFilesAffectedByWithOldState(state, programOfThisState, path5, cancellationToken, host) {
|
|
139717
|
+
const sourceFile = programOfThisState.getSourceFileByPath(path5);
|
|
139718
139718
|
if (!sourceFile) {
|
|
139719
139719
|
return emptyArray;
|
|
139720
139720
|
}
|
|
@@ -139724,9 +139724,9 @@ ${lanes.join("\n")}
|
|
|
139724
139724
|
return (state.referencedMap ? getFilesAffectedByUpdatedShapeWhenModuleEmit : getFilesAffectedByUpdatedShapeWhenNonModuleEmit)(state, programOfThisState, sourceFile, cancellationToken, host);
|
|
139725
139725
|
}
|
|
139726
139726
|
BuilderState2.getFilesAffectedByWithOldState = getFilesAffectedByWithOldState;
|
|
139727
|
-
function updateSignatureOfFile(state, signature,
|
|
139728
|
-
state.fileInfos.get(
|
|
139729
|
-
(state.hasCalledUpdateShapeSignature || (state.hasCalledUpdateShapeSignature = /* @__PURE__ */ new Set())).add(
|
|
139727
|
+
function updateSignatureOfFile(state, signature, path5) {
|
|
139728
|
+
state.fileInfos.get(path5).signature = signature;
|
|
139729
|
+
(state.hasCalledUpdateShapeSignature || (state.hasCalledUpdateShapeSignature = /* @__PURE__ */ new Set())).add(path5);
|
|
139730
139730
|
}
|
|
139731
139731
|
BuilderState2.updateSignatureOfFile = updateSignatureOfFile;
|
|
139732
139732
|
function computeDtsSignature(programOfThisState, sourceFile, cancellationToken, host, onNewSignature) {
|
|
@@ -139795,10 +139795,10 @@ ${lanes.join("\n")}
|
|
|
139795
139795
|
const seenMap = /* @__PURE__ */ new Set();
|
|
139796
139796
|
const queue = [sourceFile.resolvedPath];
|
|
139797
139797
|
while (queue.length) {
|
|
139798
|
-
const
|
|
139799
|
-
if (!seenMap.has(
|
|
139800
|
-
seenMap.add(
|
|
139801
|
-
const references = state.referencedMap.getValues(
|
|
139798
|
+
const path5 = queue.pop();
|
|
139799
|
+
if (!seenMap.has(path5)) {
|
|
139800
|
+
seenMap.add(path5);
|
|
139801
|
+
const references = state.referencedMap.getValues(path5);
|
|
139802
139802
|
if (references) {
|
|
139803
139803
|
for (const key of references.keys()) {
|
|
139804
139804
|
queue.push(key);
|
|
@@ -139806,9 +139806,9 @@ ${lanes.join("\n")}
|
|
|
139806
139806
|
}
|
|
139807
139807
|
}
|
|
139808
139808
|
}
|
|
139809
|
-
return arrayFrom(mapDefinedIterator(seenMap.keys(), (
|
|
139809
|
+
return arrayFrom(mapDefinedIterator(seenMap.keys(), (path5) => {
|
|
139810
139810
|
var _a;
|
|
139811
|
-
return ((_a = programOfThisState.getSourceFileByPath(
|
|
139811
|
+
return ((_a = programOfThisState.getSourceFileByPath(path5)) == null ? void 0 : _a.fileName) ?? path5;
|
|
139812
139812
|
}));
|
|
139813
139813
|
}
|
|
139814
139814
|
BuilderState2.getAllDependencies = getAllDependencies;
|
|
@@ -139987,7 +139987,7 @@ ${lanes.join("\n")}
|
|
|
139987
139987
|
oldInfo.version !== info.version || // Implied formats dont match
|
|
139988
139988
|
oldInfo.impliedFormat !== info.impliedFormat || // Referenced files changed
|
|
139989
139989
|
!hasSameKeys(newReferences = referencedMap && referencedMap.getValues(sourceFilePath), oldReferencedMap && oldReferencedMap.getValues(sourceFilePath)) || // Referenced file was deleted in the new program
|
|
139990
|
-
newReferences && forEachKey(newReferences, (
|
|
139990
|
+
newReferences && forEachKey(newReferences, (path5) => !state.fileInfos.has(path5) && oldState.fileInfos.has(path5))) {
|
|
139991
139991
|
addFileToChangeSet(sourceFilePath);
|
|
139992
139992
|
} else {
|
|
139993
139993
|
const sourceFile = newProgram.getSourceFileByPath(sourceFilePath);
|
|
@@ -140053,8 +140053,8 @@ ${lanes.join("\n")}
|
|
|
140053
140053
|
}
|
|
140054
140054
|
if (useOldState && state.semanticDiagnosticsPerFile.size !== state.fileInfos.size && oldState.checkPending !== state.checkPending) state.buildInfoEmitPending = true;
|
|
140055
140055
|
return state;
|
|
140056
|
-
function addFileToChangeSet(
|
|
140057
|
-
state.changedFilesSet.add(
|
|
140056
|
+
function addFileToChangeSet(path5) {
|
|
140057
|
+
state.changedFilesSet.add(path5);
|
|
140058
140058
|
if (outFilePath) {
|
|
140059
140059
|
canCopySemanticDiagnostics = false;
|
|
140060
140060
|
canCopyEmitDiagnostics = false;
|
|
@@ -140118,9 +140118,9 @@ ${lanes.join("\n")}
|
|
|
140118
140118
|
result.relatedInformation = relatedInformation ? relatedInformation.length ? relatedInformation.map((r) => convertToDiagnosticRelatedInformation(r, diagnosticFilePath, newProgram, toPathInBuildInfoDirectory)) : [] : void 0;
|
|
140119
140119
|
return result;
|
|
140120
140120
|
});
|
|
140121
|
-
function toPathInBuildInfoDirectory(
|
|
140121
|
+
function toPathInBuildInfoDirectory(path5) {
|
|
140122
140122
|
buildInfoDirectory ?? (buildInfoDirectory = getDirectoryPath(getNormalizedAbsolutePath(getTsBuildInfoEmitOutputFilePath(newProgram.getCompilerOptions()), newProgram.getCurrentDirectory())));
|
|
140123
|
-
return toPath(
|
|
140123
|
+
return toPath(path5, buildInfoDirectory, newProgram.getCanonicalFileName);
|
|
140124
140124
|
}
|
|
140125
140125
|
}
|
|
140126
140126
|
function convertToDiagnosticRelatedInformation(diagnostic, diagnosticFilePath, newProgram, toPath3) {
|
|
@@ -140195,10 +140195,10 @@ ${lanes.join("\n")}
|
|
|
140195
140195
|
state.affectedFilesPendingEmit = void 0;
|
|
140196
140196
|
state.programEmitPending = void 0;
|
|
140197
140197
|
}
|
|
140198
|
-
(_b = state.affectedFilesPendingEmit) == null ? void 0 : _b.forEach((emitKind,
|
|
140198
|
+
(_b = state.affectedFilesPendingEmit) == null ? void 0 : _b.forEach((emitKind, path5) => {
|
|
140199
140199
|
const pending = !isForDtsErrors ? emitKind & 7 : emitKind & (7 | 48);
|
|
140200
|
-
if (!pending) state.affectedFilesPendingEmit.delete(
|
|
140201
|
-
else state.affectedFilesPendingEmit.set(
|
|
140200
|
+
if (!pending) state.affectedFilesPendingEmit.delete(path5);
|
|
140201
|
+
else state.affectedFilesPendingEmit.set(path5, pending);
|
|
140202
140202
|
});
|
|
140203
140203
|
if (state.programEmitPending) {
|
|
140204
140204
|
const pending = !isForDtsErrors ? state.programEmitPending & 7 : state.programEmitPending & (7 | 48);
|
|
@@ -140218,11 +140218,11 @@ ${lanes.join("\n")}
|
|
|
140218
140218
|
function getNextAffectedFilePendingEmit(state, emitOnlyDtsFiles, isForDtsErrors) {
|
|
140219
140219
|
var _a;
|
|
140220
140220
|
if (!((_a = state.affectedFilesPendingEmit) == null ? void 0 : _a.size)) return void 0;
|
|
140221
|
-
return forEachEntry(state.affectedFilesPendingEmit, (emitKind,
|
|
140221
|
+
return forEachEntry(state.affectedFilesPendingEmit, (emitKind, path5) => {
|
|
140222
140222
|
var _a2;
|
|
140223
|
-
const affectedFile = state.program.getSourceFileByPath(
|
|
140223
|
+
const affectedFile = state.program.getSourceFileByPath(path5);
|
|
140224
140224
|
if (!affectedFile || !sourceFileMayBeEmitted(affectedFile, state.program)) {
|
|
140225
|
-
state.affectedFilesPendingEmit.delete(
|
|
140225
|
+
state.affectedFilesPendingEmit.delete(path5);
|
|
140226
140226
|
return void 0;
|
|
140227
140227
|
}
|
|
140228
140228
|
const seenKind = (_a2 = state.seenEmittedFiles) == null ? void 0 : _a2.get(affectedFile.resolvedPath);
|
|
@@ -140238,11 +140238,11 @@ ${lanes.join("\n")}
|
|
|
140238
140238
|
function getNextPendingEmitDiagnosticsFile(state, isForDtsErrors) {
|
|
140239
140239
|
var _a;
|
|
140240
140240
|
if (!((_a = state.emitDiagnosticsPerFile) == null ? void 0 : _a.size)) return void 0;
|
|
140241
|
-
return forEachEntry(state.emitDiagnosticsPerFile, (diagnostics,
|
|
140241
|
+
return forEachEntry(state.emitDiagnosticsPerFile, (diagnostics, path5) => {
|
|
140242
140242
|
var _a2;
|
|
140243
|
-
const affectedFile = state.program.getSourceFileByPath(
|
|
140243
|
+
const affectedFile = state.program.getSourceFileByPath(path5);
|
|
140244
140244
|
if (!affectedFile || !sourceFileMayBeEmitted(affectedFile, state.program)) {
|
|
140245
|
-
state.emitDiagnosticsPerFile.delete(
|
|
140245
|
+
state.emitDiagnosticsPerFile.delete(path5);
|
|
140246
140246
|
return void 0;
|
|
140247
140247
|
}
|
|
140248
140248
|
const seenKind = ((_a2 = state.seenEmittedFiles) == null ? void 0 : _a2.get(affectedFile.resolvedPath)) || 0;
|
|
@@ -140277,10 +140277,10 @@ ${lanes.join("\n")}
|
|
|
140277
140277
|
host
|
|
140278
140278
|
);
|
|
140279
140279
|
}
|
|
140280
|
-
function handleDtsMayChangeOf(state,
|
|
140281
|
-
removeSemanticDiagnosticsOf(state,
|
|
140282
|
-
if (!state.changedFilesSet.has(
|
|
140283
|
-
const sourceFile = state.program.getSourceFileByPath(
|
|
140280
|
+
function handleDtsMayChangeOf(state, path5, invalidateJsFiles, cancellationToken, host) {
|
|
140281
|
+
removeSemanticDiagnosticsOf(state, path5);
|
|
140282
|
+
if (!state.changedFilesSet.has(path5)) {
|
|
140283
|
+
const sourceFile = state.program.getSourceFileByPath(path5);
|
|
140284
140284
|
if (sourceFile) {
|
|
140285
140285
|
BuilderState.updateShapeSignature(
|
|
140286
140286
|
state,
|
|
@@ -140294,13 +140294,13 @@ ${lanes.join("\n")}
|
|
|
140294
140294
|
if (invalidateJsFiles) {
|
|
140295
140295
|
addToAffectedFilesPendingEmit(
|
|
140296
140296
|
state,
|
|
140297
|
-
|
|
140297
|
+
path5,
|
|
140298
140298
|
getBuilderFileEmit(state.compilerOptions)
|
|
140299
140299
|
);
|
|
140300
140300
|
} else if (getEmitDeclarations(state.compilerOptions)) {
|
|
140301
140301
|
addToAffectedFilesPendingEmit(
|
|
140302
140302
|
state,
|
|
140303
|
-
|
|
140303
|
+
path5,
|
|
140304
140304
|
state.compilerOptions.declarationMap ? 56 : 24
|
|
140305
140305
|
/* Dts */
|
|
140306
140306
|
);
|
|
@@ -140308,17 +140308,17 @@ ${lanes.join("\n")}
|
|
|
140308
140308
|
}
|
|
140309
140309
|
}
|
|
140310
140310
|
}
|
|
140311
|
-
function removeSemanticDiagnosticsOf(state,
|
|
140311
|
+
function removeSemanticDiagnosticsOf(state, path5) {
|
|
140312
140312
|
if (!state.semanticDiagnosticsFromOldState) {
|
|
140313
140313
|
return true;
|
|
140314
140314
|
}
|
|
140315
|
-
state.semanticDiagnosticsFromOldState.delete(
|
|
140316
|
-
state.semanticDiagnosticsPerFile.delete(
|
|
140315
|
+
state.semanticDiagnosticsFromOldState.delete(path5);
|
|
140316
|
+
state.semanticDiagnosticsPerFile.delete(path5);
|
|
140317
140317
|
return !state.semanticDiagnosticsFromOldState.size;
|
|
140318
140318
|
}
|
|
140319
|
-
function isChangedSignature(state,
|
|
140320
|
-
const oldSignature = Debug.checkDefined(state.oldSignatures).get(
|
|
140321
|
-
const newSignature = Debug.checkDefined(state.fileInfos.get(
|
|
140319
|
+
function isChangedSignature(state, path5) {
|
|
140320
|
+
const oldSignature = Debug.checkDefined(state.oldSignatures).get(path5) || void 0;
|
|
140321
|
+
const newSignature = Debug.checkDefined(state.fileInfos.get(path5)).signature;
|
|
140322
140322
|
return newSignature !== oldSignature;
|
|
140323
140323
|
}
|
|
140324
140324
|
function handleDtsMayChangeOfGlobalScope(state, filePath, invalidateJsFiles, cancellationToken, host) {
|
|
@@ -140425,13 +140425,13 @@ ${lanes.join("\n")}
|
|
|
140425
140425
|
}
|
|
140426
140426
|
function getBinderAndCheckerDiagnosticsOfFile(state, sourceFile, cancellationToken, semanticDiagnosticsPerFile) {
|
|
140427
140427
|
semanticDiagnosticsPerFile ?? (semanticDiagnosticsPerFile = state.semanticDiagnosticsPerFile);
|
|
140428
|
-
const
|
|
140429
|
-
const cachedDiagnostics = semanticDiagnosticsPerFile.get(
|
|
140428
|
+
const path5 = sourceFile.resolvedPath;
|
|
140429
|
+
const cachedDiagnostics = semanticDiagnosticsPerFile.get(path5);
|
|
140430
140430
|
if (cachedDiagnostics) {
|
|
140431
140431
|
return filterSemanticDiagnostics(cachedDiagnostics, state.compilerOptions);
|
|
140432
140432
|
}
|
|
140433
140433
|
const diagnostics = state.program.getBindAndCheckDiagnostics(sourceFile, cancellationToken);
|
|
140434
|
-
semanticDiagnosticsPerFile.set(
|
|
140434
|
+
semanticDiagnosticsPerFile.set(path5, diagnostics);
|
|
140435
140435
|
state.buildInfoEmitPending = true;
|
|
140436
140436
|
return filterSemanticDiagnostics(diagnostics, state.compilerOptions);
|
|
140437
140437
|
}
|
|
@@ -140485,7 +140485,7 @@ ${lanes.join("\n")}
|
|
|
140485
140485
|
root: arrayFrom(rootFileNames, (r) => relativeToBuildInfo(r)),
|
|
140486
140486
|
errors: state.hasErrors ? true : void 0,
|
|
140487
140487
|
checkPending: state.checkPending,
|
|
140488
|
-
version
|
|
140488
|
+
version: version2
|
|
140489
140489
|
};
|
|
140490
140490
|
return buildInfo2;
|
|
140491
140491
|
}
|
|
@@ -140517,7 +140517,7 @@ ${lanes.join("\n")}
|
|
|
140517
140517
|
// Actual value
|
|
140518
140518
|
errors: state.hasErrors ? true : void 0,
|
|
140519
140519
|
checkPending: state.checkPending,
|
|
140520
|
-
version
|
|
140520
|
+
version: version2
|
|
140521
140521
|
};
|
|
140522
140522
|
return buildInfo2;
|
|
140523
140523
|
}
|
|
@@ -140579,11 +140579,11 @@ ${lanes.join("\n")}
|
|
|
140579
140579
|
if ((_b = state.affectedFilesPendingEmit) == null ? void 0 : _b.size) {
|
|
140580
140580
|
const fullEmitForOptions = getBuilderFileEmit(state.compilerOptions);
|
|
140581
140581
|
const seenFiles = /* @__PURE__ */ new Set();
|
|
140582
|
-
for (const
|
|
140583
|
-
if (tryAddToSet(seenFiles,
|
|
140584
|
-
const file = state.program.getSourceFileByPath(
|
|
140582
|
+
for (const path5 of arrayFrom(state.affectedFilesPendingEmit.keys()).sort(compareStringsCaseSensitive)) {
|
|
140583
|
+
if (tryAddToSet(seenFiles, path5)) {
|
|
140584
|
+
const file = state.program.getSourceFileByPath(path5);
|
|
140585
140585
|
if (!file || !sourceFileMayBeEmitted(file, state.program)) continue;
|
|
140586
|
-
const fileId = toFileId(
|
|
140586
|
+
const fileId = toFileId(path5), pendingEmit = state.affectedFilesPendingEmit.get(path5);
|
|
140587
140587
|
affectedFilesPendingEmit = append(
|
|
140588
140588
|
affectedFilesPendingEmit,
|
|
140589
140589
|
pendingEmit === fullEmitForOptions ? fileId : (
|
|
@@ -140614,20 +140614,20 @@ ${lanes.join("\n")}
|
|
|
140614
140614
|
latestChangedDtsFile,
|
|
140615
140615
|
errors: state.hasErrors ? true : void 0,
|
|
140616
140616
|
checkPending: state.checkPending,
|
|
140617
|
-
version
|
|
140617
|
+
version: version2
|
|
140618
140618
|
};
|
|
140619
140619
|
return buildInfo;
|
|
140620
|
-
function relativeToBuildInfoEnsuringAbsolutePath(
|
|
140621
|
-
return relativeToBuildInfo(getNormalizedAbsolutePath(
|
|
140620
|
+
function relativeToBuildInfoEnsuringAbsolutePath(path5) {
|
|
140621
|
+
return relativeToBuildInfo(getNormalizedAbsolutePath(path5, currentDirectory));
|
|
140622
140622
|
}
|
|
140623
|
-
function relativeToBuildInfo(
|
|
140624
|
-
return ensurePathIsNonModuleName(getRelativePathFromDirectory(buildInfoDirectory,
|
|
140623
|
+
function relativeToBuildInfo(path5) {
|
|
140624
|
+
return ensurePathIsNonModuleName(getRelativePathFromDirectory(buildInfoDirectory, path5, state.program.getCanonicalFileName));
|
|
140625
140625
|
}
|
|
140626
|
-
function toFileId(
|
|
140627
|
-
let fileId = fileNameToFileId.get(
|
|
140626
|
+
function toFileId(path5) {
|
|
140627
|
+
let fileId = fileNameToFileId.get(path5);
|
|
140628
140628
|
if (fileId === void 0) {
|
|
140629
|
-
fileNames.push(relativeToBuildInfo(
|
|
140630
|
-
fileNameToFileId.set(
|
|
140629
|
+
fileNames.push(relativeToBuildInfo(path5));
|
|
140630
|
+
fileNameToFileId.set(path5, fileId = fileNames.length);
|
|
140631
140631
|
}
|
|
140632
140632
|
return fileId;
|
|
140633
140633
|
}
|
|
@@ -140641,8 +140641,8 @@ ${lanes.join("\n")}
|
|
|
140641
140641
|
}
|
|
140642
140642
|
return fileIdListId;
|
|
140643
140643
|
}
|
|
140644
|
-
function tryAddRoot(
|
|
140645
|
-
const file = state.program.getSourceFile(
|
|
140644
|
+
function tryAddRoot(path5, fileId) {
|
|
140645
|
+
const file = state.program.getSourceFile(path5);
|
|
140646
140646
|
if (!state.program.getFileIncludeReasons().get(file.path).some(
|
|
140647
140647
|
(r) => r.kind === 0
|
|
140648
140648
|
/* RootFile */
|
|
@@ -140659,10 +140659,10 @@ ${lanes.join("\n")}
|
|
|
140659
140659
|
}
|
|
140660
140660
|
function toResolvedRoot() {
|
|
140661
140661
|
let result;
|
|
140662
|
-
rootFileNames.forEach((
|
|
140663
|
-
const file = state.program.getSourceFileByPath(
|
|
140664
|
-
if (file &&
|
|
140665
|
-
result = append(result, [toFileId(file.resolvedPath), toFileId(
|
|
140662
|
+
rootFileNames.forEach((path5) => {
|
|
140663
|
+
const file = state.program.getSourceFileByPath(path5);
|
|
140664
|
+
if (file && path5 !== file.resolvedPath) {
|
|
140665
|
+
result = append(result, [toFileId(file.resolvedPath), toFileId(path5)]);
|
|
140666
140666
|
}
|
|
140667
140667
|
});
|
|
140668
140668
|
return result;
|
|
@@ -140770,8 +140770,8 @@ ${lanes.join("\n")}
|
|
|
140770
140770
|
function toChangeFileSet() {
|
|
140771
140771
|
let changeFileSet;
|
|
140772
140772
|
if (state.changedFilesSet.size) {
|
|
140773
|
-
for (const
|
|
140774
|
-
changeFileSet = append(changeFileSet, toFileId(
|
|
140773
|
+
for (const path5 of arrayFrom(state.changedFilesSet.keys()).sort(compareStringsCaseSensitive)) {
|
|
140774
|
+
changeFileSet = append(changeFileSet, toFileId(path5));
|
|
140775
140775
|
}
|
|
140776
140776
|
}
|
|
140777
140777
|
return changeFileSet;
|
|
@@ -141270,8 +141270,8 @@ ${lanes.join("\n")}
|
|
|
141270
141270
|
const changedFilesSet = new Set(map(buildInfo.changeFileSet, toFilePath));
|
|
141271
141271
|
if (isIncrementalBundleEmitBuildInfo(buildInfo)) {
|
|
141272
141272
|
buildInfo.fileInfos.forEach((fileInfo, index) => {
|
|
141273
|
-
const
|
|
141274
|
-
fileInfos.set(
|
|
141273
|
+
const path5 = toFilePath(index + 1);
|
|
141274
|
+
fileInfos.set(path5, isString(fileInfo) ? { version: fileInfo, signature: void 0, affectsGlobalScope: void 0, impliedFormat: void 0 } : fileInfo);
|
|
141275
141275
|
});
|
|
141276
141276
|
state = {
|
|
141277
141277
|
fileInfos,
|
|
@@ -141290,10 +141290,10 @@ ${lanes.join("\n")}
|
|
|
141290
141290
|
filePathsSetList = (_b = buildInfo.fileIdsList) == null ? void 0 : _b.map((fileIds) => new Set(fileIds.map(toFilePath)));
|
|
141291
141291
|
const emitSignatures = ((_c = buildInfo.options) == null ? void 0 : _c.composite) && !buildInfo.options.outFile ? /* @__PURE__ */ new Map() : void 0;
|
|
141292
141292
|
buildInfo.fileInfos.forEach((fileInfo, index) => {
|
|
141293
|
-
const
|
|
141293
|
+
const path5 = toFilePath(index + 1);
|
|
141294
141294
|
const stateFileInfo = toBuilderStateFileInfoForMultiEmit(fileInfo);
|
|
141295
|
-
fileInfos.set(
|
|
141296
|
-
if (emitSignatures && stateFileInfo.signature) emitSignatures.set(
|
|
141295
|
+
fileInfos.set(path5, stateFileInfo);
|
|
141296
|
+
if (emitSignatures && stateFileInfo.signature) emitSignatures.set(path5, stateFileInfo.signature);
|
|
141297
141297
|
});
|
|
141298
141298
|
(_d = buildInfo.emitSignatures) == null ? void 0 : _d.forEach((value) => {
|
|
141299
141299
|
if (isNumber(value)) emitSignatures.delete(toFilePath(value));
|
|
@@ -141347,11 +141347,11 @@ ${lanes.join("\n")}
|
|
|
141347
141347
|
close: noop,
|
|
141348
141348
|
hasChangedEmitSignature: returnFalse
|
|
141349
141349
|
};
|
|
141350
|
-
function toPathInBuildInfoDirectory(
|
|
141351
|
-
return toPath(
|
|
141350
|
+
function toPathInBuildInfoDirectory(path5) {
|
|
141351
|
+
return toPath(path5, buildInfoDirectory, getCanonicalFileName);
|
|
141352
141352
|
}
|
|
141353
|
-
function toAbsolutePath(
|
|
141354
|
-
return getNormalizedAbsolutePath(
|
|
141353
|
+
function toAbsolutePath(path5) {
|
|
141354
|
+
return getNormalizedAbsolutePath(path5, buildInfoDirectory);
|
|
141355
141355
|
}
|
|
141356
141356
|
function toFilePath(fileId) {
|
|
141357
141357
|
return filePaths[fileId - 1];
|
|
@@ -141390,30 +141390,30 @@ ${lanes.join("\n")}
|
|
|
141390
141390
|
const roots = /* @__PURE__ */ new Map();
|
|
141391
141391
|
const resolvedRoots = new Map(program2.resolvedRoot);
|
|
141392
141392
|
program2.fileInfos.forEach((fileInfo, index) => {
|
|
141393
|
-
const
|
|
141394
|
-
const
|
|
141395
|
-
fileInfos.set(
|
|
141393
|
+
const path5 = toPath(program2.fileNames[index], buildInfoDirectory, getCanonicalFileName);
|
|
141394
|
+
const version22 = isString(fileInfo) ? fileInfo : fileInfo.version;
|
|
141395
|
+
fileInfos.set(path5, version22);
|
|
141396
141396
|
if (rootIndex < program2.root.length) {
|
|
141397
141397
|
const current = program2.root[rootIndex];
|
|
141398
141398
|
const fileId = index + 1;
|
|
141399
141399
|
if (isArray(current)) {
|
|
141400
141400
|
if (current[0] <= fileId && fileId <= current[1]) {
|
|
141401
|
-
addRoot(fileId,
|
|
141401
|
+
addRoot(fileId, path5);
|
|
141402
141402
|
if (current[1] === fileId) rootIndex++;
|
|
141403
141403
|
}
|
|
141404
141404
|
} else if (current === fileId) {
|
|
141405
|
-
addRoot(fileId,
|
|
141405
|
+
addRoot(fileId, path5);
|
|
141406
141406
|
rootIndex++;
|
|
141407
141407
|
}
|
|
141408
141408
|
}
|
|
141409
141409
|
});
|
|
141410
141410
|
return { fileInfos, roots };
|
|
141411
|
-
function addRoot(fileId,
|
|
141411
|
+
function addRoot(fileId, path5) {
|
|
141412
141412
|
const root = resolvedRoots.get(fileId);
|
|
141413
141413
|
if (root) {
|
|
141414
|
-
roots.set(toPath(program2.fileNames[root - 1], buildInfoDirectory, getCanonicalFileName),
|
|
141414
|
+
roots.set(toPath(program2.fileNames[root - 1], buildInfoDirectory, getCanonicalFileName), path5);
|
|
141415
141415
|
} else {
|
|
141416
|
-
roots.set(
|
|
141416
|
+
roots.set(path5, void 0);
|
|
141417
141417
|
}
|
|
141418
141418
|
}
|
|
141419
141419
|
}
|
|
@@ -141488,11 +141488,11 @@ ${lanes.join("\n")}
|
|
|
141488
141488
|
newConfigFileParsingDiagnostics
|
|
141489
141489
|
);
|
|
141490
141490
|
}
|
|
141491
|
-
function removeIgnoredPath(
|
|
141492
|
-
if (endsWith(
|
|
141493
|
-
return removeSuffix(
|
|
141491
|
+
function removeIgnoredPath(path5) {
|
|
141492
|
+
if (endsWith(path5, "/node_modules/.staging")) {
|
|
141493
|
+
return removeSuffix(path5, "/.staging");
|
|
141494
141494
|
}
|
|
141495
|
-
return some(ignoredPaths, (searchPath) =>
|
|
141495
|
+
return some(ignoredPaths, (searchPath) => path5.includes(searchPath)) ? void 0 : path5;
|
|
141496
141496
|
}
|
|
141497
141497
|
function perceivedOsRootLengthForWatching(pathComponents2, length2) {
|
|
141498
141498
|
if (length2 <= 1) return 1;
|
|
@@ -141518,8 +141518,8 @@ ${lanes.join("\n")}
|
|
|
141518
141518
|
const perceivedOsRootLength = perceivedOsRootLengthForWatching(pathComponents2, length2);
|
|
141519
141519
|
return length2 > perceivedOsRootLength + 1;
|
|
141520
141520
|
}
|
|
141521
|
-
function canWatchDirectoryOrFilePath(
|
|
141522
|
-
return canWatchDirectoryOrFile(getPathComponents(
|
|
141521
|
+
function canWatchDirectoryOrFilePath(path5) {
|
|
141522
|
+
return canWatchDirectoryOrFile(getPathComponents(path5));
|
|
141523
141523
|
}
|
|
141524
141524
|
function canWatchAtTypes(atTypes) {
|
|
141525
141525
|
return canWatchAffectedPackageJsonOrNodeModulesOfAtTypes(getDirectoryPath(atTypes));
|
|
@@ -141813,11 +141813,11 @@ ${lanes.join("\n")}
|
|
|
141813
141813
|
filesWithChangedSetOfUnresolvedImports = void 0;
|
|
141814
141814
|
return collected;
|
|
141815
141815
|
}
|
|
141816
|
-
function isFileWithInvalidatedNonRelativeUnresolvedImports(
|
|
141816
|
+
function isFileWithInvalidatedNonRelativeUnresolvedImports(path5) {
|
|
141817
141817
|
if (!filesWithInvalidatedNonRelativeUnresolvedImports) {
|
|
141818
141818
|
return false;
|
|
141819
141819
|
}
|
|
141820
|
-
const value = filesWithInvalidatedNonRelativeUnresolvedImports.get(
|
|
141820
|
+
const value = filesWithInvalidatedNonRelativeUnresolvedImports.get(path5);
|
|
141821
141821
|
return !!value && !!value.length;
|
|
141822
141822
|
}
|
|
141823
141823
|
function createHasInvalidatedResolutions(customHasInvalidatedResolutions, customHasInvalidatedLibResolutions) {
|
|
@@ -141825,7 +141825,7 @@ ${lanes.join("\n")}
|
|
|
141825
141825
|
const collected = filesWithInvalidatedResolutions;
|
|
141826
141826
|
filesWithInvalidatedResolutions = void 0;
|
|
141827
141827
|
return {
|
|
141828
|
-
hasInvalidatedResolutions: (
|
|
141828
|
+
hasInvalidatedResolutions: (path5) => customHasInvalidatedResolutions(path5) || allModuleAndTypeResolutionsAreInvalidated || !!(collected == null ? void 0 : collected.has(path5)) || isFileWithInvalidatedNonRelativeUnresolvedImports(path5),
|
|
141829
141829
|
hasInvalidatedLibResolutions: (libFileName) => {
|
|
141830
141830
|
var _a;
|
|
141831
141831
|
return customHasInvalidatedLibResolutions(libFileName) || !!((_a = resolvedLibraries == null ? void 0 : resolvedLibraries.get(libFileName)) == null ? void 0 : _a.isInvalidated);
|
|
@@ -141881,11 +141881,11 @@ ${lanes.join("\n")}
|
|
|
141881
141881
|
if (expected) impliedFormatPackageJsons.set(newFile.resolvedPath, newFile.packageJsonLocations);
|
|
141882
141882
|
else impliedFormatPackageJsons.delete(newFile.resolvedPath);
|
|
141883
141883
|
});
|
|
141884
|
-
impliedFormatPackageJsons.forEach((existing,
|
|
141885
|
-
const newFile = newProgram == null ? void 0 : newProgram.getSourceFileByPath(
|
|
141886
|
-
if (!newFile || newFile.resolvedPath !==
|
|
141884
|
+
impliedFormatPackageJsons.forEach((existing, path5) => {
|
|
141885
|
+
const newFile = newProgram == null ? void 0 : newProgram.getSourceFileByPath(path5);
|
|
141886
|
+
if (!newFile || newFile.resolvedPath !== path5) {
|
|
141887
141887
|
existing.forEach((location) => fileWatchesOfAffectingLocations.get(location).files--);
|
|
141888
|
-
impliedFormatPackageJsons.delete(
|
|
141888
|
+
impliedFormatPackageJsons.delete(path5);
|
|
141889
141889
|
}
|
|
141890
141890
|
});
|
|
141891
141891
|
}
|
|
@@ -141904,16 +141904,16 @@ ${lanes.join("\n")}
|
|
|
141904
141904
|
packageDirWatchers.delete(packageDirPath);
|
|
141905
141905
|
}
|
|
141906
141906
|
}
|
|
141907
|
-
function closeDirectoryWatchesOfFailedLookup(watcher,
|
|
141907
|
+
function closeDirectoryWatchesOfFailedLookup(watcher, path5) {
|
|
141908
141908
|
if (watcher.refCount === 0) {
|
|
141909
|
-
directoryWatchesOfFailedLookups.delete(
|
|
141909
|
+
directoryWatchesOfFailedLookups.delete(path5);
|
|
141910
141910
|
watcher.watcher.close();
|
|
141911
141911
|
}
|
|
141912
141912
|
}
|
|
141913
|
-
function closeFileWatcherOfAffectingLocation(watcher,
|
|
141913
|
+
function closeFileWatcherOfAffectingLocation(watcher, path5) {
|
|
141914
141914
|
var _a;
|
|
141915
141915
|
if (watcher.files === 0 && watcher.resolutions === 0 && !((_a = watcher.symlinks) == null ? void 0 : _a.size)) {
|
|
141916
|
-
fileWatchesOfAffectingLocations.delete(
|
|
141916
|
+
fileWatchesOfAffectingLocations.delete(path5);
|
|
141917
141917
|
watcher.watcher.close();
|
|
141918
141918
|
}
|
|
141919
141919
|
}
|
|
@@ -141932,10 +141932,10 @@ ${lanes.join("\n")}
|
|
|
141932
141932
|
logChanges
|
|
141933
141933
|
}) {
|
|
141934
141934
|
var _a;
|
|
141935
|
-
const
|
|
141936
|
-
const resolutionsInFile = perFileCache.get(
|
|
141935
|
+
const path5 = resolutionHost.toPath(containingFile);
|
|
141936
|
+
const resolutionsInFile = perFileCache.get(path5) || perFileCache.set(path5, createModeAwareCache()).get(path5);
|
|
141937
141937
|
const resolvedModules = [];
|
|
141938
|
-
const hasInvalidatedNonRelativeUnresolvedImport = logChanges && isFileWithInvalidatedNonRelativeUnresolvedImports(
|
|
141938
|
+
const hasInvalidatedNonRelativeUnresolvedImport = logChanges && isFileWithInvalidatedNonRelativeUnresolvedImports(path5);
|
|
141939
141939
|
const program2 = resolutionHost.getCurrentProgram();
|
|
141940
141940
|
const oldRedirect = program2 && ((_a = program2.getRedirectFromSourceFile(containingFile)) == null ? void 0 : _a.resolvedRef);
|
|
141941
141941
|
const unmatchedRedirects = oldRedirect ? !redirectedReference || redirectedReference.sourceFile.path !== oldRedirect.sourceFile.path : !!redirectedReference;
|
|
@@ -141953,13 +141953,13 @@ ${lanes.join("\n")}
|
|
|
141953
141953
|
}
|
|
141954
141954
|
resolutionsInFile.set(name, mode, resolution);
|
|
141955
141955
|
if (resolution !== existingResolution) {
|
|
141956
|
-
watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution,
|
|
141956
|
+
watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path5, getResolutionWithResolvedFileName, deferWatchingNonRelativeResolution);
|
|
141957
141957
|
if (existingResolution) {
|
|
141958
|
-
stopWatchFailedLookupLocationOfResolution(existingResolution,
|
|
141958
|
+
stopWatchFailedLookupLocationOfResolution(existingResolution, path5, getResolutionWithResolvedFileName);
|
|
141959
141959
|
}
|
|
141960
141960
|
}
|
|
141961
141961
|
if (logChanges && filesWithChangedSetOfUnresolvedImports && !resolutionIsEqualTo(existingResolution, resolution)) {
|
|
141962
|
-
filesWithChangedSetOfUnresolvedImports.push(
|
|
141962
|
+
filesWithChangedSetOfUnresolvedImports.push(path5);
|
|
141963
141963
|
logChanges = false;
|
|
141964
141964
|
}
|
|
141965
141965
|
} else {
|
|
@@ -141990,7 +141990,7 @@ ${lanes.join("\n")}
|
|
|
141990
141990
|
if (resolutionsInFile.size() !== seenNamesInFile.size()) {
|
|
141991
141991
|
resolutionsInFile.forEach((resolution, name, mode) => {
|
|
141992
141992
|
if (!seenNamesInFile.has(name, mode)) {
|
|
141993
|
-
stopWatchFailedLookupLocationOfResolution(resolution,
|
|
141993
|
+
stopWatchFailedLookupLocationOfResolution(resolution, path5, getResolutionWithResolvedFileName);
|
|
141994
141994
|
resolutionsInFile.delete(name, mode);
|
|
141995
141995
|
}
|
|
141996
141996
|
});
|
|
@@ -142064,18 +142064,18 @@ ${lanes.join("\n")}
|
|
|
142064
142064
|
if (!resolution || resolution.isInvalidated) {
|
|
142065
142065
|
const existingResolution = resolution;
|
|
142066
142066
|
resolution = resolveLibrary(libraryName, resolveFrom, options, host, libraryResolutionCache);
|
|
142067
|
-
const
|
|
142067
|
+
const path5 = resolutionHost.toPath(resolveFrom);
|
|
142068
142068
|
watchFailedLookupLocationsOfExternalModuleResolutions(
|
|
142069
142069
|
libraryName,
|
|
142070
142070
|
resolution,
|
|
142071
|
-
|
|
142071
|
+
path5,
|
|
142072
142072
|
getResolvedModuleFromResolution,
|
|
142073
142073
|
/*deferWatchingNonRelativeResolution*/
|
|
142074
142074
|
false
|
|
142075
142075
|
);
|
|
142076
142076
|
resolvedLibraries.set(libFileName, resolution);
|
|
142077
142077
|
if (existingResolution) {
|
|
142078
|
-
stopWatchFailedLookupLocationOfResolution(existingResolution,
|
|
142078
|
+
stopWatchFailedLookupLocationOfResolution(existingResolution, path5, getResolvedModuleFromResolution);
|
|
142079
142079
|
}
|
|
142080
142080
|
} else {
|
|
142081
142081
|
if (isTraceEnabled(options, host)) {
|
|
@@ -142094,8 +142094,8 @@ ${lanes.join("\n")}
|
|
|
142094
142094
|
}
|
|
142095
142095
|
function resolveSingleModuleNameWithoutWatching(moduleName, containingFile) {
|
|
142096
142096
|
var _a, _b;
|
|
142097
|
-
const
|
|
142098
|
-
const resolutionsInFile = resolvedModuleNames.get(
|
|
142097
|
+
const path5 = resolutionHost.toPath(containingFile);
|
|
142098
|
+
const resolutionsInFile = resolvedModuleNames.get(path5);
|
|
142099
142099
|
const resolution = resolutionsInFile == null ? void 0 : resolutionsInFile.get(
|
|
142100
142100
|
moduleName,
|
|
142101
142101
|
/*mode*/
|
|
@@ -142252,13 +142252,13 @@ ${lanes.join("\n")}
|
|
|
142252
142252
|
(symlinkWatcher.symlinks ?? (symlinkWatcher.symlinks = /* @__PURE__ */ new Set())).add(affectingLocation);
|
|
142253
142253
|
}
|
|
142254
142254
|
}
|
|
142255
|
-
function invalidateAffectingFileWatcher(
|
|
142255
|
+
function invalidateAffectingFileWatcher(path5, packageJsonMap) {
|
|
142256
142256
|
var _a;
|
|
142257
|
-
const watcher = fileWatchesOfAffectingLocations.get(
|
|
142258
|
-
if (watcher == null ? void 0 : watcher.resolutions) (affectingPathChecks ?? (affectingPathChecks = /* @__PURE__ */ new Set())).add(
|
|
142259
|
-
if (watcher == null ? void 0 : watcher.files) (affectingPathChecksForFile ?? (affectingPathChecksForFile = /* @__PURE__ */ new Set())).add(
|
|
142257
|
+
const watcher = fileWatchesOfAffectingLocations.get(path5);
|
|
142258
|
+
if (watcher == null ? void 0 : watcher.resolutions) (affectingPathChecks ?? (affectingPathChecks = /* @__PURE__ */ new Set())).add(path5);
|
|
142259
|
+
if (watcher == null ? void 0 : watcher.files) (affectingPathChecksForFile ?? (affectingPathChecksForFile = /* @__PURE__ */ new Set())).add(path5);
|
|
142260
142260
|
(_a = watcher == null ? void 0 : watcher.symlinks) == null ? void 0 : _a.forEach((path22) => invalidateAffectingFileWatcher(path22, packageJsonMap));
|
|
142261
|
-
packageJsonMap == null ? void 0 : packageJsonMap.delete(resolutionHost.toPath(
|
|
142261
|
+
packageJsonMap == null ? void 0 : packageJsonMap.delete(resolutionHost.toPath(path5));
|
|
142262
142262
|
}
|
|
142263
142263
|
function watchFailedLookupLocationOfNonRelativeModuleResolutions() {
|
|
142264
142264
|
nonRelativeExternalModuleResolutions.forEach(watchFailedLookupLocationOfResolution);
|
|
@@ -142497,7 +142497,7 @@ ${lanes.join("\n")}
|
|
|
142497
142497
|
function invalidatePackageJsonMap() {
|
|
142498
142498
|
const packageJsonMap = moduleResolutionCache.getPackageJsonInfoCache().getInternalMap();
|
|
142499
142499
|
if (packageJsonMap && (failedLookupChecks || startsWithPathChecks || isInDirectoryChecks)) {
|
|
142500
|
-
packageJsonMap.forEach((_value,
|
|
142500
|
+
packageJsonMap.forEach((_value, path5) => isInvalidatedFailedLookup(path5) ? packageJsonMap.delete(path5) : void 0);
|
|
142501
142501
|
}
|
|
142502
142502
|
}
|
|
142503
142503
|
function invalidateResolutionsOfFailedLookupLocations() {
|
|
@@ -143115,9 +143115,9 @@ ${lanes.join("\n")}
|
|
|
143115
143115
|
getDefaultLibLocation: maybeBind(host, host.getDefaultLibLocation),
|
|
143116
143116
|
getDefaultLibFileName: (options) => host.getDefaultLibFileName(options),
|
|
143117
143117
|
writeFile: createWriteFileMeasuringIO(
|
|
143118
|
-
(
|
|
143119
|
-
(
|
|
143120
|
-
(
|
|
143118
|
+
(path5, data, writeByteOrderMark) => host.writeFile(path5, data, writeByteOrderMark),
|
|
143119
|
+
(path5) => host.createDirectory(path5),
|
|
143120
|
+
(path5) => host.directoryExists(path5)
|
|
143121
143121
|
),
|
|
143122
143122
|
getCurrentDirectory: memoize(() => host.getCurrentDirectory()),
|
|
143123
143123
|
useCaseSensitiveFileNames: () => useCaseSensitiveFileNames2,
|
|
@@ -143188,16 +143188,16 @@ ${lanes.join("\n")}
|
|
|
143188
143188
|
getCurrentDirectory: memoize(() => system.getCurrentDirectory()),
|
|
143189
143189
|
getDefaultLibLocation,
|
|
143190
143190
|
getDefaultLibFileName: (options) => combinePaths(getDefaultLibLocation(), getDefaultLibFileName(options)),
|
|
143191
|
-
fileExists: (
|
|
143192
|
-
readFile: (
|
|
143193
|
-
directoryExists: (
|
|
143194
|
-
getDirectories: (
|
|
143195
|
-
readDirectory: (
|
|
143191
|
+
fileExists: (path5) => system.fileExists(path5),
|
|
143192
|
+
readFile: (path5, encoding) => system.readFile(path5, encoding),
|
|
143193
|
+
directoryExists: (path5) => system.directoryExists(path5),
|
|
143194
|
+
getDirectories: (path5) => system.getDirectories(path5),
|
|
143195
|
+
readDirectory: (path5, extensions, exclude, include, depth) => system.readDirectory(path5, extensions, exclude, include, depth),
|
|
143196
143196
|
realpath: maybeBind(system, system.realpath),
|
|
143197
143197
|
getEnvironmentVariable: maybeBind(system, system.getEnvironmentVariable),
|
|
143198
143198
|
trace: (s) => system.write(s + system.newLine),
|
|
143199
|
-
createDirectory: (
|
|
143200
|
-
writeFile: (
|
|
143199
|
+
createDirectory: (path5) => system.createDirectory(path5),
|
|
143200
|
+
writeFile: (path5, data, writeByteOrderMark) => system.writeFile(path5, data, writeByteOrderMark),
|
|
143201
143201
|
createHash: maybeBind(system, system.createHash),
|
|
143202
143202
|
createProgram: createProgram2 || createEmitAndSemanticDiagnosticsBuilderProgram,
|
|
143203
143203
|
storeSignatureInfo: system.storeSignatureInfo,
|
|
@@ -143292,7 +143292,7 @@ ${lanes.join("\n")}
|
|
|
143292
143292
|
if (!content) return void 0;
|
|
143293
143293
|
buildInfo = getBuildInfo(buildInfoPath, content);
|
|
143294
143294
|
}
|
|
143295
|
-
if (!buildInfo || buildInfo.version !==
|
|
143295
|
+
if (!buildInfo || buildInfo.version !== version2 || !isIncrementalBuildInfo(buildInfo)) return void 0;
|
|
143296
143296
|
return createBuilderProgramUsingIncrementalBuildInfo(buildInfo, buildInfoPath, host);
|
|
143297
143297
|
}
|
|
143298
143298
|
function createIncrementalCompilerHost(options, system = sys) {
|
|
@@ -143510,7 +143510,7 @@ ${lanes.join("\n")}
|
|
|
143510
143510
|
originalWriteFile,
|
|
143511
143511
|
readFileWithCache
|
|
143512
143512
|
} = changeCompilerHostLikeToUseCache(compilerHost, toPath3);
|
|
143513
|
-
if (isProgramUptoDate(getCurrentProgram(), rootFileNames, compilerOptions, (
|
|
143513
|
+
if (isProgramUptoDate(getCurrentProgram(), rootFileNames, compilerOptions, (path5) => getSourceVersion(path5, readFileWithCache), (fileName) => compilerHost.fileExists(fileName), hasInvalidatedResolutions, hasInvalidatedLibResolutions, hasChangedAutomaticTypeDirectiveNames, getParsedCommandLine, projectReferences)) {
|
|
143514
143514
|
if (hasChangedConfigFileParsingErrors) {
|
|
143515
143515
|
if (reportFileChangeDetectedOnCreateProgram) {
|
|
143516
143516
|
reportWatchDiagnostic(Diagnostics.File_change_detected_Starting_incremental_compilation);
|
|
@@ -143604,14 +143604,14 @@ ${lanes.join("\n")}
|
|
|
143604
143604
|
return typeof hostSourceFile.version === "boolean";
|
|
143605
143605
|
}
|
|
143606
143606
|
function fileExists(fileName) {
|
|
143607
|
-
const
|
|
143608
|
-
if (isFileMissingOnHost(sourceFilesCache.get(
|
|
143607
|
+
const path5 = toPath3(fileName);
|
|
143608
|
+
if (isFileMissingOnHost(sourceFilesCache.get(path5))) {
|
|
143609
143609
|
return false;
|
|
143610
143610
|
}
|
|
143611
143611
|
return directoryStructureHost.fileExists(fileName);
|
|
143612
143612
|
}
|
|
143613
|
-
function getVersionedSourceFileByPath(fileName,
|
|
143614
|
-
const hostSourceFile = sourceFilesCache.get(
|
|
143613
|
+
function getVersionedSourceFileByPath(fileName, path5, languageVersionOrOptions, onError, shouldCreateNewSourceFile) {
|
|
143614
|
+
const hostSourceFile = sourceFilesCache.get(path5);
|
|
143615
143615
|
if (isFileMissingOnHost(hostSourceFile)) {
|
|
143616
143616
|
return void 0;
|
|
143617
143617
|
}
|
|
@@ -143623,41 +143623,41 @@ ${lanes.join("\n")}
|
|
|
143623
143623
|
hostSourceFile.sourceFile = sourceFile;
|
|
143624
143624
|
hostSourceFile.version = sourceFile.version;
|
|
143625
143625
|
if (!hostSourceFile.fileWatcher) {
|
|
143626
|
-
hostSourceFile.fileWatcher = watchFilePath(
|
|
143626
|
+
hostSourceFile.fileWatcher = watchFilePath(path5, fileName, onSourceFileChange, 250, watchOptions, WatchType.SourceFile);
|
|
143627
143627
|
}
|
|
143628
143628
|
} else {
|
|
143629
143629
|
if (hostSourceFile.fileWatcher) {
|
|
143630
143630
|
hostSourceFile.fileWatcher.close();
|
|
143631
143631
|
}
|
|
143632
|
-
sourceFilesCache.set(
|
|
143632
|
+
sourceFilesCache.set(path5, false);
|
|
143633
143633
|
}
|
|
143634
143634
|
} else {
|
|
143635
143635
|
if (sourceFile) {
|
|
143636
|
-
const fileWatcher = watchFilePath(
|
|
143637
|
-
sourceFilesCache.set(
|
|
143636
|
+
const fileWatcher = watchFilePath(path5, fileName, onSourceFileChange, 250, watchOptions, WatchType.SourceFile);
|
|
143637
|
+
sourceFilesCache.set(path5, { sourceFile, version: sourceFile.version, fileWatcher });
|
|
143638
143638
|
} else {
|
|
143639
|
-
sourceFilesCache.set(
|
|
143639
|
+
sourceFilesCache.set(path5, false);
|
|
143640
143640
|
}
|
|
143641
143641
|
}
|
|
143642
143642
|
return sourceFile;
|
|
143643
143643
|
}
|
|
143644
143644
|
return hostSourceFile.sourceFile;
|
|
143645
143645
|
}
|
|
143646
|
-
function nextSourceFileVersion(
|
|
143647
|
-
const hostSourceFile = sourceFilesCache.get(
|
|
143646
|
+
function nextSourceFileVersion(path5) {
|
|
143647
|
+
const hostSourceFile = sourceFilesCache.get(path5);
|
|
143648
143648
|
if (hostSourceFile !== void 0) {
|
|
143649
143649
|
if (isFileMissingOnHost(hostSourceFile)) {
|
|
143650
|
-
sourceFilesCache.set(
|
|
143650
|
+
sourceFilesCache.set(path5, { version: false });
|
|
143651
143651
|
} else {
|
|
143652
143652
|
hostSourceFile.version = false;
|
|
143653
143653
|
}
|
|
143654
143654
|
}
|
|
143655
143655
|
}
|
|
143656
|
-
function getSourceVersion(
|
|
143657
|
-
const hostSourceFile = sourceFilesCache.get(
|
|
143656
|
+
function getSourceVersion(path5, readFileWithCache) {
|
|
143657
|
+
const hostSourceFile = sourceFilesCache.get(path5);
|
|
143658
143658
|
if (!hostSourceFile) return void 0;
|
|
143659
143659
|
if (hostSourceFile.version) return hostSourceFile.version;
|
|
143660
|
-
const text = readFileWithCache(
|
|
143660
|
+
const text = readFileWithCache(path5);
|
|
143661
143661
|
return text !== void 0 ? getSourceFileVersionAsHashFromText(compilerHost, text) : void 0;
|
|
143662
143662
|
}
|
|
143663
143663
|
function onReleaseOldSourceFile(oldSourceFile, _oldOptions, hasSourceFileByPath) {
|
|
@@ -143836,28 +143836,28 @@ ${lanes.join("\n")}
|
|
|
143836
143836
|
}
|
|
143837
143837
|
function onReleaseParsedCommandLine(fileName) {
|
|
143838
143838
|
var _a;
|
|
143839
|
-
const
|
|
143840
|
-
const config2 = parsedConfigs == null ? void 0 : parsedConfigs.get(
|
|
143839
|
+
const path5 = toPath3(fileName);
|
|
143840
|
+
const config2 = parsedConfigs == null ? void 0 : parsedConfigs.get(path5);
|
|
143841
143841
|
if (!config2) return;
|
|
143842
|
-
parsedConfigs.delete(
|
|
143842
|
+
parsedConfigs.delete(path5);
|
|
143843
143843
|
if (config2.watchedDirectories) clearMap(config2.watchedDirectories, closeFileWatcherOf);
|
|
143844
143844
|
(_a = config2.watcher) == null ? void 0 : _a.close();
|
|
143845
|
-
clearSharedExtendedConfigFileWatcher(
|
|
143845
|
+
clearSharedExtendedConfigFileWatcher(path5, sharedExtendedConfigFileWatchers);
|
|
143846
143846
|
}
|
|
143847
|
-
function watchFilePath(
|
|
143848
|
-
return watchFile2(file, (fileName, eventKind) => callback(fileName, eventKind,
|
|
143847
|
+
function watchFilePath(path5, file, callback, pollingInterval, options, watchType) {
|
|
143848
|
+
return watchFile2(file, (fileName, eventKind) => callback(fileName, eventKind, path5), pollingInterval, options, watchType);
|
|
143849
143849
|
}
|
|
143850
|
-
function onSourceFileChange(fileName, eventKind,
|
|
143851
|
-
updateCachedSystemWithFile(fileName,
|
|
143852
|
-
if (eventKind === 2 && sourceFilesCache.has(
|
|
143853
|
-
resolutionCache.invalidateResolutionOfFile(
|
|
143850
|
+
function onSourceFileChange(fileName, eventKind, path5) {
|
|
143851
|
+
updateCachedSystemWithFile(fileName, path5, eventKind);
|
|
143852
|
+
if (eventKind === 2 && sourceFilesCache.has(path5)) {
|
|
143853
|
+
resolutionCache.invalidateResolutionOfFile(path5);
|
|
143854
143854
|
}
|
|
143855
|
-
nextSourceFileVersion(
|
|
143855
|
+
nextSourceFileVersion(path5);
|
|
143856
143856
|
scheduleProgramUpdate();
|
|
143857
143857
|
}
|
|
143858
|
-
function updateCachedSystemWithFile(fileName,
|
|
143858
|
+
function updateCachedSystemWithFile(fileName, path5, eventKind) {
|
|
143859
143859
|
if (cachedDirectoryStructureHost) {
|
|
143860
|
-
cachedDirectoryStructureHost.addOrDeleteFile(fileName,
|
|
143860
|
+
cachedDirectoryStructureHost.addOrDeleteFile(fileName, path5, eventKind);
|
|
143861
143861
|
}
|
|
143862
143862
|
}
|
|
143863
143863
|
function watchMissingFilePath(missingFilePath, missingFileName) {
|
|
@@ -144078,9 +144078,9 @@ ${lanes.join("\n")}
|
|
|
144078
144078
|
}
|
|
144079
144079
|
function createSolutionBuilderHostBase(system, createProgram2, reportDiagnostic, reportSolutionBuilderStatus) {
|
|
144080
144080
|
const host = createProgramHost(system, createProgram2);
|
|
144081
|
-
host.getModifiedTime = system.getModifiedTime ? (
|
|
144082
|
-
host.setModifiedTime = system.setModifiedTime ? (
|
|
144083
|
-
host.deleteFile = system.deleteFile ? (
|
|
144081
|
+
host.getModifiedTime = system.getModifiedTime ? (path5) => system.getModifiedTime(path5) : returnUndefined;
|
|
144082
|
+
host.setModifiedTime = system.setModifiedTime ? (path5, date) => system.setModifiedTime(path5, date) : noop;
|
|
144083
|
+
host.deleteFile = system.deleteFile ? (path5) => system.deleteFile(path5) : noop;
|
|
144084
144084
|
host.reportDiagnostic = reportDiagnostic || createDiagnosticReporter(system);
|
|
144085
144085
|
host.reportSolutionBuilderStatus = reportSolutionBuilderStatus || createBuilderStatusReporter(system);
|
|
144086
144086
|
host.now = maybeBind(system, system.now);
|
|
@@ -144251,8 +144251,8 @@ ${lanes.join("\n")}
|
|
|
144251
144251
|
}
|
|
144252
144252
|
function toResolvedConfigFilePath(state, fileName) {
|
|
144253
144253
|
const { resolvedConfigFilePaths } = state;
|
|
144254
|
-
const
|
|
144255
|
-
if (
|
|
144254
|
+
const path5 = resolvedConfigFilePaths.get(fileName);
|
|
144255
|
+
if (path5 !== void 0) return path5;
|
|
144256
144256
|
const resolvedPath = toPath2(state, fileName);
|
|
144257
144257
|
resolvedConfigFilePaths.set(fileName, resolvedPath);
|
|
144258
144258
|
return resolvedPath;
|
|
@@ -144640,7 +144640,7 @@ ${lanes.join("\n")}
|
|
|
144640
144640
|
void 0,
|
|
144641
144641
|
(name, text, writeByteOrderMark, onError, sourceFiles, data) => {
|
|
144642
144642
|
var _a2;
|
|
144643
|
-
const
|
|
144643
|
+
const path5 = toPath2(state, name);
|
|
144644
144644
|
emittedOutputs.set(toPath2(state, name), name);
|
|
144645
144645
|
if (data == null ? void 0 : data.buildInfo) {
|
|
144646
144646
|
now || (now = getCurrentTime(state.host));
|
|
@@ -144670,7 +144670,7 @@ ${lanes.join("\n")}
|
|
|
144670
144670
|
);
|
|
144671
144671
|
if (data == null ? void 0 : data.differsOnlyInMap) state.host.setModifiedTime(name, modifiedTime);
|
|
144672
144672
|
else if (!isIncremental && state.watch) {
|
|
144673
|
-
(outputTimeStampMap || (outputTimeStampMap = getOutputTimeStampMap(state, projectPath))).set(
|
|
144673
|
+
(outputTimeStampMap || (outputTimeStampMap = getOutputTimeStampMap(state, projectPath))).set(path5, now || (now = getCurrentTime(state.host)));
|
|
144674
144674
|
}
|
|
144675
144675
|
},
|
|
144676
144676
|
cancellationToken,
|
|
@@ -144854,8 +144854,8 @@ ${lanes.join("\n")}
|
|
|
144854
144854
|
return !!value.watcher;
|
|
144855
144855
|
}
|
|
144856
144856
|
function getModifiedTime2(state, fileName) {
|
|
144857
|
-
const
|
|
144858
|
-
const existing = state.filesWatched.get(
|
|
144857
|
+
const path5 = toPath2(state, fileName);
|
|
144858
|
+
const existing = state.filesWatched.get(path5);
|
|
144859
144859
|
if (state.watch && !!existing) {
|
|
144860
144860
|
if (!isFileWatcherWithModifiedTime(existing)) return existing;
|
|
144861
144861
|
if (existing.modifiedTime) return existing.modifiedTime;
|
|
@@ -144863,20 +144863,20 @@ ${lanes.join("\n")}
|
|
|
144863
144863
|
const result = getModifiedTime(state.host, fileName);
|
|
144864
144864
|
if (state.watch) {
|
|
144865
144865
|
if (existing) existing.modifiedTime = result;
|
|
144866
|
-
else state.filesWatched.set(
|
|
144866
|
+
else state.filesWatched.set(path5, result);
|
|
144867
144867
|
}
|
|
144868
144868
|
return result;
|
|
144869
144869
|
}
|
|
144870
144870
|
function watchFile(state, file, callback, pollingInterval, options, watchType, project) {
|
|
144871
|
-
const
|
|
144872
|
-
const existing = state.filesWatched.get(
|
|
144871
|
+
const path5 = toPath2(state, file);
|
|
144872
|
+
const existing = state.filesWatched.get(path5);
|
|
144873
144873
|
if (existing && isFileWatcherWithModifiedTime(existing)) {
|
|
144874
144874
|
existing.callbacks.push(callback);
|
|
144875
144875
|
} else {
|
|
144876
144876
|
const watcher = state.watchFile(
|
|
144877
144877
|
file,
|
|
144878
144878
|
(fileName, eventKind, modifiedTime) => {
|
|
144879
|
-
const existing2 = Debug.checkDefined(state.filesWatched.get(
|
|
144879
|
+
const existing2 = Debug.checkDefined(state.filesWatched.get(path5));
|
|
144880
144880
|
Debug.assert(isFileWatcherWithModifiedTime(existing2));
|
|
144881
144881
|
existing2.modifiedTime = modifiedTime;
|
|
144882
144882
|
existing2.callbacks.forEach((cb) => cb(fileName, eventKind, modifiedTime));
|
|
@@ -144886,14 +144886,14 @@ ${lanes.join("\n")}
|
|
|
144886
144886
|
watchType,
|
|
144887
144887
|
project
|
|
144888
144888
|
);
|
|
144889
|
-
state.filesWatched.set(
|
|
144889
|
+
state.filesWatched.set(path5, { callbacks: [callback], watcher, modifiedTime: existing });
|
|
144890
144890
|
}
|
|
144891
144891
|
return {
|
|
144892
144892
|
close: () => {
|
|
144893
|
-
const existing2 = Debug.checkDefined(state.filesWatched.get(
|
|
144893
|
+
const existing2 = Debug.checkDefined(state.filesWatched.get(path5));
|
|
144894
144894
|
Debug.assert(isFileWatcherWithModifiedTime(existing2));
|
|
144895
144895
|
if (existing2.callbacks.length === 1) {
|
|
144896
|
-
state.filesWatched.delete(
|
|
144896
|
+
state.filesWatched.delete(path5);
|
|
144897
144897
|
closeFileWatcherOf(existing2);
|
|
144898
144898
|
} else {
|
|
144899
144899
|
unorderedRemoveItem(existing2.callbacks, callback);
|
|
@@ -144908,19 +144908,19 @@ ${lanes.join("\n")}
|
|
|
144908
144908
|
return result;
|
|
144909
144909
|
}
|
|
144910
144910
|
function getBuildInfoCacheEntry(state, buildInfoPath, resolvedConfigPath) {
|
|
144911
|
-
const
|
|
144911
|
+
const path5 = toPath2(state, buildInfoPath);
|
|
144912
144912
|
const existing = state.buildInfoCache.get(resolvedConfigPath);
|
|
144913
|
-
return (existing == null ? void 0 : existing.path) ===
|
|
144913
|
+
return (existing == null ? void 0 : existing.path) === path5 ? existing : void 0;
|
|
144914
144914
|
}
|
|
144915
144915
|
function getBuildInfo3(state, buildInfoPath, resolvedConfigPath, modifiedTime) {
|
|
144916
|
-
const
|
|
144916
|
+
const path5 = toPath2(state, buildInfoPath);
|
|
144917
144917
|
const existing = state.buildInfoCache.get(resolvedConfigPath);
|
|
144918
|
-
if (existing !== void 0 && existing.path ===
|
|
144918
|
+
if (existing !== void 0 && existing.path === path5) {
|
|
144919
144919
|
return existing.buildInfo || void 0;
|
|
144920
144920
|
}
|
|
144921
144921
|
const value = state.readFileWithCache(buildInfoPath);
|
|
144922
144922
|
const buildInfo = value ? getBuildInfo(buildInfoPath, value) : void 0;
|
|
144923
|
-
state.buildInfoCache.set(resolvedConfigPath, { path:
|
|
144923
|
+
state.buildInfoCache.set(resolvedConfigPath, { path: path5, buildInfo: buildInfo || false, modifiedTime: modifiedTime || missingFileModifiedTime });
|
|
144924
144924
|
return buildInfo;
|
|
144925
144925
|
}
|
|
144926
144926
|
function checkConfigFileUpToDateStatus(state, configFile, oldestOutputFileTime, oldestOutputFileName) {
|
|
@@ -144995,7 +144995,7 @@ ${lanes.join("\n")}
|
|
|
144995
144995
|
};
|
|
144996
144996
|
}
|
|
144997
144997
|
const incrementalBuildInfo = isIncremental && isIncrementalBuildInfo(buildInfo) ? buildInfo : void 0;
|
|
144998
|
-
if ((incrementalBuildInfo || !isIncremental) && buildInfo.version !==
|
|
144998
|
+
if ((incrementalBuildInfo || !isIncremental) && buildInfo.version !== version2) {
|
|
144999
144999
|
return {
|
|
145000
145000
|
type: 14,
|
|
145001
145001
|
version: buildInfo.version
|
|
@@ -145051,17 +145051,17 @@ ${lanes.join("\n")}
|
|
|
145051
145051
|
}
|
|
145052
145052
|
const inputPath = toPath2(state, inputFile);
|
|
145053
145053
|
if (buildInfoTime < inputTime) {
|
|
145054
|
-
let
|
|
145054
|
+
let version22;
|
|
145055
145055
|
let currentVersion;
|
|
145056
145056
|
if (incrementalBuildInfo) {
|
|
145057
145057
|
if (!buildInfoVersionMap) buildInfoVersionMap = getBuildInfoFileVersionMap(incrementalBuildInfo, buildInfoPath, host);
|
|
145058
145058
|
const resolvedInputPath = buildInfoVersionMap.roots.get(inputPath);
|
|
145059
|
-
|
|
145060
|
-
const text =
|
|
145059
|
+
version22 = buildInfoVersionMap.fileInfos.get(resolvedInputPath ?? inputPath);
|
|
145060
|
+
const text = version22 ? state.readFileWithCache(resolvedInputPath ?? inputFile) : void 0;
|
|
145061
145061
|
currentVersion = text !== void 0 ? getSourceFileVersionAsHashFromText(host, text) : void 0;
|
|
145062
|
-
if (
|
|
145062
|
+
if (version22 && version22 === currentVersion) pseudoInputUpToDate = true;
|
|
145063
145063
|
}
|
|
145064
|
-
if (!
|
|
145064
|
+
if (!version22 || version22 !== currentVersion) {
|
|
145065
145065
|
return {
|
|
145066
145066
|
type: 5,
|
|
145067
145067
|
outOfDateOutputFileName: buildInfoPath,
|
|
@@ -145101,11 +145101,11 @@ ${lanes.join("\n")}
|
|
|
145101
145101
|
const outputTimeStampMap = getOutputTimeStampMap(state, resolvedPath);
|
|
145102
145102
|
for (const output of outputs) {
|
|
145103
145103
|
if (output === buildInfoPath) continue;
|
|
145104
|
-
const
|
|
145105
|
-
let outputTime = outputTimeStampMap == null ? void 0 : outputTimeStampMap.get(
|
|
145104
|
+
const path5 = toPath2(state, output);
|
|
145105
|
+
let outputTime = outputTimeStampMap == null ? void 0 : outputTimeStampMap.get(path5);
|
|
145106
145106
|
if (!outputTime) {
|
|
145107
145107
|
outputTime = getModifiedTime(state.host, output);
|
|
145108
|
-
outputTimeStampMap == null ? void 0 : outputTimeStampMap.set(
|
|
145108
|
+
outputTimeStampMap == null ? void 0 : outputTimeStampMap.set(path5, outputTime);
|
|
145109
145109
|
}
|
|
145110
145110
|
if (outputTime === missingFileModifiedTime) {
|
|
145111
145111
|
return {
|
|
@@ -145159,7 +145159,7 @@ ${lanes.join("\n")}
|
|
|
145159
145159
|
const packageJsonLookups = state.lastCachedPackageJsonLookups.get(resolvedPath);
|
|
145160
145160
|
const dependentPackageFileStatus = packageJsonLookups && forEachKey(
|
|
145161
145161
|
packageJsonLookups,
|
|
145162
|
-
(
|
|
145162
|
+
(path5) => checkConfigFileUpToDateStatus(state, path5, oldestOutputFileTime, oldestOutputFileName)
|
|
145163
145163
|
);
|
|
145164
145164
|
if (dependentPackageFileStatus) return dependentPackageFileStatus;
|
|
145165
145165
|
return {
|
|
@@ -145209,8 +145209,8 @@ ${lanes.join("\n")}
|
|
|
145209
145209
|
if (!skipOutputs || outputs.length !== skipOutputs.size) {
|
|
145210
145210
|
let reportVerbose = !!state.options.verbose;
|
|
145211
145211
|
for (const file of outputs) {
|
|
145212
|
-
const
|
|
145213
|
-
if (skipOutputs == null ? void 0 : skipOutputs.has(
|
|
145212
|
+
const path5 = toPath2(state, file);
|
|
145213
|
+
if (skipOutputs == null ? void 0 : skipOutputs.has(path5)) continue;
|
|
145214
145214
|
if (reportVerbose) {
|
|
145215
145215
|
reportVerbose = false;
|
|
145216
145216
|
reportStatus(state, verboseMessage, proj.options.configFilePath);
|
|
@@ -145218,8 +145218,8 @@ ${lanes.join("\n")}
|
|
|
145218
145218
|
host.setModifiedTime(file, now || (now = getCurrentTime(state.host)));
|
|
145219
145219
|
if (file === buildInfoPath) getBuildInfoCacheEntry(state, buildInfoPath, projectPath).modifiedTime = now;
|
|
145220
145220
|
else if (outputTimeStampMap) {
|
|
145221
|
-
outputTimeStampMap.set(
|
|
145222
|
-
modifiedOutputs.add(
|
|
145221
|
+
outputTimeStampMap.set(path5, now);
|
|
145222
|
+
modifiedOutputs.add(path5);
|
|
145223
145223
|
}
|
|
145224
145224
|
}
|
|
145225
145225
|
}
|
|
@@ -145647,8 +145647,8 @@ ${lanes.join("\n")}
|
|
|
145647
145647
|
close: () => stopWatching(state)
|
|
145648
145648
|
};
|
|
145649
145649
|
}
|
|
145650
|
-
function relName(state,
|
|
145651
|
-
return convertToRelativePath(
|
|
145650
|
+
function relName(state, path5) {
|
|
145651
|
+
return convertToRelativePath(path5, state.compilerHost.getCurrentDirectory(), state.compilerHost.getCanonicalFileName);
|
|
145652
145652
|
}
|
|
145653
145653
|
function reportStatus(state, message, ...args) {
|
|
145654
145654
|
state.host.reportSolutionBuilderStatus(createCompilerDiagnostic(message, ...args));
|
|
@@ -145814,7 +145814,7 @@ ${lanes.join("\n")}
|
|
|
145814
145814
|
Diagnostics.Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2,
|
|
145815
145815
|
relName(state, configFileName),
|
|
145816
145816
|
status.version,
|
|
145817
|
-
|
|
145817
|
+
version2
|
|
145818
145818
|
);
|
|
145819
145819
|
case 17:
|
|
145820
145820
|
return reportStatus(
|
|
@@ -145867,13 +145867,13 @@ ${lanes.join("\n")}
|
|
|
145867
145867
|
} else if (file.isDeclarationFile) {
|
|
145868
145868
|
return "Definitions";
|
|
145869
145869
|
}
|
|
145870
|
-
const
|
|
145871
|
-
if (fileExtensionIsOneOf(
|
|
145870
|
+
const path5 = file.path;
|
|
145871
|
+
if (fileExtensionIsOneOf(path5, supportedTSExtensionsFlat)) {
|
|
145872
145872
|
return "TypeScript";
|
|
145873
|
-
} else if (fileExtensionIsOneOf(
|
|
145873
|
+
} else if (fileExtensionIsOneOf(path5, supportedJSExtensionsFlat)) {
|
|
145874
145874
|
return "JavaScript";
|
|
145875
145875
|
} else if (fileExtensionIs(
|
|
145876
|
-
|
|
145876
|
+
path5,
|
|
145877
145877
|
".json"
|
|
145878
145878
|
/* Json */
|
|
145879
145879
|
)) {
|
|
@@ -145902,7 +145902,7 @@ ${lanes.join("\n")}
|
|
|
145902
145902
|
return !!commandLine.options.all ? toSorted(optionDeclarations.concat(tscBuildOption), (a, b) => compareStringsCaseInsensitive(a.name, b.name)) : filter(optionDeclarations.concat(tscBuildOption), (v) => !!v.showInSimplifiedHelpView);
|
|
145903
145903
|
}
|
|
145904
145904
|
function printVersion(sys2) {
|
|
145905
|
-
sys2.write(getDiagnosticText(Diagnostics.Version_0,
|
|
145905
|
+
sys2.write(getDiagnosticText(Diagnostics.Version_0, version2) + sys2.newLine);
|
|
145906
145906
|
}
|
|
145907
145907
|
function createColors(sys2) {
|
|
145908
145908
|
const showColors = defaultIsPretty(sys2);
|
|
@@ -146154,7 +146154,7 @@ ${lanes.join("\n")}
|
|
|
146154
146154
|
}
|
|
146155
146155
|
function printEasyHelp(sys2, simpleOptions) {
|
|
146156
146156
|
const colors = createColors(sys2);
|
|
146157
|
-
let output = [...getHeader(sys2, `${getDiagnosticText(Diagnostics.tsc_Colon_The_TypeScript_Compiler)} - ${getDiagnosticText(Diagnostics.Version_0,
|
|
146157
|
+
let output = [...getHeader(sys2, `${getDiagnosticText(Diagnostics.tsc_Colon_The_TypeScript_Compiler)} - ${getDiagnosticText(Diagnostics.Version_0, version2)}`)];
|
|
146158
146158
|
output.push(colors.bold(getDiagnosticText(Diagnostics.COMMON_COMMANDS)) + sys2.newLine + sys2.newLine);
|
|
146159
146159
|
example("tsc", Diagnostics.Compiles_the_current_project_tsconfig_json_in_the_working_directory);
|
|
146160
146160
|
example("tsc app.ts util.ts", Diagnostics.Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options);
|
|
@@ -146201,7 +146201,7 @@ ${lanes.join("\n")}
|
|
|
146201
146201
|
}
|
|
146202
146202
|
}
|
|
146203
146203
|
function printAllHelp(sys2, compilerOptions, buildOptions, watchOptions) {
|
|
146204
|
-
let output = [...getHeader(sys2, `${getDiagnosticText(Diagnostics.tsc_Colon_The_TypeScript_Compiler)} - ${getDiagnosticText(Diagnostics.Version_0,
|
|
146204
|
+
let output = [...getHeader(sys2, `${getDiagnosticText(Diagnostics.tsc_Colon_The_TypeScript_Compiler)} - ${getDiagnosticText(Diagnostics.Version_0, version2)}`)];
|
|
146205
146205
|
output = [...output, ...generateSectionOptionsOutput(
|
|
146206
146206
|
sys2,
|
|
146207
146207
|
getDiagnosticText(Diagnostics.ALL_COMPILER_OPTIONS),
|
|
@@ -146233,7 +146233,7 @@ ${lanes.join("\n")}
|
|
|
146233
146233
|
}
|
|
146234
146234
|
}
|
|
146235
146235
|
function printBuildHelp(sys2, buildOptions) {
|
|
146236
|
-
let output = [...getHeader(sys2, `${getDiagnosticText(Diagnostics.tsc_Colon_The_TypeScript_Compiler)} - ${getDiagnosticText(Diagnostics.Version_0,
|
|
146236
|
+
let output = [...getHeader(sys2, `${getDiagnosticText(Diagnostics.tsc_Colon_The_TypeScript_Compiler)} - ${getDiagnosticText(Diagnostics.Version_0, version2)}`)];
|
|
146237
146237
|
output = [...output, ...generateSectionOptionsOutput(
|
|
146238
146238
|
sys2,
|
|
146239
146239
|
getDiagnosticText(Diagnostics.BUILD_OPTIONS),
|
|
@@ -146485,7 +146485,7 @@ ${lanes.join("\n")}
|
|
|
146485
146485
|
);
|
|
146486
146486
|
}
|
|
146487
146487
|
}
|
|
146488
|
-
const commandLine = parseCommandLine(commandLineArgs, (
|
|
146488
|
+
const commandLine = parseCommandLine(commandLineArgs, (path5) => system.readFile(path5));
|
|
146489
146489
|
if (commandLine.options.generateCpuProfile && system.enableCPUProfiler) {
|
|
146490
146490
|
system.enableCPUProfiler(commandLine.options.generateCpuProfile, () => executeCommandLineWorker(
|
|
146491
146491
|
system,
|
|
@@ -148361,12 +148361,12 @@ ${lanes.join("\n")}
|
|
|
148361
148361
|
return nodeCoreModules.has(moduleName) ? "node" : moduleName;
|
|
148362
148362
|
}
|
|
148363
148363
|
function loadSafeList(host, safeListPath) {
|
|
148364
|
-
const result = readConfigFile(safeListPath, (
|
|
148364
|
+
const result = readConfigFile(safeListPath, (path5) => host.readFile(path5));
|
|
148365
148365
|
return new Map(Object.entries(result.config));
|
|
148366
148366
|
}
|
|
148367
148367
|
function loadTypesMap(host, typesMapPath) {
|
|
148368
148368
|
var _a;
|
|
148369
|
-
const result = readConfigFile(typesMapPath, (
|
|
148369
|
+
const result = readConfigFile(typesMapPath, (path5) => host.readFile(path5));
|
|
148370
148370
|
if ((_a = result.config) == null ? void 0 : _a.simpleMap) {
|
|
148371
148371
|
return new Map(Object.entries(result.config.simpleMap));
|
|
148372
148372
|
}
|
|
@@ -148378,9 +148378,9 @@ ${lanes.join("\n")}
|
|
|
148378
148378
|
}
|
|
148379
148379
|
const inferredTypings = /* @__PURE__ */ new Map();
|
|
148380
148380
|
fileNames = mapDefined(fileNames, (fileName) => {
|
|
148381
|
-
const
|
|
148382
|
-
if (hasJSFileExtension(
|
|
148383
|
-
return
|
|
148381
|
+
const path5 = normalizePath(fileName);
|
|
148382
|
+
if (hasJSFileExtension(path5)) {
|
|
148383
|
+
return path5;
|
|
148384
148384
|
}
|
|
148385
148385
|
});
|
|
148386
148386
|
const filesToWatch = [];
|
|
@@ -148442,7 +148442,7 @@ ${lanes.join("\n")}
|
|
|
148442
148442
|
let manifestTypingNames;
|
|
148443
148443
|
if (host.fileExists(manifestPath)) {
|
|
148444
148444
|
filesToWatch2.push(manifestPath);
|
|
148445
|
-
manifest = readConfigFile(manifestPath, (
|
|
148445
|
+
manifest = readConfigFile(manifestPath, (path5) => host.readFile(path5)).config;
|
|
148446
148446
|
manifestTypingNames = flatMap([manifest.dependencies, manifest.devDependencies, manifest.optionalDependencies, manifest.peerDependencies], getOwnKeys);
|
|
148447
148447
|
addInferredTypings(manifestTypingNames, `Typing names in '${manifestPath}' dependencies`);
|
|
148448
148448
|
}
|
|
@@ -148476,7 +148476,7 @@ ${lanes.join("\n")}
|
|
|
148476
148476
|
if (log) log(`Searching for typing names in ${packagesFolderPath}; all files: ${JSON.stringify(dependencyManifestNames)}`);
|
|
148477
148477
|
for (const manifestPath2 of dependencyManifestNames) {
|
|
148478
148478
|
const normalizedFileName = normalizePath(manifestPath2);
|
|
148479
|
-
const result2 = readConfigFile(normalizedFileName, (
|
|
148479
|
+
const result2 = readConfigFile(normalizedFileName, (path5) => host.readFile(path5));
|
|
148480
148480
|
const manifest2 = result2.config;
|
|
148481
148481
|
if (!manifest2.name) {
|
|
148482
148482
|
continue;
|
|
@@ -151256,14 +151256,14 @@ ${lanes.join("\n")}
|
|
|
151256
151256
|
function tryGetDirectories(host, directoryName) {
|
|
151257
151257
|
return tryIOAndConsumeErrors(host, host.getDirectories, directoryName) || [];
|
|
151258
151258
|
}
|
|
151259
|
-
function tryReadDirectory(host,
|
|
151260
|
-
return tryIOAndConsumeErrors(host, host.readDirectory,
|
|
151259
|
+
function tryReadDirectory(host, path5, extensions, exclude, include) {
|
|
151260
|
+
return tryIOAndConsumeErrors(host, host.readDirectory, path5, extensions, exclude, include) || emptyArray;
|
|
151261
151261
|
}
|
|
151262
|
-
function tryFileExists(host,
|
|
151263
|
-
return tryIOAndConsumeErrors(host, host.fileExists,
|
|
151262
|
+
function tryFileExists(host, path5) {
|
|
151263
|
+
return tryIOAndConsumeErrors(host, host.fileExists, path5);
|
|
151264
151264
|
}
|
|
151265
|
-
function tryDirectoryExists(host,
|
|
151266
|
-
return tryAndIgnoreErrors(() => directoryProbablyExists(
|
|
151265
|
+
function tryDirectoryExists(host, path5) {
|
|
151266
|
+
return tryAndIgnoreErrors(() => directoryProbablyExists(path5, host)) || false;
|
|
151267
151267
|
}
|
|
151268
151268
|
function tryAndIgnoreErrors(cb) {
|
|
151269
151269
|
try {
|
|
@@ -152105,13 +152105,13 @@ ${lanes.join("\n")}
|
|
|
152105
152105
|
function getIsExcluded(excludePatterns, host) {
|
|
152106
152106
|
var _a;
|
|
152107
152107
|
const realpathsWithSymlinks = (_a = host.getSymlinkCache) == null ? void 0 : _a.call(host).getSymlinkedDirectoriesByRealpath();
|
|
152108
|
-
return ({ fileName, path:
|
|
152108
|
+
return ({ fileName, path: path5 }) => {
|
|
152109
152109
|
if (excludePatterns.some((p) => p.test(fileName))) return true;
|
|
152110
152110
|
if ((realpathsWithSymlinks == null ? void 0 : realpathsWithSymlinks.size) && pathContainsNodeModules(fileName)) {
|
|
152111
152111
|
let dir = getDirectoryPath(fileName);
|
|
152112
152112
|
return forEachAncestorDirectoryStoppingAtGlobalCache(
|
|
152113
152113
|
host,
|
|
152114
|
-
getDirectoryPath(
|
|
152114
|
+
getDirectoryPath(path5),
|
|
152115
152115
|
(dirPath) => {
|
|
152116
152116
|
const symlinks = realpathsWithSymlinks.get(ensureTrailingDirectorySeparator(dirPath));
|
|
152117
152117
|
if (symlinks) {
|
|
@@ -153766,38 +153766,38 @@ ${lanes.join("\n")}
|
|
|
153766
153766
|
}
|
|
153767
153767
|
return settingsOrHost;
|
|
153768
153768
|
}
|
|
153769
|
-
function acquireDocument(fileName, compilationSettings, scriptSnapshot,
|
|
153770
|
-
const
|
|
153769
|
+
function acquireDocument(fileName, compilationSettings, scriptSnapshot, version22, scriptKind, languageVersionOrOptions) {
|
|
153770
|
+
const path5 = toPath(fileName, currentDirectory, getCanonicalFileName);
|
|
153771
153771
|
const key = getKeyForCompilationSettings(getCompilationSettings(compilationSettings));
|
|
153772
|
-
return acquireDocumentWithKey(fileName,
|
|
153772
|
+
return acquireDocumentWithKey(fileName, path5, compilationSettings, key, scriptSnapshot, version22, scriptKind, languageVersionOrOptions);
|
|
153773
153773
|
}
|
|
153774
|
-
function acquireDocumentWithKey(fileName,
|
|
153774
|
+
function acquireDocumentWithKey(fileName, path5, compilationSettings, key, scriptSnapshot, version22, scriptKind, languageVersionOrOptions) {
|
|
153775
153775
|
return acquireOrUpdateDocument(
|
|
153776
153776
|
fileName,
|
|
153777
|
-
|
|
153777
|
+
path5,
|
|
153778
153778
|
compilationSettings,
|
|
153779
153779
|
key,
|
|
153780
153780
|
scriptSnapshot,
|
|
153781
|
-
|
|
153781
|
+
version22,
|
|
153782
153782
|
/*acquiring*/
|
|
153783
153783
|
true,
|
|
153784
153784
|
scriptKind,
|
|
153785
153785
|
languageVersionOrOptions
|
|
153786
153786
|
);
|
|
153787
153787
|
}
|
|
153788
|
-
function updateDocument(fileName, compilationSettings, scriptSnapshot,
|
|
153789
|
-
const
|
|
153788
|
+
function updateDocument(fileName, compilationSettings, scriptSnapshot, version22, scriptKind, languageVersionOrOptions) {
|
|
153789
|
+
const path5 = toPath(fileName, currentDirectory, getCanonicalFileName);
|
|
153790
153790
|
const key = getKeyForCompilationSettings(getCompilationSettings(compilationSettings));
|
|
153791
|
-
return updateDocumentWithKey(fileName,
|
|
153791
|
+
return updateDocumentWithKey(fileName, path5, compilationSettings, key, scriptSnapshot, version22, scriptKind, languageVersionOrOptions);
|
|
153792
153792
|
}
|
|
153793
|
-
function updateDocumentWithKey(fileName,
|
|
153793
|
+
function updateDocumentWithKey(fileName, path5, compilationSettings, key, scriptSnapshot, version22, scriptKind, languageVersionOrOptions) {
|
|
153794
153794
|
return acquireOrUpdateDocument(
|
|
153795
153795
|
fileName,
|
|
153796
|
-
|
|
153796
|
+
path5,
|
|
153797
153797
|
getCompilationSettings(compilationSettings),
|
|
153798
153798
|
key,
|
|
153799
153799
|
scriptSnapshot,
|
|
153800
|
-
|
|
153800
|
+
version22,
|
|
153801
153801
|
/*acquiring*/
|
|
153802
153802
|
false,
|
|
153803
153803
|
scriptKind,
|
|
@@ -153809,7 +153809,7 @@ ${lanes.join("\n")}
|
|
|
153809
153809
|
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}`);
|
|
153810
153810
|
return entry;
|
|
153811
153811
|
}
|
|
153812
|
-
function acquireOrUpdateDocument(fileName,
|
|
153812
|
+
function acquireOrUpdateDocument(fileName, path5, compilationSettingsOrHost, key, scriptSnapshot, version22, acquiring, scriptKind, languageVersionOrOptions) {
|
|
153813
153813
|
var _a, _b, _c, _d;
|
|
153814
153814
|
scriptKind = ensureScriptKind(fileName, scriptKind);
|
|
153815
153815
|
const compilationSettings = getCompilationSettings(compilationSettingsOrHost);
|
|
@@ -153817,7 +153817,7 @@ ${lanes.join("\n")}
|
|
|
153817
153817
|
const scriptTarget = scriptKind === 6 ? 100 : getEmitScriptTarget(compilationSettings);
|
|
153818
153818
|
const sourceFileOptions = typeof languageVersionOrOptions === "object" ? languageVersionOrOptions : {
|
|
153819
153819
|
languageVersion: scriptTarget,
|
|
153820
|
-
impliedNodeFormat: host && getImpliedNodeFormatForFile(
|
|
153820
|
+
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),
|
|
153821
153821
|
setExternalModuleIndicator: getSetExternalModuleIndicator(compilationSettings),
|
|
153822
153822
|
jsDocParsingMode
|
|
153823
153823
|
};
|
|
@@ -153830,15 +153830,15 @@ ${lanes.join("\n")}
|
|
|
153830
153830
|
if (buckets.size > oldBucketCount) {
|
|
153831
153831
|
tracing.instant(tracing.Phase.Session, "createdDocumentRegistryBucket", { configFilePath: compilationSettings.configFilePath, key: keyWithMode });
|
|
153832
153832
|
}
|
|
153833
|
-
const otherBucketKey = !isDeclarationFileName(
|
|
153833
|
+
const otherBucketKey = !isDeclarationFileName(path5) && forEachEntry(buckets, (bucket2, bucketKey) => bucketKey !== keyWithMode && bucket2.has(path5) && bucketKey);
|
|
153834
153834
|
if (otherBucketKey) {
|
|
153835
|
-
tracing.instant(tracing.Phase.Session, "documentRegistryBucketOverlap", { path:
|
|
153835
|
+
tracing.instant(tracing.Phase.Session, "documentRegistryBucketOverlap", { path: path5, key1: otherBucketKey, key2: keyWithMode });
|
|
153836
153836
|
}
|
|
153837
153837
|
}
|
|
153838
|
-
const bucketEntry = bucket.get(
|
|
153838
|
+
const bucketEntry = bucket.get(path5);
|
|
153839
153839
|
let entry = bucketEntry && getDocumentRegistryEntry(bucketEntry, scriptKind);
|
|
153840
153840
|
if (!entry && externalCache) {
|
|
153841
|
-
const sourceFile = externalCache.getDocument(keyWithMode,
|
|
153841
|
+
const sourceFile = externalCache.getDocument(keyWithMode, path5);
|
|
153842
153842
|
if (sourceFile && sourceFile.scriptKind === scriptKind && sourceFile.text === getSnapshotText(scriptSnapshot)) {
|
|
153843
153843
|
Debug.assert(acquiring);
|
|
153844
153844
|
entry = {
|
|
@@ -153853,13 +153853,13 @@ ${lanes.join("\n")}
|
|
|
153853
153853
|
fileName,
|
|
153854
153854
|
scriptSnapshot,
|
|
153855
153855
|
sourceFileOptions,
|
|
153856
|
-
|
|
153856
|
+
version22,
|
|
153857
153857
|
/*setNodeParents*/
|
|
153858
153858
|
false,
|
|
153859
153859
|
scriptKind
|
|
153860
153860
|
);
|
|
153861
153861
|
if (externalCache) {
|
|
153862
|
-
externalCache.setDocument(keyWithMode,
|
|
153862
|
+
externalCache.setDocument(keyWithMode, path5, sourceFile);
|
|
153863
153863
|
}
|
|
153864
153864
|
entry = {
|
|
153865
153865
|
sourceFile,
|
|
@@ -153867,10 +153867,10 @@ ${lanes.join("\n")}
|
|
|
153867
153867
|
};
|
|
153868
153868
|
setBucketEntry();
|
|
153869
153869
|
} else {
|
|
153870
|
-
if (entry.sourceFile.version !==
|
|
153871
|
-
entry.sourceFile = updateLanguageServiceSourceFile(entry.sourceFile, scriptSnapshot,
|
|
153870
|
+
if (entry.sourceFile.version !== version22) {
|
|
153871
|
+
entry.sourceFile = updateLanguageServiceSourceFile(entry.sourceFile, scriptSnapshot, version22, scriptSnapshot.getChangeRange(entry.sourceFile.scriptSnapshot));
|
|
153872
153872
|
if (externalCache) {
|
|
153873
|
-
externalCache.setDocument(keyWithMode,
|
|
153873
|
+
externalCache.setDocument(keyWithMode, path5, entry.sourceFile);
|
|
153874
153874
|
}
|
|
153875
153875
|
}
|
|
153876
153876
|
if (acquiring) {
|
|
@@ -153881,35 +153881,35 @@ ${lanes.join("\n")}
|
|
|
153881
153881
|
return entry.sourceFile;
|
|
153882
153882
|
function setBucketEntry() {
|
|
153883
153883
|
if (!bucketEntry) {
|
|
153884
|
-
bucket.set(
|
|
153884
|
+
bucket.set(path5, entry);
|
|
153885
153885
|
} else if (isDocumentRegistryEntry(bucketEntry)) {
|
|
153886
153886
|
const scriptKindMap = /* @__PURE__ */ new Map();
|
|
153887
153887
|
scriptKindMap.set(bucketEntry.sourceFile.scriptKind, bucketEntry);
|
|
153888
153888
|
scriptKindMap.set(scriptKind, entry);
|
|
153889
|
-
bucket.set(
|
|
153889
|
+
bucket.set(path5, scriptKindMap);
|
|
153890
153890
|
} else {
|
|
153891
153891
|
bucketEntry.set(scriptKind, entry);
|
|
153892
153892
|
}
|
|
153893
153893
|
}
|
|
153894
153894
|
}
|
|
153895
153895
|
function releaseDocument(fileName, compilationSettings, scriptKind, impliedNodeFormat) {
|
|
153896
|
-
const
|
|
153896
|
+
const path5 = toPath(fileName, currentDirectory, getCanonicalFileName);
|
|
153897
153897
|
const key = getKeyForCompilationSettings(compilationSettings);
|
|
153898
|
-
return releaseDocumentWithKey(
|
|
153898
|
+
return releaseDocumentWithKey(path5, key, scriptKind, impliedNodeFormat);
|
|
153899
153899
|
}
|
|
153900
|
-
function releaseDocumentWithKey(
|
|
153900
|
+
function releaseDocumentWithKey(path5, key, scriptKind, impliedNodeFormat) {
|
|
153901
153901
|
const bucket = Debug.checkDefined(buckets.get(getDocumentRegistryBucketKeyWithMode(key, impliedNodeFormat)));
|
|
153902
|
-
const bucketEntry = bucket.get(
|
|
153902
|
+
const bucketEntry = bucket.get(path5);
|
|
153903
153903
|
const entry = getDocumentRegistryEntry(bucketEntry, scriptKind);
|
|
153904
153904
|
entry.languageServiceRefCount--;
|
|
153905
153905
|
Debug.assert(entry.languageServiceRefCount >= 0);
|
|
153906
153906
|
if (entry.languageServiceRefCount === 0) {
|
|
153907
153907
|
if (isDocumentRegistryEntry(bucketEntry)) {
|
|
153908
|
-
bucket.delete(
|
|
153908
|
+
bucket.delete(path5);
|
|
153909
153909
|
} else {
|
|
153910
153910
|
bucketEntry.delete(scriptKind);
|
|
153911
153911
|
if (bucketEntry.size === 1) {
|
|
153912
|
-
bucket.set(
|
|
153912
|
+
bucket.set(path5, firstDefinedIterator(bucketEntry.values(), identity));
|
|
153913
153913
|
}
|
|
153914
153914
|
}
|
|
153915
153915
|
}
|
|
@@ -153945,10 +153945,10 @@ ${lanes.join("\n")}
|
|
|
153945
153945
|
}
|
|
153946
153946
|
function getPathUpdater(oldFileOrDirPath, newFileOrDirPath, getCanonicalFileName, sourceMapper) {
|
|
153947
153947
|
const canonicalOldPath = getCanonicalFileName(oldFileOrDirPath);
|
|
153948
|
-
return (
|
|
153949
|
-
const originalPath = sourceMapper && sourceMapper.tryGetSourcePosition({ fileName:
|
|
153950
|
-
const updatedPath = getUpdatedPath(originalPath ? originalPath.fileName :
|
|
153951
|
-
return originalPath ? updatedPath === void 0 ? void 0 : makeCorrespondingRelativeChange(originalPath.fileName, updatedPath,
|
|
153948
|
+
return (path5) => {
|
|
153949
|
+
const originalPath = sourceMapper && sourceMapper.tryGetSourcePosition({ fileName: path5, pos: 0 });
|
|
153950
|
+
const updatedPath = getUpdatedPath(originalPath ? originalPath.fileName : path5);
|
|
153951
|
+
return originalPath ? updatedPath === void 0 ? void 0 : makeCorrespondingRelativeChange(originalPath.fileName, updatedPath, path5, getCanonicalFileName) : updatedPath;
|
|
153952
153952
|
};
|
|
153953
153953
|
function getUpdatedPath(pathToUpdate) {
|
|
153954
153954
|
if (getCanonicalFileName(pathToUpdate) === canonicalOldPath) return newFileOrDirPath;
|
|
@@ -154024,10 +154024,10 @@ ${lanes.join("\n")}
|
|
|
154024
154024
|
}
|
|
154025
154025
|
return false;
|
|
154026
154026
|
}
|
|
154027
|
-
function relativePath(
|
|
154027
|
+
function relativePath(path5) {
|
|
154028
154028
|
return getRelativePathFromDirectory(
|
|
154029
154029
|
configDir,
|
|
154030
|
-
|
|
154030
|
+
path5,
|
|
154031
154031
|
/*ignoreCase*/
|
|
154032
154032
|
!useCaseSensitiveFileNames2
|
|
154033
154033
|
);
|
|
@@ -154835,8 +154835,8 @@ ${lanes.join("\n")}
|
|
|
154835
154835
|
return toPath(fileName, currentDirectory, getCanonicalFileName);
|
|
154836
154836
|
}
|
|
154837
154837
|
function getDocumentPositionMapper2(generatedFileName, sourceFileName) {
|
|
154838
|
-
const
|
|
154839
|
-
const value = documentPositionMappers.get(
|
|
154838
|
+
const path5 = toPath3(generatedFileName);
|
|
154839
|
+
const value = documentPositionMappers.get(path5);
|
|
154840
154840
|
if (value) return value;
|
|
154841
154841
|
let mapper;
|
|
154842
154842
|
if (host.getDocumentPositionMapper) {
|
|
@@ -154850,7 +154850,7 @@ ${lanes.join("\n")}
|
|
|
154850
154850
|
(f) => !host.fileExists || host.fileExists(f) ? host.readFile(f) : void 0
|
|
154851
154851
|
);
|
|
154852
154852
|
}
|
|
154853
|
-
documentPositionMappers.set(
|
|
154853
|
+
documentPositionMappers.set(path5, mapper || identitySourceMapConsumer);
|
|
154854
154854
|
return mapper || identitySourceMapConsumer;
|
|
154855
154855
|
}
|
|
154856
154856
|
function tryGetSourcePosition(info) {
|
|
@@ -154878,21 +154878,21 @@ ${lanes.join("\n")}
|
|
|
154878
154878
|
function getSourceFile(fileName) {
|
|
154879
154879
|
const program2 = host.getProgram();
|
|
154880
154880
|
if (!program2) return void 0;
|
|
154881
|
-
const
|
|
154882
|
-
const file = program2.getSourceFileByPath(
|
|
154883
|
-
return file && file.resolvedPath ===
|
|
154881
|
+
const path5 = toPath3(fileName);
|
|
154882
|
+
const file = program2.getSourceFileByPath(path5);
|
|
154883
|
+
return file && file.resolvedPath === path5 ? file : void 0;
|
|
154884
154884
|
}
|
|
154885
154885
|
function getOrCreateSourceFileLike(fileName) {
|
|
154886
|
-
const
|
|
154887
|
-
const fileFromCache = sourceFileLike.get(
|
|
154886
|
+
const path5 = toPath3(fileName);
|
|
154887
|
+
const fileFromCache = sourceFileLike.get(path5);
|
|
154888
154888
|
if (fileFromCache !== void 0) return fileFromCache ? fileFromCache : void 0;
|
|
154889
154889
|
if (!host.readFile || host.fileExists && !host.fileExists(fileName)) {
|
|
154890
|
-
sourceFileLike.set(
|
|
154890
|
+
sourceFileLike.set(path5, false);
|
|
154891
154891
|
return void 0;
|
|
154892
154892
|
}
|
|
154893
154893
|
const text = host.readFile(fileName);
|
|
154894
154894
|
const file = text ? createSourceFileLike(text) : false;
|
|
154895
|
-
sourceFileLike.set(
|
|
154895
|
+
sourceFileLike.set(path5, file);
|
|
154896
154896
|
return file ? file : void 0;
|
|
154897
154897
|
}
|
|
154898
154898
|
function getSourceFileLike(fileName) {
|
|
@@ -162719,7 +162719,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
162719
162719
|
throw new Error("Could not find file: '" + fileName + "'.");
|
|
162720
162720
|
}
|
|
162721
162721
|
const scriptKind = getScriptKind(fileName, this.host);
|
|
162722
|
-
const
|
|
162722
|
+
const version22 = this.host.getScriptVersion(fileName);
|
|
162723
162723
|
let sourceFile;
|
|
162724
162724
|
if (this.currentFileName !== fileName) {
|
|
162725
162725
|
const options = {
|
|
@@ -162739,17 +162739,17 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
162739
162739
|
fileName,
|
|
162740
162740
|
scriptSnapshot,
|
|
162741
162741
|
options,
|
|
162742
|
-
|
|
162742
|
+
version22,
|
|
162743
162743
|
/*setNodeParents*/
|
|
162744
162744
|
true,
|
|
162745
162745
|
scriptKind
|
|
162746
162746
|
);
|
|
162747
|
-
} else if (this.currentFileVersion !==
|
|
162747
|
+
} else if (this.currentFileVersion !== version22) {
|
|
162748
162748
|
const editRange = scriptSnapshot.getChangeRange(this.currentFileScriptSnapshot);
|
|
162749
|
-
sourceFile = updateLanguageServiceSourceFile(this.currentSourceFile, scriptSnapshot,
|
|
162749
|
+
sourceFile = updateLanguageServiceSourceFile(this.currentSourceFile, scriptSnapshot, version22, editRange);
|
|
162750
162750
|
}
|
|
162751
162751
|
if (sourceFile) {
|
|
162752
|
-
this.currentFileVersion =
|
|
162752
|
+
this.currentFileVersion = version22;
|
|
162753
162753
|
this.currentFileName = fileName;
|
|
162754
162754
|
this.currentFileScriptSnapshot = scriptSnapshot;
|
|
162755
162755
|
this.currentSourceFile = sourceFile;
|
|
@@ -162757,18 +162757,18 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
162757
162757
|
return this.currentSourceFile;
|
|
162758
162758
|
}
|
|
162759
162759
|
};
|
|
162760
|
-
function setSourceFileFields(sourceFile, scriptSnapshot,
|
|
162761
|
-
sourceFile.version =
|
|
162760
|
+
function setSourceFileFields(sourceFile, scriptSnapshot, version22) {
|
|
162761
|
+
sourceFile.version = version22;
|
|
162762
162762
|
sourceFile.scriptSnapshot = scriptSnapshot;
|
|
162763
162763
|
}
|
|
162764
|
-
function createLanguageServiceSourceFile(fileName, scriptSnapshot, scriptTargetOrOptions,
|
|
162764
|
+
function createLanguageServiceSourceFile(fileName, scriptSnapshot, scriptTargetOrOptions, version22, setNodeParents, scriptKind) {
|
|
162765
162765
|
const sourceFile = createSourceFile(fileName, getSnapshotText(scriptSnapshot), scriptTargetOrOptions, setNodeParents, scriptKind);
|
|
162766
|
-
setSourceFileFields(sourceFile, scriptSnapshot,
|
|
162766
|
+
setSourceFileFields(sourceFile, scriptSnapshot, version22);
|
|
162767
162767
|
return sourceFile;
|
|
162768
162768
|
}
|
|
162769
|
-
function updateLanguageServiceSourceFile(sourceFile, scriptSnapshot,
|
|
162769
|
+
function updateLanguageServiceSourceFile(sourceFile, scriptSnapshot, version22, textChangeRange, aggressiveChecks) {
|
|
162770
162770
|
if (textChangeRange) {
|
|
162771
|
-
if (
|
|
162771
|
+
if (version22 !== sourceFile.version) {
|
|
162772
162772
|
let newText;
|
|
162773
162773
|
const prefix = textChangeRange.span.start !== 0 ? sourceFile.text.substr(0, textChangeRange.span.start) : "";
|
|
162774
162774
|
const suffix = textSpanEnd(textChangeRange.span) !== sourceFile.text.length ? sourceFile.text.substr(textSpanEnd(textChangeRange.span)) : "";
|
|
@@ -162779,7 +162779,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
162779
162779
|
newText = prefix && suffix ? prefix + changedText + suffix : prefix ? prefix + changedText : changedText + suffix;
|
|
162780
162780
|
}
|
|
162781
162781
|
const newSourceFile = updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks);
|
|
162782
|
-
setSourceFileFields(newSourceFile, scriptSnapshot,
|
|
162782
|
+
setSourceFileFields(newSourceFile, scriptSnapshot, version22);
|
|
162783
162783
|
newSourceFile.nameTable = void 0;
|
|
162784
162784
|
if (sourceFile !== newSourceFile && sourceFile.scriptSnapshot) {
|
|
162785
162785
|
if (sourceFile.scriptSnapshot.dispose) {
|
|
@@ -162800,7 +162800,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
162800
162800
|
sourceFile.fileName,
|
|
162801
162801
|
scriptSnapshot,
|
|
162802
162802
|
options,
|
|
162803
|
-
|
|
162803
|
+
version22,
|
|
162804
162804
|
/*setNodeParents*/
|
|
162805
162805
|
true,
|
|
162806
162806
|
sourceFile.scriptKind
|
|
@@ -162984,12 +162984,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
162984
162984
|
directoryExists: (directoryName) => {
|
|
162985
162985
|
return directoryProbablyExists(directoryName, host);
|
|
162986
162986
|
},
|
|
162987
|
-
getDirectories: (
|
|
162988
|
-
return host.getDirectories ? host.getDirectories(
|
|
162987
|
+
getDirectories: (path5) => {
|
|
162988
|
+
return host.getDirectories ? host.getDirectories(path5) : [];
|
|
162989
162989
|
},
|
|
162990
|
-
readDirectory: (
|
|
162990
|
+
readDirectory: (path5, extensions, exclude, include, depth) => {
|
|
162991
162991
|
Debug.checkDefined(host.readDirectory, "'LanguageServiceHost.readDirectory' must be implemented to correctly process 'projectReferences'");
|
|
162992
|
-
return host.readDirectory(
|
|
162992
|
+
return host.readDirectory(path5, extensions, exclude, include, depth);
|
|
162993
162993
|
},
|
|
162994
162994
|
onReleaseOldSourceFile,
|
|
162995
162995
|
onReleaseParsedCommandLine,
|
|
@@ -163052,11 +163052,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
163052
163052
|
program2.getTypeChecker();
|
|
163053
163053
|
return;
|
|
163054
163054
|
function getParsedCommandLine(fileName) {
|
|
163055
|
-
const
|
|
163056
|
-
const existing = parsedCommandLines == null ? void 0 : parsedCommandLines.get(
|
|
163055
|
+
const path5 = toPath(fileName, currentDirectory, getCanonicalFileName);
|
|
163056
|
+
const existing = parsedCommandLines == null ? void 0 : parsedCommandLines.get(path5);
|
|
163057
163057
|
if (existing !== void 0) return existing || void 0;
|
|
163058
163058
|
const result = host.getParsedCommandLine ? host.getParsedCommandLine(fileName) : getParsedCommandLineOfConfigFileUsingSourceFile(fileName);
|
|
163059
|
-
(parsedCommandLines || (parsedCommandLines = /* @__PURE__ */ new Map())).set(
|
|
163059
|
+
(parsedCommandLines || (parsedCommandLines = /* @__PURE__ */ new Map())).set(path5, result || false);
|
|
163060
163060
|
return result;
|
|
163061
163061
|
}
|
|
163062
163062
|
function getParsedCommandLineOfConfigFileUsingSourceFile(configFileName) {
|
|
@@ -163098,7 +163098,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
163098
163098
|
function getOrCreateSourceFile(fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile) {
|
|
163099
163099
|
return getOrCreateSourceFileByPath(fileName, toPath(fileName, currentDirectory, getCanonicalFileName), languageVersionOrOptions, onError, shouldCreateNewSourceFile);
|
|
163100
163100
|
}
|
|
163101
|
-
function getOrCreateSourceFileByPath(fileName,
|
|
163101
|
+
function getOrCreateSourceFileByPath(fileName, path5, languageVersionOrOptions, _onError, shouldCreateNewSourceFile) {
|
|
163102
163102
|
Debug.assert(compilerHost, "getOrCreateSourceFileByPath called after typical CompilerHost lifetime, check the callstack something with a reference to an old host.");
|
|
163103
163103
|
const scriptSnapshot = host.getScriptSnapshot(fileName);
|
|
163104
163104
|
if (!scriptSnapshot) {
|
|
@@ -163107,17 +163107,17 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
163107
163107
|
const scriptKind = getScriptKind(fileName, host);
|
|
163108
163108
|
const scriptVersion = host.getScriptVersion(fileName);
|
|
163109
163109
|
if (!shouldCreateNewSourceFile) {
|
|
163110
|
-
const oldSourceFile = program2 && program2.getSourceFileByPath(
|
|
163110
|
+
const oldSourceFile = program2 && program2.getSourceFileByPath(path5);
|
|
163111
163111
|
if (oldSourceFile) {
|
|
163112
163112
|
if (scriptKind === oldSourceFile.scriptKind || releasedScriptKinds.has(oldSourceFile.resolvedPath)) {
|
|
163113
|
-
return documentRegistry.updateDocumentWithKey(fileName,
|
|
163113
|
+
return documentRegistry.updateDocumentWithKey(fileName, path5, host, documentRegistryBucketKey, scriptSnapshot, scriptVersion, scriptKind, languageVersionOrOptions);
|
|
163114
163114
|
} else {
|
|
163115
163115
|
documentRegistry.releaseDocumentWithKey(oldSourceFile.resolvedPath, documentRegistry.getKeyForCompilationSettings(program2.getCompilerOptions()), oldSourceFile.scriptKind, oldSourceFile.impliedNodeFormat);
|
|
163116
163116
|
releasedScriptKinds.add(oldSourceFile.resolvedPath);
|
|
163117
163117
|
}
|
|
163118
163118
|
}
|
|
163119
163119
|
}
|
|
163120
|
-
return documentRegistry.acquireDocumentWithKey(fileName,
|
|
163120
|
+
return documentRegistry.acquireDocumentWithKey(fileName, path5, host, documentRegistryBucketKey, scriptSnapshot, scriptVersion, scriptKind, languageVersionOrOptions);
|
|
163121
163121
|
}
|
|
163122
163122
|
}
|
|
163123
163123
|
function getProgram() {
|
|
@@ -163723,7 +163723,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
163723
163723
|
return isArray(action) ? Promise.all(action.map((a) => applySingleCodeActionCommand(a))) : applySingleCodeActionCommand(action);
|
|
163724
163724
|
}
|
|
163725
163725
|
function applySingleCodeActionCommand(action) {
|
|
163726
|
-
const getPath = (
|
|
163726
|
+
const getPath = (path5) => toPath(path5, currentDirectory, getCanonicalFileName);
|
|
163727
163727
|
Debug.assertEqual(action.type, "install package");
|
|
163728
163728
|
return host.installPackage ? host.installPackage({ fileName: getPath(action.file), packageName: action.packageName }) : Promise.reject("Host does not implement `installPackage`");
|
|
163729
163729
|
}
|
|
@@ -164067,8 +164067,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
164067
164067
|
function isLetterOrDigit(char) {
|
|
164068
164068
|
return char >= 97 && char <= 122 || char >= 65 && char <= 90 || char >= 48 && char <= 57;
|
|
164069
164069
|
}
|
|
164070
|
-
function isNodeModulesFile(
|
|
164071
|
-
return
|
|
164070
|
+
function isNodeModulesFile(path5) {
|
|
164071
|
+
return path5.includes("/node_modules/");
|
|
164072
164072
|
}
|
|
164073
164073
|
}
|
|
164074
164074
|
function getRenameInfo2(fileName, position, preferences) {
|
|
@@ -177702,11 +177702,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
177702
177702
|
}
|
|
177703
177703
|
});
|
|
177704
177704
|
}
|
|
177705
|
-
function generateJSDocParamTagsForDestructuring(
|
|
177705
|
+
function generateJSDocParamTagsForDestructuring(path5, pattern, initializer, dotDotDotToken, isJs, isSnippet, checker, options, preferences) {
|
|
177706
177706
|
if (!isJs) {
|
|
177707
177707
|
return [
|
|
177708
177708
|
getJSDocParamAnnotation(
|
|
177709
|
-
|
|
177709
|
+
path5,
|
|
177710
177710
|
initializer,
|
|
177711
177711
|
dotDotDotToken,
|
|
177712
177712
|
isJs,
|
|
@@ -177720,7 +177720,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
177720
177720
|
)
|
|
177721
177721
|
];
|
|
177722
177722
|
}
|
|
177723
|
-
return patternWorker(
|
|
177723
|
+
return patternWorker(path5, pattern, initializer, dotDotDotToken, { tabstop: 1 });
|
|
177724
177724
|
function patternWorker(path22, pattern2, initializer2, dotDotDotToken2, counter) {
|
|
177725
177725
|
if (isObjectBindingPattern(pattern2) && !dotDotDotToken2) {
|
|
177726
177726
|
const oldTabstop = counter.tabstop;
|
|
@@ -182343,21 +182343,21 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
182343
182343
|
function getFragmentDirectory(fragment) {
|
|
182344
182344
|
return containsSlash(fragment) ? hasTrailingDirectorySeparator(fragment) ? fragment : getDirectoryPath(fragment) : void 0;
|
|
182345
182345
|
}
|
|
182346
|
-
function getCompletionsForPathMapping(
|
|
182347
|
-
const parsedPath = tryParsePattern(
|
|
182346
|
+
function getCompletionsForPathMapping(path5, patterns, fragment, packageDirectory, extensionOptions, isExports, isImports, program2, host, moduleSpecifierResolutionHost) {
|
|
182347
|
+
const parsedPath = tryParsePattern(path5);
|
|
182348
182348
|
if (!parsedPath) {
|
|
182349
182349
|
return emptyArray;
|
|
182350
182350
|
}
|
|
182351
182351
|
if (typeof parsedPath === "string") {
|
|
182352
182352
|
return justPathMappingName(
|
|
182353
|
-
|
|
182353
|
+
path5,
|
|
182354
182354
|
"script"
|
|
182355
182355
|
/* scriptElement */
|
|
182356
182356
|
);
|
|
182357
182357
|
}
|
|
182358
182358
|
const remainingFragment = tryRemovePrefix(fragment, parsedPath.prefix);
|
|
182359
182359
|
if (remainingFragment === void 0) {
|
|
182360
|
-
const starIsFullPathComponent = endsWith(
|
|
182360
|
+
const starIsFullPathComponent = endsWith(path5, "/*");
|
|
182361
182361
|
return starIsFullPathComponent ? justPathMappingName(
|
|
182362
182362
|
parsedPath.prefix,
|
|
182363
182363
|
"directory"
|
|
@@ -182443,9 +182443,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
182443
182443
|
function getDirectoryMatches(directoryName) {
|
|
182444
182444
|
return mapDefined(tryGetDirectories(host, directoryName), (dir) => dir === "node_modules" ? void 0 : directoryResult(dir));
|
|
182445
182445
|
}
|
|
182446
|
-
function trimPrefixAndSuffix(
|
|
182446
|
+
function trimPrefixAndSuffix(path5, prefix) {
|
|
182447
182447
|
return firstDefined(matchingSuffixes, (suffix) => {
|
|
182448
|
-
const inner = withoutStartAndEnd(normalizePath(
|
|
182448
|
+
const inner = withoutStartAndEnd(normalizePath(path5), prefix, suffix);
|
|
182449
182449
|
return inner === void 0 ? void 0 : removeLeadingDirectorySeparator(inner);
|
|
182450
182450
|
});
|
|
182451
182451
|
}
|
|
@@ -182453,8 +182453,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
182453
182453
|
function withoutStartAndEnd(s, start, end) {
|
|
182454
182454
|
return startsWith(s, start) && endsWith(s, end) ? s.slice(start.length, s.length - end.length) : void 0;
|
|
182455
182455
|
}
|
|
182456
|
-
function removeLeadingDirectorySeparator(
|
|
182457
|
-
return
|
|
182456
|
+
function removeLeadingDirectorySeparator(path5) {
|
|
182457
|
+
return path5[0] === directorySeparator ? path5.slice(1) : path5;
|
|
182458
182458
|
}
|
|
182459
182459
|
function getAmbientModuleCompletions(fragment, fragmentDirectory, checker) {
|
|
182460
182460
|
const ambientModules = checker.getAmbientModules().map((sym) => stripQuotes(sym.name));
|
|
@@ -182569,10 +182569,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
182569
182569
|
/* ESNext */
|
|
182570
182570
|
) ? void 0 : createTextSpan(textStart + offset, length2);
|
|
182571
182571
|
}
|
|
182572
|
-
function isPathRelativeToScript(
|
|
182573
|
-
if (
|
|
182574
|
-
const slashIndex =
|
|
182575
|
-
const slashCharCode =
|
|
182572
|
+
function isPathRelativeToScript(path5) {
|
|
182573
|
+
if (path5 && path5.length >= 2 && path5.charCodeAt(0) === 46) {
|
|
182574
|
+
const slashIndex = path5.length >= 3 && path5.charCodeAt(1) === 46 ? 2 : 1;
|
|
182575
|
+
const slashCharCode = path5.charCodeAt(slashIndex);
|
|
182576
182576
|
return slashCharCode === 47 || slashCharCode === 92;
|
|
182577
182577
|
}
|
|
182578
182578
|
return false;
|
|
@@ -186987,7 +186987,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
186987
186987
|
return ts_textChanges_exports.ChangeTracker.with(
|
|
186988
186988
|
{ host, formatContext, preferences },
|
|
186989
186989
|
(changeTracker) => {
|
|
186990
|
-
const parsed = contents.map((c) =>
|
|
186990
|
+
const parsed = contents.map((c) => parse3(sourceFile, c));
|
|
186991
186991
|
const flattenedLocations = focusLocations && flatten(focusLocations);
|
|
186992
186992
|
for (const nodes of parsed) {
|
|
186993
186993
|
placeNodeGroup(
|
|
@@ -187000,7 +187000,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
187000
187000
|
}
|
|
187001
187001
|
);
|
|
187002
187002
|
}
|
|
187003
|
-
function
|
|
187003
|
+
function parse3(sourceFile, content) {
|
|
187004
187004
|
const nodeKinds = [
|
|
187005
187005
|
{
|
|
187006
187006
|
parse: () => createSourceFile(
|
|
@@ -197850,7 +197850,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
197850
197850
|
usingSingleLineStringWriter: () => usingSingleLineStringWriter,
|
|
197851
197851
|
utf16EncodeAsString: () => utf16EncodeAsString,
|
|
197852
197852
|
validateLocaleAndSetLanguage: () => validateLocaleAndSetLanguage,
|
|
197853
|
-
version: () =>
|
|
197853
|
+
version: () => version2,
|
|
197854
197854
|
versionMajorMinor: () => versionMajorMinor,
|
|
197855
197855
|
visitArray: () => visitArray,
|
|
197856
197856
|
visitCommaListElements: () => visitCommaListElements,
|
|
@@ -197875,7 +197875,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
197875
197875
|
var enableDeprecationWarnings = true;
|
|
197876
197876
|
var typeScriptVersion2;
|
|
197877
197877
|
function getTypeScriptVersion() {
|
|
197878
|
-
return typeScriptVersion2 ?? (typeScriptVersion2 = new Version(
|
|
197878
|
+
return typeScriptVersion2 ?? (typeScriptVersion2 = new Version(version2));
|
|
197879
197879
|
}
|
|
197880
197880
|
function formatDeprecationMessage(name, error2, errorAfter, since, message) {
|
|
197881
197881
|
let deprecationMessage = error2 ? "DeprecationError: " : "DeprecationWarning: ";
|
|
@@ -197915,12 +197915,12 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
197915
197915
|
};
|
|
197916
197916
|
}
|
|
197917
197917
|
function createDeprecation(name, options = {}) {
|
|
197918
|
-
const
|
|
197918
|
+
const version22 = typeof options.typeScriptVersion === "string" ? new Version(options.typeScriptVersion) : options.typeScriptVersion ?? getTypeScriptVersion();
|
|
197919
197919
|
const errorAfter = typeof options.errorAfter === "string" ? new Version(options.errorAfter) : options.errorAfter;
|
|
197920
197920
|
const warnAfter = typeof options.warnAfter === "string" ? new Version(options.warnAfter) : options.warnAfter;
|
|
197921
197921
|
const since = typeof options.since === "string" ? new Version(options.since) : options.since ?? warnAfter;
|
|
197922
|
-
const error2 = options.error || errorAfter &&
|
|
197923
|
-
const warn = !warnAfter ||
|
|
197922
|
+
const error2 = options.error || errorAfter && version22.compareTo(errorAfter) >= 0;
|
|
197923
|
+
const warn = !warnAfter || version22.compareTo(warnAfter) >= 0;
|
|
197924
197924
|
return error2 ? createErrorDeprecation(name, errorAfter, since, options.message) : warn ? createWarningDeprecation(name, errorAfter, since, options.message) : noop;
|
|
197925
197925
|
}
|
|
197926
197926
|
function wrapFunction(deprecation, func) {
|
|
@@ -198315,11 +198315,11 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
198315
198315
|
this.log.writeLine(`Adding entry into typings cache: '${packageName}' => '${typingFile}'`);
|
|
198316
198316
|
}
|
|
198317
198317
|
const info = npmLock.packages && getProperty(npmLock.packages, `node_modules/${key}`) || getProperty(npmLock.dependencies, key);
|
|
198318
|
-
const
|
|
198319
|
-
if (!
|
|
198318
|
+
const version22 = info && info.version;
|
|
198319
|
+
if (!version22) {
|
|
198320
198320
|
continue;
|
|
198321
198321
|
}
|
|
198322
|
-
const newTyping = { typingLocation: typingFile, version: new Version(
|
|
198322
|
+
const newTyping = { typingLocation: typingFile, version: new Version(version22) };
|
|
198323
198323
|
this.packageNameToTypingLocation.set(packageName, newTyping);
|
|
198324
198324
|
}
|
|
198325
198325
|
}
|
|
@@ -198384,7 +198384,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
198384
198384
|
this.sendResponse({
|
|
198385
198385
|
kind: EventBeginInstallTypes,
|
|
198386
198386
|
eventId: requestId,
|
|
198387
|
-
typingsInstallerVersion:
|
|
198387
|
+
typingsInstallerVersion: version2,
|
|
198388
198388
|
projectName: req.projectName
|
|
198389
198389
|
});
|
|
198390
198390
|
const scopedTypings = filteredTypings.map(typingsName);
|
|
@@ -198426,7 +198426,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
198426
198426
|
projectName: req.projectName,
|
|
198427
198427
|
packagesToInstall: scopedTypings,
|
|
198428
198428
|
installSuccess: ok,
|
|
198429
|
-
typingsInstallerVersion:
|
|
198429
|
+
typingsInstallerVersion: version2
|
|
198430
198430
|
};
|
|
198431
198431
|
this.sendResponse(response);
|
|
198432
198432
|
}
|
|
@@ -198543,17 +198543,17 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
198543
198543
|
function createNormalizedPathMap() {
|
|
198544
198544
|
const map2 = /* @__PURE__ */ new Map();
|
|
198545
198545
|
return {
|
|
198546
|
-
get(
|
|
198547
|
-
return map2.get(
|
|
198546
|
+
get(path5) {
|
|
198547
|
+
return map2.get(path5);
|
|
198548
198548
|
},
|
|
198549
|
-
set(
|
|
198550
|
-
map2.set(
|
|
198549
|
+
set(path5, value) {
|
|
198550
|
+
map2.set(path5, value);
|
|
198551
198551
|
},
|
|
198552
|
-
contains(
|
|
198553
|
-
return map2.has(
|
|
198552
|
+
contains(path5) {
|
|
198553
|
+
return map2.has(path5);
|
|
198554
198554
|
},
|
|
198555
|
-
remove(
|
|
198556
|
-
map2.delete(
|
|
198555
|
+
remove(path5) {
|
|
198556
|
+
map2.delete(path5);
|
|
198557
198557
|
}
|
|
198558
198558
|
};
|
|
198559
198559
|
}
|
|
@@ -199066,12 +199066,12 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
199066
199066
|
return fileName[0] === "^" || (fileName.includes("walkThroughSnippet:/") || fileName.includes("untitled:/")) && getBaseFileName(fileName)[0] === "^" || fileName.includes(":^") && !fileName.includes(directorySeparator);
|
|
199067
199067
|
}
|
|
199068
199068
|
var ScriptInfo = class {
|
|
199069
|
-
constructor(host, fileName, scriptKind, hasMixedContent,
|
|
199069
|
+
constructor(host, fileName, scriptKind, hasMixedContent, path5, initialVersion) {
|
|
199070
199070
|
this.host = host;
|
|
199071
199071
|
this.fileName = fileName;
|
|
199072
199072
|
this.scriptKind = scriptKind;
|
|
199073
199073
|
this.hasMixedContent = hasMixedContent;
|
|
199074
|
-
this.path =
|
|
199074
|
+
this.path = path5;
|
|
199075
199075
|
this.containingProjects = [];
|
|
199076
199076
|
this.isDynamic = isDynamicFileName(fileName);
|
|
199077
199077
|
this.textStorage = new TextStorage(host, this, initialVersion);
|
|
@@ -199706,8 +199706,8 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
199706
199706
|
useCaseSensitiveFileNames() {
|
|
199707
199707
|
return this.projectService.host.useCaseSensitiveFileNames;
|
|
199708
199708
|
}
|
|
199709
|
-
readDirectory(
|
|
199710
|
-
return this.directoryStructureHost.readDirectory(
|
|
199709
|
+
readDirectory(path5, extensions, exclude, include, depth) {
|
|
199710
|
+
return this.directoryStructureHost.readDirectory(path5, extensions, exclude, include, depth);
|
|
199711
199711
|
}
|
|
199712
199712
|
readFile(fileName) {
|
|
199713
199713
|
return this.projectService.host.readFile(fileName);
|
|
@@ -199716,8 +199716,8 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
199716
199716
|
return this.projectService.host.writeFile(fileName, content);
|
|
199717
199717
|
}
|
|
199718
199718
|
fileExists(file) {
|
|
199719
|
-
const
|
|
199720
|
-
return !!this.projectService.getScriptInfoForPath(
|
|
199719
|
+
const path5 = this.toPath(file);
|
|
199720
|
+
return !!this.projectService.getScriptInfoForPath(path5) || !this.isWatchedMissingFile(path5) && this.directoryStructureHost.fileExists(file);
|
|
199721
199721
|
}
|
|
199722
199722
|
/** @internal */
|
|
199723
199723
|
resolveModuleNameLiterals(moduleLiterals, containingFile, redirectedReference, options, containingSourceFile, reusedNames) {
|
|
@@ -199742,11 +199742,11 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
199742
199742
|
resolveLibrary(libraryName, resolveFrom, options, libFileName) {
|
|
199743
199743
|
return this.resolutionCache.resolveLibrary(libraryName, resolveFrom, options, libFileName);
|
|
199744
199744
|
}
|
|
199745
|
-
directoryExists(
|
|
199746
|
-
return this.directoryStructureHost.directoryExists(
|
|
199745
|
+
directoryExists(path5) {
|
|
199746
|
+
return this.directoryStructureHost.directoryExists(path5);
|
|
199747
199747
|
}
|
|
199748
|
-
getDirectories(
|
|
199749
|
-
return this.directoryStructureHost.getDirectories(
|
|
199748
|
+
getDirectories(path5) {
|
|
199749
|
+
return this.directoryStructureHost.getDirectories(path5);
|
|
199750
199750
|
}
|
|
199751
199751
|
/** @internal */
|
|
199752
199752
|
getCachedDirectoryStructureHost() {
|
|
@@ -200009,16 +200009,16 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
200009
200009
|
}
|
|
200010
200010
|
}));
|
|
200011
200011
|
}
|
|
200012
|
-
getSourceFile(
|
|
200012
|
+
getSourceFile(path5) {
|
|
200013
200013
|
if (!this.program) {
|
|
200014
200014
|
return void 0;
|
|
200015
200015
|
}
|
|
200016
|
-
return this.program.getSourceFileByPath(
|
|
200016
|
+
return this.program.getSourceFileByPath(path5);
|
|
200017
200017
|
}
|
|
200018
200018
|
/** @internal */
|
|
200019
|
-
getSourceFileOrConfigFile(
|
|
200019
|
+
getSourceFileOrConfigFile(path5) {
|
|
200020
200020
|
const options = this.program.getCompilerOptions();
|
|
200021
|
-
return
|
|
200021
|
+
return path5 === options.configFilePath ? options.configFile : this.getSourceFile(path5);
|
|
200022
200022
|
}
|
|
200023
200023
|
close() {
|
|
200024
200024
|
var _a;
|
|
@@ -200195,8 +200195,8 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
200195
200195
|
}
|
|
200196
200196
|
// add a root file that doesnt exist on host
|
|
200197
200197
|
addMissingFileRoot(fileName) {
|
|
200198
|
-
const
|
|
200199
|
-
this.rootFilesMap.set(
|
|
200198
|
+
const path5 = this.projectService.toPath(fileName);
|
|
200199
|
+
this.rootFilesMap.set(path5, { fileName });
|
|
200200
200200
|
this.markAsDirty();
|
|
200201
200201
|
}
|
|
200202
200202
|
removeFile(info, fileExists, detachFromProject) {
|
|
@@ -200362,22 +200362,22 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
200362
200362
|
const toRemove = new Map(this.typingWatchers);
|
|
200363
200363
|
if (!this.typingWatchers) this.typingWatchers = /* @__PURE__ */ new Map();
|
|
200364
200364
|
this.typingWatchers.isInvoked = false;
|
|
200365
|
-
const createProjectWatcher = (
|
|
200366
|
-
const canonicalPath = this.toPath(
|
|
200365
|
+
const createProjectWatcher = (path5, typingsWatcherType) => {
|
|
200366
|
+
const canonicalPath = this.toPath(path5);
|
|
200367
200367
|
toRemove.delete(canonicalPath);
|
|
200368
200368
|
if (!this.typingWatchers.has(canonicalPath)) {
|
|
200369
200369
|
const watchType = typingsWatcherType === "FileWatcher" ? WatchType.TypingInstallerLocationFile : WatchType.TypingInstallerLocationDirectory;
|
|
200370
200370
|
this.typingWatchers.set(
|
|
200371
200371
|
canonicalPath,
|
|
200372
200372
|
canWatchDirectoryOrFilePath(canonicalPath) ? typingsWatcherType === "FileWatcher" ? this.projectService.watchFactory.watchFile(
|
|
200373
|
-
|
|
200373
|
+
path5,
|
|
200374
200374
|
() => !this.typingWatchers.isInvoked ? this.onTypingInstallerWatchInvoke() : this.writeLog(`TypingWatchers already invoked`),
|
|
200375
200375
|
2e3,
|
|
200376
200376
|
this.projectService.getWatchOptions(this),
|
|
200377
200377
|
watchType,
|
|
200378
200378
|
this
|
|
200379
200379
|
) : this.projectService.watchFactory.watchDirectory(
|
|
200380
|
-
|
|
200380
|
+
path5,
|
|
200381
200381
|
(f) => {
|
|
200382
200382
|
if (this.typingWatchers.isInvoked) return this.writeLog(`TypingWatchers already invoked`);
|
|
200383
200383
|
if (!fileExtensionIs(
|
|
@@ -200392,7 +200392,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
200392
200392
|
this.projectService.getWatchOptions(this),
|
|
200393
200393
|
watchType,
|
|
200394
200394
|
this
|
|
200395
|
-
) : (this.writeLog(`Skipping watcher creation at ${
|
|
200395
|
+
) : (this.writeLog(`Skipping watcher creation at ${path5}:: ${getDetailWatchInfo(watchType, this)}`), noopFileWatcher)
|
|
200396
200396
|
);
|
|
200397
200397
|
}
|
|
200398
200398
|
};
|
|
@@ -200437,9 +200437,9 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
200437
200437
|
/* DirectoryWatcher */
|
|
200438
200438
|
);
|
|
200439
200439
|
}
|
|
200440
|
-
toRemove.forEach((watch,
|
|
200440
|
+
toRemove.forEach((watch, path5) => {
|
|
200441
200441
|
watch.close();
|
|
200442
|
-
this.typingWatchers.delete(
|
|
200442
|
+
this.typingWatchers.delete(path5);
|
|
200443
200443
|
});
|
|
200444
200444
|
}
|
|
200445
200445
|
/** @internal */
|
|
@@ -200473,9 +200473,9 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
200473
200473
|
let hasNewProgram = false;
|
|
200474
200474
|
if (this.program && (!oldProgram || this.program !== oldProgram && this.program.structureIsReused !== 2)) {
|
|
200475
200475
|
hasNewProgram = true;
|
|
200476
|
-
this.rootFilesMap.forEach((value,
|
|
200476
|
+
this.rootFilesMap.forEach((value, path5) => {
|
|
200477
200477
|
var _a2;
|
|
200478
|
-
const file = this.program.getSourceFileByPath(
|
|
200478
|
+
const file = this.program.getSourceFileByPath(path5);
|
|
200479
200479
|
const info = value.info;
|
|
200480
200480
|
if (!file || ((_a2 = value.info) == null ? void 0 : _a2.path) === file.resolvedPath) return;
|
|
200481
200481
|
value.info = this.projectService.getScriptInfo(file.fileName);
|
|
@@ -200631,8 +200631,8 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
200631
200631
|
);
|
|
200632
200632
|
return fileWatcher;
|
|
200633
200633
|
}
|
|
200634
|
-
isWatchedMissingFile(
|
|
200635
|
-
return !!this.missingFilesMap && this.missingFilesMap.has(
|
|
200634
|
+
isWatchedMissingFile(path5) {
|
|
200635
|
+
return !!this.missingFilesMap && this.missingFilesMap.has(path5);
|
|
200636
200636
|
}
|
|
200637
200637
|
/** @internal */
|
|
200638
200638
|
addGeneratedFileWatch(generatedFile, sourceFile) {
|
|
@@ -200641,17 +200641,17 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
200641
200641
|
this.generatedFilesMap = this.createGeneratedFileWatcher(generatedFile);
|
|
200642
200642
|
}
|
|
200643
200643
|
} else {
|
|
200644
|
-
const
|
|
200644
|
+
const path5 = this.toPath(sourceFile);
|
|
200645
200645
|
if (this.generatedFilesMap) {
|
|
200646
200646
|
if (isGeneratedFileWatcher(this.generatedFilesMap)) {
|
|
200647
200647
|
Debug.fail(`${this.projectName} Expected to not have --out watcher for generated file with options: ${JSON.stringify(this.compilerOptions)}`);
|
|
200648
200648
|
return;
|
|
200649
200649
|
}
|
|
200650
|
-
if (this.generatedFilesMap.has(
|
|
200650
|
+
if (this.generatedFilesMap.has(path5)) return;
|
|
200651
200651
|
} else {
|
|
200652
200652
|
this.generatedFilesMap = /* @__PURE__ */ new Map();
|
|
200653
200653
|
}
|
|
200654
|
-
this.generatedFilesMap.set(
|
|
200654
|
+
this.generatedFilesMap.set(path5, this.createGeneratedFileWatcher(generatedFile));
|
|
200655
200655
|
}
|
|
200656
200656
|
}
|
|
200657
200657
|
createGeneratedFileWatcher(generatedFile) {
|
|
@@ -201051,7 +201051,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
201051
201051
|
isDefaultProjectForOpenFiles() {
|
|
201052
201052
|
return !!forEachEntry(
|
|
201053
201053
|
this.projectService.openFiles,
|
|
201054
|
-
(_projectRootPath,
|
|
201054
|
+
(_projectRootPath, path5) => this.projectService.tryGetDefaultProjectForFile(this.projectService.getScriptInfoForPath(path5)) === this
|
|
201055
201055
|
);
|
|
201056
201056
|
}
|
|
201057
201057
|
/** @internal */
|
|
@@ -202225,33 +202225,33 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
202225
202225
|
getCurrentDirectory: () => service.host.getCurrentDirectory(),
|
|
202226
202226
|
useCaseSensitiveFileNames: service.host.useCaseSensitiveFileNames
|
|
202227
202227
|
};
|
|
202228
|
-
function watchFile2(
|
|
202228
|
+
function watchFile2(path5, callback) {
|
|
202229
202229
|
return getOrCreateFileWatcher(
|
|
202230
202230
|
watchedFiles,
|
|
202231
|
-
|
|
202231
|
+
path5,
|
|
202232
202232
|
callback,
|
|
202233
|
-
(id) => ({ eventName: CreateFileWatcherEvent, data: { id, path:
|
|
202233
|
+
(id) => ({ eventName: CreateFileWatcherEvent, data: { id, path: path5 } })
|
|
202234
202234
|
);
|
|
202235
202235
|
}
|
|
202236
|
-
function watchDirectory(
|
|
202236
|
+
function watchDirectory(path5, callback, recursive) {
|
|
202237
202237
|
return getOrCreateFileWatcher(
|
|
202238
202238
|
recursive ? watchedDirectoriesRecursive : watchedDirectories,
|
|
202239
|
-
|
|
202239
|
+
path5,
|
|
202240
202240
|
callback,
|
|
202241
202241
|
(id) => ({
|
|
202242
202242
|
eventName: CreateDirectoryWatcherEvent,
|
|
202243
202243
|
data: {
|
|
202244
202244
|
id,
|
|
202245
|
-
path:
|
|
202245
|
+
path: path5,
|
|
202246
202246
|
recursive: !!recursive,
|
|
202247
202247
|
// Special case node_modules as we watch it for changes to closed script infos as well
|
|
202248
|
-
ignoreUpdate: !
|
|
202248
|
+
ignoreUpdate: !path5.endsWith("/node_modules") ? true : void 0
|
|
202249
202249
|
}
|
|
202250
202250
|
})
|
|
202251
202251
|
);
|
|
202252
202252
|
}
|
|
202253
|
-
function getOrCreateFileWatcher({ pathToId, idToCallbacks },
|
|
202254
|
-
const key = service.toPath(
|
|
202253
|
+
function getOrCreateFileWatcher({ pathToId, idToCallbacks }, path5, callback, event) {
|
|
202254
|
+
const key = service.toPath(path5);
|
|
202255
202255
|
let id = pathToId.get(key);
|
|
202256
202256
|
if (!id) pathToId.set(key, id = ids++);
|
|
202257
202257
|
let callbacks = idToCallbacks.get(id);
|
|
@@ -202420,13 +202420,13 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
202420
202420
|
return getNormalizedAbsolutePath(fileName, this.host.getCurrentDirectory());
|
|
202421
202421
|
}
|
|
202422
202422
|
/** @internal */
|
|
202423
|
-
setDocument(key,
|
|
202424
|
-
const info = Debug.checkDefined(this.getScriptInfoForPath(
|
|
202423
|
+
setDocument(key, path5, sourceFile) {
|
|
202424
|
+
const info = Debug.checkDefined(this.getScriptInfoForPath(path5));
|
|
202425
202425
|
info.cacheSourceFile = { key, sourceFile };
|
|
202426
202426
|
}
|
|
202427
202427
|
/** @internal */
|
|
202428
|
-
getDocument(key,
|
|
202429
|
-
const info = this.getScriptInfoForPath(
|
|
202428
|
+
getDocument(key, path5) {
|
|
202429
|
+
const info = this.getScriptInfoForPath(path5);
|
|
202430
202430
|
return info && info.cacheSourceFile && info.cacheSourceFile.key === key ? info.cacheSourceFile.sourceFile : void 0;
|
|
202431
202431
|
}
|
|
202432
202432
|
/** @internal */
|
|
@@ -202548,7 +202548,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
202548
202548
|
const event = {
|
|
202549
202549
|
eventName: ProjectsUpdatedInBackgroundEvent,
|
|
202550
202550
|
data: {
|
|
202551
|
-
openFiles: arrayFrom(this.openFiles.keys(), (
|
|
202551
|
+
openFiles: arrayFrom(this.openFiles.keys(), (path5) => this.getScriptInfoForPath(path5).fileName)
|
|
202552
202552
|
}
|
|
202553
202553
|
};
|
|
202554
202554
|
this.eventHandler(event);
|
|
@@ -202770,11 +202770,11 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
202770
202770
|
}
|
|
202771
202771
|
delayUpdateSourceInfoProjects(sourceInfos) {
|
|
202772
202772
|
if (sourceInfos) {
|
|
202773
|
-
sourceInfos.forEach((_value,
|
|
202773
|
+
sourceInfos.forEach((_value, path5) => this.delayUpdateProjectsOfScriptInfoPath(path5));
|
|
202774
202774
|
}
|
|
202775
202775
|
}
|
|
202776
|
-
delayUpdateProjectsOfScriptInfoPath(
|
|
202777
|
-
const info = this.getScriptInfoForPath(
|
|
202776
|
+
delayUpdateProjectsOfScriptInfoPath(path5) {
|
|
202777
|
+
const info = this.getScriptInfoForPath(path5);
|
|
202778
202778
|
if (info) {
|
|
202779
202779
|
this.delayUpdateProjectGraphs(
|
|
202780
202780
|
info.containingProjects,
|
|
@@ -202868,8 +202868,8 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
202868
202868
|
const project = this.getConfiguredProjectByCanonicalConfigFilePath(projectCanonicalPath);
|
|
202869
202869
|
if (!project) return;
|
|
202870
202870
|
if (configuredProjectForConfig !== project && this.getHostPreferences().includeCompletionsForModuleExports) {
|
|
202871
|
-
const
|
|
202872
|
-
if (find((_a = project.getCurrentProgram()) == null ? void 0 : _a.getResolvedProjectReferences(), (ref) => (ref == null ? void 0 : ref.sourceFile.path) ===
|
|
202871
|
+
const path5 = this.toPath(configFileName);
|
|
202872
|
+
if (find((_a = project.getCurrentProgram()) == null ? void 0 : _a.getResolvedProjectReferences(), (ref) => (ref == null ? void 0 : ref.sourceFile.path) === path5)) {
|
|
202873
202873
|
project.markAutoImportProviderAsDirty();
|
|
202874
202874
|
}
|
|
202875
202875
|
}
|
|
@@ -202924,10 +202924,10 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
202924
202924
|
});
|
|
202925
202925
|
return;
|
|
202926
202926
|
}
|
|
202927
|
-
const
|
|
202928
|
-
project.resolutionCache.removeResolutionsFromProjectReferenceRedirects(
|
|
202927
|
+
const path5 = this.toPath(canonicalConfigFilePath);
|
|
202928
|
+
project.resolutionCache.removeResolutionsFromProjectReferenceRedirects(path5);
|
|
202929
202929
|
this.delayUpdateProjectGraph(project);
|
|
202930
|
-
if (this.getHostPreferences().includeCompletionsForModuleExports && find((_c = project.getCurrentProgram()) == null ? void 0 : _c.getResolvedProjectReferences(), (ref) => (ref == null ? void 0 : ref.sourceFile.path) ===
|
|
202930
|
+
if (this.getHostPreferences().includeCompletionsForModuleExports && find((_c = project.getCurrentProgram()) == null ? void 0 : _c.getResolvedProjectReferences(), (ref) => (ref == null ? void 0 : ref.sourceFile.path) === path5)) {
|
|
202931
202931
|
project.markAutoImportProviderAsDirty();
|
|
202932
202932
|
}
|
|
202933
202933
|
}
|
|
@@ -202952,20 +202952,20 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
202952
202952
|
canonicalConfigFilePath,
|
|
202953
202953
|
"Change in config file detected"
|
|
202954
202954
|
);
|
|
202955
|
-
this.openFiles.forEach((_projectRootPath,
|
|
202955
|
+
this.openFiles.forEach((_projectRootPath, path5) => {
|
|
202956
202956
|
var _a, _b;
|
|
202957
|
-
const configFileForOpenFile = this.configFileForOpenFiles.get(
|
|
202958
|
-
if (!((_a = configFileExistenceInfo.openFilesImpactedByConfigFile) == null ? void 0 : _a.has(
|
|
202959
|
-
this.configFileForOpenFiles.delete(
|
|
202960
|
-
const info = this.getScriptInfoForPath(
|
|
202957
|
+
const configFileForOpenFile = this.configFileForOpenFiles.get(path5);
|
|
202958
|
+
if (!((_a = configFileExistenceInfo.openFilesImpactedByConfigFile) == null ? void 0 : _a.has(path5))) return;
|
|
202959
|
+
this.configFileForOpenFiles.delete(path5);
|
|
202960
|
+
const info = this.getScriptInfoForPath(path5);
|
|
202961
202961
|
const newConfigFileNameForInfo = this.getConfigFileNameForFile(
|
|
202962
202962
|
info,
|
|
202963
202963
|
/*findFromCacheOnly*/
|
|
202964
202964
|
false
|
|
202965
202965
|
);
|
|
202966
202966
|
if (!newConfigFileNameForInfo) return;
|
|
202967
|
-
if (!((_b = this.pendingOpenFileProjectUpdates) == null ? void 0 : _b.has(
|
|
202968
|
-
(this.pendingOpenFileProjectUpdates ?? (this.pendingOpenFileProjectUpdates = /* @__PURE__ */ new Map())).set(
|
|
202967
|
+
if (!((_b = this.pendingOpenFileProjectUpdates) == null ? void 0 : _b.has(path5))) {
|
|
202968
|
+
(this.pendingOpenFileProjectUpdates ?? (this.pendingOpenFileProjectUpdates = /* @__PURE__ */ new Map())).set(path5, configFileForOpenFile);
|
|
202969
202969
|
}
|
|
202970
202970
|
});
|
|
202971
202971
|
this.delayEnsureProjectForOpenFiles();
|
|
@@ -203060,8 +203060,8 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
203060
203060
|
return project;
|
|
203061
203061
|
}
|
|
203062
203062
|
assignOrphanScriptInfosToInferredProject() {
|
|
203063
|
-
this.openFiles.forEach((projectRootPath,
|
|
203064
|
-
const info = this.getScriptInfoForPath(
|
|
203063
|
+
this.openFiles.forEach((projectRootPath, path5) => {
|
|
203064
|
+
const info = this.getScriptInfoForPath(path5);
|
|
203065
203065
|
if (info.isOrphan()) {
|
|
203066
203066
|
this.assignOrphanScriptInfoToInferredProject(info, projectRootPath);
|
|
203067
203067
|
}
|
|
@@ -203373,8 +203373,8 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
203373
203373
|
this.configuredProjects.forEach(printProjectWithoutFileNames);
|
|
203374
203374
|
this.inferredProjects.forEach(printProjectWithoutFileNames);
|
|
203375
203375
|
this.logger.info("Open files: ");
|
|
203376
|
-
this.openFiles.forEach((projectRootPath,
|
|
203377
|
-
const info = this.getScriptInfoForPath(
|
|
203376
|
+
this.openFiles.forEach((projectRootPath, path5) => {
|
|
203377
|
+
const info = this.getScriptInfoForPath(path5);
|
|
203378
203378
|
this.logger.info(` FileName: ${info.fileName} ProjectRootPath: ${projectRootPath}`);
|
|
203379
203379
|
this.logger.info(` Projects: ${info.containingProjects.map((p) => p.getProjectName())}`);
|
|
203380
203380
|
});
|
|
@@ -203465,7 +203465,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
203465
203465
|
configFileName: configFileName(),
|
|
203466
203466
|
projectType: project instanceof ExternalProject ? "external" : "configured",
|
|
203467
203467
|
languageServiceEnabled: project.languageServiceEnabled,
|
|
203468
|
-
version
|
|
203468
|
+
version: version2
|
|
203469
203469
|
};
|
|
203470
203470
|
this.eventHandler({ eventName: ProjectInfoTelemetryEvent, data });
|
|
203471
203471
|
function configFileName() {
|
|
@@ -203700,12 +203700,12 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
203700
203700
|
const newRootFile = propertyReader.getFileName(f);
|
|
203701
203701
|
const fileName = toNormalizedPath(newRootFile);
|
|
203702
203702
|
const isDynamic = isDynamicFileName(fileName);
|
|
203703
|
-
let
|
|
203703
|
+
let path5;
|
|
203704
203704
|
if (!isDynamic && !project.fileExists(newRootFile)) {
|
|
203705
|
-
|
|
203706
|
-
const existingValue = projectRootFilesMap.get(
|
|
203705
|
+
path5 = normalizedPathToPath(fileName, this.currentDirectory, this.toCanonicalFileName);
|
|
203706
|
+
const existingValue = projectRootFilesMap.get(path5);
|
|
203707
203707
|
if (existingValue) {
|
|
203708
|
-
if (((_a = existingValue.info) == null ? void 0 : _a.path) ===
|
|
203708
|
+
if (((_a = existingValue.info) == null ? void 0 : _a.path) === path5) {
|
|
203709
203709
|
project.removeFile(
|
|
203710
203710
|
existingValue.info,
|
|
203711
203711
|
/*fileExists*/
|
|
@@ -203717,7 +203717,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
203717
203717
|
}
|
|
203718
203718
|
existingValue.fileName = fileName;
|
|
203719
203719
|
} else {
|
|
203720
|
-
projectRootFilesMap.set(
|
|
203720
|
+
projectRootFilesMap.set(path5, { fileName });
|
|
203721
203721
|
}
|
|
203722
203722
|
} else {
|
|
203723
203723
|
const scriptKind = propertyReader.getScriptKind(f, this.hostConfiguration.extraFileExtensions);
|
|
@@ -203731,8 +203731,8 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
203731
203731
|
/*deferredDeleteOk*/
|
|
203732
203732
|
false
|
|
203733
203733
|
));
|
|
203734
|
-
|
|
203735
|
-
const existingValue = projectRootFilesMap.get(
|
|
203734
|
+
path5 = scriptInfo.path;
|
|
203735
|
+
const existingValue = projectRootFilesMap.get(path5);
|
|
203736
203736
|
if (!existingValue || existingValue.info !== scriptInfo) {
|
|
203737
203737
|
project.addRoot(scriptInfo, fileName);
|
|
203738
203738
|
if (scriptInfo.isScriptOpen()) {
|
|
@@ -203742,11 +203742,11 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
203742
203742
|
existingValue.fileName = fileName;
|
|
203743
203743
|
}
|
|
203744
203744
|
}
|
|
203745
|
-
newRootScriptInfoMap.set(
|
|
203745
|
+
newRootScriptInfoMap.set(path5, true);
|
|
203746
203746
|
}
|
|
203747
203747
|
if (projectRootFilesMap.size > newRootScriptInfoMap.size) {
|
|
203748
|
-
projectRootFilesMap.forEach((value,
|
|
203749
|
-
if (!newRootScriptInfoMap.has(
|
|
203748
|
+
projectRootFilesMap.forEach((value, path5) => {
|
|
203749
|
+
if (!newRootScriptInfoMap.has(path5)) {
|
|
203750
203750
|
if (value.info) {
|
|
203751
203751
|
project.removeFile(
|
|
203752
203752
|
value.info,
|
|
@@ -203755,7 +203755,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
203755
203755
|
true
|
|
203756
203756
|
);
|
|
203757
203757
|
} else {
|
|
203758
|
-
projectRootFilesMap.delete(
|
|
203758
|
+
projectRootFilesMap.delete(path5);
|
|
203759
203759
|
}
|
|
203760
203760
|
}
|
|
203761
203761
|
});
|
|
@@ -203992,8 +203992,8 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
203992
203992
|
}
|
|
203993
203993
|
/** @internal */
|
|
203994
203994
|
getScriptInfoOrConfig(uncheckedFileName) {
|
|
203995
|
-
const
|
|
203996
|
-
const info = this.getScriptInfoForNormalizedPath(
|
|
203995
|
+
const path5 = toNormalizedPath(uncheckedFileName);
|
|
203996
|
+
const info = this.getScriptInfoForNormalizedPath(path5);
|
|
203997
203997
|
if (info) return info;
|
|
203998
203998
|
const configProject = this.configuredProjects.get(this.toPath(uncheckedFileName));
|
|
203999
203999
|
return configProject && configProject.getCompilerOptions().configFile;
|
|
@@ -204005,7 +204005,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
204005
204005
|
this.filenameToScriptInfo.entries(),
|
|
204006
204006
|
(entry) => entry[1].deferredDelete ? void 0 : entry
|
|
204007
204007
|
),
|
|
204008
|
-
([
|
|
204008
|
+
([path5, scriptInfo]) => ({ path: path5, fileName: scriptInfo.fileName })
|
|
204009
204009
|
);
|
|
204010
204010
|
this.logger.msg(
|
|
204011
204011
|
`Could not find file ${JSON.stringify(fileName)}.
|
|
@@ -204037,7 +204037,7 @@ All files are: ${JSON.stringify(names)}`,
|
|
|
204037
204037
|
if (!projects) {
|
|
204038
204038
|
projects = createMultiMap();
|
|
204039
204039
|
projects.add(toAddInfo.path, project);
|
|
204040
|
-
} else if (!forEachEntry(projects, (projs,
|
|
204040
|
+
} else if (!forEachEntry(projects, (projs, path5) => path5 === toAddInfo.path ? false : contains(projs, project))) {
|
|
204041
204041
|
projects.add(toAddInfo.path, project);
|
|
204042
204042
|
}
|
|
204043
204043
|
}
|
|
@@ -204199,8 +204199,8 @@ All files are: ${JSON.stringify(names)}`,
|
|
|
204199
204199
|
}
|
|
204200
204200
|
getOrCreateScriptInfoWorker(fileName, currentDirectory, openedByClient, fileContent, scriptKind, hasMixedContent, hostToQueryFileExistsOn, deferredDeleteOk) {
|
|
204201
204201
|
Debug.assert(fileContent === void 0 || openedByClient, "ScriptInfo needs to be opened by client to be able to set its user defined content");
|
|
204202
|
-
const
|
|
204203
|
-
let info = this.filenameToScriptInfo.get(
|
|
204202
|
+
const path5 = normalizedPathToPath(fileName, currentDirectory, this.toCanonicalFileName);
|
|
204203
|
+
let info = this.filenameToScriptInfo.get(path5);
|
|
204204
204204
|
if (!info) {
|
|
204205
204205
|
const isDynamic = isDynamicFileName(fileName);
|
|
204206
204206
|
Debug.assert(isRootedDiskPath(fileName) || isDynamic || openedByClient, "", () => `${JSON.stringify({ fileName, currentDirectory, hostCurrentDirectory: this.currentDirectory, openKeys: arrayFrom(this.openFilesWithNonRootedDiskPath.keys()) })}
|
|
@@ -204212,7 +204212,7 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
204212
204212
|
if (!openedByClient && !isDynamic && !(hostToQueryFileExistsOn || this.host).fileExists(fileName)) {
|
|
204213
204213
|
return;
|
|
204214
204214
|
}
|
|
204215
|
-
info = new ScriptInfo(this.host, fileName, scriptKind, hasMixedContent,
|
|
204215
|
+
info = new ScriptInfo(this.host, fileName, scriptKind, hasMixedContent, path5, this.filenameToScriptInfoVersion.get(path5));
|
|
204216
204216
|
this.filenameToScriptInfo.set(info.path, info);
|
|
204217
204217
|
this.filenameToScriptInfoVersion.delete(info.path);
|
|
204218
204218
|
if (!openedByClient) {
|
|
@@ -204359,9 +204359,9 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
204359
204359
|
getSourceFileLike(fileName, projectNameOrProject, declarationInfo) {
|
|
204360
204360
|
const project = projectNameOrProject.projectName ? projectNameOrProject : this.findProject(projectNameOrProject);
|
|
204361
204361
|
if (project) {
|
|
204362
|
-
const
|
|
204363
|
-
const sourceFile = project.getSourceFile(
|
|
204364
|
-
if (sourceFile && sourceFile.resolvedPath ===
|
|
204362
|
+
const path5 = project.toPath(fileName);
|
|
204363
|
+
const sourceFile = project.getSourceFile(path5);
|
|
204364
|
+
if (sourceFile && sourceFile.resolvedPath === path5) return sourceFile;
|
|
204365
204365
|
}
|
|
204366
204366
|
const info = this.getOrCreateScriptInfoNotOpenedByClient(
|
|
204367
204367
|
fileName,
|
|
@@ -204527,8 +204527,8 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
204527
204527
|
}
|
|
204528
204528
|
});
|
|
204529
204529
|
});
|
|
204530
|
-
this.openFiles.forEach((_projectRootPath,
|
|
204531
|
-
const info = this.getScriptInfoForPath(
|
|
204530
|
+
this.openFiles.forEach((_projectRootPath, path5) => {
|
|
204531
|
+
const info = this.getScriptInfoForPath(path5);
|
|
204532
204532
|
if (find(info.containingProjects, isExternalProject)) return;
|
|
204533
204533
|
this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(
|
|
204534
204534
|
info,
|
|
@@ -204581,14 +204581,14 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
204581
204581
|
const pendingOpenFileProjectUpdates = this.pendingOpenFileProjectUpdates;
|
|
204582
204582
|
this.pendingOpenFileProjectUpdates = void 0;
|
|
204583
204583
|
pendingOpenFileProjectUpdates == null ? void 0 : pendingOpenFileProjectUpdates.forEach(
|
|
204584
|
-
(_config,
|
|
204585
|
-
this.getScriptInfoForPath(
|
|
204584
|
+
(_config, path5) => this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(
|
|
204585
|
+
this.getScriptInfoForPath(path5),
|
|
204586
204586
|
5
|
|
204587
204587
|
/* Create */
|
|
204588
204588
|
)
|
|
204589
204589
|
);
|
|
204590
|
-
this.openFiles.forEach((projectRootPath,
|
|
204591
|
-
const info = this.getScriptInfoForPath(
|
|
204590
|
+
this.openFiles.forEach((projectRootPath, path5) => {
|
|
204591
|
+
const info = this.getScriptInfoForPath(path5);
|
|
204592
204592
|
if (info.isOrphan()) {
|
|
204593
204593
|
this.assignOrphanScriptInfoToInferredProject(info, projectRootPath);
|
|
204594
204594
|
} else {
|
|
@@ -205099,9 +205099,9 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
205099
205099
|
}
|
|
205100
205100
|
});
|
|
205101
205101
|
if (!toRemoveConfiguredProjects.size) return toRemoveConfiguredProjects;
|
|
205102
|
-
forEachEntry(this.openFiles, (_projectRootPath,
|
|
205103
|
-
if (openFilesWithRetainedConfiguredProject == null ? void 0 : openFilesWithRetainedConfiguredProject.has(
|
|
205104
|
-
const info = this.getScriptInfoForPath(
|
|
205102
|
+
forEachEntry(this.openFiles, (_projectRootPath, path5) => {
|
|
205103
|
+
if (openFilesWithRetainedConfiguredProject == null ? void 0 : openFilesWithRetainedConfiguredProject.has(path5)) return;
|
|
205104
|
+
const info = this.getScriptInfoForPath(path5);
|
|
205105
205105
|
if (find(info.containingProjects, isExternalProject)) return;
|
|
205106
205106
|
const result = this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(
|
|
205107
205107
|
info,
|
|
@@ -205150,8 +205150,8 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
205150
205150
|
sourceInfos = info.sourceMapFilePath.sourceInfos;
|
|
205151
205151
|
}
|
|
205152
205152
|
if (!sourceInfos) return;
|
|
205153
|
-
if (!forEachKey(sourceInfos, (
|
|
205154
|
-
const info2 = this.getScriptInfoForPath(
|
|
205153
|
+
if (!forEachKey(sourceInfos, (path5) => {
|
|
205154
|
+
const info2 = this.getScriptInfoForPath(path5);
|
|
205155
205155
|
return !!info2 && (info2.isScriptOpen() || !info2.isOrphan());
|
|
205156
205156
|
})) {
|
|
205157
205157
|
return;
|
|
@@ -205175,7 +205175,7 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
205175
205175
|
sourceInfos = info.sourceMapFilePath.sourceInfos;
|
|
205176
205176
|
}
|
|
205177
205177
|
if (sourceInfos) {
|
|
205178
|
-
sourceInfos.forEach((_value,
|
|
205178
|
+
sourceInfos.forEach((_value, path5) => toRemoveScriptInfos.delete(path5));
|
|
205179
205179
|
}
|
|
205180
205180
|
}
|
|
205181
205181
|
});
|
|
@@ -205658,9 +205658,9 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
205658
205658
|
}
|
|
205659
205659
|
);
|
|
205660
205660
|
}
|
|
205661
|
-
watchPackageJsonFile(file,
|
|
205661
|
+
watchPackageJsonFile(file, path5, project) {
|
|
205662
205662
|
Debug.assert(project !== void 0);
|
|
205663
|
-
let result = (this.packageJsonFilesMap ?? (this.packageJsonFilesMap = /* @__PURE__ */ new Map())).get(
|
|
205663
|
+
let result = (this.packageJsonFilesMap ?? (this.packageJsonFilesMap = /* @__PURE__ */ new Map())).get(path5);
|
|
205664
205664
|
if (!result) {
|
|
205665
205665
|
let watcher = this.watchFactory.watchFile(
|
|
205666
205666
|
file,
|
|
@@ -205668,11 +205668,11 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
205668
205668
|
switch (eventKind) {
|
|
205669
205669
|
case 0:
|
|
205670
205670
|
case 1:
|
|
205671
|
-
this.packageJsonCache.addOrUpdate(fileName,
|
|
205671
|
+
this.packageJsonCache.addOrUpdate(fileName, path5);
|
|
205672
205672
|
this.onPackageJsonChange(result);
|
|
205673
205673
|
break;
|
|
205674
205674
|
case 2:
|
|
205675
|
-
this.packageJsonCache.delete(
|
|
205675
|
+
this.packageJsonCache.delete(path5);
|
|
205676
205676
|
this.onPackageJsonChange(result);
|
|
205677
205677
|
result.projects.clear();
|
|
205678
205678
|
result.close();
|
|
@@ -205689,11 +205689,11 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
205689
205689
|
if (result.projects.size || !watcher) return;
|
|
205690
205690
|
watcher.close();
|
|
205691
205691
|
watcher = void 0;
|
|
205692
|
-
(_a = this.packageJsonFilesMap) == null ? void 0 : _a.delete(
|
|
205693
|
-
this.packageJsonCache.invalidate(
|
|
205692
|
+
(_a = this.packageJsonFilesMap) == null ? void 0 : _a.delete(path5);
|
|
205693
|
+
this.packageJsonCache.invalidate(path5);
|
|
205694
205694
|
}
|
|
205695
205695
|
};
|
|
205696
|
-
this.packageJsonFilesMap.set(
|
|
205696
|
+
this.packageJsonFilesMap.set(path5, result);
|
|
205697
205697
|
}
|
|
205698
205698
|
result.projects.add(project);
|
|
205699
205699
|
(project.packageJsonWatches ?? (project.packageJsonWatches = /* @__PURE__ */ new Set())).add(result);
|
|
@@ -205883,14 +205883,14 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
205883
205883
|
);
|
|
205884
205884
|
}
|
|
205885
205885
|
};
|
|
205886
|
-
function addOrUpdate(fileName,
|
|
205886
|
+
function addOrUpdate(fileName, path5) {
|
|
205887
205887
|
const packageJsonInfo = Debug.checkDefined(createPackageJsonInfo(fileName, host.host));
|
|
205888
|
-
packageJsons.set(
|
|
205889
|
-
directoriesWithoutPackageJson.delete(getDirectoryPath(
|
|
205888
|
+
packageJsons.set(path5, packageJsonInfo);
|
|
205889
|
+
directoriesWithoutPackageJson.delete(getDirectoryPath(path5));
|
|
205890
205890
|
}
|
|
205891
|
-
function invalidate(
|
|
205892
|
-
packageJsons.delete(
|
|
205893
|
-
directoriesWithoutPackageJson.delete(getDirectoryPath(
|
|
205891
|
+
function invalidate(path5) {
|
|
205892
|
+
packageJsons.delete(path5);
|
|
205893
|
+
directoriesWithoutPackageJson.delete(getDirectoryPath(path5));
|
|
205894
205894
|
}
|
|
205895
205895
|
function directoryHasPackageJson(directory) {
|
|
205896
205896
|
return packageJsons.has(combinePaths(directory, "package.json")) ? -1 : directoriesWithoutPackageJson.has(directory) ? 0 : 3;
|
|
@@ -206087,8 +206087,8 @@ ${json}${newLine}`;
|
|
|
206087
206087
|
function combineProjectOutput(defaultValue, getValue, projects, action) {
|
|
206088
206088
|
const outputs = flatMapToMutable(isArray(projects) ? projects : projects.projects, (project) => action(project, defaultValue));
|
|
206089
206089
|
if (!isArray(projects) && projects.symLinkedProjects) {
|
|
206090
|
-
projects.symLinkedProjects.forEach((projects2,
|
|
206091
|
-
const value = getValue(
|
|
206090
|
+
projects.symLinkedProjects.forEach((projects2, path5) => {
|
|
206091
|
+
const value = getValue(path5);
|
|
206092
206092
|
outputs.push(...flatMap(projects2, (project) => action(project, value)));
|
|
206093
206093
|
});
|
|
206094
206094
|
}
|
|
@@ -206234,9 +206234,9 @@ ${json}${newLine}`;
|
|
|
206234
206234
|
});
|
|
206235
206235
|
return results.filter((o) => o.references.length !== 0);
|
|
206236
206236
|
}
|
|
206237
|
-
function forEachProjectInProjects(projects,
|
|
206237
|
+
function forEachProjectInProjects(projects, path5, cb) {
|
|
206238
206238
|
for (const project of isArray(projects) ? projects : projects.projects) {
|
|
206239
|
-
cb(project,
|
|
206239
|
+
cb(project, path5);
|
|
206240
206240
|
}
|
|
206241
206241
|
if (!isArray(projects) && projects.symLinkedProjects) {
|
|
206242
206242
|
projects.symLinkedProjects.forEach((symlinkedProjects, symlinkedPath) => {
|
|
@@ -206250,8 +206250,8 @@ ${json}${newLine}`;
|
|
|
206250
206250
|
const resultsMap = /* @__PURE__ */ new Map();
|
|
206251
206251
|
const queue = createQueue();
|
|
206252
206252
|
queue.enqueue({ project: defaultProject, location: initialLocation });
|
|
206253
|
-
forEachProjectInProjects(projects, initialLocation.fileName, (project,
|
|
206254
|
-
const location = { fileName:
|
|
206253
|
+
forEachProjectInProjects(projects, initialLocation.fileName, (project, path5) => {
|
|
206254
|
+
const location = { fileName: path5, pos: initialLocation.pos };
|
|
206255
206255
|
queue.enqueue({ project, location });
|
|
206256
206256
|
});
|
|
206257
206257
|
const projectService = defaultProject.projectService;
|
|
@@ -206433,7 +206433,7 @@ ${json}${newLine}`;
|
|
|
206433
206433
|
"status"
|
|
206434
206434
|
/* Status */
|
|
206435
206435
|
]: () => {
|
|
206436
|
-
const response = { version };
|
|
206436
|
+
const response = { version: version2 };
|
|
206437
206437
|
return this.requiredResponse(response);
|
|
206438
206438
|
},
|
|
206439
206439
|
[
|
|
@@ -208093,8 +208093,8 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
208093
208093
|
nodeModulesPathParts.packageRootIndex
|
|
208094
208094
|
);
|
|
208095
208095
|
const packageName = getPackageNameFromTypesPackageName(unmangleScopedPackageName(packageNamePathPart));
|
|
208096
|
-
const
|
|
208097
|
-
if (entrypoints && some(entrypoints, (e) => project.toPath(e) ===
|
|
208096
|
+
const path5 = project.toPath(fileName);
|
|
208097
|
+
if (entrypoints && some(entrypoints, (e) => project.toPath(e) === path5)) {
|
|
208098
208098
|
return (_b = auxiliaryProject.resolutionCache.resolveSingleModuleNameWithoutWatching(packageName, resolveFromFile).resolvedModule) == null ? void 0 : _b.resolvedFileName;
|
|
208099
208099
|
} else {
|
|
208100
208100
|
const pathToFileInPackage = fileName.substring(nodeModulesPathParts.packageRootIndex + 1);
|
|
@@ -208874,7 +208874,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
208874
208874
|
}
|
|
208875
208875
|
return combineProjectOutput(
|
|
208876
208876
|
info,
|
|
208877
|
-
(
|
|
208877
|
+
(path5) => this.projectService.getScriptInfoForPath(path5),
|
|
208878
208878
|
projects,
|
|
208879
208879
|
(project, info2) => {
|
|
208880
208880
|
if (!project.compileOnSaveEnabled || !project.languageServiceEnabled || project.isOrphan()) {
|
|
@@ -208901,7 +208901,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
208901
208901
|
return args.richResponse ? { emitSkipped: true, diagnostics: [] } : false;
|
|
208902
208902
|
}
|
|
208903
208903
|
const scriptInfo = project.getScriptInfo(file);
|
|
208904
|
-
const { emitSkipped, diagnostics } = project.emitFile(scriptInfo, (
|
|
208904
|
+
const { emitSkipped, diagnostics } = project.emitFile(scriptInfo, (path5, data, writeByteOrderMark) => this.host.writeFile(path5, data, writeByteOrderMark));
|
|
208905
208905
|
return args.richResponse ? {
|
|
208906
208906
|
emitSkipped,
|
|
208907
208907
|
diagnostics: args.includeLinePosition ? this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(diagnostics) : diagnostics.map((d) => formatDiagnosticToProtocol(
|
|
@@ -209991,11 +209991,11 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
|
|
|
209991
209991
|
this.minVersion = 0;
|
|
209992
209992
|
this.currentVersion = 0;
|
|
209993
209993
|
}
|
|
209994
|
-
versionToIndex(
|
|
209995
|
-
if (
|
|
209994
|
+
versionToIndex(version22) {
|
|
209995
|
+
if (version22 < this.minVersion || version22 > this.currentVersion) {
|
|
209996
209996
|
return void 0;
|
|
209997
209997
|
}
|
|
209998
|
-
return
|
|
209998
|
+
return version22 % _ScriptVersionCache2.maxVersions;
|
|
209999
209999
|
}
|
|
210000
210000
|
currentVersionToIndex() {
|
|
210001
210001
|
return this.currentVersion % _ScriptVersionCache2.maxVersions;
|
|
@@ -210080,8 +210080,8 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
|
|
|
210080
210080
|
_ScriptVersionCache.maxVersions = 8;
|
|
210081
210081
|
var ScriptVersionCache = _ScriptVersionCache;
|
|
210082
210082
|
var LineIndexSnapshot = class _LineIndexSnapshot {
|
|
210083
|
-
constructor(
|
|
210084
|
-
this.version =
|
|
210083
|
+
constructor(version22, cache, index, changesSincePreviousVersion = emptyArray2) {
|
|
210084
|
+
this.version = version22;
|
|
210085
210085
|
this.cache = cache;
|
|
210086
210086
|
this.index = index;
|
|
210087
210087
|
this.changesSincePreviousVersion = changesSincePreviousVersion;
|
|
@@ -210557,8 +210557,8 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
|
|
|
210557
210557
|
installPackage(options) {
|
|
210558
210558
|
this.packageInstallId++;
|
|
210559
210559
|
const request = { kind: "installPackage", ...options, id: this.packageInstallId };
|
|
210560
|
-
const promise = new Promise((
|
|
210561
|
-
(this.packageInstalledPromise ?? (this.packageInstalledPromise = /* @__PURE__ */ new Map())).set(this.packageInstallId, { resolve:
|
|
210560
|
+
const promise = new Promise((resolve4, reject) => {
|
|
210561
|
+
(this.packageInstalledPromise ?? (this.packageInstalledPromise = /* @__PURE__ */ new Map())).set(this.packageInstallId, { resolve: resolve4, reject });
|
|
210562
210562
|
});
|
|
210563
210563
|
this.installer.send(request);
|
|
210564
210564
|
return promise;
|
|
@@ -210881,18 +210881,18 @@ var require_dist2 = __commonJS({
|
|
|
210881
210881
|
module2.exports = __toCommonJS(index_exports);
|
|
210882
210882
|
var import_client = require("@prisma/client");
|
|
210883
210883
|
var path22 = __toESM2(require("path"));
|
|
210884
|
-
var
|
|
210885
|
-
var
|
|
210884
|
+
var fs5 = __toESM2(require("fs"));
|
|
210885
|
+
var path5 = __toESM2(require("path"));
|
|
210886
210886
|
function findProjectRoot2(startDir) {
|
|
210887
210887
|
let currentDir = startDir;
|
|
210888
|
-
while (currentDir !==
|
|
210889
|
-
if (
|
|
210888
|
+
while (currentDir !== path5.parse(currentDir).root) {
|
|
210889
|
+
if (fs5.existsSync(path5.join(currentDir, ".vortex.db"))) {
|
|
210890
210890
|
return currentDir;
|
|
210891
210891
|
}
|
|
210892
|
-
if (
|
|
210892
|
+
if (fs5.existsSync(path5.join(currentDir, ".git"))) {
|
|
210893
210893
|
return currentDir;
|
|
210894
210894
|
}
|
|
210895
|
-
currentDir =
|
|
210895
|
+
currentDir = path5.dirname(currentDir);
|
|
210896
210896
|
}
|
|
210897
210897
|
return startDir;
|
|
210898
210898
|
}
|
|
@@ -211092,8 +211092,8 @@ var require_dist4 = __commonJS({
|
|
|
211092
211092
|
});
|
|
211093
211093
|
module2.exports = __toCommonJS(index_exports);
|
|
211094
211094
|
var import_typescript = __toESM2(require_typescript());
|
|
211095
|
-
var
|
|
211096
|
-
var
|
|
211095
|
+
var fs5 = __toESM2(require("fs"));
|
|
211096
|
+
var path5 = __toESM2(require("path"));
|
|
211097
211097
|
var import_crypto = __toESM2(require("crypto"));
|
|
211098
211098
|
var FALLBACK_KEYWORD_BLOCKLIST = /* @__PURE__ */ new Set([
|
|
211099
211099
|
"if",
|
|
@@ -211122,7 +211122,7 @@ var require_dist4 = __commonJS({
|
|
|
211122
211122
|
"throw"
|
|
211123
211123
|
]);
|
|
211124
211124
|
function chunkFile(filePath) {
|
|
211125
|
-
const source =
|
|
211125
|
+
const source = fs5.readFileSync(
|
|
211126
211126
|
filePath,
|
|
211127
211127
|
"utf-8"
|
|
211128
211128
|
);
|
|
@@ -211134,7 +211134,7 @@ var require_dist4 = __commonJS({
|
|
|
211134
211134
|
);
|
|
211135
211135
|
const chunks = [];
|
|
211136
211136
|
function getLanguage(file) {
|
|
211137
|
-
return
|
|
211137
|
+
return path5.extname(file).replace(".", "");
|
|
211138
211138
|
}
|
|
211139
211139
|
function getLine(pos) {
|
|
211140
211140
|
return sourceFile.getLineAndCharacterOfPosition(pos).line + 1;
|
|
@@ -211392,8 +211392,8 @@ var require_dist4 = __commonJS({
|
|
|
211392
211392
|
}
|
|
211393
211393
|
visit(sourceFile);
|
|
211394
211394
|
if (chunks.length === 0 && source.trim().length > 0) {
|
|
211395
|
-
const filename =
|
|
211396
|
-
const basename2 =
|
|
211395
|
+
const filename = path5.basename(filePath);
|
|
211396
|
+
const basename2 = path5.basename(filePath, path5.extname(filePath));
|
|
211397
211397
|
const hash = getHash(source);
|
|
211398
211398
|
const deps = /* @__PURE__ */ new Set();
|
|
211399
211399
|
const pyRegex = /(?:^|\n)\s*(?:from|import)\s+([a-zA-Z0-9_.]+)/g;
|
|
@@ -213971,8 +213971,8 @@ ${lines.join("\n")}${output.split("\n").length > 15 ? `
|
|
|
213971
213971
|
}
|
|
213972
213972
|
}
|
|
213973
213973
|
};
|
|
213974
|
-
var
|
|
213975
|
-
var
|
|
213974
|
+
var fs5 = __toESM2(require("fs"));
|
|
213975
|
+
var path5 = __toESM2(require("path"));
|
|
213976
213976
|
var FileReadTool4 = class {
|
|
213977
213977
|
name = "read_file";
|
|
213978
213978
|
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.';
|
|
@@ -213985,19 +213985,19 @@ ${lines.join("\n")}${output.split("\n").length > 15 ? `
|
|
|
213985
213985
|
if (!filePath) {
|
|
213986
213986
|
return "Error: 'path' argument is required.";
|
|
213987
213987
|
}
|
|
213988
|
-
const absolutePath =
|
|
213988
|
+
const absolutePath = path5.resolve(this.cwd, filePath);
|
|
213989
213989
|
if (!absolutePath.startsWith(this.cwd)) {
|
|
213990
213990
|
return "Error: Cannot read files outside the workspace directory.";
|
|
213991
213991
|
}
|
|
213992
|
-
const basename3 =
|
|
213992
|
+
const basename3 = path5.basename(absolutePath);
|
|
213993
213993
|
if (basename3.startsWith(".env") || basename3 === ".vortexenv") {
|
|
213994
213994
|
return "Error: Cannot read environment/secret files.";
|
|
213995
213995
|
}
|
|
213996
|
-
if (!
|
|
213996
|
+
if (!fs5.existsSync(absolutePath)) {
|
|
213997
213997
|
return `Error: File not found: ${filePath}`;
|
|
213998
213998
|
}
|
|
213999
213999
|
try {
|
|
214000
|
-
const content =
|
|
214000
|
+
const content = fs5.readFileSync(absolutePath, "utf8");
|
|
214001
214001
|
const lines = content.split("\n");
|
|
214002
214002
|
const startLine = args.startLine ? Math.max(1, parseInt(args.startLine, 10)) : 1;
|
|
214003
214003
|
const endLine = args.endLine ? Math.min(lines.length, parseInt(args.endLine, 10)) : Math.min(lines.length, 100);
|
|
@@ -214527,11 +214527,66 @@ var require_dist6 = __commonJS({
|
|
|
214527
214527
|
}
|
|
214528
214528
|
});
|
|
214529
214529
|
|
|
214530
|
+
// package.json
|
|
214531
|
+
var require_package = __commonJS({
|
|
214532
|
+
"package.json"(exports2, module2) {
|
|
214533
|
+
module2.exports = {
|
|
214534
|
+
name: "@vortex-ai/cli",
|
|
214535
|
+
version: "0.1.41",
|
|
214536
|
+
description: "Vortex CLI - The main entry point",
|
|
214537
|
+
main: "./dist/index.js",
|
|
214538
|
+
bin: {
|
|
214539
|
+
vortex: "./dist/index.js"
|
|
214540
|
+
},
|
|
214541
|
+
scripts: {
|
|
214542
|
+
build: "tsup src/index.ts --format cjs,esm --external @xenova/transformers && cp ../db/prisma/schema.prisma ./schema.prisma",
|
|
214543
|
+
dev: "tsx src/index.ts",
|
|
214544
|
+
watch: "tsup src/index.ts --format cjs,esm --watch",
|
|
214545
|
+
lint: "eslint .",
|
|
214546
|
+
"check-types": "tsc --noEmit",
|
|
214547
|
+
postinstall: `node -e "const fs=require('fs'); if(fs.existsSync('./schema.prisma')){require('child_process').execSync('npx prisma generate --schema=./schema.prisma', {stdio:'inherit'})}"`
|
|
214548
|
+
},
|
|
214549
|
+
dependencies: {
|
|
214550
|
+
"@octokit/rest": "^22.0.1",
|
|
214551
|
+
"@types/marked-terminal": "^6.1.1",
|
|
214552
|
+
"@google/genai": "^2.5.0",
|
|
214553
|
+
"groq-sdk": "^1.2.1",
|
|
214554
|
+
"@prisma/client": "^5.14.0",
|
|
214555
|
+
prisma: "^5.14.0",
|
|
214556
|
+
ignore: "^7.0.5",
|
|
214557
|
+
minisearch: "^7.2.0",
|
|
214558
|
+
"@xenova/transformers": "^2.17.2",
|
|
214559
|
+
boxen: "7",
|
|
214560
|
+
chalk: "^5.6.2",
|
|
214561
|
+
commander: "^12.1.0",
|
|
214562
|
+
dotenv: "^17.4.2",
|
|
214563
|
+
marked: "^15.0.12",
|
|
214564
|
+
"marked-terminal": "^7.3.0",
|
|
214565
|
+
ora: "^9.4.0",
|
|
214566
|
+
"parse-diff": "^0.12.0",
|
|
214567
|
+
zod: "^4.4.3"
|
|
214568
|
+
},
|
|
214569
|
+
devDependencies: {
|
|
214570
|
+
"@vortex/engine": "workspace:*",
|
|
214571
|
+
"@vortex/github": "workspace:*",
|
|
214572
|
+
"@vortex/git": "workspace:*",
|
|
214573
|
+
"@vortex/shared": "workspace:*",
|
|
214574
|
+
"@vortex/retrieval": "workspace:*",
|
|
214575
|
+
"@vortex/db": "workspace:*",
|
|
214576
|
+
"@vortex/typescript-config": "workspace:*",
|
|
214577
|
+
tsup: "^8.0.2",
|
|
214578
|
+
tsx: "^4.21.0",
|
|
214579
|
+
typescript: "5.9.2"
|
|
214580
|
+
}
|
|
214581
|
+
};
|
|
214582
|
+
}
|
|
214583
|
+
});
|
|
214584
|
+
|
|
214530
214585
|
// src/index.ts
|
|
214531
214586
|
var import_commander2 = require("commander");
|
|
214532
|
-
var
|
|
214533
|
-
var
|
|
214534
|
-
var
|
|
214587
|
+
var path4 = __toESM(require("path"));
|
|
214588
|
+
var dotenv2 = __toESM(require("dotenv"));
|
|
214589
|
+
var os2 = __toESM(require("os"));
|
|
214535
214590
|
|
|
214536
214591
|
// src/commands/init.ts
|
|
214537
214592
|
var import_engine = __toESM(require_dist5());
|
|
@@ -215299,26 +215354,93 @@ cacheCommand.command("clear").description("Clear all entries from the LLM cache"
|
|
|
215299
215354
|
}
|
|
215300
215355
|
});
|
|
215301
215356
|
|
|
215357
|
+
// src/commands/config.ts
|
|
215358
|
+
var fs4 = __toESM(require("fs"));
|
|
215359
|
+
var os = __toESM(require("os"));
|
|
215360
|
+
var path3 = __toESM(require("path"));
|
|
215361
|
+
var dotenv = __toESM(require("dotenv"));
|
|
215362
|
+
var envPath = path3.resolve(os.homedir(), ".vortexenv");
|
|
215363
|
+
function readEnv() {
|
|
215364
|
+
if (!fs4.existsSync(envPath)) return {};
|
|
215365
|
+
const content = fs4.readFileSync(envPath, "utf-8");
|
|
215366
|
+
return dotenv.parse(content);
|
|
215367
|
+
}
|
|
215368
|
+
function writeEnv(env) {
|
|
215369
|
+
const content = Object.entries(env).map(([k, v]) => `${k}="${v.replace(/"/g, '\\"')}"`).join("\n");
|
|
215370
|
+
fs4.writeFileSync(envPath, content + "\n", { mode: 384 });
|
|
215371
|
+
}
|
|
215372
|
+
async function configSet(provider, value) {
|
|
215373
|
+
const { default: chalk2 } = await import("chalk");
|
|
215374
|
+
const providerUpper = provider.toUpperCase();
|
|
215375
|
+
let envKey = "";
|
|
215376
|
+
if (providerUpper === "GEMINI") {
|
|
215377
|
+
envKey = "GEMINI_API_KEY";
|
|
215378
|
+
} else if (providerUpper === "GROQ") {
|
|
215379
|
+
envKey = "GROQ_API_KEY";
|
|
215380
|
+
} else {
|
|
215381
|
+
console.log(chalk2.red(`Invalid option: ${chalk2.bold(provider)}. Supported options are 'gemini' and 'groq'.`));
|
|
215382
|
+
console.log(chalk2.gray(`Usage: vortex config set gemini <your-key>`));
|
|
215383
|
+
process.exit(1);
|
|
215384
|
+
}
|
|
215385
|
+
const env = readEnv();
|
|
215386
|
+
env[envKey] = value;
|
|
215387
|
+
writeEnv(env);
|
|
215388
|
+
console.log(chalk2.green(`\u2713 Successfully set ${chalk2.bold(envKey)}`));
|
|
215389
|
+
}
|
|
215390
|
+
async function configGet(key) {
|
|
215391
|
+
const { default: chalk2 } = await import("chalk");
|
|
215392
|
+
const env = readEnv();
|
|
215393
|
+
if (env[key]) {
|
|
215394
|
+
console.log(env[key]);
|
|
215395
|
+
} else {
|
|
215396
|
+
console.log(chalk2.gray(`Key ${chalk2.bold(key)} is not set.`));
|
|
215397
|
+
}
|
|
215398
|
+
}
|
|
215399
|
+
async function configList() {
|
|
215400
|
+
const { default: chalk2 } = await import("chalk");
|
|
215401
|
+
const env = readEnv();
|
|
215402
|
+
const keys = Object.keys(env);
|
|
215403
|
+
if (keys.length === 0) {
|
|
215404
|
+
console.log(chalk2.gray("No configuration values set in ~/.vortexenv"));
|
|
215405
|
+
return;
|
|
215406
|
+
}
|
|
215407
|
+
console.log(chalk2.blue.bold("\nVortex Global Configuration:\n"));
|
|
215408
|
+
for (const [k, v] of Object.entries(env)) {
|
|
215409
|
+
let masked = "***";
|
|
215410
|
+
if (v.length > 10) {
|
|
215411
|
+
masked = `${v.substring(0, 4)}...${v.substring(v.length - 4)}`;
|
|
215412
|
+
} else if (v.length > 0) {
|
|
215413
|
+
masked = v;
|
|
215414
|
+
}
|
|
215415
|
+
console.log(` ${chalk2.cyan.bold(k)}: ${chalk2.gray(masked)}`);
|
|
215416
|
+
}
|
|
215417
|
+
console.log(`
|
|
215418
|
+
Location: ${chalk2.gray(envPath)}
|
|
215419
|
+
`);
|
|
215420
|
+
}
|
|
215421
|
+
|
|
215302
215422
|
// src/index.ts
|
|
215303
|
-
|
|
215423
|
+
process.env.DOTENV_CONFIG_QUIET = "true";
|
|
215424
|
+
var monorepoEnv = path4.resolve(__dirname, "../../../.env");
|
|
215304
215425
|
if (require("fs").existsSync(monorepoEnv)) {
|
|
215305
|
-
const envConfig =
|
|
215426
|
+
const envConfig = dotenv2.parse(require("fs").readFileSync(monorepoEnv));
|
|
215306
215427
|
for (const k in envConfig) {
|
|
215307
215428
|
if (k === "NODE_ENV") continue;
|
|
215308
215429
|
if (!process.env[k]) process.env[k] = envConfig[k];
|
|
215309
215430
|
}
|
|
215310
215431
|
}
|
|
215311
|
-
|
|
215312
|
-
var cwdEnv =
|
|
215432
|
+
dotenv2.config({ path: path4.resolve(os2.homedir(), ".vortexenv"), override: true });
|
|
215433
|
+
var cwdEnv = path4.resolve(process.cwd(), ".env");
|
|
215313
215434
|
if (require("fs").existsSync(cwdEnv)) {
|
|
215314
|
-
const envConfig =
|
|
215435
|
+
const envConfig = dotenv2.parse(require("fs").readFileSync(cwdEnv));
|
|
215315
215436
|
for (const k in envConfig) {
|
|
215316
215437
|
if (k === "NODE_ENV") continue;
|
|
215317
215438
|
process.env[k] = envConfig[k];
|
|
215318
215439
|
}
|
|
215319
215440
|
}
|
|
215320
215441
|
var program = new import_commander2.Command();
|
|
215321
|
-
|
|
215442
|
+
var { version } = require_package();
|
|
215443
|
+
program.name("vortex").description("Developer Intelligence & PR Review Engine").version(version);
|
|
215322
215444
|
program.hook("preAction", (thisCommand, actionCommand) => {
|
|
215323
215445
|
if (actionCommand.opts().cache === false) {
|
|
215324
215446
|
process.env.VORTEX_DISABLE_CACHE = "true";
|
|
@@ -215334,6 +215456,10 @@ program.command("solve-issue").description("Autonomously solve a GitHub issue us
|
|
|
215334
215456
|
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);
|
|
215335
215457
|
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);
|
|
215336
215458
|
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);
|
|
215459
|
+
var configCmd = program.command("config").description("Manage global configuration and API keys");
|
|
215460
|
+
configCmd.command("set <provider> <key>").description("Set an API key for a specific provider (gemini or groq)").action(configSet);
|
|
215461
|
+
configCmd.command("get <key>").description("Get a global configuration value").action(configGet);
|
|
215462
|
+
configCmd.command("list").description("List all global configuration values").action(configList);
|
|
215337
215463
|
program.addCommand(cacheCommand);
|
|
215338
215464
|
program.parse();
|
|
215339
215465
|
/*! Bundled license information:
|