feat: add Bun and Deno runtime support#548
Conversation
Add token-optimized filtering for Bun and Deno CLI commands: **Bun commands:** - `rtk bun install/add/remove` — strip progress bars, version headers (80% reduction) - `rtk bun test` — failures only via runner (90% reduction) - `rtk bun build` — errors only via runner - `rtk bun run` — passthrough (script output unpredictable) - `rtk bun pm ls` — JSON parsing with sorted compact tree - `rtk bunx <tool>` — smart routing: tsc→tsc filter, eslint→lint filter, else→error filter **Deno commands:** - `rtk deno test` — failures only via runner (90% reduction) - `rtk deno lint` — strip download lines, tee recovery on failure - `rtk deno check` — strip download lines, tee recovery on failure - `rtk deno run/task` — passthrough with download line stripping - `rtk deno compile` — errors only via runner - `rtk deno install` — passthrough **Hook rewriting:** - Added bun/bunx/deno patterns to discover registry - Commands auto-rewritten by `rtk rewrite` hook **Testing:** - 11 unit tests covering filter logic, JSON parsing, edge cases - All existing tests pass (898 total) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: bz00qa <bz00qa.hub@gmail.com>
31443bf to
3100a8f
Compare
…docs and tests Remove scope creep from PR rtk-ai#550: - Restore rules.rs/registry.rs to develop baseline, keep only in-scope changes - Remove strip_verbose_flags(), proxy -f routing, expanded subcommands - Remove bun/deno/bunx from COMMAND_REGISTRY (unmerged PR rtk-ai#548) - Remove context/watch/dedup from COMMAND_REGISTRY (non-existent PR rtk-ai#553) - Remove detect_patterns() and normalize_cmd_base() (deferred) - Remove PatternOpportunity from report Add missing tests: consumer_base(), effective_idx Add docs: CHANGELOG.md, README.md gain section, ARCHITECTURE.md discover module Fix clippy warnings in new test code (vec![] → array, single_match) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: bZ00qa <167500396+bz00qa@users.noreply.github.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Besides the Deno support, isn't the bun integration a duplicate of #453? |
I think we can stay with this variant |
|
|
|
Hey We are cleaning up the codebase and improving the project structure for better onboarding. As part of this effort, PR #826 reorganizes No logic changes — only file moves and import path updates. What you need to doRebase your branch on git fetch origin && git rebase origin/developGit detects renames automatically. If you get import conflicts, update the paths: use crate::git; // now: use crate::cmds::git::git;
use crate::tracking; // now: use crate::core::tracking;
use crate::config; // now: use crate::core::config;
use crate::init; // now: use crate::hooks::init;
use crate::gain; // now: use crate::analytics::gain;Need help rebasing? Tag @aeppling |
Summary
Add token-optimized filtering for Bun and Deno CLI commands, extending RTK's JavaScript/TypeScript runtime coverage.
Bun commands
rtk bun install/add/remove— strip progress bars, version headers (~80% reduction)rtk bun test— failures only via runner (~90% reduction)rtk bun build— errors only via runnerrtk bun run— passthrough (script output unpredictable)rtk bun pm ls— JSON parsing with sorted compact dependency treertk bunx <tool>— smart routing:tsc→ tsc filter,eslint→ lint filter, others → error filterDeno commands
rtk deno test— failures only via runner (~90% reduction)rtk deno lint/check— strip download lines, tee recovery on failurertk deno run/task— passthrough with download line strippingrtk deno compile— errors only via runnerrtk deno install— passthroughHook integration
bun,bunx,denopatterns to discover registry (PATTERNS + RULES)rtk rewritehookis_operational_commandsecurity whitelistFiles changed
src/bun_cmd.rs(261 lines),src/deno_cmd.rs(254 lines)src/main.rs(mod declarations, Commands enum, subcommand enums, dispatch logic)src/discover/rules.rs(3 patterns + 3 rules)Test plan
cargo clippy— no new warningscargo fmt— clean🤖 Generated with Claude Code