rtk-ai/rtk

Add `pnpm nx` command patterns for Nx monorepos

Open

#444 建立於 2026年3月9日

在 GitHub 查看
 (1 留言) (1 反應) (0 負責人)Rust (2,914 fork)batch import
area:clieffort-mediumenhancementfilter-qualityhelp wantedpriority:medium

倉庫指標

Star
 (48,085 star)
PR 合併指標
 (平均合併 11天 1小時) (30 天內合併 45 個 PR)

描述

Problem

pnpm nx * commands are not covered by RTK's rewrite/compression patterns, causing them to pass through uncompressed. In our monorepo (Nx-managed, 20+ projects), we observed 313 pnpm nx * passthrough invocations in a single audit window — making this the largest single category of uncompressed output.

Related Issues

  • #122 — pnpm + glab integration (P3)
  • #259 — pnpm --filter support (PR #270 open)
  • #294 — pnpm exec / script dispatch

These all point to the same gap: pnpm as a command prefix is not systematically handled.

High-Impact Patterns

Command Frequency Notes
pnpm nx run <project>:<target> ~180 Build, typecheck, lint, test
pnpm nx show project <name> ~60 Project details (large JSON output)
pnpm nx graph ~30 Dependency graph
pnpm nx affected ~25 CI/change detection
pnpm nx run-many ~18 Batch operations

Suggested Approach

Add pnpm nx as a recognized command prefix in the rewrite rules, delegating to existing patterns where the underlying command is already supported (e.g., pnpm nx run -> build output compression).

Environment

  • RTK v0.27.2
  • pnpm v9.x
  • Nx 20.x monorepo

貢獻者指南