Skip to content

docs(registry): document how to add a package definition - #111

Merged
moshest merged 1 commit into
mainfrom
claude/review-open-prs-2el8ix
Aug 18, 2026
Merged

docs(registry): document how to add a package definition#111
moshest merged 1 commit into
mainfrom
claude/review-open-prs-2el8ix

Conversation

@moshest

@moshest moshest commented Aug 18, 2026

Copy link
Copy Markdown
Member

Closes the gap behind #110.

The root README says "Anyone can contribute. If a library you use isn't listed, submit a PR to add it" and links to registry/. There is no registry/README.md and no CONTRIBUTING.md, so a contributor who follows that link finds six bare directories and no way to learn the conventions except by opening an issue — which is exactly what happened.

What it documents

Only things the code actually enforces, each verified against the CLI rather than read off the schema:

  • The directory is the distributing registry, the filename is the package name. Scoped names use a subdirectory (npm/@trpc/server.yaml); Maven coordinates encode : as _.
  • A project distributed by no package manager gets a directory named after itself holding one self-named file. This isn't a new convention — it's how python/python.yaml and java/java.yaml already work, which answers Documentation for Infrastructure Projects like Docker, Podman, Kubernetes #110 directly.
  • The three source shapes, with a real example of each taken from existing definitions.
  • How to build locally before opening a PR, and that a handful of sections usually means docs_path is wrong.

The trap worth writing down

versions: with min_version + a git source asks a version-discovery API "which versions exist?" before matching them. Only npm, pip, maven and hex have such an API. Anywhere else it throws, and since one bad definition fails the whole nightly publish, it takes every other package down with it — the exact failure mode that kept the nightly red for five nights in a row earlier this month.

Verified in a scratch registry:

registry/docker/docker.yaml, git + min_version   → Error: Unsupported registry: docker
registry/docker/docker.yaml, unversioned git     → docker/docker (1 versions): latest
registry/kubernetes/..., versioned zip           → kubernetes/kubernetes (2 versions): 1.31, 1.30

So the guide steers non-package-manager projects to unversioned or zip, and says why.

Docs-only; no changeset (nothing published changes).


Generated by Claude Code

The root README says "anyone can contribute — submit a PR" and links to
registry/, but registry/ had no README and the repo has no CONTRIBUTING, so a
contributor arriving there finds bare directories and has to open an issue to
ask what the conventions are (#110).

Documents what the code actually enforces: the directory is the distributing
registry and the filename is the package name; a project distributed by no
package manager gets a directory named after itself holding one self-named
file, which is how python/ and java/ already work; scoped names use a
subdirectory and Maven coordinates encode ':' as '_'.

The trap worth writing down is the git-with-min_version shape. It needs a
version-discovery API, which only npm, pip, maven and hex have, so anywhere
else it throws "Unsupported registry: <dir>" — and one bad definition fails
the whole nightly publish, taking every other package with it.

Verified against the real CLI: the git-versioned shape in a docker/ directory
fails with exactly that message, while unversioned-git resolves to latest and
versioned-zip lists its explicit versions.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NBQQpA86yYzwJUiVz8ph2R
@changeset-bot

changeset-bot Bot commented Aug 18, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 59b75c8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@moshest
moshest merged commit 89c4ca7 into main Aug 18, 2026
3 checks passed
@moshest
moshest deleted the claude/review-open-prs-2el8ix branch August 18, 2026 22:47
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