Skip to content

fix(scripts): add explicit run to filtered pnpm invocations#123

Merged
venables merged 1 commit into
mainfrom
venables/no-recursive
Jul 2, 2026
Merged

fix(scripts): add explicit run to filtered pnpm invocations#123
venables merged 1 commit into
mainfrom
venables/no-recursive

Conversation

@venables

@venables venables commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Problem

pnpm dev:docs fails with:

$ pnpm --filter ./docs docs
[ERROR] Unknown option: 'recursive'
For help, run: pnpm help docs

Root cause

dev:docs and the demo:* scripts nest pnpm --filter <pkg> <script> without run. When the parent pnpm process runs the lifecycle script, it exports its config as environment variables, including npm_config_recursive=true. The nested pnpm --filter ./docs docs (no run) goes through pnpm's bare-command parser, which reads that env var as a CLI option and rejects it with Unknown option: 'recursive'.

Adding an explicit run routes the invocation through pnpm's script parser, which ignores the option and resolves the script correctly.

Fix

Add run to all nested filtered invocations:

  • dev:docs
  • demo:e2e, demo:identity, demo:identity-a2a, demo:payments, demo:skyfire-kya

Verification

pnpm dev:docs now reaches mintlify dev instead of erroring on the recursive option. (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

  • Chores
    • Updated several demo and documentation commands to use a consistent pnpm --filter ... run ... pattern.
    • This should make the affected scripts more reliable and easier to run across the monorepo.

`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>
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a76fedf5-3af1-43b6-adbd-3b431de951e8

📥 Commits

Reviewing files that changed from the base of the PR and between 32a4e19 and d0c385f.

📒 Files selected for processing (1)
  • package.json

Walkthrough

The 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".

Changes

Package Script Command Update

Layer / File(s) Summary
Update pnpm filter script commands
package.json
Demo commands (demo:e2e, demo:identity, demo:identity-a2a, demo:payments, demo:skyfire-kya) and dev:docs now use pnpm --filter <path> run <script> instead of pnpm --filter <path> <script>.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Related PRs: None found.

Suggested labels: chore, build

Suggested reviewers: None identified.

Poem:

A hop, a filter, a "run" appended,
Scripts now speak as pnpm intended.
Demos and docs, all in a row,
Six small lines, tidy they go. 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the core fix: adding explicit run to filtered pnpm script invocations.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch venables/no-recursive

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@venables venables merged commit f16b753 into main Jul 2, 2026
3 checks passed
@venables venables deleted the venables/no-recursive branch July 2, 2026 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant