Skip to content

chore(repo): upgrade bundlewatch to v1.2.0 - #10824

Open
alexcarpenter wants to merge 1 commit into
mainfrom
carp/bundlewatch
Open

alexcarpenter wants to merge 1 commit into
mainfrom
carp/bundlewatch

Conversation

@alexcarpenter

Copy link
Copy Markdown
Member

Reopened from #10807 by @charpeni so CI can run. The commit is theirs, unchanged.

Description

Hi! 👋

Maintainer of bundlewatch here. I looked at how Clerk uses bundlewatch across its monorepo to enforce bundle size limits without saving baseline results, and released v1.2.0 to support that setup directly and simplify the integration.

This upgrades BundleWatch in clerk-js, ui, and mosaic and adopts the new capabilities:

  • Skip baseline comparisons: compare: false avoids looking up baseline results when the check only needs to enforce configured size limits.
  • Separate package statuses: package-specific prefixes produce clerk-js/bundlewatch, ui/bundlewatch, and mosaic/bundlewatch contexts, preventing packages from overwriting each other's statuses.
  • Use the built-in fixer: replaces both custom fix scripts with update-max-sizes --write --headroom 1KB and adds the same command to Mosaic. It preserves the rounding and printed diff, supports a preview without writing, and runs without contacting GitHub or the BundleWatch service.
  • Use native GitHub Actions detection: removes the manual CI_* overrides and forwards the GitHub environment through Turbo for PR and merge-queue detection.

Existing file patterns, size limits, the BUNDLEWATCH_GITHUB_TOKEN secret, and Turbo caching are preserved. The contributor guide is updated, and the unused direct minimatch dependencies are removed.

Checklist

  • pnpm test runs as expected. Full suite not run; focused BundleWatch integration and mocked CI checks passed.
  • pnpm build runs as expected. Full workspace build not run; all seven filtered build tasks for the affected packages and their dependencies passed.
  • (If applicable) JSDoc comments have been added or updated for any package exports — N/A.
  • (If applicable) Documentation been updated — N/A; repository contributor guidance is updated.

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

@changeset-bot

changeset-bot Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 38b58b4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
clerk-js-sandbox Ready Ready Preview Nov 23, 2026 4:08pm UTC
mosaic-brand Error Error Nov 23, 2026 4:08pm UTC
mosaic-docs Ready Ready Preview Nov 23, 2026 4:08pm UTC
mosaic-site Error Error Nov 23, 2026 4:08pm UTC
swingset Ready Ready Preview Nov 23, 2026 4:08pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

BundleWatch configurations for Clerk JS, Mosaic, and UI now include package prefixes and disable comparison. Package scripts use BundleWatch’s size-update command, and the custom update scripts are removed. The BundleWatch development dependency is upgraded in all three packages. The CI task tracks GitHub Actions environment variables, while the workflow retains the BundleWatch token. The contributing guide documents package checks and limit-update commands.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

  • clerk/javascript#10806: Changes Mosaic bundle measurement and output paths, which share configuration and file-pattern contracts with this PR’s Mosaic BundleWatch updates.

Suggested reviewers: ephem

Merge Risk: Minimal · up to 38b58 · assessed changes only

Path filters excluded changed files. This rating applies only to the assessed changes.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change, a BundleWatch upgrade to v1.2.0. The changeset covers that upgrade in clerk-js, ui, and mosaic, plus the removal of the custom fix scripts. The title uses the conventi…
Description check Passed The description explains the BundleWatch v1.2.0 upgrade and the adopted features: compare false, per-package status prefixes, the built-in update-max-sizes fixer, and native GitHub Actions detection. …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change, a BundleWatch upgrade to v1.2.0. The changeset covers that upgrade in clerk-js, ui, and mosaic, plus the removal of the custom fix scripts. The title uses the conventional chore(repo) prefix. It omits the adopted features, which is acceptable because the title need not cover every detail.

Full details: Description check

Explanation

The description explains the BundleWatch v1.2.0 upgrade and the adopted features: compare false, per-package status prefixes, the built-in update-max-sizes fixer, and native GitHub Actions detection. These match the changeset. It also lists the test status and the contributor guide update.

Finishing Touches

Fix failing CI checks

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Linked repositories: This review skipped 6 repositories. Cross-repository analysis may be incomplete. Check linked repository access and settings.

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between eb87e9e and 38b58b4.

Files ignored due to path filters: 1

  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing: 2

  • packages/mosaic/bundlewatch.config.json
  • packages/mosaic/package.json
Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

API Changes Report

Generated by Break Check on 2026-11-23T16:13:51.095Z

Summary

Metric Count
Packages analyzed 20
Packages with changes 0
🔴 Breaking changes 0
🟡 Non-breaking changes 0
🟢 Additions 0

No API Changes Detected

All packages have stable APIs with no detected changes.


Report generated by Break Check

Last ran on 38b58b4.

@pkg-pr-new

pkg-pr-new Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@10824

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@10824

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@10824

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@10824

@clerk/electron

npm i https://pkg.pr.new/@clerk/electron@10824

@clerk/electron-passkeys

npm i https://pkg.pr.new/@clerk/electron-passkeys@10824

@clerk/eslint-plugin

npm i https://pkg.pr.new/@clerk/eslint-plugin@10824

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@10824

@clerk/expo-biometrics

npm i https://pkg.pr.new/@clerk/expo-biometrics@10824

@clerk/expo-google-signin

npm i https://pkg.pr.new/@clerk/expo-google-signin@10824

@clerk/expo-native-components

npm i https://pkg.pr.new/@clerk/expo-native-components@10824

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@10824

@clerk/express

npm i https://pkg.pr.new/@clerk/express@10824

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@10824

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@10824

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@10824

@clerk/mosaic

npm i https://pkg.pr.new/@clerk/mosaic@10824

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@10824

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@10824

@clerk/react

npm i https://pkg.pr.new/@clerk/react@10824

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@10824

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@10824

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@10824

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@10824

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@10824

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@10824

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@10824

commit: 38b58b4

@blacksmith-sh

blacksmith-sh Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Matches PR CI run: per-package statuses, size-only check

Before, all three packages wrote one shared bundlewatch status, so mosaic's later pass left it green over ui's failure, and each looked up a main baseline. After, clerk-js/, ui/ and mosaic/bundlewatch land separately on head 38b58b4 (not the merge SHA), ui stays failed, no baseline lookup runs, and the job still exits 1.

Merge-base

PR CI run

This PR 38b58b46

PR CI run

Also checked · 3 match

Matches Merge-queue run detection
Matches Built-in fixer matches old script
Matches Mosaic gets a working bundlewatch:fix

Proof on 38b58b46 · mocked: GitHub commit statuses API (needs BUNDLEWATCH_GITHUB_TOKEN), BundleWatch service (The same local stub answers service.bundlewatch.io so a fake token never reaches...) · Did Proof get it right? Yes · No

View full Proof report · React 👎 or comment @codesmith dismiss this proof to dismiss

This branch was successfully deployed

2 active deployments
Preview – swingset — 38b58b46 Deployed Nov 23, 2026 by vercel[bot]
Preview – clerk-js-sandbox — 38b58b46 Deployed Nov 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants