Skip to content

Raise the minimum Node.js version to 22 #2896

Open

Description

@ymc9

Problem

ZenStack says it supports Node.js 20, but two of its dependencies require Node.js 22:

Dependency Pulled in by Required Node.js version
kysely@~0.29 @zenstackhq/orm (since at least v3.9.8) >=22.0.0
chevrotain@~12.0 (via langium@4.2.4) @zenstackhq/language, @zenstackhq/cli >=22.0.0

Meanwhile:

  • packages/cli/package.json declares "engines": { "node": ">=20" }
  • @zenstackhq/orm declares no engines field
  • the docs (Prerequisite) say "Node.js v20 or above"
  • CI only tests on Node 24.x

As a result, installing on Node 20 prints engine-mismatch warnings that our stated requirements don't account for, and installs fail outright with engine-strict=true. I haven't checked whether anything actually breaks at runtime on Node 20.

Node 20 reached end-of-life in April 2026, so raising the minimum shouldn't cost much.

Proposal

  • Set "engines": { "node": ">=22" } in packages/cli/package.json, and add it to the published runtime packages, at least orm and language
  • Update the docs prerequisite to "Node.js v22 or above"
  • Optionally, add Node 22.x to the build-test.yml matrix, so the minimum supported version is tested
  • Mention it in the release notes, since it's a change users can see

The VS Code extension's engines.node is out of scope here, because the extension runs on VS Code's bundled Node.

Found while reviewing the v3.10.0 docs PR (zenstackhq/zenstack-docs#645).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions