mirror of
https://github.com/Joulenap/joulenap.git
synced 2026-08-11 13:21:43 +02:00
* fix(docker): build the SPA on node 24 to match CI The frontend CI job runs on node 24 (npm 11) while the image built the SPA on node:22-slim (npm 10). The two npm majors disagree on whether a violated *optional* peer dependency is fatal: npm 11 warns, npm 10 fails with ERESOLVE. So `npm ci` could pass every CI job and still fail `docker build` on the very same lockfile — which is exactly what happened on the typescript 7 PR, where i18next declares `peerOptional typescript@"^5 || ^6"`. CI was green; the image build was not. Align the build stage to node:24-slim so CI validates the same toolchain the shipped image uses. Vite 8 requires node >=22.12, so 24 is in range. Note this makes the image build as lenient as CI: a violated optional peer no longer stops the build. That is the correct trade — the two environments agreeing matters more than one of them tripping on type-only metadata — but it does remove the tripwire that surfaced the typescript 7 conflict. * ci: fail on node major drift between Dockerfile and ci.yml The Dockerfile now carries a "keep this in sync with ci.yml" comment, and comments drift. Assert it instead: parse the node major from the SPA build stage and from node-version, and fail the build when they disagree. Verified the guard actually fails, not just passes: drift (22 vs 24) errors, a ci.yml declaring two different majors errors, and an unparseable Dockerfile errors with an explanation rather than dying silently under `set -e`.