Skip to content

Test and declare Node.js 24 and 26 LTS support - #21

Merged
simonedevit merged 4 commits into
mainfrom
20-node-lts-support
Nov 28, 2026
Merged

simonedevit merged 4 commits into
mainfrom
20-node-lts-support

Conversation

@simonedevit

@simonedevit simonedevit commented Nov 28, 2026 •

Copy link
Copy Markdown
Owner

Closes #20

Summary

Reactylon already works on Node.js 24 and 26: npm ci, the Jest suite and the production build pass without code changes. The problem was the declared engines field, which makes npm print EBADENGINE warnings for contributors and for consumers installing reactylon on Node.js 24/26. This PR adds the three LTS lines to CI and broadens engines to match.

Node.js release lines today:

  • 26 is Active LTS ("Lithium", since 26.13.0).
  • 24 is Maintenance LTS ("Krypton", end of life 2028-04-30).
  • 22 is Maintenance LTS ("Jod", end of life 2027-04-30).
  • 27 is still alpha, so this PR doesn't declare it.

Changes

  • CI (test.yml, build.yml):

    • Run on a Node.js 22.x, 24.x and 26.x matrix with fail-fast: false.
    • Upgrade actions/checkout and actions/setup-node from v2 to v7. This removes the runner annotation "Node.js 20 is deprecated".
  • Required check: the branch protection rule of main requires a check named test. test.yml therefore keeps a test job that sums up the matrix: it runs with if: always() and fails if any Node.js version fails or is cancelled. The branch protection rule doesn't need to change.

  • engines of all workspace manifests and of their package-lock.json records:

    • node: ^22.11.0 || ^24.11.0 || ^26.13.0
    • npm: ^10.9.0 || ^11.6.1

    As with the existing ^22.11.0, each lower bound is the line's first LTS release with its bundled npm. A plain ^24 would also accept 24.0.0–24.2.0, where npm run build fails. Those releases expose Node's native .ts loader in require.extensions, so webpack-cli (through rechoir) doesn't register ts-node. webpack.config.ts then fails to load with SyntaxError: The requested module 'webpack' does not provide an export named 'Configuration'.

  • Library package metadata: improved description and keywords, added bugs URL and repository type, moved author.

Testing

Local runs on macOS arm64 with the official Node.js builds. Each run did npm ci, the Jest suite and the production webpack build of the library:

Node.js / npm EBADENGINE warnings Jest Production build
22.11.0 / 10.9.0 0 30/30 ✅
22.23.5 / 10.9.9 0 30/30 ✅
24.11.0 / 11.6.1 0 (7 before this change) 30/30 ✅
24.22.3 / 11.19.1 0 30/30 ✅
26.13.0 / 11.20.0 0 30/30 ✅
26.13.1 / 11.20.0 0 (7 before this change) 30/30 ✅
  • On every version above, the full npm run build of the workspaces also passed, and the generator output was unchanged. commitlint, tsc --noEmit and Prettier passed too.
  • Consumer check: I scaffolded an app from the create-reactylon-app web template (React 19, react-reconciler 0.31.0, Babylon.js 9.38.0, babel-plugin-reactylon 1.3.6) on Node.js 24.22.3 and 26.13.1.
    • The published reactylon@3.5.8 prints the EBADENGINE warning.
    • The package built from this branch prints none.
    • The app builds in both cases.
  • Dependencies: none of the 928 lockfile packages that declare engines.node excludes any of the new lower bounds.
  • Lockfile: regenerating it with npm 11.19.1 and 11.20.0 gives no diff, so contributors on Node.js 24/26 don't get lockfile churn.

The matrix in this PR covers Linux for npm ci and Jest. The build.yml matrix runs on push to main.

Notes

  • On Node.js 26 the generator (npm run build from the root) prints ExperimentalWarning: localStorage is not available because --localstorage-file was not provided. It comes from Babylon.js running in Node.js and is harmless.
  • Consumers stop seeing the warning once a new version of reactylon is published.
  • Follow-up, in a separate repository: the create-reactylon-app web template still declares "node": "^22.11.0" and "npm": "^10.9.0".

- run the test (pull requests) and build (push on main) workflows on a Node.js 22.x, 24.x and 26.x matrix
- add a "test" job summing up the matrix result, so the check required by the branch protection rule of main keeps working
- upgrade actions/checkout and actions/setup-node from v2 to v7 (actions based on Node.js 20 are deprecated on GitHub runners)
Improve description and keywords, add bugs URL and repository type, move author and drop homepage.
Broaden the "engines" field of all workspace manifests (and of their package-lock.json records) to the Node.js LTS lines.
As already done for Node.js 22, the lower bound of each line is its first LTS release with the bundled npm version:
- node: ^22.11.0 || ^24.11.0 || ^26.13.0
- npm: ^10.9.0 || ^11.6.1

The package-lock.json record of the library workspace is also synced with its current version (3.5.7 -> 3.5.8).
@sonarqubecloud

Copy link
Copy Markdown

@simonedevit
simonedevit merged commit 1822441 into main Nov 28, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Please test and declare Node.js 24 LTS support

1 participant