Skip to content

chore: upgrade pnpm to v11.25.0 - #3932

Open
stipsan wants to merge 3 commits into
mainfrom
cursor/upgrade-pnpm-v11-4e69
Open

chore: upgrade pnpm to v11.25.0#3932
stipsan wants to merge 3 commits into
mainfrom
cursor/upgrade-pnpm-v11-4e69

Conversation

@stipsan

@stipsan stipsan commented Sep 1, 2026

Copy link
Copy Markdown
Member

Pin the repo to pnpm 11.25.0 (latest-11).

Library consumers are unaffected. CI and contributors pick up pnpm 11 through packageManager and pnpm/action-setup.

What changed

  • packageManager is now pnpm@11.25.0.
  • allowBuilds denies msw, which pnpm 11 requires an explicit decision on (see below).
  • The CI build job installs with scripts instead of --ignore-scripts, so an unapproved build script fails there rather than only on Vercel.
  • Cloud agent notes tell you to corepack enable && corepack prepare after prepending nvm Node.

What did not change

  • pnpm-workspace.yaml was already on the v11 shape (allowBuilds, no package.json#pnpm, no project .npmrc).
  • pnpm-lock.yaml did not need a rewrite; it stays at lockfileVersion: 9.0, which is what pnpm 11 writes.
  • The official pnpm-v10-to-v11 codemod made no edits.

The Vercel failure on the first push

The first commit passed all 13 GitHub checks and failed the Vercel – next-sanity deployment. pnpm 11 flips strictDepBuilds to true, so a dependency with an unapproved build script now fails the install instead of warning:

[ERR_PNPM_IGNORED_BUILDS] Ignored build scripts: msw@2.15.0

msw arrives transitively through @vitest/browser and no code here imports it, so its build is denied. Denying the build script does not disable msw: the browser tests still exercise it as a request interceptor.

Every workflow installed with --ignore-scripts, which skips this check entirely, and no CI job builds apps/mvp. Vercel runs a plain pnpm install and builds that app, so it was the only place the failure could appear. Hence the CI change above.

v11 defaults we are keeping

  • minimumReleaseAge (1 day) and blockExoticSubdeps. Canary Next and sanity: next are pinned in the lockfile, and the supply-chain verification passes.
  • Native pnpm publish is out of scope. Changesets still publish through npm, so NPM_CONFIG_PROVENANCE in release is unchanged.

Verified locally on pnpm 11.25.0 / Node 22.22.2

  • pnpm install (with scripts, as Vercel runs it) succeeds; it fails without the msw entry.
  • pnpm --filter mvp build and pnpm --filter static build both succeed. These are the two Vercel projects.
  • pnpm lint, pnpm knip, pnpm test (171 unit tests plus fixture builds), and pnpm test:e2e (21 browser tests) all pass.
Open in Web Open in Cursor 

Pin packageManager to the latest v11 release. Workspace config was already
on the v11 shape (pnpm-workspace.yaml, allowBuilds), so the lockfile did
not need a rewrite. Update Cloud agent notes to activate the pin via Corepack.

Co-authored-by: Cody Olsen <stipsan@users.noreply.github.com>
@changeset-bot

changeset-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 19001fc

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel

vercel Bot commented Sep 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
next-sanity Ready Ready Preview Sep 1, 2026 6:12pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
next-sanity-static Ignored Ignored Sep 1, 2026 6:12pm UTC

Request Review

@stipsan
stipsan marked this pull request as ready for review September 1, 2026 17:47
Copilot AI lite review requested due to automatic review settings September 1, 2026 17:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR pins the monorepo to pnpm 11.25.0 via packageManager, and updates contributor/CI notes to reflect pnpm 11’s Node compatibility and Corepack-based activation.

Changes:

  • Bumped the root packageManager to pnpm@11.25.0.
  • Updated agent notes to use Corepack to activate the repo-pinned pnpm version after switching to the nvm Node.
  • Added CI workflow commentary noting pnpm 11’s Node.js 22+ requirement (matrix remains on LTS lines).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
package.json Pins the repo’s package manager to pnpm 11.25.0 via Corepack.
AGENTS.md Updates local setup guidance to use Corepack for pnpm 11 activation.
.github/workflows/ci.yml Documents pnpm 11’s Node version requirement alongside the existing LTS matrix.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread AGENTS.md
```

`nvm use` alone is not enough because `/exec-daemon` sits ahead of nvm's shims in `PATH`. This nvm node also bundles the correct `pnpm` (10.34.5), so prepending it fixes both `node` and `pnpm` in one step. `pnpm install` itself works on the default node; only building/running needs the newer node. `pnpm test:e2e` (Vitest browser project) needs Chromium: `pnpm playwright install chromium`.
`nvm use` alone is not enough because `/exec-daemon` sits ahead of nvm's shims in `PATH`. This nvm node also bundles a pnpm, but the repo pins pnpm 11 via `packageManager`. Activate that version with Corepack (`corepack enable && corepack prepare`) after prepending nvm. `pnpm install` itself works on the default node; only building/running needs the newer node. `pnpm test:e2e` (Vitest browser project) needs Chromium: `pnpm playwright install chromium`.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Release provenance env var ignored
    • Renamed NPM_CONFIG_PROVENANCE to PNPM_CONFIG_PROVENANCE in release.yml so pnpm 11's native publish still enables npm provenance for public releases.

Create PR

Or push these changes by commenting:

@cursor push 9b8bee34f9
Preview (9b8bee34f9)
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -56,4 +56,4 @@
           publish-script: pnpm release
         env:
           GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
-          NPM_CONFIG_PROVENANCE: ${{ github.event.repository.visibility == 'public' && 'true' || 'false' }}
+          PNPM_CONFIG_PROVENANCE: ${{ github.event.repository.visibility == 'public' && 'true' || 'false' }}

You can send follow-ups to the cloud agent here.

Reviewed by Cursor Bugbot for commit a53b8da. Configure here.

Comment thread package.json
"pkg-pr-new": "^0.0.87"
},
"packageManager": "pnpm@10.34.5"
"packageManager": "pnpm@11.25.0"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Release provenance env var ignored

Medium Severity

Pinning packageManager to pnpm 11 switches changeset publish onto native pnpm publish, which no longer reads npm_config_* variables. NPM_CONFIG_PROVENANCE in the release workflow is therefore ignored, so public next-sanity releases can ship without npm provenance attestations.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit a53b8da. Configure here.

cursoragent and others added 2 commits September 1, 2026 18:08
pnpm 11 defaults strictDepBuilds to true, so an unapproved build script
fails the install instead of warning. msw arrives transitively through
@vitest/browser and nothing here uses it, so deny its build.

CI never caught this because every workflow installs with --ignore-scripts;
Vercel runs a plain pnpm install and its apps/mvp build failed.

Co-authored-by: Cody Olsen <stipsan@users.noreply.github.com>
Every workflow used --ignore-scripts, which skips pnpm 11's check for
unapproved dependency build scripts. That let a failing install reach
Vercel with all GitHub checks green. Nothing here approves a build script,
so a plain install runs no dependency builds; it only enforces the gate.

Co-authored-by: Cody Olsen <stipsan@users.noreply.github.com>
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.

3 participants