@typescript-deploys/pr-build 4.7.0-pr-48784-4 → 4.7.0-pr-48784-10

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/typescript.js CHANGED
@@ -294,7 +294,7 @@ var ts;
294
294
  // The following is baselined as a literal template type without intervention
295
295
  /** The version of the TypeScript compiler release */
296
296
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
297
- ts.version = ts.versionMajorMinor + ".0-insiders.20220427";
297
+ ts.version = ts.versionMajorMinor + ".0-insiders.20220429";
298
298
  /* @internal */
299
299
  var Comparison;
300
300
  (function (Comparison) {
@@ -8476,7 +8476,7 @@ var ts;
8476
8476
  Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node12_or_nodenext: diag(1323, ts.DiagnosticCategory.Error, "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323", "Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'."),
8477
8477
  Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_or_nodenext: diag(1324, ts.DiagnosticCategory.Error, "Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_or_nodenext_1324", "Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'."),
8478
8478
  Argument_of_dynamic_import_cannot_be_spread_element: diag(1325, ts.DiagnosticCategory.Error, "Argument_of_dynamic_import_cannot_be_spread_element_1325", "Argument of dynamic import cannot be spread element."),
8479
- Dynamic_import_cannot_have_type_arguments: diag(1326, ts.DiagnosticCategory.Error, "Dynamic_import_cannot_have_type_arguments_1326", "Dynamic import cannot have type arguments."),
8479
+ This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments: diag(1326, ts.DiagnosticCategory.Error, "This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326", "This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments."),
8480
8480
  String_literal_with_double_quotes_expected: diag(1327, ts.DiagnosticCategory.Error, "String_literal_with_double_quotes_expected_1327", "String literal with double quotes expected."),
8481
8481
  Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_literal: diag(1328, ts.DiagnosticCategory.Error, "Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_li_1328", "Property value can only be string literal, numeric literal, 'true', 'false', 'null', object literal or array literal."),
8482
8482
  _0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0: diag(1329, ts.DiagnosticCategory.Error, "_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write__1329", "'{0}' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@{0}()'?"),
@@ -8863,7 +8863,6 @@ var ts;
8863
8863
  A_rest_element_cannot_have_a_property_name: diag(2566, ts.DiagnosticCategory.Error, "A_rest_element_cannot_have_a_property_name_2566", "A rest element cannot have a property name."),
8864
8864
  Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations: diag(2567, ts.DiagnosticCategory.Error, "Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations_2567", "Enum declarations can only merge with namespace or other enum declarations."),
8865
8865
  Property_0_may_not_exist_on_type_1_Did_you_mean_2: diag(2568, ts.DiagnosticCategory.Error, "Property_0_may_not_exist_on_type_1_Did_you_mean_2_2568", "Property '{0}' may not exist on type '{1}'. Did you mean '{2}'?"),
8866
- Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators: diag(2569, ts.DiagnosticCategory.Error, "Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterati_2569", "Type '{0}' is not an array type or a string type. Use compiler option '--downlevelIteration' to allow iterating of iterators."),
8867
8866
  Could_not_find_name_0_Did_you_mean_1: diag(2570, ts.DiagnosticCategory.Error, "Could_not_find_name_0_Did_you_mean_1_2570", "Could not find name '{0}'. Did you mean '{1}'?"),
8868
8867
  Object_is_of_type_unknown: diag(2571, ts.DiagnosticCategory.Error, "Object_is_of_type_unknown_2571", "Object is of type 'unknown'."),
8869
8868
  A_rest_element_type_must_be_an_array_type: diag(2574, ts.DiagnosticCategory.Error, "A_rest_element_type_must_be_an_array_type_2574", "A rest element type must be an array type."),
@@ -9551,6 +9550,7 @@ var ts;
9551
9550
  Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4: diag(6397, ts.DiagnosticCategory.Message, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6397", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."),
9552
9551
  Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_resolved: diag(6398, ts.DiagnosticCategory.Message, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_re_6398", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was not resolved."),
9553
9552
  Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_are_not_emitted: diag(6399, ts.DiagnosticCategory.Message, "Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_are_not_emitted_6399", "Project '{0}' is out of date because buildinfo file '{1}' indicates that some of the changes are not emitted"),
9553
+ Project_0_is_up_to_date_but_needs_update_to_timestamps_of_output_files_that_are_older_than_input_files: diag(6400, ts.DiagnosticCategory.Message, "Project_0_is_up_to_date_but_needs_update_to_timestamps_of_output_files_that_are_older_than_input_fil_6400", "Project '{0}' is up to date but needs update to timestamps of output files that are older than input files"),
9554
9554
  The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1: diag(6500, ts.DiagnosticCategory.Message, "The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500", "The expected type comes from property '{0}' which is declared here on type '{1}'"),
9555
9555
  The_expected_type_comes_from_this_index_signature: diag(6501, ts.DiagnosticCategory.Message, "The_expected_type_comes_from_this_index_signature_6501", "The expected type comes from this index signature."),
9556
9556
  The_expected_type_comes_from_the_return_type_of_this_signature: diag(6502, ts.DiagnosticCategory.Message, "The_expected_type_comes_from_the_return_type_of_this_signature_6502", "The expected type comes from the return type of this signature."),
@@ -82951,7 +82951,7 @@ var ts;
82951
82951
  }
82952
82952
  var yieldType = getIterationTypeOfIterable(use, 0 /* Yield */, inputType, /*errorNode*/ undefined);
82953
82953
  if (yieldType) {
82954
- return [ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators, false];
82954
+ return [ts.Diagnostics.Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher, false];
82955
82955
  }
82956
82956
  if (isES2015OrLaterIterable((_a = inputType.symbol) === null || _a === void 0 ? void 0 : _a.escapedName)) {
82957
82957
  return [ts.Diagnostics.Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher, true];
@@ -86228,7 +86228,7 @@ var ts;
86228
86228
  var symbol = getIntrinsicTagSymbol(name.parent);
86229
86229
  return symbol === unknownSymbol ? undefined : symbol;
86230
86230
  }
86231
- var result = resolveEntityName(name, meaning, /*ignoreErrors*/ false, /*dontResolveAlias*/ !isJSDoc_1, ts.getHostSignatureFromJSDoc(name));
86231
+ var result = resolveEntityName(name, meaning, /*ignoreErrors*/ false, /* dontResolveAlias */ true, ts.getHostSignatureFromJSDoc(name));
86232
86232
  if (!result && isJSDoc_1) {
86233
86233
  var container = ts.findAncestor(name, ts.or(ts.isClassLike, ts.isInterfaceDeclaration));
86234
86234
  if (container) {
@@ -88085,6 +88085,9 @@ var ts;
88085
88085
  return ts.some(types, checkGrammarExpressionWithTypeArguments);
88086
88086
  }
88087
88087
  function checkGrammarExpressionWithTypeArguments(node) {
88088
+ if (ts.isExpressionWithTypeArguments(node) && ts.isImportKeyword(node.expression) && node.typeArguments) {
88089
+ return grammarErrorOnNode(node, ts.Diagnostics.This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments);
88090
+ }
88088
88091
  return checkGrammarTypeArguments(node, node.typeArguments);
88089
88092
  }
88090
88093
  function checkGrammarClassDeclarationHeritageClauses(node) {
@@ -89026,7 +89029,7 @@ var ts;
89026
89029
  return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node12_or_nodenext);
89027
89030
  }
89028
89031
  if (node.typeArguments) {
89029
- return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_import_cannot_have_type_arguments);
89032
+ return grammarErrorOnNode(node, ts.Diagnostics.This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments);
89030
89033
  }
89031
89034
  var nodeArguments = node.arguments;
89032
89035
  if (moduleKind !== ts.ModuleKind.ESNext && moduleKind !== ts.ModuleKind.NodeNext) {
@@ -108822,6 +108825,8 @@ var ts;
108822
108825
  var varDecl = factory.createVariableDeclaration(newId, /*exclamationToken*/ undefined, resolver.createTypeOfExpression(input.expression, input, declarationEmitNodeBuilderFlags, symbolTracker), /*initializer*/ undefined);
108823
108826
  errorFallbackNode = undefined;
108824
108827
  var statement = factory.createVariableStatement(needsDeclare ? [factory.createModifier(135 /* DeclareKeyword */)] : [], factory.createVariableDeclarationList([varDecl], 2 /* Const */));
108828
+ preserveJsDoc(statement, input);
108829
+ ts.removeAllComments(input);
108825
108830
  return [statement, factory.updateExportAssignment(input, input.decorators, input.modifiers, newId)];
108826
108831
  }
108827
108832
  }
@@ -120316,6 +120321,10 @@ var ts;
120316
120321
  }
120317
120322
  return ts.filterSemanticDiagnostics(diagnostics, state.compilerOptions);
120318
120323
  }
120324
+ function isProgramBundleEmitBuildInfo(info) {
120325
+ return !!ts.outFile(info.options || {});
120326
+ }
120327
+ ts.isProgramBundleEmitBuildInfo = isProgramBundleEmitBuildInfo;
120319
120328
  /**
120320
120329
  * Gets the program information to be emitted in buildInfo so that we can use it to create new program
120321
120330
  */
@@ -120327,7 +120336,18 @@ var ts;
120327
120336
  var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(ts.getTsBuildInfoEmitOutputFilePath(state.compilerOptions), currentDirectory));
120328
120337
  state.dtsChangeTime = state.hasChangedEmitSignature ? ts.getCurrentTime(host).getTime() : state.dtsChangeTime;
120329
120338
  if (outFilePath) {
120339
+ var fileNames_1 = [];
120340
+ var fileInfos_1 = [];
120341
+ state.program.getRootFileNames().forEach(function (f) {
120342
+ var sourceFile = state.program.getSourceFile(f);
120343
+ if (!sourceFile)
120344
+ return;
120345
+ fileNames_1.push(relativeToBuildInfo(sourceFile.resolvedPath));
120346
+ fileInfos_1.push(sourceFile.version);
120347
+ });
120330
120348
  var result_15 = {
120349
+ fileNames: fileNames_1,
120350
+ fileInfos: fileInfos_1,
120331
120351
  options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions, "affectsBundleEmitBuildInfo"),
120332
120352
  outSignature: state.outSignature,
120333
120353
  dtsChangeTime: state.dtsChangeTime,
@@ -120854,43 +120874,54 @@ var ts;
120854
120874
  { version: fileInfo.version, signature: fileInfo.signature === false ? undefined : fileInfo.version, affectsGlobalScope: fileInfo.affectsGlobalScope, impliedFormat: fileInfo.impliedFormat };
120855
120875
  }
120856
120876
  ts.toBuilderStateFileInfo = toBuilderStateFileInfo;
120857
- function createBuilderProgramUsingProgramBuildInfo(programFromBuildInfo, buildInfoPath, host) {
120858
- var _a, _b, _c, _d, _e;
120877
+ function createBuilderProgramUsingProgramBuildInfo(program, buildInfoPath, host) {
120878
+ var _a, _b, _c, _d;
120859
120879
  var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));
120860
120880
  var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames());
