ava icon indicating copy to clipboard operation
ava copied to clipboard

Add support for Node 22

Open ehmicky opened this issue 9 months ago • 3 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: [email protected]
npm error notsup Not compatible with your version of node/npm: [email protected]
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: '[email protected]',
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:

https://github.com/avajs/ava/blob/ec1a8d2336e55011aaea966c2273bb86e4dafa88/package.json#L39

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

ehmicky avatar Apr 28 '24 16:04 ehmicky

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

arlac77 avatar Apr 30 '24 10:04 arlac77

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

lenovouser avatar Apr 30 '24 10:04 lenovouser

https://github.com/avajs/ava/pull/3328

lenovouser avatar Apr 30 '24 10:04 lenovouser

Thanks @lenovouser and @novemberborn!

ehmicky avatar May 05 '24 21:05 ehmicky