From d555003972135960a403d1fb920de5c5b3edf20a Mon Sep 17 00:00:00 2001 From: Anilkumar Reddy Date: Sat, 28 Nov 2026 15:09:14 -0600 Subject: [PATCH] ci: use Node 26 for development and builds --- .github/workflows/ci.yml | 7 +++++++ .github/workflows/marketplace-release.yml | 1 + .node-version | 2 +- CONTRIBUTING.md | 4 +++- package.json | 2 +- tests/release-readiness.test.ts | 13 +++++++++++++ 6 files changed, 26 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5e33e3a..e4ae755 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,8 +25,15 @@ jobs: node-version-file: .node-version registry-url: https://npm.pkg.github.com scope: '@commercekit-tools' + - run: npm install --global corepack@0.36.0 - run: corepack enable - run: pnpm install --frozen-lockfile env: NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: pnpm quality + - name: Use the Node 24 Action execution baseline + uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 + with: + node-version: '24.21.0' + - name: Verify packaged Action compatibility on Node 24 + run: pnpm exec vitest run tests/bundle.test.ts diff --git a/.github/workflows/marketplace-release.yml b/.github/workflows/marketplace-release.yml index 4a4f376..1b7bd7a 100644 --- a/.github/workflows/marketplace-release.yml +++ b/.github/workflows/marketplace-release.yml @@ -85,6 +85,7 @@ jobs: node-version-file: .node-version registry-url: https://npm.pkg.github.com scope: '@commercekit-tools' + - run: npm install --global corepack@0.36.0 - run: corepack enable - run: pnpm install --frozen-lockfile env: diff --git a/.node-version b/.node-version index df6ae33..a2e8115 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -24.21.0 +26.13.1 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 82d3788..064f0c4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,7 +5,7 @@ The reporting implementation consumes exact published notification-contract file:tarball dependency is required. Historical candidate provenance is archived in [ecosystem-reporting-validation.md](docs/ecosystem-reporting-validation.md). -Use Node.js `24.21.0` and pnpm `12.6.0`. Configure GitHub Packages authentication as described below, enable Corepack, then run `pnpm install --frozen-lockfile`. +Use Node.js `26.13.1` and pnpm `12.6.0` for development. Configure GitHub Packages authentication as described below, install Corepack with `npm install --global corepack@0.36.0`, enable it, then run `pnpm install --frozen-lockfile`. Run `pnpm format`, `pnpm lint`, `pnpm typecheck`, `pnpm schema:check`, `pnpm test`, `pnpm test:coverage`, `pnpm audit`, and `pnpm bundle`. Review contract changes and provider payload fixtures carefully. Regenerate and commit all `dist` artifacts with source changes. Use only synthetic fixtures; normal CI must never call real webhooks. PRs should explain contract/security effects and include focused tests. @@ -34,3 +34,5 @@ common Result/Inputs/Issues layout; review semantic counts, links and outcomes independently of those golden changes. Provider escaping remains local; the shared action-text sanitizer adds common JWT, known-secret and URL disclosure rules. Do not duplicate the shared visual status vocabulary or event schema. + +Development and bundle verification use Node 26. The Action still executes with `runs.using: node24`; keep its runtime APIs compatible with Node 24. The existing packaged-Action tests also run on Node 24 in CI without doubling the full quality matrix. diff --git a/package.json b/package.json index 2c5418e..fb8d517 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "license": "MIT", "type": "module", "engines": { - "node": ">=24.0.0 <25.0.0" + "node": ">=24.0.0 <25.0.0 || >=26.13.1 <27.0.0" }, "packageManager": "pnpm@12.6.0", "scripts": { diff --git a/tests/release-readiness.test.ts b/tests/release-readiness.test.ts index ce8611e..2c7195c 100644 --- a/tests/release-readiness.test.ts +++ b/tests/release-readiness.test.ts @@ -4,6 +4,19 @@ import { describe, expect, it } from 'vitest'; const read = (path: string) => readFile(new URL(`../${path}`, import.meta.url), 'utf8'); describe('release readiness contracts', () => { + it('uses Node 26 development tooling and verifies the Node 24 packaged Action', async () => { + const pin = (await read('.node-version')).trim(); + expect(pin).toMatch(/^26\.\d+\.\d+$/); + const manifest = JSON.parse(await read('package.json')); + expect(manifest.engines.node).toContain(`>=${pin}`); + expect(manifest.engines.node).toContain('>=24.0.0 <25.0.0'); + const ci = await read('.github/workflows/ci.yml'); + expect(ci).toContain('node-version-file: .node-version'); + expect(ci).toContain('npm install --global corepack@0.36.0'); + expect(ci.indexOf('npm install --global corepack@0.36.0')).toBeLessThan(ci.indexOf('corepack enable')); + expect(ci).toContain("node-version: '24.21.0'"); + expect(ci).toContain('pnpm exec vitest run tests/bundle.test.ts'); + }); it('keeps one root Node 24 Action with the bounded public contract', async () => { const action = await read('action.yml'); expect(action).toMatch(/^name: CommerceKit Notifications$/m);