Skip to content

Bump engines field of package.json in oxlint and oxfmt NPM packages #13878

@overlookmotel

Description

@overlookmotel

Currently package.json in npm/oxlint and npm/oxfmt includes:

{
  "engines": {
    "node": ">=8.*"
  },
}

This is inaccurate. NodeJS 8 does not support ESM, which these packages use internally (and #13876 will convertoxlint package to ESM entirely).

Because it's inaccurate already, I think we can consider this a bug fix, rather than a breaking change. Bumping to NodeJS versions which are not EOL I doubt would break many people.

What version?

Ideally, we'd choose minimum versions of Node which support both:

  1. require(ESM) - for lazy-loading ESM modules without async (20.19.0+ | 22.12.0+ | >= 24).
  2. TS type stripping without experimental flag - for easier support of oxlint plugins written in TS (22.18.0+ | >= 24).

But would requiring Node versions which have both these features be likely to break some users? Probably yes. NodeJS 20 is not EOL until April 2026.

I suggest:

  • We go with the versions which support require(ESM) - 20.19.0+ | 22.12.0+ | >= 24.
  • Only support oxlint plugins written in TS in 22.18.0+, or use some other package to transform TS.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions