Fix pnpm build approval so mise install succeeds - #1024
Conversation
pnpm 11.25.0 no longer reads the pnpm.onlyBuiltDependencies field from package.json, and the allowBuilds entries in pnpm-workspace.yaml were left as unresolved "set this to true or false" placeholders. Both left every listed dependency's build script unapproved, so pnpm aborted with ERR_PNPM_IGNORED_BUILDS during mise install. Assisted-by: Claude Code:claude-sonnet-5
✅ Deploy Preview for fedify-json-schema canceled.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe pnpm configuration removes the package-level Changespnpm build policy
Estimated code review effort: 2 (Simple) | ~5 minutes Merge Risk: ⚪ Minimal · up to This moves dependency build-script permissions into the workspace configuration with explicit enabled and disabled packages, allowing fresh installs to complete under pnpm’s build approval rules. No merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
Summary
mise installcurrently fails on a fresh checkout. Thepnpm-installdeps provider aborts withERR_PNPM_IGNORED_BUILDSbecause every listed dependency's build script is treated as unapproved.Two things caused this.
package.jsondeclaredpnpm.onlyBuiltDependencies, but pnpm 11.25.0 no longer reads that field frompackage.json; it now lives underallowBuildsinpnpm-workspace.yaml.pnpm-workspace.yamlalready had anallowBuildssection, but most entries were left as the literal placeholder string"set this to true or false"instead of an actual boolean, so pnpm did not treat them as approved.This PR removes the stale
pnpm.onlyBuiltDependenciesfield and replaces the placeholder values with explicittrue/falsedecisions, allowing builds for dependencies already trusted elsewhere in the workspace (better-sqlite3,lmdb,msgpackr-extract,@parcel/watcher,@netlify/content-engine,content-engine,contentful,netlify-cli) and disabling builds for two that don't need a native/postinstall step in this workspace (es5-ext,unix-dgram).Related Links
AI disclosure
Diagnosed and fixed with assistance from Claude Code (Claude Sonnet 5): the tool ran
mise install, read the pnpm error output, identified both root causes, and proposed theallowBuilds/package.jsonedits, which I reviewed before committing.