typescript 5.2.0-dev.20230706 → 5.2.0-dev.20230708
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/tsc.js +118 -105
- package/lib/tsserver.js +272 -155
- package/lib/tsserverlibrary.d.ts +5 -1
- package/lib/tsserverlibrary.js +272 -155
- package/lib/typescript.d.ts +4 -0
- package/lib/typescript.js +259 -143
- package/lib/typingsInstaller.js +63 -66
- package/package.json +2 -2
package/lib/typescript.js
CHANGED
|
@@ -35,7 +35,7 @@ var ts = (() => {
|
|
|
35
35
|
"src/compiler/corePublic.ts"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
versionMajorMinor = "5.2";
|
|
38
|
-
version = `${versionMajorMinor}.0-dev.
|
|
38
|
+
version = `${versionMajorMinor}.0-dev.20230708`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -1464,8 +1464,8 @@ var ts = (() => {
|
|
|
1464
1464
|
}
|
|
1465
1465
|
return false;
|
|
1466
1466
|
}
|
|
1467
|
-
function createGetCanonicalFileName(
|
|
1468
|
-
return
|
|
1467
|
+
function createGetCanonicalFileName(useCaseSensitiveFileNames2) {
|
|
1468
|
+
return useCaseSensitiveFileNames2 ? identity : toFileNameLowerCase;
|
|
1469
1469
|
}
|
|
1470
1470
|
function patternText({ prefix, suffix }) {
|
|
1471
1471
|
return `${prefix}*${suffix}`;
|
|
@@ -5425,10 +5425,10 @@ ${lanes.join("\n")}
|
|
|
5425
5425
|
pollingIntervalQueue(pollingInterval).pollScheduled = host.setTimeout(pollingInterval === 250 /* Low */ ? pollLowPollingIntervalQueue : pollPollingIntervalQueue, pollingInterval, pollingInterval === 250 /* Low */ ? "pollLowPollingIntervalQueue" : "pollPollingIntervalQueue", pollingIntervalQueue(pollingInterval));
|
|
5426
5426
|
}
|
|
5427
5427
|
}
|
|
5428
|
-
function createUseFsEventsOnParentDirectoryWatchFile(fsWatch,
|
|
5428
|
+
function createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2) {
|
|
5429
5429
|
const fileWatcherCallbacks = createMultiMap();
|
|
5430
5430
|
const dirWatchers = /* @__PURE__ */ new Map();
|
|
5431
|
-
const toCanonicalName = createGetCanonicalFileName(
|
|
5431
|
+
const toCanonicalName = createGetCanonicalFileName(useCaseSensitiveFileNames2);
|
|
5432
5432
|
return nonPollingWatchFile;
|
|
5433
5433
|
function nonPollingWatchFile(fileName, callback, _pollingInterval, fallbackOptions) {
|
|
5434
5434
|
const filePath = toCanonicalName(fileName);
|
|
@@ -5504,8 +5504,8 @@ ${lanes.join("\n")}
|
|
|
5504
5504
|
pollScheduled = host.setTimeout(pollQueue, 2e3 /* High */, "pollQueue");
|
|
5505
5505
|
}
|
|
5506
5506
|
}
|
|
5507
|
-
function createSingleWatcherPerName(cache,
|
|
5508
|
-
const toCanonicalFileName = createGetCanonicalFileName(
|
|
5507
|
+
function createSingleWatcherPerName(cache, useCaseSensitiveFileNames2, name, callback, createWatcher) {
|
|
5508
|
+
const toCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2);
|
|
5509
5509
|
const path = toCanonicalFileName(name);
|
|
5510
5510
|
const existing = cache.get(path);
|
|
5511
5511
|
if (existing) {
|
|
@@ -5555,7 +5555,7 @@ ${lanes.join("\n")}
|
|
|
5555
5555
|
}
|
|
5556
5556
|
function createDirectoryWatcherSupportingRecursive({
|
|
5557
5557
|
watchDirectory,
|
|
5558
|
-
useCaseSensitiveFileNames,
|
|
5558
|
+
useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
|
|
5559
5559
|
getCurrentDirectory,
|
|
5560
5560
|
getAccessibleSortedChildDirectories,
|
|
5561
5561
|
fileSystemEntryExists,
|
|
@@ -5567,8 +5567,8 @@ ${lanes.join("\n")}
|
|
|
5567
5567
|
const callbackCache = createMultiMap();
|
|
5568
5568
|
const cacheToUpdateChildWatches = /* @__PURE__ */ new Map();
|
|
5569
5569
|
let timerToUpdateChildWatches;
|
|
5570
|
-
const filePathComparer = getStringComparer(!
|
|
5571
|
-
const toCanonicalFilePath = createGetCanonicalFileName(
|
|
5570
|
+
const filePathComparer = getStringComparer(!useCaseSensitiveFileNames2);
|
|
5571
|
+
const toCanonicalFilePath = createGetCanonicalFileName(useCaseSensitiveFileNames2);
|
|
5572
5572
|
return (dirName, callback, recursive, options) => recursive ? createDirectoryWatcher(dirName, options, callback) : watchDirectory(dirName, callback, recursive, options);
|
|
5573
5573
|
function createDirectoryWatcher(dirName, options, callback) {
|
|
5574
5574
|
const dirPath = toCanonicalFilePath(dirName);
|
|
@@ -5735,12 +5735,12 @@ ${lanes.join("\n")}
|
|
|
5735
5735
|
}
|
|
5736
5736
|
}
|
|
5737
5737
|
function isIgnoredPath(path, options) {
|
|
5738
|
-
return some(ignoredPaths, (searchPath) => isInPath(path, searchPath)) || isIgnoredByWatchOptions(path, options,
|
|
5738
|
+
return some(ignoredPaths, (searchPath) => isInPath(path, searchPath)) || isIgnoredByWatchOptions(path, options, useCaseSensitiveFileNames2, getCurrentDirectory);
|
|
5739
5739
|
}
|
|
5740
5740
|
function isInPath(path, searchPath) {
|
|
5741
5741
|
if (stringContains(path, searchPath))
|
|
5742
5742
|
return true;
|
|
5743
|
-
if (
|
|
5743
|
+
if (useCaseSensitiveFileNames2)
|
|
5744
5744
|
return false;
|
|
5745
5745
|
return stringContains(toCanonicalFilePath(path), searchPath);
|
|
5746
5746
|
}
|
|
@@ -5758,14 +5758,14 @@ ${lanes.join("\n")}
|
|
|
5758
5758
|
}
|
|
5759
5759
|
};
|
|
5760
5760
|
}
|
|
5761
|
-
function isIgnoredByWatchOptions(pathToCheck, options,
|
|
5762
|
-
return ((options == null ? void 0 : options.excludeDirectories) || (options == null ? void 0 : options.excludeFiles)) && (matchesExclude(pathToCheck, options == null ? void 0 : options.excludeFiles,
|
|
5761
|
+
function isIgnoredByWatchOptions(pathToCheck, options, useCaseSensitiveFileNames2, getCurrentDirectory) {
|
|
5762
|
+
return ((options == null ? void 0 : options.excludeDirectories) || (options == null ? void 0 : options.excludeFiles)) && (matchesExclude(pathToCheck, options == null ? void 0 : options.excludeFiles, useCaseSensitiveFileNames2, getCurrentDirectory()) || matchesExclude(pathToCheck, options == null ? void 0 : options.excludeDirectories, useCaseSensitiveFileNames2, getCurrentDirectory()));
|
|
5763
5763
|
}
|
|
5764
|
-
function createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options,
|
|
5764
|
+
function createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames2, getCurrentDirectory) {
|
|
5765
5765
|
return (eventName, relativeFileName) => {
|
|
5766
5766
|
if (eventName === "rename") {
|
|
5767
5767
|
const fileName = !relativeFileName ? directoryName : normalizePath(combinePaths(directoryName, relativeFileName));
|
|
5768
|
-
if (!relativeFileName || !isIgnoredByWatchOptions(fileName, options,
|
|
5768
|
+
if (!relativeFileName || !isIgnoredByWatchOptions(fileName, options, useCaseSensitiveFileNames2, getCurrentDirectory)) {
|
|
5769
5769
|
callback(fileName);
|
|
5770
5770
|
}
|
|
5771
5771
|
}
|
|
@@ -5778,7 +5778,7 @@ ${lanes.join("\n")}
|
|
|
5778
5778
|
clearTimeout: clearTimeout2,
|
|
5779
5779
|
fsWatchWorker,
|
|
5780
5780
|
fileSystemEntryExists,
|
|
5781
|
-
useCaseSensitiveFileNames,
|
|
5781
|
+
useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
|
|
5782
5782
|
getCurrentDirectory,
|
|
5783
5783
|
fsSupportsRecursiveFsWatch,
|
|
5784
5784
|
getAccessibleSortedChildDirectories,
|
|
@@ -5850,7 +5850,7 @@ ${lanes.join("\n")}
|
|
|
5850
5850
|
);
|
|
5851
5851
|
case 5 /* UseFsEventsOnParentDirectory */:
|
|
5852
5852
|
if (!nonPollingWatchFile) {
|
|
5853
|
-
nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch,
|
|
5853
|
+
nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2);
|
|
5854
5854
|
}
|
|
5855
5855
|
return nonPollingWatchFile(fileName, callback, pollingInterval, getFallbackOptions(options));
|
|
5856
5856
|
default:
|
|
@@ -5899,7 +5899,7 @@ ${lanes.join("\n")}
|
|
|
5899
5899
|
return fsWatch(
|
|
5900
5900
|
directoryName,
|
|
5901
5901
|
1 /* Directory */,
|
|
5902
|
-
createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options,
|
|
5902
|
+
createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames2, getCurrentDirectory),
|
|
5903
5903
|
recursive,
|
|
5904
5904
|
500 /* Medium */,
|
|
5905
5905
|
getFallbackOptions(options)
|
|
@@ -5907,7 +5907,7 @@ ${lanes.join("\n")}
|
|
|
5907
5907
|
}
|
|
5908
5908
|
if (!hostRecursiveDirectoryWatcher) {
|
|
5909
5909
|
hostRecursiveDirectoryWatcher = createDirectoryWatcherSupportingRecursive({
|
|
5910
|
-
useCaseSensitiveFileNames,
|
|
5910
|
+
useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
|
|
5911
5911
|
getCurrentDirectory,
|
|
5912
5912
|
fileSystemEntryExists,
|
|
5913
5913
|
getAccessibleSortedChildDirectories,
|
|
@@ -5953,7 +5953,7 @@ ${lanes.join("\n")}
|
|
|
5953
5953
|
return fsWatch(
|
|
5954
5954
|
directoryName,
|
|
5955
5955
|
1 /* Directory */,
|
|
5956
|
-
createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options,
|
|
5956
|
+
createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames2, getCurrentDirectory),
|
|
5957
5957
|
recursive,
|
|
5958
5958
|
500 /* Medium */,
|
|
5959
5959
|
getFallbackOptions(watchDirectoryOptions)
|
|
@@ -5981,7 +5981,7 @@ ${lanes.join("\n")}
|
|
|
5981
5981
|
function pollingWatchFile(fileName, callback, pollingInterval, options) {
|
|
5982
5982
|
return createSingleWatcherPerName(
|
|
5983
5983
|
pollingWatches,
|
|
5984
|
-
|
|
5984
|
+
useCaseSensitiveFileNames2,
|
|
5985
5985
|
fileName,
|
|
5986
5986
|
callback,
|
|
5987
5987
|
(cb) => pollingWatchFileWorker(fileName, cb, pollingInterval, options)
|
|
@@ -5990,7 +5990,7 @@ ${lanes.join("\n")}
|
|
|
5990
5990
|
function fsWatch(fileOrDirectory, entryKind, callback, recursive, fallbackPollingInterval, fallbackOptions) {
|
|
5991
5991
|
return createSingleWatcherPerName(
|
|
5992
5992
|
recursive ? fsWatchesRecursive : fsWatches,
|
|
5993
|
-
|
|
5993
|
+
useCaseSensitiveFileNames2,
|
|
5994
5994
|
fileOrDirectory,
|
|
5995
5995
|
callback,
|
|
5996
5996
|
(cb) => fsWatchHandlingExistenceOnHost(fileOrDirectory, entryKind, cb, recursive, fallbackPollingInterval, fallbackOptions)
|
|
@@ -6149,7 +6149,7 @@ ${lanes.join("\n")}
|
|
|
6149
6149
|
const Buffer2 = require("buffer").Buffer;
|
|
6150
6150
|
const isLinuxOrMacOs = process.platform === "linux" || process.platform === "darwin";
|
|
6151
6151
|
const platform = _os.platform();
|
|
6152
|
-
const
|
|
6152
|
+
const useCaseSensitiveFileNames2 = isFileSystemCaseSensitive();
|
|
6153
6153
|
const fsRealpath = !!_fs.realpathSync.native ? process.platform === "win32" ? fsRealPathHandlingLongPath : _fs.realpathSync.native : _fs.realpathSync;
|
|
6154
6154
|
const executingFilePath = __filename.endsWith("sys.js") ? _path.join(_path.dirname(__dirname), "__fake__.js") : __filename;
|
|
6155
6155
|
const fsSupportsRecursiveFsWatch = process.platform === "win32" || process.platform === "darwin";
|
|
@@ -6160,7 +6160,7 @@ ${lanes.join("\n")}
|
|
|
6160
6160
|
setTimeout,
|
|
6161
6161
|
clearTimeout,
|
|
6162
6162
|
fsWatchWorker,
|
|
6163
|
-
useCaseSensitiveFileNames,
|
|
6163
|
+
useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
|
|
6164
6164
|
getCurrentDirectory,
|
|
6165
6165
|
fileSystemEntryExists,
|
|
6166
6166
|
// Node 4.0 `fs.watch` function supports the "recursive" option on both OSX and Windows
|
|
@@ -6177,7 +6177,7 @@ ${lanes.join("\n")}
|
|
|
6177
6177
|
const nodeSystem = {
|
|
6178
6178
|
args: process.argv.slice(2),
|
|
6179
6179
|
newLine: _os.EOL,
|
|
6180
|
-
useCaseSensitiveFileNames,
|
|
6180
|
+
useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
|
|
6181
6181
|
write(s) {
|
|
6182
6182
|
process.stdout.write(s);
|
|
6183
6183
|
},
|
|
@@ -6306,12 +6306,12 @@ ${lanes.join("\n")}
|
|
|
6306
6306
|
for (const node of profile.nodes) {
|
|
6307
6307
|
if (node.callFrame.url) {
|
|
6308
6308
|
const url = normalizeSlashes(node.callFrame.url);
|
|
6309
|
-
if (containsPath(fileUrlRoot, url,
|
|
6309
|
+
if (containsPath(fileUrlRoot, url, useCaseSensitiveFileNames2)) {
|
|
6310
6310
|
node.callFrame.url = getRelativePathToDirectoryOrUrl(
|
|
6311
6311
|
fileUrlRoot,
|
|
6312
6312
|
url,
|
|
6313
6313
|
fileUrlRoot,
|
|
6314
|
-
createGetCanonicalFileName(
|
|
6314
|
+
createGetCanonicalFileName(useCaseSensitiveFileNames2),
|
|
6315
6315
|
/*isAbsolutePathAnUrl*/
|
|
6316
6316
|
true
|
|
6317
6317
|
);
|
|
@@ -6491,7 +6491,7 @@ ${lanes.join("\n")}
|
|
|
6491
6491
|
}
|
|
6492
6492
|
}
|
|
6493
6493
|
function readDirectory(path, extensions, excludes, includes, depth) {
|
|
6494
|
-
return matchFiles(path, extensions, excludes, includes,
|
|
6494
|
+
return matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames2, process.cwd(), depth, getAccessibleFileSystemEntries, realpath);
|
|
6495
6495
|
}
|
|
6496
6496
|
function fileSystemEntryExists(path, entryKind) {
|
|
6497
6497
|
const originalStackTraceLimit = Error.stackTraceLimit;
|
|
@@ -9739,7 +9739,7 @@ ${lanes.join("\n")}
|
|
|
9739
9739
|
if (withMinus)
|
|
9740
9740
|
start2--;
|
|
9741
9741
|
error2(Diagnostics.Octal_literals_are_not_allowed_Use_the_syntax_0, start2, pos - start2, literal);
|
|
9742
|
-
return
|
|
9742
|
+
return 9 /* NumericLiteral */;
|
|
9743
9743
|
}
|
|
9744
9744
|
} else {
|
|
9745
9745
|
mainFragment = scanNumberFragment();
|
|
@@ -9779,20 +9779,18 @@ ${lanes.join("\n")}
|
|
|
9779
9779
|
}
|
|
9780
9780
|
if (tokenFlags & 8192 /* ContainsLeadingZero */) {
|
|
9781
9781
|
error2(Diagnostics.Decimals_with_leading_zeros_are_not_allowed, start2, end2 - start2);
|
|
9782
|
-
|
|
9782
|
+
tokenValue = "" + +result;
|
|
9783
|
+
return 9 /* NumericLiteral */;
|
|
9783
9784
|
}
|
|
9784
9785
|
if (decimalFragment !== void 0 || tokenFlags & 16 /* Scientific */) {
|
|
9785
9786
|
checkForIdentifierStartAfterNumericLiteral(start2, decimalFragment === void 0 && !!(tokenFlags & 16 /* Scientific */));
|
|
9786
|
-
|
|
9787
|
-
|
|
9788
|
-
value: "" + +result
|
|
9789
|
-
// if value is not an integer, it can be safely coerced to a number
|
|
9790
|
-
};
|
|
9787
|
+
tokenValue = "" + +result;
|
|
9788
|
+
return 9 /* NumericLiteral */;
|
|
9791
9789
|
} else {
|
|
9792
9790
|
tokenValue = result;
|
|
9793
9791
|
const type = checkBigIntSuffix();
|
|
9794
9792
|
checkForIdentifierStartAfterNumericLiteral(start2);
|
|
9795
|
-
return
|
|
9793
|
+
return type;
|
|
9796
9794
|
}
|
|
9797
9795
|
}
|
|
9798
9796
|
function checkForIdentifierStartAfterNumericLiteral(numericStart, isScientific) {
|
|
@@ -10401,7 +10399,7 @@ ${lanes.join("\n")}
|
|
|
10401
10399
|
return token = 41 /* MinusToken */;
|
|
10402
10400
|
case 46 /* dot */:
|
|
10403
10401
|
if (isDigit(text.charCodeAt(pos + 1))) {
|
|
10404
|
-
|
|
10402
|
+
scanNumber();
|
|
10405
10403
|
return token = 9 /* NumericLiteral */;
|
|
10406
10404
|
}
|
|
10407
10405
|
if (text.charCodeAt(pos + 1) === 46 /* dot */ && text.charCodeAt(pos + 2) === 46 /* dot */) {
|
|
@@ -10519,8 +10517,7 @@ ${lanes.join("\n")}
|
|
|
10519
10517
|
case 55 /* _7 */:
|
|
10520
10518
|
case 56 /* _8 */:
|
|
10521
10519
|
case 57 /* _9 */:
|
|
10522
|
-
|
|
10523
|
-
return token;
|
|
10520
|
+
return token = scanNumber();
|
|
10524
10521
|
case 58 /* colon */:
|
|
10525
10522
|
pos++;
|
|
10526
10523
|
return token = 59 /* ColonToken */;
|
|
@@ -18405,7 +18402,7 @@ ${lanes.join("\n")}
|
|
|
18405
18402
|
function replaceWildcardCharacter(match, singleAsteriskRegexFragment) {
|
|
18406
18403
|
return match === "*" ? singleAsteriskRegexFragment : match === "?" ? "[^/]" : "\\" + match;
|
|
18407
18404
|
}
|
|
18408
|
-
function getFileMatcherPatterns(path, excludes, includes,
|
|
18405
|
+
function getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames2, currentDirectory) {
|
|
18409
18406
|
path = normalizePath(path);
|
|
18410
18407
|
currentDirectory = normalizePath(currentDirectory);
|
|
18411
18408
|
const absolutePath = combinePaths(currentDirectory, path);
|
|
@@ -18414,22 +18411,22 @@ ${lanes.join("\n")}
|
|
|
18414
18411
|
includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"),
|
|
18415
18412
|
includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"),
|
|
18416
18413
|
excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"),
|
|
18417
|
-
basePaths: getBasePaths(path, includes,
|
|
18414
|
+
basePaths: getBasePaths(path, includes, useCaseSensitiveFileNames2)
|
|
18418
18415
|
};
|
|
18419
18416
|
}
|
|
18420
|
-
function getRegexFromPattern(pattern,
|
|
18421
|
-
return new RegExp(pattern,
|
|
18417
|
+
function getRegexFromPattern(pattern, useCaseSensitiveFileNames2) {
|
|
18418
|
+
return new RegExp(pattern, useCaseSensitiveFileNames2 ? "" : "i");
|
|
18422
18419
|
}
|
|
18423
|
-
function matchFiles(path, extensions, excludes, includes,
|
|
18420
|
+
function matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames2, currentDirectory, depth, getFileSystemEntries, realpath) {
|
|
18424
18421
|
path = normalizePath(path);
|
|
18425
18422
|
currentDirectory = normalizePath(currentDirectory);
|
|
18426
|
-
const patterns = getFileMatcherPatterns(path, excludes, includes,
|
|
18427
|
-
const includeFileRegexes = patterns.includeFilePatterns && patterns.includeFilePatterns.map((pattern) => getRegexFromPattern(pattern,
|
|
18428
|
-
const includeDirectoryRegex = patterns.includeDirectoryPattern && getRegexFromPattern(patterns.includeDirectoryPattern,
|
|
18429
|
-
const excludeRegex = patterns.excludePattern && getRegexFromPattern(patterns.excludePattern,
|
|
18423
|
+
const patterns = getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames2, currentDirectory);
|
|
18424
|
+
const includeFileRegexes = patterns.includeFilePatterns && patterns.includeFilePatterns.map((pattern) => getRegexFromPattern(pattern, useCaseSensitiveFileNames2));
|
|
18425
|
+
const includeDirectoryRegex = patterns.includeDirectoryPattern && getRegexFromPattern(patterns.includeDirectoryPattern, useCaseSensitiveFileNames2);
|
|
18426
|
+
const excludeRegex = patterns.excludePattern && getRegexFromPattern(patterns.excludePattern, useCaseSensitiveFileNames2);
|
|
18430
18427
|
const results = includeFileRegexes ? includeFileRegexes.map(() => []) : [[]];
|
|
18431
18428
|
const visited = /* @__PURE__ */ new Map();
|
|
18432
|
-
const toCanonical = createGetCanonicalFileName(
|
|
18429
|
+
const toCanonical = createGetCanonicalFileName(useCaseSensitiveFileNames2);
|
|
18433
18430
|
for (const basePath of patterns.basePaths) {
|
|
18434
18431
|
visitDirectory(basePath, combinePaths(currentDirectory, basePath), depth);
|
|
18435
18432
|
}
|
|
@@ -18471,7 +18468,7 @@ ${lanes.join("\n")}
|
|
|
18471
18468
|
}
|
|
18472
18469
|
}
|
|
18473
18470
|
}
|
|
18474
|
-
function getBasePaths(path, includes,
|
|
18471
|
+
function getBasePaths(path, includes, useCaseSensitiveFileNames2) {
|
|
18475
18472
|
const basePaths = [path];
|
|
18476
18473
|
if (includes) {
|
|
18477
18474
|
const includeBasePaths = [];
|
|
@@ -18479,9 +18476,9 @@ ${lanes.join("\n")}
|
|
|
18479
18476
|
const absolute = isRootedDiskPath(include) ? include : normalizePath(combinePaths(path, include));
|
|
18480
18477
|
includeBasePaths.push(getIncludeBasePath(absolute));
|
|
18481
18478
|
}
|
|
18482
|
-
includeBasePaths.sort(getStringComparer(!
|
|
18479
|
+
includeBasePaths.sort(getStringComparer(!useCaseSensitiveFileNames2));
|
|
18483
18480
|
for (const includeBasePath of includeBasePaths) {
|
|
18484
|
-
if (every(basePaths, (basePath) => !containsPath(basePath, includeBasePath, path, !
|
|
18481
|
+
if (every(basePaths, (basePath) => !containsPath(basePath, includeBasePath, path, !useCaseSensitiveFileNames2))) {
|
|
18485
18482
|
basePaths.push(includeBasePath);
|
|
18486
18483
|
}
|
|
18487
18484
|
}
|
|
@@ -37272,19 +37269,19 @@ ${lanes.join("\n")}
|
|
|
37272
37269
|
const wildcardFiles = arrayFrom(wildcardFileMap.values());
|
|
37273
37270
|
return literalFiles.concat(wildcardFiles, arrayFrom(wildCardJsonFileMap.values()));
|
|
37274
37271
|
}
|
|
37275
|
-
function isExcludedFile(pathToCheck, spec, basePath,
|
|
37272
|
+
function isExcludedFile(pathToCheck, spec, basePath, useCaseSensitiveFileNames2, currentDirectory) {
|
|
37276
37273
|
const { validatedFilesSpec, validatedIncludeSpecs, validatedExcludeSpecs } = spec;
|
|
37277
37274
|
if (!length(validatedIncludeSpecs) || !length(validatedExcludeSpecs))
|
|
37278
37275
|
return false;
|
|
37279
37276
|
basePath = normalizePath(basePath);
|
|
37280
|
-
const keyMapper = createGetCanonicalFileName(
|
|
37277
|
+
const keyMapper = createGetCanonicalFileName(useCaseSensitiveFileNames2);
|
|
37281
37278
|
if (validatedFilesSpec) {
|
|
37282
37279
|
for (const fileName of validatedFilesSpec) {
|
|
37283
37280
|
if (keyMapper(getNormalizedAbsolutePath(fileName, basePath)) === pathToCheck)
|
|
37284
37281
|
return false;
|
|
37285
37282
|
}
|
|
37286
37283
|
}
|
|
37287
|
-
return matchesExcludeWorker(pathToCheck, validatedExcludeSpecs,
|
|
37284
|
+
return matchesExcludeWorker(pathToCheck, validatedExcludeSpecs, useCaseSensitiveFileNames2, currentDirectory, basePath);
|
|
37288
37285
|
}
|
|
37289
37286
|
function invalidDotDotAfterRecursiveWildcard(s) {
|
|
37290
37287
|
const wildcardIndex = startsWith(s, "**/") ? 0 : s.indexOf("/**/");
|
|
@@ -37294,17 +37291,17 @@ ${lanes.join("\n")}
|
|
|
37294
37291
|
const lastDotIndex = endsWith(s, "/..") ? s.length : s.lastIndexOf("/../");
|
|
37295
37292
|
return lastDotIndex > wildcardIndex;
|
|
37296
37293
|
}
|
|
37297
|
-
function matchesExclude(pathToCheck, excludeSpecs,
|
|
37294
|
+
function matchesExclude(pathToCheck, excludeSpecs, useCaseSensitiveFileNames2, currentDirectory) {
|
|
37298
37295
|
return matchesExcludeWorker(
|
|
37299
37296
|
pathToCheck,
|
|
37300
37297
|
filter(excludeSpecs, (spec) => !invalidDotDotAfterRecursiveWildcard(spec)),
|
|
37301
|
-
|
|
37298
|
+
useCaseSensitiveFileNames2,
|
|
37302
37299
|
currentDirectory
|
|
37303
37300
|
);
|
|
37304
37301
|
}
|
|
37305
|
-
function matchesExcludeWorker(pathToCheck, excludeSpecs,
|
|
37302
|
+
function matchesExcludeWorker(pathToCheck, excludeSpecs, useCaseSensitiveFileNames2, currentDirectory, basePath) {
|
|
37306
37303
|
const excludePattern = getRegularExpressionForWildcard(excludeSpecs, combinePaths(normalizePath(currentDirectory), basePath), "exclude");
|
|
37307
|
-
const excludeRegex = excludePattern && getRegexFromPattern(excludePattern,
|
|
37304
|
+
const excludeRegex = excludePattern && getRegexFromPattern(excludePattern, useCaseSensitiveFileNames2);
|
|
37308
37305
|
if (!excludeRegex)
|
|
37309
37306
|
return false;
|
|
37310
37307
|
if (excludeRegex.test(pathToCheck))
|
|
@@ -37334,9 +37331,9 @@ ${lanes.join("\n")}
|
|
|
37334
37331
|
return [Diagnostics.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec];
|
|
37335
37332
|
}
|
|
37336
37333
|
}
|
|
37337
|
-
function getWildcardDirectories({ validatedIncludeSpecs: include, validatedExcludeSpecs: exclude }, path,
|
|
37334
|
+
function getWildcardDirectories({ validatedIncludeSpecs: include, validatedExcludeSpecs: exclude }, path, useCaseSensitiveFileNames2) {
|
|
37338
37335
|
const rawExcludeRegex = getRegularExpressionForWildcard(exclude, path, "exclude");
|
|
37339
|
-
const excludeRegex = rawExcludeRegex && new RegExp(rawExcludeRegex,
|
|
37336
|
+
const excludeRegex = rawExcludeRegex && new RegExp(rawExcludeRegex, useCaseSensitiveFileNames2 ? "" : "i");
|
|
37340
37337
|
const wildcardDirectories = {};
|
|
37341
37338
|
if (include !== void 0) {
|
|
37342
37339
|
const recursiveKeys = [];
|
|
@@ -37345,7 +37342,7 @@ ${lanes.join("\n")}
|
|
|
37345
37342
|
if (excludeRegex && excludeRegex.test(spec)) {
|
|
37346
37343
|
continue;
|
|
37347
37344
|
}
|
|
37348
|
-
const match = getWildcardDirectoryFromSpec(spec,
|
|
37345
|
+
const match = getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames2);
|
|
37349
37346
|
if (match) {
|
|
37350
37347
|
const { key, flags } = match;
|
|
37351
37348
|
const existingFlags = wildcardDirectories[key];
|
|
@@ -37360,7 +37357,7 @@ ${lanes.join("\n")}
|
|
|
37360
37357
|
for (const key in wildcardDirectories) {
|
|
37361
37358
|
if (hasProperty(wildcardDirectories, key)) {
|
|
37362
37359
|
for (const recursiveKey of recursiveKeys) {
|
|
37363
|
-
if (key !== recursiveKey && containsPath(recursiveKey, key, path, !
|
|
37360
|
+
if (key !== recursiveKey && containsPath(recursiveKey, key, path, !useCaseSensitiveFileNames2)) {
|
|
37364
37361
|
delete wildcardDirectories[key];
|
|
37365
37362
|
}
|
|
37366
37363
|
}
|
|
@@ -37369,20 +37366,20 @@ ${lanes.join("\n")}
|
|
|
37369
37366
|
}
|
|
37370
37367
|
return wildcardDirectories;
|
|
37371
37368
|
}
|
|
37372
|
-
function getWildcardDirectoryFromSpec(spec,
|
|
37369
|
+
function getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames2) {
|
|
37373
37370
|
const match = wildcardDirectoryPattern.exec(spec);
|
|
37374
37371
|
if (match) {
|
|
37375
37372
|
const questionWildcardIndex = spec.indexOf("?");
|
|
37376
37373
|
const starWildcardIndex = spec.indexOf("*");
|
|
37377
37374
|
const lastDirectorySeperatorIndex = spec.lastIndexOf(directorySeparator);
|
|
37378
37375
|
return {
|
|
37379
|
-
key:
|
|
37376
|
+
key: useCaseSensitiveFileNames2 ? match[0] : toFileNameLowerCase(match[0]),
|
|
37380
37377
|
flags: questionWildcardIndex !== -1 && questionWildcardIndex < lastDirectorySeperatorIndex || starWildcardIndex !== -1 && starWildcardIndex < lastDirectorySeperatorIndex ? 1 /* Recursive */ : 0 /* None */
|
|
37381
37378
|
};
|
|
37382
37379
|
}
|
|
37383
37380
|
if (isImplicitGlob(spec.substring(spec.lastIndexOf(directorySeparator) + 1))) {
|
|
37384
37381
|
return {
|
|
37385
|
-
key: removeTrailingDirectorySeparator(
|
|
37382
|
+
key: removeTrailingDirectorySeparator(useCaseSensitiveFileNames2 ? spec : toFileNameLowerCase(spec)),
|
|
37386
37383
|
flags: 1 /* Recursive */
|
|
37387
37384
|
};
|
|
37388
37385
|
}
|
|
@@ -39068,6 +39065,18 @@ ${lanes.join("\n")}
|
|
|
39068
39065
|
result.push("JSON");
|
|
39069
39066
|
return result.join(", ");
|
|
39070
39067
|
}
|
|
39068
|
+
function extensionsToExtensionsArray(extensions) {
|
|
39069
|
+
const result = [];
|
|
39070
|
+
if (extensions & 1 /* TypeScript */)
|
|
39071
|
+
result.push(...supportedTSImplementationExtensions);
|
|
39072
|
+
if (extensions & 2 /* JavaScript */)
|
|
39073
|
+
result.push(...supportedJSExtensionsFlat);
|
|
39074
|
+
if (extensions & 4 /* Declaration */)
|
|
39075
|
+
result.push(...supportedDeclarationExtensions);
|
|
39076
|
+
if (extensions & 8 /* Json */)
|
|
39077
|
+
result.push(".json" /* Json */);
|
|
39078
|
+
return result;
|
|
39079
|
+
}
|
|
39071
39080
|
function resolvedTypeScriptOnly(resolved) {
|
|
39072
39081
|
if (!resolved) {
|
|
39073
39082
|
return void 0;
|
|
@@ -39240,8 +39249,8 @@ ${lanes.join("\n")}
|
|
|
39240
39249
|
return typeRoots;
|
|
39241
39250
|
}
|
|
39242
39251
|
function arePathsEqual(path1, path2, host) {
|
|
39243
|
-
const
|
|
39244
|
-
return comparePaths(path1, path2, !
|
|
39252
|
+
const useCaseSensitiveFileNames2 = typeof host.useCaseSensitiveFileNames === "function" ? host.useCaseSensitiveFileNames() : host.useCaseSensitiveFileNames;
|
|
39253
|
+
return comparePaths(path1, path2, !useCaseSensitiveFileNames2) === 0 /* EqualTo */;
|
|
39245
39254
|
}
|
|
39246
39255
|
function getOriginalAndResolvedFileName(fileName, host, traceEnabled) {
|
|
39247
39256
|
const resolvedFileName = realPath(fileName, host, traceEnabled);
|
|
@@ -40504,7 +40513,7 @@ ${lanes.join("\n")}
|
|
|
40504
40513
|
arrayIsEqualTo
|
|
40505
40514
|
);
|
|
40506
40515
|
for (const conditions of conditionSets) {
|
|
40507
|
-
const loadPackageJsonExportsState = { ...loadPackageJsonMainState, failedLookupLocations: [], conditions };
|
|
40516
|
+
const loadPackageJsonExportsState = { ...loadPackageJsonMainState, failedLookupLocations: [], conditions, host };
|
|
40508
40517
|
const exportResolutions = loadEntrypointsFromExportMap(
|
|
40509
40518
|
packageJsonInfo,
|
|
40510
40519
|
packageJsonInfo.contents.packageJsonContent.exports,
|
|
@@ -40536,23 +40545,42 @@ ${lanes.join("\n")}
|
|
|
40536
40545
|
return entrypoints;
|
|
40537
40546
|
function loadEntrypointsFromTargetExports(target) {
|
|
40538
40547
|
var _a, _b;
|
|
40539
|
-
if (typeof target === "string" && startsWith(target, "./")
|
|
40540
|
-
|
|
40541
|
-
|
|
40542
|
-
|
|
40543
|
-
|
|
40544
|
-
|
|
40545
|
-
|
|
40546
|
-
|
|
40547
|
-
|
|
40548
|
-
|
|
40549
|
-
|
|
40550
|
-
|
|
40551
|
-
|
|
40552
|
-
|
|
40553
|
-
|
|
40554
|
-
|
|
40555
|
-
|
|
40548
|
+
if (typeof target === "string" && startsWith(target, "./")) {
|
|
40549
|
+
if (target.indexOf("*") >= 0 && state.host.readDirectory) {
|
|
40550
|
+
if (target.indexOf("*") !== target.lastIndexOf("*")) {
|
|
40551
|
+
return false;
|
|
40552
|
+
}
|
|
40553
|
+
state.host.readDirectory(
|
|
40554
|
+
scope.packageDirectory,
|
|
40555
|
+
extensionsToExtensionsArray(extensions),
|
|
40556
|
+
/*excludes*/
|
|
40557
|
+
void 0,
|
|
40558
|
+
[changeAnyExtension(target.replace("*", "**/*"), getDeclarationEmitExtensionForPath(target))]
|
|
40559
|
+
).forEach((entry) => {
|
|
40560
|
+
entrypoints = appendIfUnique(entrypoints, {
|
|
40561
|
+
path: entry,
|
|
40562
|
+
ext: getAnyExtensionFromPath(entry),
|
|
40563
|
+
resolvedUsingTsExtension: void 0
|
|
40564
|
+
});
|
|
40565
|
+
});
|
|
40566
|
+
} else {
|
|
40567
|
+
const partsAfterFirst = getPathComponents(target).slice(2);
|
|
40568
|
+
if (partsAfterFirst.indexOf("..") >= 0 || partsAfterFirst.indexOf(".") >= 0 || partsAfterFirst.indexOf("node_modules") >= 0) {
|
|
40569
|
+
return false;
|
|
40570
|
+
}
|
|
40571
|
+
const resolvedTarget = combinePaths(scope.packageDirectory, target);
|
|
40572
|
+
const finalPath = getNormalizedAbsolutePath(resolvedTarget, (_b = (_a = state.host).getCurrentDirectory) == null ? void 0 : _b.call(_a));
|
|
40573
|
+
const result = loadFileNameFromPackageJsonField(
|
|
40574
|
+
extensions,
|
|
40575
|
+
finalPath,
|
|
40576
|
+
/*onlyRecordFailures*/
|
|
40577
|
+
false,
|
|
40578
|
+
state
|
|
40579
|
+
);
|
|
40580
|
+
if (result) {
|
|
40581
|
+
entrypoints = appendIfUnique(entrypoints, result, (a, b) => a.path === b.path);
|
|
40582
|
+
return true;
|
|
40583
|
+
}
|
|
40556
40584
|
}
|
|
40557
40585
|
} else if (Array.isArray(target)) {
|
|
40558
40586
|
for (const t of target) {
|
|
@@ -41111,13 +41139,10 @@ ${lanes.join("\n")}
|
|
|
41111
41139
|
function combineDirectoryPath(root, dir) {
|
|
41112
41140
|
return ensureTrailingDirectorySeparator(combinePaths(root, dir));
|
|
41113
41141
|
}
|
|
41114
|
-
function useCaseSensitiveFileNames() {
|
|
41115
|
-
return !state.host.useCaseSensitiveFileNames ? true : typeof state.host.useCaseSensitiveFileNames === "boolean" ? state.host.useCaseSensitiveFileNames : state.host.useCaseSensitiveFileNames();
|
|
41116
|
-
}
|
|
41117
41142
|
function tryLoadInputFileForPath(finalPath, entry, packagePath, isImports2) {
|
|
41118
41143
|
var _a, _b, _c, _d;
|
|
41119
|
-
if (!state.isConfigLookup && (state.compilerOptions.declarationDir || state.compilerOptions.outDir) && finalPath.indexOf("/node_modules/") === -1 && (state.compilerOptions.configFile ? containsPath(scope.packageDirectory, toAbsolutePath(state.compilerOptions.configFile.fileName), !useCaseSensitiveFileNames()) : true)) {
|
|
41120
|
-
const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames });
|
|
41144
|
+
if (!state.isConfigLookup && (state.compilerOptions.declarationDir || state.compilerOptions.outDir) && finalPath.indexOf("/node_modules/") === -1 && (state.compilerOptions.configFile ? containsPath(scope.packageDirectory, toAbsolutePath(state.compilerOptions.configFile.fileName), !useCaseSensitiveFileNames(state)) : true)) {
|
|
41145
|
+
const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames: () => useCaseSensitiveFileNames(state) });
|
|
41121
41146
|
const commonSourceDirGuesses = [];
|
|
41122
41147
|
if (state.compilerOptions.rootDir || state.compilerOptions.composite && state.compilerOptions.configFilePath) {
|
|
41123
41148
|
const commonDir = toAbsolutePath(getCommonSourceDirectory(state.compilerOptions, () => [], ((_b = (_a = state.host).getCurrentDirectory) == null ? void 0 : _b.call(_a)) || "", getCanonicalFileName));
|
|
@@ -41146,7 +41171,7 @@ ${lanes.join("\n")}
|
|
|
41146
41171
|
for (const commonSourceDirGuess of commonSourceDirGuesses) {
|
|
41147
41172
|
const candidateDirectories = getOutputDirectoriesForBaseDirectory(commonSourceDirGuess);
|
|
41148
41173
|
for (const candidateDir of candidateDirectories) {
|
|
41149
|
-
if (containsPath(candidateDir, finalPath, !useCaseSensitiveFileNames())) {
|
|
41174
|
+
if (containsPath(candidateDir, finalPath, !useCaseSensitiveFileNames(state))) {
|
|
41150
41175
|
const pathFragment = finalPath.slice(candidateDir.length + 1);
|
|
41151
41176
|
const possibleInputBase = combinePaths(commonSourceDirGuess, pathFragment);
|
|
41152
41177
|
const jsAndDtsExtensions = [".mjs" /* Mjs */, ".cjs" /* Cjs */, ".js" /* Js */, ".json" /* Json */, ".d.mts" /* Dmts */, ".d.cts" /* Dcts */, ".d.ts" /* Dts */];
|
|
@@ -41156,7 +41181,7 @@ ${lanes.join("\n")}
|
|
|
41156
41181
|
for (const possibleExt of inputExts) {
|
|
41157
41182
|
if (!extensionIsOk(extensions, possibleExt))
|
|
41158
41183
|
continue;
|
|
41159
|
-
const possibleInputWithInputExtension = changeAnyExtension(possibleInputBase, possibleExt, ext, !useCaseSensitiveFileNames());
|
|
41184
|
+
const possibleInputWithInputExtension = changeAnyExtension(possibleInputBase, possibleExt, ext, !useCaseSensitiveFileNames(state));
|
|
41160
41185
|
if (state.host.fileExists(possibleInputWithInputExtension)) {
|
|
41161
41186
|
return toSearchResult(withPackageId(scope, loadFileNameFromPackageJsonField(
|
|
41162
41187
|
extensions,
|
|
@@ -41572,6 +41597,9 @@ ${lanes.join("\n")}
|
|
|
41572
41597
|
trace(state.host, diagnostic, ...args);
|
|
41573
41598
|
}
|
|
41574
41599
|
}
|
|
41600
|
+
function useCaseSensitiveFileNames(state) {
|
|
41601
|
+
return !state.host.useCaseSensitiveFileNames ? true : typeof state.host.useCaseSensitiveFileNames === "boolean" ? state.host.useCaseSensitiveFileNames : state.host.useCaseSensitiveFileNames();
|
|
41602
|
+
}
|
|
41575
41603
|
var typeScriptVersion, nodeModulesAtTypes, NodeResolutionFeatures, nodeModulesPathPart, mangledScopedPackageSeparator;
|
|
41576
41604
|
var init_moduleNameResolver = __esm({
|
|
41577
41605
|
"src/compiler/moduleNameResolver.ts"() {
|
|
@@ -45151,7 +45179,7 @@ ${lanes.join("\n")}
|
|
|
45151
45179
|
for (const key of getOwnKeys(exports)) {
|
|
45152
45180
|
if (key === "default" || conditions.indexOf(key) >= 0 || isApplicableVersionedTypesKey(conditions, key)) {
|
|
45153
45181
|
const subTarget = exports[key];
|
|
45154
|
-
const result = tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, packageName, subTarget, conditions);
|
|
45182
|
+
const result = tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, packageName, subTarget, conditions, mode);
|
|
45155
45183
|
if (result) {
|
|
45156
45184
|
return result;
|
|
45157
45185
|
}
|
|
@@ -46209,7 +46237,7 @@ ${lanes.join("\n")}
|
|
|
46209
46237
|
};
|
|
46210
46238
|
var amalgamatedDuplicates;
|
|
46211
46239
|
var reverseMappedCache = /* @__PURE__ */ new Map();
|
|
46212
|
-
var
|
|
46240
|
+
var homomorphicMappedTypeInferenceStack = [];
|
|
46213
46241
|
var ambientModulesCache;
|
|
46214
46242
|
var patternAmbientModules;
|
|
46215
46243
|
var patternAmbientModuleAugmentations;
|
|
@@ -50800,6 +50828,7 @@ ${lanes.join("\n")}
|
|
|
50800
50828
|
);
|
|
50801
50829
|
}
|
|
50802
50830
|
function signatureToSignatureDeclarationHelper(signature, kind, context, options) {
|
|
50831
|
+
var _a;
|
|
50803
50832
|
const suppressAny = context.flags & 256 /* SuppressAnyReturnType */;
|
|
50804
50833
|
if (suppressAny)
|
|
50805
50834
|
context.flags &= ~256 /* SuppressAnyReturnType */;
|
|
@@ -50935,6 +50964,20 @@ ${lanes.join("\n")}
|
|
|
50935
50964
|
if (typeArguments) {
|
|
50936
50965
|
node.typeArguments = factory.createNodeArray(typeArguments);
|
|
50937
50966
|
}
|
|
50967
|
+
if (((_a = signature.declaration) == null ? void 0 : _a.kind) === 330 /* JSDocSignature */ && signature.declaration.parent.kind === 346 /* JSDocOverloadTag */) {
|
|
50968
|
+
const comment = getTextOfNode(
|
|
50969
|
+
signature.declaration.parent.parent,
|
|
50970
|
+
/*includeTrivia*/
|
|
50971
|
+
true
|
|
50972
|
+
).slice(2, -2).split(/\r\n|\n|\r/).map((line) => line.replace(/^\s+/, " ")).join("\n");
|
|
50973
|
+
addSyntheticLeadingComment(
|
|
50974
|
+
node,
|
|
50975
|
+
3 /* MultiLineCommentTrivia */,
|
|
50976
|
+
comment,
|
|
50977
|
+
/*hasTrailingNewLine*/
|
|
50978
|
+
true
|
|
50979
|
+
);
|
|
50980
|
+
}
|
|
50938
50981
|
cleanup == null ? void 0 : cleanup();
|
|
50939
50982
|
return node;
|
|
50940
50983
|
}
|
|
@@ -65598,17 +65641,18 @@ ${lanes.join("\n")}
|
|
|
65598
65641
|
);
|
|
65599
65642
|
}
|
|
65600
65643
|
function inferTypeForHomomorphicMappedType(source, target, constraint) {
|
|
65601
|
-
|
|
65602
|
-
|
|
65644
|
+
const cacheKey = source.id + "," + target.id + "," + constraint.id;
|
|
65645
|
+
if (reverseMappedCache.has(cacheKey)) {
|
|
65646
|
+
return reverseMappedCache.get(cacheKey);
|
|
65603
65647
|
}
|
|
65604
|
-
const
|
|
65605
|
-
if (
|
|
65606
|
-
return
|
|
65648
|
+
const recursionKey = source.id + "," + (target.target || target).id;
|
|
65649
|
+
if (contains(homomorphicMappedTypeInferenceStack, recursionKey)) {
|
|
65650
|
+
return void 0;
|
|
65607
65651
|
}
|
|
65608
|
-
|
|
65652
|
+
homomorphicMappedTypeInferenceStack.push(recursionKey);
|
|
65609
65653
|
const type = createReverseMappedType(source, target, constraint);
|
|
65610
|
-
|
|
65611
|
-
reverseMappedCache.set(
|
|
65654
|
+
homomorphicMappedTypeInferenceStack.pop();
|
|
65655
|
+
reverseMappedCache.set(cacheKey, type);
|
|
65612
65656
|
return type;
|
|
65613
65657
|
}
|
|
65614
65658
|
function isPartiallyInferableType(type) {
|
|
@@ -116955,14 +116999,14 @@ ${lanes.join("\n")}
|
|
|
116955
116999
|
});
|
|
116956
117000
|
|
|
116957
117001
|
// src/compiler/watchUtilities.ts
|
|
116958
|
-
function createCachedDirectoryStructureHost(host, currentDirectory,
|
|
117002
|
+
function createCachedDirectoryStructureHost(host, currentDirectory, useCaseSensitiveFileNames2) {
|
|
116959
117003
|
if (!host.getDirectories || !host.readDirectory) {
|
|
116960
117004
|
return void 0;
|
|
116961
117005
|
}
|
|
116962
117006
|
const cachedReadDirectoryResult = /* @__PURE__ */ new Map();
|
|
116963
|
-
const getCanonicalFileName = createGetCanonicalFileName(
|
|
117007
|
+
const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2);
|
|
116964
117008
|
return {
|
|
116965
|
-
useCaseSensitiveFileNames,
|
|
117009
|
+
useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
|
|
116966
117010
|
fileExists,
|
|
116967
117011
|
readFile: (path, encoding) => host.readFile(path, encoding),
|
|
116968
117012
|
directoryExists: host.directoryExists && directoryExists,
|
|
@@ -117084,7 +117128,7 @@ ${lanes.join("\n")}
|
|
|
117084
117128
|
const rootResult = tryReadDirectory2(rootDir, rootDirPath);
|
|
117085
117129
|
let rootSymLinkResult;
|
|
117086
117130
|
if (rootResult !== void 0) {
|
|
117087
|
-
return matchFiles(rootDir, extensions, excludes, includes,
|
|
117131
|
+
return matchFiles(rootDir, extensions, excludes, includes, useCaseSensitiveFileNames2, currentDirectory, depth, getFileSystemEntries, realpath);
|
|
117088
117132
|
}
|
|
117089
117133
|
return host.readDirectory(rootDir, extensions, excludes, includes, depth);
|
|
117090
117134
|
function getFileSystemEntries(dir) {
|
|
@@ -117279,7 +117323,7 @@ ${lanes.join("\n")}
|
|
|
117279
117323
|
program,
|
|
117280
117324
|
extraFileExtensions,
|
|
117281
117325
|
currentDirectory,
|
|
117282
|
-
useCaseSensitiveFileNames,
|
|
117326
|
+
useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
|
|
117283
117327
|
writeLog,
|
|
117284
117328
|
toPath: toPath3
|
|
117285
117329
|
}) {
|
|
@@ -117295,7 +117339,7 @@ ${lanes.join("\n")}
|
|
|
117295
117339
|
writeLog(`Project: ${configFileName} Detected file add/remove of non supported extension: ${fileOrDirectory}`);
|
|
117296
117340
|
return true;
|
|
117297
117341
|
}
|
|
117298
|
-
if (isExcludedFile(fileOrDirectory, options.configFile.configFileSpecs, getNormalizedAbsolutePath(getDirectoryPath(configFileName), currentDirectory),
|
|
117342
|
+
if (isExcludedFile(fileOrDirectory, options.configFile.configFileSpecs, getNormalizedAbsolutePath(getDirectoryPath(configFileName), currentDirectory), useCaseSensitiveFileNames2, currentDirectory)) {
|
|
117299
117343
|
writeLog(`Project: ${configFileName} Detected excluded file: ${fileOrDirectory}`);
|
|
117300
117344
|
return true;
|
|
117301
117345
|
}
|
|
@@ -117352,7 +117396,7 @@ ${lanes.join("\n")}
|
|
|
117352
117396
|
function createExcludeHandlingAddWatch(key) {
|
|
117353
117397
|
return (file, cb, flags, options, detailInfo1, detailInfo2) => {
|
|
117354
117398
|
var _a;
|
|
117355
|
-
return !matchesExclude(file, key === "watchFile" ? options == null ? void 0 : options.excludeFiles : options == null ? void 0 : options.excludeDirectories,
|
|
117399
|
+
return !matchesExclude(file, key === "watchFile" ? options == null ? void 0 : options.excludeFiles : options == null ? void 0 : options.excludeDirectories, useCaseSensitiveFileNames2(), ((_a = host.getCurrentDirectory) == null ? void 0 : _a.call(host)) || "") ? factory2[key].call(
|
|
117356
117400
|
/*thisArgs*/
|
|
117357
117401
|
void 0,
|
|
117358
117402
|
file,
|
|
@@ -117364,7 +117408,7 @@ ${lanes.join("\n")}
|
|
|
117364
117408
|
) : excludeWatcherFactory(file, flags, options, detailInfo1, detailInfo2);
|
|
117365
117409
|
};
|
|
117366
117410
|
}
|
|
117367
|
-
function
|
|
117411
|
+
function useCaseSensitiveFileNames2() {
|
|
117368
117412
|
return typeof host.useCaseSensitiveFileNames === "boolean" ? host.useCaseSensitiveFileNames : host.useCaseSensitiveFileNames();
|
|
117369
117413
|
}
|
|
117370
117414
|
function createExcludeWatcherWithLogging(file, flags, options, detailInfo1, detailInfo2) {
|
|
@@ -124499,12 +124543,12 @@ ${lanes.join("\n")}
|
|
|
124499
124543
|
return true;
|
|
124500
124544
|
const isJsonFile = fileExtensionIs(fileName, ".json" /* Json */);
|
|
124501
124545
|
const basePath = getDirectoryPath(getNormalizedAbsolutePath(configFile.fileName, program.getCurrentDirectory()));
|
|
124502
|
-
const
|
|
124546
|
+
const useCaseSensitiveFileNames2 = program.useCaseSensitiveFileNames();
|
|
124503
124547
|
return find((_b = configFile == null ? void 0 : configFile.configFileSpecs) == null ? void 0 : _b.validatedIncludeSpecs, (includeSpec) => {
|
|
124504
124548
|
if (isJsonFile && !endsWith(includeSpec, ".json" /* Json */))
|
|
124505
124549
|
return false;
|
|
124506
124550
|
const pattern = getPatternFromSpec(includeSpec, basePath, "files");
|
|
124507
|
-
return !!pattern && getRegexFromPattern(`(${pattern})$`,
|
|
124551
|
+
return !!pattern && getRegexFromPattern(`(${pattern})$`, useCaseSensitiveFileNames2).test(fileName);
|
|
124508
124552
|
});
|
|
124509
124553
|
}
|
|
124510
124554
|
function fileIncludeReasonToDiagnostics(program, reason, fileNameConvertor) {
|
|
@@ -124708,7 +124752,7 @@ ${lanes.join("\n")}
|
|
|
124708
124752
|
return result;
|
|
124709
124753
|
}
|
|
124710
124754
|
function createCompilerHostFromProgramHost(host, getCompilerOptions, directoryStructureHost = host) {
|
|
124711
|
-
const
|
|
124755
|
+
const useCaseSensitiveFileNames2 = host.useCaseSensitiveFileNames();
|
|
124712
124756
|
const compilerHost = {
|
|
124713
124757
|
getSourceFile: createGetSourceFile(
|
|
124714
124758
|
(fileName, encoding) => !encoding ? compilerHost.readFile(fileName) : host.readFile(fileName, encoding),
|
|
@@ -124724,8 +124768,8 @@ ${lanes.join("\n")}
|
|
|
124724
124768
|
(path) => host.directoryExists(path)
|
|
124725
124769
|
),
|
|
124726
124770
|
getCurrentDirectory: memoize(() => host.getCurrentDirectory()),
|
|
124727
|
-
useCaseSensitiveFileNames: () =>
|
|
124728
|
-
getCanonicalFileName: createGetCanonicalFileName(
|
|
124771
|
+
useCaseSensitiveFileNames: () => useCaseSensitiveFileNames2,
|
|
124772
|
+
getCanonicalFileName: createGetCanonicalFileName(useCaseSensitiveFileNames2),
|
|
124729
124773
|
getNewLine: () => getNewLineCharacter(getCompilerOptions()),
|
|
124730
124774
|
fileExists: (f) => host.fileExists(f),
|
|
124731
124775
|
readFile: (f) => host.readFile(f),
|
|
@@ -125006,7 +125050,7 @@ ${lanes.join("\n")}
|
|
|
125006
125050
|
const sourceFilesCache = /* @__PURE__ */ new Map();
|
|
125007
125051
|
let missingFilePathsRequestedForRelease;
|
|
125008
125052
|
let hasChangedCompilerOptions = false;
|
|
125009
|
-
const
|
|
125053
|
+
const useCaseSensitiveFileNames2 = host.useCaseSensitiveFileNames();
|
|
125010
125054
|
const currentDirectory = host.getCurrentDirectory();
|
|
125011
125055
|
const { configFileName, optionsToExtend: optionsToExtendForConfigFile = {}, watchOptionsToExtend, extraFileExtensions, createProgram: createProgram2 } = host;
|
|
125012
125056
|
let { rootFiles: rootFileNames, options: compilerOptions, watchOptions, projectReferences } = host;
|
|
@@ -125014,7 +125058,7 @@ ${lanes.join("\n")}
|
|
|
125014
125058
|
let configFileParsingDiagnostics;
|
|
125015
125059
|
let canConfigFileJsonReportNoInputFiles = false;
|
|
125016
125060
|
let hasChangedConfigFileParsingErrors = false;
|
|
125017
|
-
const cachedDirectoryStructureHost = configFileName === void 0 ? void 0 : createCachedDirectoryStructureHost(host, currentDirectory,
|
|
125061
|
+
const cachedDirectoryStructureHost = configFileName === void 0 ? void 0 : createCachedDirectoryStructureHost(host, currentDirectory, useCaseSensitiveFileNames2);
|
|
125018
125062
|
const directoryStructureHost = cachedDirectoryStructureHost || host;
|
|
125019
125063
|
const parseConfigFileHost = parseConfigHostFromCompilerHostLike(host, directoryStructureHost);
|
|
125020
125064
|
let newLine = updateNewLine();
|
|
@@ -125032,8 +125076,8 @@ ${lanes.join("\n")}
|
|
|
125032
125076
|
Debug.assert(compilerOptions);
|
|
125033
125077
|
Debug.assert(rootFileNames);
|
|
125034
125078
|
const { watchFile: watchFile2, watchDirectory, writeLog } = createWatchFactory(host, compilerOptions);
|
|
125035
|
-
const getCanonicalFileName = createGetCanonicalFileName(
|
|
125036
|
-
writeLog(`Current directory: ${currentDirectory} CaseSensitiveFileNames: ${
|
|
125079
|
+
const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2);
|
|
125080
|
+
writeLog(`Current directory: ${currentDirectory} CaseSensitiveFileNames: ${useCaseSensitiveFileNames2}`);
|
|
125037
125081
|
let configFileWatcher;
|
|
125038
125082
|
if (configFileName) {
|
|
125039
125083
|
configFileWatcher = watchFile2(configFileName, scheduleProgramReload, 2e3 /* High */, watchOptions, WatchType.ConfigFile);
|
|
@@ -125539,7 +125583,7 @@ ${lanes.join("\n")}
|
|
|
125539
125583
|
options: compilerOptions,
|
|
125540
125584
|
program: getCurrentBuilderProgram() || rootFileNames,
|
|
125541
125585
|
currentDirectory,
|
|
125542
|
-
useCaseSensitiveFileNames,
|
|
125586
|
+
useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
|
|
125543
125587
|
writeLog,
|
|
125544
125588
|
toPath: toPath3
|
|
125545
125589
|
}))
|
|
@@ -125629,7 +125673,7 @@ ${lanes.join("\n")}
|
|
|
125629
125673
|
options: config.parsedCommandLine.options,
|
|
125630
125674
|
program: config.parsedCommandLine.fileNames,
|
|
125631
125675
|
currentDirectory,
|
|
125632
|
-
useCaseSensitiveFileNames,
|
|
125676
|
+
useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
|
|
125633
125677
|
writeLog,
|
|
125634
125678
|
toPath: toPath3
|
|
125635
125679
|
}))
|
|
@@ -128407,6 +128451,8 @@ ${lanes.join("\n")}
|
|
|
128407
128451
|
ScriptElementKind2["enumMemberElement"] = "enum member";
|
|
128408
128452
|
ScriptElementKind2["variableElement"] = "var";
|
|
128409
128453
|
ScriptElementKind2["localVariableElement"] = "local var";
|
|
128454
|
+
ScriptElementKind2["variableUsingElement"] = "using";
|
|
128455
|
+
ScriptElementKind2["variableAwaitUsingElement"] = "await using";
|
|
128410
128456
|
ScriptElementKind2["functionElement"] = "function";
|
|
128411
128457
|
ScriptElementKind2["localFunctionElement"] = "local function";
|
|
128412
128458
|
ScriptElementKind2["memberFunctionElement"] = "method";
|
|
@@ -131540,10 +131586,10 @@ ${lanes.join("\n")}
|
|
|
131540
131586
|
}
|
|
131541
131587
|
function forEachExternalModuleToImportFrom(program, host, preferences, useAutoImportProvider, cb) {
|
|
131542
131588
|
var _a, _b;
|
|
131543
|
-
const
|
|
131589
|
+
const useCaseSensitiveFileNames2 = hostUsesCaseSensitiveFileNames(host);
|
|
131544
131590
|
const excludePatterns = preferences.autoImportFileExcludePatterns && mapDefined(preferences.autoImportFileExcludePatterns, (spec) => {
|
|
131545
131591
|
const pattern = getPatternFromSpec(spec, "", "exclude");
|
|
131546
|
-
return pattern ? getRegexFromPattern(pattern,
|
|
131592
|
+
return pattern ? getRegexFromPattern(pattern, useCaseSensitiveFileNames2) : void 0;
|
|
131547
131593
|
});
|
|
131548
131594
|
forEachExternalModule(program.getTypeChecker(), program.getSourceFiles(), excludePatterns, (module2, file) => cb(
|
|
131549
131595
|
module2,
|
|
@@ -133039,12 +133085,12 @@ ${lanes.join("\n")}
|
|
|
133039
133085
|
function isDocumentRegistryEntry(entry) {
|
|
133040
133086
|
return !!entry.sourceFile;
|
|
133041
133087
|
}
|
|
133042
|
-
function createDocumentRegistry(
|
|
133043
|
-
return createDocumentRegistryInternal(
|
|
133088
|
+
function createDocumentRegistry(useCaseSensitiveFileNames2, currentDirectory) {
|
|
133089
|
+
return createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory);
|
|
133044
133090
|
}
|
|
133045
|
-
function createDocumentRegistryInternal(
|
|
133091
|
+
function createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory = "", externalCache) {
|
|
133046
133092
|
const buckets = /* @__PURE__ */ new Map();
|
|
133047
|
-
const getCanonicalFileName = createGetCanonicalFileName(!!
|
|
133093
|
+
const getCanonicalFileName = createGetCanonicalFileName(!!useCaseSensitiveFileNames2);
|
|
133048
133094
|
function reportStats() {
|
|
133049
133095
|
const bucketInfoArray = arrayFrom(buckets.keys()).filter((name) => name && name.charAt(0) === "_").map((name) => {
|
|
133050
133096
|
const entries = buckets.get(name);
|
|
@@ -133253,12 +133299,12 @@ ${lanes.join("\n")}
|
|
|
133253
133299
|
|
|
133254
133300
|
// src/services/getEditsForFileRename.ts
|
|
133255
133301
|
function getEditsForFileRename(program, oldFileOrDirPath, newFileOrDirPath, host, formatContext, preferences, sourceMapper) {
|
|
133256
|
-
const
|
|
133257
|
-
const getCanonicalFileName = createGetCanonicalFileName(
|
|
133302
|
+
const useCaseSensitiveFileNames2 = hostUsesCaseSensitiveFileNames(host);
|
|
133303
|
+
const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2);
|
|
133258
133304
|
const oldToNew = getPathUpdater(oldFileOrDirPath, newFileOrDirPath, getCanonicalFileName, sourceMapper);
|
|
133259
133305
|
const newToOld = getPathUpdater(newFileOrDirPath, oldFileOrDirPath, getCanonicalFileName, sourceMapper);
|
|
133260
133306
|
return ts_textChanges_exports.ChangeTracker.with({ host, formatContext, preferences }, (changeTracker) => {
|
|
133261
|
-
updateTsconfigFiles(program, changeTracker, oldToNew, oldFileOrDirPath, newFileOrDirPath, host.getCurrentDirectory(),
|
|
133307
|
+
updateTsconfigFiles(program, changeTracker, oldToNew, oldFileOrDirPath, newFileOrDirPath, host.getCurrentDirectory(), useCaseSensitiveFileNames2);
|
|
133262
133308
|
updateImports(program, changeTracker, oldToNew, newToOld, host, getCanonicalFileName);
|
|
133263
133309
|
});
|
|
133264
133310
|
}
|
|
@@ -133280,7 +133326,7 @@ ${lanes.join("\n")}
|
|
|
133280
133326
|
const rel = getRelativePathFromFile(a0, b0, getCanonicalFileName);
|
|
133281
133327
|
return combinePathsSafe(getDirectoryPath(a1), rel);
|
|
133282
133328
|
}
|
|
133283
|
-
function updateTsconfigFiles(program, changeTracker, oldToNew, oldFileOrDirPath, newFileOrDirPath, currentDirectory,
|
|
133329
|
+
function updateTsconfigFiles(program, changeTracker, oldToNew, oldFileOrDirPath, newFileOrDirPath, currentDirectory, useCaseSensitiveFileNames2) {
|
|
133284
133330
|
const { configFile } = program.getCompilerOptions();
|
|
133285
133331
|
if (!configFile)
|
|
133286
133332
|
return;
|
|
@@ -133304,10 +133350,10 @@ ${lanes.join("\n")}
|
|
|
133304
133350
|
/*excludes*/
|
|
133305
133351
|
[],
|
|
133306
133352
|
includes,
|
|
133307
|
-
|
|
133353
|
+
useCaseSensitiveFileNames2,
|
|
133308
133354
|
currentDirectory
|
|
133309
133355
|
);
|
|
133310
|
-
if (getRegexFromPattern(Debug.checkDefined(matchers.includeFilePattern),
|
|
133356
|
+
if (getRegexFromPattern(Debug.checkDefined(matchers.includeFilePattern), useCaseSensitiveFileNames2).test(oldFileOrDirPath) && !getRegexFromPattern(Debug.checkDefined(matchers.includeFilePattern), useCaseSensitiveFileNames2).test(newFileOrDirPath)) {
|
|
133311
133357
|
changeTracker.insertNodeAfter(configFile, last(property.initializer.elements), factory.createStringLiteral(relativePath(newFileOrDirPath)));
|
|
133312
133358
|
}
|
|
133313
133359
|
return;
|
|
@@ -133355,7 +133401,7 @@ ${lanes.join("\n")}
|
|
|
133355
133401
|
configDir,
|
|
133356
133402
|
path,
|
|
133357
133403
|
/*ignoreCase*/
|
|
133358
|
-
!
|
|
133404
|
+
!useCaseSensitiveFileNames2
|
|
133359
133405
|
);
|
|
133360
133406
|
}
|
|
133361
133407
|
}
|
|
@@ -136669,7 +136715,7 @@ ${lanes.join("\n")}
|
|
|
136669
136715
|
const body = addExports(oldFile, toMove.all, usage.oldFileImportsFromTargetFile, useEsModuleSyntax);
|
|
136670
136716
|
if (typeof targetFile !== "string") {
|
|
136671
136717
|
if (targetFile.statements.length > 0) {
|
|
136672
|
-
changes
|
|
136718
|
+
moveStatementsToTargetFile(changes, program, body, targetFile, toMove);
|
|
136673
136719
|
} else {
|
|
136674
136720
|
changes.insertNodesAtEndOfFile(
|
|
136675
136721
|
targetFile,
|
|
@@ -137462,6 +137508,67 @@ ${lanes.join("\n")}
|
|
|
137462
137508
|
return false;
|
|
137463
137509
|
}
|
|
137464
137510
|
}
|
|
137511
|
+
function moveStatementsToTargetFile(changes, program, statements, targetFile, toMove) {
|
|
137512
|
+
var _a;
|
|
137513
|
+
const removedExports = /* @__PURE__ */ new Set();
|
|
137514
|
+
const targetExports = (_a = targetFile.symbol) == null ? void 0 : _a.exports;
|
|
137515
|
+
if (targetExports) {
|
|
137516
|
+
const checker = program.getTypeChecker();
|
|
137517
|
+
const targetToSourceExports = /* @__PURE__ */ new Map();
|
|
137518
|
+
for (const node of toMove.all) {
|
|
137519
|
+
if (isTopLevelDeclarationStatement(node) && hasSyntacticModifier(node, 1 /* Export */)) {
|
|
137520
|
+
forEachTopLevelDeclaration(node, (declaration) => {
|
|
137521
|
+
var _a2;
|
|
137522
|
+
const targetDeclarations = canHaveSymbol(declaration) ? (_a2 = targetExports.get(declaration.symbol.escapedName)) == null ? void 0 : _a2.declarations : void 0;
|
|
137523
|
+
const exportDeclaration = firstDefined(targetDeclarations, (d) => isExportDeclaration(d) ? d : isExportSpecifier(d) ? tryCast(d.parent.parent, isExportDeclaration) : void 0);
|
|
137524
|
+
if (exportDeclaration && exportDeclaration.moduleSpecifier) {
|
|
137525
|
+
targetToSourceExports.set(
|
|
137526
|
+
exportDeclaration,
|
|
137527
|
+
(targetToSourceExports.get(exportDeclaration) || /* @__PURE__ */ new Set()).add(declaration)
|
|
137528
|
+
);
|
|
137529
|
+
}
|
|
137530
|
+
});
|
|
137531
|
+
}
|
|
137532
|
+
}
|
|
137533
|
+
for (const [exportDeclaration, topLevelDeclarations] of arrayFrom(targetToSourceExports)) {
|
|
137534
|
+
if (exportDeclaration.exportClause && isNamedExports(exportDeclaration.exportClause) && length(exportDeclaration.exportClause.elements)) {
|
|
137535
|
+
const elements = exportDeclaration.exportClause.elements;
|
|
137536
|
+
const updatedElements = filter(elements, (elem) => find(skipAlias(elem.symbol, checker).declarations, (d) => isTopLevelDeclaration(d) && topLevelDeclarations.has(d)) === void 0);
|
|
137537
|
+
if (length(updatedElements) === 0) {
|
|
137538
|
+
changes.deleteNode(targetFile, exportDeclaration);
|
|
137539
|
+
removedExports.add(exportDeclaration);
|
|
137540
|
+
continue;
|
|
137541
|
+
}
|
|
137542
|
+
if (length(updatedElements) < length(elements)) {
|
|
137543
|
+
changes.replaceNode(
|
|
137544
|
+
targetFile,
|
|
137545
|
+
exportDeclaration,
|
|
137546
|
+
factory.updateExportDeclaration(
|
|
137547
|
+
exportDeclaration,
|
|
137548
|
+
exportDeclaration.modifiers,
|
|
137549
|
+
exportDeclaration.isTypeOnly,
|
|
137550
|
+
factory.updateNamedExports(exportDeclaration.exportClause, factory.createNodeArray(updatedElements, elements.hasTrailingComma)),
|
|
137551
|
+
exportDeclaration.moduleSpecifier,
|
|
137552
|
+
exportDeclaration.assertClause
|
|
137553
|
+
)
|
|
137554
|
+
);
|
|
137555
|
+
}
|
|
137556
|
+
}
|
|
137557
|
+
}
|
|
137558
|
+
}
|
|
137559
|
+
const lastReExport = findLast(targetFile.statements, (n) => isExportDeclaration(n) && !!n.moduleSpecifier && !removedExports.has(n));
|
|
137560
|
+
if (lastReExport) {
|
|
137561
|
+
changes.insertNodesBefore(
|
|
137562
|
+
targetFile,
|
|
137563
|
+
lastReExport,
|
|
137564
|
+
statements,
|
|
137565
|
+
/*blankLineBetween*/
|
|
137566
|
+
true
|
|
137567
|
+
);
|
|
137568
|
+
} else {
|
|
137569
|
+
changes.insertNodesAfter(targetFile, targetFile.statements[targetFile.statements.length - 1], statements);
|
|
137570
|
+
}
|
|
137571
|
+
}
|
|
137465
137572
|
function getOverloadRangeToMove(sourceFile, statement) {
|
|
137466
137573
|
if (isFunctionLikeDeclaration(statement)) {
|
|
137467
137574
|
const declarations = statement.symbol.declarations;
|
|
@@ -141497,10 +141604,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
141497
141604
|
host.log(message);
|
|
141498
141605
|
}
|
|
141499
141606
|
}
|
|
141500
|
-
const
|
|
141501
|
-
const getCanonicalFileName = createGetCanonicalFileName(
|
|
141607
|
+
const useCaseSensitiveFileNames2 = hostUsesCaseSensitiveFileNames(host);
|
|
141608
|
+
const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2);
|
|
141502
141609
|
const sourceMapper = getSourceMapper({
|
|
141503
|
-
useCaseSensitiveFileNames: () =>
|
|
141610
|
+
useCaseSensitiveFileNames: () => useCaseSensitiveFileNames2,
|
|
141504
141611
|
getCurrentDirectory: () => currentDirectory,
|
|
141505
141612
|
getProgram,
|
|
141506
141613
|
fileExists: maybeBind(host, host.fileExists),
|
|
@@ -141548,7 +141655,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
141548
141655
|
getSourceFileByPath: getOrCreateSourceFileByPath,
|
|
141549
141656
|
getCancellationToken: () => cancellationToken,
|
|
141550
141657
|
getCanonicalFileName,
|
|
141551
|
-
useCaseSensitiveFileNames: () =>
|
|
141658
|
+
useCaseSensitiveFileNames: () => useCaseSensitiveFileNames2,
|
|
141552
141659
|
getNewLine: () => getNewLineCharacter(newSettings),
|
|
141553
141660
|
getDefaultLibFileName: (options2) => host.getDefaultLibFileName(options2),
|
|
141554
141661
|
writeFile: noop,
|
|
@@ -141592,7 +141699,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
141592
141699
|
compilerHost.getSourceFile = getSourceFileWithCache;
|
|
141593
141700
|
(_c = host.setCompilerHost) == null ? void 0 : _c.call(host, compilerHost);
|
|
141594
141701
|
const parseConfigHost = {
|
|
141595
|
-
useCaseSensitiveFileNames,
|
|
141702
|
+
useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
|
|
141596
141703
|
fileExists: (fileName) => compilerHost.fileExists(fileName),
|
|
141597
141704
|
readFile: (fileName) => compilerHost.readFile(fileName),
|
|
141598
141705
|
readDirectory: (...args) => compilerHost.readDirectory(...args),
|
|
@@ -166471,6 +166578,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
166471
166578
|
return "parameter" /* parameterElement */;
|
|
166472
166579
|
} else if (symbol.valueDeclaration && isVarConst(symbol.valueDeclaration)) {
|
|
166473
166580
|
return "const" /* constElement */;
|
|
166581
|
+
} else if (symbol.valueDeclaration && isVarUsing(symbol.valueDeclaration)) {
|
|
166582
|
+
return "using" /* variableUsingElement */;
|
|
166583
|
+
} else if (symbol.valueDeclaration && isVarAwaitUsing(symbol.valueDeclaration)) {
|
|
166584
|
+
return "await using" /* variableAwaitUsingElement */;
|
|
166474
166585
|
} else if (forEach(symbol.declarations, isLet)) {
|
|
166475
166586
|
return "let" /* letElement */;
|
|
166476
166587
|
}
|
|
@@ -166864,7 +166975,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
166864
166975
|
} else {
|
|
166865
166976
|
addPrefixForAnyFunctionOrVar(symbol, symbolKind);
|
|
166866
166977
|
}
|
|
166867
|
-
if (symbolKind === "property" /* memberVariableElement */ || symbolKind === "accessor" /* memberAccessorVariableElement */ || symbolKind === "getter" /* memberGetAccessorElement */ || symbolKind === "setter" /* memberSetAccessorElement */ || symbolKind === "JSX attribute" /* jsxAttribute */ || symbolFlags & 3 /* Variable */ || symbolKind === "local var" /* localVariableElement */ || symbolKind === "index" /* indexSignatureElement */ || isThisExpression) {
|
|
166978
|
+
if (symbolKind === "property" /* memberVariableElement */ || symbolKind === "accessor" /* memberAccessorVariableElement */ || symbolKind === "getter" /* memberGetAccessorElement */ || symbolKind === "setter" /* memberSetAccessorElement */ || symbolKind === "JSX attribute" /* jsxAttribute */ || symbolFlags & 3 /* Variable */ || symbolKind === "local var" /* localVariableElement */ || symbolKind === "index" /* indexSignatureElement */ || symbolKind === "using" /* variableUsingElement */ || symbolKind === "await using" /* variableAwaitUsingElement */ || isThisExpression) {
|
|
166868
166979
|
displayParts.push(punctuationPart(59 /* ColonToken */));
|
|
166869
166980
|
displayParts.push(spacePart());
|
|
166870
166981
|
if (type.symbol && type.symbol.flags & 262144 /* TypeParameter */ && symbolKind !== "index" /* indexSignatureElement */) {
|
|
@@ -167014,6 +167125,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
167014
167125
|
case "let" /* letElement */:
|
|
167015
167126
|
case "const" /* constElement */:
|
|
167016
167127
|
case "constructor" /* constructorImplementationElement */:
|
|
167128
|
+
case "using" /* variableUsingElement */:
|
|
167129
|
+
case "await using" /* variableAwaitUsingElement */:
|
|
167017
167130
|
displayParts.push(textOrKeywordPart(symbolKind2));
|
|
167018
167131
|
return;
|
|
167019
167132
|
default:
|
|
@@ -167828,6 +167941,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
167828
167941
|
insertNodeBefore(sourceFile, before, newNode, blankLineBetween = false, options = {}) {
|
|
167829
167942
|
this.insertNodeAt(sourceFile, getAdjustedStartPosition(sourceFile, before, options), newNode, this.getOptionsForInsertNodeBefore(before, newNode, blankLineBetween));
|
|
167830
167943
|
}
|
|
167944
|
+
insertNodesBefore(sourceFile, before, newNodes, blankLineBetween = false, options = {}) {
|
|
167945
|
+
this.insertNodesAt(sourceFile, getAdjustedStartPosition(sourceFile, before, options), newNodes, this.getOptionsForInsertNodeBefore(before, first(newNodes), blankLineBetween));
|
|
167946
|
+
}
|
|
167831
167947
|
insertModifierAt(sourceFile, pos, modifier, options = {}) {
|
|
167832
167948
|
this.insertNodeAt(sourceFile, pos, factory.createToken(modifier), options);
|
|
167833
167949
|
}
|