mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-20 00:28:52 +01:00
Use pervious crashed TS Server version to check if user was on old TS version (#173620)
Use pervious crashed version to check if user was on old TS version Fixes #133818
This commit is contained in:
@@ -652,14 +652,20 @@ export default class TypeScriptServiceClient extends Disposable implements IType
|
||||
if (item === reportIssueItem) {
|
||||
const minModernTsVersion = this.versionProvider.bundledVersion.apiVersion;
|
||||
|
||||
if (minModernTsVersion && this.apiVersion.lt(minModernTsVersion)) {
|
||||
if (
|
||||
minModernTsVersion &&
|
||||
previousState.type === ServerState.Type.Errored &&
|
||||
previousState.error instanceof TypeScriptServerError &&
|
||||
previousState.error.version.apiVersion?.lt(minModernTsVersion)
|
||||
) {
|
||||
vscode.window.showWarningMessage(
|
||||
vscode.l10n.t("Please update your TypeScript version"),
|
||||
{
|
||||
modal: true,
|
||||
detail: vscode.l10n.t(
|
||||
"The workspace is using an old version of TypeScript ({0}).\n\nBefore reporting an issue, please update the workspace to use the latest stable TypeScript release to make sure the bug has not already been fixed.",
|
||||
(previousState.type === ServerState.Type.Errored && previousState.error instanceof TypeScriptServerError ? previousState.error.version.apiVersion?.displayName : undefined) + ''),
|
||||
"The workspace is using an old version of TypeScript ({0}).\n\nBefore reporting an issue, please update the workspace to use TypeScript {1} or newer to make sure the bug has not already been fixed.",
|
||||
previousState.error.version.apiVersion.displayName,
|
||||
minModernTsVersion.displayName),
|
||||
});
|
||||
} else {
|
||||
const args = previousState.type === ServerState.Type.Errored && previousState.error instanceof TypeScriptServerError
|
||||
|
||||
Reference in New Issue
Block a user