fix: generate chart component registry#624
Conversation
|
/bonk review |
commit: |
Docs PreviewCommit: |
There was a problem hiding this comment.
This is a clean, targeted fix. The barrel-directory discovery logic correctly identifies components that previously fell through the conventional {dir}/{dir}.tsx pattern, and the generic-interface fallback in generatePropsFromType provides meaningful props metadata when ts-json-schema-generator cannot process the root type. The test coverage for both paths looks good.
Left a few minor inline notes — none are blockers.
|
Review posted successfully on PR #624. I left a batch review with three minor inline suggestions (none blocking):
Overall the PR is clean and well-tested. |
|
/bonk review |
|
/bonk please re-review |
There was a problem hiding this comment.
All previous review feedback has been addressed cleanly:
- Barrel resolution —
detectComponentExportsFromIndexnow checks both.tsxand.tsextensions, with test coverage for plain TypeScript modules. - Generic interface extraction —
extractPropsFromInterfacewas rewritten to use the TypeScript AST instead of regex, correctly handling nested generic constraints and object-literal prop types. - Guarded fallback reads —
readFileSyncinside thegeneratePropsFromTypecatch block is now wrapped in its own try/catch, preserving the variants-only fallback if source reading fails.
The barrel-directory discovery correctly avoids double-processing directories that already have a conventional {dir}/{dir}.tsx entry point, and the category addition for chart is straightforward. Tests pass and the change is well-scoped. LGTM.
|
Review posted successfully on PR #624. Approved. |



Summary
Fixes missing API reference tables for chart components, including
BubbleMapandChoroplethMap, on the maps documentation page.Changes
@cloudflare/kumo.Validation
pnpm --filter @cloudflare/kumo test:unit --run scripts/component-registry/index.test.tspnpm --filter @cloudflare/kumo typecheckpnpm --filter @cloudflare/kumo lintpnpm --filter @cloudflare/kumo buildpnpm --filter @cloudflare/kumo-docs-astro buildVerified
/charts/maps/renders both API tables without registry error banners.Reviews
Tests