typescript 5.2.0-dev.20230706 → 5.2.0-dev.20230708

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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.20230706`;
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;
@@ -7890,7 +7890,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
7890
7890
  if (withMinus)
7891
7891
  start2--;
7892
7892
  error(Diagnostics.Octal_literals_are_not_allowed_Use_the_syntax_0, start2, pos - start2, literal);
7893
- return { type: 9 /* NumericLiteral */, value: tokenValue };
7893
+ return 9 /* NumericLiteral */;
7894
7894
  }
7895
7895
  } else {
7896
7896
  mainFragment = scanNumberFragment();
@@ -7930,20 +7930,18 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
7930
7930
  }
7931
7931
  if (tokenFlags & 8192 /* ContainsLeadingZero */) {
7932
7932
  error(Diagnostics.Decimals_with_leading_zeros_are_not_allowed, start2, end2 - start2);
7933
- return { type: 9 /* NumericLiteral */, value: "" + +result };
7933
+ tokenValue = "" + +result;
7934
+ return 9 /* NumericLiteral */;
7934
7935
  }
7935
7936
  if (decimalFragment !== void 0 || tokenFlags & 16 /* Scientific */) {
7936
7937
  checkForIdentifierStartAfterNumericLiteral(start2, decimalFragment === void 0 && !!(tokenFlags & 16 /* Scientific */));
7937
- return {
7938
- type: 9 /* NumericLiteral */,
7939
- value: "" + +result
7940
- // if value is not an integer, it can be safely coerced to a number
7941
- };
7938
+ tokenValue = "" + +result;
7939
+ return 9 /* NumericLiteral */;
7942
7940
  } else {
7943
7941
  tokenValue = result;
7944
7942
  const type = checkBigIntSuffix();
7945
7943
  checkForIdentifierStartAfterNumericLiteral(start2);
7946
- return { type, value: tokenValue };
7944
+ return type;
7947
7945
  }
7948
7946
  }
7949
7947
  function checkForIdentifierStartAfterNumericLiteral(numericStart, isScientific) {
@@ -8552,7 +8550,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
8552
8550
  return token = 41 /* MinusToken */;
8553
8551
  case 46 /* dot */:
8554
8552
  if (isDigit(text.charCodeAt(pos + 1))) {
8555
- tokenValue = scanNumber().value;
8553
+ scanNumber();
8556
8554
  return token = 9 /* NumericLiteral */;
8557
8555
  }
8558
8556
  if (text.charCodeAt(pos + 1) === 46 /* dot */ && text.charCodeAt(pos + 2) === 46 /* dot */) {
@@ -8670,8 +8668,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
8670
8668
  case 55 /* _7 */:
8671
8669
  case 56 /* _8 */:
8672
8670
  case 57 /* _9 */:
8673
- ({ type: token, value: tokenValue } = scanNumber());
8674
- return token;
8671
+ return token = scanNumber();
8675
8672
  case 58 /* colon */:
8676
8673
  pos++;
8677
8674
  return token = 59 /* ColonToken */;
@@ -11415,7 +11412,7 @@ function getSubPatternFromSpec(spec, basePath, usage, { singleAsteriskRegexFragm
11415
11412
  function replaceWildcardCharacter(match, singleAsteriskRegexFragment) {
11416
11413
  return match === "*" ? singleAsteriskRegexFragment : match === "?" ? "[^/]" : "\\" + match;
11417
11414
  }
11418
- function getFileMatcherPatterns(path2, excludes, includes, useCaseSensitiveFileNames, currentDirectory) {
11415
+ function getFileMatcherPatterns(path2, excludes, includes, useCaseSensitiveFileNames2, currentDirectory) {
11419
11416
  path2 = normalizePath(path2);
11420
11417
  currentDirectory = normalizePath(currentDirectory);
11421
11418
  const absolutePath = combinePaths(currentDirectory, path2);
@@ -11424,22 +11421,22 @@ function getFileMatcherPatterns(path2, excludes, includes, useCaseSensitiveFileN
11424
11421
  includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"),
11425
11422
  includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"),
11426
11423
  excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"),
11427
- basePaths: getBasePaths(path2, includes, useCaseSensitiveFileNames)
11424
+ basePaths: getBasePaths(path2, includes, useCaseSensitiveFileNames2)
11428
11425
  };
11429
11426
  }
11430
- function getRegexFromPattern(pattern, useCaseSensitiveFileNames) {
11431
- return new RegExp(pattern, useCaseSensitiveFileNames ? "" : "i");
11427
+ function getRegexFromPattern(pattern, useCaseSensitiveFileNames2) {
11428
+ return new RegExp(pattern, useCaseSensitiveFileNames2 ? "" : "i");
11432
11429
  }
11433
- function matchFiles(path2, extensions, excludes, includes, useCaseSensitiveFileNames, currentDirectory, depth, getFileSystemEntries, realpath) {
11430
+ function matchFiles(path2, extensions, excludes, includes, useCaseSensitiveFileNames2, currentDirectory, depth, getFileSystemEntries, realpath) {
11434
11431
  path2 = normalizePath(path2);
11435
11432
  currentDirectory = normalizePath(currentDirectory);
11436
- const patterns = getFileMatcherPatterns(path2, excludes, includes, useCaseSensitiveFileNames, currentDirectory);
11437
- const includeFileRegexes = patterns.includeFilePatterns && patterns.includeFilePatterns.map((pattern) => getRegexFromPattern(pattern, useCaseSensitiveFileNames));
11438
- const includeDirectoryRegex = patterns.includeDirectoryPattern && getRegexFromPattern(patterns.includeDirectoryPattern, useCaseSensitiveFileNames);
11439
- 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);
11440
11437
  const results = includeFileRegexes ? includeFileRegexes.map(() => []) : [[]];
11441
11438
  const visited = /* @__PURE__ */ new Map();
11442
- const toCanonical = createGetCanonicalFileName(useCaseSensitiveFileNames);
11439
+ const toCanonical = createGetCanonicalFileName(useCaseSensitiveFileNames2);
11443
11440
  for (const basePath of patterns.basePaths) {
11444
11441
  visitDirectory(basePath, combinePaths(currentDirectory, basePath), depth);
11445
11442
  }
@@ -11481,7 +11478,7 @@ function matchFiles(path2, extensions, excludes, includes, useCaseSensitiveFileN
11481
11478
  }
11482
11479
  }
11483
11480
  }
11484
- function getBasePaths(path2, includes, useCaseSensitiveFileNames) {
11481
+ function getBasePaths(path2, includes, useCaseSensitiveFileNames2) {
11485
11482
  const basePaths = [path2];
11486
11483
  if (includes) {
11487
11484
  const includeBasePaths = [];
@@ -11489,9 +11486,9 @@ function getBasePaths(path2, includes, useCaseSensitiveFileNames) {
11489
11486
  const absolute = isRootedDiskPath(include) ? include : normalizePath(combinePaths(path2, include));
11490
11487
  includeBasePaths.push(getIncludeBasePath(absolute));
11491
11488
  }
11492
- includeBasePaths.sort(getStringComparer(!useCaseSensitiveFileNames));
11489
+ includeBasePaths.sort(getStringComparer(!useCaseSensitiveFileNames2));
11493
11490
  for (const includeBasePath of includeBasePaths) {
11494
- if (every(basePaths, (basePath) => !containsPath(basePath, includeBasePath, path2, !useCaseSensitiveFileNames))) {
11491
+ if (every(basePaths, (basePath) => !containsPath(basePath, includeBasePath, path2, !useCaseSensitiveFileNames2))) {
11495
11492
  basePaths.push(includeBasePath);
11496
11493
  }
11497
11494
  }
@@ -27229,17 +27226,17 @@ function invalidDotDotAfterRecursiveWildcard(s) {
27229
27226
  const lastDotIndex = endsWith(s, "/..") ? s.length : s.lastIndexOf("/../");
27230
27227
  return lastDotIndex > wildcardIndex;
27231
27228
  }
27232
- function matchesExclude(pathToCheck, excludeSpecs, useCaseSensitiveFileNames, currentDirectory) {
27229
+ function matchesExclude(pathToCheck, excludeSpecs, useCaseSensitiveFileNames2, currentDirectory) {
27233
27230
  return matchesExcludeWorker(
27234
27231
  pathToCheck,
27235
27232
  filter(excludeSpecs, (spec) => !invalidDotDotAfterRecursiveWildcard(spec)),
27236
- useCaseSensitiveFileNames,
27233
+ useCaseSensitiveFileNames2,
27237
27234
  currentDirectory
27238
27235
  );
27239
27236
  }
27240
- function matchesExcludeWorker(pathToCheck, excludeSpecs, useCaseSensitiveFileNames, currentDirectory, basePath) {
27237
+ function matchesExcludeWorker(pathToCheck, excludeSpecs, useCaseSensitiveFileNames2, currentDirectory, basePath) {
27241
27238
  const excludePattern = getRegularExpressionForWildcard(excludeSpecs, combinePaths(normalizePath(currentDirectory), basePath), "exclude");
27242
- const excludeRegex = excludePattern && getRegexFromPattern(excludePattern, useCaseSensitiveFileNames);
27239
+ const excludeRegex = excludePattern && getRegexFromPattern(excludePattern, useCaseSensitiveFileNames2);
27243
27240
  if (!excludeRegex)
27244
27241
  return false;
27245
27242
  if (excludeRegex.test(pathToCheck))
@@ -27446,8 +27443,8 @@ function getPackageJsonTypesVersionsPaths(typesVersions) {
27446
27443
  }
27447
27444
  var nodeModulesAtTypes = combinePaths("node_modules", "@types");
27448
27445
  function arePathsEqual(path1, path2, host) {
27449
- const useCaseSensitiveFileNames = typeof host.useCaseSensitiveFileNames === "function" ? host.useCaseSensitiveFileNames() : host.useCaseSensitiveFileNames;
27450
- 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 */;
27451
27448
  }
27452
27449
  function getOriginalAndResolvedFileName(fileName, host, traceEnabled) {
27453
27450
  const resolvedFileName = realPath(fileName, host, traceEnabled);
@@ -28605,13 +28602,10 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
28605
28602
  function combineDirectoryPath(root, dir) {
28606
28603
  return ensureTrailingDirectorySeparator(combinePaths(root, dir));
28607
28604
  }
28608
- function useCaseSensitiveFileNames() {
28609
- return !state.host.useCaseSensitiveFileNames ? true : typeof state.host.useCaseSensitiveFileNames === "boolean" ? state.host.useCaseSensitiveFileNames : state.host.useCaseSensitiveFileNames();
28610
- }
28611
28605
  function tryLoadInputFileForPath(finalPath, entry, packagePath, isImports2) {
28612
28606
  var _a, _b, _c, _d;
28613
- 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)) {
28614
- 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) });
28615
28609
  const commonSourceDirGuesses = [];
28616
28610
  if (state.compilerOptions.rootDir || state.compilerOptions.composite && state.compilerOptions.configFilePath) {
28617
28611
  const commonDir = toAbsolutePath(getCommonSourceDirectory(state.compilerOptions, () => [], ((_b = (_a = state.host).getCurrentDirectory) == null ? void 0 : _b.call(_a)) || "", getCanonicalFileName));
@@ -28640,7 +28634,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
28640
28634
  for (const commonSourceDirGuess of commonSourceDirGuesses) {
28641
28635
  const candidateDirectories = getOutputDirectoriesForBaseDirectory(commonSourceDirGuess);
28642
28636
  for (const candidateDir of candidateDirectories) {
28643
- if (containsPath(candidateDir, finalPath, !useCaseSensitiveFileNames())) {
28637
+ if (containsPath(candidateDir, finalPath, !useCaseSensitiveFileNames(state))) {
28644
28638
  const pathFragment = finalPath.slice(candidateDir.length + 1);
28645
28639
  const possibleInputBase = combinePaths(commonSourceDirGuess, pathFragment);
28646
28640
  const jsAndDtsExtensions = [".mjs" /* Mjs */, ".cjs" /* Cjs */, ".js" /* Js */, ".json" /* Json */, ".d.mts" /* Dmts */, ".d.cts" /* Dcts */, ".d.ts" /* Dts */];
@@ -28650,7 +28644,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
28650
28644
  for (const possibleExt of inputExts) {
28651
28645
  if (!extensionIsOk(extensions, possibleExt))
28652
28646
  continue;
28653
- const possibleInputWithInputExtension = changeAnyExtension(possibleInputBase, possibleExt, ext, !useCaseSensitiveFileNames());
28647
+ const possibleInputWithInputExtension = changeAnyExtension(possibleInputBase, possibleExt, ext, !useCaseSensitiveFileNames(state));
28654
28648
  if (state.host.fileExists(possibleInputWithInputExtension)) {
28655
28649
  return toSearchResult(withPackageId(scope, loadFileNameFromPackageJsonField(
28656
28650
  extensions,
@@ -29007,6 +29001,9 @@ function traceIfEnabled(state, diagnostic, ...args) {
29007
29001
  trace(state.host, diagnostic, ...args);
29008
29002
  }
29009
29003
  }
29004
+ function useCaseSensitiveFileNames(state) {
29005
+ return !state.host.useCaseSensitiveFileNames ? true : typeof state.host.useCaseSensitiveFileNames === "boolean" ? state.host.useCaseSensitiveFileNames : state.host.useCaseSensitiveFileNames();
29006
+ }
29010
29007
 
29011
29008
  // src/compiler/checker.ts
29012
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.20230706",
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": "b1a96a37b5cb5dd18ca72cc09014c1f110089b1b"
117
+ "gitHead": "9701f55f7217d7bd56d28e73b250444efcefa8dd"
118
118
  }