120861
- var program = programFromBuildInfo;
120862
- var filePaths = (_a = program.fileNames) === null || _a === void 0 ? void 0 : _a.map(toPath);
120863
- var filePathsSetList = (_b = program.fileIdsList) === null || _b === void 0 ? void 0 : _b.map(function (fileIds) { return new ts.Set(fileIds.map(toFilePath)); });
120864
- var fileInfos = new ts.Map();
120865
- var emitSignatures = ((_c = program.options) === null || _c === void 0 ? void 0 : _c.composite) && !ts.outFile(program.options) ? new ts.Map() : undefined;
120866
- (_d = program.fileInfos) === null || _d === void 0 ? void 0 : _d.forEach(function (fileInfo, index) {
120867
- var path = toFilePath(index + 1);
120868
- var stateFileInfo = toBuilderStateFileInfo(fileInfo);
120869
- fileInfos.set(path, stateFileInfo);
120870
- if (emitSignatures && stateFileInfo.signature)
120871
- emitSignatures.set(path, stateFileInfo.signature);
120872
- });
120873
- (_e = program.emitSignatures) === null || _e === void 0 ? void 0 : _e.forEach(function (value) {
120874
- if (ts.isNumber(value))
120875
- emitSignatures.delete(toFilePath(value));
120876
- else
120877
- emitSignatures.set(toFilePath(value[0]), value[1]);
120878
- });
120879
- var state = {
120880
- fileInfos: fileInfos,
120881
- compilerOptions: program.options ? ts.convertToOptionsWithAbsolutePaths(program.options, toAbsolutePath) : {},
120882
- referencedMap: toManyToManyPathMap(program.referencedMap),
120883
- exportedModulesMap: toManyToManyPathMap(program.exportedModulesMap),
120884
- semanticDiagnosticsPerFile: program.semanticDiagnosticsPerFile && ts.arrayToMap(program.semanticDiagnosticsPerFile, function (value) { return toFilePath(ts.isNumber(value) ? value : value[0]); }, function (value) { return ts.isNumber(value) ? ts.emptyArray : value[1]; }),
120885
- hasReusableDiagnostic: true,
120886
- affectedFilesPendingEmit: ts.map(program.affectedFilesPendingEmit, function (value) { return toFilePath(value[0]); }),
120887
- affectedFilesPendingEmitKind: program.affectedFilesPendingEmit && ts.arrayToMap(program.affectedFilesPendingEmit, function (value) { return toFilePath(value[0]); }, function (value) { return value[1]; }),
120888
- affectedFilesPendingEmitIndex: program.affectedFilesPendingEmit && 0,
120889
- changedFilesSet: new ts.Set(ts.map(program.changeFileSet, toFilePath)),
120890
- dtsChangeTime: program.dtsChangeTime,
120891
- emitSignatures: (emitSignatures === null || emitSignatures === void 0 ? void 0 : emitSignatures.size) ? emitSignatures : undefined,
120892
- outSignature: program.outSignature,
120893
- };
120881
+ var state;
120882
+ var filePaths;
120883
+ var filePathsSetList;
120884
+ if (isProgramBundleEmitBuildInfo(program)) {
120885
+ state = {
120886
+ fileInfos: new ts.Map(),
120887
+ compilerOptions: program.options ? ts.convertToOptionsWithAbsolutePaths(program.options, toAbsolutePath) : {},
120888
+ dtsChangeTime: program.dtsChangeTime,
120889
+ outSignature: program.outSignature,
120890
+ };
120891
+ }
120892
+ else {
120893
+ filePaths = (_a = program.fileNames) === null || _a === void 0 ? void 0 : _a.map(toPath);
120894
+ filePathsSetList = (_b = program.fileIdsList) === null || _b === void 0 ? void 0 : _b.map(function (fileIds) { return new ts.Set(fileIds.map(toFilePath)); });
120895
+ var fileInfos_2 = new ts.Map();
120896
+ var emitSignatures_1 = ((_c = program.options) === null || _c === void 0 ? void 0 : _c.composite) && !ts.outFile(program.options) ? new ts.Map() : undefined;
120897
+ program.fileInfos.forEach(function (fileInfo, index) {
120898
+ var path = toFilePath(index + 1);
120899
+ var stateFileInfo = toBuilderStateFileInfo(fileInfo);
120900
+ fileInfos_2.set(path, stateFileInfo);
120901
+ if (emitSignatures_1 && stateFileInfo.signature)
120902
+ emitSignatures_1.set(path, stateFileInfo.signature);
120903
+ });
120904
+ (_d = program.emitSignatures) === null || _d === void 0 ? void 0 : _d.forEach(function (value) {
120905
+ if (ts.isNumber(value))
120906
+ emitSignatures_1.delete(toFilePath(value));
120907
+ else
120908
+ emitSignatures_1.set(toFilePath(value[0]), value[1]);
120909
+ });
120910
+ state = {
120911
+ fileInfos: fileInfos_2,
120912
+ compilerOptions: program.options ? ts.convertToOptionsWithAbsolutePaths(program.options, toAbsolutePath) : {},
120913
+ referencedMap: toManyToManyPathMap(program.referencedMap),
120914
+ exportedModulesMap: toManyToManyPathMap(program.exportedModulesMap),
120915
+ semanticDiagnosticsPerFile: program.semanticDiagnosticsPerFile && ts.arrayToMap(program.semanticDiagnosticsPerFile, function (value) { return toFilePath(ts.isNumber(value) ? value : value[0]); }, function (value) { return ts.isNumber(value) ? ts.emptyArray : value[1]; }),
120916
+ hasReusableDiagnostic: true,
120917
+ affectedFilesPendingEmit: ts.map(program.affectedFilesPendingEmit, function (value) { return toFilePath(value[0]); }),
120918
+ affectedFilesPendingEmitKind: program.affectedFilesPendingEmit && ts.arrayToMap(program.affectedFilesPendingEmit, function (value) { return toFilePath(value[0]); }, function (value) { return value[1]; }),
120919
+ affectedFilesPendingEmitIndex: program.affectedFilesPendingEmit && 0,
120920
+ changedFilesSet: new ts.Set(ts.map(program.changeFileSet, toFilePath)),
120921
+ dtsChangeTime: program.dtsChangeTime,
120922
+ emitSignatures: (emitSignatures_1 === null || emitSignatures_1 === void 0 ? void 0 : emitSignatures_1.size) ? emitSignatures_1 : undefined,
120923
+ };
120924
+ }
120894
120925
  return {
120895
120926
  getState: function () { return state; },
120896
120927
  backupEmitState: ts.noop,
@@ -120940,6 +120971,18 @@ var ts;
120940
120971
  }
120941
120972
  }
120942
120973
  ts.createBuilderProgramUsingProgramBuildInfo = createBuilderProgramUsingProgramBuildInfo;
120974
+ function getBuildInfoFileVersionMap(program, buildInfoPath, host) {
120975
+ var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));
120976
+ var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames());
120977
+ var fileInfos = new ts.Map();
120978
+ program.fileInfos.forEach(function (fileInfo, index) {
120979
+ var path = ts.toPath(program.fileNames[index], buildInfoDirectory, getCanonicalFileName);
120980
+ var version = ts.isString(fileInfo) ? fileInfo : fileInfo.version; // eslint-disable-line @typescript-eslint/no-unnecessary-type-assertion
120981
+ fileInfos.set(path, version);
120982
+ });
120983
+ return fileInfos;
120984
+ }
120985
+ ts.getBuildInfoFileVersionMap = getBuildInfoFileVersionMap;
120943
120986
  function createRedirectedBuilderProgram(getState, configFileParsingDiagnostics) {
120944
120987
  return {
120945
120988
  getState: ts.notImplemented,
@@ -123874,11 +123917,12 @@ var ts;
123874
123917
  UpToDateStatusType[UpToDateStatusType["UpstreamBlocked"] = 9] = "UpstreamBlocked";
123875
123918
  UpToDateStatusType[UpToDateStatusType["ComputingUpstream"] = 10] = "ComputingUpstream";
123876
123919
  UpToDateStatusType[UpToDateStatusType["TsVersionOutputOfDate"] = 11] = "TsVersionOutputOfDate";
123920
+ UpToDateStatusType[UpToDateStatusType["UpToDateWithInputFileText"] = 12] = "UpToDateWithInputFileText";
123877
123921
  /**
123878
123922
  * Projects with no outputs (i.e. "solution" files)
123879
123923
  */
123880
- UpToDateStatusType[UpToDateStatusType["ContainerOnly"] = 12] = "ContainerOnly";
123881
- UpToDateStatusType[UpToDateStatusType["ForceBuild"] = 13] = "ForceBuild";
123924
+ UpToDateStatusType[UpToDateStatusType["ContainerOnly"] = 13] = "ContainerOnly";
123925
+ UpToDateStatusType[UpToDateStatusType["ForceBuild"] = 14] = "ForceBuild";
123882
123926
  })(UpToDateStatusType = ts.UpToDateStatusType || (ts.UpToDateStatusType = {}));
123883
123927
  function resolveConfigFileProjectName(project) {
123884
123928
  if (ts.fileExtensionIs(project, ".json" /* Json */)) {
@@ -124705,7 +124749,7 @@ var ts;
124705
124749
  }
124706
124750
  continue;
124707
124751
  }
124708
- if (status.type === ts.UpToDateStatusType.UpToDateWithUpstreamTypes) {
124752
+ if (status.type === ts.UpToDateStatusType.UpToDateWithUpstreamTypes || status.type === ts.UpToDateStatusType.UpToDateWithInputFileText) {
124709
124753
  reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config));
124710
124754
  return createUpdateOutputFileStampsProject(state, project, projectPath, config, buildOrder);
124711
124755
  }
@@ -124919,6 +124963,8 @@ var ts;
124919
124963
  var oldestOutputFileName = "(none)";
124920
124964
  var oldestOutputFileTime = maximumDate;
124921
124965
  var buildInfoTime;
124966
+ var buildInfoProgram;
124967
+ var buildInfoVersionMap;
124922
124968
  var newestDeclarationFileContentChangedTime;
124923
124969
  if (buildInfoPath) {
124924
124970
  var buildInfoCacheEntry_1 = getBuildInfoCacheEntry(state, buildInfoPath, resolvedPath);
@@ -124951,6 +124997,7 @@ var ts;
124951
124997
  buildInfoFile: buildInfoPath
124952
124998
  };
124953
124999
  }
125000
+ buildInfoProgram = buildInfo.program;
124954
125001
  }
124955
125002
  oldestOutputFileTime = buildInfoTime;
124956
125003
  oldestOutputFileName = buildInfoPath;
@@ -124959,6 +125006,7 @@ var ts;
124959
125006
  // Check input files
124960
125007
  var newestInputFileName = undefined;
124961
125008
  var newestInputFileTime = minimumDate;
125009
+ var pseudoInputUptodate = false;
124962
125010
  // Get timestamps of input files
124963
125011
  for (var _e = 0, _f = project.fileNames; _e < _f.length; _e++) {
124964
125012
  var inputFile = _f[_e];
@@ -124971,11 +125019,25 @@ var ts;
124971
125019
  }
124972
125020
  // If an buildInfo is older than the newest input, we can stop checking
124973
125021
  if (buildInfoTime && buildInfoTime < inputTime) {
124974
- return {
124975
- type: ts.UpToDateStatusType.OutOfDateWithSelf,
124976
- outOfDateOutputFileName: buildInfoPath,
124977
- newerInputFileName: inputFile
124978
- };
125022
+ var version_3 = void 0;
125023
+ var currentVersion = void 0;
125024
+ if (buildInfoProgram) {
125025
+ // Read files and see if they are same, read is anyways cached
125026
+ if (!buildInfoVersionMap)
125027
+ buildInfoVersionMap = ts.getBuildInfoFileVersionMap(buildInfoProgram, buildInfoPath, host);
125028
+ version_3 = buildInfoVersionMap.get(toPath(state, inputFile));
125029
+ var text = version_3 ? state.readFileWithCache(inputFile) : undefined;
125030
+ currentVersion = text && (host.createHash || ts.generateDjb2Hash)(text);
125031
+ if (version_3 && version_3 === currentVersion)
125032
+ pseudoInputUptodate = true;
125033
+ }
125034
+ if (!version_3 || version_3 !== currentVersion) {
125035
+ return {
125036
+ type: ts.UpToDateStatusType.OutOfDateWithSelf,
125037
+ outOfDateOutputFileName: buildInfoPath,
125038
+ newerInputFileName: inputFile
125039
+ };
125040
+ }
124979
125041
  }
124980
125042
  if (inputTime > newestInputFileTime) {
124981
125043
  newestInputFileName = inputFile;
@@ -125080,7 +125142,11 @@ var ts;
125080
125142
  }
125081
125143
  // Up to date
125082
125144
  return {
125083
- type: pseudoUpToDate ? ts.UpToDateStatusType.UpToDateWithUpstreamTypes : ts.UpToDateStatusType.UpToDate,
125145
+ type: pseudoUpToDate ?
125146
+ ts.UpToDateStatusType.UpToDateWithUpstreamTypes :
125147
+ pseudoInputUptodate ?
125148
+ ts.UpToDateStatusType.UpToDateWithInputFileText :
125149
+ ts.UpToDateStatusType.UpToDate,
125084
125150
  newestDeclarationFileContentChangedTime: newestDeclarationFileContentChangedTime,
125085
125151
  newestInputFileTime: newestInputFileTime,
125086
125152
  newestInputFileName: newestInputFileName,
@@ -125223,6 +125289,7 @@ var ts;
125223
125289
  break;
125224
125290
  }
125225
125291
  // falls through
125292
+ case ts.UpToDateStatusType.UpToDateWithInputFileText:
125226
125293
  case ts.UpToDateStatusType.UpToDateWithUpstreamTypes:
125227
125294
  case ts.UpToDateStatusType.OutOfDateWithPrepend:
125228
125295
  if (!(buildResult & BuildResultFlags.DeclarationOutputUnchanged)) {
@@ -125413,7 +125480,7 @@ var ts;
125413
125480
  if (!state.watch || !state.lastCachedPackageJsonLookups)
125414
125481
  return;
125415
125482
  ts.mutateMap(getOrCreateValueMapFromConfigFileMap(state.allWatchedPackageJsonFiles, resolvedPath), new ts.Map(state.lastCachedPackageJsonLookups.get(resolvedPath)), {
125416
- createNewValue: function (path, _input) { return watchFile(state, path, function () { return invalidateProjectAndScheduleBuilds(state, resolvedPath, ts.ConfigFileProgramReloadLevel.Full); }, ts.PollingInterval.High, parsed === null || parsed === void 0 ? void 0 : parsed.watchOptions, ts.WatchType.PackageJson, resolved); },
125483
+ createNewValue: function (path, _input) { return watchFile(state, path, function () { return invalidateProjectAndScheduleBuilds(state, resolvedPath, ts.ConfigFileProgramReloadLevel.None); }, ts.PollingInterval.High, parsed === null || parsed === void 0 ? void 0 : parsed.watchOptions, ts.WatchType.PackageJson, resolved); },
125417
125484
  onDeleteValue: ts.closeFileWatcher,
125418
125485
  });
125419
125486
  }
@@ -125564,6 +125631,8 @@ var ts;
125564
125631
  return reportStatus(state, ts.Diagnostics.Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed, relName(state, configFileName), relName(state, status.newerProjectName));
