Skip to content

feat: infer pnpm bare scripts through run#1540

Open
artile wants to merge 2 commits intortk-ai:developfrom
tao-io:feat/pnpm-script-run-injection
Open

feat: infer pnpm bare scripts through run#1540
artile wants to merge 2 commits intortk-ai:developfrom
tao-io:feat/pnpm-script-run-injection

Conversation

@artile
Copy link
Copy Markdown

@artile artile commented Apr 26, 2026

Summary

  • make rtk pnpm <script> infer pnpm run <script> for bare script names while keeping specialized pnpm commands unchanged
  • preserve pnpm global filters before the injected run subcommand for workspace-filtered scripts
  • broaden pnpm discover rewrite coverage and add regression tests for script classification, output filtering, rewrite, hook check, and filtered script arg ordering

Test plan

  • rtk cargo test --manifest-path /root/TAO/Tools/rtk/Cargo.toml test_pnpm_subcommand_routing
  • rtk cargo test --manifest-path /root/TAO/Tools/rtk/Cargo.toml test_pnpm_run_args_preserve_global_filters
  • rtk cargo test --manifest-path /root/TAO/Tools/rtk/Cargo.toml test_filter_pnpm_script_output
  • rtk cargo test --manifest-path /root/TAO/Tools/rtk/Cargo.toml test_rewrite_pnpm_command
  • rtk cargo test --manifest-path /root/TAO/Tools/rtk/Cargo.toml test_rewrite_compound_pnpm_and_git
  • rtk cargo test --manifest-path /root/TAO/Tools/rtk/Cargo.toml test_normalize_hook_check_command_shell_wrapper
  • rtk cargo build --manifest-path /root/TAO/Tools/rtk/Cargo.toml
  • rtk cargo clippy --manifest-path /root/TAO/Tools/rtk/Cargo.toml --all-targets
  • rtk cargo test --manifest-path /root/TAO/Tools/rtk/Cargo.toml --all
  • rtk cargo run --manifest-path /root/TAO/Tools/rtk/Cargo.toml -- rewrite pnpm build
  • rtk cargo run --manifest-path /root/TAO/Tools/rtk/Cargo.toml -- rewrite pnpm test:coverage
  • rtk cargo run --manifest-path /root/TAO/Tools/rtk/Cargo.toml -- hook check bash \"pnpm build\"
  • /root/TAO/Tools/rtk/target/debug/rtk pnpm build from /root/TAO/Projects/MyRemotely/web-app
  • /root/TAO/Tools/rtk/target/debug/rtk -v pnpm --filter @app/web build confirms native shape pnpm --filter=@app/web run build

🤖 Generated with Claude Code

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 26, 2026

CLA assistant check
All committers have signed the CLA.

@pszymkowiak pszymkowiak added effort-medium 1-2 jours, quelques fichiers enhancement New feature or request labels Apr 26, 2026
@pszymkowiak
Copy link
Copy Markdown
Collaborator

[w] wshm · Automated triage by AI

📊 Automated PR Analysis

Type feature
🟡 Risk medium

Summary

Adds automatic run subcommand injection for bare pnpm script names (e.g., rtk pnpm build becomes pnpm run build), while preserving native pnpm subcommands and global filters like --filter. Also broadens the pnpm discover/rewrite rule to cover all pnpm invocations and adds a helper to normalize shell-wrapped hook check commands.

Review Checklist

  • Tests present
  • Breaking change
  • Docs updated

Analyzed automatically by wshm · This is an automated analysis, not a human review.

@artile artile changed the base branch from master to develop April 26, 2026 12:33
artile and others added 2 commits April 26, 2026 15:37
Make rtk pnpm route bare script names through pnpm run while keeping specialized pnpm commands and hook rewrites intact.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Keep pnpm global filter flags before the injected run subcommand so filtered workspace script execution matches native pnpm semantics.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@artile artile force-pushed the feat/pnpm-script-run-injection branch from 93a899f to 942c653 Compare April 26, 2026 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort-medium 1-2 jours, quelques fichiers enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants