Field note 04JavaScript packages / runtime / decision radius

Package manager or runtime?

pnpm or Bun?

Keep the choice simple. Use pnpm when you need a package manager. Choose Bun when you plan to run the project with Bun too.

01Start with scope

What does this choice actually change?

If the repo already runs on Node and you only need a package workflow, keep the decision at the package layer. pnpm stores packages in a content-addressable store and, by default, exposes direct dependencies at the root instead of making undeclared transitive dependencies quietly available.[1]

If the team wants the project to run with Bun too, the radius grows. bun install works in a package.json project, writes bun.lock, and offers hoisted and isolated install layouts.[4]

Decision radiusMore of the project must agree as the line travels right.
pnpmpackage layer
Bunproject layer

This is a commitment chart, not a performance chart. pnpm stays close to package installation. Bun reaches further only when you decide to use its runtime across the project.

The simple rule

Start with pnpm when Node stays. Choose Bun when running the app with Bun is part of the plan, then prove that choice in the real test, CI, and deploy paths.

02Run one proof

A migration earns its own evidence.

Both pnpm and Bun support workspace-shaped projects. pnpm's workspace: protocol refuses to resolve to anything except a local workspace package.[2] Bun also supports workspaces, filtered installs, and local workspace packages.[3]

The useful question is not which one has a workspace. It is whether the runtime you plan to use holds up in the places your project already has to work.

CheckIf Node staysIf Bun joins the runtime
InstallKeep the lockfile path clearConfirm bun.lock works for the repo
Local runExisting Node path remains the control.Run the actual app with Bun, not only a toy script.
Tests and CIKeep the current runner and CI assumptions.Prove the test command and CI image before changing defaults.
DeployNothing new reaches production.Ship one real path and check the target environment.

Keep the runtime choice honest.

pnpm is a sensible first answer when the project wants a package manager. Bun makes sense when the team intends to make Bun part of the application environment and has tested that broader commitment.