Add pnpm-workspace.yaml to allow esbuild build scripts#1196
Conversation
pnpm 10+ blocks all dependency build scripts by default unless explicitly approved via allowBuilds or onlyBuiltDependencies in pnpm-workspace.yaml. esbuild (transitive dependency of vitest -> vite) has a postinstall script that downloads a platform-specific native binary. Without this config, pnpm install exits non-zero with [ERR_PNPM_IGNORED_BUILDS], breaking any downstream packaging (AUR, Nix, Docker) or local setup using pnpm >=10. Refs: Fission-AI#1195
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR adds an ChangesWorkspace esbuild Configuration
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a pnpm-workspace.yaml config intended to permit build scripts for esbuild.
Changes:
- Introduces
pnpm-workspace.yaml - Configures
allowBuildsto allowesbuildbuilds
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| allowBuilds: | ||
| esbuild: true |
alfred-openspec
left a comment
There was a problem hiding this comment.
Verified the clean-install fix in a fresh checkout with pnpm 10.32.1: \ ERR_PNPM_NO_PKG_MANIFEST No package.json found in /Users/alfred/.openclaw/workspace now allows esbuild's postinstall and \ ERR_PNPM_RECURSIVE_EXEC_NO_PACKAGE No package found in this workspace passes. The config is scoped to the one dependency that needs a build script and should be included in source tarballs for downstream packagers. Looks good to merge.
Problem
pnpm installexits non-zero from a fresh checkout when using pnpm >=10:This breaks downstream packaging (AUR, Nix, Docker) and any local setup using a distro-packaged pnpm (Arch Linux, Homebrew, etc.).
Root cause
The repository has no
pnpm-workspace.yaml. In pnpm 10+, build scripts for all dependencies are blocked by default unless explicitly approved viaallowBuildsin the workspace config.esbuild@0.25.8is a transitive dependency ofvitest→vite. Its postinstall script downloads a platform-specific native binary. Without a workspace config, pnpm blocks it and exits non-zero — even though the TypeScript compilation itself does not invoke esbuild directly.What this PR does
Adds a minimal
pnpm-workspace.yamlthat explicitly allows esbuild's build script:The file is not gitignored (
.gitignoreonly ignores.pnpm-store/), so it will be included in release tarballs going forward.Why this is safe
pnpm/action-setup@v4withversion: 9), which predates this feature and ignores unknown workspace config keysflake.nixpins pnpm 9 for the same reasonallowBuildsformat is backward-compatible — pnpm 9 ignores it entirelyDownstream impact
Once merged, the workarounds in downstream packagers can be removed.
Summary by CodeRabbit