125565
125632
  case ts.UpToDateStatusType.UpToDateWithUpstreamTypes:
125566
125633
  return reportStatus(state, ts.Diagnostics.Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies, relName(state, configFileName));
125634
+ case ts.UpToDateStatusType.UpToDateWithInputFileText:
125635
+ return reportStatus(state, ts.Diagnostics.Project_0_is_up_to_date_but_needs_update_to_timestamps_of_output_files_that_are_older_than_input_files, relName(state, configFileName));
125567
125636
  case ts.UpToDateStatusType.UpstreamOutOfDate:
125568
125637
  return reportStatus(state, ts.Diagnostics.Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date, relName(state, configFileName), relName(state, status.upstreamProjectName));
125569
125638
  case ts.UpToDateStatusType.UpstreamBlocked:
@@ -126159,6 +126228,17 @@ var ts;
126159
126228
  SymbolDisplayPartKind[SymbolDisplayPartKind["linkName"] = 23] = "linkName";
126160
126229
  SymbolDisplayPartKind[SymbolDisplayPartKind["linkText"] = 24] = "linkText";
126161
126230
  })(SymbolDisplayPartKind = ts.SymbolDisplayPartKind || (ts.SymbolDisplayPartKind = {}));
126231
+ // Do not change existing values, as they exist in telemetry.
126232
+ var CompletionInfoFlags;
126233
+ (function (CompletionInfoFlags) {
126234
+ CompletionInfoFlags[CompletionInfoFlags["None"] = 0] = "None";
126235
+ CompletionInfoFlags[CompletionInfoFlags["MayIncludeAutoImports"] = 1] = "MayIncludeAutoImports";
126236
+ CompletionInfoFlags[CompletionInfoFlags["IsImportStatementCompletion"] = 2] = "IsImportStatementCompletion";
126237
+ CompletionInfoFlags[CompletionInfoFlags["IsContinuation"] = 4] = "IsContinuation";
126238
+ CompletionInfoFlags[CompletionInfoFlags["ResolvedModuleSpecifiers"] = 8] = "ResolvedModuleSpecifiers";
126239
+ CompletionInfoFlags[CompletionInfoFlags["ResolvedModuleSpecifiersBeyondLimit"] = 16] = "ResolvedModuleSpecifiersBeyondLimit";
126240
+ CompletionInfoFlags[CompletionInfoFlags["MayIncludeMethodSnippets"] = 32] = "MayIncludeMethodSnippets";
126241
+ })(CompletionInfoFlags = ts.CompletionInfoFlags || (ts.CompletionInfoFlags = {}));
126162
126242
  var OutliningSpanKind;
126163
126243
  (function (OutliningSpanKind) {
126164
126244
  /** Single or multi-line comments */
@@ -128171,6 +128251,14 @@ var ts;
128171
128251
  return __assign(__assign({}, createModuleSpecifierResolutionHost(program, host)), { getCommonSourceDirectory: function () { return program.getCommonSourceDirectory(); } });
128172
128252
  }
128173
128253
  ts.getModuleSpecifierResolverHost = getModuleSpecifierResolverHost;
128254
+ function moduleResolutionRespectsExports(moduleResolution) {
128255
+ return moduleResolution >= ts.ModuleResolutionKind.Node12 && moduleResolution <= ts.ModuleResolutionKind.NodeNext;
128256
+ }
128257
+ ts.moduleResolutionRespectsExports = moduleResolutionRespectsExports;
128258
+ function moduleResolutionUsesNodeModules(moduleResolution) {
128259
+ return moduleResolution === ts.ModuleResolutionKind.NodeJs || moduleResolution >= ts.ModuleResolutionKind.Node12 && moduleResolution <= ts.ModuleResolutionKind.NodeNext;
128260
+ }
128261
+ ts.moduleResolutionUsesNodeModules = moduleResolutionUsesNodeModules;
128174
128262
  function makeImportIfNecessary(defaultImport, namedImports, moduleSpecifier, quotePreference) {
128175
128263
  return defaultImport || namedImports && namedImports.length ? makeImport(defaultImport, namedImports, moduleSpecifier, quotePreference) : undefined;
128176
128264
  }
@@ -129774,8 +129862,8 @@ var ts;
129774
129862
  if (from === to)
129775
129863
  return false;
129776
129864
  var cachedResult = moduleSpecifierCache === null || moduleSpecifierCache === void 0 ? void 0 : moduleSpecifierCache.get(from.path, to.path, preferences, {});
129777
- if ((cachedResult === null || cachedResult === void 0 ? void 0 : cachedResult.isAutoImportable) !== undefined) {
129778
- return cachedResult.isAutoImportable;
129865
+ if ((cachedResult === null || cachedResult === void 0 ? void 0 : cachedResult.isBlockedByPackageJsonDependencies) !== undefined) {
129866
+ return !cachedResult.isBlockedByPackageJsonDependencies;
129779
129867
  }
129780
129868
  var getCanonicalFileName = ts.hostGetCanonicalFileName(moduleSpecifierResolutionHost);
129781
129869
  var globalTypingsCache = (_a = moduleSpecifierResolutionHost.getGlobalTypingsCacheLocation) === null || _a === void 0 ? void 0 : _a.call(moduleSpecifierResolutionHost);
@@ -129789,7 +129877,7 @@ var ts;
129789
129877
  });
129790
129878
  if (packageJsonFilter) {
129791
129879
  var isAutoImportable = hasImportablePath && packageJsonFilter.allowsImportingSourceFile(to, moduleSpecifierResolutionHost);
129792
- moduleSpecifierCache === null || moduleSpecifierCache === void 0 ? void 0 : moduleSpecifierCache.setIsAutoImportable(from.path, to.path, preferences, {}, isAutoImportable);
129880
+ moduleSpecifierCache === null || moduleSpecifierCache === void 0 ? void 0 : moduleSpecifierCache.setBlockedByPackageJsonDependencies(from.path, to.path, preferences, {}, !isAutoImportable);
129793
129881
  return isAutoImportable;
129794
129882
  }
129795
129883
  return hasImportablePath;
@@ -132068,15 +132156,26 @@ var ts;
132068
132156
  var _a, _b, _c;
132069
132157
  var start = ts.timestamp();
132070
132158
  var packageJsonImportFilter = ts.createPackageJsonImportFilter(sourceFile, preferences, host);
