Skip to content

Comments

Migrate from bundlesize to size-limit#44

Merged
erikras merged 4 commits intomasterfrom
migrate-to-size-limit
Feb 11, 2026
Merged

Migrate from bundlesize to size-limit#44
erikras merged 4 commits intomasterfrom
migrate-to-size-limit

Conversation

@erikras-dinesh-agent
Copy link
Contributor

@erikras-dinesh-agent erikras-dinesh-agent commented Feb 11, 2026

Migrates from deprecated bundlesize to size-limit for bundle size monitoring.

Changes

  • Remove bundlesize dependency
  • Add @size-limit/preset-small-lib and size-limit dependencies
  • Convert bundlesize configuration to size-limit format
  • Add Bundle Size Check job to CI workflow
  • Update GitHub Actions to v4 (checkout, setup-node)

Bundle Size Limits

  • dist/final-form-focus.umd.min.js: 1kB
  • dist/final-form-focus.es.js: 1.5kB
  • dist/final-form-focus.cjs.js: 1.5kB

Part of the bundlesize → size-limit migration across all Final Form repos.

Summary by CodeRabbit

  • Chores
    • Updated CI workflows to newer tooling for improved stability, security, and compatibility
    • Standardized Node.js runtime to version 22 across all pipelines and builds
    • Strengthened bundle size monitoring and added an automated bundle-size check job with tightened size thresholds for better quality control

- Remove bundlesize dependency
- Add @size-limit/preset-small-lib and size-limit dependencies
- Convert bundlesize config to size-limit format
- Add Bundle Size Check job to CI workflow
- Update GitHub Actions to v4 (checkout, setup-node)

Bundle size limits:
- dist/final-form-focus.umd.min.js: 1kB
- dist/final-form-focus.es.js: 1.5kB
- dist/final-form-focus.cjs.js: 1.5kB
@coderabbitai
Copy link

coderabbitai bot commented Feb 11, 2026

Warning

Rate limit exceeded

@erikras-dinesh-agent has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 4 minutes and 22 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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.

📝 Walkthrough

Walkthrough

GitHub Actions workflow updates: checkout and setup-node pinned to v4, Node.js runtime fixed to 22, and a new "Bundle Size Check" CI job added. package.json migrates bundle-size enforcement from bundlesize to size-limit and updates devDependencies and configuration keys.

Changes

Cohort / File(s) Summary
CI workflow
.github/workflows/ci.yml
Replaced actions/checkout@v2@v4, actions/setup-node@v2@v4; pinned Node.js to 22 across jobs; added a new "Bundle Size Check" job that checks out, sets up Node 22, installs deps, builds, and runs size-limit.
Bundle size tooling & config
package.json
Migrated from bundlesizesize-limit: removed bundlesize devDependency, added size-limit and @size-limit/preset-small-lib, replaced bundlesize config with size-limit, and renamed threshold keys → limit with adjusted values for three bundles.

Sequence Diagram(s)

sequenceDiagram
  participant GH as GitHub Actions
  participant Runner as CI Runner
  participant Repo as Repository
  participant Node as Node.js 22
  participant NPM as Package Manager
  participant Build as Build Step
  participant Size as size-limit

  rect rgba(100,149,237,0.5)
  GH->>Runner: trigger workflow (Bundle Size Check)
  end

  Runner->>Repo: checkout (`actions/checkout@v4`)
  Runner->>Node: setup Node.js 22 (`actions/setup-node@v4`)
  Runner->>NPM: install dependencies (npm ci / install)
  Runner->>Build: run build script
  Runner->>Size: run `size-limit` checks
  Size-->>Runner: report results
  Runner-->>GH: job success/failure
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 I hopped through workflows, bright and spry,
Upgraded nodes and actions high,
Bundles measured with a gentler hand,
size-limit keeps the pack so planned,
I nibble logs and give a cheerful cry.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely summarizes the main change: migrating the bundlesize tool to size-limit, which is the primary objective of the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch migrate-to-size-limit

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In @.github/workflows/ci.yml:
- Line 51: The workflow references the older action tag
"codecov/codecov-action@v2.1.0"; update this to the v4 release (e.g.,
"codecov/codecov-action@v4") to match the other v4 upgrades and pull in newer
features/security fixes, then verify the CI run succeeds and adjust any
invocation inputs if the v4 action changed its input names or behavior.

In `@package.json`:
- Around line 74-76: DevDependencies in package.json are out of alphabetical
order; move the entry "@size-limit/preset-small-lib" so devDependencies are
sorted alphabetically (consider ordering entries like
"@size-limit/preset-small-lib", "size-limit", "typescript" appropriately) to
restore the conventional ordering.

- Update codecov action to v4
- Alphabetize devDependencies
@erikras-dinesh-agent
Copy link
Contributor Author

Fixed all CodeRabbit feedback:

  • ✅ Updated codecov action to v4
  • ✅ Alphabetized devDependencies

coderabbitai[bot]
coderabbitai bot previously approved these changes Feb 11, 2026
coderabbitai[bot]
coderabbitai bot previously approved these changes Feb 11, 2026
@erikras-dinesh-agent
Copy link
Contributor Author

@coderabbitai review

@coderabbitai
Copy link

coderabbitai bot commented Feb 11, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@erikras erikras merged commit 0736ff6 into master Feb 11, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants