diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 883c36f..10c248c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,6 +21,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: @@ -37,7 +38,7 @@ jobs: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: - node-version-file: .node-version + node-version: 24.21.0 registry-url: https://npm.pkg.github.com scope: "@commercekit-tools" - run: corepack enable diff --git a/.github/workflows/sandbox-smoke.yml b/.github/workflows/sandbox-smoke.yml index 30a361b..baf6df6 100644 --- a/.github/workflows/sandbox-smoke.yml +++ b/.github/workflows/sandbox-smoke.yml @@ -39,6 +39,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 e16cea0..aa41d69 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,7 +7,7 @@ preparation, candidate environment flag or action-kit checkout is needed. [Reporting evidence](docs/consistent-reporting.md) retains the prior source-stage provenance separately. -Use Node 24.21.0 and pnpm 12.6.0 (`corepack enable`). Install with `pnpm install --frozen-lockfile`. The package is private and must not be published to npm. +Use Node 26.13.1 and pnpm 12.6.0. Install pinned Corepack first (`npm install --global corepack@0.36.0`), then run `corepack enable`. Install with `pnpm install --frozen-lockfile`. The package is private and must not be published to npm. GitHub executes the Action on Node 24; the existing cross-platform bundle checks retain Node 24 compatibility while the full development quality gate runs on Node 26. Run `pnpm format`, `pnpm lint`, `pnpm typecheck`, `pnpm contracts:check`, `pnpm test`, `pnpm test:coverage`, `pnpm audit`, `pnpm bundle`, `pnpm bundle:check`, `pnpm scan:public`, and `pnpm quality`. Coverage gates require 95% statements, branches, lines, and functions. Commit reproducible dist and its license inventory. diff --git a/docs/consistent-reporting.md b/docs/consistent-reporting.md index 04785a7..816e49d 100644 --- a/docs/consistent-reporting.md +++ b/docs/consistent-reporting.md @@ -101,7 +101,7 @@ Status vocabulary: PASS, FAIL, BLOCKED, NOT RUN. | Required hosted checks and coordinated source merge | NOT RUN: pending final pushed head | | Real SAP, hosted Sandbox dispatch, live provider delivery | NOT RUN in this reporting task | -Normal commands use Node 24.21.0/pnpm 12.6.0 and need no candidate variables: +Normal commands use Node 26.13.1/pnpm 12.6.0 and need no candidate variables: ```sh pnpm install --frozen-lockfile diff --git a/package.json b/package.json index 1935839..b605aa6 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/workflow-security.test.ts b/tests/workflow-security.test.ts index 3f981f8..3bed7a6 100644 --- a/tests/workflow-security.test.ts +++ b/tests/workflow-security.test.ts @@ -1,6 +1,20 @@ import { readFileSync, readdirSync } from "node:fs"; import { it, expect } from "vitest"; const read = (p: string) => readFileSync(p, "utf8"); +it("uses Node 26 for development and retains focused Node 24 Action coverage", () => { + const version = read(".node-version").trim(); + expect(version).toMatch(/^26\.\d+\.\d+$/); + const pkg = JSON.parse(read("package.json")); + expect(pkg.engines.node).toBe(`>=24.0.0 <25.0.0 || >=${version} <27.0.0`); + const [quality, runtime] = read(".github/workflows/ci.yml").split( + " cross-platform:", + ); + expect(quality).toContain("node-version-file: .node-version"); + expect(quality).toContain("npm install --global corepack@0.36.0"); + expect(runtime).toContain("node-version: 24.21.0"); + expect(runtime).toContain("tests/action.test.ts tests/bundle.test.ts"); + expect(read("action.yml")).toContain("using: node24"); +}); it("pins all external Actions and forbids privileged triggers, artifacts, and releases", () => { for (const file of readdirSync(".github/workflows")) { const s = read(".github/workflows/" + file);