Repository navigation
feat(cli): doctor --json, changelogs, a scaffolder, third-party registries, and template seeding - #447
Conversation
…tries, and template seeding Five features that close gaps the install lifecycle work opened, stacked on #442. **doctor --json + exit codes.** `list` and `diff` gained `--json`; `doctor` did not, so the install story was not fully CI-checkable. Findings are now collected rather than printed as they happen, so one run renders either the human report (byte-identical to before) or JSON. Every finding carries a scope — project, scripts, state, or a component name — and the exit code separates the two failures that need different responses: 2 means the project cannot accept installs at all, 1 means a recorded install drifted. **Changelogs and content-breaking upgrades.** `update` could move a consumer from 0.1.0 to 0.2.0 with no way to say what changed, and no way to signal that stored Payload data needed migrating first. Manifests now carry release notes, validated on load: real semver, ordered newest first, the manifest's own version present, and a `breaking` entry must declare its migration — otherwise `update` could refuse an upgrade without being able to explain why. `diff` prints pending entries; `update` holds a breaking component back entirely until --accept-breaking. That is deliberately not --force: one means "discard my local edits", the other means "I have migrated my content". Seeded from real history — stats-proof and content-quote were already at 0.2.0 from the logoLabel change. **payload-components new.** Adding a component touches a dozen files whose shape is entirely derivable from the slug. The generator writes those, appends to the mechanical lists, and prints the decisions it refuses to guess: where the component ranks in the curated catalog order, its dbName abbreviation (checked against every existing block), the Content model prose, the demo copy. **Third-party registries.** `add @scope/name` was documented in content/docs/registry.mdx and never implemented; the pinned shadcn supports it natively. The boundary is explicit: files only, https only, no Payload wiring, no install state, and --demo/--localized rejected, because a third-party item has no manifest to record a contract against. **add-template --demo.** One draft Page per page of a concept, reusing writeSeedScript unchanged. The blocker was that the ownership record was keyed to the first manifest, and every shipped template starts three to five of its pages with the same block — so those pages would all have claimed the same record. Ownership identity is now an optional, explicit part of SeedTarget that defaults to the old behavior, leaving all 27 pinned seed tests untouched. Also fixes two things found while mapping the authoring surface: hero-aurora and hero-kinetic existed as doc pages but were missing from the sidebar (the meta check only ran one direction — now it runs both), and the component-template README still named four files that have since become derived. Co-Authored-By: Claude Opus 5 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedToo many files! This PR contains 101 files, which is 1 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (101)
You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
#443 caught something this branch missed. postcss is declared TWICE — as a direct devDependency and as a pnpm override — and the original commit only moved the override. Dependabot raised GHSA-fxqj-rqcc-2cmp against both manifest paths for exactly that reason: one alert on pnpm-lock.yaml (the resolution) and a second on package.json (the declared devDependency range). The override already forced the tree to 8.5.23, so nothing was actually resolving vulnerable — but the declaration was still an exact pin on 8.5.18, and the package.json alert tracks the declaration. Also merges origin/dev, which has moved to 1.3.0 (#442, #447, #448, #449) since this branch was cut. Verified against current dev: lint, format:check, source:build, tsc --noEmit, test:registry all clean, and 505 int tests passing. pnpm install --frozen-lockfile passes, so the lockfile and manifest agree the way CI checks them. Co-Authored-By: Claude Opus 5 <[email protected]>
…ble pins (#444) * security(deps): unstick the js-yaml and postcss overrides off vulnerable pins Both pins had gone stale the same way fast-uri did in #441: the override version that was patched when it was written now sits inside the advisory's widened range, so the pin was holding the tree ON a known vulnerable version rather than off one. js-yaml pin 4.3.0 GHSA-5p4m-2wfm-xmqj (high) >= 4.0.0, < 4.3.1 postcss pin 8.5.18 GHSA-fxqj-rqcc-2cmp (medium) <= 8.5.22 Bumps js-yaml to 4.3.1 and postcss to 8.5.23, and widens the js-yaml range key from <4.3.0 to <4.3.1 so the override still covers everything the advisory does. Both surfaced on main the moment #437 promoted, because Dependabot only reports against the default branch. They will not close until this reaches main in turn. Verified: lint, format:check, source:build, tsc --noEmit clean, and 381 int tests passing. Co-Authored-By: Claude Opus 5 <[email protected]> * security(deps): bump the postcss devDependency alongside the override #443 caught something this branch missed. postcss is declared TWICE — as a direct devDependency and as a pnpm override — and the original commit only moved the override. Dependabot raised GHSA-fxqj-rqcc-2cmp against both manifest paths for exactly that reason: one alert on pnpm-lock.yaml (the resolution) and a second on package.json (the declared devDependency range). The override already forced the tree to 8.5.23, so nothing was actually resolving vulnerable — but the declaration was still an exact pin on 8.5.18, and the package.json alert tracks the declaration. Also merges origin/dev, which has moved to 1.3.0 (#442, #447, #448, #449) since this branch was cut. Verified against current dev: lint, format:check, source:build, tsc --noEmit, test:registry all clean, and 505 int tests passing. pnpm install --frozen-lockfile passes, so the lockfile and manifest agree the way CI checks them. Co-Authored-By: Claude Opus 5 <[email protected]> --------- Co-authored-by: Claude Opus 5 <[email protected]>
Five features stacked on #442, each closing a gap that PR's work opened or exposed.
doctor --json+ distinct exit codes (#19)listanddiffgained--jsonin #442;doctordid not, so the install storystill wasn't fully CI-checkable.
Findings are now collected rather than printed as they happen, so one run
renders either the human report or JSON. The text output is byte-identical — its
exact strings are pinned by the doctor orchestration spec, and two committed blog
figures excerpt
doctorCommandby anchor.Every finding carries a
scope(project,scripts,state, or a componentname) so CI can group without parsing prose, and the exit code separates the two
failures that need different responses:
012Changelogs and content-breaking upgrades
updatecould move a consumer from0.1.0to0.2.0with no way to say whatchanged — and no way to signal that stored Payload data had to be migrated first.
A field rename would have silently broken content.
Manifests now carry release notes, validated on load: real semver, ordered
newest first, the manifest's own version present, and a
breakingentry mustdeclare its
dataMigration— otherwiseupdatecould refuse an upgrade withoutbeing able to explain why.
diffprints the entries an upgrade would apply, plus any migration.updateholds a breaking component back entirely until--accept-breaking.That is deliberately not
--force. One means "discard my local edits", theother means "I have migrated my content" — different decisions, different flags.
Seeded from real history, not invented:
stats-proofandcontent-quotewerealready at
0.2.0from thelogoLabelchange in #360. A component's newest entryalso surfaces on its docs page once it moves past its first release.
payload-components new <slug>Adding a component touches a dozen files whose shape is entirely derivable from
the slug. The generator writes those and appends to the mechanical lists (registry
item, demos registry, docs sidebar, CLI help, README inventory table).
It then prints the decisions it refuses to guess: where the component ranks in
the curated catalog order, its
dbNameabbreviation (checked for uniquenessagainst every existing block), the Content model prose, the demo copy. Catalog
order is ranked, not chronological — auto-appending would quietly degrade it.
Third-party registries —
add @scope/nameDocumented in
content/docs/registry.mdxsince forever, never implemented. Thepinned shadcn supports it natively.
The boundary is explicit and enforced: files only, https only, no Payload
wiring, no install state, and
--demo/--localizedrejected — a third-partyitem has no manifest, so there is no contract to record or manage.
add-template --demoOne draft Page per page of a concept, reusing
writeSeedScriptunchanged.The blocker: the ownership record was keyed to the first manifest, and every
shipped template starts three to five of its pages with the same block — so all
of those pages would have claimed the same private record. Ownership identity is
now an optional, explicit part of
SeedTargetthat defaults to the old behavior,leaving all 27 pinned seed tests untouched. Two new runtime tests run generated
template scripts against the existing
payloadstub and prove two pages sharing afirst block stay fully independent.
Seeded blocks carry each block's own sample content, not the curated preview copy
— that lives in site-only demo data, not Payload field shape. It lands as a draft
for exactly that reason.
Two bugs found while mapping the authoring surface
hero-auroraandhero-kineticwere missing from the docs sidebar. 67 docpages, 65 entries. The meta check only ran one direction; it now runs both.
(
componentsIntro,componentFamilies.countLabel,about/page.tsx,not-found.tsx) that have since become derived, and omitted the README tableand the count pins that are still hand-maintained.
Verification
lint·format:check·tsc·test:registrytest:inttest:e2e(production mode)Two committed blog figures changed:
tools/blog/visual-system/catalog.tsexcerptsdoctorCommandby anchor, so the refactor requiredpnpm blog:visuals:figures.🤖 Generated with Claude Code