feat(x): add --package/-p flag for specifying package separately from binary#32855
Open
bartlomieju wants to merge 1 commit intomainfrom
Open
feat(x): add --package/-p flag for specifying package separately from binary#32855bartlomieju wants to merge 1 commit intomainfrom
bartlomieju wants to merge 1 commit intomainfrom
Conversation
… binary Add `--package`/`-p` flag to `deno x` that allows specifying the package to install separately from the binary to execute, matching the `npx -p <package> <binary>` convention. This is useful when a package exposes multiple binaries (e.g. `typescript` has `tsc` and `tsserver`): deno x -p typescript tsc deno x -p typescript@5 tsc Previously, the only way to do this was: deno x typescript/tsc Closes #31667 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #31667
Adds
--package/-pflag todeno xthat allows specifying the package to install separately from the binary to execute, matching thenpx -p <package> <binary>convention.This is useful when a package exposes multiple binaries (e.g.
typescripthastscandtsserver):Previously, the only way was
deno x typescript/tsc.The implementation combines
--packageand the binary name into{package}/{binary}before feeding it to the existing npm resolution flow, so all existing behavior is preserved.Test plan
-p(short) and--package(long) formsdeno xspec tests still pass🤖 Generated with Claude Code