The pnpm project has released version 12 of its package manager, completely rewritten in Rust. Commands and settings remain backward compatible overall, but the details bring changes and improvements. One notable addition: pnpm 12 can now work with foreign package managers such as npm and Yarn.

terminal
git config --global url."git@github.com:".insteadOf https://github.com/

Vercel's Turborepo project tested the new Rust version on Linux and measured speed gains of 64 to 90 percent for installations compared to pnpm 10.28. The Node.js tool Corepack also starts 74 percent faster with a warm cache, though it is 11 percent slower with a cold one. The testers note that results may differ on other operating systems because of their link methods.

The setting packageImportMethod: auto brings another speedup: on Linux it now prioritizes hardlinks, which halves installation times on the btrfs filesystem. On ext4 there is no benefit.

Developers need to watch a few breaking changes. GitHub, GitLab and BitBucket can no longer be reached via SSH; pnpm 12 only allows HTTP access. Private repositories must be addressed through git's URL rewriting. Invalid settings in pnpm-workspace.yaml are no longer ignored but reported as ERR_PNPM_UNRECOGNIZED_WORKSPACE_SETTINGS. The option pnpm install --resolution-only has been removed.

A major new feature concerns other package managers: pnpm 12 can now embed packages in npm, Yarn Classic, Yarn Berry, Yarn 6 and Bun formats. Naming them in commands registers the respective manager instead of installing it: pnpm add yarn no longer installs the Yarn package but registers the Yarn package manager as packageManager for further use as a pnpm tool. Developers can also pin local runtimes for Node, Deno or Bun per project via devEngines.runtime while keeping the global version elsewhere. Details are in the pnpm blog posts for versions 12.0 and 12.1, the latter adding minor changes.