132071
- var resolutionLimitExceeded = false;
132159
+ // Under `--moduleResolution nodenext`, we have to resolve module specifiers up front, because
132160
+ // package.json exports can mean we *can't* resolve a module specifier (that doesn't include a
132161
+ // relative path into node_modules), and we want to filter those completions out entirely.
132162
+ // Import statement completions always need specifier resolution because the module specifier is
132163
+ // part of their `insertText`, not the `codeActions` creating edits away from the cursor.
132164
+ var needsFullResolution = isForImportStatementCompletion || ts.moduleResolutionRespectsExports(ts.getEmitModuleResolutionKind(program.getCompilerOptions()));
132165
+ var skippedAny = false;
132072
132166
  var ambientCount = 0;
132073
132167
  var resolvedCount = 0;
132074
132168
  var resolvedFromCacheCount = 0;
132075
132169
  var cacheAttemptCount = 0;
132076
- var result = cb({ tryResolve: tryResolve, resolutionLimitExceeded: function () { return resolutionLimitExceeded; } });
132170
+ var result = cb({
132171
+ tryResolve: tryResolve,
132172
+ skippedAny: function () { return skippedAny; },
132173
+ resolvedAny: function () { return resolvedCount > 0; },
132174
+ resolvedBeyondLimit: function () { return resolvedCount > Completions.moduleSpecifierResolutionLimit; },
132175
+ });
132077
132176
  var hitRateMessage = cacheAttemptCount ? " (" + (resolvedFromCacheCount / cacheAttemptCount * 100).toFixed(1) + "% hit rate)" : "";
132078
132177
  (_a = host.log) === null || _a === void 0 ? void 0 : _a.call(host, logPrefix + ": resolved " + resolvedCount + " module specifiers, plus " + ambientCount + " ambient and " + resolvedFromCacheCount + " from cache" + hitRateMessage);
132079
- (_b = host.log) === null || _b === void 0 ? void 0 : _b.call(host, logPrefix + ": response is " + (resolutionLimitExceeded ? "incomplete" : "complete"));
132178
+ (_b = host.log) === null || _b === void 0 ? void 0 : _b.call(host, logPrefix + ": response is " + (skippedAny ? "incomplete" : "complete"));
132080
132179
  (_c = host.log) === null || _c === void 0 ? void 0 : _c.call(host, logPrefix + ": " + (ts.timestamp() - start));
132081
132180
  return result;
132082
132181
  function tryResolve(exportInfo, symbolName, isFromAmbientModule) {
@@ -132085,22 +132184,22 @@ var ts;
132085
132184
  if (result_1) {
132086
132185
  ambientCount++;
132087
132186
  }
132088
- return result_1;
132187
+ return result_1 || "failed";
132089
132188
  }
132090
- var shouldResolveModuleSpecifier = isForImportStatementCompletion || preferences.allowIncompleteCompletions && resolvedCount < Completions.moduleSpecifierResolutionLimit;
132189
+ var shouldResolveModuleSpecifier = needsFullResolution || preferences.allowIncompleteCompletions && resolvedCount < Completions.moduleSpecifierResolutionLimit;
132091
132190
  var shouldGetModuleSpecifierFromCache = !shouldResolveModuleSpecifier && preferences.allowIncompleteCompletions && cacheAttemptCount < Completions.moduleSpecifierResolutionCacheAttemptLimit;
132092
132191
  var result = (shouldResolveModuleSpecifier || shouldGetModuleSpecifierFromCache)
132093
132192
  ? ts.codefix.getModuleSpecifierForBestExportInfo(exportInfo, symbolName, position, isValidTypeOnlyUseSite, sourceFile, program, host, preferences, packageJsonImportFilter, shouldGetModuleSpecifierFromCache)
132094
132193
  : undefined;
132095
132194
  if (!shouldResolveModuleSpecifier && !shouldGetModuleSpecifierFromCache || shouldGetModuleSpecifierFromCache && !result) {
132096
- resolutionLimitExceeded = true;
132195
+ skippedAny = true;
132097
132196
  }
132098
132197
  resolvedCount += (result === null || result === void 0 ? void 0 : result.computedWithoutCacheCount) || 0;
132099
- resolvedFromCacheCount += exportInfo.length - resolvedCount;
132198
+ resolvedFromCacheCount += exportInfo.length - ((result === null || result === void 0 ? void 0 : result.computedWithoutCacheCount) || 0);
132100
132199
  if (shouldGetModuleSpecifierFromCache) {
132101
132200
  cacheAttemptCount++;
132102
132201
  }
132103
- return result;
132202
+ return result || (needsFullResolution ? "failed" : "skipped");
132104
132203
  }
132105
132204
  }
132106
132205
  function getCompletionsAtPosition(host, program, log, sourceFile, position, preferences, triggerCharacter, completionKind, cancellationToken, formatContext) {
@@ -132198,6 +132297,7 @@ var ts;
132198
132297
  var newEntries = resolvingModuleSpecifiers("continuePreviousIncompleteResponse", host, program, file, location.getStart(), preferences,
132199
132298
  /*isForImportStatementCompletion*/ false, ts.isValidTypeOnlyAliasUseSite(location), function (context) {
132200
132299
  var entries = ts.mapDefined(previousResponse.entries, function (entry) {
132300
+ var _a;
132201
132301
  if (!entry.hasAction || !entry.source || !entry.data || completionEntryDataIsResolved(entry.data)) {
132202
132302
  // Not an auto import or already resolved; keep as is
132203
132303
  return entry;
@@ -132209,8 +132309,12 @@ var ts;
132209
132309
  var origin = ts.Debug.checkDefined(getAutoImportSymbolFromCompletionEntryData(entry.name, entry.data, program, host)).origin;
132210
132310
  var info = exportMap.get(file.path, entry.data.exportMapKey);
132211
132311
  var result = info && context.tryResolve(info, entry.name, !ts.isExternalModuleNameRelative(ts.stripQuotes(origin.moduleSymbol.name)));
132212
- if (!result)
132312
+ if (result === "skipped")
132213
132313
  return entry;
132314
+ if (!result || result === "failed") {
132315
+ (_a = host.log) === null || _a === void 0 ? void 0 : _a.call(host, "Unexpected failure resolving auto import for '" + entry.name + "' from '" + entry.source + "'");
132316
+ return undefined;
132317
+ }
132214
132318
  var newOrigin = __assign(__assign({}, origin), { kind: 32 /* ResolvedExport */, moduleSpecifier: result.moduleSpecifier });
132215
132319
  // Mutating for performance... feels sketchy but nobody else uses the cache,
132216
132320
  // so why bother allocating a bunch of new objects?
@@ -132219,12 +132323,13 @@ var ts;
132219
132323
  entry.sourceDisplay = [ts.textPart(newOrigin.moduleSpecifier)];
132220
132324
  return entry;
132221
132325
  });
132222
- if (!context.resolutionLimitExceeded()) {
132326
+ if (!context.skippedAny()) {
132223
132327
  previousResponse.isIncomplete = undefined;
132224
132328
  }
132225
132329
  return entries;
132226
132330
  });
132227
132331
  previousResponse.entries = newEntries;
132332
+ previousResponse.flags = (previousResponse.flags || 0) | 4 /* IsContinuation */;
132228
132333
  return previousResponse;
132229
132334
  }
132230
132335
  function jsdocCompletionInfo(entries) {
@@ -132306,12 +132411,13 @@ var ts;
132306
132411
  ts.insertSorted(entries, createCompletionEntryForLiteral(sourceFile, preferences, literal), compareCompletionEntries, /*allowDuplicates*/ true);
132307
132412
  }
132308
132413
  return {
132414
+ flags: completionData.flags,
132309
132415
  isGlobalCompletion: isInSnippetScope,
132310
132416
  isIncomplete: preferences.allowIncompleteCompletions && hasUnresolvedAutoImports ? true : undefined,
132311
132417
  isMemberCompletion: isMemberCompletionKind(completionKind),
132312
132418
  isNewIdentifierLocation: isNewIdentifierLocation,
132313
132419
  optionalReplacementSpan: getOptionalReplacementSpan(location),
132314
- entries: entries
132420
+ entries: entries,
132315
132421
  };
132316
132422
  }
132317
132423
  function isUncheckedFile(sourceFile, compilerOptions) {
@@ -133368,6 +133474,7 @@ var ts;
133368
133474
  var location = ts.getTouchingPropertyName(sourceFile, position);
133369
133475
  var keywordFilters = 0 /* None */;
133370
133476
  var isNewIdentifierLocation = false;
133477
+ var flags = 0 /* None */;
133371
133478
  if (contextToken) {
133372
133479
  var importStatementCompletion = getImportStatementCompletionInfo(contextToken);
133373
133480
  isNewIdentifierLocation = importStatementCompletion.isNewIdentifierLocation;
@@ -133387,6 +133494,7 @@ var ts;
133387
133494
  // is not backward compatible with older clients, the language service defaults to disabling it, allowing newer clients
133388
133495
  // to opt in with the `includeCompletionsForImportStatements` user preference.
133389
133496
  importCompletionNode = importStatementCompletion.replacementNode;
133497
+ flags |= 2 /* IsImportStatementCompletion */;
133390
133498
  }
133391
133499
  // Bail out if this is a known invalid completion location
133392
133500
  if (!importCompletionNode && isCompletionListBlocker(contextToken)) {
@@ -133579,6 +133687,7 @@ var ts;
133579
133687
  isRightOfOpenTag: isRightOfOpenTag,
133580
133688
  importCompletionNode: importCompletionNode,
133581
133689
  hasUnresolvedAutoImports: hasUnresolvedAutoImports,
133690
+ flags: flags,
133582
133691
  };
133583
133692
  function isTagWithTypeExpression(tag) {
133584
133693
  switch (tag.kind) {
@@ -133988,6 +134097,7 @@ var ts;
133988
134097
  // Asking for completion details for an item that is not an auto-import
133989
134098
  return;
133990
134099
  }
134100
+ flags |= 1 /* MayIncludeAutoImports */;
133991
134101
  // import { type | -> token text should be blank
133992
134102
  var isAfterTypeOnlyImportSpecifierModifier = previousToken === contextToken
133993
134103
  && importCompletionNode
@@ -134018,16 +134128,36 @@ var ts;
134018
134128
  return true;
134019
134129
  return charactersFuzzyMatchInString(symbolName, lowerCaseTokenText);
134020
134130
  }, function (info, symbolName, isFromAmbientModule, exportMapKey) {
134131
+ var _a;
134021
134132
  if (detailsEntryId && !ts.some(info, function (i) { return detailsEntryId.source === ts.stripQuotes(i.moduleSymbol.name); })) {
134022
134133
  return;
134023
134134
  }
134024
- var defaultExportInfo = ts.find(info, isImportableExportInfo);
134025
- if (!defaultExportInfo) {
134135
+ // Do a relatively cheap check to bail early if all re-exports are non-importable
134136
+ // due to file location or package.json dependency filtering. For non-node12+
134137
+ // module resolution modes, getting past this point guarantees that we'll be
134138
+ // able to generate a suitable module specifier, so we can safely show a completion,
134139
+ // even if we defer computing the module specifier.
134140
+ var firstImportableExportInfo = ts.find(info, isImportableExportInfo);
134141
+ if (!firstImportableExportInfo) {
134142
+ return;
134143
+ }
134144
+ // In node12+, module specifier resolution can fail due to modules being blocked
134145
+ // by package.json `exports`. If that happens, don't show a completion item.
134146
+ // N.B. in this resolution mode we always try to resolve module specifiers here,
134147
+ // because we have to know now if it's going to fail so we can omit the completion
134148
+ // from the list.
134149
+ var result = context.tryResolve(info, symbolName, isFromAmbientModule) || {};
134150
+ if (result === "failed")
134026
134151
  return;
134152
+ // If we skipped resolving module specifiers, our selection of which ExportInfo
134153
+ // to use here is arbitrary, since the info shown in the completion list derived from
134154
+ // it should be identical regardless of which one is used. During the subsequent
134155
+ // `CompletionEntryDetails` request, we'll get all the ExportInfos again and pick
134156
+ // the best one based on the module specifier it produces.
134157
+ var exportInfo = firstImportableExportInfo, moduleSpecifier;
134158
+ if (result !== "skipped") {
134159
+ (_a = result.exportInfo, exportInfo = _a === void 0 ? firstImportableExportInfo : _a, moduleSpecifier = result.moduleSpecifier);
134027
134160
  }
134028
- // If we don't need to resolve module specifiers, we can use any re-export that is importable at all
134029
- // (We need to ensure that at least one is importable to show a completion.)
134030
- var _a = context.tryResolve(info, symbolName, isFromAmbientModule) || {}, _b = _a.exportInfo, exportInfo = _b === void 0 ? defaultExportInfo : _b, moduleSpecifier = _a.moduleSpecifier;
134031
134161
  var isDefaultExport = exportInfo.exportKind === 1 /* Default */;
134032
134162
  var symbol = isDefaultExport && ts.getLocalSymbolForExportDefault(exportInfo.symbol) || exportInfo.symbol;
134033
134163
  pushAutoImportSymbol(symbol, {
@@ -134042,7 +134172,9 @@ var ts;
134042
134172
  isFromPackageJson: exportInfo.isFromPackageJson,
134043
134173
  });
134044
134174
  });
134045
- hasUnresolvedAutoImports = context.resolutionLimitExceeded();
134175
+ hasUnresolvedAutoImports = context.skippedAny();
134176
+ flags |= context.resolvedAny() ? 8 /* ResolvedModuleSpecifiers */ : 0;
134177
+ flags |= context.resolvedBeyondLimit() ? 16 /* ResolvedModuleSpecifiersBeyondLimit */ : 0;
134046
134178
  });
