Skip to content

Fix wotan with typescript 4.4+#789

Open
notanengineercom wants to merge 3 commits intofimbullinter:masterfrom
notanengineercom:fix-typescript-4-4
Open

Fix wotan with typescript 4.4+#789
notanengineercom wants to merge 3 commits intofimbullinter:masterfrom
notanengineercom:fix-typescript-4-4

Conversation

@notanengineercom
Copy link
Copy Markdown

@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
Copy Markdown
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