Skip to content

feat: add bundle size comparison on PRs#183

Merged
HugoRCD merged 1 commit intomainfrom
feat/bundle-size-pr-check
Mar 14, 2026
Merged

feat: add bundle size comparison on PRs#183
HugoRCD merged 1 commit intomainfrom
feat/bundle-size-pr-check

Conversation

@HugoRCD
Copy link
Copy Markdown
Owner

@HugoRCD HugoRCD commented Mar 14, 2026

Summary

  • Adds a bundle-size job to the bench workflow that runs on PRs touching packages/evlog/src/** or tsdown.config.ts
  • Builds the package, measures all entry points (core, adapters, frameworks), and compares gzip sizes against the stored baseline from main
  • Posts a size report as a PR comment (creates or updates an existing comment)
  • Size comparison is fully deterministic — no CI noise issues like wall-clock benchmarks

This complements CodSpeed (which handles performance regression detection) by covering the bundle size dimension.

How it works

  1. bun bench/scripts/size.ts --json measures current sizes
  2. git show origin/main:packages/evlog/bench/baseline/size.json fetches the baseline
  3. bun bench/scripts/compare.ts --size <baseline> <current> generates a markdown report with per-entry deltas
  4. actions/github-script posts the report as a PR comment

The update-baseline job continues to run on push to main only, updating size.json and RESULTS.md.

Build the package, measure all entry points against the stored
baseline from main, and post a size report as a PR comment.
Size comparison is deterministic (no CI noise issue).
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
evlog-docs Ready Ready Preview, Comment, Open in v0 Mar 14, 2026 7:27pm

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 14, 2026

Thank you for following the naming conventions! 🙏

@HugoRCD HugoRCD changed the title feat(bench): add bundle size comparison on PRs feat: add bundle size comparison on PRs Mar 14, 2026
@HugoRCD HugoRCD merged commit 241a90f into main Mar 14, 2026
13 of 14 checks passed
@HugoRCD HugoRCD deleted the feat/bundle-size-pr-check branch March 14, 2026 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant