This page compares pnpm with Bun's package manager, bun install, not Bun as a runtime. Both install from the npm registry, both handle monorepos, and both have moved to stricter defaults around install scripts. As of November 2026 pnpm is at 12.18.0 and Bun at 1.4.4; Bun's site now says it has joined Anthropic.
pnpm keeps one copy of each package version in a content-addressable store and hard-links files into projects, so its homepage says a hundred projects on the same version cost one copy on disk. Its node_modules is strict: only your direct dependencies sit at the root, and everything else lives under node_modules/.pnpm. Current pnpm blocks dependency postinstall scripts until you approve them with allowBuilds, skips versions published in the last 24 hours by default, and can install and pin Node.js per project.
bun install writes a text lockfile, bun.lock, and caches packages globally under ~/.bun/install/cache. It supports a hoisted, npm-style layout and an isolated, pnpm-like one with a store in node_modules/.bun. New workspaces default to isolated, while single-package projects and anything created before v1.3.2 stay hoisted. Like pnpm, it does not run dependency lifecycle scripts unless you list the package in trustedDependencies, and it has a minimumReleaseAge setting with exclusions.
How they compare
| Aspect | pnpm | Bun |
|---|---|---|
| What it is | A dedicated package manager. | One part of the Bun binary, next to the runtime, test runner and bundler. |
| node_modules layout | Strict and symlinked by default; nodeLinker: hoisted for tools that need flat. | Hoisted or isolated; isolated is the default for new workspaces. |
| Lockfile | One lockfile for the whole workspace. | Text bun.lock since Bun 1.2; the older binary bun.lockb can be converted. |
| Install scripts | Blocked until approved with allowBuilds. | Skipped unless the package is in trustedDependencies. |
| Supply-chain controls | minimumReleaseAge of 24 hours by default, blockExoticSubdeps, trustPolicy no-downgrade. | minimumReleaseAge with exclusions, plus a Security Scanner API. |
| Monorepos | Workspace protocol, filtering and catalogs in pnpm-workspace.yaml. | Workspaces in package.json, --filter, catalogs in the workspaces field. |
| Extras | pn patch for persistent patches; per-project Node.js versions. | Runtime, test runner and bundler from the same install. |
| Licence | MIT. | MIT, with LGPL-2 WebKit code linked into the binary. |
Choose pnpm if…
- You want strict dependency isolation by default
- You want cautious supply-chain defaults with no config
- You want the package manager to pin Node.js
- Your monorepo leans on catalogs, patches and filters
Choose Bun if…
- Bun is already your runtime or test runner
- You want one binary for install, run and test
- You want to pick hoisted or isolated layouts per project
- You are moving off pnpm and want catalogs carried over
Researched November 2026 from each product's official documentation and pricing pages. Prices and features change often, so check the vendors' sites before you decide.
Sources
- pnpm.io
- pnpm.io /motivation
- bun.com
- bun.com /docs/pm/cli/install
- bun.com /docs/project/license
- github.com /pnpm/pnpm/releases
- github.com /oven-sh/bun/releases