From 539b756dac3b7e8dd6e35db777ea5e0f5f2cf0bd Mon Sep 17 00:00:00 2001 From: Henry Kaufman Date: Tue, 29 Sep 2026 13:41:32 -0400 Subject: [PATCH] ci: publish on Node 22, not 24 The first trusted-publishing run failed before it ever reached npm publish: better-sqlite3 11.10.0 ships no prebuilt binary for Node 24 (ABI 137), so `npm ci` left the native module unbuilt and `npm run fixture` threw "Could not locate the bindings file". I took 24 from npm's trusted-publishing docs example without checking it against this package's native dependency. ci.yml tests 18/20/22; the release job now uses 22, the newest version actually exercised. npm@latest still gets installed for OIDC support (it needs Node ^22.22.2, which setup-node's "22" satisfies), and node/npm versions are echoed so the next runner-image change is diagnosable from the log. The OIDC configuration itself was never reached and remains unverified. Claude-Session: https://claude.ai/code/session_01LMbjcZogpv9EbVnqovXpSX --- .github/workflows/publish.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1ff1cf9..aac6578 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -30,15 +30,22 @@ jobs: - uses: actions/setup-node@v4 with: - node-version: 24 + # NOT 24, whatever npm's docs example says: better-sqlite3 11.x ships + # no prebuilt binary for Node 24 (ABI 137), so `npm ci` leaves the + # native module unbuilt and the fixture step dies before publish ever + # runs. 22 is the newest version ci.yml actually exercises. + node-version: 22 registry-url: 'https://registry.npmjs.org' # No dependency cache in a release build: the artifact that goes to # the registry should be built from a clean install every time. - # OIDC support landed in npm 11.5.x. Node 24 ships a new enough npm, but - # pin it explicitly so a runner image change cannot silently regress this. + # OIDC support landed in npm 11.5.x, newer than the npm bundled with + # Node 22, so upgrade explicitly. npm@latest needs Node ^22.22.2, which + # setup-node's "22" satisfies. Versions are echoed so a future runner + # image change is diagnosable from the log alone. - name: Ensure npm supports OIDC run: | + node --version npm install -g npm@latest npm --version