Repository navigation
build: replace Bun with pnpm as the package manager - #301
Conversation
There was a problem hiding this comment.
ℹ️ One minor remote-cache detection issue inline.
Reviewed changes — Reviewed the pnpm command migration, including the additional Vercel deployment commit.
- Workspace scripts: Migrates updates, concurrent codegen, and one-off auth commands while preserving Astro generation order.
- Template commands and recipes: Migrates installation and verification commands, including Sentry CLI build permission.
- Remote cache: Updates pnpm command detection and its tests.
- CI and deployment: Replaces CI bootstrap with
pnpm/setupand overrides the Astro previews’ install commands.
With Node 26 and pnpm 12, codegen, checks, all 23 uncached test tasks, and template doctor --fast passed using existing dependencies. Fresh installation is currently blocked by ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION for six recently published dependencies already in the base lockfile.
gpt-6.1-sol | 𝕏
Move the workspace globs, overrides, the evlog patch, and exact saves from package.json and bunfig.toml to pnpm-workspace.yaml, and replace bun.lock with pnpm-lock.yaml. The lockfile was imported from Bun's resolution through a Yarn v1 lockfile, so dependency versions do not drift. A fresh resolution paired @effect/platform-node-shared 4.1.4 with effect 4.0.0 and broke Adamantite. allowBuilds records a decision for each dependency with a build script. electron-winstaller runs, because the Squirrel maker needs its 7-Zip binary. The esbuild, msgpackr-extract, and protobufjs scripts only verify prebuilt binaries or print warnings. The old trusted entries for electron, @tailwindcss/oxide, and @parcel/watcher no longer have install scripts. hoistPattern repeats pnpm's default so Electron Forge's system check accepts isolated installs until electron/forge#4188 lands. Refs #278 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Replace `bun update --interactive` in every bump:deps script, the `bun run --parallel` codegen scripts, `bunx` in @v1/auth, and `bun x` in the backend schema generator. pnpm runs the scripts that a regex matches concurrently, so `pnpm run "/^codegen:/"` keeps codegen parallel. Refs #278 Co-Authored-By: Claude Opus 5.5 <[email protected]>
The template commands and recipes now install with `pnpm install` and `pnpm add`, and their messages name pnpm commands. pnpm-workspace.yaml sets saveExact, so the recipes drop `--exact`. The Sentry recipe passes `--allow-build=@sentry/cli` instead of editing trustedDependencies, which pnpm does not read. The remote-cache recipe now finds Turbo behind `pnpm run`, the `pnpm` script shorthand, `pnpm exec`, and `pnpm dlx`. It also stops matching commands such as `turbo-ignore`. Refs #278 Co-Authored-By: Claude Opus 5.5 <[email protected]>
pnpm/setup reads .node-version and the packageManager field, caches the pnpm store, and runs a frozen install, so it replaces the setup-node, setup-bun, cache, and install steps in each job. Refs #278 Co-Authored-By: Claude Opus 5.5 <[email protected]>
The Vercel projects override the install command with `bun install`, which fails now that the workspace globs live in pnpm-workspace.yaml. vercel.json takes precedence over the project settings, so it now sets the pnpm install command. Dropping bunVersion runs the functions on Node, the template's runtime since #296. Refs #278 Co-Authored-By: Claude Opus 5.5 <[email protected]>
444b669 to
b0fa260
Compare
1c2a1af to
29850fd
Compare
…s posthog-js pnpm fails an install when a dependency has an unreviewed build script. posthog-js depends on core-js, whose postinstall only prints a funding message, so the recipe denies it with --allow-build=!core-js. Refs #278 Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
ℹ️ No new issues found in the incremental changes. The earlier remote-cache feedback remains open.
Reviewed changes — Reviewed the PostHog recipe change since the prior review.
- PostHog installation: Denied the
core-jsinstall script when addingposthog-js, allowing pnpm to record the build decision.
gpt-6.1-terra | 𝕏
expo prebuild under pnpm replaces the node_modules/.bun paths that Bun's isolated linker wrote into Podfile.lock and project.pbxproj. Refs #278 Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
ℹ️ No new issues found in this incremental delta; the earlier remote-cache finding remains open.
Reviewed changes — Reviewed the iOS native project regeneration with pnpm paths since the prior Pullfrog review.
- Generated iOS project: Updated CocoaPods references and Xcode project settings to resolve dependencies from pnpm's
node_modules/.pnpmlayout.
gpt-6-luna | 𝕏
`pnpm --filter app exec turbo run build` and the `-F` and `--dir` forms run Turbo, but the recipe's parser does not skip a flag's separate value. Refs #278 Co-Authored-By: Claude Opus 5.5 <[email protected]>
The remote-cache recipe matched direct Turbo calls with a regex that could not skip a flag's separate value, and its script parser stopped at `exec`. One parser now skips flags and their values, then reads whether pnpm runs a binary through `exec` or `dlx`, a script through `run`, or either through the shorthand. Refs #278 Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — Reviewed the remote-cache fix and regression coverage added since fe69832.
- Unified pnpm parsing: Recognized separated flag values before Turbo invocations while distinguishing binary calls from root scripts.
- Added regression coverage: Covered
--filter,-F, and--dirforms while preserving rejection ofturbo-ignore.
Codegen, repository checks, and all 42 template tests passed with existing dependencies. Additional runtime probes verified workflow detection and script/binary discrimination.
gpt-6.1-sol | 𝕏
pnpm refuses packages published less than a day ago, so every install failed for a day after a @sanely release. Exempt @sanely/* and adamantite, as the maintainer's other pnpm repositories do. Refs #278 Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — Reviewed the pnpm minimum release age exception added since the prior Pullfrog review.
- Release-age exclusions: Added
@sanely/*andadamantitetominimumReleaseAgeExcludeso these maintainer-owned packages are not blocked by pnpm’s release-age delay.
gpt-6-luna | 𝕏

After #296, Bun was only the template's package manager. This PR replaces it with pnpm 12.9.0. It moves the package manager config, replaces the lockfile without changing resolved versions, and switches every script, template command, template recipe, CI workflow, and Vercel install command to pnpm. It also regenerates the iOS project, which contained Bun's
node_modules/.bunpaths. #300 held the config part alone, but it couldn't build without the rest, so this PR carries both.Closes #278
Package manager config
workspacesinpackage.jsonpackagesinpnpm-workspace.yamloverridesinpackage.jsonoverridespatchedDependenciesinpackage.jsonpatchedDependenciestrustedDependenciesinpackage.jsonallowBuildsexact = trueinbunfig.tomlsaveExact: truelinker = "isolated"inbunfig.tomlnodeLinkerenv = falseinbunfig.toml.envfiles.bun.lockpnpm-lock.yamlbun-createinpackage.jsonpnpm installresolved@effect/platform-node-sharedto 4.1.4. That version needseffect@^4.1.4, but[email protected]pins[email protected], soadamantite checkcrashed. To keep Bun's resolution, I ranbun install --yarnto write a Yarn v1 lockfile and then ranpnpm importon it.pnpm importdoesn't readbun.lockdirectly.allowBuildsallowselectron-winstaller, whose script copies the 7-Zip binary thatMakerSquirreluses. It deniesesbuild,msgpackr-extract, andprotobufjs, whose scripts only verify prebuilt binaries or print a warning. Bun's entries forelectron,@tailwindcss/oxide, and@parcel/watcherare gone. Those packages no longer have install scripts or aren't in the dependency tree.minimumReleaseAgeExcludelets@sanely/*and adamantite, the maintainer's own packages, skip pnpm's one-day wait for new releases.electron-forge packagerejects pnpm unlessnode-linkerishoistedor a hoist pattern is set.hoistPattern: ["*"]repeats pnpm's default, so the install layout doesn't change. A comment links electron/forge#4188. The packagedapp.asarcontains 13 entries and nonode_modules, because the Vite plugin bundles the app.Commands
bump:depsscript now runspnpm update --interactive. Codegen runspnpm run "/^codegen:/", which starts the matched scripts concurrently, asbun run --paralleldid.apps/docsandapps/webkeep their order withpnpm run codegen:i18n && pnpm run codegen:types.@v1/authand the backend schema generator usepnpm dlx.bun-create, and remove skipspnpm-lock.yamlwhen it lists leftover references.pnpm addandpnpm install, and they drop--exactbecausesaveExactcovers it. The Sentry recipe passes--allow-build=@sentry/cliinstead of writingtrustedDependencies. The PostHog recipe passes--allow-build=!core-jswhen it addsposthog-js, because pnpm fails an install with an unreviewed build script, andcore-js's script only prints a funding message.pnpm run, thepnpm <script>shorthand,pnpm exec, andpnpm dlx. It skips flags and their values, sopnpm --filter app exec turbo run buildcounts too. It no longer counts commands such asturbo-ignoreas Turbo, which the old Bun pattern also matched.pnpm/[email protected]replaces thesetup-node,setup-bun, cache, and install steps in each job. It reads.node-versionandpackageManager, caches the pnpm store, and runs a frozen install.bun install --frozen-lockfile && bun run codegenin their settings.apps/web/vercel.jsonandapps/docs/vercel.jsonnow setinstallCommandto the pnpm equivalent, which takes precedence. They also dropbunVersion, so the functions run on Node.expo prebuildunder pnpm regeneratedPodfile.lockandproject.pbxproj.REACT_NATIVE_PATHand the pod paths now point intonode_modules/.pnpm, and the podspec checksums changed with those paths. Pod versions didn't change. The pbxproj also has new object IDs in a new order.apps/apptells users to runpnpm template doctor.Not in this PR
pnpm template doctorstill checks the README forbun create metaideas/v1. docs: update docs, skills, and AGENTS.md for pnpm and Node #280 rewrites the README and feat: create projects withpnpm create @metaideas/v1#288 adds the new create command, so the check changes with them.Checks
I ran these on Linux with Node 26.13.0 and pnpm 12.9.0, with Bun removed from
PATH, so a leftoverbuncall would fail.After deleting every
node_modules,pnpm install --frozen-lockfilepasses. Theevlogpatch applies, and the overrides resolve.pnpm run codegen,check,analyze,boundaries, andenv:checkpass.pnpm exec turbo run test test:template --forcepasses all 23 tasks with none cached.pnpm exec turbo build --forcepasses all 15 tasks with none cached, includingelectron-forge package.pnpm template doctorpasses.pnpm --filter @v1/auth run secretprints a secret.pnpm --filter @v1/backend run generate:authregeneratesschema.generated.ts, and only the command in its header changes.I ran each template recipe on its own fresh clone. Each run did a frozen install, codegen,
pnpm exec turbo gen <recipe>,pnpm install, codegen,pnpm run fix, andpnpm template doctor. These recipes passed end to end, and each changed between 2 and 10 files: sentry onapi,app, andmobile, posthog onapi,app, andmobile, bull-board, emdash, skew, new-package, and remote-cache. posthog onappfailed oncore-jsbefore the fix above. remote-cache added the Turbo variables to all three workflows.realtime on
appstops at its own check thatapps/appis connected toapps/apibefore any pnpm command runs. Its one pnpm command,pnpm add @v1/realtime@workspace:*, works in a fresh clone. I couldn't run new-feature unattended, because plop can't take answers to its file checklist from--args. new-feature runs no pnpm commands.On macOS, a fresh clone ran
pnpm run --filter mobile prebuild. Afterward, nonode_modules/.bunpaths remain underapps/mobile.electron-forge packageproduced anapp.asarwith 13 entries and none fromnode_modules.On an iPhone 17 Pro simulator with iOS 26.5,
pnpm run --filter mobile iosbuilt the app with 0 errors. Metro loggediOS Bundled 4168ms apps/mobile/src/index.ts (2250 modules), and the first screen rendered without an error.minimumReleaseAgeExcludeexempts@sanely/*and adamantite from pnpm's one-day release-age wait, as the maintainer's other pnpm repositories do. Without it, every install failed for a day after the@sanely0.1.0 release. A fresh clone of the final commit passed a full lockfile verification at 19:02 UTC, before those packages turned one day old. The earlier local runs setpnpm_config_minimum_release_age=0instead.Reviewed with code-review: 3 rounds with gpt-6.1-sol. Verdict: approved. That review covers everything through 72bf6d2. Pullfrog reviewed the final commit, 25d7c23, which adds the release-age exemption.
🤖 Created with Claude Opus 5.5 in T3 Code