From 1b3b8fd0517a80f7eb33bf57c480a847cb2acb80 Mon Sep 17 00:00:00 2001 From: Brett Adams Date: Wed, 22 Jul 2026 14:39:56 +1000 Subject: [PATCH] fix: align pnpm/Node setup in CI to fix npm publish EUNKNOWNCONFIG Root cause of the still-failing publish: pnpm/action-setup@v2 hardcoded pnpm 9 while packageManager declared pnpm@10.18.1. That mismatch made changeset publish fall through to a plain npm publish, which rejects the --git-checks flag changesets passes for the pnpm path. Mirrors the working setup in the sibling tesla-protocol repo: pnpm/action-setup@v4 (reads packageManager, no hardcoded version), Node 24, packageManager bumped to pnpm@10.30.3. --- .github/workflows/ci.yml | 6 ++---- .github/workflows/publish.yml | 6 ++---- AGENTS.md | 1 + package.json | 2 +- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1f3aec5..a535c76 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,14 +19,12 @@ jobs: uses: actions/checkout@v4 - name: Install pnpm - uses: pnpm/action-setup@v2 - with: - version: 9 + uses: pnpm/action-setup@v4 - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: "22" + node-version: "24" cache: "pnpm" - name: Install Dependencies diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index de98b65..213c5d7 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -21,14 +21,12 @@ jobs: uses: actions/checkout@v4 - name: Install pnpm - uses: pnpm/action-setup@v2 - with: - version: 9 + uses: pnpm/action-setup@v4 - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: "22" + node-version: "24" registry-url: "https://registry.npmjs.org" always-auth: true cache: "pnpm" diff --git a/AGENTS.md b/AGENTS.md index 0d0a694..7c3805a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -394,6 +394,7 @@ node-red ### CI/CD - `.github/workflows/publish.yml` - Automated build, test, and publish. Its "Upgrade npm for OIDC support" step always installs `npm@latest`, whose `engines.node` requirement can rise ahead of the workflow's `actions/setup-node` pin (this happened 2026-07: npm 12 required node ^22.22.2/^24.15.0/>=26, but the workflow was pinned to Node 20, breaking every publish with EBADENGINE). If publish starts failing, check `npm view npm@latest engines` against the pinned `node-version` first. +- `pnpm/action-setup` in `publish.yml`/`ci.yml` must use `@v4` with no hardcoded `version:` (it then reads the `packageManager` field in root `package.json`). A `@v2`/hardcoded-major pin that drifts from `packageManager` (e.g. installing pnpm 9 while `packageManager` says `pnpm@10.x`) makes `changeset publish` silently fall through to a plain `npm publish` that rejects the `--git-checks` flag changesets passes for the pnpm path, failing with `EUNKNOWNCONFIG` - this looks like a changesets/flag bug but is actually a pnpm-version mismatch. Keep root `packageManager` and both workflow files' pnpm major in sync (see the sibling `tesla-protocol` repo's `publish.yml` for the working reference shape). ## Integration-Specific Notes diff --git a/package.json b/package.json index 7c7dab6..61c580a 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "ci:publish": "changeset publish", "pack": "pnpm -r pack" }, - "packageManager": "pnpm@10.18.1", + "packageManager": "pnpm@10.30.3", "devDependencies": { "@changesets/cli": "^2.31.1", "@types/node": "^24.10.1",