Use this when installing dependencies, running scripts, filtering packages, or migrating this monorepo from pnpm to Bun (bun.lock, workspaces, bun ci) while keeping Cloudflare Workers + Wrangler workflows working.
This repo is currently pnpm-based, but Bun can act as the package manager for the monorepo. This skill covers (1) day-to-day Bun equivalents for pnpm workflows and (2) a safe pnpm → Bun migration checklist.
bun installbun ci (equivalent to bun install --frozen-lockfile)bun run <script>bun --filter <workspace-name-or-glob> run <script>bun --filter ./apps/user-application run buildbun add <pkg>bun add -d <pkg>bun pm ls (or bun list)bun pm migrateBun’s primary mechanism is --filter.
Examples:
bun install --filter '!data-service'bun install --filter './apps/user-application'bun --filter @workspace/ui run tscNotes:
This repo uses Cloudflare Workers tooling (Wrangler, workerd). Bun is fine as a package manager, but Wrangler is not universally supported when executed via Bun’s runtime.
Practical guidance:
bun run <script> without forcing Bun’s runtime.bun run respects #!/usr/bin/env node shebangs by default, so CLIs like wrangler usually run on your system Node.bun --bun.Bun will automatically migrate pnpm-lock.yaml to bun.lock when you run bun install and no bun.lock exists yet.
Recommended sequence:
node_modules (and workspace node_modules if present).bun install at repo root.bun.lock.packages/data-ops buildbun.lock.pnpm-lock.yaml and pnpm-workspace.yaml.Bun-specific notes that matter during migration:
bun.lock (older versions used bun.lockb).trustedDependencies in the relevant package.json, then reinstall.When the actual migration happens (if/when you switch the repo’s canonical PM):
package.json:
packageManager to bun@<version> to signal the expected tool.workspaces config exists (Bun supports workspaces and will migrate from pnpm-workspace.yaml automatically).pnpm install with bun ci.oven-sh/setup-bun GitHub Action..github/skills/bun-monorepo-workflows/references/command-mapping.md.github/skills/bun-monorepo-workflows/references/migration-notes.md