Add shims for TypeScript's 'node' module resolution algorithm. The exports map is only used with the `node16` algorithm.
Write types in CommonJS, so they can be exported from ESM files. The other way around is prone to, at the very least, confusing warnings.
* Only test against TypeScript 4.7
* Move type definitions to entrypoints/
Only TS 4.7 will resolve them now, but it's cleaner.
* Use @sindresorhus/tsconfig
* Fix test TypeScript files, make compilable and lintable
* Use tsc directly, instead of tsd
* Add *.cts versions of type tests
* Reorganize type tests
* Use tsc directly, avoid npx, print actual version
Somehow `npx tsc` was pointing at an older version. Possibly the binstubs are corrupted in CI… somehow.
* Explicitly type t.teardown() functions to return a promise
This helps with the @typescript-eslint/no-misused-promises ESLint rule.
* Fix typing of plugin teardown
The returned method always returns Promise<void>. The teardown function itself may or may not return a promise. Support both to help with the @typescript-eslint/no-misused-promises ESLint rule.
* Test lockfile using npm 7.23
* Workflow updates
* Update codecov action
* Cache npm dependencies
* Simplify checkout
* Bump minimal Node.js versions
These should allow us to add features over AVA 4's lifetime using newly
available Node.js APIs.
* Update dev dependencies
* Update to TypeScript 4.4 and latest tsd
* Upgrade XO and reformat
* Update dependencies
* Rebuild lockfile
* Run XO with Node.js 16
It fails on older Node.js versions.
* Extract glob helpers that are needed in a CJS environment
* Ensure ava/plugin works in a CJS environment
Refactor and deploy some tricks so that ava/plugin is usable in a CJS environment, even if the rest of AVA's internals become ESM.
* Ensure 'ava' can be imported in a CJS environment
* Convert to ESM
* Load yargs as CJS due to strange compatibility issues
* Keep line number parsing code as CJS because it attempts to lazy-load dependencies
* Shared workers are always loaded through a dynamic import
* Shared worker filenames must now be file:// URLs, but you can provide a URL instance
* Test file paths within shared workers are now file:// URLs
* Error serialization and code excerpts now support ESM
* Title prefixes in the reporters now correctly skip all test file extensions, not just `js`
* CI: Increase delay on timeout test, mostly for Windows