@@ -4,22 +4,22 @@ const readline = require('readline');
4
4
5
5
class TSServer {
6
6
constructor ( ) {
7
- const tsserverPath = require . resolve ( ' typescript/ lib/ tsserver') ;
7
+ const tsserverPath = path . join ( __dirname , '..' , 'node_modules' , ' typescript' , ' lib' , ' tsserver') ;
8
8
const server = fork ( tsserverPath , [
9
9
'--logVerbosity' , 'verbose' ,
10
10
'--logFile' , path . join ( __dirname , 'log.txt' )
11
11
] , {
12
- cwd : path . join ( __dirname , '../ project-fixture' ) ,
13
- stdio : [ 'pipe' , 'pipe' , 'pipe' , 'ipc' ] ,
14
- } ) ;
12
+ cwd : path . join ( __dirname , '..' , ' project-fixture') ,
13
+ stdio : [ 'pipe' , 'pipe' , 'pipe' , 'ipc' ] ,
14
+ } ) ;
15
15
this . _exitPromise = new Promise ( ( resolve , reject ) => {
16
16
server . on ( 'exit' , code => resolve ( code ) ) ;
17
17
server . on ( 'error' , reason => reject ( reason ) ) ;
18
18
} ) ;
19
19
server . stdout . setEncoding ( 'utf-8' ) ;
20
20
readline . createInterface ( {
21
21
input : server . stdout
22
- } ) . on ( 'line' , line => {
22
+ } ) . on ( 'line' , line => {
23
23
if ( line [ 0 ] === '{' ) {
24
24
this . responses . push ( JSON . parse ( line ) ) ;
25
25
}
0 commit comments