Skip to content

Build releases with Node.js 22 for broadest compatibility - #154

Merged
LarsLaskowski merged 8 commits into
mainfrom
claude/remove-node-22-ci-8vc9ks
Jul 19, 2026
Merged

Build releases with Node.js 22 for broadest compatibility#154
LarsLaskowski merged 8 commits into
mainfrom
claude/remove-node-22-ci-8vc9ks

Conversation

@LarsLaskowski

@LarsLaskowski LarsLaskowski commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Summary

Node.js 22 is still in Maintenance LTS, so the project keeps supporting it — the CI matrix, package.json engines, 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:

  • It started as a minimum-version bump (22 → 24) with a matching CI matrix change.
  • It then grew into a release-pipeline overhaul that built and published two separate artifacts (-node24 / -node26), with a configurable esbuild target per build.
  • Review feedback pointed out that Node 22 is still in Maintenance LTS (not actually EOL) and questioned whether shipping two near-identical release artifacts was worth the added complexity.

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 on main — Node.js 22+ remains the documented minimum, and the CI test matrix stays [22, 24, 26].
  • scripts/build.mjs: esbuild server target raised from node20 to node22, matching the actual documented/enforced minimum (package.json engines.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" despite engines requiring >=22; now says 22.

Tests

No new tests added.

Validation

  • npm run typecheck passes
  • npm run build passes
  • npm test passes (135/135)
  • Verified the release workflow's YAML is valid and the packaging step still produces a single openhab-log-viewer-<tag>.tar.gz / .zip pair matching the Create release step's file globs

claude and others added 7 commits July 19, 2026 07:00
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.
@LarsLaskowski LarsLaskowski changed the title Bump minimum Node.js version to 24 Build releases with Node.js 22 for broadest compatibility Jul 19, 2026
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.
@sonarqubecloud

Copy link
Copy Markdown

@LarsLaskowski
LarsLaskowski merged commit b9e3934 into main Jul 19, 2026
10 checks passed
@LarsLaskowski
LarsLaskowski deleted the claude/remove-node-22-ci-8vc9ks branch July 19, 2026 07:38
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.

2 participants