134047
134179
  function isImportableExportInfo(info) {
134048
134180
  var moduleFile = ts.tryCast(info.moduleSymbol.valueDeclaration, ts.isSourceFile);
@@ -134090,6 +134222,7 @@ var ts;
134090
134222
  return;
134091
134223
  }
134092
134224
  var origin = __assign({ kind: 128 /* ObjectLiteralMethod */ }, entryProps);
134225
+ flags |= 32 /* MayIncludeMethodSnippets */;
134093
134226
  symbolToOriginInfoMap[symbols.length] = origin;
134094
134227
  symbols.push(member);
134095
134228
  });
@@ -134286,7 +134419,7 @@ var ts;
134286
134419
  // through type declaration or inference.
134287
134420
  // Also proceed if rootDeclaration is a parameter and if its containing function expression/arrow function is contextually typed -
134288
134421
  // type of parameter will flow in from the contextual type of the function
134289
- var canGetType = ts.hasInitializer(rootDeclaration) || ts.hasType(rootDeclaration) || rootDeclaration.parent.parent.kind === 244 /* ForOfStatement */;
134422
+ var canGetType = ts.hasInitializer(rootDeclaration) || !!ts.getEffectiveTypeAnnotationNode(rootDeclaration) || rootDeclaration.parent.parent.kind === 244 /* ForOfStatement */;
134290
134423
  if (!canGetType && rootDeclaration.kind === 164 /* Parameter */) {
134291
134424
  if (ts.isExpression(rootDeclaration.parent)) {
134292
134425
  canGetType = !!typeChecker.getContextualType(rootDeclaration.parent);
@@ -135561,6 +135694,8 @@ var ts;
135561
135694
  return highlightSpans(getAsyncAndAwaitOccurrences(node));
135562
135695
  case 125 /* YieldKeyword */:
135563
135696
  return highlightSpans(getYieldOccurrences(node));
135697
+ case 101 /* InKeyword */:
135698
+ return undefined;
135564
135699
  default:
135565
135700
  return ts.isModifierKind(node.kind) && (ts.isDeclaration(node.parent) || ts.isVariableStatement(node.parent))
135566
135701
  ? highlightSpans(getModifierOccurrences(node.kind, node.parent))
@@ -150329,7 +150464,7 @@ var ts;
150329
150464
  ts.Diagnostics.This_condition_will_always_return_true_since_this_0_is_always_defined.code,
150330
150465
  ts.Diagnostics.Type_0_is_not_an_array_type.code,
150331
150466
  ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type.code,
150332
- ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators.code,
150467
+ ts.Diagnostics.Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher.code,
150333
150468
  ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator.code,
150334
150469
  ts.Diagnostics.Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator.code,
150335
150470
  ts.Diagnostics.Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator.code,
@@ -153283,6 +153418,7 @@ var ts;
153283
153418
  var compilerOptions = program.getCompilerOptions();
153284
153419
  var moduleSpecifierResolutionHost = ts.createModuleSpecifierResolutionHost(program, host);
153285
153420
  var getChecker = ts.memoizeOne(function (isFromPackageJson) { return isFromPackageJson ? host.getPackageJsonAutoImportProvider().getTypeChecker() : program.getTypeChecker(); });
153421
+ var rejectNodeModulesRelativePaths = ts.moduleResolutionUsesNodeModules(ts.getEmitModuleResolutionKind(compilerOptions));
153286
153422
  var getModuleSpecifiers = fromCacheOnly
153287
153423
  ? function (moduleSymbol) { return ({ moduleSpecifiers: ts.moduleSpecifiers.tryGetModuleSpecifiersFromCache(moduleSymbol, sourceFile, moduleSpecifierResolutionHost, preferences), computedWithoutCache: false }); }
153288
153424
  : function (moduleSymbol, checker) { return ts.moduleSpecifiers.getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, sourceFile, moduleSpecifierResolutionHost, preferences); };
@@ -153293,19 +153429,19 @@ var ts;
153293
153429
  var importedSymbolHasValueMeaning = !!(exportInfo.targetFlags & 111551 /* Value */);
153294
153430
  var addAsTypeOnly = getAddAsTypeOnly(isValidTypeOnlyUseSite, /*isForNewImportDeclaration*/ true, exportInfo.symbol, exportInfo.targetFlags, checker, compilerOptions);
153295
153431
  computedWithoutCacheCount += computedWithoutCache ? 1 : 0;
153296
- return moduleSpecifiers === null || moduleSpecifiers === void 0 ? void 0 : moduleSpecifiers.map(function (moduleSpecifier) {
153297
- // `position` should only be undefined at a missing jsx namespace, in which case we shouldn't be looking for pure types.
153298
- return !importedSymbolHasValueMeaning && isJs && position !== undefined
153299
- ? { kind: 1 /* JsdocTypeImport */, moduleSpecifier: moduleSpecifier, position: position, exportInfo: exportInfo, isReExport: i > 0 }
153300
- : {
153301
- kind: 3 /* AddNew */,
153302
- moduleSpecifier: moduleSpecifier,
153303
- importKind: getImportKind(sourceFile, exportInfo.exportKind, compilerOptions),
153304
- useRequire: useRequire,
153305
- addAsTypeOnly: addAsTypeOnly,
153306
- exportInfo: exportInfo,
153307
- isReExport: i > 0,
153308
- };
153432
+ return ts.mapDefined(moduleSpecifiers, function (moduleSpecifier) {
153433
+ return rejectNodeModulesRelativePaths && ts.pathContainsNodeModules(moduleSpecifier) ? undefined :
153434
+ // `position` should only be undefined at a missing jsx namespace, in which case we shouldn't be looking for pure types.
153435
+ !importedSymbolHasValueMeaning && isJs && position !== undefined ? { kind: 1 /* JsdocTypeImport */, moduleSpecifier: moduleSpecifier, position: position, exportInfo: exportInfo, isReExport: i > 0 } :
153436
+ {
153437
+ kind: 3 /* AddNew */,
153438
+ moduleSpecifier: moduleSpecifier,
153439
+ importKind: getImportKind(sourceFile, exportInfo.exportKind, compilerOptions),
153440
+ useRequire: useRequire,
153441
+ addAsTypeOnly: addAsTypeOnly,
153442
+ exportInfo: exportInfo,
153443
+ isReExport: i > 0,
153444
+ };
153309
153445
  });
153310
153446
  });
153311
153447
  return { computedWithoutCacheCount: computedWithoutCacheCount, fixes: fixes };