Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Node.js 20 to CI matrix #714

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
fail-fast: false
matrix:
node-version:
- 19
- 20
- 18
- 16
steps:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"yarn": ">=1.7.0"
},
"scripts": {
"test": "xo && ava"
"test": "xo && node script/test-ava.js"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That wouldn't work on Windows though.

},
"files": [
"source"
Expand Down
13 changes: 13 additions & 0 deletions script/test-ava.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// TODO: remove when avajs/ava#3213 lands

import process from 'node:process';
import semver from 'semver';
import {$} from 'execa';

const $$ = $({stdio: 'inherit'});

if (semver.major(process.version) === 20) {
process.env.NODE_OPTIONS = '--loader=esmock --no-warnings=ExperimentalWarning';
}

await $$`ava`;
Loading