Skip to content

feat: jh package dependents <package-name> lists reverse dependencies - #67

Merged
pankgeorg merged 1 commit into
mainfrom
feat/package-dependents
Oct 15, 2026
Merged

pankgeorg merged 1 commit into
mainfrom
feat/package-dependents

Conversation

@pankgeorg

Copy link
Copy Markdown
Member

Adds jh package dependents <package-name>, which lists the packages that depend on a package. It reads the reversedeps list from the same /docs/{registry}/{package}/stable/pkg.json that jh package dependency already fetches, prints the direct, indirect and total counts, and lists the direct dependents; --indirect lists the indirect ones too. --registry and --server behave as for dependency.

A dependent can appear in reversedeps once with direct: true and once with direct: false, so splitDependents collapses entries to one per UUID (direct wins), sorted by name. That matches the count on JuliaHub's "Dependents" badge: against juliahub.com, jh package dependents JuMP reports 335 direct, 94 indirect, 429 total. The pkg.json fetch moves into fetchPackageDocs, shared by both commands; dependency output is unchanged.

The docs pkg.json that `jh package dependency` already reads also carries
`reversedeps`. `dependents` prints the direct, indirect and total counts and
lists the direct dependents; `--indirect` lists the indirect ones too.
`--registry` and `--server` work as for `dependency`.

A dependent can appear in `reversedeps` once as direct and once as indirect,
so entries are collapsed to one per UUID (direct wins), which matches the
count on JuliaHub's "Dependents" badge.

The pkg.json fetch moves into `fetchPackageDocs`, shared by both commands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pankgeorg
pankgeorg merged commit 8e3e327 into main Oct 15, 2026
1 check passed
@pankgeorg
pankgeorg deleted the feat/package-dependents branch October 15, 2026 07:31
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.

2 participants