typescript 5.2.0-dev.20230707 → 5.2.0-dev.20230709

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/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.20230707`;
38
+ version = `${versionMajorMinor}.0-dev.20230709`;
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(useCaseSensitiveFileNames) {
1468
- return useCaseSensitiveFileNames ? identity : toFileNameLowerCase;
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, useCaseSensitiveFileNames) {
5428
+ function createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2) {
5429
5429
  const fileWatcherCallbacks = createMultiMap();
5430
5430
  const dirWatchers = /* @__PURE__ */ new Map();
5431
- const toCanonicalName = createGetCanonicalFileName(useCaseSensitiveFileNames);
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, useCaseSensitiveFileNames, name, callback, createWatcher) {
5508
- const toCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames);
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(!useCaseSensitiveFileNames);
5571
- const toCanonicalFilePath = createGetCanonicalFileName(useCaseSensitiveFileNames);
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, useCaseSensitiveFileNames, getCurrentDirectory);
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 (useCaseSensitiveFileNames)
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, useCaseSensitiveFileNames, getCurrentDirectory) {
5762
- return ((options == null ? void 0 : options.excludeDirectories) || (options == null ? void 0 : options.excludeFiles)) && (matchesExclude(pathToCheck, options == null ? void 0 : options.excludeFiles, useCaseSensitiveFileNames, getCurrentDirectory()) || matchesExclude(pathToCheck, options == null ? void 0 : options.excludeDirectories, useCaseSensitiveFileNames, getCurrentDirectory()));
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, useCaseSensitiveFileNames, getCurrentDirectory) {
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, useCaseSensitiveFileNames, getCurrentDirectory)) {
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, useCaseSensitiveFileNames);
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, useCaseSensitiveFileNames, getCurrentDirectory),
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, useCaseSensitiveFileNames, getCurrentDirectory),
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
- useCaseSensitiveFileNames,
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
- useCaseSensitiveFileNames,
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 useCaseSensitiveFileNames = isFileSystemCaseSensitive();
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, useCaseSensitiveFileNames)) {
6309
+ if (containsPath(fileUrlRoot, url, useCaseSensitiveFileNames2)) {
6310
6310
  node.callFrame.url = getRelativePathToDirectoryOrUrl(
6311
6311
  fileUrlRoot,
6312
6312
  url,
6313
6313
  fileUrlRoot,
6314
- createGetCanonicalFileName(useCaseSensitiveFileNames),
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, useCaseSensitiveFileNames, process.cwd(), depth, getAccessibleFileSystemEntries, realpath);
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;
@@ -18402,7 +18402,7 @@ ${lanes.join("\n")}
18402
18402
  function replaceWildcardCharacter(match, singleAsteriskRegexFragment) {
18403
18403
  return match === "*" ? singleAsteriskRegexFragment : match === "?" ? "[^/]" : "\\" + match;
18404
18404
  }
18405
- function getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames, currentDirectory) {
18405
+ function getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames2, currentDirectory) {
18406
18406
  path = normalizePath(path);
18407
18407
  currentDirectory = normalizePath(currentDirectory);
18408
18408
  const absolutePath = combinePaths(currentDirectory, path);
@@ -18411,22 +18411,22 @@ ${lanes.join("\n")}
18411
18411
  includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"),
18412
18412
  includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"),
18413
18413
  excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"),
18414
- basePaths: getBasePaths(path, includes, useCaseSensitiveFileNames)
18414
+ basePaths: getBasePaths(path, includes, useCaseSensitiveFileNames2)
18415
18415
  };
18416
18416
  }
18417
- function getRegexFromPattern(pattern, useCaseSensitiveFileNames) {
18418
- return new RegExp(pattern, useCaseSensitiveFileNames ? "" : "i");
18417
+ function getRegexFromPattern(pattern, useCaseSensitiveFileNames2) {
18418
+ return new RegExp(pattern, useCaseSensitiveFileNames2 ? "" : "i");
18419
18419
  }
18420
- function matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames, currentDirectory, depth, getFileSystemEntries, realpath) {
18420
+ function matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames2, currentDirectory, depth, getFileSystemEntries, realpath) {
18421
18421
  path = normalizePath(path);
18422
18422
  currentDirectory = normalizePath(currentDirectory);
18423
- const patterns = getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames, currentDirectory);
18424
- const includeFileRegexes = patterns.includeFilePatterns && patterns.includeFilePatterns.map((pattern) => getRegexFromPattern(pattern, useCaseSensitiveFileNames));
18425
- const includeDirectoryRegex = patterns.includeDirectoryPattern && getRegexFromPattern(patterns.includeDirectoryPattern, useCaseSensitiveFileNames);
18426
- const excludeRegex = patterns.excludePattern && getRegexFromPattern(patterns.excludePattern, useCaseSensitiveFileNames);
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);
18427
18427
  const results = includeFileRegexes ? includeFileRegexes.map(() => []) : [[]];
18428
18428
  const visited = /* @__PURE__ */ new Map();
18429
- const toCanonical = createGetCanonicalFileName(useCaseSensitiveFileNames);
18429
+ const toCanonical = createGetCanonicalFileName(useCaseSensitiveFileNames2);
18430
18430
  for (const basePath of patterns.basePaths) {
18431
18431
  visitDirectory(basePath, combinePaths(currentDirectory, basePath), depth);
18432
18432
  }
@@ -18468,7 +18468,7 @@ ${lanes.join("\n")}
18468
18468
  }
18469
18469
  }
18470
18470
  }
18471
- function getBasePaths(path, includes, useCaseSensitiveFileNames) {
18471
+ function getBasePaths(path, includes, useCaseSensitiveFileNames2) {
18472
18472
  const basePaths = [path];
18473
18473
  if (includes) {
18474
18474
  const includeBasePaths = [];
@@ -18476,9 +18476,9 @@ ${lanes.join("\n")}
18476
18476
  const absolute = isRootedDiskPath(include) ? include : normalizePath(combinePaths(path, include));
18477
18477
  includeBasePaths.push(getIncludeBasePath(absolute));
18478
18478
  }
18479
- includeBasePaths.sort(getStringComparer(!useCaseSensitiveFileNames));
18479
+ includeBasePaths.sort(getStringComparer(!useCaseSensitiveFileNames2));
18480
18480
  for (const includeBasePath of includeBasePaths) {
18481
- if (every(basePaths, (basePath) => !containsPath(basePath, includeBasePath, path, !useCaseSensitiveFileNames))) {
18481
+ if (every(basePaths, (basePath) => !containsPath(basePath, includeBasePath, path, !useCaseSensitiveFileNames2))) {
18482
18482
  basePaths.push(includeBasePath);
18483
18483
  }
18484
18484
  }
@@ -37269,19 +37269,19 @@ ${lanes.join("\n")}
37269
37269
  const wildcardFiles = arrayFrom(wildcardFileMap.values());
37270
37270
  return literalFiles.concat(wildcardFiles, arrayFrom(wildCardJsonFileMap.values()));
37271
37271
  }
37272
- function isExcludedFile(pathToCheck, spec, basePath, useCaseSensitiveFileNames, currentDirectory) {
37272
+ function isExcludedFile(pathToCheck, spec, basePath, useCaseSensitiveFileNames2, currentDirectory) {
37273
37273
  const { validatedFilesSpec, validatedIncludeSpecs, validatedExcludeSpecs } = spec;
37274
37274
  if (!length(validatedIncludeSpecs) || !length(validatedExcludeSpecs))
37275
37275
  return false;
37276
37276
  basePath = normalizePath(basePath);
37277
- const keyMapper = createGetCanonicalFileName(useCaseSensitiveFileNames);
37277
+ const keyMapper = createGetCanonicalFileName(useCaseSensitiveFileNames2);
37278
37278
  if (validatedFilesSpec) {
37279
37279
  for (const fileName of validatedFilesSpec) {
37280
37280
  if (keyMapper(getNormalizedAbsolutePath(fileName, basePath)) === pathToCheck)
37281
37281
  return false;
37282
37282
  }
37283
37283
  }
37284
- return matchesExcludeWorker(pathToCheck, validatedExcludeSpecs, useCaseSensitiveFileNames, currentDirectory, basePath);
37284
+ return matchesExcludeWorker(pathToCheck, validatedExcludeSpecs, useCaseSensitiveFileNames2, currentDirectory, basePath);
37285
37285
  }
37286
37286
  function invalidDotDotAfterRecursiveWildcard(s) {
37287
37287
  const wildcardIndex = startsWith(s, "**/") ? 0 : s.indexOf("/**/");
@@ -37291,17 +37291,17 @@ ${lanes.join("\n")}
37291
37291
  const lastDotIndex = endsWith(s, "/..") ? s.length : s.lastIndexOf("/../");
37292
37292
  return lastDotIndex > wildcardIndex;
37293
37293
  }
37294
- function matchesExclude(pathToCheck, excludeSpecs, useCaseSensitiveFileNames, currentDirectory) {
37294
+ function matchesExclude(pathToCheck, excludeSpecs, useCaseSensitiveFileNames2, currentDirectory) {
37295
37295
  return matchesExcludeWorker(
37296
37296
  pathToCheck,
37297
37297
  filter(excludeSpecs, (spec) => !invalidDotDotAfterRecursiveWildcard(spec)),
37298
- useCaseSensitiveFileNames,
37298
+ useCaseSensitiveFileNames2,
37299
37299
  currentDirectory
37300
37300
  );
37301
37301
  }
37302
- function matchesExcludeWorker(pathToCheck, excludeSpecs, useCaseSensitiveFileNames, currentDirectory, basePath) {
37302
+ function matchesExcludeWorker(pathToCheck, excludeSpecs, useCaseSensitiveFileNames2, currentDirectory, basePath) {
37303
37303
  const excludePattern = getRegularExpressionForWildcard(excludeSpecs, combinePaths(normalizePath(currentDirectory), basePath), "exclude");
37304
- const excludeRegex = excludePattern && getRegexFromPattern(excludePattern, useCaseSensitiveFileNames);
37304
+ const excludeRegex = excludePattern && getRegexFromPattern(excludePattern, useCaseSensitiveFileNames2);
37305
37305
  if (!excludeRegex)
37306
37306
  return false;
37307
37307
  if (excludeRegex.test(pathToCheck))
@@ -37331,9 +37331,9 @@ ${lanes.join("\n")}
37331
37331
  return [Diagnostics.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec];
37332
37332
  }
37333
37333
  }
37334
- function getWildcardDirectories({ validatedIncludeSpecs: include, validatedExcludeSpecs: exclude }, path, useCaseSensitiveFileNames) {
37334
+ function getWildcardDirectories({ validatedIncludeSpecs: include, validatedExcludeSpecs: exclude }, path, useCaseSensitiveFileNames2) {
37335
37335
  const rawExcludeRegex = getRegularExpressionForWildcard(exclude, path, "exclude");
37336
- const excludeRegex = rawExcludeRegex && new RegExp(rawExcludeRegex, useCaseSensitiveFileNames ? "" : "i");
37336
+ const excludeRegex = rawExcludeRegex && new RegExp(rawExcludeRegex, useCaseSensitiveFileNames2 ? "" : "i");
37337
37337
  const wildcardDirectories = {};
37338
37338
  if (include !== void 0) {
37339
37339
  const recursiveKeys = [];
@@ -37342,7 +37342,7 @@ ${lanes.join("\n")}
37342
37342
  if (excludeRegex && excludeRegex.test(spec)) {
37343
37343
  continue;
37344
37344
  }
37345
- const match = getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames);
37345
+ const match = getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames2);
37346
37346
  if (match) {
37347
37347
  const { key, flags } = match;
37348
37348
  const existingFlags = wildcardDirectories[key];
@@ -37357,7 +37357,7 @@ ${lanes.join("\n")}
37357
37357
  for (const key in wildcardDirectories) {
37358
37358
  if (hasProperty(wildcardDirectories, key)) {
37359
37359
  for (const recursiveKey of recursiveKeys) {
37360
- if (key !== recursiveKey && containsPath(recursiveKey, key, path, !useCaseSensitiveFileNames)) {
37360
+ if (key !== recursiveKey && containsPath(recursiveKey, key, path, !useCaseSensitiveFileNames2)) {
37361
37361
  delete wildcardDirectories[key];
37362
37362
  }
37363
37363
  }
@@ -37366,20 +37366,20 @@ ${lanes.join("\n")}
37366
37366
  }
37367
37367
  return wildcardDirectories;
37368
37368
  }
37369
- function getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames) {
37369
+ function getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames2) {
37370
37370
  const match = wildcardDirectoryPattern.exec(spec);
37371
37371
  if (match) {
37372
37372
  const questionWildcardIndex = spec.indexOf("?");
37373
37373
  const starWildcardIndex = spec.indexOf("*");
37374
37374
  const lastDirectorySeperatorIndex = spec.lastIndexOf(directorySeparator);
37375
37375
  return {
37376
- key: useCaseSensitiveFileNames ? match[0] : toFileNameLowerCase(match[0]),
37376
+ key: useCaseSensitiveFileNames2 ? match[0] : toFileNameLowerCase(match[0]),
37377
37377
  flags: questionWildcardIndex !== -1 && questionWildcardIndex < lastDirectorySeperatorIndex || starWildcardIndex !== -1 && starWildcardIndex < lastDirectorySeperatorIndex ? 1 /* Recursive */ : 0 /* None */
37378
37378
  };
37379
37379
  }
37380
37380
  if (isImplicitGlob(spec.substring(spec.lastIndexOf(directorySeparator) + 1))) {
37381
37381
  return {
37382
- key: removeTrailingDirectorySeparator(useCaseSensitiveFileNames ? spec : toFileNameLowerCase(spec)),
37382
+ key: removeTrailingDirectorySeparator(useCaseSensitiveFileNames2 ? spec : toFileNameLowerCase(spec)),
37383
37383
  flags: 1 /* Recursive */
37384
37384
  };
37385
37385
  }
@@ -39065,6 +39065,18 @@ ${lanes.join("\n")}
39065
39065
  result.push("JSON");
39066
39066
  return result.join(", ");
39067
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
+ }
39068
39080
  function resolvedTypeScriptOnly(resolved) {
39069
39081
  if (!resolved) {
39070
39082
  return void 0;
@@ -39237,8 +39249,8 @@ ${lanes.join("\n")}
39237
39249
  return typeRoots;
39238
39250
  }
39239
39251
  function arePathsEqual(path1, path2, host) {
39240
- const useCaseSensitiveFileNames = typeof host.useCaseSensitiveFileNames === "function" ? host.useCaseSensitiveFileNames() : host.useCaseSensitiveFileNames;
39241
- return comparePaths(path1, path2, !useCaseSensitiveFileNames) === 0 /* EqualTo */;
39252
+ const useCaseSensitiveFileNames2 = typeof host.useCaseSensitiveFileNames === "function" ? host.useCaseSensitiveFileNames() : host.useCaseSensitiveFileNames;
39253
+ return comparePaths(path1, path2, !useCaseSensitiveFileNames2) === 0 /* EqualTo */;
39242
39254
  }
39243
39255
  function getOriginalAndResolvedFileName(fileName, host, traceEnabled) {
39244
39256
  const resolvedFileName = realPath(fileName, host, traceEnabled);
@@ -40501,7 +40513,7 @@ ${lanes.join("\n")}
40501
40513
  arrayIsEqualTo
40502
40514
  );
40503
40515
  for (const conditions of conditionSets) {
40504
- const loadPackageJsonExportsState = { ...loadPackageJsonMainState, failedLookupLocations: [], conditions };
40516
+ const loadPackageJsonExportsState = { ...loadPackageJsonMainState, failedLookupLocations: [], conditions, host };
40505
40517
  const exportResolutions = loadEntrypointsFromExportMap(
40506
40518
  packageJsonInfo,
40507
40519
  packageJsonInfo.contents.packageJsonContent.exports,
@@ -40533,23 +40545,42 @@ ${lanes.join("\n")}
40533
40545
  return entrypoints;
40534
40546
  function loadEntrypointsFromTargetExports(target) {
40535
40547
  var _a, _b;
40536
- if (typeof target === "string" && startsWith(target, "./") && target.indexOf("*") === -1) {
40537
- const partsAfterFirst = getPathComponents(target).slice(2);
40538
- if (partsAfterFirst.indexOf("..") >= 0 || partsAfterFirst.indexOf(".") >= 0 || partsAfterFirst.indexOf("node_modules") >= 0) {
40539
- return false;
40540
- }
40541
- const resolvedTarget = combinePaths(scope.packageDirectory, target);
40542
- const finalPath = getNormalizedAbsolutePath(resolvedTarget, (_b = (_a = state.host).getCurrentDirectory) == null ? void 0 : _b.call(_a));
40543
- const result = loadFileNameFromPackageJsonField(
40544
- extensions,
40545
- finalPath,
40546
- /*onlyRecordFailures*/
40547
- false,
40548
- state
40549
- );
40550
- if (result) {
40551
- entrypoints = appendIfUnique(entrypoints, result, (a, b) => a.path === b.path);
40552
- return true;
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
+ }
40553
40584
  }
40554
40585
  } else if (Array.isArray(target)) {
40555
40586
  for (const t of target) {
@@ -41108,13 +41139,10 @@ ${lanes.join("\n")}
41108
41139
  function combineDirectoryPath(root, dir) {
41109
41140
  return ensureTrailingDirectorySeparator(combinePaths(root, dir));
41110
41141
  }
41111
- function useCaseSensitiveFileNames() {
41112
- return !state.host.useCaseSensitiveFileNames ? true : typeof state.host.useCaseSensitiveFileNames === "boolean" ? state.host.useCaseSensitiveFileNames : state.host.useCaseSensitiveFileNames();
41113
- }
41114
41142
  function tryLoadInputFileForPath(finalPath, entry, packagePath, isImports2) {
41115
41143
  var _a, _b, _c, _d;
41116
- 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)) {
41117
- 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) });
41118
41146
  const commonSourceDirGuesses = [];
41119
41147
  if (state.compilerOptions.rootDir || state.compilerOptions.composite && state.compilerOptions.configFilePath) {
41120
41148
  const commonDir = toAbsolutePath(getCommonSourceDirectory(state.compilerOptions, () => [], ((_b = (_a = state.host).getCurrentDirectory) == null ? void 0 : _b.call(_a)) || "", getCanonicalFileName));
@@ -41143,7 +41171,7 @@ ${lanes.join("\n")}
41143
41171
  for (const commonSourceDirGuess of commonSourceDirGuesses) {
41144
41172
  const candidateDirectories = getOutputDirectoriesForBaseDirectory(commonSourceDirGuess);
41145
41173
  for (const candidateDir of candidateDirectories) {
41146
- if (containsPath(candidateDir, finalPath, !useCaseSensitiveFileNames())) {
41174
+ if (containsPath(candidateDir, finalPath, !useCaseSensitiveFileNames(state))) {
41147
41175
  const pathFragment = finalPath.slice(candidateDir.length + 1);
41148
41176
  const possibleInputBase = combinePaths(commonSourceDirGuess, pathFragment);
41149
41177
  const jsAndDtsExtensions = [".mjs" /* Mjs */, ".cjs" /* Cjs */, ".js" /* Js */, ".json" /* Json */, ".d.mts" /* Dmts */, ".d.cts" /* Dcts */, ".d.ts" /* Dts */];
@@ -41153,7 +41181,7 @@ ${lanes.join("\n")}
41153
41181
  for (const possibleExt of inputExts) {
41154
41182
  if (!extensionIsOk(extensions, possibleExt))
41155
41183
  continue;
41156
- const possibleInputWithInputExtension = changeAnyExtension(possibleInputBase, possibleExt, ext, !useCaseSensitiveFileNames());
41184
+ const possibleInputWithInputExtension = changeAnyExtension(possibleInputBase, possibleExt, ext, !useCaseSensitiveFileNames(state));
41157
41185
  if (state.host.fileExists(possibleInputWithInputExtension)) {
41158
41186
  return toSearchResult(withPackageId(scope, loadFileNameFromPackageJsonField(
41159
41187
  extensions,
@@ -41569,6 +41597,9 @@ ${lanes.join("\n")}
41569
41597
  trace(state.host, diagnostic, ...args);
41570
41598
  }
41571
41599
  }
41600
+ function useCaseSensitiveFileNames(state) {
41601
+ return !state.host.useCaseSensitiveFileNames ? true : typeof state.host.useCaseSensitiveFileNames === "boolean" ? state.host.useCaseSensitiveFileNames : state.host.useCaseSensitiveFileNames();
41602
+ }
41572
41603
  var typeScriptVersion, nodeModulesAtTypes, NodeResolutionFeatures, nodeModulesPathPart, mangledScopedPackageSeparator;
41573
41604
  var init_moduleNameResolver = __esm({
41574
41605
  "src/compiler/moduleNameResolver.ts"() {
@@ -45148,7 +45179,7 @@ ${lanes.join("\n")}
45148
45179
  for (const key of getOwnKeys(exports)) {
45149
45180
  if (key === "default" || conditions.indexOf(key) >= 0 || isApplicableVersionedTypesKey(conditions, key)) {
45150
45181
  const subTarget = exports[key];
45151
- const result = tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, packageName, subTarget, conditions);
45182
+ const result = tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, packageName, subTarget, conditions, mode);
45152
45183
  if (result) {
45153
45184
  return result;
45154
45185
  }
@@ -116968,14 +116999,14 @@ ${lanes.join("\n")}
116968
116999
  });
116969
117000
 
116970
117001
  // src/compiler/watchUtilities.ts
116971
- function createCachedDirectoryStructureHost(host, currentDirectory, useCaseSensitiveFileNames) {
117002
+ function createCachedDirectoryStructureHost(host, currentDirectory, useCaseSensitiveFileNames2) {
116972
117003
  if (!host.getDirectories || !host.readDirectory) {
116973
117004
  return void 0;
116974
117005
  }
116975
117006
  const cachedReadDirectoryResult = /* @__PURE__ */ new Map();
116976
- const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames);
117007
+ const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2);
116977
117008
  return {
116978
- useCaseSensitiveFileNames,
117009
+ useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
116979
117010
  fileExists,
116980
117011
  readFile: (path, encoding) => host.readFile(path, encoding),
116981
117012
  directoryExists: host.directoryExists && directoryExists,
@@ -117097,7 +117128,7 @@ ${lanes.join("\n")}
117097
117128
  const rootResult = tryReadDirectory2(rootDir, rootDirPath);
117098
117129
  let rootSymLinkResult;
117099
117130
  if (rootResult !== void 0) {
117100
- return matchFiles(rootDir, extensions, excludes, includes, useCaseSensitiveFileNames, currentDirectory, depth, getFileSystemEntries, realpath);
117131
+ return matchFiles(rootDir, extensions, excludes, includes, useCaseSensitiveFileNames2, currentDirectory, depth, getFileSystemEntries, realpath);
117101
117132
  }
117102
117133
  return host.readDirectory(rootDir, extensions, excludes, includes, depth);
117103
117134
  function getFileSystemEntries(dir) {
@@ -117292,7 +117323,7 @@ ${lanes.join("\n")}
117292
117323
  program,
117293
117324
  extraFileExtensions,
117294
117325
  currentDirectory,
117295
- useCaseSensitiveFileNames,
117326
+ useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
117296
117327
  writeLog,
117297
117328
  toPath: toPath3
117298
117329
  }) {
@@ -117308,7 +117339,7 @@ ${lanes.join("\n")}
117308
117339
  writeLog(`Project: ${configFileName} Detected file add/remove of non supported extension: ${fileOrDirectory}`);
117309
117340
  return true;
117310
117341
  }
117311
- if (isExcludedFile(fileOrDirectory, options.configFile.configFileSpecs, getNormalizedAbsolutePath(getDirectoryPath(configFileName), currentDirectory), useCaseSensitiveFileNames, currentDirectory)) {
117342
+ if (isExcludedFile(fileOrDirectory, options.configFile.configFileSpecs, getNormalizedAbsolutePath(getDirectoryPath(configFileName), currentDirectory), useCaseSensitiveFileNames2, currentDirectory)) {
117312
117343
  writeLog(`Project: ${configFileName} Detected excluded file: ${fileOrDirectory}`);
117313
117344
  return true;
117314
117345
  }
@@ -117365,7 +117396,7 @@ ${lanes.join("\n")}
117365
117396
  function createExcludeHandlingAddWatch(key) {
117366
117397
  return (file, cb, flags, options, detailInfo1, detailInfo2) => {
117367
117398
  var _a;
117368
- return !matchesExclude(file, key === "watchFile" ? options == null ? void 0 : options.excludeFiles : options == null ? void 0 : options.excludeDirectories, useCaseSensitiveFileNames(), ((_a = host.getCurrentDirectory) == null ? void 0 : _a.call(host)) || "") ? factory2[key].call(
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(
117369
117400
  /*thisArgs*/
117370
117401
  void 0,
117371
117402
  file,
@@ -117377,7 +117408,7 @@ ${lanes.join("\n")}
117377
117408
  ) : excludeWatcherFactory(file, flags, options, detailInfo1, detailInfo2);
117378
117409
  };
117379
117410
  }
117380
- function useCaseSensitiveFileNames() {
117411
+ function useCaseSensitiveFileNames2() {
117381
117412
  return typeof host.useCaseSensitiveFileNames === "boolean" ? host.useCaseSensitiveFileNames : host.useCaseSensitiveFileNames();
117382
117413
  }
117383
117414
  function createExcludeWatcherWithLogging(file, flags, options, detailInfo1, detailInfo2) {
@@ -124512,12 +124543,12 @@ ${lanes.join("\n")}
124512
124543
  return true;
124513
124544
  const isJsonFile = fileExtensionIs(fileName, ".json" /* Json */);
124514
124545
  const basePath = getDirectoryPath(getNormalizedAbsolutePath(configFile.fileName, program.getCurrentDirectory()));
124515
- const useCaseSensitiveFileNames = program.useCaseSensitiveFileNames();
124546
+ const useCaseSensitiveFileNames2 = program.useCaseSensitiveFileNames();
124516
124547
  return find((_b = configFile == null ? void 0 : configFile.configFileSpecs) == null ? void 0 : _b.validatedIncludeSpecs, (includeSpec) => {
124517
124548
  if (isJsonFile && !endsWith(includeSpec, ".json" /* Json */))
124518
124549
  return false;
124519
124550
  const pattern = getPatternFromSpec(includeSpec, basePath, "files");
124520
- return !!pattern && getRegexFromPattern(`(${pattern})$`, useCaseSensitiveFileNames).test(fileName);
124551
+ return !!pattern && getRegexFromPattern(`(${pattern})$`, useCaseSensitiveFileNames2).test(fileName);
124521
124552
  });
124522
124553
  }
124523
124554
  function fileIncludeReasonToDiagnostics(program, reason, fileNameConvertor) {
@@ -124721,7 +124752,7 @@ ${lanes.join("\n")}
124721
124752
  return result;
124722
124753
  }
124723
124754
  function createCompilerHostFromProgramHost(host, getCompilerOptions, directoryStructureHost = host) {
124724
- const useCaseSensitiveFileNames = host.useCaseSensitiveFileNames();
124755
+ const useCaseSensitiveFileNames2 = host.useCaseSensitiveFileNames();
124725
124756
  const compilerHost = {
124726
124757
  getSourceFile: createGetSourceFile(
124727
124758
  (fileName, encoding) => !encoding ? compilerHost.readFile(fileName) : host.readFile(fileName, encoding),
@@ -124737,8 +124768,8 @@ ${lanes.join("\n")}
124737
124768
  (path) => host.directoryExists(path)
124738
124769
  ),
124739
124770
  getCurrentDirectory: memoize(() => host.getCurrentDirectory()),
124740
- useCaseSensitiveFileNames: () => useCaseSensitiveFileNames,
124741
- getCanonicalFileName: createGetCanonicalFileName(useCaseSensitiveFileNames),
124771
+ useCaseSensitiveFileNames: () => useCaseSensitiveFileNames2,
124772
+ getCanonicalFileName: createGetCanonicalFileName(useCaseSensitiveFileNames2),
124742
124773
  getNewLine: () => getNewLineCharacter(getCompilerOptions()),
124743
124774
  fileExists: (f) => host.fileExists(f),
124744
124775
  readFile: (f) => host.readFile(f),
@@ -125019,7 +125050,7 @@ ${lanes.join("\n")}
125019
125050
  const sourceFilesCache = /* @__PURE__ */ new Map();
125020
125051
  let missingFilePathsRequestedForRelease;
125021
125052
  let hasChangedCompilerOptions = false;
125022
- const useCaseSensitiveFileNames = host.useCaseSensitiveFileNames();
125053
+ const useCaseSensitiveFileNames2 = host.useCaseSensitiveFileNames();
125023
125054
  const currentDirectory = host.getCurrentDirectory();
125024
125055
  const { configFileName, optionsToExtend: optionsToExtendForConfigFile = {}, watchOptionsToExtend, extraFileExtensions, createProgram: createProgram2 } = host;
125025
125056
  let { rootFiles: rootFileNames, options: compilerOptions, watchOptions, projectReferences } = host;
@@ -125027,7 +125058,7 @@ ${lanes.join("\n")}
125027
125058
  let configFileParsingDiagnostics;
125028
125059
  let canConfigFileJsonReportNoInputFiles = false;
125029
125060
  let hasChangedConfigFileParsingErrors = false;
125030
- const cachedDirectoryStructureHost = configFileName === void 0 ? void 0 : createCachedDirectoryStructureHost(host, currentDirectory, useCaseSensitiveFileNames);
125061
+ const cachedDirectoryStructureHost = configFileName === void 0 ? void 0 : createCachedDirectoryStructureHost(host, currentDirectory, useCaseSensitiveFileNames2);
125031
125062
  const directoryStructureHost = cachedDirectoryStructureHost || host;
125032
125063
  const parseConfigFileHost = parseConfigHostFromCompilerHostLike(host, directoryStructureHost);
125033
125064
  let newLine = updateNewLine();
@@ -125045,8 +125076,8 @@ ${lanes.join("\n")}
125045
125076
  Debug.assert(compilerOptions);
125046
125077
  Debug.assert(rootFileNames);
125047
125078
  const { watchFile: watchFile2, watchDirectory, writeLog } = createWatchFactory(host, compilerOptions);
125048
- const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames);
125049
- writeLog(`Current directory: ${currentDirectory} CaseSensitiveFileNames: ${useCaseSensitiveFileNames}`);
125079
+ const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2);
125080
+ writeLog(`Current directory: ${currentDirectory} CaseSensitiveFileNames: ${useCaseSensitiveFileNames2}`);
125050
125081
  let configFileWatcher;
125051
125082
  if (configFileName) {
125052
125083
  configFileWatcher = watchFile2(configFileName, scheduleProgramReload, 2e3 /* High */, watchOptions, WatchType.ConfigFile);
@@ -125552,7 +125583,7 @@ ${lanes.join("\n")}
125552
125583
  options: compilerOptions,
125553
125584
  program: getCurrentBuilderProgram() || rootFileNames,
125554
125585
  currentDirectory,
125555
- useCaseSensitiveFileNames,
125586
+ useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
125556
125587
  writeLog,
125557
125588
  toPath: toPath3
125558
125589
  }))
@@ -125642,7 +125673,7 @@ ${lanes.join("\n")}
125642
125673
  options: config.parsedCommandLine.options,
125643
125674
  program: config.parsedCommandLine.fileNames,
125644
125675
  currentDirectory,
125645
- useCaseSensitiveFileNames,
125676
+ useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
125646
125677
  writeLog,
125647
125678
  toPath: toPath3
125648
125679
  }))
@@ -128420,6 +128451,8 @@ ${lanes.join("\n")}
128420
128451
  ScriptElementKind2["enumMemberElement"] = "enum member";
128421
128452
  ScriptElementKind2["variableElement"] = "var";
128422
128453
  ScriptElementKind2["localVariableElement"] = "local var";
128454
+ ScriptElementKind2["variableUsingElement"] = "using";
128455
+ ScriptElementKind2["variableAwaitUsingElement"] = "await using";
128423
128456
  ScriptElementKind2["functionElement"] = "function";
128424
128457
  ScriptElementKind2["localFunctionElement"] = "local function";
128425
128458
  ScriptElementKind2["memberFunctionElement"] = "method";
@@ -131553,10 +131586,10 @@ ${lanes.join("\n")}
131553
131586
  }
131554
131587
  function forEachExternalModuleToImportFrom(program, host, preferences, useAutoImportProvider, cb) {
131555
131588
  var _a, _b;
131556
- const useCaseSensitiveFileNames = hostUsesCaseSensitiveFileNames(host);
131589
+ const useCaseSensitiveFileNames2 = hostUsesCaseSensitiveFileNames(host);
131557
131590
  const excludePatterns = preferences.autoImportFileExcludePatterns && mapDefined(preferences.autoImportFileExcludePatterns, (spec) => {
131558
131591
  const pattern = getPatternFromSpec(spec, "", "exclude");
131559
- return pattern ? getRegexFromPattern(pattern, useCaseSensitiveFileNames) : void 0;
131592
+ return pattern ? getRegexFromPattern(pattern, useCaseSensitiveFileNames2) : void 0;
131560
131593
  });
131561
131594
  forEachExternalModule(program.getTypeChecker(), program.getSourceFiles(), excludePatterns, (module2, file) => cb(
131562
131595
  module2,
@@ -133052,12 +133085,12 @@ ${lanes.join("\n")}
133052
133085
  function isDocumentRegistryEntry(entry) {
133053
133086
  return !!entry.sourceFile;
133054
133087
  }
133055
- function createDocumentRegistry(useCaseSensitiveFileNames, currentDirectory) {
133056
- return createDocumentRegistryInternal(useCaseSensitiveFileNames, currentDirectory);
133088
+ function createDocumentRegistry(useCaseSensitiveFileNames2, currentDirectory) {
133089
+ return createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory);
133057
133090
  }
133058
- function createDocumentRegistryInternal(useCaseSensitiveFileNames, currentDirectory = "", externalCache) {
133091
+ function createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory = "", externalCache) {
133059
133092
  const buckets = /* @__PURE__ */ new Map();
133060
- const getCanonicalFileName = createGetCanonicalFileName(!!useCaseSensitiveFileNames);
133093
+ const getCanonicalFileName = createGetCanonicalFileName(!!useCaseSensitiveFileNames2);
133061
133094
  function reportStats() {
133062
133095
  const bucketInfoArray = arrayFrom(buckets.keys()).filter((name) => name && name.charAt(0) === "_").map((name) => {
133063
133096
  const entries = buckets.get(name);
@@ -133266,12 +133299,12 @@ ${lanes.join("\n")}
133266
133299
 
133267
133300
  // src/services/getEditsForFileRename.ts
133268
133301
  function getEditsForFileRename(program, oldFileOrDirPath, newFileOrDirPath, host, formatContext, preferences, sourceMapper) {
133269
- const useCaseSensitiveFileNames = hostUsesCaseSensitiveFileNames(host);
133270
- const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames);
133302
+ const useCaseSensitiveFileNames2 = hostUsesCaseSensitiveFileNames(host);
133303
+ const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2);
133271
133304
  const oldToNew = getPathUpdater(oldFileOrDirPath, newFileOrDirPath, getCanonicalFileName, sourceMapper);
133272
133305
  const newToOld = getPathUpdater(newFileOrDirPath, oldFileOrDirPath, getCanonicalFileName, sourceMapper);
133273
133306
  return ts_textChanges_exports.ChangeTracker.with({ host, formatContext, preferences }, (changeTracker) => {
133274
- updateTsconfigFiles(program, changeTracker, oldToNew, oldFileOrDirPath, newFileOrDirPath, host.getCurrentDirectory(), useCaseSensitiveFileNames);
133307
+ updateTsconfigFiles(program, changeTracker, oldToNew, oldFileOrDirPath, newFileOrDirPath, host.getCurrentDirectory(), useCaseSensitiveFileNames2);
133275
133308
  updateImports(program, changeTracker, oldToNew, newToOld, host, getCanonicalFileName);
133276
133309
  });
133277
133310
  }
@@ -133293,7 +133326,7 @@ ${lanes.join("\n")}
133293
133326
  const rel = getRelativePathFromFile(a0, b0, getCanonicalFileName);
133294
133327
  return combinePathsSafe(getDirectoryPath(a1), rel);
133295
133328
  }
133296
- function updateTsconfigFiles(program, changeTracker, oldToNew, oldFileOrDirPath, newFileOrDirPath, currentDirectory, useCaseSensitiveFileNames) {
133329
+ function updateTsconfigFiles(program, changeTracker, oldToNew, oldFileOrDirPath, newFileOrDirPath, currentDirectory, useCaseSensitiveFileNames2) {
133297
133330
  const { configFile } = program.getCompilerOptions();
133298
133331
  if (!configFile)
133299
133332
  return;
@@ -133317,10 +133350,10 @@ ${lanes.join("\n")}
133317
133350
  /*excludes*/
133318
133351
  [],
133319
133352
  includes,
133320
- useCaseSensitiveFileNames,
133353
+ useCaseSensitiveFileNames2,
133321
133354
  currentDirectory
133322
133355
  );
133323
- if (getRegexFromPattern(Debug.checkDefined(matchers.includeFilePattern), useCaseSensitiveFileNames).test(oldFileOrDirPath) && !getRegexFromPattern(Debug.checkDefined(matchers.includeFilePattern), useCaseSensitiveFileNames).test(newFileOrDirPath)) {
133356
+ if (getRegexFromPattern(Debug.checkDefined(matchers.includeFilePattern), useCaseSensitiveFileNames2).test(oldFileOrDirPath) && !getRegexFromPattern(Debug.checkDefined(matchers.includeFilePattern), useCaseSensitiveFileNames2).test(newFileOrDirPath)) {
133324
133357
  changeTracker.insertNodeAfter(configFile, last(property.initializer.elements), factory.createStringLiteral(relativePath(newFileOrDirPath)));
133325
133358
  }
133326
133359
  return;
@@ -133368,7 +133401,7 @@ ${lanes.join("\n")}
133368
133401
  configDir,
133369
133402
  path,
133370
133403
  /*ignoreCase*/
133371
- !useCaseSensitiveFileNames
133404
+ !useCaseSensitiveFileNames2
133372
133405
  );
133373
133406
  }
133374
133407
  }
@@ -136682,7 +136715,7 @@ ${lanes.join("\n")}
136682
136715
  const body = addExports(oldFile, toMove.all, usage.oldFileImportsFromTargetFile, useEsModuleSyntax);
136683
136716
  if (typeof targetFile !== "string") {
136684
136717
  if (targetFile.statements.length > 0) {
136685
- changes.insertNodesAfter(targetFile, targetFile.statements[targetFile.statements.length - 1], body);
136718
+ moveStatementsToTargetFile(changes, program, body, targetFile, toMove);
136686
136719
  } else {
136687
136720
  changes.insertNodesAtEndOfFile(
136688
136721
  targetFile,
@@ -137475,6 +137508,67 @@ ${lanes.join("\n")}
137475
137508
  return false;
137476
137509
  }
137477
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
+ }
137478
137572
  function getOverloadRangeToMove(sourceFile, statement) {
137479
137573
  if (isFunctionLikeDeclaration(statement)) {
137480
137574
  const declarations = statement.symbol.declarations;
@@ -141510,10 +141604,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
141510
141604
  host.log(message);
141511
141605
  }
141512
141606
  }
141513
- const useCaseSensitiveFileNames = hostUsesCaseSensitiveFileNames(host);
141514
- const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames);
141607
+ const useCaseSensitiveFileNames2 = hostUsesCaseSensitiveFileNames(host);
141608
+ const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2);
141515
141609
  const sourceMapper = getSourceMapper({
141516
- useCaseSensitiveFileNames: () => useCaseSensitiveFileNames,
141610
+ useCaseSensitiveFileNames: () => useCaseSensitiveFileNames2,
141517
141611
  getCurrentDirectory: () => currentDirectory,
141518
141612
  getProgram,
141519
141613
  fileExists: maybeBind(host, host.fileExists),
@@ -141561,7 +141655,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
141561
141655
  getSourceFileByPath: getOrCreateSourceFileByPath,
141562
141656
  getCancellationToken: () => cancellationToken,
141563
141657
  getCanonicalFileName,
141564
- useCaseSensitiveFileNames: () => useCaseSensitiveFileNames,
141658
+ useCaseSensitiveFileNames: () => useCaseSensitiveFileNames2,
141565
141659
  getNewLine: () => getNewLineCharacter(newSettings),
141566
141660
  getDefaultLibFileName: (options2) => host.getDefaultLibFileName(options2),
141567
141661
  writeFile: noop,
@@ -141605,7 +141699,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
141605
141699
  compilerHost.getSourceFile = getSourceFileWithCache;
141606
141700
  (_c = host.setCompilerHost) == null ? void 0 : _c.call(host, compilerHost);
141607
141701
  const parseConfigHost = {
141608
- useCaseSensitiveFileNames,
141702
+ useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
141609
141703
  fileExists: (fileName) => compilerHost.fileExists(fileName),
141610
141704
  readFile: (fileName) => compilerHost.readFile(fileName),
141611
141705
  readDirectory: (...args) => compilerHost.readDirectory(...args),
@@ -166484,6 +166578,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
166484
166578
  return "parameter" /* parameterElement */;
166485
166579
  } else if (symbol.valueDeclaration && isVarConst(symbol.valueDeclaration)) {
166486
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 */;
166487
166585
  } else if (forEach(symbol.declarations, isLet)) {
166488
166586
  return "let" /* letElement */;
166489
166587
  }
@@ -166877,7 +166975,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
166877
166975
  } else {
166878
166976
  addPrefixForAnyFunctionOrVar(symbol, symbolKind);
166879
166977
  }
166880
- 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) {
166881
166979
  displayParts.push(punctuationPart(59 /* ColonToken */));
166882
166980
  displayParts.push(spacePart());
166883
166981
  if (type.symbol && type.symbol.flags & 262144 /* TypeParameter */ && symbolKind !== "index" /* indexSignatureElement */) {
@@ -167027,6 +167125,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
167027
167125
  case "let" /* letElement */:
167028
167126
  case "const" /* constElement */:
167029
167127
  case "constructor" /* constructorImplementationElement */:
167128
+ case "using" /* variableUsingElement */:
167129
+ case "await using" /* variableAwaitUsingElement */:
167030
167130
  displayParts.push(textOrKeywordPart(symbolKind2));
167031
167131
  return;
167032
167132
  default:
@@ -167841,6 +167941,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
167841
167941
  insertNodeBefore(sourceFile, before, newNode, blankLineBetween = false, options = {}) {
167842
167942
  this.insertNodeAt(sourceFile, getAdjustedStartPosition(sourceFile, before, options), newNode, this.getOptionsForInsertNodeBefore(before, newNode, blankLineBetween));
167843
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
+ }
167844
167947
  insertModifierAt(sourceFile, pos, modifier, options = {}) {
167845
167948
  this.insertNodeAt(sourceFile, pos, factory.createToken(modifier), options);
167846
167949
  }