feat(generate): add Dart client renderer - #7
Conversation
|
Warning Review limit reached
Next review available in: 5 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Wire codama-renderers-dart as a fifth SDK target alongside TypeScript, Umi, Rust, and Go. The language list is data-driven, so the selector and compatibility checks pick it up automatically. The package is mispublished (its exports `import` condition points at a .mjs absent from the tarball), so load its intact CJS build via createRequire, anchored on cwd so it also compiles under the CJS test build. The renderer emits only .dart sources (no pubspec.yaml); the help text notes users must add the solana_kit dependencies themselves.
e336249 to
e3e40d6
Compare
What
Adds
codama-renderers-dartas a fifth SDK target alongside TypeScript, Umi, Rust, and Go.Changes
lib/codama-types.ts: adddartto theLanguageunion +LANGUAGES. The selector and compatibility checks are data-driven, so the UI picks it up automatically.lib/codama-generate.ts:dartcase in the render switch.components/GeneratePanel.tsx: Dart "next steps" block.next.config.ts: add toserverExternalPackages.Two upstream gotchas handled
codama-renderers-dart'sexports.importcondition points at a.mjsthat isn't in the tarball (all versions), breaking both the Turbopack build and the CJS test compile. Worked around by loading its intact CJS build viacreateRequire, anchored onprocess.cwd()(notimport.meta.url, which the CJS test build rejects with TS1470).pubspec.yaml— unlike the TS/Rust renderers, it emits only.dartsources (barrel +instructions/,pdas/,errors/,programs/; importspackage:solana_kit_*). Help text tells users to add thesolana_kitdeps themselves.Verification
npm run lintclean ·npm test25/25 ·npm run buildpasses · live generate of a program IDL → Dart returns a valid zip with 12.dartfiles.