@@ -65,7 +65,6 @@ var path = require('path');
6565var tsconfig = require ( 'tsconfig' ) ;
6666var os = require ( 'os' ) ;
6767var detectIndent = require ( 'detect-indent' ) ;
68- var extend = require ( 'xtend' ) ;
6968var formatting = require ( './formatting' ) ;
7069var projectFileName = 'tsconfig.json' ;
7170var defaultFilesGlob = [
@@ -202,17 +201,13 @@ function getProjectSync(pathOrSrcFile) {
202201 throw new Error ( exports . errors . GET_PROJECT_FAILED_TO_OPEN_PROJECT_FILE ) ;
203202 }
204203 try {
205- projectSpec = tsconfig . parseFileSync ( projectFileTextContent , projectFile ) ;
204+ projectSpec = tsconfig . parseFileSync ( projectFileTextContent , projectFile , { resolvePaths : false } ) ;
206205 }
207206 catch ( ex ) {
208207 throw errorWithDetails ( new Error ( exports . errors . GET_PROJECT_JSON_PARSE_FAILED ) , { projectFilePath : fsu . consistentPath ( projectFile ) , error : ex . message } ) ;
209208 }
210209 if ( projectSpec . filesGlob ) {
211- var relativeProjectSpec = extend ( projectSpec , {
212- files : projectSpec . files . map ( function ( x ) { return fsu . consistentPath ( path . relative ( projectFileDirectory , x ) ) ; } ) ,
213- exclude : projectSpec . exclude . map ( function ( x ) { return fsu . consistentPath ( path . relative ( projectFileDirectory , x ) ) ; } )
214- } ) ;
215- var prettyJSONProjectSpec = prettyJSON ( relativeProjectSpec , detectIndent ( projectFileTextContent ) . indent ) ;
210+ var prettyJSONProjectSpec = prettyJSON ( projectSpec , detectIndent ( projectFileTextContent ) . indent ) ;
216211 if ( prettyJSONProjectSpec !== projectFileTextContent ) {
217212 fs . writeFileSync ( projectFile , prettyJSONProjectSpec ) ;
218213 }
@@ -235,7 +230,7 @@ function getProjectSync(pathOrSrcFile) {
235230 }
236231 var project = {
237232 compilerOptions : { } ,
238- files : projectSpec . files ,
233+ files : projectSpec . files . map ( function ( x ) { return path . resolve ( projectFileDirectory , x ) ; } ) ,
239234 filesGlob : projectSpec . filesGlob ,
240235 formatCodeOptions : formatting . makeFormatCodeOptions ( projectSpec . formatCodeOptions ) ,
241236 compileOnSave : projectSpec . compileOnSave == undefined ? true : projectSpec . compileOnSave ,
0 commit comments