Merged
Conversation
ef3c72e to
426ac22
Compare
c8317d7 to
31f0bcf
Compare
* Remove undocumented ability to start watch mode via the config. Require the CLI flag instead * Watch mode is no longer 'relatively new' * Add ava.config.mjs to default watcher ignore patterns * Ignore changes to failed-tests file in watcher Logger cleanup: * Remove obsolete clearLogOnNextRun option * Track firstRun for reporter
Restrict @ava/typescript to the ava-3.2 protocol, since the legacy code is not compatible with the ava-6 protocol. Remove brittle tests for the legacy code.
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. (For now, the previous implementation is still available.) 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.
* Run tests on macOS * Use Bash shell * Run watch mode test separately and serially
31f0bcf to
5884860
Compare
This was referenced Jul 2, 2023
Closed
This was referenced Jun 20, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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/nftto 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
chokidarhowever.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.mjsto default watcher ignore patterns