@@ -32,7 +32,6 @@ export class TypeScriptService implements ITypeScriptService {
3232 private $logger : ILogger ,
3333 private $npmService : INpmService ,
3434 private $options : IOptions ,
35- private $projectConstants : Project . IConstants ,
3635 private $processService : IProcessService ,
3736 private $errors : IErrors ) { }
3837
@@ -95,7 +94,7 @@ export class TypeScriptService implements ITypeScriptService {
9594 }
9695
9796 private getPathToTsConfigFile ( projectDir : string ) : string {
98- return path . join ( projectDir , this . $projectConstants . TSCONFIG_JSON_NAME ) ;
97+ return projectDir ;
9998 }
10099
101100 private getCompilerOptions ( projectDir : string , options : ITypeScriptTranspileOptions ) : ITypeScriptCompilerOptions {
@@ -140,7 +139,7 @@ export class TypeScriptService implements ITypeScriptService {
140139 const typeScriptInProjectsNodeModulesDir = path . join ( projectDir , typeScriptInNodeModulesDir ) ;
141140 let typeScriptCompilerVersion : string ;
142141 if ( this . $fs . exists ( typeScriptInProjectsNodeModulesDir ) ) {
143- typeScriptCompilerVersion = this . $fs . readJson ( path . join ( typeScriptInProjectsNodeModulesDir , this . $projectConstants . PACKAGE_JSON_NAME ) ) . version ;
142+ typeScriptCompilerVersion = this . $fs . readJson ( path . join ( typeScriptInProjectsNodeModulesDir , "package.json" ) ) . version ;
144143 if ( gte ( typeScriptCompilerVersion , TypeScriptService . DEFAULT_TSC_VERSION ) ) {
145144 this . typeScriptModuleFilePath = typeScriptInProjectsNodeModulesDir ;
146145 } else {
@@ -167,7 +166,7 @@ export class TypeScriptService implements ITypeScriptService {
167166 }
168167
169168 const typeScriptCompilerPath = path . join ( this . typeScriptModuleFilePath , "lib" , "tsc" ) ;
170- typeScriptCompilerVersion = typeScriptCompilerVersion || this . $fs . readJson ( path . join ( this . typeScriptModuleFilePath , this . $projectConstants . PACKAGE_JSON_NAME ) ) . version ;
169+ typeScriptCompilerVersion = typeScriptCompilerVersion || this . $fs . readJson ( path . join ( this . typeScriptModuleFilePath , "package.json" ) ) . version ;
171170
172171 return { pathToCompiler : typeScriptCompilerPath , version : typeScriptCompilerVersion } ;
173172 }
@@ -244,7 +243,7 @@ export class TypeScriptService implements ITypeScriptService {
244243
245244 private createTempDirectoryForTsc ( ) : string {
246245 const tempDir = temp . mkdirSync ( `typescript-compiler-${ TypeScriptService . DEFAULT_TSC_VERSION } ` ) ;
247- this . $fs . writeJson ( path . join ( tempDir , this . $projectConstants . PACKAGE_JSON_NAME ) , { name : "tsc-container" , version : "1.0.0" } ) ;
246+ this . $fs . writeJson ( path . join ( tempDir , "package.json" ) , { name : "tsc-container" , version : "1.0.0" } ) ;
248247 return tempDir ;
249248 }
250249}
0 commit comments