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

贡献者指南