Closed ericcornelissen closed 1 year ago
I did a little bit more digging after also observing this issue in one of my other projects, here's what I found.
For some reason, the line
is sometimes receiving file paths for .js
files in the TypeScript source directory that should instead be in the TypeScript output directory, for example:
// actual
fileName=".../packages/benchmarking/src/index.js"
// expected(?)
fileName=".../packages/benchmarking/build/index.js"
it makes sense that this results in this.fs.getFile(fileName)
evaluating to undefined
and hence the lookup for modifiedTime
failing.
As far as I'm able to tell this simply doesn't happen with TypeScript v4.7.4...
Thanks for the clear issue. Apparently, TS 4.8 calls getModifiedTime
before validating the file actually exists. This is a quick fix, as it allows undefined
as the return value.
Summary
The
@stryker-mutator/typescript-checker
package (at v6.1.2) does not seem to work when combined with TypeScript v4.8.2. After upgrading from TypeScript v4.7.4, Stryker stopped working with the errorTypeError: Cannot read properties of undefined (reading 'modifiedTime')
originating from the typescript-checker plugin (see also thestryker.log
at the end of this issue).Stryker config
Test runner config
Stryker environment
Test runner environment
Your Environment
Add stryker.log