Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wotan with typescript 4.4+ #789

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

notanengineercom
Copy link

@notanengineercom notanengineercom commented Nov 10, 2021

Checklist

  • Fixes: TypeError: directoryExists is not a function
  • 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)

@notanengineercom
Copy link
Author

@ajafff a little ping 🙈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant