Skip to content

Commit

Permalink
feat: communicate with tsserver >=4.9.0 using IPC (#630)
Browse files Browse the repository at this point in the history
  • Loading branch information
rchl committed Nov 21, 2022
1 parent 0005648 commit 06abfde
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tsServer/serverProcess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import type { Readable } from 'node:stream';
import { TsServerProcess, TsServerProcessFactory, TsServerProcessKind } from './server.js';
import type { tsp } from '../ts-protocol.js';
import type { TspClientOptions } from '../tsp-client.js';
// import API from '../utils/api.js';
import API from '../utils/api.js';
import type { TypeScriptVersion } from './versionProvider.js';

export class NodeTsServerProcessFactory implements TsServerProcessFactory {
Expand All @@ -26,7 +26,7 @@ export class NodeTsServerProcessFactory implements TsServerProcessFactory {
configuration: TspClientOptions,
): TsServerProcess {
const tsServerPath = version.tsServerPath;
const useIpc = false; // version.version?.gte(API.v460);
const useIpc = version.version?.gte(API.v490);

const runtimeArgs = [...args];
if (useIpc) {
Expand Down
2 changes: 2 additions & 0 deletions src/utils/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ export default class API {
public static readonly v440 = API.fromSimpleString('4.4.0');
public static readonly v460 = API.fromSimpleString('4.6.0');
public static readonly v470 = API.fromSimpleString('4.7.0');
public static readonly v480 = API.fromSimpleString('4.8.0');
public static readonly v490 = API.fromSimpleString('4.9.0');

public static fromVersionString(versionString: string): API {
let version = semver.valid(versionString);
Expand Down

0 comments on commit 06abfde

Please sign in to comment.