From 399055bcb044ad282e7522e53cf5d525668f4506 Mon Sep 17 00:00:00 2001 From: Sven Rieseler <243339203+ChargingCrystal@users.noreply.github.com> Date: Thu, 26 Nov 2026 13:51:20 +0100 Subject: [PATCH 1/2] test: require CI and Vercel to use the same Node major --- tests/node-version.test.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/node-version.test.ts diff --git a/tests/node-version.test.ts b/tests/node-version.test.ts new file mode 100644 index 0000000..5b1a5ec --- /dev/null +++ b/tests/node-version.test.ts @@ -0,0 +1,12 @@ +import { readFileSync } from 'node:fs' +import { expect, test } from 'vitest' + +test('runs CI on the Node major documented for Vercel', () => { + const workflow = readFileSync(new URL('../.github/workflows/ci.yml', import.meta.url), 'utf8') + const deploymentGuide = readFileSync(new URL('../docs/DEPLOY.md', import.meta.url), 'utf8') + const ciMajor = workflow.match(/^\s+node-version:\s*['"]?(\d+)/m)?.[1] + const vercelMajor = deploymentGuide.match(/\*\*Node\.js Version\*\* is \*\*(\d+)\.x\*\*/)?.[1] + + expect(vercelMajor).toBeDefined() + expect(ciMajor).toBe(vercelMajor) +}) From 85aa6c610f4b90abbc555b9fd153aeb596ade28c Mon Sep 17 00:00:00 2001 From: Sven Rieseler <243339203+ChargingCrystal@users.noreply.github.com> Date: Thu, 26 Nov 2026 13:53:10 +0100 Subject: [PATCH 2/2] fix: align CI and Vercel on Node 24 --- .github/workflows/ci.yml | 2 +- AGENTS.md | 3 +-- docs/DEPLOY.md | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1abafa6..f381e41 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: persist-credentials: false - uses: actions/setup-node@v7 with: - node-version: 22 + node-version: 24 cache: npm - run: npm ci - run: npm test diff --git a/AGENTS.md b/AGENTS.md index 57a8b2c..07769f5 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -72,8 +72,7 @@ npm run build # Nuxt/Nitro production build - On Windows, run npm from a path with an upper-case drive letter (`E:\...`, not `e:\...`). Otherwise Vitest fails with "failed to find the runner". -- CI uses npm 10 (Node 22). After adding or updating a package with npm 11, run - `npx npm@10 install --package-lock-only`, otherwise `npm ci` can fail in CI. +- CI and Vercel use Node 24.x. Use that major locally when updating the lockfile and verify it with `npm ci`. ## Test-driven development (applies to everyone) diff --git a/docs/DEPLOY.md b/docs/DEPLOY.md index 16cf9be..1d34657 100644 --- a/docs/DEPLOY.md +++ b/docs/DEPLOY.md @@ -1,6 +1,6 @@ # Deploy Ons to Vercel and Supabase -Start with a reviewed commit on `main`, a GitHub account with access to the repository, and accounts on Supabase and Vercel. Use Node 24.x to reproduce the verified Vercel build and install the [Supabase CLI](https://supabase.com/docs/guides/local-development/cli/getting-started) for migrations. The commands below use Bash, such as Git Bash on Windows. The smoke commands also use `curl` and `jq`. +Start with a reviewed commit on `main`, a GitHub account with access to the repository, and accounts on Supabase and Vercel. Use Node 24.x locally to match CI and the Vercel build. Install the [Supabase CLI](https://supabase.com/docs/guides/local-development/cli/getting-started) for migrations. The commands below use Bash, such as Git Bash on Windows. The smoke commands also use `curl` and `jq`. **Approval checkpoint.** Project creation, granting GitHub access, storing credentials, applying hosted migrations, deploying, configuring OAuth, and assigning domains are separate cloud actions. The steps below are for the project owner to perform. In a brand-new Vercel project, the first deployment is classified as **Production** and uses Production variables. Confirm that first deployment before selecting **Deploy**. The next deployment from a non-production branch can be a Preview. [Vercel deployment environments](https://vercel.com/docs/deployments/environments#first-deployment)