@typescript-deploys/pr-build 5.1.0-pr-53799-9 → 5.1.0-pr-53903-8

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.1";
21
- var version = `${versionMajorMinor}.0-insiders.20230416`;
21
+ var version = `${versionMajorMinor}.0-insiders.20230418`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -16601,7 +16601,7 @@ function getScriptKindFromFileName(fileName) {
16601
16601
  var supportedTSExtensions = [[".ts" /* Ts */, ".tsx" /* Tsx */, ".d.ts" /* Dts */], [".cts" /* Cts */, ".d.cts" /* Dcts */], [".mts" /* Mts */, ".d.mts" /* Dmts */]];
16602
16602
  var supportedTSExtensionsFlat = flatten(supportedTSExtensions);
16603
16603
  var supportedTSExtensionsWithJson = [...supportedTSExtensions, [".json" /* Json */]];
16604
- var supportedTSExtensionsForExtractExtension = [".d.ts" /* Dts */, ".d.cts" /* Dcts */, ".d.mts" /* Dmts */, ".cts" /* Cts */, ".mts" /* Mts */, ".ts" /* Ts */, ".tsx" /* Tsx */, ".cts" /* Cts */, ".mts" /* Mts */];
16604
+ var supportedTSExtensionsForExtractExtension = [".d.ts" /* Dts */, ".d.cts" /* Dcts */, ".d.mts" /* Dmts */, ".cts" /* Cts */, ".mts" /* Mts */, ".ts" /* Ts */, ".tsx" /* Tsx */];
16605
16605
  var supportedJSExtensions = [[".js" /* Js */, ".jsx" /* Jsx */], [".mjs" /* Mjs */], [".cjs" /* Cjs */]];
16606
16606
  var supportedJSExtensionsFlat = flatten(supportedJSExtensions);
16607
16607
  var allSupportedExtensions = [[".ts" /* Ts */, ".tsx" /* Tsx */, ".d.ts" /* Dts */, ".js" /* Js */, ".jsx" /* Jsx */], [".cts" /* Cts */, ".d.cts" /* Dcts */, ".cjs" /* Cjs */], [".mts" /* Mts */, ".d.mts" /* Dmts */, ".mjs" /* Mjs */]];
@@ -37633,22 +37633,22 @@ var nodeModulesPathPart = "/node_modules/";
37633
37633
  function pathContainsNodeModules(path) {
37634
37634
  return stringContains(path, nodeModulesPathPart);
37635
37635
  }
37636
- function parseNodeModuleFromPath(resolved) {
37636
+ function parseNodeModuleFromPath(resolved, isFolder) {
37637
37637
  const path = normalizePath(resolved);
37638
37638
  const idx = path.lastIndexOf(nodeModulesPathPart);
37639
37639
  if (idx === -1) {
37640
37640
  return void 0;
37641
37641
  }
37642
37642
  const indexAfterNodeModules = idx + nodeModulesPathPart.length;
37643
- let indexAfterPackageName = moveToNextDirectorySeparatorIfAvailable(path, indexAfterNodeModules);
37643
+ let indexAfterPackageName = moveToNextDirectorySeparatorIfAvailable(path, indexAfterNodeModules, isFolder);
37644
37644
  if (path.charCodeAt(indexAfterNodeModules) === 64 /* at */) {
37645
- indexAfterPackageName = moveToNextDirectorySeparatorIfAvailable(path, indexAfterPackageName);
37645
+ indexAfterPackageName = moveToNextDirectorySeparatorIfAvailable(path, indexAfterPackageName, isFolder);
37646
37646
  }
37647
37647
  return path.slice(0, indexAfterPackageName);
37648
37648
  }
37649
- function moveToNextDirectorySeparatorIfAvailable(path, prevSeparatorIndex) {
37649
+ function moveToNextDirectorySeparatorIfAvailable(path, prevSeparatorIndex, isFolder) {
37650
37650
  const nextSeparatorIndex = path.indexOf(directorySeparator, prevSeparatorIndex + 1);
37651
- return nextSeparatorIndex === -1 ? prevSeparatorIndex : nextSeparatorIndex;
37651
+ return nextSeparatorIndex === -1 ? isFolder ? path.length : prevSeparatorIndex : nextSeparatorIndex;
37652
37652
  }
37653
37653
  function loadModuleFromFileNoPackageId(extensions, candidate, onlyRecordFailures, state) {
37654
37654
  return noPackageId(loadModuleFromFile(extensions, candidate, onlyRecordFailures, state));
@@ -39024,7 +39024,7 @@ function createBinder() {
39024
39024
  return getSymbolNameForPrivateIdentifier(containingClassSymbol, name.escapedText);
39025
39025
  }
39026
39026
  if (isJsxNamespacedName(name)) {
39027
- return getEscapedTextOfJsxAttributeName(name);
39027
+ return getEscapedTextOfJsxNamespacedName(name);
39028
39028
  }
39029
39029
  return isPropertyNameLiteral(name) ? getEscapedTextOfIdentifierOrLiteral(name) : void 0;
39030
39030
  }
@@ -57159,16 +57159,18 @@ function createTypeChecker(host) {
57159
57159
  while (true) {
57160
57160
  if (tailCount === 1e3) {
57161
57161
  error(currentNode, Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite);
57162
- result = errorType;
57163
- break;
57162
+ return errorType;
57164
57163
  }
57165
- const checkTuples = isSimpleTupleType(root.node.checkType) && isSimpleTupleType(root.node.extendsType) && length(root.node.checkType.elements) === length(root.node.extendsType.elements);
57166
57164
  const checkType = instantiateType(getActualTypeVariable(root.checkType), mapper);
57167
- const checkTypeDeferred = isDeferredType(checkType, checkTuples);
57168
57165
  const extendsType = instantiateType(root.extendsType, mapper);
57166
+ if (checkType === errorType || extendsType === errorType) {
57167
+ return errorType;
57168
+ }
57169
57169
  if (checkType === wildcardType || extendsType === wildcardType) {
57170
57170
  return wildcardType;
57171
57171
  }
57172
+ const checkTuples = isSimpleTupleType(root.node.checkType) && isSimpleTupleType(root.node.extendsType) && length(root.node.checkType.elements) === length(root.node.extendsType.elements);
57173
+ const checkTypeDeferred = isDeferredType(checkType, checkTuples);
57172
57174
  let combinedMapper;
57173
57175
  if (root.inferTypeParameters) {
57174
57176
  const freshParams = sameMap(root.inferTypeParameters, maybeCloneTypeParameter);
@@ -65085,7 +65087,7 @@ function createTypeChecker(host) {
65085
65087
  }
65086
65088
  function isTypePresencePossible(type, propName, assumeTrue) {
65087
65089
  const prop = getPropertyOfType(type, propName);
65088
- return prop ? !!(prop.flags & 16777216 /* Optional */) || assumeTrue : !!getApplicableIndexInfoForName(type, propName) || !assumeTrue;
65090
+ return prop ? !!(prop.flags & 16777216 /* Optional */ || getCheckFlags(prop) & 48 /* Partial */) || assumeTrue : !!getApplicableIndexInfoForName(type, propName) || !assumeTrue;
65089
65091
  }
65090
65092
  function narrowTypeByInKeyword(type, nameType, assumeTrue) {
65091
65093
  const name = getPropertyNameFromType(nameType);
@@ -66893,7 +66895,7 @@ function createTypeChecker(host) {
66893
66895
  return node === conditional.whenTrue || node === conditional.whenFalse ? getContextualType(conditional, contextFlags) : void 0;
66894
66896
  }
66895
66897
  function getContextualTypeForChildJsxExpression(node, child, contextFlags) {
66896
- const attributesType = getApparentTypeOfContextualType(node.openingElement.tagName, contextFlags);
66898
+ const attributesType = getApparentTypeOfContextualType(node.openingElement.attributes, contextFlags);
66897
66899
  const jsxChildrenPropertyName = getJsxElementChildrenPropertyName(getJsxNamespaceAt(node));
66898
66900
  if (!(attributesType && !isTypeAny(attributesType) && jsxChildrenPropertyName && jsxChildrenPropertyName !== "")) {
66899
66901
  return void 0;
@@ -66935,6 +66937,7 @@ function createTypeChecker(host) {
66935
66937
  case 9 /* NumericLiteral */:
66936
66938
  case 10 /* BigIntLiteral */:
66937
66939
  case 15 /* NoSubstitutionTemplateLiteral */:
66940
+ case 227 /* TemplateExpression */:
66938
66941
  case 112 /* TrueKeyword */:
66939
66942
  case 97 /* FalseKeyword */:
66940
66943
  case 106 /* NullKeyword */:
@@ -110664,7 +110667,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
110664
110667
  }
110665
110668
  }
110666
110669
  function emitEmbeddedStatement(parent, node) {
110667
- if (isBlock(node) || getEmitFlags(parent) & 1 /* SingleLine */) {
110670
+ if (isBlock(node) || getEmitFlags(parent) & 1 /* SingleLine */ || preserveSourceNewlines && !getLeadingLineTerminatorCount(parent, node, 0 /* None */)) {
110668
110671
  writeSpace();
110669
110672
  emit(node);
110670
110673
  } else {
@@ -113528,7 +113531,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
113528
113531
  automaticTypeDirectiveResolutions = createModeAwareCache();
113529
113532
  if (automaticTypeDirectiveNames.length) {
113530
113533
  (_k = tracing) == null ? void 0 : _k.push(tracing.Phase.Program, "processTypeReferences", { count: automaticTypeDirectiveNames.length });
113531
- const containingDirectory = options.configFilePath ? getDirectoryPath(options.configFilePath) : host.getCurrentDirectory();
113534
+ const containingDirectory = options.configFilePath ? getDirectoryPath(options.configFilePath) : currentDirectory;
113532
113535
  const containingFilename = combinePaths(containingDirectory, inferredTypesContainingFile);
113533
113536
  const resolutions = resolveTypeReferenceDirectiveNamesReusingOldState(automaticTypeDirectiveNames, containingFilename);
113534
113537
  for (let i = 0; i < automaticTypeDirectiveNames.length; i++) {
@@ -115319,8 +115322,9 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
115319
115322
  path += (i === 2 ? "/" : "-") + components[i];
115320
115323
  i++;
115321
115324
  }
115322
- const resolveFrom = combinePaths(currentDirectory, `__lib_node_modules_lookup_${libFileName}__.ts`);
115323
- const localOverrideModuleResult = resolveModuleName("@typescript/lib-" + path, resolveFrom, { moduleResolution: 2 /* Node10 */ }, host, moduleResolutionCache);
115325
+ const containingDirectory = options.configFilePath ? getDirectoryPath(options.configFilePath) : currentDirectory;
115326
+ const resolveFrom = combinePaths(containingDirectory, `__lib_node_modules_lookup_${libFileName}__.ts`);
115327
+ const localOverrideModuleResult = resolveModuleName("@typescript/lib-" + path, resolveFrom, { moduleResolution: 2 /* Node10 */, traceResolution: options.traceResolution }, host, moduleResolutionCache);
115324
115328
  if (localOverrideModuleResult == null ? void 0 : localOverrideModuleResult.resolvedModule) {
115325
115329
  return localOverrideModuleResult.resolvedModule.resolvedFileName;
115326
115330
  }
@@ -115455,7 +115459,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
115455
115459
  void 0
115456
115460
  );
115457
115461
  } else {
115458
- const basePath = getNormalizedAbsolutePath(getDirectoryPath(refPath), host.getCurrentDirectory());
115462
+ const basePath = getNormalizedAbsolutePath(getDirectoryPath(refPath), currentDirectory);
115459
115463
  sourceFile = host.getSourceFile(refPath, 100 /* JSON */);
115460
115464
  addFileToFilesByName(
115461
115465
  sourceFile,
@@ -118296,6 +118300,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
118296
118300
  let failedLookupChecks;
118297
118301
  let startsWithPathChecks;
118298
118302
  let isInDirectoryChecks;
118303
+ let allResolutionsAreInvalidated = false;
118299
118304
  const getCurrentDirectory = memoize(() => resolutionHost.getCurrentDirectory());
118300
118305
  const cachedDirectoryStructureHost = resolutionHost.getCachedDirectoryStructureHost();
118301
118306
  const resolvedModuleNames = /* @__PURE__ */ new Map();
@@ -118338,7 +118343,8 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
118338
118343
  isFileWithInvalidatedNonRelativeUnresolvedImports,
118339
118344
  updateTypeRootsWatch,
118340
118345
  closeTypeRootsWatch,
118341
- clear: clear2
118346
+ clear: clear2,
118347
+ onChangesAffectModuleResolution
118342
118348
  };
118343
118349
  function getResolvedModule2(resolution) {
118344
118350
  return resolution.resolvedModule;
@@ -118361,6 +118367,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
118361
118367
  isInDirectoryChecks = void 0;
118362
118368
  affectingPathChecks = void 0;
118363
118369
  affectingPathChecksForFile = void 0;
118370
+ allResolutionsAreInvalidated = false;
118364
118371
  moduleResolutionCache.clear();
118365
118372
  typeReferenceDirectiveResolutionCache.clear();
118366
118373
  moduleResolutionCache.update(resolutionHost.getCompilationSettings());
@@ -118368,6 +118375,13 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
118368
118375
  impliedFormatPackageJsons.clear();
118369
118376
  hasChangedAutomaticTypeDirectiveNames = false;
118370
118377
  }
118378
+ function onChangesAffectModuleResolution() {
118379
+ allResolutionsAreInvalidated = true;
118380
+ moduleResolutionCache.clearAllExceptPackageJsonInfoCache();
118381
+ typeReferenceDirectiveResolutionCache.clearAllExceptPackageJsonInfoCache();
118382
+ moduleResolutionCache.update(resolutionHost.getCompilationSettings());
118383
+ typeReferenceDirectiveResolutionCache.update(resolutionHost.getCompilationSettings());
118384
+ }
118371
118385
  function startRecordingFilesWithChangedResolutions() {
118372
118386
  filesWithChangedSetOfUnresolvedImports = [];
118373
118387
  }
@@ -118387,7 +118401,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
118387
118401
  invalidateResolutionsOfFailedLookupLocations();
118388
118402
  const collected = filesWithInvalidatedResolutions;
118389
118403
  filesWithInvalidatedResolutions = void 0;
118390
- return (path) => customHasInvalidatedResolutions(path) || !!(collected == null ? void 0 : collected.has(path)) || isFileWithInvalidatedNonRelativeUnresolvedImports(path);
118404
+ return (path) => customHasInvalidatedResolutions(path) || allResolutionsAreInvalidated || !!(collected == null ? void 0 : collected.has(path)) || isFileWithInvalidatedNonRelativeUnresolvedImports(path);
118391
118405
  }
118392
118406
  function startCachingPerDirectoryResolution() {
118393
118407
  moduleResolutionCache.clearAllExceptPackageJsonInfoCache();
@@ -118397,6 +118411,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
118397
118411
  }
118398
118412
  function finishCachingPerDirectoryResolution(newProgram, oldProgram) {
118399
118413
  filesWithInvalidatedNonRelativeUnresolvedImports = void 0;
118414
+ allResolutionsAreInvalidated = false;
118400
118415
  nonRelativeExternalModuleResolutions.forEach(watchFailedLookupLocationOfNonRelativeModuleResolutions);
118401
118416
  nonRelativeExternalModuleResolutions.clear();
118402
118417
  if (newProgram !== oldProgram) {
@@ -118491,6 +118506,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
118491
118506
  reusedNames,
118492
118507
  loader,
118493
118508
  getResolutionWithResolvedFileName,
118509
+ deferWatchingNonRelativeResolution,
118494
118510
  shouldRetryResolution,
118495
118511
  logChanges
118496
118512
  }) {
@@ -118507,15 +118523,15 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
118507
118523
  const name = loader.nameAndMode.getName(entry);
118508
118524
  const mode = loader.nameAndMode.getMode(entry, containingSourceFile);
118509
118525
  let resolution = resolutionsInFile.get(name, mode);
118510
- if (!seenNamesInFile.has(name, mode) && unmatchedRedirects || !resolution || resolution.isInvalidated || // If the name is unresolved import that was invalidated, recalculate
118511
- hasInvalidatedNonRelativeUnresolvedImport && !isExternalModuleNameRelative(name) && shouldRetryResolution(resolution)) {
118526
+ if (!seenNamesInFile.has(name, mode) && (allResolutionsAreInvalidated || unmatchedRedirects || !resolution || resolution.isInvalidated || // If the name is unresolved import that was invalidated, recalculate
118527
+ hasInvalidatedNonRelativeUnresolvedImport && !isExternalModuleNameRelative(name) && shouldRetryResolution(resolution))) {
118512
118528
  const existingResolution = resolution;
118513
118529
  resolution = loader.resolve(name, mode);
118514
118530
  if (resolutionHost.onDiscoveredSymlink && resolutionIsSymlink(resolution)) {
118515
118531
  resolutionHost.onDiscoveredSymlink();
118516
118532
  }
118517
118533
  resolutionsInFile.set(name, mode, resolution);
118518
- watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path, getResolutionWithResolvedFileName);
118534
+ watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path, getResolutionWithResolvedFileName, deferWatchingNonRelativeResolution);
118519
118535
  if (existingResolution) {
118520
118536
  stopWatchFailedLookupLocationOfResolution(existingResolution, path, getResolutionWithResolvedFileName);
118521
118537
  }
@@ -118591,7 +118607,8 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
118591
118607
  typeReferenceDirectiveResolutionCache
118592
118608
  ),
118593
118609
  getResolutionWithResolvedFileName: getResolvedTypeReferenceDirective,
118594
- shouldRetryResolution: (resolution) => resolution.resolvedTypeReferenceDirective === void 0
118610
+ shouldRetryResolution: (resolution) => resolution.resolvedTypeReferenceDirective === void 0,
118611
+ deferWatchingNonRelativeResolution: false
118595
118612
  });
118596
118613
  }
118597
118614
  function resolveModuleNameLiterals(moduleLiterals, containingFile, redirectedReference, options, containingSourceFile, reusedNames) {
@@ -118610,7 +118627,9 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
118610
118627
  ),
118611
118628
  getResolutionWithResolvedFileName: getResolvedModule2,
118612
118629
  shouldRetryResolution: (resolution) => !resolution.resolvedModule || !resolutionExtensionIsTSOrJson(resolution.resolvedModule.extension),
118613
- logChanges: logChangesWhenResolvingModule
118630
+ logChanges: logChangesWhenResolvingModule,
118631
+ deferWatchingNonRelativeResolution: true
118632
+ // Defer non relative resolution watch because we could be using ambient modules
118614
118633
  });
118615
118634
  }
118616
118635
  function resolveSingleModuleNameWithoutWatching(moduleName, containingFile) {
@@ -118628,7 +118647,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
118628
118647
  function isNodeModulesAtTypesDirectory(dirPath) {
118629
118648
  return endsWith(dirPath, "/node_modules/@types");
118630
118649
  }
118631
- function watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, filePath, getResolutionWithResolvedFileName) {
118650
+ function watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, filePath, getResolutionWithResolvedFileName, deferWatchingNonRelativeResolution) {
118632
118651
  var _a;
118633
118652
  if (resolution.refCount) {
118634
118653
  resolution.refCount++;
@@ -118636,7 +118655,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
118636
118655
  } else {
118637
118656
  resolution.refCount = 1;
118638
118657
  Debug.assert(!((_a = resolution.files) == null ? void 0 : _a.size));
118639
- if (isExternalModuleNameRelative(name)) {
118658
+ if (!deferWatchingNonRelativeResolution || isExternalModuleNameRelative(name)) {
118640
118659
  watchFailedLookupLocationOfResolution(resolution);
118641
118660
  } else {
118642
118661
  nonRelativeExternalModuleResolutions.add(name, resolution);
@@ -118916,15 +118935,34 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
118916
118935
  return false;
118917
118936
  }
118918
118937
  (failedLookupChecks || (failedLookupChecks = /* @__PURE__ */ new Set())).add(fileOrDirectoryPath);
118919
- const packagePath = parseNodeModuleFromPath(fileOrDirectoryPath);
118938
+ const packagePath = parseNodeModuleFromPath(
118939
+ fileOrDirectoryPath,
118940
+ /*isFolder*/
118941
+ true
118942
+ );
118920
118943
  if (packagePath)
118921
118944
  (startsWithPathChecks || (startsWithPathChecks = /* @__PURE__ */ new Set())).add(packagePath);
118922
118945
  }
118923
118946
  }
118924
118947
  resolutionHost.scheduleInvalidateResolutionsOfFailedLookupLocations();
118925
118948
  }
118949
+ function invalidatePackageJsonMap() {
118950
+ const packageJsonMap = moduleResolutionCache.getPackageJsonInfoCache().getInternalMap();
118951
+ if (packageJsonMap && (failedLookupChecks || startsWithPathChecks || isInDirectoryChecks)) {
118952
+ packageJsonMap.forEach((_value, path) => isInvalidatedFailedLookup(path) ? packageJsonMap.delete(path) : void 0);
118953
+ }
118954
+ }
118926
118955
  function invalidateResolutionsOfFailedLookupLocations() {
118927
118956
  var _a;
118957
+ if (allResolutionsAreInvalidated) {
118958
+ affectingPathChecksForFile = void 0;
118959
+ invalidatePackageJsonMap();
118960
+ failedLookupChecks = void 0;
118961
+ startsWithPathChecks = void 0;
118962
+ isInDirectoryChecks = void 0;
118963
+ affectingPathChecks = void 0;
118964
+ return true;
118965
+ }
118928
118966
  let invalidated = false;
118929
118967
  if (affectingPathChecksForFile) {
118930
118968
  (_a = resolutionHost.getCurrentProgram()) == null ? void 0 : _a.getSourceFiles().forEach((f) => {
@@ -118939,10 +118977,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
118939
118977
  return invalidated;
118940
118978
  }
118941
118979
  invalidated = invalidateResolutions(resolutionsWithFailedLookups, canInvalidateFailedLookupResolution) || invalidated;
118942
- const packageJsonMap = moduleResolutionCache.getPackageJsonInfoCache().getInternalMap();
118943
- if (packageJsonMap && (failedLookupChecks || startsWithPathChecks || isInDirectoryChecks)) {
118944
- packageJsonMap.forEach((_value, path) => isInvalidatedFailedLookup(path) ? packageJsonMap.delete(path) : void 0);
118945
- }
118980
+ invalidatePackageJsonMap();
118946
118981
  failedLookupChecks = void 0;
118947
118982
  startsWithPathChecks = void 0;
118948
118983
  isInDirectoryChecks = void 0;
@@ -119861,7 +119896,8 @@ function createWatchProgram(host) {
119861
119896
  if (hasChangedCompilerOptions) {
119862
119897
  newLine = updateNewLine();
119863
119898
  if (program && changesAffectModuleResolution(program.getCompilerOptions(), compilerOptions)) {
119864
- resolutionCache.clear();
119899
+ debugger;
119900
+ resolutionCache.onChangesAffectModuleResolution();
119865
119901
  }
119866
119902
  }
119867
119903
  const hasInvalidatedResolutions = resolutionCache.createHasInvalidatedResolutions(customHasInvalidatedResolutions);