Skip to content

perf: make package-manager-delegated completions faster#142

Merged
AmirSa12 merged 3 commits into
mainfrom
fix/pm-delegation
Jul 20, 2026
Merged

perf: make package-manager-delegated completions faster#142
AmirSa12 merged 3 commits into
mainfrom
fix/pm-delegation

Conversation

@AmirSa12

@AmirSa12 AmirSa12 commented Jul 18, 2026

Copy link
Copy Markdown
Member

tab <pm> complete -- <cli> ... (the pnpm <cli> <TAB> path, plus the npm/yarn/bun equivalents) no longer parses <pm> --help on the delegation path and launches the target CLI at most once instead of twice. On a real project this drops the tab overhead from ~0.5s to a single CLI launch.

Also fixes a correctness gap where a cli installed only locally (reachable via <pm> <cli> but not on PATH) could be detected yet return no completions: the fetch now tries the CLI directly first and falls back to running it through the package manager. The parsed <pm> --help command tree is cached on disk (fingerprinted by the resolved executable, with a TTL) so package-manager-self completions stay fast too.

@changeset-bot

changeset-bot Bot commented Jul 18, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ee0e5c6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@bomb.sh/tab Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Jul 18, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@bomb.sh/tab@142

commit: ee0e5c6

@AmirSa12 AmirSa12 changed the title perf: WIP perf: make package-manager-delegated completions much faster Jul 20, 2026
@AmirSa12 AmirSa12 changed the title perf: make package-manager-delegated completions much faster perf: make package-manager-delegated completions faster Jul 20, 2026
@AmirSa12
AmirSa12 merged commit 2005004 into main Jul 20, 2026
12 checks passed
@AmirSa12
AmirSa12 deleted the fix/pm-delegation branch July 20, 2026 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant