Skip to content

docs(dlx): document version selection and multi-binary behavior - #7267

Open
vjymisal0 wants to merge 1 commit into
yarnpkg:masterfrom
vjymisal0:docs-dlx-missing-cases
Open

docs(dlx): document version selection and multi-binary behavior#7267
vjymisal0 wants to merge 1 commit into
yarnpkg:masterfrom
vjymisal0:docs-dlx-missing-cases

Conversation

@vjymisal0

Copy link
Copy Markdown

Fixes #7072

yarn dlx's usage text (which generates https://yarnpkg.com/cli/dlx) didn't document:

  1. How to request a specific version of the package (it's supported via the regular semver-range syntax on command/-p,--package, e.g. yarn dlx eslint@8).
    2/3. How to run a binary other than the package's own name when a package exposes multiple binaries (pass the binary's name as command while the package itself is installed via -p,--package).
  2. What happens when the requested binary name doesn't exist in the installed package(s) (it fails with a "Binary not found" error from executeWorkspaceAccessibleBinary).

This adds two examples and a documentation paragraph covering all four, and a .yarn/versions release file (patch bump for @yarnpkg/plugin-dlx and its consumer @yarnpkg/cli; yarn version check passes).

yarn eslint --max-warnings 0 packages/plugin-dlx/sources/commands/dlx.ts and yarn tsc -p . --noEmit both pass locally.

Documents the four cases raised in the issue that were previously
undocumented on https://yarnpkg.com/cli/dlx:
- how to request a specific version of the package
- how to run a differently-named binary from an installed package
- what happens when the requested binary doesn't exist
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.

dlx document missing 4 more cases

1 participant