Skip to content

feat(pnpm): Add filter argument support#270

Open
KuSh wants to merge 1 commit intortk-ai:masterfrom
KuSh:pnpm-filters
Open

feat(pnpm): Add filter argument support#270
KuSh wants to merge 1 commit intortk-ai:masterfrom
KuSh:pnpm-filters

Conversation

@KuSh
Copy link

@KuSh KuSh commented Feb 27, 2026

  • Add support for pnpm global filter arguments (--filter) across all pnpm commands (list, outdated, install, etc.).
  • Merge pnpm filters with native command arguments (--filter + custom args like --depth).
  • Implement proper handling for Vec<String> (text filters) and Vec<OsString> (OS-specific filters).
  • Add unit tests for merge_pnpm_args and CLI parsing to validate expected behavior.

This enables users to apply workspace-specific filtering directly via --filter @scope before running pnpm commands, reducing token overhead by excluding irrelevant packages/dependencies from output.

Fixes: #259

FIXME: Add notes for typechecking/building with workspaces when filters are applied.

Note: Not sure but the PnpmCommands::Build -> next_cmd::run seems suspect to me. What if the project use anything else (vite / rspack / ...) ?

- Add support for pnpm global filter arguments (`--filter`) across all pnpm commands (`list`, `outdated`, `install`, etc.).
- Merge pnpm filters with native command arguments (`--filter` + custom args like `--depth`).
- Implement proper handling for `Vec<String>` (text filters) and `Vec<OsString>` (OS-specific filters).
- Add unit tests for `merge_pnpm_args` and CLI parsing to validate expected behavior.

This enables users to apply workspace-specific filtering directly via `--filter @scope` before running pnpm commands,
reducing token overhead by excluding irrelevant packages/dependencies from output.

Fixes: rtk-ai#259

FIXME: Add notes for typechecking/building with workspaces when filters are applied.
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.

pnpm --filter command results in rtk usage output

1 participant