chore(deps): update dependency jdx/usage to v3#22
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
d7d706c to
a74ed3d
Compare
a74ed3d to
601f2f0
Compare
99a6d54 to
a7f3112
Compare
9b6232b to
475efac
Compare
5c8d32d to
7c3ae14
Compare
a1fa08b to
0b43067
Compare
0b43067 to
de8b7da
Compare
25448cd to
3547905
Compare
d044e84 to
aa39f27
Compare
aa39f27 to
d876010
Compare
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.
This PR contains the following updates:
2.18.2→3.5.2Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
Release Notes
jdx/usage (jdx/usage)
v3.5.2: : musl publish fixCompare Source
A patch release that restores publishing of the
x86_64-unknown-linux-muslprebuilt binary, which failed to upload in v3.5.1.Fixed
x86_64-unknown-linux-muslfailed withcan't find crate for 'core'aftercrossfell back to hostcargowithout the target installed. The publish workflow now runsrustup target add ${{ matrix.target }}for each matrix entry (skipping the syntheticuniversal-apple-darwintarget) before invokingupload-rust-binary-action, so musl and other non-default triples build and upload reliably.Full Changelog: jdx/usage@v3.5.1...v3.5.2
💚 Sponsor usage
usage is built by @jdx at en.dev — an independent developer-tooling studio behind mise, aube, hk, and more. Work on usage is funded by sponsorships.
If
usagepowers CLI specs, docs, or completions for a tool you maintain or use, please consider sponsoring at en.dev. Every sponsorship helps the project stay independent and moving.v3.5.0: : Type-Safe SDKs and Zsh Colon FixesCompare Source
This release introduces
usage generate sdk— type-safe subprocess-wrapper SDKs for TypeScript and Python derived from a usage spec — and fixes two zsh completion bugs around colons in subcommand and value names that were biting mise users.Added
usage generate sdkfor TypeScript and Python (#623 by @gaojunran). A new generator emits a type-safe SDK client for any usage-described CLI. The SDK is a subprocess wrapper — not a native binding — so it works for any binary on$PATH, with typed args, flags, and choice-constrained values instead of stringly-typedsubprocess.run/spawncalls.Each generated SDK has three pieces: a types module (dataclasses / interfaces, with
Literal/ union types for choices and global flags propagated to every subcommand), a client module mirroring the subcommand tree withexec()methods that build the argv list, and a small runtime module wrappingsubprocess.run/child_process.spawn. See the SDK generation guide for the full walkthrough. Rust support is planned.usage sponsorscommand and docs sponsor block (#662, #608, #656). The new top-levelusage sponsorscommand and a sponsor strip on the docs site acknowledge 37signals and link to the canonical en.dev sponsor pages. A dedicated/sponsorsdocs page lists tiers fetched live fromen.dev/sponsors.json.More CLI-framework integration guides (#655, #667 by @gaojunran). The docs now cover using usage alongside JCommander, picocli, and Clikt (Java/Kotlin) and urfave/cli and Kong (Go), joining the earlier Commander.js / oclif / yargs / Typer / Click guides.
Fixed
zsh: all subcommands with a shared colon prefix now show up in completion (#666 by @zeitlinger).
_describegroups matches that share a\:-escaped prefix and surfaces only one entry per group, so a spec withrelease:create,release:docs-sync,release:pr, andrelease:updatewould only ever showrelease:createin the menu. The completion now builds its own display column and callscompadddirectly so every match is offered, with descriptions padded for column alignment. Regenerate zsh completions to pick up the fix. Surfaced via jdx/mise tasks.zsh: completion no longer truncates values at the first colon (#670 by @davidolrik). Completing a mise task named
chezmoi:brew:dumpwas insertingchezmoiand then destroying the user's typed:brew:on the next<Tab>, because_describeparsescandidate:descriptionin both the display and insert arrays it receives. The fix escapes colons in the insert column the same way the display column was already escaped. Regenerate zsh completions to pick up the fix.parse: orphan short/long aliases on a re-declared global flag are preserved (#659 by @JamBalaya56562). Follow-up to #649. When a subcommand re-declared an inherited global flag as non-global and added a new alias (e.g. mise's
run/tasks runre-declaring long-only--raw/--silentas-r --raw/-S --silent), the merge kept the global flag but discarded the re-declaration wholesale, throwing away the new short. The parser now unions the re-declaration's extrashort/longaliases (matched on a shared long name) onto the surviving global flag, so completions likemycli run -r sample:run -- <TAB>work andusage_raw=truereachesas_env()and mount scripts. This makes mise'spromote_orphan_shortsworkaround unnecessary.Changed
r#"…"#raw strings in the documentation andexamples/mise.usage.kdlwere converted to KDLv2#"""…"""#, matching the rest of the docs that already use KDLv2 syntax (#true, etc.).New Contributors
Full Changelog: jdx/usage@v3.4.0...v3.5.0
💚 Sponsor usage
usage is built by @jdx at en.dev — an independent developer-tooling studio behind mise, aube, hk, and more. Work on usage is funded by sponsorships.
If
usagepowers CLI specs, docs, or completions for a tool you maintain or use, please consider sponsoring at en.dev. Every sponsorship helps the project stay independent and moving.v3.4.0: : Readable KDL specs and tighter shell completionsCompare Source
A small but pleasant release: spec files round-trip with human-readable multiline strings instead of
\n-laden one-liners, and three completion-side bugs are fixed across zsh, nushell, and the parser.Added
Multiline KDL strings for descriptions (#639 by @gaojunran). When the spec serializer encounters a string value containing newlines — typically
long_help,help_md, multi-linecomplete runscripts, etc. — it now emits a KDL raw multiline string literal instead of a single-line string with embedded\nescapes:The number of
#delimiters is computed automatically so values containing embedded"""sequences are always escaped safely.Fixed
zsh: consistent single-quoting for choice values with spaces (#635).
usage complete-word --shell zshnow emits two tab-separated columns per match — a display string for_describe's menu rendering and a pre-shell-quoted insert string — and the generated completion script wires them through_describe ... -U -Q -S ''. Choice values likeAlice AliceorA B & Care inserted verbatim as'Alice Alice'instead of zsh's default mix of backslash and single-quote styles, and values starting with'correctly switch to menu-insert mode so the leading quote isn't truncated as a longest-common-prefix. If you have existing generated zsh completion scripts, regenerate them to pick up the fix.nushell: invoke commands as externals with
^(#638 by @silvanshade). Generated nushell completion scripts now prefix the user's CLI and theusagecallback with^, e.g.^mybin usage | collect | save $spec_fileand(^usage complete-word ...). Without the caret, nushell parsed baremybinas an internal function and errored withExtra positional argumentwhen loading the completion file.parser: keep inherited global flags when a subcommand re-declares them as non-global (#649 by @JamBalaya56562). A value-taking global flag (e.g.
-C/--cd) placed before a mounted subcommand whose definition re-declares the same flag withoutglobal=#truewas being dropped from the recognized-flag set on descent. The leftover token was then mis-parsed as a positional — producing errors likeInvalid choice for arg profile: -C, expected one of alpha, beta, gamma— and the flag's value was silently omitted fromas_env()and from the environment passed to mount scripts. This was the parser-side root cause referenced by jdx/mise#10069.New Contributors
Full Changelog: jdx/usage@v3.3.0...v3.4.0
💚 Sponsor usage
usage is built by @jdx at en.dev — an independent developer-tooling studio behind mise, aube, hk, and more. Work on usage is funded by sponsorships.
If
usagepowers CLI specs, docs, or completions for a tool you maintain or use, please consider sponsoring at en.dev. Every sponsorship helps the project stay independent and moving.v3.3.0: : Auto-completion for usage shebang scriptsCompare Source
The headline feature in this release is one-line auto-completion for
usage-shebang scripts: source a single init script from your shell rc and everyusage-powered script on your$PATHgets<Tab>completion automatically. This release also brings new third-party integration guides and a handful of docs site polish fixes.Added
Auto-completion for usage shebang scripts (#620 by @jdx). A new
usage generate completion-init <shell>subcommand (aliasci) emits a one-time init script for bash, zsh, and fish. Source it once and any executable on$PATHwhose first line is ausageshebang gains tab-completion — no per-scriptusage g completion <shell> <bin> -f <script>generation step.Mechanism per shell:
complete -Ddefault handler that peeks the candidate command's first line for ausageshebang and dispatches tousage complete-word. Non-usage commands chain to bash-completion's_completion_loader, so existing completions keep working.compdef -default-fallback with the same shebang detection, falling back to_filesfor non-usage commands.$PATHonce at shell startup and registerscomplete -c <name>for each shebang script it finds.Pass
--usage-bin(or setJDX_USAGE_BIN) if yourusagebinary is installed under a different name.Third-party integration guides. Documentation now covers using usage alongside Commander.js, oclif, and yargs (#616 by @gaojunran) as well as Typer and Click (#619 by @gaojunran), based on the usage-integrations monorepo.
Fixed
<=640pxwith the close button pinned to the top-right corner, fixing cramped two-line wrapping on mobile (#603 by @jdx).Full Changelog: jdx/usage@v3.2.1...v3.3.0
💚 Sponsor usage
usage is built by @jdx at en.dev — an independent developer-tooling studio behind mise, aube, hk, and more. Work on usage is funded by sponsorships.
If
usagepowers CLI specs, docs, or completions for a tool you maintain or use, please consider sponsoring at en.dev. Every sponsorship helps the project stay independent and moving.v3.2.1: : Zsh completion fix for values without descriptionsCompare Source
A small patch release that fixes a zsh completion regression introduced in v3.1.0. If you use zsh completions with values that contain colons (such as nested task names) and those values don't have descriptions, you should upgrade and regenerate your completions.
Fixed
Zsh completions now correctly escape colons in completion values even when no descriptions are present. In v3.1.0, the switch from
_argumentsto_describeintroduced a bug where the escape logic only ran when at least one completion had a description. Without escaping, a value liketest:gitwas misinterpreted by zsh -- it treatedgitas a description for the itemtestrather than as part of the value. If you have existing generated zsh completions, regenerate them to pick up this fix. (#597 by @david-hamilton-glean)Test suite now respects the
CARGO_BIN_EXE_usageenvironment variable when set, fixing test failures in environments with non-standard build directories such as Nixpkgs cross-compilation builds. (#568 by @kybe236)New Contributors
Full Changelog: jdx/usage@v3.2.0...v3.2.1
v3.2.0: : Environment-backed choices and zsh escaping fixCompare Source
This release adds the ability to source argument/flag choices from environment variables at runtime and fixes a zsh completion regression where parentheses and brackets in task descriptions caused shell errors.
Added
Arguments and flags can now pull their allowed values from an environment variable using
choices env=.... The env var value is split on commas and/or whitespace, deduplicated against any literal choices, and resolved at parse/completion time rather than baked into generated output. (#548 by @mustafa0x)With
DEPLOY_ENVS="foo,bar baz", valid values becomefoo,bar, andbaz. You can also combine literal choices with env-backed ones:When the env var is unset or empty and no literal choices are provided, validation rejects all values with a clear error message. Help output and generated markdown surface the controlling env var name rather than snapshotting its current value.
This feature is currently behind the
unstable_choices_envfeature flag in the library crate.Fixed
(,)) and brackets ([,]) in completion descriptions. Previously, these characters were passed through to zsh's_describefunction unescaped, causing it to interpret them as glob qualifiers or character classes -- resulting in cryptic errors likeunknown file attributeandunknown sort specifier. This was a regression from v2.x. If you have existing generated zsh completions, regenerate them to pick up this fix. (#559 by @jdx, fixes #558)New Contributors
Full Changelog: jdx/usage@v3.1.0...v3.2.0
v3.1.0: : Richer help output, stdin support, and zsh completion fixesCompare Source
This release improves the CLI's
--helpoutput to render all the documentation-related fields that were previously only used in manpage and markdown generation, adds stdin support for piping specs into usage commands, and fixes a long-standing zsh completion annoyance with trailing spaces.Highlights
--help/-houtput is now much richer, rendering examples, before/after help text, version headers, author/license info, and deprecation markers -- fields that were previously only surfaced in generated manpages and markdown.--file -, enabling workflows likejbang usage | usage generate markdown --file -.Added
The built-in
--help/-hrendering now includesbefore_help,after_help(and their_longvariants),examples, aname+versionheader,author/licensein the long help footer, and[deprecated: reason]markers on subcommands. Short help (-h) uses the base variants; long help (--help) prefers the_longvariants with a fallback to the base ones. (#554 by @jdx, closes #549)For example, a spec like:
will now render those sections in
mycli --helpoutput, not just in generated docs.All
--fileflags acrossgenerate,lint, andcomplete-wordsubcommands now accept-to read the usage spec from stdin. This enables piping specs from other tools without writing a temporary file. (#555 by @jdx, closes #546)Not supported for
exec/shellsubcommands, which pass stdin through to the child process.Fixed
node@would producenode@(with a space), and path completions like/opt/homebrewwould not include a trailing slash. The generated zsh completion scripts now use_describewith-S ''instead of_argumentswith command substitution, and directory completions include a trailing/. If you have existing generated zsh completions, regenerate them to pick up this fix. (#556 by @jdx, closes #67)Full Changelog: jdx/usage@v3.0.0...v3.1.0
v3.0.0: : Spec metadata expansion and Cobra escaping fixCompare Source
This release adds several new metadata fields to the usage spec and includes a breaking API change to the
Specstruct. The spec parser now supportslicense,before_help,after_help,before_long_help, andafter_long_help-- fields that were documented in the spec reference but silently ignored until now. TheSpecstruct has been marked#[non_exhaustive]to allow future field additions without further breaking changes.Breaking Changes
The
Specstruct now has the#[non_exhaustive]attribute. If you constructSpecvalues using struct literal syntax, your code will need to be updated:This change was made so that new fields can be added to
Specin future minor releases without breaking downstream code. (#542 by @jdx, fixes #537)Added
Support for
license,before_help,after_help,before_long_help, andafter_long_helptop-level metadata fields in the usage spec. These fields are now parsed, serialized, and included in spec merges and generated docs. For example:(#542 by @jdx)
New community integration: Ruby's
OptionParserviaoption_parser_usage. (#533 by @packrat386)Fixed
\n), tabs (\t), and carriage returns (\r) in KDL output. Previously, Cobra commands with multi-line help text would produce invalid KDL specs that failed to parse. (#539 by @thecodesmith)Changed
roffdependency from 0.2 to 1.0 for man page generation. (#529)New Contributors
Full Changelog: jdx/usage@v2.18.2...v3.0.0
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.