Build releases with Node.js 22 for broadest compatibility - #154
Merged
Conversation
Remove Node 22 from the CI test matrix and raise the minimum supported Node.js version to 24 across package.json engines and the documentation (README, CLAUDE.md, copilot instructions).
Build and package the release once each for Node.js 24 and Node.js 26, producing openhab-log-viewer-<tag>-node24 and -node26 archives instead of a single unversioned asset.
The server build's esbuild target was still pinned to node20 even though the minimum supported runtime is now Node.js 24. Align it so the bundle isn't down-leveled below the actually supported baseline.
scripts/build.mjs now reads the server bundle's esbuild target from ESBUILD_SERVER_TARGET (default node24). The release workflow sets it to node24/node26 for the matching build step, so each per-version package's bundle is actually targeted at the Node.js version it was built for, instead of both being capped at node24 regardless of which runtime built them.
Node 22 is still in Maintenance LTS, so there is no need to drop it. Restores engines.node, the CI matrix, and all documentation (README, CLAUDE.md, copilot-instructions.md, AGENTS.md) to the Node.js 22+ baseline, and reverts the esbuild target and dual node24/node26 release packaging back to a single build. The release workflow now builds with Node.js 22 instead of Node.js 24: building with the oldest supported runtime keeps the bundle's esbuild target maximally conservative, so the single published artifact stays compatible with Node.js 22, 24, and 26 hosts.
The README's systemd deployment prerequisite still said Node.js 20, inconsistent with the package.json engines >=22 requirement. The server bundle's esbuild target was similarly at node20. Both now match the actual documented minimum of Node.js 22.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Node.js 22 is still in Maintenance LTS, so the project keeps supporting it — the CI matrix,
package.jsonengines, and all documentation stay at Node.js 22+. The release pipeline builds with Node.js 22 instead of Node.js 24, so the single published artifact is built with the most conservative supported runtime and stays compatible with Node.js 22, 24, and 26 hosts alike.Background
This PR went through a few iterations before landing here:
-node24/-node26), with a configurable esbuild target per build.Based on that feedback, the version bump and the dual-artifact packaging were reverted, and two lingering pre-existing inconsistencies were fixed along the way (see below).
Changes
.github/workflows/release.yml: The release build now runs on Node.js 22 instead of Node.js 24 (single build, single artifact, unchanged asset naming/packaging otherwise)..github/workflows/ci.yml,package.json,README.md(test suite line),CLAUDE.md,.github/copilot-instructions.md,AGENTS.md: Reverted to their state onmain— Node.js 22+ remains the documented minimum, and the CI test matrix stays[22, 24, 26].scripts/build.mjs: esbuild server target raised fromnode20tonode22, matching the actual documented/enforced minimum (package.jsonengines.node>=22) instead of being one major version more conservative than necessary.README.md(systemd deployment prerequisites): Fixed a pre-existing inconsistency where this section said "Node.js 20 or newer" despiteenginesrequiring>=22; now says 22.Tests
No new tests added.
Validation
npm run typecheckpassesnpm run buildpassesnpm testpasses (135/135)openhab-log-viewer-<tag>.tar.gz/.zippair matching theCreate releasestep's file globs