fix(scripts): add explicit run to filtered pnpm invocations#123
Conversation
`pnpm dev:docs` and the `demo:*` scripts nested `pnpm --filter <pkg> <script>` without `run`. The parent pnpm process exports `npm_config_recursive=true` into the child environment, and pnpm's bare-command parser (used when `run` is omitted) rejects it with `Unknown option: 'recursive'`. Adding `run` routes through the script parser and resolves the error. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe pull request updates package.json script definitions for demo commands and dev:docs, changing the pnpm invocation syntax from directly passing the script name to using the explicit "run" subcommand with "--filter". ChangesPackage Script Command Update
Estimated code review effort: 1 (Trivial) | ~3 minutes Related PRs: None found. Suggested labels: chore, build Suggested reviewers: None identified. Poem:
🚥 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 |
Problem
pnpm dev:docsfails with:Root cause
dev:docsand thedemo:*scripts nestpnpm --filter <pkg> <script>withoutrun. When the parentpnpmprocess runs the lifecycle script, it exports its config as environment variables, includingnpm_config_recursive=true. The nestedpnpm --filter ./docs docs(norun) goes through pnpm's bare-command parser, which reads that env var as a CLI option and rejects it withUnknown option: 'recursive'.Adding an explicit
runroutes the invocation through pnpm's script parser, which ignores the option and resolves the script correctly.Fix
Add
runto all nested filtered invocations:dev:docsdemo:e2e,demo:identity,demo:identity-a2a,demo:payments,demo:skyfire-kyaVerification
pnpm dev:docsnow reachesmintlify devinstead of erroring on therecursiveoption. (mintlify then reports a local node-version requirement, which is an environment concern unrelated to this change.)AI usage
Written with assistance from Claude Code (Claude Opus 4.8). AI diagnosed the root cause, applied the script edits, and verified the fix; changes were human-reviewed.
🤖 Generated with Claude Code
Summary by CodeRabbit
pnpm --filter ... run ...pattern.