ci(publish): reconcile JSR package settings (readme, description, runtime) on publish#126
Merged
Conversation
JSR per-package presentation settings (readmeSource, description, runtimeCompat) are server-side and not carried in the published tarball, so they cannot be baked into a package version and persist across versions. The 31 published members were all on JSR's default readmeSource=jsdoc, so package main pages showed the root module @module JSDoc instead of the README, and descriptions were empty. Add .llm/tools/jsr-set-package-settings.ts, an idempotent reconciler that, for every publishable workspace member: - sets readmeSource=readme so the README renders on the main page (full symbol docs still live on the Docs tab), - sets description dynamically from the README tagline (flattened, capped at JSR's 250-char limit), - sets runtimeCompat={deno:true} (Deno-only for now; other runtimes stay "unknown" rather than falsely marked incompatible). Wire it into publish.yml after the Publish step (real-publish only), reusing the existing secrets.JSR_TOKEN. Without a token the tool runs a read-only diff. Verified: deno check + fmt pass, lint clean, dry-run discovers all 31 members and extracts clean descriptions. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014gW4zfhMMQU6txC828ijct
Add jsr-package-settings.json at the repo root as the single source of
truth for per-package JSR presentation settings, replacing the blanket
runtimeCompat={deno:true} baked into the reconciler.
- `defaults` applies to every publishable member (readmeSource=readme,
runtimeCompat={deno:true}); `packages` overrides per field, keyed by the
segment after @netscript/.
- Browser-facing members (sdk, fresh, fresh-ui) declare browser support in
addition to Deno; server-only members stay Deno-only. Other runtimes are
left "unknown" rather than falsely marked incompatible.
- description stays dynamic from each README tagline unless overridden.
jsr-set-package-settings.ts now loads the registry (--config to override),
validates readmeSource/runtimeCompat keys and value types, and fails fast
if the config names a package that is not a publishable workspace member.
Falls back to built-in defaults when the file is absent.
Verified: deno check + fmt pass, lint clean, dry-run loads 3 overrides and
resolves all 31 members.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014gW4zfhMMQU6txC828ijct
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.
What
Reconcile JSR per-package presentation settings on every publish so each
@netscript/*package page shows the README, a description, and the supported runtime — none of which can be baked into a published version.Why this can't live in the package
readmeSource,description, andruntimeCompatare server-side JSR settings. They are not carried in the published tarball, cannot be set fromdeno.json, and persist across versions. All 31 published members were on JSR's defaultreadmeSource=jsdoc, so package main pages rendered the root module@moduleJSDoc instead of the README, and descriptions were blank.Changes
.llm/tools/jsr-set-package-settings.ts— idempotent reconciler over every publishable workspace member (packages/+plugins/, reusingdiscoverWorkspaceMembers). For each package it diffs current vs desired and PATCHes only what changed:readmeSource = "readme"→ README renders on the main page (full symbol docs still live on the Docs tab).description→ derived dynamically from the README tagline (markdown flattened, capped at JSR's 250-char limit), so it stays in sync with the docs.runtimeCompat = { deno: true }→ Deno-only for now. Deno shows as supported; Node/Bun/Browsers/Cloudflare Workers stay "unknown" rather than being falsely marked incompatible (some members likesdk/query-clientandfresh-uiare browser-facing).--dry-run→ read-only diff, no writes..github/workflows/publish.yml— newApply JSR package settingsstep afterPublish(real-publish only), reusing the existingsecrets.JSR_TOKEN.Token
Reuses the existing
secrets.JSR_TOKENalready wired into theEnsure JSR packages existstep — no new secret required, provided that token has package-edit scope (the same scope it already uses to create/link packages).Behavior on the next publish
Settings apply automatically on the next real publish (and cover any newly added package). Live
0.0.1-alpha.2pages stay JSDoc-sourced until then.Validation
deno check --unstable-kv✓deno fmt --check✓.llm/tools) ✓🤖 Generated with Claude Code