Skip to content

fix(release): use pnpm 11 native publish for OIDC#107

Merged
Saiby100 merged 2 commits into
mainfrom
ci/pnpm-11-native-publish
Jul 13, 2026
Merged

fix(release): use pnpm 11 native publish for OIDC#107
Saiby100 merged 2 commits into
mainfrom
ci/pnpm-11-native-publish

Conversation

@Saiby100

Copy link
Copy Markdown
Contributor

Summary

The release job started failing on changeset publish with EUNKNOWNCONFIG Unknown cli flag: --git-checks.

Root cause: the repo pinned pnpm 10.6.2, whose pnpm publish delegates the upload to the npm CLI and forwards its own --no-git-checks flag. The workflow also ran npm install -g npm@latest for OIDC trusted publishing. On 2026-07-08 npm 12.0.0 shipped, which turned unknown CLI flags into a fatal EUNKNOWNCONFIG (npm 11 only warned) — so the forwarded --no-git-checks began breaking the publish. 22 prior releases succeeded because they ran on npm 11.

Fix: move to pnpm 11, which introduced a native publish flow (no npm delegation) with native OIDC trusted publishing. --no-git-checks never reaches npm, and pnpm does the OIDC token exchange itself — so the npm install -g npm@latest workaround is removed entirely.

Changes

  • package.json: packageManager pnpm@10.6.2pnpm@11.12.0; removed the pnpm field (pnpm 11 no longer reads it from package.json)
  • pnpm-workspace.yaml: moved packageExtensions and onlyBuiltDependencies here (their new home in pnpm 11)
  • .github/workflows/release.yaml: removed the npm install -g npm@latest step

Notes

  • Repo-wide bump: all workflows use unpinned pnpm/action-setup, so packageManager is the single version source — this also moves ci/e2e/local dev to pnpm 11.
  • pnpm@11.12.0 chosen (latest 11.x): includes the 11.1.3 fix for OIDC alongside the actions/setup-node .npmrc this workflow writes.
  • No changeset — CI/tooling only; the published plugin package is untouched.

Test plan

  • pnpm 11.12.0 install --frozen-lockfile accepts the existing committed lockfile (875 entries, passes supply-chain policy) — no lockfile regen needed.
  • CI install + build + e2e pass on this branch (exercises onlyBuiltDependenciesmongodb-memory-server postinstall).
  • Merge to main → release job publishes the next version via OIDC without the --git-checks error.

PR Checklist

  • /r:docs-update - Documentation updated for behavioral changes
  • /r:pr-review - Self-review completed before requesting team review

Saiby100 added 2 commits July 13, 2026 16:44
Request: "Why does publishing cause this error" (changeset publish failing
with `EUNKNOWNCONFIG Unknown cli flag: --git-checks`), then "rather use the
newer pnpm" to fix it at the root.

Motivation: The release job pinned pnpm 10.6.2, whose `pnpm publish` delegates
the upload to the npm CLI and forwards its own `--no-git-checks` flag. The
workflow also ran `npm install -g npm@latest` for OIDC trusted publishing. On
2026-07-08 npm 12.0.0 shipped, making unknown CLI flags a fatal EUNKNOWNCONFIG
instead of a warning, so `--no-git-checks` began breaking the publish (22 prior
releases succeeded on npm 11, which only warned).

Decisions:
- Bump to pnpm 11.12.0 over pinning npm@11: pnpm 11 introduced a native publish
  flow (no npm delegation) with native OIDC, so --no-git-checks never reaches
  npm — fixes the root cause instead of masking it. 11.12.0 also includes the
  11.1.3 fix for OIDC with the actions/setup-node .npmrc this workflow writes.
- Repo-wide bump via packageManager (not release-only): all workflows use
  unpinned pnpm/action-setup, so packageManager is the single version source;
  keeps ci/e2e/dev on one pnpm. Confirmed pnpm 11.12.0 accepts the existing
  lockfile under --frozen-lockfile (875 entries), so no lockfile regen needed.
- Move packageExtensions + onlyBuiltDependencies to pnpm-workspace.yaml: pnpm 11
  no longer reads the `pnpm` field in package.json; onlyBuiltDependencies gates
  mongodb-memory-server's postinstall (needed by e2e).
- Drop the `npm install -g npm@latest` step entirely: pnpm 11 does OIDC itself.

Changes:
- .github/workflows/release.yaml: removed the npm upgrade step
- package.json: packageManager pnpm@10.6.2 -> pnpm@11.12.0; removed pnpm field
- pnpm-workspace.yaml: added packageExtensions and onlyBuiltDependencies

Tags: release-workflow, pnpm, pnpm-11, npm, changesets, changeset-publish,
oidc-trusted-publishing, git-checks, no-git-checks, eunknownconfig, ci,
package-manager, packageextensions, onlybuiltdependencies

$15m
Request: "Why is the Docs check workflow failing after you made that PR?"

Motivation: After the pnpm 11 bump, CI failed in `pnpm install --frozen-lockfile`
(before docs:check) with `ERR_PNPM_IGNORED_BUILDS` (exit 1) for @swc/core,
mongodb-memory-server, and sharp. pnpm 11 turns un-reviewed dependency build
scripts into a hard error; pnpm 10 only warned, so the 22 prior runs were green.

Decisions:
- pnpm 11.0.0 REMOVED onlyBuiltDependencies / ignoredBuiltDependencies /
  neverBuiltDependencies / onlyBuiltDependenciesFile and replaced them with a
  single `allowBuilds` map (package -> boolean). pnpm still reads the old keys
  but no longer acts on them (why `pnpm config list` showed the value yet
  install still failed), so the earlier migration to onlyBuiltDependencies was
  invalid for pnpm 11.
- allowBuilds set to preserve pnpm-10 behavior: mongodb-memory-server: true
  (needs its postinstall for the mongod binary, used by e2e); @swc/core and
  sharp: false (both ship prebuilt binaries via optional deps, never built
  before).

Changes:
- pnpm-workspace.yaml: replaced onlyBuiltDependencies/ignoredBuiltDependencies
  with allowBuilds

Verified: `pnpm@11.12.0 install --frozen-lockfile` exits 0; mongodb-memory-server
postinstall runs, @swc/core and sharp skip without error; lockfile unchanged.

Tags: pnpm, pnpm-11, allowbuilds, onlybuiltdependencies, ignoredbuiltdependencies,
build-scripts, err-pnpm-ignored-builds, ci, docs-check, mongodb-memory-server,
sharp, swc
@Saiby100
Saiby100 merged commit fc480be into main Jul 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant