Skip to content

Support Node.js 24 and 26 LTS and upgrade webpack-dev-server to v6 - #2

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

simonedevit merged 2 commits into
mainfrom
node-lts-support

Conversation

@simonedevit

Copy link
Copy Markdown
Owner

Summary

The web template declares "node": "^22.11.0", so every app scaffolded on Node.js 24 or 26 gets an EBADENGINE warning for its own package.json. This PR aligns the template with the Node.js LTS lines supported by Reactylon (simonedevit/reactylon#20). It also removes a vulnerable dependency chain from every generated app.

Changes

  • engines of the web template:
    • node: ^22.15.0 || ^24.11.0 || ^26.13.0
    • npm: ^10.9.0 || ^11.6.1
  • webpack-dev-server ^6.1.0 (was ^5.0.4). v6 no longer depends on sockjs, which brought the vulnerable uuid 8 (GHSA-w5hq-g745-h8pq) into every new app.
    • webpack-dev-server 6 requires Node.js >= 22.15.0, so the minimum of the 22 line is 22.15.0 instead of 22.11.0.
    • It also requires webpack >= 5.101.0, so the template now declares webpack ^5.101.0.
    • It works with the existing webpack-cli 5 and the template's npm start script, with no configuration change.

The native template is unchanged: its package.json comes from the React Native CLI.

Testing

On Node.js 22.15.0, 24.11.0, 24.22.3, 26.13.0 and 26.13.1, I scaffolded an app with the CLI from this branch. On every version these passed:

  • npm install
  • npm run build
  • npm start, with an HTTP check of the served page

The generated app no longer warns about its own engines. On Node.js 24/26, npm still warns about reactylon@3.5.8; that warning goes away with the next Reactylon release, which includes simonedevit/reactylon#21.

npm audit on a new app goes from 5 to 2 moderate findings. Both come from fork-ts-checker-webpack-plugin 9.2.0 (the latest release), which depends on minimatch 9 (GHSA-g3hv-75wg-m249).

  • The DoS needs attacker-controlled glob patterns, and the plugin only matches the patterns from its own configuration.
  • The fix will come with fork-ts-checker-webpack-plugin 10, which is still in alpha and requires TypeScript 7.
  • I didn't add overrides to the template, to avoid pinning versions inside users' projects.

Broaden the "engines" field of the web template to the Node.js LTS lines (from the first LTS release of each line, with its bundled npm),
in line with Reactylon (simonedevit/reactylon#20): node ^22.11.0 || ^24.11.0 || ^26.13.0, npm ^10.9.0 || ^11.6.1.
webpack-dev-server 6 no longer depends on sockjs, which brought the vulnerable uuid 8 (GHSA-w5hq-g745-h8pq) into every generated app.
It requires Node.js >= 22.15.0 and webpack >= 5.101.0, so the template now declares node ^22.15.0 || ^24.11.0 || ^26.13.0 and webpack ^5.101.0.
@simonedevit
simonedevit merged commit 94e57f4 into main Nov 28, 2026
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.

1 participant