[PR #8454] [CLOSED] ci: add package size reporting on pull requests #16231

Closed
opened 2026-04-13 10:27:15 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/8454
Author: @himself65
Created: 3/6/2026
Status: Closed

Base: canaryHead: worktree-pkg-size-ci


📝 Commits (1)

  • 13012db ci: add package size reporting on pull requests

📊 Changes

1 file changed (+300 additions, -0 deletions)

View changed files

.github/workflows/pkg-size.yml (+300 -0)

📄 Description

Summary

  • Adds a new pkg-size.yml GitHub Actions workflow that runs on PRs targeting main or canary
  • Uses pkg-size to measure the publish size of the better-auth package (tarball, uncompressed, gzip, brotli)
  • Measures the install size (node_modules) by packing with pnpm pack and installing in an isolated temp directory, with per-dependency breakdown
  • Compares head vs base branch and posts a detailed diff as a PR comment (creates or updates a single comment)

PR comment includes:

  • Summary table: tarball, uncompressed, gzip, brotli, and install sizes with deltas
  • Per-file diff of changed published files
  • Per-dependency diff of changed installed dependencies
  • Collapsed sections for unchanged files/deps
  • Closes #8441 — detects when unused adapters (e.g. Prisma, MongoDB) bloat the install size
  • Relates to #8271 — prevents bundle size regressions like the v1.5 increase
  • Relates to #2964 — helps track progress on reducing bundle size / improving tree-shaking
  • Relates to #6183 — makes it visible when large optional deps like kysely increase install size

Test plan

  • Open a test PR against canary and verify the workflow runs
  • Confirm the size report comment is posted on the PR
  • Push another commit and verify the comment is updated (not duplicated)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/8454 **Author:** [@himself65](https://github.com/himself65) **Created:** 3/6/2026 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `worktree-pkg-size-ci` --- ### 📝 Commits (1) - [`13012db`](https://github.com/better-auth/better-auth/commit/13012dbd6ff2d10d9c82d61ebe216a5f5e64c349) ci: add package size reporting on pull requests ### 📊 Changes **1 file changed** (+300 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `.github/workflows/pkg-size.yml` (+300 -0) </details> ### 📄 Description ## Summary - Adds a new `pkg-size.yml` GitHub Actions workflow that runs on PRs targeting `main` or `canary` - Uses [`pkg-size`](https://github.com/pkg-size/pkg-size) to measure the **publish size** of the `better-auth` package (tarball, uncompressed, gzip, brotli) - Measures the **install size** (`node_modules`) by packing with `pnpm pack` and installing in an isolated temp directory, with per-dependency breakdown - Compares head vs base branch and posts a detailed diff as a PR comment (creates or updates a single comment) ### PR comment includes: - Summary table: tarball, uncompressed, gzip, brotli, and install sizes with deltas - Per-file diff of changed published files - Per-dependency diff of changed installed dependencies - Collapsed sections for unchanged files/deps ### Related issues - Closes #8441 — detects when unused adapters (e.g. Prisma, MongoDB) bloat the install size - Relates to #8271 — prevents bundle size regressions like the v1.5 increase - Relates to #2964 — helps track progress on reducing bundle size / improving tree-shaking - Relates to #6183 — makes it visible when large optional deps like kysely increase install size ## Test plan - [x] Open a test PR against `canary` and verify the workflow runs - [x] Confirm the size report comment is posted on the PR - [ ] Push another commit and verify the comment is updated (not duplicated) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-13 10:27:15 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#16231