Skip to content

rewrite: no support for pnpm --filter or pnpm exec #3858

Open

Description

@MarcosIRissottoB

Problem

In a pnpm workspace monorepo, pnpm --filter <package> <cmd> is the canonical way to run any script scoped to one app (pnpm --filter @scope/app typecheck, ... test, ... dev, ... build, ... lint). Similarly, pnpm exec <tool> is the canonical way to invoke a locally-installed binary (pnpm exec vitest, pnpm exec eslint, pnpm exec tsc, pnpm exec playwright, pnpm exec prettier).

Neither is currently recognized by rtk rewrite:

```
$ rtk rewrite "pnpm --filter @healthtech/professional typecheck"

exit 1, no output — no rewrite

$ rtk pnpm --help
Commands:
list List installed packages (ultra-dense)
outdated Show outdated packages (condensed: "pkg: old → new")
install Install packages (filter progress bars)
build Build (generic passthrough, no framework-specific filter)
typecheck Typecheck (delegates to tsc filter)
help Print this message or the help of the given subcommand(s)
```

No --filter flag, no test/lint/dev subcommands, and no passthrough for pnpm exec <tool>.

Impact (measured with rtk discover)

Over a 30-day window in one monorepo (97 sessions, 13,492 Bash commands), these were the two most frequent unhandled commands:

```
TOP UNHANDLED COMMANDS -- open an issue?
Command Count Example
pnpm exec 251 pnpm exec eslint src e2e ...
pnpm 126 pnpm --filter @healthtech/landing typecheck ...
```

rtk discover itself points here, so filing as requested.

Ask

  • Add --filter <pkg> support to rtk pnpm, at least for the subcommands it already understands (typecheck, build) plus the missing test/lint/dev verbs, filtering the same way as the unscoped equivalents.
  • Add passthrough/filtering for pnpm exec <tool> — ideally delegating to rtk's existing per-tool filters (rtk vitest, rtk lint, rtk tsc, rtk playwright, rtk format) when the tool name matches one of those.

Environment: rtk 0.31.0, pnpm workspace monorepo (Turborepo).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions