Repository navigation
Release 0.4.2: --json, richer package info, clearer package output - #71
Merged
Merged
Conversation
Each prints only a JSON document on stdout, 2-space indented with a trailing
newline:
- `info`: `{"results": [...], "total": N}` holding the exact matches (one
per registry); no match gives an empty `results`.
- `dependency`: `{"name", "version", "registry", "dependencies": [...]}`;
`--indirect` adds the indirect dependencies, each entry carries `direct`.
- `dependents`: `{"name", "version", "registry", "direct", "indirect",
"total", "dependents": [...]}`; the counts always cover every dependent,
and `dependents` lists the indirect ones only with `--indirect`.
`getPackageInfo` now collects the matches (REST, then GraphQL) and prints
once. Errors from these three commands go to stderr, so stdout holds only the
document.
Backport of #69 (6186cca) to the 0.4 line, which has no
`jh package search --json`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…json details The REST listing already returns `owner`, `is_app`, `is_dyad` and `downloads_timeseries`, but `RESTPackage` dropped them (it decoded a `downloads.count` the API does not send). `restToInfo` now carries them, with `downloads_30d` as the sum of the 30 daily counts, so `jh package search --verbose` shows them too. `jh package info` also fetches the stable version's pkg.json for each match and prints its homepage, release date, dependency and dependent counts, contributors and docs build type. In `--json` these are under `details`, together with the daily download counts and the full contributor list. If pkg.json cannot be fetched, a warning goes to stderr and the listing fields are still printed. Backport of #70 (eb55899) to the 0.4 line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- `info` (and `search --verbose`) print a card per package: a header line `name vX · registry · owner`, the description, then aligned fields with thousands separators, a 30-day download sparkline, a link to the package's JuliaHub page and an install hint. - `search` prints an aligned table with STARS and DL/30 DAYS columns. Long names and descriptions are cut at rune boundaries with "…". - `dependency` and `dependents` print the same heading and direct/indirect/total counts, with standard libraries shown as `stdlib`. `dependency` lists each package once (`splitDependencies`, direct wins), in `--json` too. Bold and dim styling is used only when stdout is a terminal, `NO_COLOR` is unset and `TERM` is not `dumb`. The helpers live in `style.go`. Backport of #72 (c9368f8) to the 0.4 line; the 0.4 search path calls `printPackages` directly instead of through `emitPackages`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Prints a single line with the counts, e.g.
JuMP v1.32.1 · General: 9 direct · 40 indirect · 49 total dependencies
`--short` cannot be combined with `--json`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pankgeorg
marked this pull request as ready for review
October 14, 2026 17:15
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.
Backports #69, #70 and #72 onto the 0.4 line so they can ship as v0.4.2.
--jsonforjh package info,dependencyanddependents#69):--jsonforjh package info,jh package dependencyandjh package dependents.infoprints{"results": [...], "total": N};dependencyprints{"name", "version", "registry", "dependencies": [...]};dependentsprints{"name", "version", "registry", "direct", "indirect", "total", "dependents": [...]}. Errors from these commands go to stderr.jh package infoshows downloads, owner and the package's pkg.json details #70):jh package infoshows the listing fields jh used to drop (owner, app/Dyad type, downloads over the last 30 days) and, from the stablepkg.json, homepage, release date, dependency and dependent counts, contributors and docs build type;--jsoncarries them, plus the daily download counts and full contributor list, underdetails.jh packagecommands #72):--shortfordependencyanddependents, printing one line such asJuMP v1.32.1 · General: 9 direct · 40 indirect · 49 total dependencies.jh packagecommands #72): clearer text output.infoandsearch --verboseprint a card per package (aligned fields, thousands separators, a 30-day download sparkline, the JuliaHub page link, an install hint);searchprints an aligned table with STARS and DL/30 DAYS columns;dependencyanddependentsshare a heading anddirect · indirect · totalline and list each package once. Bold/dim styling only on a terminal, honoringNO_COLOR.The 0.4 line has no
jh package search --json(that came with #62), so resolving the cherry-picks kept 0.4's registry lookup inpackageInfoCmd, addedwritePackagesJSONwithout theemitPackageshelper, and dropped thesearch --jsonlines fromREADME.mdandCLAUDE.md; for b2468a4, the 0.4 search path passes the server toprintPackagesdirectly instead of throughemitPackages. The commit messages say so; the code otherwise matchesmain.Checked with a local build against juliahub.com:
package info JuMP(ownerjump-dev, 78428 downloads in 30 days, 9/49 dependencies, 335/429 dependents, 163 contributors),info --json,dependency --json,dependents --json(335 direct, 94 indirect, 429 total) andsearch --verbose, and the text output ofinfo,dependency --indirectanddependentsfor JuMP is byte-identical to a build of #72;go vetis clean and the package unit tests pass.ci.ymlon this line only runs formain, so this PR gets no CI. After merge, taggingv0.4.2onrelease-0.4runs the release workflow.