From be77ac4a1abfc75f5763efb3b216cfedd7d96caf Mon Sep 17 00:00:00 2001 From: Wynne Pirini Date: Wed, 11 Nov 2026 15:59:44 +1300 Subject: [PATCH] chore(ci): move CI and Docker to Node 26 LTS (#244) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Node 26 is Active LTS (since 28 Oct 2026) and Node 22 is in Maintenance with EOL April 2027. CI and Docker were both on 22 while frontend/package.json pins @types/node ^26, so the type definitions described an API the build never ran on. - Dockerfile frontend-builder: node:22-alpine -> node:26-alpine, with the pinned multi-arch index digest updated to match. The tag alone would not have moved it: the base image is pinned by digest, so this would have silently kept building on Node 22. - ci.yml and audit.yml: node-version 22 -> 26. One thing the issue asked to confirm, and it did not hold: **node:26-alpine no longer bundles corepack**, so `corepack enable && corepack prepare pnpm@10.32.1` fails with "corepack: not found" (verified by running the image). pnpm is now installed with `npm install -g pnpm@10.32.1` — same pinned version, same reproducibility, no dependency on a bundled shim. @types/node stays at ^26.6.5: the lockfile already resolves 26.6.6, so the range is honest without a lockfile change. Verified: - `docker build --target frontend-builder` on node:26-alpine: pnpm 10.32.1 installs, `pnpm install --frozen-lockfile` and `pnpm build` both succeed. - `make build` (frontend build + single Go binary) succeeds. - node:26-alpine is a multi-arch OCI index with linux/amd64 and linux/arm64/v8, so the buildx matrix is unaffected. --- .github/workflows/audit.yml | 2 +- .github/workflows/ci.yml | 2 +- Dockerfile | 8 ++++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index 0a3f6190..623c2daf 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -85,7 +85,7 @@ jobs: - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: - node-version: 22 + node-version: 26 cache: pnpm cache-dependency-path: frontend/pnpm-lock.yaml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e71cbc01..d08bbd87 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -81,7 +81,7 @@ jobs: - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: - node-version: 22 + node-version: 26 cache: pnpm cache-dependency-path: frontend/pnpm-lock.yaml diff --git a/Dockerfile b/Dockerfile index 14875536..e314791b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,11 +9,15 @@ # identical for every architecture. Without this pin a multi-arch build (buildx: # linux/amd64,linux/arm64) runs pnpm install and pnpm build a second time under QEMU # for arm64, which is slow and occasionally hangs for hours. -FROM --platform=$BUILDPLATFORM node:22-alpine@sha256:fe4f6d74e20370acb04ad889077d14d0f64a9c8ea6a42bc60cddf1e844699914 AS frontend-builder +FROM --platform=$BUILDPLATFORM node:26-alpine@sha256:8996bb5821d62a8fd9bb27c1cb07462f3fdce6e47d640c6a881ead0b064ce216 AS frontend-builder # Pin pnpm to the version in package.json's `packageManager` field (not @latest) # so CI builds are reproducible and match the committed lockfile. -RUN corepack enable && corepack prepare pnpm@10.32.1 --activate +# +# Installed with npm, not corepack: Node 25+ no longer bundles corepack, so +# `corepack enable` fails on node:26-alpine with "corepack: not found". Installing +# the pinned version directly keeps the same guarantee without that dependency. +RUN npm install -g pnpm@10.32.1 WORKDIR /app