feat(registry): add hex registry support for elixir, phoenix, and phoenix_live_view#95
Conversation
…eview Adds a Hex.pm version fetcher to enable automated version discovery for Elixir ecosystem packages, along with registry definitions for elixir (unversioned, git source), phoenix, and phoenix_live_view (versioned via Hex API).
|
moshest
left a comment
There was a problem hiding this comment.
Nice addition — the hex fetcher matches the npm/pip/maven ones cleanly and the wiring looks right.
A few things before merge (details inline):
- The phoenix and phoenix_live_view files each have two identical version entries. I checked the tags and they build the same way, so let's collapse each to one.
elixir.yamlpointsdocs_pathatlib, which is source code. Worth checking the built output — the guides live underlib/elixir/pages.
Couple of small ones too:
- A test for
fetchHexVersionswould be good — there's already one for maven inversion-check.test.tsto copy. - The module comment at the top of
version-check.tsstill says "(npm, pip, maven)" — add hex.
Thanks!
Generated by Claude Code
There was a problem hiding this comment.
These two entries are identical apart from the range. I checked guides/ at both v1.5.0 and v1.7.0 — same path, same v{version} tag scheme on both sides. So the split doesn't actually change anything at build time.
Can we collapse it to one?
versions:
- min_version: "1.5.0"
source:
type: git
url: https://github.com/phoenixframework/phoenix
docs_path: guides
tag_pattern: "v{version}"Generated by Claude Code
There was a problem hiding this comment.
Same thing here. guides/ is there at both v0.17.0 and v0.20.0 with the same path and tag scheme, so the two entries are doing the same job. Let's fold them into one:
versions:
- min_version: "0.17.0"
source:
type: git
url: https://github.com/phoenixframework/phoenix_live_view
docs_path: guides
tag_pattern: "v{version}"Generated by Claude Code
There was a problem hiding this comment.
lib/ is mostly Elixir source, not docs. The build filters to .md/.mdx/etc, so this'll scrape stray markdown rather than the real guides, which live in lib/elixir/pages/. Can you double-check what ends up in the built package? docs_path: lib/elixir/pages is probably what you want.
Generated by Claude Code
Threads processed: - C01: Collapse phoenix.yaml duplicate version entries into one - C02: Collapse phoenix_live_view.yaml duplicate version entries into one - C03: Update elixir.yaml docs_path from 'lib' to 'lib/elixir/pages' - C04: Add fetchHexVersions unit test - C05: Update module comment to include hex
moshest
left a comment
There was a problem hiding this comment.
Looks good — all three points from the earlier review are addressed:
phoenix.yaml/phoenix_live_view.yaml— collapsed to a single version entry eachelixir.yaml—docs_pathnow points atlib/elixir/pages
The fetchHexVersions() fetcher cleanly mirrors the npm/pip/maven pattern (retry, encodeURIComponent, defensive defaults), and the YAML entries follow existing registry conventions. Ordering/dedup/prerelease filtering are handled downstream in discoverVersions, consistent with the other fetchers.
No changeset is required: the only modified package is @neuledge/registry (private: true, never npm-published), @neuledge/context is untouched, and the hex docs ship via the data-driven registry-update workflow regardless. Nothing in CI gates on it.
Approving. 🚀
Generated by Claude Code
Adds Hex.pm ecosystem support to the registry with three packages and a version fetcher.
Changes:
packages/registry/src/version-check.ts— addsfetchHexVersions()that querieshttps://hex.pm/api/packages/{name}for automated version discovery, matching the existing npm/pip/maven fetchersregistry/hex/elixir.yaml— unversioned (git source from elixir-lang/elixir,lib/docs path). Elixir is not a Hex package (language runtime), so it builds from HEAD aslatest. Covers gradual set-theoretic types docsregistry/hex/phoenix.yaml— versioned via Hex API, covers v1.5.0+, docs fromguides/directoryregistry/hex/phoenix_live_view.yaml— versioned via Hex API, covers v0.17.0+, docs fromguides/directoryWhy this matters:
The registry currently has 100+ packages across npm, pip, and maven but zero Hex/Elixir packages. These three cover the core Elixir web ecosystem. The
hexfetcher makes adding more packages trivial.Verification:
guides/directory verified at HTTP 200 across all tagged versions back to the min_version ranges