@@ -1673,13 +1673,13 @@ namespace ts {
16731673 const files = map (
16741674 filter (
16751675 configParseResult . fileNames ,
1676- ! configParseResult . configFileSpecs ? _ => false : matchesSpecs (
1676+ ( ! configParseResult . configFileSpecs || ! configParseResult . configFileSpecs . validatedIncludeSpecs ) ? _ => true : matchesSpecs (
16771677 configFileName ,
16781678 configParseResult . configFileSpecs . validatedIncludeSpecs ,
16791679 configParseResult . configFileSpecs . validatedExcludeSpecs
16801680 )
16811681 ) ,
1682- f => getRelativePathFromFile ( getNormalizedAbsolutePath ( configFileName , host . getCurrentDirectory ( ) ) , f , getCanonicalFileName )
1682+ f => getRelativePathFromFile ( getNormalizedAbsolutePath ( configFileName , host . getCurrentDirectory ( ) ) , getNormalizedAbsolutePath ( f , host . getCurrentDirectory ( ) ) , getCanonicalFileName )
16831683 ) ;
16841684 const optionMap = serializeCompilerOptions ( configParseResult . options , { configFilePath : getNormalizedAbsolutePath ( configFileName , host . getCurrentDirectory ( ) ) , useCaseSensitiveFileNames : host . useCaseSensitiveFileNames } ) ;
16851685 const config = {
@@ -1713,20 +1713,20 @@ namespace ts {
17131713 }
17141714
17151715 function matchesSpecs ( path : string , includeSpecs : ReadonlyArray < string > | undefined , excludeSpecs : ReadonlyArray < string > | undefined ) : ( path : string ) => boolean {
1716- if ( ! includeSpecs ) return _ => false ;
1716+ if ( ! includeSpecs ) return _ => true ;
17171717 const patterns = getFileMatcherPatterns ( path , excludeSpecs , includeSpecs , sys . useCaseSensitiveFileNames , sys . getCurrentDirectory ( ) ) ;
17181718 const excludeRe = patterns . excludePattern && getRegexFromPattern ( patterns . excludePattern , sys . useCaseSensitiveFileNames ) ;
17191719 const includeRe = patterns . includeFilePattern && getRegexFromPattern ( patterns . includeFilePattern , sys . useCaseSensitiveFileNames ) ;
17201720 if ( includeRe ) {
17211721 if ( excludeRe ) {
1722- return path => includeRe . test ( path ) && ! excludeRe . test ( path ) ;
1722+ return path => ! ( includeRe . test ( path ) && ! excludeRe . test ( path ) ) ;
17231723 }
1724- return path => includeRe . test ( path ) ;
1724+ return path => ! includeRe . test ( path ) ;
17251725 }
17261726 if ( excludeRe ) {
1727- return path => ! excludeRe . test ( path ) ;
1727+ return path => excludeRe . test ( path ) ;
17281728 }
1729- return _ => false ;
1729+ return _ => true ;
17301730 }
17311731
17321732 function getCustomTypeMapOfCommandLineOption ( optionDefinition : CommandLineOption ) : Map < string | number > | undefined {
0 commit comments