@@ -1825,7 +1825,8 @@ namespace ts {
1825
1825
const options = extend ( existingOptions , parsedConfig . options || { } ) ;
1826
1826
options . configFilePath = configFileName && normalizeSlashes ( configFileName ) ;
1827
1827
setConfigFileInOptions ( options , sourceFile ) ;
1828
- const { fileNames, wildcardDirectories, spec, projectReferences } = getFileNames ( ) ;
1828
+ let projectReferences : ProjectReference [ ] | undefined ;
1829
+ const { fileNames, wildcardDirectories, spec } = getFileNames ( ) ;
1829
1830
return {
1830
1831
options,
1831
1832
fileNames,
@@ -1904,21 +1905,19 @@ namespace ts {
1904
1905
1905
1906
if ( hasProperty ( raw , "references" ) && ! isNullOrUndefined ( raw . references ) ) {
1906
1907
if ( isArray ( raw . references ) ) {
1907
- const references : ProjectReference [ ] = [ ] ;
1908
1908
for ( const ref of raw . references ) {
1909
1909
if ( typeof ref . path !== "string" ) {
1910
1910
createCompilerDiagnosticOnlyIfJson ( Diagnostics . Compiler_option_0_requires_a_value_of_type_1 , "reference.path" , "string" ) ;
1911
1911
}
1912
1912
else {
1913
- references . push ( {
1913
+ ( projectReferences || ( projectReferences = [ ] ) ) . push ( {
1914
1914
path : getNormalizedAbsolutePath ( ref . path , basePath ) ,
1915
1915
originalPath : ref . path ,
1916
1916
prepend : ref . prepend ,
1917
1917
circular : ref . circular
1918
1918
} ) ;
1919
1919
}
1920
1920
}
1921
- result . projectReferences = references ;
1922
1921
}
1923
1922
else {
1924
1923
createCompilerDiagnosticOnlyIfJson ( Diagnostics . Compiler_option_0_requires_a_value_of_type_1 , "references" , "Array" ) ;
@@ -2407,7 +2406,7 @@ namespace ts {
2407
2406
// new entries in these paths.
2408
2407
const wildcardDirectories = getWildcardDirectories ( validatedIncludeSpecs , validatedExcludeSpecs , basePath , host . useCaseSensitiveFileNames ) ;
2409
2408
2410
- const spec : ConfigFileSpecs = { filesSpecs, referencesSpecs : undefined , includeSpecs, excludeSpecs, validatedIncludeSpecs, validatedExcludeSpecs, wildcardDirectories } ;
2409
+ const spec : ConfigFileSpecs = { filesSpecs, includeSpecs, excludeSpecs, validatedIncludeSpecs, validatedExcludeSpecs, wildcardDirectories } ;
2411
2410
return getFileNamesFromConfigSpecs ( spec , basePath , options , host , extraFileExtensions ) ;
2412
2411
}
2413
2412
@@ -2478,16 +2477,9 @@ namespace ts {
2478
2477
2479
2478
const literalFiles = arrayFrom ( literalFileMap . values ( ) ) ;
2480
2479
const wildcardFiles = arrayFrom ( wildcardFileMap . values ( ) ) ;
2481
- const projectReferences = spec . referencesSpecs && spec . referencesSpecs . map ( ( r ) : ProjectReference => {
2482
- return {
2483
- ...r ,
2484
- path : getNormalizedAbsolutePath ( r . path , basePath )
2485
- } ;
2486
- } ) ;
2487
2480
2488
2481
return {
2489
2482
fileNames : literalFiles . concat ( wildcardFiles ) ,
2490
- projectReferences,
2491
2483
wildcardDirectories,
2492
2484
spec
2493
2485
} ;
0 commit comments