wotan
wotan copied to clipboard
Fix wotan with typescript 4.4+
Checklist
- [X] Fixes:
TypeError: directoryExists is not a function
- [X] Added or updated tests / baselines
Overview of change
Typescript 4.4+ added a new required parameter called directoryExists to their matchFiles utility function. See here
When using wotan in a project using typescript >= 4.4 the following exception would be thrown
> wotan -c tslint.json -p tsconfig.json "private/**/*.ts"
TypeError: directoryExists is not a function
at Object.matchFiles (/runner/node_modules/typescript/lib/typescript.js:20102:17)
at ProjectHost.readDirectory (/runner/node_modules/@fimbul/wotan/src/project-host.js:42:19)
at Object.readDirectory (/runner/node_modules/@fimbul/wotan/src/project-host.js:28:85)
at getFileNamesFromConfigSpecs (/runner/node_modules/typescript/lib/typescript.js:40747:40)
at getFileNames (/runner/node_modules/typescript/lib/typescript.js:40250:29)
at parseJsonConfigFileContentWorker (/runner/node_modules/typescript/lib/typescript.js:40183:24)
at Object.parseJsonSourceFileConfigFileContent (/runner/node_modules/typescript/lib/typescript.js:40135:16)
at ProjectHost.parseConfigFile (/runner/node_modules/@fimbul/wotan/src/project-host.js:225:19)
at Object.resolveCachedResult (/runner/node_modules/@fimbul/wotan/src/utils.js:25:18)
at ProjectHost.getParsedCommandLine (/runner/node_modules/@fimbul/wotan/src/project-host.js:217:24)
@ajafff a little ping 🙈