Skip to content

Add support for Node 22 #3327

@ehmicky

Description

@ehmicky
  • 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions