@@ -65,7 +65,6 @@ var path = require('path');
65
65
var tsconfig = require ( 'tsconfig' ) ;
66
66
var os = require ( 'os' ) ;
67
67
var detectIndent = require ( 'detect-indent' ) ;
68
- var extend = require ( 'xtend' ) ;
69
68
var formatting = require ( './formatting' ) ;
70
69
var projectFileName = 'tsconfig.json' ;
71
70
var defaultFilesGlob = [
@@ -202,17 +201,13 @@ function getProjectSync(pathOrSrcFile) {
202
201
throw new Error ( exports . errors . GET_PROJECT_FAILED_TO_OPEN_PROJECT_FILE ) ;
203
202
}
204
203
try {
205
- projectSpec = tsconfig . parseFileSync ( projectFileTextContent , projectFile ) ;
204
+ projectSpec = tsconfig . parseFileSync ( projectFileTextContent , projectFile , { resolvePaths : false } ) ;
206
205
}
207
206
catch ( ex ) {
208
207
throw errorWithDetails ( new Error ( exports . errors . GET_PROJECT_JSON_PARSE_FAILED ) , { projectFilePath : fsu . consistentPath ( projectFile ) , error : ex . message } ) ;
209
208
}
210
209
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 ) ;
216
211
if ( prettyJSONProjectSpec !== projectFileTextContent ) {
217
212
fs . writeFileSync ( projectFile , prettyJSONProjectSpec ) ;
218
213
}
@@ -235,7 +230,7 @@ function getProjectSync(pathOrSrcFile) {
235
230
}
236
231
var project = {
237
232
compilerOptions : { } ,
238
- files : projectSpec . files ,
233
+ files : projectSpec . files . map ( function ( x ) { return path . resolve ( projectFileDirectory , x ) ; } ) ,
239
234
filesGlob : projectSpec . filesGlob ,
240
235
formatCodeOptions : formatting . makeFormatCodeOptions ( projectSpec . formatCodeOptions ) ,
241
236
compileOnSave : projectSpec . compileOnSave == undefined ? true : projectSpec . compileOnSave ,
0 commit comments