avajs/ava

Add support for Node 22

ehmicky opened this issue · 4 comments

  • What you're trying to do

Use Ava with Node 22.

  • Why you can't use AVA for this

If --engine-strict is used, npm install fails with:

npm error code EBADENGINE
npm error engine Unsupported engine
npm error engine Not compatible with your version of node/npm: ava@6.1.2
npm error notsup Not compatible with your version of node/npm: ava@6.1.2
npm error notsup Required: {"node":"^18.18 || ^20.8 || ^21"}
npm error notsup Actual:   {"npm":"10.6.0","node":"v22.0.0"}

If --engine-strict is not used, the following warning is printed, but npm install does not fail:

npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: 'ava@6.1.2',
npm warn EBADENGINE   required: { node: '^18.18 || ^20.8 || ^21' },
npm warn EBADENGINE   current: { node: 'v22.0.0', npm: '10.6.0' }
npm warn EBADENGINE }
  • And maybe how you think AVA could handle this

Upgrade the following:

"node": "^18.18 || ^20.8 || ^21"

However, there might be more work required due to the breaking changes that come with Node 22.

Beside the warning I have no issues running ava on node 22.0.0 (OSX)

I just tested on a few repositories of ours and ava v6.1.2 does work flawlessly with node v22.0.0