diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4afe2e3..97083cc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,6 +32,9 @@ jobs: registry-url: https://npm.pkg.github.com scope: '@commercekit-tools' + - name: Install Corepack + run: npm install --global corepack@0.36.0 + - name: Enable Corepack run: corepack enable @@ -43,8 +46,13 @@ jobs: - name: Run quality gate run: pnpm quality + - name: Select Node 24 Action compatibility runtime + uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + with: + node-version: 24.21.0 + - name: Verify bundled reporting, summaries, and redaction - run: pnpm test:integration + run: corepack pnpm test:integration integration: name: Install CLI (${{ matrix.target }}) 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 63e9cce..b509d8b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,8 +4,8 @@ Thank you for helping improve Setup CommerceKit CLI. ## Prerequisites -- Node.js `24.21.0`, as pinned in `.node-version` -- Corepack +- Node.js `26.13.1`, as pinned in `.node-version` +- Corepack `0.36.0` (installed explicitly; Node 26 does not bundle it) - Git The repository pins pnpm in `package.json`; do not install or publish this @@ -23,10 +23,15 @@ dependency is needed. The released-versus-main reporting status and historical candidate evidence. ```bash +npm install --global corepack@0.36.0 corepack enable pnpm install --frozen-lockfile ``` +The development/build host is Node 26; GitHub still executes `action.yml` with +`runs.using: node24`. Keep runtime APIs compatible with Node 24. The six native +Action jobs and the focused bundled integration retain execution coverage. + ## Development workflow Create a focused branch, keep changes scoped, and include tests with behavior diff --git a/package.json b/package.json index 71a4a5f..dfda430 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/node-runtime-policy.test.mjs b/tests/node-runtime-policy.test.mjs new file mode 100644 index 0000000..b0833fa --- /dev/null +++ b/tests/node-runtime-policy.test.mjs @@ -0,0 +1,23 @@ +import assert from 'node:assert/strict'; +import { readFileSync } from 'node:fs'; +import { test } from 'node:test'; + +const read = (file) => + readFileSync(new URL(`../${file}`, import.meta.url), 'utf8'); + +test('Node 26 development retains actual Node 24 bundled integration', () => { + const version = read('.node-version').trim(); + assert.match(version, /^26\.\d+\.\d+$/); + assert.equal( + JSON.parse(read('package.json')).engines.node, + `>=24.0.0 <25.0.0 || >=${version} <27.0.0`, + ); + const ci = read('.github/workflows/ci.yml'); + assert.match(ci, /node-version-file: .node-version/); + assert.match(ci, /npm install --global corepack@0.36.0/); + assert.match( + ci, + /Select Node 24 Action compatibility runtime[\s\S]+node-version: 24.21.0[\s\S]+run: corepack pnpm test:integration/, + ); + assert.match(read('action.yml'), /using: node24/); +});