Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Rely on recursive
fs.watch()
, rather than Chokidar. On Linux this is supported from Node.js 20 onwards. It won't work for network shares and Docker volume mounts which would require polling, we'll find out if that's a problem or not.Use
@vercel/nft
to perform static dependency analysis, supporting ESM and CJS imports for JavaScript & TypeScript source files. This is a huge improvement over the previous runtime tracking of CJS imports, which did not support ESM.Rewrite the change handling logic to be easier to follow (though it's still pretty complicated).
Improve integration with
@ava/typescript
. The watcher can now detect a change to a TypeScript source file, then wait for the corresponding build output to change before re-running tests. See avajs/typescript#46.Because this is a big change, and due to the Linux and network share implications, the previous implementation can be enabled:
You will need to manually install
chokidar
however.Tests for the previous implementation have been removed. They've been hard to maintain. We're not expecting to make any / many code changes so hopefully we'll be all right.
Other changes:
ava.config.mjs
to default watcher ignore patterns