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.
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
54
54
 
55
55
  // src/compiler/corePublic.ts
56
56
  var versionMajorMinor = "5.2";
57
- var version = `${versionMajorMinor}.0-dev.20230707`;
57
+ var version = `${versionMajorMinor}.0-dev.20230708`;
58
58
 
59
59
  // src/compiler/core.ts
60
60
  var emptyArray = [];
@@ -759,8 +759,8 @@ function unorderedRemoveFirstItemWhere(array, predicate) {
759
759
  }
760
760
  return false;
761
761
  }
762
- function createGetCanonicalFileName(useCaseSensitiveFileNames) {
763
- return useCaseSensitiveFileNames ? identity : toFileNameLowerCase;
762
+ function createGetCanonicalFileName(useCaseSensitiveFileNames2) {
763
+ return useCaseSensitiveFileNames2 ? identity : toFileNameLowerCase;
764
764
  }
765
765
  function patternText({ prefix, suffix }) {
766
766
  return `${prefix}*${suffix}`;
@@ -3586,10 +3586,10 @@ function createDynamicPriorityPollingWatchFile(host) {
3586
3586
  pollingIntervalQueue(pollingInterval).pollScheduled = host.setTimeout(pollingInterval === 250 /* Low */ ? pollLowPollingIntervalQueue : pollPollingIntervalQueue, pollingInterval, pollingInterval === 250 /* Low */ ? "pollLowPollingIntervalQueue" : "pollPollingIntervalQueue", pollingIntervalQueue(pollingInterval));
3587
3587
  }
3588
3588
  }
3589
- function createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames) {
3589
+ function createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2) {
3590
3590
  const fileWatcherCallbacks = createMultiMap();
3591
3591
  const dirWatchers = /* @__PURE__ */ new Map();
3592
- const toCanonicalName = createGetCanonicalFileName(useCaseSensitiveFileNames);
3592
+ const toCanonicalName = createGetCanonicalFileName(useCaseSensitiveFileNames2);
3593
3593
  return nonPollingWatchFile;
3594
3594
  function nonPollingWatchFile(fileName, callback, _pollingInterval, fallbackOptions) {
3595
3595
  const filePath = toCanonicalName(fileName);
@@ -3665,8 +3665,8 @@ function createFixedChunkSizePollingWatchFile(host) {
3665
3665
  pollScheduled = host.setTimeout(pollQueue, 2e3 /* High */, "pollQueue");
3666
3666
  }
3667
3667
  }
3668
- function createSingleWatcherPerName(cache, useCaseSensitiveFileNames, name, callback, createWatcher) {
3669
- const toCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames);
3668
+ function createSingleWatcherPerName(cache, useCaseSensitiveFileNames2, name, callback, createWatcher) {
3669
+ const toCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2);
3670
3670
  const path2 = toCanonicalFileName(name);
3671
3671
  const existing = cache.get(path2);
3672
3672
  if (existing) {
@@ -3715,7 +3715,7 @@ function sysLog(s) {
3715
3715
  }
3716
3716
  function createDirectoryWatcherSupportingRecursive({
3717
3717
  watchDirectory,
3718
- useCaseSensitiveFileNames,
3718
+ useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
3719
3719
  getCurrentDirectory,
3720
3720
  getAccessibleSortedChildDirectories,
3721
3721
  fileSystemEntryExists,
@@ -3727,8 +3727,8 @@ function createDirectoryWatcherSupportingRecursive({
3727
3727
  const callbackCache = createMultiMap();
3728
3728
  const cacheToUpdateChildWatches = /* @__PURE__ */ new Map();
3729
3729
  let timerToUpdateChildWatches;
3730
- const filePathComparer = getStringComparer(!useCaseSensitiveFileNames);
3731
- const toCanonicalFilePath = createGetCanonicalFileName(useCaseSensitiveFileNames);
3730
+ const filePathComparer = getStringComparer(!useCaseSensitiveFileNames2);
3731
+ const toCanonicalFilePath = createGetCanonicalFileName(useCaseSensitiveFileNames2);
3732
3732
  return (dirName, callback, recursive, options) => recursive ? createDirectoryWatcher(dirName, options, callback) : watchDirectory(dirName, callback, recursive, options);
3733
3733
  function createDirectoryWatcher(dirName, options, callback) {
3734
3734
  const dirPath = toCanonicalFilePath(dirName);
@@ -3895,12 +3895,12 @@ function createDirectoryWatcherSupportingRecursive({
3895
3895
  }
3896
3896
  }
3897
3897
  function isIgnoredPath(path2, options) {
3898
- return some(ignoredPaths, (searchPath) => isInPath(path2, searchPath)) || isIgnoredByWatchOptions(path2, options, useCaseSensitiveFileNames, getCurrentDirectory);
3898
+ return some(ignoredPaths, (searchPath) => isInPath(path2, searchPath)) || isIgnoredByWatchOptions(path2, options, useCaseSensitiveFileNames2, getCurrentDirectory);
3899
3899
  }
3900
3900
  function isInPath(path2, searchPath) {
3901
3901
  if (stringContains(path2, searchPath))
3902
3902
  return true;
3903
- if (useCaseSensitiveFileNames)
3903
+ if (useCaseSensitiveFileNames2)
3904
3904
  return false;
3905
3905
  return stringContains(toCanonicalFilePath(path2), searchPath);
3906
3906
  }
@@ -3918,14 +3918,14 @@ function createFsWatchCallbackForFileWatcherCallback(fileName, callback, getModi
3918
3918
  }
3919
3919
  };
3920
3920
  }
3921
- function isIgnoredByWatchOptions(pathToCheck, options, useCaseSensitiveFileNames, getCurrentDirectory) {
3922
- 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()));
3921
+ function isIgnoredByWatchOptions(pathToCheck, options, useCaseSensitiveFileNames2, getCurrentDirectory) {
3922
+ 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()));
3923
3923
  }
3924
- function createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames, getCurrentDirectory) {
3924
+ function createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames2, getCurrentDirectory) {
3925
3925
  return (eventName, relativeFileName) => {
3926
3926
  if (eventName === "rename") {
3927
3927
  const fileName = !relativeFileName ? directoryName : normalizePath(combinePaths(directoryName, relativeFileName));
3928
- if (!relativeFileName || !isIgnoredByWatchOptions(fileName, options, useCaseSensitiveFileNames, getCurrentDirectory)) {
3928
+ if (!relativeFileName || !isIgnoredByWatchOptions(fileName, options, useCaseSensitiveFileNames2, getCurrentDirectory)) {
3929
3929
  callback(fileName);
3930
3930
  }
3931
3931
  }
@@ -3938,7 +3938,7 @@ function createSystemWatchFunctions({
3938
3938
  clearTimeout: clearTimeout2,
3939
3939
  fsWatchWorker,
3940
3940
  fileSystemEntryExists,
3941
- useCaseSensitiveFileNames,
3941
+ useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
3942
3942
  getCurrentDirectory,
3943
3943
  fsSupportsRecursiveFsWatch,
3944
3944
  getAccessibleSortedChildDirectories,
@@ -4010,7 +4010,7 @@ function createSystemWatchFunctions({
4010
4010
  );
4011
4011
  case 5 /* UseFsEventsOnParentDirectory */:
4012
4012
  if (!nonPollingWatchFile) {
4013
- nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames);
4013
+ nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2);
4014
4014
  }
4015
4015
  return nonPollingWatchFile(fileName, callback, pollingInterval, getFallbackOptions(options));
4016
4016
  default:
@@ -4059,7 +4059,7 @@ function createSystemWatchFunctions({
4059
4059
  return fsWatch(
4060
4060
  directoryName,
4061
4061
  1 /* Directory */,
4062
- createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames, getCurrentDirectory),
4062
+ createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames2, getCurrentDirectory),
4063
4063
  recursive,
4064
4064
  500 /* Medium */,
4065
4065
  getFallbackOptions(options)
@@ -4067,7 +4067,7 @@ function createSystemWatchFunctions({
4067
4067
  }
4068
4068
  if (!hostRecursiveDirectoryWatcher) {
4069
4069
  hostRecursiveDirectoryWatcher = createDirectoryWatcherSupportingRecursive({
4070
- useCaseSensitiveFileNames,
4070
+ useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
4071
4071
  getCurrentDirectory,
4072
4072
  fileSystemEntryExists,
4073
4073
  getAccessibleSortedChildDirectories,
@@ -4113,7 +4113,7 @@ function createSystemWatchFunctions({
4113
4113
  return fsWatch(
4114
4114
  directoryName,
4115
4115
  1 /* Directory */,
4116
- createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames, getCurrentDirectory),
4116
+ createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames2, getCurrentDirectory),
4117
4117
  recursive,
4118
4118
  500 /* Medium */,
4119
4119
  getFallbackOptions(watchDirectoryOptions)
@@ -4141,7 +4141,7 @@ function createSystemWatchFunctions({
4141
4141
  function pollingWatchFile(fileName, callback, pollingInterval, options) {
4142
4142
  return createSingleWatcherPerName(
4143
4143
  pollingWatches,
4144
- useCaseSensitiveFileNames,
4144
+ useCaseSensitiveFileNames2,
4145
4145
  fileName,
4146
4146
  callback,
4147
4147
  (cb) => pollingWatchFileWorker(fileName, cb, pollingInterval, options)
@@ -4150,7 +4150,7 @@ function createSystemWatchFunctions({
4150
4150
  function fsWatch(fileOrDirectory, entryKind, callback, recursive, fallbackPollingInterval, fallbackOptions) {
4151
4151
  return createSingleWatcherPerName(
4152
4152
  recursive ? fsWatchesRecursive : fsWatches,
4153
- useCaseSensitiveFileNames,
4153
+ useCaseSensitiveFileNames2,
4154
4154
  fileOrDirectory,
4155
4155
  callback,
4156
4156
  (cb) => fsWatchHandlingExistenceOnHost(fileOrDirectory, entryKind, cb, recursive, fallbackPollingInterval, fallbackOptions)
@@ -4278,7 +4278,7 @@ var sys = (() => {
4278
4278
  const Buffer2 = require("buffer").Buffer;
4279
4279
  const isLinuxOrMacOs = process.platform === "linux" || process.platform === "darwin";
4280
4280
  const platform = _os.platform();
4281
- const useCaseSensitiveFileNames = isFileSystemCaseSensitive();
4281
+ const useCaseSensitiveFileNames2 = isFileSystemCaseSensitive();
4282
4282
  const fsRealpath = !!_fs.realpathSync.native ? process.platform === "win32" ? fsRealPathHandlingLongPath : _fs.realpathSync.native : _fs.realpathSync;
4283
4283
  const executingFilePath = __filename.endsWith("sys.js") ? _path.join(_path.dirname(__dirname), "__fake__.js") : __filename;
4284
4284
  const fsSupportsRecursiveFsWatch = process.platform === "win32" || process.platform === "darwin";
@@ -4289,7 +4289,7 @@ var sys = (() => {
4289
4289
  setTimeout,
4290
4290
  clearTimeout,
4291
4291
  fsWatchWorker,
4292
- useCaseSensitiveFileNames,
4292
+ useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
4293
4293
  getCurrentDirectory,
4294
4294
  fileSystemEntryExists,
4295
4295
  // Node 4.0 `fs.watch` function supports the "recursive" option on both OSX and Windows
@@ -4306,7 +4306,7 @@ var sys = (() => {
4306
4306
  const nodeSystem = {
4307
4307
  args: process.argv.slice(2),
4308
4308
  newLine: _os.EOL,
4309
- useCaseSensitiveFileNames,
4309
+ useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
4310
4310
  write(s) {
4311
4311
  process.stdout.write(s);
4312
4312
  },
@@ -4435,12 +4435,12 @@ var sys = (() => {
4435
4435
  for (const node of profile.nodes) {
4436
4436
  if (node.callFrame.url) {
4437
4437
  const url = normalizeSlashes(node.callFrame.url);
4438
- if (containsPath(fileUrlRoot, url, useCaseSensitiveFileNames)) {
4438
+ if (containsPath(fileUrlRoot, url, useCaseSensitiveFileNames2)) {
4439
4439
  node.callFrame.url = getRelativePathToDirectoryOrUrl(
4440
4440
  fileUrlRoot,
4441
4441
  url,
4442
4442
  fileUrlRoot,
4443
- createGetCanonicalFileName(useCaseSensitiveFileNames),
4443
+ createGetCanonicalFileName(useCaseSensitiveFileNames2),
4444
4444
  /*isAbsolutePathAnUrl*/
4445
4445
  true
4446
4446
  );
@@ -4620,7 +4620,7 @@ var sys = (() => {
4620
4620
  }
4621
4621
  }
4622
4622
  function readDirectory(path2, extensions, excludes, includes, depth) {
4623
- return matchFiles(path2, extensions, excludes, includes, useCaseSensitiveFileNames, process.cwd(), depth, getAccessibleFileSystemEntries, realpath);
4623
+ return matchFiles(path2, extensions, excludes, includes, useCaseSensitiveFileNames2, process.cwd(), depth, getAccessibleFileSystemEntries, realpath);
4624
4624
  }
4625
4625
  function fileSystemEntryExists(path2, entryKind) {
4626
4626
  const originalStackTraceLimit = Error.stackTraceLimit;
@@ -11412,7 +11412,7 @@ function getSubPatternFromSpec(spec, basePath, usage, { singleAsteriskRegexFragm
11412
11412
  function replaceWildcardCharacter(match, singleAsteriskRegexFragment) {
11413
11413
  return match === "*" ? singleAsteriskRegexFragment : match === "?" ? "[^/]" : "\\" + match;
11414
11414
  }
11415
- function getFileMatcherPatterns(path2, excludes, includes, useCaseSensitiveFileNames, currentDirectory) {
11415
+ function getFileMatcherPatterns(path2, excludes, includes, useCaseSensitiveFileNames2, currentDirectory) {
11416
11416
  path2 = normalizePath(path2);
11417
11417
  currentDirectory = normalizePath(currentDirectory);
11418
11418
  const absolutePath = combinePaths(currentDirectory, path2);
@@ -11421,22 +11421,22 @@ function getFileMatcherPatterns(path2, excludes, includes, useCaseSensitiveFileN
11421
11421
  includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"),
11422
11422
  includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"),
11423
11423
  excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"),
11424
- basePaths: getBasePaths(path2, includes, useCaseSensitiveFileNames)
11424
+ basePaths: getBasePaths(path2, includes, useCaseSensitiveFileNames2)
11425
11425
  };
11426
11426
  }
11427
- function getRegexFromPattern(pattern, useCaseSensitiveFileNames) {
11428
- return new RegExp(pattern, useCaseSensitiveFileNames ? "" : "i");
11427
+ function getRegexFromPattern(pattern, useCaseSensitiveFileNames2) {
11428
+ return new RegExp(pattern, useCaseSensitiveFileNames2 ? "" : "i");
11429
11429
  }
11430
- function matchFiles(path2, extensions, excludes, includes, useCaseSensitiveFileNames, currentDirectory, depth, getFileSystemEntries, realpath) {
11430
+ function matchFiles(path2, extensions, excludes, includes, useCaseSensitiveFileNames2, currentDirectory, depth, getFileSystemEntries, realpath) {
11431
11431
  path2 = normalizePath(path2);
11432
11432
  currentDirectory = normalizePath(currentDirectory);
11433
- const patterns = getFileMatcherPatterns(path2, excludes, includes, useCaseSensitiveFileNames, currentDirectory);
11434
- const includeFileRegexes = patterns.includeFilePatterns && patterns.includeFilePatterns.map((pattern) => getRegexFromPattern(pattern, useCaseSensitiveFileNames));
11435
- const includeDirectoryRegex = patterns.includeDirectoryPattern && getRegexFromPattern(patterns.includeDirectoryPattern, useCaseSensitiveFileNames);
11436
- const excludeRegex = patterns.excludePattern && getRegexFromPattern(patterns.excludePattern, useCaseSensitiveFileNames);
11433
+ const patterns = getFileMatcherPatterns(path2, excludes, includes, useCaseSensitiveFileNames2, currentDirectory);
11434
+ const includeFileRegexes = patterns.includeFilePatterns && patterns.includeFilePatterns.map((pattern) => getRegexFromPattern(pattern, useCaseSensitiveFileNames2));
11435
+ const includeDirectoryRegex = patterns.includeDirectoryPattern && getRegexFromPattern(patterns.includeDirectoryPattern, useCaseSensitiveFileNames2);
11436
+ const excludeRegex = patterns.excludePattern && getRegexFromPattern(patterns.excludePattern, useCaseSensitiveFileNames2);
11437
11437
  const results = includeFileRegexes ? includeFileRegexes.map(() => []) : [[]];
11438
11438
  const visited = /* @__PURE__ */ new Map();
11439
- const toCanonical = createGetCanonicalFileName(useCaseSensitiveFileNames);
11439
+ const toCanonical = createGetCanonicalFileName(useCaseSensitiveFileNames2);
11440
11440
  for (const basePath of patterns.basePaths) {
11441
11441
  visitDirectory(basePath, combinePaths(currentDirectory, basePath), depth);
11442
11442
  }
@@ -11478,7 +11478,7 @@ function matchFiles(path2, extensions, excludes, includes, useCaseSensitiveFileN
11478
11478
  }
11479
11479
  }
11480
11480
  }
11481
- function getBasePaths(path2, includes, useCaseSensitiveFileNames) {
11481
+ function getBasePaths(path2, includes, useCaseSensitiveFileNames2) {
11482
11482
  const basePaths = [path2];
11483
11483
  if (includes) {
11484
11484
  const includeBasePaths = [];
@@ -11486,9 +11486,9 @@ function getBasePaths(path2, includes, useCaseSensitiveFileNames) {
11486
11486
  const absolute = isRootedDiskPath(include) ? include : normalizePath(combinePaths(path2, include));
11487
11487
  includeBasePaths.push(getIncludeBasePath(absolute));
11488
11488
  }
11489
- includeBasePaths.sort(getStringComparer(!useCaseSensitiveFileNames));
11489
+ includeBasePaths.sort(getStringComparer(!useCaseSensitiveFileNames2));
11490
11490
  for (const includeBasePath of includeBasePaths) {
11491
- if (every(basePaths, (basePath) => !containsPath(basePath, includeBasePath, path2, !useCaseSensitiveFileNames))) {
11491
+ if (every(basePaths, (basePath) => !containsPath(basePath, includeBasePath, path2, !useCaseSensitiveFileNames2))) {
11492
11492
  basePaths.push(includeBasePath);
11493
11493
  }
11494
11494
  }
@@ -27226,17 +27226,17 @@ function invalidDotDotAfterRecursiveWildcard(s) {
27226
27226
  const lastDotIndex = endsWith(s, "/..") ? s.length : s.lastIndexOf("/../");
27227
27227
  return lastDotIndex > wildcardIndex;
27228
27228
  }
27229
- function matchesExclude(pathToCheck, excludeSpecs, useCaseSensitiveFileNames, currentDirectory) {
27229
+ function matchesExclude(pathToCheck, excludeSpecs, useCaseSensitiveFileNames2, currentDirectory) {
27230
27230
  return matchesExcludeWorker(
27231
27231
  pathToCheck,
27232
27232
  filter(excludeSpecs, (spec) => !invalidDotDotAfterRecursiveWildcard(spec)),
27233
- useCaseSensitiveFileNames,
27233
+ useCaseSensitiveFileNames2,
27234
27234
  currentDirectory
27235
27235
  );
27236
27236
  }
27237
- function matchesExcludeWorker(pathToCheck, excludeSpecs, useCaseSensitiveFileNames, currentDirectory, basePath) {
27237
+ function matchesExcludeWorker(pathToCheck, excludeSpecs, useCaseSensitiveFileNames2, currentDirectory, basePath) {
27238
27238
  const excludePattern = getRegularExpressionForWildcard(excludeSpecs, combinePaths(normalizePath(currentDirectory), basePath), "exclude");
27239
- const excludeRegex = excludePattern && getRegexFromPattern(excludePattern, useCaseSensitiveFileNames);
27239
+ const excludeRegex = excludePattern && getRegexFromPattern(excludePattern, useCaseSensitiveFileNames2);
27240
27240
  if (!excludeRegex)
27241
27241
  return false;
27242
27242
  if (excludeRegex.test(pathToCheck))
@@ -27443,8 +27443,8 @@ function getPackageJsonTypesVersionsPaths(typesVersions) {
27443
27443
  }
27444
27444
  var nodeModulesAtTypes = combinePaths("node_modules", "@types");
27445
27445
  function arePathsEqual(path1, path2, host) {
27446
- const useCaseSensitiveFileNames = typeof host.useCaseSensitiveFileNames === "function" ? host.useCaseSensitiveFileNames() : host.useCaseSensitiveFileNames;
27447
- return comparePaths(path1, path2, !useCaseSensitiveFileNames) === 0 /* EqualTo */;
27446
+ const useCaseSensitiveFileNames2 = typeof host.useCaseSensitiveFileNames === "function" ? host.useCaseSensitiveFileNames() : host.useCaseSensitiveFileNames;
27447
+ return comparePaths(path1, path2, !useCaseSensitiveFileNames2) === 0 /* EqualTo */;
27448
27448
  }
27449
27449
  function getOriginalAndResolvedFileName(fileName, host, traceEnabled) {
27450
27450
  const resolvedFileName = realPath(fileName, host, traceEnabled);
@@ -28602,13 +28602,10 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
28602
28602
  function combineDirectoryPath(root, dir) {
28603
28603
  return ensureTrailingDirectorySeparator(combinePaths(root, dir));
28604
28604
  }
28605
- function useCaseSensitiveFileNames() {
28606
- return !state.host.useCaseSensitiveFileNames ? true : typeof state.host.useCaseSensitiveFileNames === "boolean" ? state.host.useCaseSensitiveFileNames : state.host.useCaseSensitiveFileNames();
28607
- }
28608
28605
  function tryLoadInputFileForPath(finalPath, entry, packagePath, isImports2) {
28609
28606
  var _a, _b, _c, _d;
28610
- 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)) {
28611
- const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames });
28607
+ 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)) {
28608
+ const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames: () => useCaseSensitiveFileNames(state) });
28612
28609
  const commonSourceDirGuesses = [];
28613
28610
  if (state.compilerOptions.rootDir || state.compilerOptions.composite && state.compilerOptions.configFilePath) {
28614
28611
  const commonDir = toAbsolutePath(getCommonSourceDirectory(state.compilerOptions, () => [], ((_b = (_a = state.host).getCurrentDirectory) == null ? void 0 : _b.call(_a)) || "", getCanonicalFileName));
@@ -28637,7 +28634,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
28637
28634
  for (const commonSourceDirGuess of commonSourceDirGuesses) {
28638
28635
  const candidateDirectories = getOutputDirectoriesForBaseDirectory(commonSourceDirGuess);
28639
28636
  for (const candidateDir of candidateDirectories) {
28640
- if (containsPath(candidateDir, finalPath, !useCaseSensitiveFileNames())) {
28637
+ if (containsPath(candidateDir, finalPath, !useCaseSensitiveFileNames(state))) {
28641
28638
  const pathFragment = finalPath.slice(candidateDir.length + 1);
28642
28639
  const possibleInputBase = combinePaths(commonSourceDirGuess, pathFragment);
28643
28640
  const jsAndDtsExtensions = [".mjs" /* Mjs */, ".cjs" /* Cjs */, ".js" /* Js */, ".json" /* Json */, ".d.mts" /* Dmts */, ".d.cts" /* Dcts */, ".d.ts" /* Dts */];
@@ -28647,7 +28644,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
28647
28644
  for (const possibleExt of inputExts) {
28648
28645
  if (!extensionIsOk(extensions, possibleExt))
28649
28646
  continue;
28650
- const possibleInputWithInputExtension = changeAnyExtension(possibleInputBase, possibleExt, ext, !useCaseSensitiveFileNames());
28647
+ const possibleInputWithInputExtension = changeAnyExtension(possibleInputBase, possibleExt, ext, !useCaseSensitiveFileNames(state));
28651
28648
  if (state.host.fileExists(possibleInputWithInputExtension)) {
28652
28649
  return toSearchResult(withPackageId(scope, loadFileNameFromPackageJsonField(
28653
28650
  extensions,
@@ -29004,6 +29001,9 @@ function traceIfEnabled(state, diagnostic, ...args) {
29004
29001
  trace(state.host, diagnostic, ...args);
29005
29002
  }
29006
29003
  }
29004
+ function useCaseSensitiveFileNames(state) {
29005
+ return !state.host.useCaseSensitiveFileNames ? true : typeof state.host.useCaseSensitiveFileNames === "boolean" ? state.host.useCaseSensitiveFileNames : state.host.useCaseSensitiveFileNames();
29006
+ }
29007
29007
 
29008
29008
  // src/compiler/checker.ts
29009
29009
  var nextNodeId = 1;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "typescript",
3
3
  "author": "Microsoft Corp.",
4
4
  "homepage": "https://www.typescriptlang.org/",
5
- "version": "5.2.0-dev.20230707",
5
+ "version": "5.2.0-dev.20230708",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -114,5 +114,5 @@
114
114
  "node": "20.1.0",
115
115
  "npm": "8.19.4"
116
116
  },
117
- "gitHead": "e374eba37c002aa8238f00f77a34673a7536f5b1"
117
+ "gitHead": "9701f55f7217d7bd56d28e73b250444efcefa8dd"
118
118
  }