@typescript-deploys/pr-build 5.2.0-pr-54718-7 → 5.2.0-pr-54922-6

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-insiders.20230630`;
57
+ var version = `${versionMajorMinor}.0-insiders.20230707`;
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;
@@ -6839,6 +6839,7 @@ var Diagnostics = {
6839
6839
  Parameter_modifiers_can_only_be_used_in_TypeScript_files: diag(8012, 1 /* Error */, "Parameter_modifiers_can_only_be_used_in_TypeScript_files_8012", "Parameter modifiers can only be used in TypeScript files."),
6840
6840
  Non_null_assertions_can_only_be_used_in_TypeScript_files: diag(8013, 1 /* Error */, "Non_null_assertions_can_only_be_used_in_TypeScript_files_8013", "Non-null assertions can only be used in TypeScript files."),
6841
6841
  Type_assertion_expressions_can_only_be_used_in_TypeScript_files: diag(8016, 1 /* Error */, "Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016", "Type assertion expressions can only be used in TypeScript files."),
6842
+ Signature_declarations_can_only_be_used_in_TypeScript_files: diag(8017, 1 /* Error */, "Signature_declarations_can_only_be_used_in_TypeScript_files_8017", "Signature declarations can only be used in TypeScript files."),
6842
6843
  Report_errors_in_js_files: diag(8019, 3 /* Message */, "Report_errors_in_js_files_8019", "Report errors in .js files."),
6843
6844
  JSDoc_types_can_only_be_used_inside_documentation_comments: diag(8020, 1 /* Error */, "JSDoc_types_can_only_be_used_inside_documentation_comments_8020", "JSDoc types can only be used inside documentation comments."),
6844
6845
  JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags: diag(8021, 1 /* Error */, "JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021", "JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags."),
@@ -7889,7 +7890,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
7889
7890
  if (withMinus)
7890
7891
  start2--;
7891
7892
  error(Diagnostics.Octal_literals_are_not_allowed_Use_the_syntax_0, start2, pos - start2, literal);
7892
- return { type: 9 /* NumericLiteral */, value: tokenValue };
7893
+ return 9 /* NumericLiteral */;
7893
7894
  }
7894
7895
  } else {
7895
7896
  mainFragment = scanNumberFragment();
@@ -7929,20 +7930,18 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
7929
7930
  }
7930
7931
  if (tokenFlags & 8192 /* ContainsLeadingZero */) {
7931
7932
  error(Diagnostics.Decimals_with_leading_zeros_are_not_allowed, start2, end2 - start2);
7932
- return { type: 9 /* NumericLiteral */, value: "" + +result };
7933
+ tokenValue = "" + +result;
7934
+ return 9 /* NumericLiteral */;
7933
7935
  }
7934
7936
  if (decimalFragment !== void 0 || tokenFlags & 16 /* Scientific */) {
7935
7937
  checkForIdentifierStartAfterNumericLiteral(start2, decimalFragment === void 0 && !!(tokenFlags & 16 /* Scientific */));
7936
- return {
7937
- type: 9 /* NumericLiteral */,
7938
- value: "" + +result
7939
- // if value is not an integer, it can be safely coerced to a number
7940
- };
7938
+ tokenValue = "" + +result;
7939
+ return 9 /* NumericLiteral */;
7941
7940
  } else {
7942
7941
  tokenValue = result;
7943
7942
  const type = checkBigIntSuffix();
7944
7943
  checkForIdentifierStartAfterNumericLiteral(start2);
7945
- return { type, value: tokenValue };
7944
+ return type;
7946
7945
  }
7947
7946
  }
7948
7947
  function checkForIdentifierStartAfterNumericLiteral(numericStart, isScientific) {
@@ -8551,7 +8550,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
8551
8550
  return token = 41 /* MinusToken */;
8552
8551
  case 46 /* dot */:
8553
8552
  if (isDigit(text.charCodeAt(pos + 1))) {
8554
- tokenValue = scanNumber().value;
8553
+ scanNumber();
8555
8554
  return token = 9 /* NumericLiteral */;
8556
8555
  }
8557
8556
  if (text.charCodeAt(pos + 1) === 46 /* dot */ && text.charCodeAt(pos + 2) === 46 /* dot */) {
@@ -8669,8 +8668,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
8669
8668
  case 55 /* _7 */:
8670
8669
  case 56 /* _8 */:
8671
8670
  case 57 /* _9 */:
8672
- ({ type: token, value: tokenValue } = scanNumber());
8673
- return token;
8671
+ return token = scanNumber();
8674
8672
  case 58 /* colon */:
8675
8673
  pos++;
8676
8674
  return token = 59 /* ColonToken */;
@@ -11302,6 +11300,9 @@ function getResolveJsonModule(compilerOptions) {
11302
11300
  }
11303
11301
  return getEmitModuleResolutionKind(compilerOptions) === 100 /* Bundler */;
11304
11302
  }
11303
+ function getAllowJSCompilerOption(compilerOptions) {
11304
+ return compilerOptions.allowJs === void 0 ? !!compilerOptions.checkJs : compilerOptions.allowJs;
11305
+ }
11305
11306
  var reservedCharacterPattern = /[^\w\s\/]/g;
11306
11307
  var wildcardCharCodes = [42 /* asterisk */, 63 /* question */];
11307
11308
  var commonPackageFolders = ["node_modules", "bower_components", "jspm_packages"];
@@ -11411,7 +11412,7 @@ function getSubPatternFromSpec(spec, basePath, usage, { singleAsteriskRegexFragm
11411
11412
  function replaceWildcardCharacter(match, singleAsteriskRegexFragment) {
11412
11413
  return match === "*" ? singleAsteriskRegexFragment : match === "?" ? "[^/]" : "\\" + match;
11413
11414
  }
11414
- function getFileMatcherPatterns(path2, excludes, includes, useCaseSensitiveFileNames, currentDirectory) {
11415
+ function getFileMatcherPatterns(path2, excludes, includes, useCaseSensitiveFileNames2, currentDirectory) {
11415
11416
  path2 = normalizePath(path2);
11416
11417
  currentDirectory = normalizePath(currentDirectory);
11417
11418
  const absolutePath = combinePaths(currentDirectory, path2);
@@ -11420,22 +11421,22 @@ function getFileMatcherPatterns(path2, excludes, includes, useCaseSensitiveFileN
11420
11421
  includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"),
11421
11422
  includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"),
11422
11423
  excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"),
11423
- basePaths: getBasePaths(path2, includes, useCaseSensitiveFileNames)
11424
+ basePaths: getBasePaths(path2, includes, useCaseSensitiveFileNames2)
11424
11425
  };
11425
11426
  }
11426
- function getRegexFromPattern(pattern, useCaseSensitiveFileNames) {
11427
- return new RegExp(pattern, useCaseSensitiveFileNames ? "" : "i");
11427
+ function getRegexFromPattern(pattern, useCaseSensitiveFileNames2) {
11428
+ return new RegExp(pattern, useCaseSensitiveFileNames2 ? "" : "i");
11428
11429
  }
11429
- function matchFiles(path2, extensions, excludes, includes, useCaseSensitiveFileNames, currentDirectory, depth, getFileSystemEntries, realpath) {
11430
+ function matchFiles(path2, extensions, excludes, includes, useCaseSensitiveFileNames2, currentDirectory, depth, getFileSystemEntries, realpath) {
11430
11431
  path2 = normalizePath(path2);
11431
11432
  currentDirectory = normalizePath(currentDirectory);
11432
- const patterns = getFileMatcherPatterns(path2, excludes, includes, useCaseSensitiveFileNames, currentDirectory);
11433
- const includeFileRegexes = patterns.includeFilePatterns && patterns.includeFilePatterns.map((pattern) => getRegexFromPattern(pattern, useCaseSensitiveFileNames));
11434
- const includeDirectoryRegex = patterns.includeDirectoryPattern && getRegexFromPattern(patterns.includeDirectoryPattern, useCaseSensitiveFileNames);
11435
- 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);
11436
11437
  const results = includeFileRegexes ? includeFileRegexes.map(() => []) : [[]];
11437
11438
  const visited = /* @__PURE__ */ new Map();
11438
- const toCanonical = createGetCanonicalFileName(useCaseSensitiveFileNames);
11439
+ const toCanonical = createGetCanonicalFileName(useCaseSensitiveFileNames2);
11439
11440
  for (const basePath of patterns.basePaths) {
11440
11441
  visitDirectory(basePath, combinePaths(currentDirectory, basePath), depth);
11441
11442
  }
@@ -11477,7 +11478,7 @@ function matchFiles(path2, extensions, excludes, includes, useCaseSensitiveFileN
11477
11478
  }
11478
11479
  }
11479
11480
  }
11480
- function getBasePaths(path2, includes, useCaseSensitiveFileNames) {
11481
+ function getBasePaths(path2, includes, useCaseSensitiveFileNames2) {
11481
11482
  const basePaths = [path2];
11482
11483
  if (includes) {
11483
11484
  const includeBasePaths = [];
@@ -11485,9 +11486,9 @@ function getBasePaths(path2, includes, useCaseSensitiveFileNames) {
11485
11486
  const absolute = isRootedDiskPath(include) ? include : normalizePath(combinePaths(path2, include));
11486
11487
  includeBasePaths.push(getIncludeBasePath(absolute));
11487
11488
  }
11488
- includeBasePaths.sort(getStringComparer(!useCaseSensitiveFileNames));
11489
+ includeBasePaths.sort(getStringComparer(!useCaseSensitiveFileNames2));
11489
11490
  for (const includeBasePath of includeBasePaths) {
11490
- if (every(basePaths, (basePath) => !containsPath(basePath, includeBasePath, path2, !useCaseSensitiveFileNames))) {
11491
+ if (every(basePaths, (basePath) => !containsPath(basePath, includeBasePath, path2, !useCaseSensitiveFileNames2))) {
11491
11492
  basePaths.push(includeBasePath);
11492
11493
  }
11493
11494
  }
@@ -18498,7 +18499,8 @@ var Parser;
18498
18499
  nextToken();
18499
18500
  const statements = parseList(0 /* SourceElements */, parseStatement);
18500
18501
  Debug.assert(token() === 1 /* EndOfFileToken */);
18501
- const endOfFileToken = addJSDocComment(parseTokenNode());
18502
+ const endHasJSDoc = hasPrecedingJSDocComment();
18503
+ const endOfFileToken = withJSDoc(parseTokenNode(), endHasJSDoc);
18502
18504
  const sourceFile = createSourceFile2(fileName, languageVersion2, scriptKind2, isDeclarationFile, statements, endOfFileToken, sourceFlags, setExternalModuleIndicator2);
18503
18505
  processCommentPragmas(sourceFile, sourceText);
18504
18506
  processPragmasIntoFields(sourceFile, reportPragmaDiagnostic);
@@ -18518,11 +18520,11 @@ var Parser;
18518
18520
  parseDiagnostics.push(createDetachedDiagnostic(fileName, pos, end, diagnostic));
18519
18521
  }
18520
18522
  }
18521
- function withJSDoc(node, hasJSDoc) {
18522
- return hasJSDoc ? addJSDocComment(node) : node;
18523
- }
18524
18523
  let hasDeprecatedTag = false;
18525
- function addJSDocComment(node) {
18524
+ function withJSDoc(node, hasJSDoc) {
18525
+ if (!hasJSDoc) {
18526
+ return node;
18527
+ }
18526
18528
  Debug.assert(!node.jsDoc);
18527
18529
  const jsDoc = mapDefined(getJSDocCommentRanges(node, sourceText), (comment) => JSDocParser.parseJSDocComment(node, comment.pos, comment.end - comment.pos));
18528
18530
  if (jsDoc.length)
@@ -21037,12 +21039,14 @@ var Parser;
21037
21039
  return arrowExpression;
21038
21040
  }
21039
21041
  const pos = getNodePos();
21042
+ const hasJSDoc = hasPrecedingJSDocComment();
21040
21043
  const expr = parseBinaryExpressionOrHigher(0 /* Lowest */);
21041
21044
  if (expr.kind === 80 /* Identifier */ && token() === 39 /* EqualsGreaterThanToken */) {
21042
21045
  return parseSimpleArrowFunctionExpression(
21043
21046
  pos,
21044
21047
  expr,
21045
21048
  allowReturnTypeInArrowFunction,
21049
+ hasJSDoc,
21046
21050
  /*asyncModifier*/
21047
21051
  void 0
21048
21052
  );
@@ -21088,7 +21092,7 @@ var Parser;
21088
21092
  ), pos);
21089
21093
  }
21090
21094
  }
21091
- function parseSimpleArrowFunctionExpression(pos, identifier, allowReturnTypeInArrowFunction, asyncModifier) {
21095
+ function parseSimpleArrowFunctionExpression(pos, identifier, allowReturnTypeInArrowFunction, hasJSDoc, asyncModifier) {
21092
21096
  Debug.assert(token() === 39 /* EqualsGreaterThanToken */, "parseSimpleArrowFunctionExpression should only have been called if we had a =>");
21093
21097
  const parameter = factory2.createParameterDeclaration(
21094
21098
  /*modifiers*/
@@ -21121,7 +21125,7 @@ var Parser;
21121
21125
  equalsGreaterThanToken,
21122
21126
  body
21123
21127
  );
21124
- return addJSDocComment(finishNode(node, pos));
21128
+ return withJSDoc(finishNode(node, pos), hasJSDoc);
21125
21129
  }
21126
21130
  function tryParseParenthesizedArrowFunctionExpression(allowReturnTypeInArrowFunction) {
21127
21131
  const triState = isParenthesizedArrowFunctionExpression();
@@ -21249,9 +21253,10 @@ var Parser;
21249
21253
  if (token() === 134 /* AsyncKeyword */) {
21250
21254
  if (lookAhead(isUnParenthesizedAsyncArrowFunctionWorker) === 1 /* True */) {
21251
21255
  const pos = getNodePos();
21256
+ const hasJSDoc = hasPrecedingJSDocComment();
21252
21257
  const asyncModifier = parseModifiersForArrowFunction();
21253
21258
  const expr = parseBinaryExpressionOrHigher(0 /* Lowest */);
21254
- return parseSimpleArrowFunctionExpression(pos, expr, allowReturnTypeInArrowFunction, asyncModifier);
21259
+ return parseSimpleArrowFunctionExpression(pos, expr, allowReturnTypeInArrowFunction, hasJSDoc, asyncModifier);
21255
21260
  }
21256
21261
  }
21257
21262
  return void 0;
@@ -26001,6 +26006,7 @@ var commandOptionsWithoutBuild = [
26001
26006
  {
26002
26007
  name: "checkJs",
26003
26008
  type: "boolean",
26009
+ affectsModuleResolution: true,
26004
26010
  showInSimplifiedHelpView: true,
26005
26011
  category: Diagnostics.JavaScript_Support,
26006
26012
  description: Diagnostics.Enable_error_reporting_in_type_checked_JavaScript_files,
@@ -27220,17 +27226,17 @@ function invalidDotDotAfterRecursiveWildcard(s) {
27220
27226
  const lastDotIndex = endsWith(s, "/..") ? s.length : s.lastIndexOf("/../");
27221
27227
  return lastDotIndex > wildcardIndex;
27222
27228
  }
27223
- function matchesExclude(pathToCheck, excludeSpecs, useCaseSensitiveFileNames, currentDirectory) {
27229
+ function matchesExclude(pathToCheck, excludeSpecs, useCaseSensitiveFileNames2, currentDirectory) {
27224
27230
  return matchesExcludeWorker(
27225
27231
  pathToCheck,
27226
27232
  filter(excludeSpecs, (spec) => !invalidDotDotAfterRecursiveWildcard(spec)),
27227
- useCaseSensitiveFileNames,
27233
+ useCaseSensitiveFileNames2,
27228
27234
  currentDirectory
27229
27235
  );
27230
27236
  }
27231
- function matchesExcludeWorker(pathToCheck, excludeSpecs, useCaseSensitiveFileNames, currentDirectory, basePath) {
27237
+ function matchesExcludeWorker(pathToCheck, excludeSpecs, useCaseSensitiveFileNames2, currentDirectory, basePath) {
27232
27238
  const excludePattern = getRegularExpressionForWildcard(excludeSpecs, combinePaths(normalizePath(currentDirectory), basePath), "exclude");
27233
- const excludeRegex = excludePattern && getRegexFromPattern(excludePattern, useCaseSensitiveFileNames);
27239
+ const excludeRegex = excludePattern && getRegexFromPattern(excludePattern, useCaseSensitiveFileNames2);
27234
27240
  if (!excludeRegex)
27235
27241
  return false;
27236
27242
  if (excludeRegex.test(pathToCheck))
@@ -27437,8 +27443,8 @@ function getPackageJsonTypesVersionsPaths(typesVersions) {
27437
27443
  }
27438
27444
  var nodeModulesAtTypes = combinePaths("node_modules", "@types");
27439
27445
  function arePathsEqual(path1, path2, host) {
27440
- const useCaseSensitiveFileNames = typeof host.useCaseSensitiveFileNames === "function" ? host.useCaseSensitiveFileNames() : host.useCaseSensitiveFileNames;
27441
- 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 */;
27442
27448
  }
27443
27449
  function getOriginalAndResolvedFileName(fileName, host, traceEnabled) {
27444
27450
  const resolvedFileName = realPath(fileName, host, traceEnabled);
@@ -28246,6 +28252,9 @@ function loadModuleFromSelfNameReference(extensions, moduleName, directory, stat
28246
28252
  }
28247
28253
  const trailingParts = parts.slice(nameParts.length);
28248
28254
  const subpath = !length(trailingParts) ? "." : `.${directorySeparator}${trailingParts.join(directorySeparator)}`;
28255
+ if (getAllowJSCompilerOption(state.compilerOptions) && !pathContainsNodeModules(directory)) {
28256
+ return loadModuleFromExports(scope, extensions, subpath, state, cache, redirectedReference);
28257
+ }
28249
28258
  const priorityExtensions = extensions & (1 /* TypeScript */ | 4 /* Declaration */);
28250
28259
  const secondaryExtensions = extensions & ~(1 /* TypeScript */ | 4 /* Declaration */);
28251
28260
  return loadModuleFromExports(scope, priorityExtensions, subpath, state, cache, redirectedReference) || loadModuleFromExports(scope, secondaryExtensions, subpath, state, cache, redirectedReference);
@@ -28593,13 +28602,10 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
28593
28602
  function combineDirectoryPath(root, dir) {
28594
28603
  return ensureTrailingDirectorySeparator(combinePaths(root, dir));
28595
28604
  }
28596
- function useCaseSensitiveFileNames() {
28597
- return !state.host.useCaseSensitiveFileNames ? true : typeof state.host.useCaseSensitiveFileNames === "boolean" ? state.host.useCaseSensitiveFileNames : state.host.useCaseSensitiveFileNames();
28598
- }
28599
28605
  function tryLoadInputFileForPath(finalPath, entry, packagePath, isImports2) {
28600
28606
  var _a, _b, _c, _d;
28601
- 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)) {
28602
- 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) });
28603
28609
  const commonSourceDirGuesses = [];
28604
28610
  if (state.compilerOptions.rootDir || state.compilerOptions.composite && state.compilerOptions.configFilePath) {
28605
28611
  const commonDir = toAbsolutePath(getCommonSourceDirectory(state.compilerOptions, () => [], ((_b = (_a = state.host).getCurrentDirectory) == null ? void 0 : _b.call(_a)) || "", getCanonicalFileName));
@@ -28628,7 +28634,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
28628
28634
  for (const commonSourceDirGuess of commonSourceDirGuesses) {
28629
28635
  const candidateDirectories = getOutputDirectoriesForBaseDirectory(commonSourceDirGuess);
28630
28636
  for (const candidateDir of candidateDirectories) {
28631
- if (containsPath(candidateDir, finalPath, !useCaseSensitiveFileNames())) {
28637
+ if (containsPath(candidateDir, finalPath, !useCaseSensitiveFileNames(state))) {
28632
28638
  const pathFragment = finalPath.slice(candidateDir.length + 1);
28633
28639
  const possibleInputBase = combinePaths(commonSourceDirGuess, pathFragment);
28634
28640
  const jsAndDtsExtensions = [".mjs" /* Mjs */, ".cjs" /* Cjs */, ".js" /* Js */, ".json" /* Json */, ".d.mts" /* Dmts */, ".d.cts" /* Dcts */, ".d.ts" /* Dts */];
@@ -28638,7 +28644,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
28638
28644
  for (const possibleExt of inputExts) {
28639
28645
  if (!extensionIsOk(extensions, possibleExt))
28640
28646
  continue;
28641
- const possibleInputWithInputExtension = changeAnyExtension(possibleInputBase, possibleExt, ext, !useCaseSensitiveFileNames());
28647
+ const possibleInputWithInputExtension = changeAnyExtension(possibleInputBase, possibleExt, ext, !useCaseSensitiveFileNames(state));
28642
28648
  if (state.host.fileExists(possibleInputWithInputExtension)) {
28643
28649
  return toSearchResult(withPackageId(scope, loadFileNameFromPackageJsonField(
28644
28650
  extensions,
@@ -28995,6 +29001,9 @@ function traceIfEnabled(state, diagnostic, ...args) {
28995
29001
  trace(state.host, diagnostic, ...args);
28996
29002
  }
28997
29003
  }
29004
+ function useCaseSensitiveFileNames(state) {
29005
+ return !state.host.useCaseSensitiveFileNames ? true : typeof state.host.useCaseSensitiveFileNames === "boolean" ? state.host.useCaseSensitiveFileNames : state.host.useCaseSensitiveFileNames();
29006
+ }
28998
29007
 
28999
29008
  // src/compiler/checker.ts
29000
29009
  var nextNodeId = 1;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@typescript-deploys/pr-build",
3
3
  "author": "Microsoft Corp.",
4
4
  "homepage": "https://www.typescriptlang.org/",
5
- "version": "5.2.0-pr-54718-7",
5
+ "version": "5.2.0-pr-54922-6",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -115,5 +115,5 @@
115
115
  "node": "20.1.0",
116
116
  "npm": "8.19.4"
117
117
  },
118
- "gitHead": "2594567ea6b5fcaa80d58cc204b6c320e5c4f474"
118
+ "gitHead": "163fb7959da8123962233530da125814c6a3f2c3"
119
119
  }