diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 70bba6e..6d08488 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -71,10 +71,13 @@ jobs: ref: ${{ steps.tag.outputs.tag }} fetch-depth: 0 # full history needed for generated release notes + # Building the release with the oldest supported Node.js version (22) + # keeps the bundle's esbuild target maximally conservative, so the same + # single artifact stays compatible with Node.js 22, 24, and 26 hosts. - name: Setup Node.js uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: - node-version: 24 + node-version: 22 cache: npm - name: Install dependencies diff --git a/README.md b/README.md index 5e26d39..939726c 100644 --- a/README.md +++ b/README.md @@ -143,7 +143,7 @@ This section is a complete walkthrough for running the viewer as a background se ### Prerequisites - A Linux host with **systemd** (the default on Debian, Ubuntu, Raspberry Pi OS, Fedora, etc.). -- **Node.js 20 or newer** installed on the target host. Check with `node --version`. Because the server is bundled into a single `dist/server/index.cjs` file, this is the only runtime dependency — you do **not** need to run `npm install` on the target host. +- **Node.js 22 or newer** installed on the target host. Check with `node --version`. Because the server is bundled into a single `dist/server/index.cjs` file, this is the only runtime dependency — you do **not** need to run `npm install` on the target host. - The `openhab` user. On a standard openHAB installation it already exists and owns the log files. If it does not exist, create a dedicated service user: ```bash diff --git a/scripts/build.mjs b/scripts/build.mjs index 7f8a3cf..a7214ac 100644 --- a/scripts/build.mjs +++ b/scripts/build.mjs @@ -21,7 +21,7 @@ await build({ bundle: true, platform: 'node', format: 'cjs', - target: 'node20', + target: 'node22', sourcemap: true, logLevel: 'info' });