typescript 5.2.0-dev.20230707 → 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 CHANGED
@@ -18,7 +18,7 @@ and limitations under the License.
18
18
 
19
19
  // src/compiler/corePublic.ts
20
20
  var versionMajorMinor = "5.2";
21
- var version = `${versionMajorMinor}.0-dev.20230707`;
21
+ var version = `${versionMajorMinor}.0-dev.20230708`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -1145,8 +1145,8 @@ function unorderedRemoveFirstItemWhere(array, predicate) {
1145
1145
  }
1146
1146
  return false;
1147
1147
  }
1148
- function createGetCanonicalFileName(useCaseSensitiveFileNames) {
1149
- return useCaseSensitiveFileNames ? identity : toFileNameLowerCase;
1148
+ function createGetCanonicalFileName(useCaseSensitiveFileNames2) {
1149
+ return useCaseSensitiveFileNames2 ? identity : toFileNameLowerCase;
1150
1150
  }
1151
1151
  function patternText({ prefix, suffix }) {
1152
1152
  return `${prefix}*${suffix}`;
@@ -4173,10 +4173,10 @@ function createDynamicPriorityPollingWatchFile(host) {
4173
4173
  pollingIntervalQueue(pollingInterval).pollScheduled = host.setTimeout(pollingInterval === 250 /* Low */ ? pollLowPollingIntervalQueue : pollPollingIntervalQueue, pollingInterval, pollingInterval === 250 /* Low */ ? "pollLowPollingIntervalQueue" : "pollPollingIntervalQueue", pollingIntervalQueue(pollingInterval));
4174
4174
  }
4175
4175
  }
4176
- function createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames) {
4176
+ function createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2) {
4177
4177
  const fileWatcherCallbacks = createMultiMap();
4178
4178
  const dirWatchers = /* @__PURE__ */ new Map();
4179
- const toCanonicalName = createGetCanonicalFileName(useCaseSensitiveFileNames);
4179
+ const toCanonicalName = createGetCanonicalFileName(useCaseSensitiveFileNames2);
4180
4180
  return nonPollingWatchFile;
4181
4181
  function nonPollingWatchFile(fileName, callback, _pollingInterval, fallbackOptions) {
4182
4182
  const filePath = toCanonicalName(fileName);
@@ -4252,8 +4252,8 @@ function createFixedChunkSizePollingWatchFile(host) {
4252
4252
  pollScheduled = host.setTimeout(pollQueue, 2e3 /* High */, "pollQueue");
4253
4253
  }
4254
4254
  }
4255
- function createSingleWatcherPerName(cache, useCaseSensitiveFileNames, name, callback, createWatcher) {
4256
- const toCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames);
4255
+ function createSingleWatcherPerName(cache, useCaseSensitiveFileNames2, name, callback, createWatcher) {
4256
+ const toCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2);
4257
4257
  const path = toCanonicalFileName(name);
4258
4258
  const existing = cache.get(path);
4259
4259
  if (existing) {
@@ -4305,7 +4305,7 @@ function setSysLog(logger) {
4305
4305
  }
4306
4306
  function createDirectoryWatcherSupportingRecursive({
4307
4307
  watchDirectory,
4308
- useCaseSensitiveFileNames,
4308
+ useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
4309
4309
  getCurrentDirectory,
4310
4310
  getAccessibleSortedChildDirectories,
4311
4311
  fileSystemEntryExists,
@@ -4317,8 +4317,8 @@ function createDirectoryWatcherSupportingRecursive({
4317
4317
  const callbackCache = createMultiMap();
4318
4318
  const cacheToUpdateChildWatches = /* @__PURE__ */ new Map();
4319
4319
  let timerToUpdateChildWatches;
4320
- const filePathComparer = getStringComparer(!useCaseSensitiveFileNames);
4321
- const toCanonicalFilePath = createGetCanonicalFileName(useCaseSensitiveFileNames);
4320
+ const filePathComparer = getStringComparer(!useCaseSensitiveFileNames2);
4321
+ const toCanonicalFilePath = createGetCanonicalFileName(useCaseSensitiveFileNames2);
4322
4322
  return (dirName, callback, recursive, options) => recursive ? createDirectoryWatcher(dirName, options, callback) : watchDirectory(dirName, callback, recursive, options);
4323
4323
  function createDirectoryWatcher(dirName, options, callback) {
4324
4324
  const dirPath = toCanonicalFilePath(dirName);
@@ -4485,12 +4485,12 @@ function createDirectoryWatcherSupportingRecursive({
4485
4485
  }
4486
4486
  }
4487
4487
  function isIgnoredPath(path, options) {
4488
- return some(ignoredPaths, (searchPath) => isInPath(path, searchPath)) || isIgnoredByWatchOptions(path, options, useCaseSensitiveFileNames, getCurrentDirectory);
4488
+ return some(ignoredPaths, (searchPath) => isInPath(path, searchPath)) || isIgnoredByWatchOptions(path, options, useCaseSensitiveFileNames2, getCurrentDirectory);
4489
4489
  }
4490
4490
  function isInPath(path, searchPath) {
4491
4491
  if (stringContains(path, searchPath))
4492
4492
  return true;
4493
- if (useCaseSensitiveFileNames)
4493
+ if (useCaseSensitiveFileNames2)
4494
4494
  return false;
4495
4495
  return stringContains(toCanonicalFilePath(path), searchPath);
4496
4496
  }
@@ -4508,14 +4508,14 @@ function createFsWatchCallbackForFileWatcherCallback(fileName, callback, getModi
4508
4508
  }
4509
4509
  };
4510
4510
  }
4511
- function isIgnoredByWatchOptions(pathToCheck, options, useCaseSensitiveFileNames, getCurrentDirectory) {
4512
- 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()));
4511
+ function isIgnoredByWatchOptions(pathToCheck, options, useCaseSensitiveFileNames2, getCurrentDirectory) {
4512
+ 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()));
4513
4513
  }
4514
- function createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames, getCurrentDirectory) {
4514
+ function createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames2, getCurrentDirectory) {
4515
4515
  return (eventName, relativeFileName) => {
4516
4516
  if (eventName === "rename") {
4517
4517
  const fileName = !relativeFileName ? directoryName : normalizePath(combinePaths(directoryName, relativeFileName));
4518
- if (!relativeFileName || !isIgnoredByWatchOptions(fileName, options, useCaseSensitiveFileNames, getCurrentDirectory)) {
4518
+ if (!relativeFileName || !isIgnoredByWatchOptions(fileName, options, useCaseSensitiveFileNames2, getCurrentDirectory)) {
4519
4519
  callback(fileName);
4520
4520
  }
4521
4521
  }
@@ -4528,7 +4528,7 @@ function createSystemWatchFunctions({
4528
4528
  clearTimeout: clearTimeout2,
4529
4529
  fsWatchWorker,
4530
4530
  fileSystemEntryExists,
4531
- useCaseSensitiveFileNames,
4531
+ useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
4532
4532
  getCurrentDirectory,
4533
4533
  fsSupportsRecursiveFsWatch,
4534
4534
  getAccessibleSortedChildDirectories,
@@ -4600,7 +4600,7 @@ function createSystemWatchFunctions({
4600
4600
  );
4601
4601
  case 5 /* UseFsEventsOnParentDirectory */:
4602
4602
  if (!nonPollingWatchFile) {
4603
- nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames);
4603
+ nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2);
4604
4604
  }
4605
4605
  return nonPollingWatchFile(fileName, callback, pollingInterval, getFallbackOptions(options));
4606
4606
  default:
@@ -4649,7 +4649,7 @@ function createSystemWatchFunctions({
4649
4649
  return fsWatch(
4650
4650
  directoryName,
4651
4651
  1 /* Directory */,
4652
- createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames, getCurrentDirectory),
4652
+ createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames2, getCurrentDirectory),
4653
4653
  recursive,
4654
4654
  500 /* Medium */,
4655
4655
  getFallbackOptions(options)
@@ -4657,7 +4657,7 @@ function createSystemWatchFunctions({
4657
4657
  }
4658
4658
  if (!hostRecursiveDirectoryWatcher) {
4659
4659
  hostRecursiveDirectoryWatcher = createDirectoryWatcherSupportingRecursive({
4660
- useCaseSensitiveFileNames,
4660
+ useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
4661
4661
  getCurrentDirectory,
4662
4662
  fileSystemEntryExists,
4663
4663
  getAccessibleSortedChildDirectories,
@@ -4703,7 +4703,7 @@ function createSystemWatchFunctions({
4703
4703
  return fsWatch(
4704
4704
  directoryName,
4705
4705
  1 /* Directory */,
4706
- createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames, getCurrentDirectory),
4706
+ createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames2, getCurrentDirectory),
4707
4707
  recursive,
4708
4708
  500 /* Medium */,
4709
4709
  getFallbackOptions(watchDirectoryOptions)
@@ -4731,7 +4731,7 @@ function createSystemWatchFunctions({
4731
4731
  function pollingWatchFile(fileName, callback, pollingInterval, options) {
4732
4732
  return createSingleWatcherPerName(
4733
4733
  pollingWatches,
4734
- useCaseSensitiveFileNames,
4734
+ useCaseSensitiveFileNames2,
4735
4735
  fileName,
4736
4736
  callback,
4737
4737
  (cb) => pollingWatchFileWorker(fileName, cb, pollingInterval, options)
@@ -4740,7 +4740,7 @@ function createSystemWatchFunctions({
4740
4740
  function fsWatch(fileOrDirectory, entryKind, callback, recursive, fallbackPollingInterval, fallbackOptions) {
4741
4741
  return createSingleWatcherPerName(
4742
4742
  recursive ? fsWatchesRecursive : fsWatches,
4743
- useCaseSensitiveFileNames,
4743
+ useCaseSensitiveFileNames2,
4744
4744
  fileOrDirectory,
4745
4745
  callback,
4746
4746
  (cb) => fsWatchHandlingExistenceOnHost(fileOrDirectory, entryKind, cb, recursive, fallbackPollingInterval, fallbackOptions)
@@ -4868,7 +4868,7 @@ var sys = (() => {
4868
4868
  const Buffer = require("buffer").Buffer;
4869
4869
  const isLinuxOrMacOs = process.platform === "linux" || process.platform === "darwin";
4870
4870
  const platform = _os.platform();
4871
- const useCaseSensitiveFileNames = isFileSystemCaseSensitive();
4871
+ const useCaseSensitiveFileNames2 = isFileSystemCaseSensitive();
4872
4872
  const fsRealpath = !!_fs.realpathSync.native ? process.platform === "win32" ? fsRealPathHandlingLongPath : _fs.realpathSync.native : _fs.realpathSync;
4873
4873
  const executingFilePath = __filename.endsWith("sys.js") ? _path.join(_path.dirname(__dirname), "__fake__.js") : __filename;
4874
4874
  const fsSupportsRecursiveFsWatch = process.platform === "win32" || process.platform === "darwin";
@@ -4879,7 +4879,7 @@ var sys = (() => {
4879
4879
  setTimeout,
4880
4880
  clearTimeout,
4881
4881
  fsWatchWorker,
4882
- useCaseSensitiveFileNames,
4882
+ useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
4883
4883
  getCurrentDirectory,
4884
4884
  fileSystemEntryExists,
4885
4885
  // Node 4.0 `fs.watch` function supports the "recursive" option on both OSX and Windows
@@ -4896,7 +4896,7 @@ var sys = (() => {
4896
4896
  const nodeSystem = {
4897
4897
  args: process.argv.slice(2),
4898
4898
  newLine: _os.EOL,
4899
- useCaseSensitiveFileNames,
4899
+ useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
4900
4900
  write(s) {
4901
4901
  process.stdout.write(s);
4902
4902
  },
@@ -5025,12 +5025,12 @@ var sys = (() => {
5025
5025
  for (const node of profile.nodes) {
5026
5026
  if (node.callFrame.url) {
5027
5027
  const url = normalizeSlashes(node.callFrame.url);
5028
- if (containsPath(fileUrlRoot, url, useCaseSensitiveFileNames)) {
5028
+ if (containsPath(fileUrlRoot, url, useCaseSensitiveFileNames2)) {
5029
5029
  node.callFrame.url = getRelativePathToDirectoryOrUrl(
5030
5030
  fileUrlRoot,
5031
5031
  url,
5032
5032
  fileUrlRoot,
5033
- createGetCanonicalFileName(useCaseSensitiveFileNames),
5033
+ createGetCanonicalFileName(useCaseSensitiveFileNames2),
5034
5034
  /*isAbsolutePathAnUrl*/
5035
5035
  true
5036
5036
  );
@@ -5210,7 +5210,7 @@ var sys = (() => {
5210
5210
  }
5211
5211
  }
5212
5212
  function readDirectory(path, extensions, excludes, includes, depth) {
5213
- return matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames, process.cwd(), depth, getAccessibleFileSystemEntries, realpath);
5213
+ return matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames2, process.cwd(), depth, getAccessibleFileSystemEntries, realpath);
5214
5214
  }
5215
5215
  function fileSystemEntryExists(path, entryKind) {
5216
5216
  const originalStackTraceLimit = Error.stackTraceLimit;
@@ -16589,7 +16589,7 @@ function getSubPatternFromSpec(spec, basePath, usage, { singleAsteriskRegexFragm
16589
16589
  function replaceWildcardCharacter(match, singleAsteriskRegexFragment) {
16590
16590
  return match === "*" ? singleAsteriskRegexFragment : match === "?" ? "[^/]" : "\\" + match;
16591
16591
  }
16592
- function getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames, currentDirectory) {
16592
+ function getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames2, currentDirectory) {
16593
16593
  path = normalizePath(path);
16594
16594
  currentDirectory = normalizePath(currentDirectory);
16595
16595
  const absolutePath = combinePaths(currentDirectory, path);
@@ -16598,22 +16598,22 @@ function getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNa
16598
16598
  includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"),
16599
16599
  includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"),
16600
16600
  excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"),
16601
- basePaths: getBasePaths(path, includes, useCaseSensitiveFileNames)
16601
+ basePaths: getBasePaths(path, includes, useCaseSensitiveFileNames2)
16602
16602
  };
16603
16603
  }
16604
- function getRegexFromPattern(pattern, useCaseSensitiveFileNames) {
16605
- return new RegExp(pattern, useCaseSensitiveFileNames ? "" : "i");
16604
+ function getRegexFromPattern(pattern, useCaseSensitiveFileNames2) {
16605
+ return new RegExp(pattern, useCaseSensitiveFileNames2 ? "" : "i");
16606
16606
  }
16607
- function matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames, currentDirectory, depth, getFileSystemEntries, realpath) {
16607
+ function matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames2, currentDirectory, depth, getFileSystemEntries, realpath) {
16608
16608
  path = normalizePath(path);
16609
16609
  currentDirectory = normalizePath(currentDirectory);
16610
- const patterns = getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames, currentDirectory);
16611
- const includeFileRegexes = patterns.includeFilePatterns && patterns.includeFilePatterns.map((pattern) => getRegexFromPattern(pattern, useCaseSensitiveFileNames));
16612
- const includeDirectoryRegex = patterns.includeDirectoryPattern && getRegexFromPattern(patterns.includeDirectoryPattern, useCaseSensitiveFileNames);
16613
- const excludeRegex = patterns.excludePattern && getRegexFromPattern(patterns.excludePattern, useCaseSensitiveFileNames);
16610
+ const patterns = getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames2, currentDirectory);
16611
+ const includeFileRegexes = patterns.includeFilePatterns && patterns.includeFilePatterns.map((pattern) => getRegexFromPattern(pattern, useCaseSensitiveFileNames2));
16612
+ const includeDirectoryRegex = patterns.includeDirectoryPattern && getRegexFromPattern(patterns.includeDirectoryPattern, useCaseSensitiveFileNames2);
16613
+ const excludeRegex = patterns.excludePattern && getRegexFromPattern(patterns.excludePattern, useCaseSensitiveFileNames2);
16614
16614
  const results = includeFileRegexes ? includeFileRegexes.map(() => []) : [[]];
16615
16615
  const visited = /* @__PURE__ */ new Map();
16616
- const toCanonical = createGetCanonicalFileName(useCaseSensitiveFileNames);
16616
+ const toCanonical = createGetCanonicalFileName(useCaseSensitiveFileNames2);
16617
16617
  for (const basePath of patterns.basePaths) {
16618
16618
  visitDirectory(basePath, combinePaths(currentDirectory, basePath), depth);
16619
16619
  }
@@ -16655,7 +16655,7 @@ function matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNa
16655
16655
  }
16656
16656
  }
16657
16657
  }
16658
- function getBasePaths(path, includes, useCaseSensitiveFileNames) {
16658
+ function getBasePaths(path, includes, useCaseSensitiveFileNames2) {
16659
16659
  const basePaths = [path];
16660
16660
  if (includes) {
16661
16661
  const includeBasePaths = [];
@@ -16663,9 +16663,9 @@ function getBasePaths(path, includes, useCaseSensitiveFileNames) {
16663
16663
  const absolute = isRootedDiskPath(include) ? include : normalizePath(combinePaths(path, include));
16664
16664
  includeBasePaths.push(getIncludeBasePath(absolute));
16665
16665
  }
16666
- includeBasePaths.sort(getStringComparer(!useCaseSensitiveFileNames));
16666
+ includeBasePaths.sort(getStringComparer(!useCaseSensitiveFileNames2));
16667
16667
  for (const includeBasePath of includeBasePaths) {
16668
- if (every(basePaths, (basePath) => !containsPath(basePath, includeBasePath, path, !useCaseSensitiveFileNames))) {
16668
+ if (every(basePaths, (basePath) => !containsPath(basePath, includeBasePath, path, !useCaseSensitiveFileNames2))) {
16669
16669
  basePaths.push(includeBasePath);
16670
16670
  }
16671
16671
  }
@@ -36515,19 +36515,19 @@ function getFileNamesFromConfigSpecs(configFileSpecs, basePath, options, host, e
36515
36515
  const wildcardFiles = arrayFrom(wildcardFileMap.values());
36516
36516
  return literalFiles.concat(wildcardFiles, arrayFrom(wildCardJsonFileMap.values()));
36517
36517
  }
36518
- function isExcludedFile(pathToCheck, spec, basePath, useCaseSensitiveFileNames, currentDirectory) {
36518
+ function isExcludedFile(pathToCheck, spec, basePath, useCaseSensitiveFileNames2, currentDirectory) {
36519
36519
  const { validatedFilesSpec, validatedIncludeSpecs, validatedExcludeSpecs } = spec;
36520
36520
  if (!length(validatedIncludeSpecs) || !length(validatedExcludeSpecs))
36521
36521
  return false;
36522
36522
  basePath = normalizePath(basePath);
36523
- const keyMapper = createGetCanonicalFileName(useCaseSensitiveFileNames);
36523
+ const keyMapper = createGetCanonicalFileName(useCaseSensitiveFileNames2);
36524
36524
  if (validatedFilesSpec) {
36525
36525
  for (const fileName of validatedFilesSpec) {
36526
36526
  if (keyMapper(getNormalizedAbsolutePath(fileName, basePath)) === pathToCheck)
36527
36527
  return false;
36528
36528
  }
36529
36529
  }
36530
- return matchesExcludeWorker(pathToCheck, validatedExcludeSpecs, useCaseSensitiveFileNames, currentDirectory, basePath);
36530
+ return matchesExcludeWorker(pathToCheck, validatedExcludeSpecs, useCaseSensitiveFileNames2, currentDirectory, basePath);
36531
36531
  }
36532
36532
  function invalidDotDotAfterRecursiveWildcard(s) {
36533
36533
  const wildcardIndex = startsWith(s, "**/") ? 0 : s.indexOf("/**/");
@@ -36537,17 +36537,17 @@ function invalidDotDotAfterRecursiveWildcard(s) {
36537
36537
  const lastDotIndex = endsWith(s, "/..") ? s.length : s.lastIndexOf("/../");
36538
36538
  return lastDotIndex > wildcardIndex;
36539
36539
  }
36540
- function matchesExclude(pathToCheck, excludeSpecs, useCaseSensitiveFileNames, currentDirectory) {
36540
+ function matchesExclude(pathToCheck, excludeSpecs, useCaseSensitiveFileNames2, currentDirectory) {
36541
36541
  return matchesExcludeWorker(
36542
36542
  pathToCheck,
36543
36543
  filter(excludeSpecs, (spec) => !invalidDotDotAfterRecursiveWildcard(spec)),
36544
- useCaseSensitiveFileNames,
36544
+ useCaseSensitiveFileNames2,
36545
36545
  currentDirectory
36546
36546
  );
36547
36547
  }
36548
- function matchesExcludeWorker(pathToCheck, excludeSpecs, useCaseSensitiveFileNames, currentDirectory, basePath) {
36548
+ function matchesExcludeWorker(pathToCheck, excludeSpecs, useCaseSensitiveFileNames2, currentDirectory, basePath) {
36549
36549
  const excludePattern = getRegularExpressionForWildcard(excludeSpecs, combinePaths(normalizePath(currentDirectory), basePath), "exclude");
36550
- const excludeRegex = excludePattern && getRegexFromPattern(excludePattern, useCaseSensitiveFileNames);
36550
+ const excludeRegex = excludePattern && getRegexFromPattern(excludePattern, useCaseSensitiveFileNames2);
36551
36551
  if (!excludeRegex)
36552
36552
  return false;
36553
36553
  if (excludeRegex.test(pathToCheck))
@@ -36577,9 +36577,9 @@ function specToDiagnostic(spec, disallowTrailingRecursion) {
36577
36577
  return [Diagnostics.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec];
36578
36578
  }
36579
36579
  }
36580
- function getWildcardDirectories({ validatedIncludeSpecs: include, validatedExcludeSpecs: exclude }, path, useCaseSensitiveFileNames) {
36580
+ function getWildcardDirectories({ validatedIncludeSpecs: include, validatedExcludeSpecs: exclude }, path, useCaseSensitiveFileNames2) {
36581
36581
  const rawExcludeRegex = getRegularExpressionForWildcard(exclude, path, "exclude");
36582
- const excludeRegex = rawExcludeRegex && new RegExp(rawExcludeRegex, useCaseSensitiveFileNames ? "" : "i");
36582
+ const excludeRegex = rawExcludeRegex && new RegExp(rawExcludeRegex, useCaseSensitiveFileNames2 ? "" : "i");
36583
36583
  const wildcardDirectories = {};
36584
36584
  if (include !== void 0) {
36585
36585
  const recursiveKeys = [];
@@ -36588,7 +36588,7 @@ function getWildcardDirectories({ validatedIncludeSpecs: include, validatedExclu
36588
36588
  if (excludeRegex && excludeRegex.test(spec)) {
36589
36589
  continue;
36590
36590
  }
36591
- const match = getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames);
36591
+ const match = getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames2);
36592
36592
  if (match) {
36593
36593
  const { key, flags } = match;
36594
36594
  const existingFlags = wildcardDirectories[key];
@@ -36603,7 +36603,7 @@ function getWildcardDirectories({ validatedIncludeSpecs: include, validatedExclu
36603
36603
  for (const key in wildcardDirectories) {
36604
36604
  if (hasProperty(wildcardDirectories, key)) {
36605
36605
  for (const recursiveKey of recursiveKeys) {
36606
- if (key !== recursiveKey && containsPath(recursiveKey, key, path, !useCaseSensitiveFileNames)) {
36606
+ if (key !== recursiveKey && containsPath(recursiveKey, key, path, !useCaseSensitiveFileNames2)) {
36607
36607
  delete wildcardDirectories[key];
36608
36608
  }
36609
36609
  }
@@ -36612,20 +36612,20 @@ function getWildcardDirectories({ validatedIncludeSpecs: include, validatedExclu
36612
36612
  }
36613
36613
  return wildcardDirectories;
36614
36614
  }
36615
- function getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames) {
36615
+ function getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames2) {
36616
36616
  const match = wildcardDirectoryPattern.exec(spec);
36617
36617
  if (match) {
36618
36618
  const questionWildcardIndex = spec.indexOf("?");
36619
36619
  const starWildcardIndex = spec.indexOf("*");
36620
36620
  const lastDirectorySeperatorIndex = spec.lastIndexOf(directorySeparator);
36621
36621
  return {
36622
- key: useCaseSensitiveFileNames ? match[0] : toFileNameLowerCase(match[0]),
36622
+ key: useCaseSensitiveFileNames2 ? match[0] : toFileNameLowerCase(match[0]),
36623
36623
  flags: questionWildcardIndex !== -1 && questionWildcardIndex < lastDirectorySeperatorIndex || starWildcardIndex !== -1 && starWildcardIndex < lastDirectorySeperatorIndex ? 1 /* Recursive */ : 0 /* None */
36624
36624
  };
36625
36625
  }
36626
36626
  if (isImplicitGlob(spec.substring(spec.lastIndexOf(directorySeparator) + 1))) {
36627
36627
  return {
36628
- key: removeTrailingDirectorySeparator(useCaseSensitiveFileNames ? spec : toFileNameLowerCase(spec)),
36628
+ key: removeTrailingDirectorySeparator(useCaseSensitiveFileNames2 ? spec : toFileNameLowerCase(spec)),
36629
36629
  flags: 1 /* Recursive */
36630
36630
  };
36631
36631
  }
@@ -36907,8 +36907,8 @@ function getDefaultTypeRoots(currentDirectory) {
36907
36907
  }
36908
36908
  var nodeModulesAtTypes = combinePaths("node_modules", "@types");
36909
36909
  function arePathsEqual(path1, path2, host) {
36910
- const useCaseSensitiveFileNames = typeof host.useCaseSensitiveFileNames === "function" ? host.useCaseSensitiveFileNames() : host.useCaseSensitiveFileNames;
36911
- return comparePaths(path1, path2, !useCaseSensitiveFileNames) === 0 /* EqualTo */;
36910
+ const useCaseSensitiveFileNames2 = typeof host.useCaseSensitiveFileNames === "function" ? host.useCaseSensitiveFileNames() : host.useCaseSensitiveFileNames;
36911
+ return comparePaths(path1, path2, !useCaseSensitiveFileNames2) === 0 /* EqualTo */;
36912
36912
  }
36913
36913
  function getOriginalAndResolvedFileName(fileName, host, traceEnabled) {
36914
36914
  const resolvedFileName = realPath(fileName, host, traceEnabled);
@@ -38653,13 +38653,10 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
38653
38653
  function combineDirectoryPath(root, dir) {
38654
38654
  return ensureTrailingDirectorySeparator(combinePaths(root, dir));
38655
38655
  }
38656
- function useCaseSensitiveFileNames() {
38657
- return !state.host.useCaseSensitiveFileNames ? true : typeof state.host.useCaseSensitiveFileNames === "boolean" ? state.host.useCaseSensitiveFileNames : state.host.useCaseSensitiveFileNames();
38658
- }
38659
38656
  function tryLoadInputFileForPath(finalPath, entry, packagePath, isImports2) {
38660
38657
  var _a, _b, _c, _d;
38661
- 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)) {
38662
- const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames });
38658
+ 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)) {
38659
+ const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames: () => useCaseSensitiveFileNames(state) });
38663
38660
  const commonSourceDirGuesses = [];
38664
38661
  if (state.compilerOptions.rootDir || state.compilerOptions.composite && state.compilerOptions.configFilePath) {
38665
38662
  const commonDir = toAbsolutePath(getCommonSourceDirectory(state.compilerOptions, () => [], ((_b = (_a = state.host).getCurrentDirectory) == null ? void 0 : _b.call(_a)) || "", getCanonicalFileName));
@@ -38688,7 +38685,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
38688
38685
  for (const commonSourceDirGuess of commonSourceDirGuesses) {
38689
38686
  const candidateDirectories = getOutputDirectoriesForBaseDirectory(commonSourceDirGuess);
38690
38687
  for (const candidateDir of candidateDirectories) {
38691
- if (containsPath(candidateDir, finalPath, !useCaseSensitiveFileNames())) {
38688
+ if (containsPath(candidateDir, finalPath, !useCaseSensitiveFileNames(state))) {
38692
38689
  const pathFragment = finalPath.slice(candidateDir.length + 1);
38693
38690
  const possibleInputBase = combinePaths(commonSourceDirGuess, pathFragment);
38694
38691
  const jsAndDtsExtensions = [".mjs" /* Mjs */, ".cjs" /* Cjs */, ".js" /* Js */, ".json" /* Json */, ".d.mts" /* Dmts */, ".d.cts" /* Dcts */, ".d.ts" /* Dts */];
@@ -38698,7 +38695,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
38698
38695
  for (const possibleExt of inputExts) {
38699
38696
  if (!extensionIsOk(extensions, possibleExt))
38700
38697
  continue;
38701
- const possibleInputWithInputExtension = changeAnyExtension(possibleInputBase, possibleExt, ext, !useCaseSensitiveFileNames());
38698
+ const possibleInputWithInputExtension = changeAnyExtension(possibleInputBase, possibleExt, ext, !useCaseSensitiveFileNames(state));
38702
38699
  if (state.host.fileExists(possibleInputWithInputExtension)) {
38703
38700
  return toSearchResult(withPackageId(scope, loadFileNameFromPackageJsonField(
38704
38701
  extensions,
@@ -39115,6 +39112,9 @@ function traceIfEnabled(state, diagnostic, ...args) {
39115
39112
  trace(state.host, diagnostic, ...args);
39116
39113
  }
39117
39114
  }
39115
+ function useCaseSensitiveFileNames(state) {
39116
+ return !state.host.useCaseSensitiveFileNames ? true : typeof state.host.useCaseSensitiveFileNames === "boolean" ? state.host.useCaseSensitiveFileNames : state.host.useCaseSensitiveFileNames();
39117
+ }
39118
39118
 
39119
39119
  // src/compiler/binder.ts
39120
39120
  function getModuleInstanceState(node, visited) {
@@ -42606,7 +42606,7 @@ function tryGetModuleNameFromExports(options, targetFilePath, packageDirectory,
42606
42606
  for (const key of getOwnKeys(exports)) {
42607
42607
  if (key === "default" || conditions.indexOf(key) >= 0 || isApplicableVersionedTypesKey(conditions, key)) {
42608
42608
  const subTarget = exports[key];
42609
- const result = tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, packageName, subTarget, conditions);
42609
+ const result = tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, packageName, subTarget, conditions, mode);
42610
42610
  if (result) {
42611
42611
  return result;
42612
42612
  }
@@ -114007,14 +114007,14 @@ function getEmitListItem(emit, parenthesizerRule) {
114007
114007
  }
114008
114008
 
114009
114009
  // src/compiler/watchUtilities.ts
114010
- function createCachedDirectoryStructureHost(host, currentDirectory, useCaseSensitiveFileNames) {
114010
+ function createCachedDirectoryStructureHost(host, currentDirectory, useCaseSensitiveFileNames2) {
114011
114011
  if (!host.getDirectories || !host.readDirectory) {
114012
114012
  return void 0;
114013
114013
  }
114014
114014
  const cachedReadDirectoryResult = /* @__PURE__ */ new Map();
114015
- const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames);
114015
+ const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2);
114016
114016
  return {
114017
- useCaseSensitiveFileNames,
114017
+ useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
114018
114018
  fileExists,
114019
114019
  readFile: (path, encoding) => host.readFile(path, encoding),
114020
114020
  directoryExists: host.directoryExists && directoryExists,
@@ -114136,7 +114136,7 @@ function createCachedDirectoryStructureHost(host, currentDirectory, useCaseSensi
114136
114136
  const rootResult = tryReadDirectory(rootDir, rootDirPath);
114137
114137
  let rootSymLinkResult;
114138
114138
  if (rootResult !== void 0) {
114139
- return matchFiles(rootDir, extensions, excludes, includes, useCaseSensitiveFileNames, currentDirectory, depth, getFileSystemEntries, realpath);
114139
+ return matchFiles(rootDir, extensions, excludes, includes, useCaseSensitiveFileNames2, currentDirectory, depth, getFileSystemEntries, realpath);
114140
114140
  }
114141
114141
  return host.readDirectory(rootDir, extensions, excludes, includes, depth);
114142
114142
  function getFileSystemEntries(dir) {
@@ -114320,7 +114320,7 @@ function isIgnoredFileFromWildCardWatching({
114320
114320
  program,
114321
114321
  extraFileExtensions,
114322
114322
  currentDirectory,
114323
- useCaseSensitiveFileNames,
114323
+ useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
114324
114324
  writeLog,
114325
114325
  toPath: toPath3
114326
114326
  }) {
@@ -114336,7 +114336,7 @@ function isIgnoredFileFromWildCardWatching({
114336
114336
  writeLog(`Project: ${configFileName} Detected file add/remove of non supported extension: ${fileOrDirectory}`);
114337
114337
  return true;
114338
114338
  }
114339
- if (isExcludedFile(fileOrDirectory, options.configFile.configFileSpecs, getNormalizedAbsolutePath(getDirectoryPath(configFileName), currentDirectory), useCaseSensitiveFileNames, currentDirectory)) {
114339
+ if (isExcludedFile(fileOrDirectory, options.configFile.configFileSpecs, getNormalizedAbsolutePath(getDirectoryPath(configFileName), currentDirectory), useCaseSensitiveFileNames2, currentDirectory)) {
114340
114340
  writeLog(`Project: ${configFileName} Detected excluded file: ${fileOrDirectory}`);
114341
114341
  return true;
114342
114342
  }
@@ -114393,7 +114393,7 @@ function getWatchFactory(host, watchLogLevel, log, getDetailWatchInfo) {
114393
114393
  function createExcludeHandlingAddWatch(key) {
114394
114394
  return (file, cb, flags, options, detailInfo1, detailInfo2) => {
114395
114395
  var _a;
114396
- 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(
114396
+ 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(
114397
114397
  /*thisArgs*/
114398
114398
  void 0,
114399
114399
  file,
@@ -114405,7 +114405,7 @@ function getWatchFactory(host, watchLogLevel, log, getDetailWatchInfo) {
114405
114405
  ) : excludeWatcherFactory(file, flags, options, detailInfo1, detailInfo2);
114406
114406
  };
114407
114407
  }
114408
- function useCaseSensitiveFileNames() {
114408
+ function useCaseSensitiveFileNames2() {
114409
114409
  return typeof host.useCaseSensitiveFileNames === "boolean" ? host.useCaseSensitiveFileNames : host.useCaseSensitiveFileNames();
114410
114410
  }
114411
114411
  function createExcludeWatcherWithLogging(file, flags, options, detailInfo1, detailInfo2) {
@@ -121424,12 +121424,12 @@ function getMatchedIncludeSpec(program, fileName) {
121424
121424
  return true;
121425
121425
  const isJsonFile = fileExtensionIs(fileName, ".json" /* Json */);
121426
121426
  const basePath = getDirectoryPath(getNormalizedAbsolutePath(configFile.fileName, program.getCurrentDirectory()));
121427
- const useCaseSensitiveFileNames = program.useCaseSensitiveFileNames();
121427
+ const useCaseSensitiveFileNames2 = program.useCaseSensitiveFileNames();
121428
121428
  return find((_b = configFile == null ? void 0 : configFile.configFileSpecs) == null ? void 0 : _b.validatedIncludeSpecs, (includeSpec) => {
121429
121429
  if (isJsonFile && !endsWith(includeSpec, ".json" /* Json */))
121430
121430
  return false;
121431
121431
  const pattern = getPatternFromSpec(includeSpec, basePath, "files");
121432
- return !!pattern && getRegexFromPattern(`(${pattern})$`, useCaseSensitiveFileNames).test(fileName);
121432
+ return !!pattern && getRegexFromPattern(`(${pattern})$`, useCaseSensitiveFileNames2).test(fileName);
121433
121433
  });
121434
121434
  }
121435
121435
  function fileIncludeReasonToDiagnostics(program, reason, fileNameConvertor) {
@@ -121658,7 +121658,7 @@ function createWatchFactory(host, options) {
121658
121658
  return result;
121659
121659
  }
121660
121660
  function createCompilerHostFromProgramHost(host, getCompilerOptions, directoryStructureHost = host) {
121661
- const useCaseSensitiveFileNames = host.useCaseSensitiveFileNames();
121661
+ const useCaseSensitiveFileNames2 = host.useCaseSensitiveFileNames();
121662
121662
  const compilerHost = {
121663
121663
  getSourceFile: createGetSourceFile(
121664
121664
  (fileName, encoding) => !encoding ? compilerHost.readFile(fileName) : host.readFile(fileName, encoding),
@@ -121674,8 +121674,8 @@ function createCompilerHostFromProgramHost(host, getCompilerOptions, directorySt
121674
121674
  (path) => host.directoryExists(path)
121675
121675
  ),
121676
121676
  getCurrentDirectory: memoize(() => host.getCurrentDirectory()),
121677
- useCaseSensitiveFileNames: () => useCaseSensitiveFileNames,
121678
- getCanonicalFileName: createGetCanonicalFileName(useCaseSensitiveFileNames),
121677
+ useCaseSensitiveFileNames: () => useCaseSensitiveFileNames2,
121678
+ getCanonicalFileName: createGetCanonicalFileName(useCaseSensitiveFileNames2),
121679
121679
  getNewLine: () => getNewLineCharacter(getCompilerOptions()),
121680
121680
  fileExists: (f) => host.fileExists(f),
121681
121681
  readFile: (f) => host.readFile(f),
@@ -121890,7 +121890,7 @@ function createWatchProgram(host) {
121890
121890
  const sourceFilesCache = /* @__PURE__ */ new Map();
121891
121891
  let missingFilePathsRequestedForRelease;
121892
121892
  let hasChangedCompilerOptions = false;
121893
- const useCaseSensitiveFileNames = host.useCaseSensitiveFileNames();
121893
+ const useCaseSensitiveFileNames2 = host.useCaseSensitiveFileNames();
121894
121894
  const currentDirectory = host.getCurrentDirectory();
121895
121895
  const { configFileName, optionsToExtend: optionsToExtendForConfigFile = {}, watchOptionsToExtend, extraFileExtensions, createProgram: createProgram2 } = host;
121896
121896
  let { rootFiles: rootFileNames, options: compilerOptions, watchOptions, projectReferences } = host;
@@ -121898,7 +121898,7 @@ function createWatchProgram(host) {
121898
121898
  let configFileParsingDiagnostics;
121899
121899
  let canConfigFileJsonReportNoInputFiles = false;
121900
121900
  let hasChangedConfigFileParsingErrors = false;
121901
- const cachedDirectoryStructureHost = configFileName === void 0 ? void 0 : createCachedDirectoryStructureHost(host, currentDirectory, useCaseSensitiveFileNames);
121901
+ const cachedDirectoryStructureHost = configFileName === void 0 ? void 0 : createCachedDirectoryStructureHost(host, currentDirectory, useCaseSensitiveFileNames2);
121902
121902
  const directoryStructureHost = cachedDirectoryStructureHost || host;
121903
121903
  const parseConfigFileHost = parseConfigHostFromCompilerHostLike(host, directoryStructureHost);
121904
121904
  let newLine = updateNewLine();
@@ -121916,8 +121916,8 @@ function createWatchProgram(host) {
121916
121916
  Debug.assert(compilerOptions);
121917
121917
  Debug.assert(rootFileNames);
121918
121918
  const { watchFile: watchFile2, watchDirectory, writeLog } = createWatchFactory(host, compilerOptions);
121919
- const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames);
121920
- writeLog(`Current directory: ${currentDirectory} CaseSensitiveFileNames: ${useCaseSensitiveFileNames}`);
121919
+ const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2);
121920
+ writeLog(`Current directory: ${currentDirectory} CaseSensitiveFileNames: ${useCaseSensitiveFileNames2}`);
121921
121921
  let configFileWatcher;
121922
121922
  if (configFileName) {
121923
121923
  configFileWatcher = watchFile2(configFileName, scheduleProgramReload, 2e3 /* High */, watchOptions, WatchType.ConfigFile);
@@ -122423,7 +122423,7 @@ function createWatchProgram(host) {
122423
122423
  options: compilerOptions,
122424
122424
  program: getCurrentBuilderProgram() || rootFileNames,
122425
122425
  currentDirectory,
122426
- useCaseSensitiveFileNames,
122426
+ useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
122427
122427
  writeLog,
122428
122428
  toPath: toPath3
122429
122429
  }))
@@ -122513,7 +122513,7 @@ function createWatchProgram(host) {
122513
122513
  options: config.parsedCommandLine.options,
122514
122514
  program: config.parsedCommandLine.fileNames,
122515
122515
  currentDirectory,
122516
- useCaseSensitiveFileNames,
122516
+ useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
122517
122517
  writeLog,
122518
122518
  toPath: toPath3
122519
122519
  }))