feat(auto-readme): add packageLinks preset badges (jsr, bundlesize)#289
feat(auto-readme): add packageLinks preset badges (jsr, bundlesize)#289stephansama wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ 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 |
|
There was a problem hiding this comment.
Code Review
This pull request introduces built-in badge presets for the auto-readme plugin. It adds a packageLinkPresets object in schema.ts containing configurations for bundlesize, bundlesizeGzip, and jsr badges, and updates the configuration schema to support a new packageLinks option. The plugin logic in plugin.ts is updated to merge these selected presets with user-defined templates when generating badges. I have no feedback to provide.
Closes STE-38
Adds a new
badgeOptions.packageLinksconfig field that lets consumers opt into built-in badge presets by short name instead of hand-rolling the full{url, image, label}shape. Three presets shipped in this PR:jsr— JSR registry badgebundlesize— bundlephobia minified sizebundlesizeGzip— bundlephobia minified+gzip sizeUsage:
{ "badgeOptions": { "packageLinks": ["jsr", "bundlesize", "bundlesizeGzip"] } }Presets expand into the same internal shape as user
templatesand pass through the existing Handlebars context, so--skip-templatesskips them too. Presets are rendered before user templates in the BADGE row.Acceptance criteria
jsrpreset emits the jsr.io badge linking to jsr.io/{name}bundlesizepreset emits the bundlephobia min badgebundlesizeGzippreset emits the bundlephobia min+gzip badgegithubpreset (needsowner/repoextraction frompkg.repository.url— deferred to a follow-up so this PR stays scoped)Notes
auto-readmerun (config update in.config/autoreadmerc.jsonto addpackageLinksis separate).