Skip to content

Release 0.4.1: package fixes and jh package dependents - #68

Merged
pankgeorg merged 4 commits into
release-0.4from
release-0.4.1
Oct 14, 2026
Merged

pankgeorg merged 4 commits into
release-0.4from
release-0.4.1

Conversation

@pankgeorg

Copy link
Copy Markdown
Member

Backports the package fixes from main onto the 0.4 line so they can ship as v0.4.1. In v0.4.0, jh package dependency, jh package info and jh package search all fail against current JuliaHub with GraphQL errors: [{query is not allowed}]: the REST listing they call (/packages/info) is no longer routed, and the GraphQL fallback query is not on JuliaHub's Hasura allowlist.

Everything else on main since v0.4.0 is left out, notably jh search (#62) and the homepage-layout jh admin landing-page (#59), which rely on JuliaHub server changes juliahub.com does not run yet, and the auth and device-flow changes from #64. Resolving the cherry-picks dropped search.go and two unused imports; CLAUDE.md keeps the v0.4.0 text with the package endpoint updated.

Tested against juliahub.com with a local build: package dependency JuMP, package info JuMP, package search JuMP, package search with no term and with --offset, and package dependents JuMP (335 direct, 94 indirect, 429 total). go vet is clean and the package unit tests pass. ci.yml at v0.4.0 only runs for main, so this PR gets no CI. After merge, pushing v0.4.1 on release-0.4 runs the release workflow.

tanmaykm and others added 4 commits October 14, 2026 19:10
…me lookup

`jh package search`, `jh search packages`, `jh package info` and every
`--package <name>` lookup called `/packages/info`, which current JuliaHub
does not route: the request falls through to the git `/packages/` handler
and returns 404. The GraphQL fallback is then refused ("query is not
allowed"), so all of these failed.

Call the web UI's package listing, `/api/v1/ui/packages/info`, instead. It
pages with `pagination[page]`/`pagination[per_page]` (at most 100 per page)
rather than limit/offset, so map the CLI's `--limit`/`--offset` window onto
the covering pages (`planRESTPages`). Order by relevance (`-score`) when a
search term is given, by stars otherwise, and always break ties by name:
packages from one repository share a score, and without a tiebreak their
order changes between requests, so consecutive pages could repeat or skip
rows.
…package dependency`

Without `--registry`, `jh package dependency <name>` looked the package's
registry up through the GraphQL package search only, which current JuliaHub
refuses ("query is not allowed"), so the command failed. Look it up in the
REST package listing first (`findPackageRegistry`) and keep GraphQL as the
fallback, reporting both errors if both fail.
The packages API's `Sorts` schema requires every key to carry a direction
sign (`^[+-].+$`), so the unsigned `sorts[1]=name` tiebreak was rejected with
a 400. Send `-name` instead.

Package changes of #65 (7ad14d9), without its e2e changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 marked this pull request as ready for review October 14, 2026 16:24
@pankgeorg
pankgeorg merged commit 13b5480 into release-0.4 Oct 14, 2026
@pankgeorg
pankgeorg deleted the release-0.4.1 branch October 14, 2026 16:25
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