@@ -1385,6 +1385,12 @@ namespace ts {
1385
1385
return x === undefined || x === null ;
1386
1386
}
1387
1387
1388
+ function directoryOfCombinedPath ( fileName : string , basePath : string ) {
1389
+ // Use the `identity` function to avoid canonicalizing the path, as it must remain noncanonical
1390
+ // until consistient casing errors are reported
1391
+ return getDirectoryPath ( toPath ( fileName , basePath , identity ) ) ;
1392
+ }
1393
+
1388
1394
/**
1389
1395
* Parse the contents of a config file from json or json source file (tsconfig.json).
1390
1396
* @param json The contents of the config file to parse
@@ -1467,7 +1473,7 @@ namespace ts {
1467
1473
includeSpecs = [ "**/*" ] ;
1468
1474
}
1469
1475
1470
- const result = matchFileNames ( fileNames , includeSpecs , excludeSpecs , configFileName ? getDirectoryPath ( toPath ( configFileName , basePath , createGetCanonicalFileName ( host . useCaseSensitiveFileNames ) ) ) : basePath , options , host , errors , extraFileExtensions , sourceFile ) ;
1476
+ const result = matchFileNames ( fileNames , includeSpecs , excludeSpecs , configFileName ? directoryOfCombinedPath ( configFileName , basePath ) : basePath , options , host , errors , extraFileExtensions , sourceFile ) ;
1471
1477
1472
1478
if ( result . fileNames . length === 0 && ! hasProperty ( raw , "files" ) && resolutionStack . length === 0 ) {
1473
1479
errors . push (
@@ -1577,7 +1583,7 @@ namespace ts {
1577
1583
errors . push ( createCompilerDiagnostic ( Diagnostics . Compiler_option_0_requires_a_value_of_type_1 , "extends" , "string" ) ) ;
1578
1584
}
1579
1585
else {
1580
- const newBase = configFileName ? getDirectoryPath ( toPath ( configFileName , basePath , getCanonicalFileName ) ) : basePath ;
1586
+ const newBase = configFileName ? directoryOfCombinedPath ( configFileName , basePath ) : basePath ;
1581
1587
extendedConfigPath = getExtendsConfigPath ( json . extends , host , newBase , getCanonicalFileName , errors , createCompilerDiagnostic ) ;
1582
1588
}
1583
1589
}
@@ -1610,7 +1616,7 @@ namespace ts {
1610
1616
onSetValidOptionKeyValueInRoot ( key : string , _keyNode : PropertyName , value : CompilerOptionsValue , valueNode : Expression ) {
1611
1617
switch ( key ) {
1612
1618
case "extends" :
1613
- const newBase = configFileName ? getDirectoryPath ( toPath ( configFileName , basePath , getCanonicalFileName ) ) : basePath ;
1619
+ const newBase = configFileName ? directoryOfCombinedPath ( configFileName , basePath ) : basePath ;
1614
1620
extendedConfigPath = getExtendsConfigPath (
1615
1621
< string > value ,
1616
1622
host ,
0 commit comments