feat(main): --pnpm-filter global Clap arg + dispatch updates
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 81.1k
- Forks
- 5.1k
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 35
Description
Part of #512 — pnpm workspace filter support.
Phase 2: src/main.rs
2a. Add hidden global arg to Cli struct (~line 88)
/// pnpm workspace filter (injected by rewrite layer for --filter/-F)
#[arg(long = "pnpm-filter", global = true, hide = true)]
pnpm_filter: Option<String>,
hide = true — users don't type this, the rewrite layer injects it.
2b. Update dispatch for all affected commands
Pass cli.pnpm_filter.as_deref() to every affected run() call:
| Line | Current | New |
|---|---|---|
| ~1617 | tsc_cmd::run(&args, cli.verbose) |
tsc_cmd::run(&args, cli.verbose, cli.pnpm_filter.as_deref()) |
| ~1625 | lint_cmd::run(&args, cli.verbose) |
lint_cmd::run(&args, cli.verbose, cli.pnpm_filter.as_deref()) |
| ~1629 | prettier_cmd::run(&args, cli.verbose) |
prettier_cmd::run(&args, cli.verbose, cli.pnpm_filter.as_deref()) |
| ~1633 | format_cmd::run(&args, cli.verbose) |
format_cmd::run(&args, cli.verbose, cli.pnpm_filter.as_deref()) |
| ~1637 | playwright_cmd::run(&args, cli.verbose) |
playwright_cmd::run(&args, cli.verbose, cli.pnpm_filter.as_deref()) |
| ~1574 | vitest_cmd::run(...) |
Add cli.pnpm_filter.as_deref() |
| ~1325–1348 | pnpm_cmd::run(...) (3 arms + passthrough) |
Add cli.pnpm_filter.as_deref() to all |
| ~1344 | tsc_cmd::run (from PnpmCommands::Typecheck) |
Same |
Also update the npx routing (~lines 1710, 1713, 1768, 1771) that delegates to tsc_cmd, lint_cmd, prettier_cmd, playwright_cmd.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/main.rs by locating the Cli struct and the dispatch sections around lines 1325–1348, 1574, 1617–1637, and 1710–1771. Trace the affected command run calls and confirm the hidden pnpm_filter value is forwarded through pnpm and npx routing. Done means all listed tsc, lint, prettier, format, playwright, and vitest paths receive the optional filter.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100