@@ -1385,6 +1385,12 @@ namespace ts {
13851385 return x === undefined || x === null ;
13861386 }
13871387
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+
13881394 /**
13891395 * Parse the contents of a config file from json or json source file (tsconfig.json).
13901396 * @param json The contents of the config file to parse
@@ -1467,7 +1473,7 @@ namespace ts {
14671473 includeSpecs = [ "**/*" ] ;
14681474 }
14691475
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 ) ;
14711477
14721478 if ( result . fileNames . length === 0 && ! hasProperty ( raw , "files" ) && resolutionStack . length === 0 ) {
14731479 errors . push (
@@ -1577,7 +1583,7 @@ namespace ts {
15771583 errors . push ( createCompilerDiagnostic ( Diagnostics . Compiler_option_0_requires_a_value_of_type_1 , "extends" , "string" ) ) ;
15781584 }
15791585 else {
1580- const newBase = configFileName ? getDirectoryPath ( toPath ( configFileName , basePath , getCanonicalFileName ) ) : basePath ;
1586+ const newBase = configFileName ? directoryOfCombinedPath ( configFileName , basePath ) : basePath ;
15811587 extendedConfigPath = getExtendsConfigPath ( json . extends , host , newBase , getCanonicalFileName , errors , createCompilerDiagnostic ) ;
15821588 }
15831589 }
@@ -1610,7 +1616,7 @@ namespace ts {
16101616 onSetValidOptionKeyValueInRoot ( key : string , _keyNode : PropertyName , value : CompilerOptionsValue , valueNode : Expression ) {
16111617 switch ( key ) {
16121618 case "extends" :
1613- const newBase = configFileName ? getDirectoryPath ( toPath ( configFileName , basePath , getCanonicalFileName ) ) : basePath ;
1619+ const newBase = configFileName ? directoryOfCombinedPath ( configFileName , basePath ) : basePath ;
16141620 extendedConfigPath = getExtendsConfigPath (
16151621 < string > value ,
16161622 host ,
0 commit comments