Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion docs/DEPLOY.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
12 changes: 12 additions & 0 deletions tests/node-version.test.ts
Original file line number Diff line number Diff line change
@@ -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)
})
Loading