published fresh until

pnpm 9 to 10: how do I migrate blocked builds?

Summary As of October 2026, pin pnpm deliberately, approve only reviewed dependency scripts, and audit deploy, hoisting, store and script changes; approve-builds starts at 10.1.0 (checked 2026-10-28).

Not for pnpm 12 lockfile and registry errors, see pnpm-frozen-lockfile-trust-audit-410-workspace-glob-errors

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: pin the destination CLI, allow only reviewed dependency builds, and audit deployment and script assumptions before changing CI.

What changed

  • Source → target is pnpm 9.x → 10.34.9, with the approval boundary at 10.0.0 → 10.1.0 (checked 2026-10-28): major release, approval release.
  • The security policy marks the source line unsupported; the destination line is supported through 2027-04-30 (checked 2026-10-28). It does not identify the exact last supported source patch.
  • Dependency install hooks are blocked by default in the major release; the next minor adds pnpm ignored-builds, pnpm approve-builds and ignoredBuiltDependencies. The versioned approval page confirms that boundary (checked 2026-10-28).

How to migrate

1. Record the current CLI, Node runtime and lockfile. If an older lockfile needs conversion, perform that with the source CLI first. Use the versioned installation instructions: corepack use pnpm@latest-10 resolves and records an exact project pin. Review the resulting packageManager value; do not leave CI following a floating tag. The ordinary CLI requires Node 18.12 or newer (checked 2026-10-28). 2. Run pnpm install on a branch. At or beyond the approval boundary, run pnpm ignored-builds, inspect each package's scripts, then pnpm approve-builds. Review the generated onlyBuiltDependencies and ignoredBuiltDependencies in pnpm-workspace.yaml. 3. At the initial major release, configure pnpm.onlyBuiltDependencies in the root package.json manually, then run pnpm rebuild. Do not suggest the approval command to that CLI. The exact initial-release example permits fsevents; substitute only the dependencies you reviewed. 4. Commit the reviewed policy and lockfile alongside the exact CLI pin. Recreate an empty install in CI and exercise the packages that generate or download binaries. A cached binary can hide a missing build. 5. Audit both tables. Later script policies may use allowBuilds; non-registry artifacts need the exact lockfile depPath approval key. Test private-registry authentication and CLI bootstrapping too.

What breaks

All major-release breaking-change groups below come from the official major changelog, checked 2026-10-28.

ChangeAudit
Dependency hooks blockedMissing generated binaries
pnpm link adds root overrides, workspace-wide; global link runs inside packageInspect overrides
SHA256 replaces hashes for long paths, peers, extensions, side effects, pnpmfile and patchesLockfile/cache changes
manage-package-manager-versions defaults onProject pin controls CLI
ESLint/Prettier public hoisting removedDeclare dependencies
@yarnpkg/extensions 2.0.3 (checked 2026-10-28)Resolution changes
Windows virtual-store maximum becomes 60Path assumptions
Fewer npm_package_* variablesOnly name/version/bin/engines/config remain
NODE_ENV=production no longer filters installationRequest production-only install explicitly
Store format changes: package-aware index, side-effect diffs, index replaces filesRefresh cache
# escaped in virtual-store namesAvoid hard-coded paths
Global self-install rejectedpnpm self-update
URL redirects recorded in lockfileReview resolved URLs
Deploy requires inject-workspace-packages=true; dedicated lockfile or legacy fallbackTest deploy output
Old lockfile conversion removedConvert before upgrade
pnpm test forwards subsequent arguments directlyRemove obsolete separator
node-gyp 11 (checked 2026-10-28)Native build toolchain

The next minor changelog also restores project preprepare/postprepare, fixes recursive install loops, detects deleted workspace installs, inherits deploy policy, validates publish names, and fixes false patched-dependency warnings (checked 2026-10-28).

Later changes also matter; each version was checked 2026-10-28:

Version and official noteAdditional break or hardening
10.26Git prepare now needs approval; HTTP tarball integrity is pinned. allowBuilds becomes preferred; exotic-subdependency blocking is optional.
10.33.4Git-hosted tarball integrity pinned; negative-only filters exclude root again (--include-workspace-root opts in).
10.34.2Repository registry/auth/proxy placeholders stop expanding; move them to trusted user/global/CLI/env config. Bootstrap ignores repository network config and verifies registry signatures; Stable Node checksum lists require signatures. Reserved bin names and mismatched resolution shapes are rejected. Non-registry build approvals require artifact depPaths, not package names.
10.34.3 / 10.34.5Trusted-config redirection blocked; lockfile/package-name traversal rejected; workspace proxy placeholders no longer expand.
10.34.9Fixes missing manager pin in fresh lockfiles after switching CLI; retest frozen installs.

Diagnostic: The following dependencies have build scripts that were ignored:

That warning is not proof a patch failed: the upstream report separates patch application from script execution.

What to test

Check clean and cached installs; native module loading; generated clients; lint plugin resolution; test argument forwarding; workspace links; production dependency selection; and the actual deploy artifact. Compare lockfile changes with the same dependency declarations.

Pitfalls

Do not silence all scripts globally just to make installation look successful. Explicitly denied packages will not build. Current unversioned docs describe a different policy format; keep the documentation major aligned with your pin. Later destination settings add optional release-age and trust controls, so do not infer current defaults from another major.

Public evidence

  • haines, issue #8952: “Patches are still applied.” The reproduction distinguishes a spurious warning from a broken patch; the next minor release records the fix.
  • zanminkian, issue #8378 proposed removing implicit lint-tool hoisting; its title names public-hoist-pattern. This is design evidence, not a clean-install success report.

A prompt to give your agent

Your training data may predate this change. Read the linked major release, next minor release and versioned approval docs before editing. Record the installed source and target CLI. Review every blocked dependency script, propose the smallest allowlist, and audit every row above. Do not guess commands or import policy settings from a newer major. Show the policy and lockfile diff and a clean-install test plan.

Limits

No application migration or native build was run. The installation page lists compatibility, not an exact source-patch EOL date. Complete per-patch coverage of 9.x and 10.1.1–10.34.8 (checked 2026-10-28), beyond the later releases individually linked above, is not established; review the remaining notes for the pin. The official approval page does not certify that an approved script is safe. Community evidence is one reproducible warning plus a design discussion, not two independent successful upgrades.

Started from a post by @pnpm maintainers, packaged by the editor. Original post

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# pnpm 9 to 10: how do I migrate blocked builds?
Summary: As of October 2026, pin pnpm deliberately, approve only reviewed dependency scripts, and audit deploy, hoisting, store and script changes; approve-builds starts at 10.1.0 (checked 2026-10-28).
Copy for agent
get the whatworks thread pnpm-9-to-10-build-approval-and-breaking-changes and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread pnpm-9-to-10-build-approval-and-breaking-changes
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks