Skip to content

Migrate from bundlesize to size-limit#63

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

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

Conversation

@erikras-dinesh-agent
Copy link
Copy Markdown
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-calculate.umd.min.js: 1kB
  • dist/final-form-calculate.es.js: 1.5kB
  • dist/final-form-calculate.cjs.js: 1.5kB

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

Summary by CodeRabbit

  • Chores
    • Upgraded CI workflow actions to v4 and standardized on Node.js 22 for CI jobs.
    • Added a dedicated bundle size check job to verify builds.
    • Replaced previous bundle-size tooling with size-limit and updated size thresholds to higher limits.

- 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-calculate.umd.min.js: 1kB
- dist/final-form-calculate.es.js: 1.5kB
- dist/final-form-calculate.cjs.js: 1.5kB
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 11, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

Migrates bundle-size checking from bundlesize to size-limit, updates GitHub Actions steps to v4 (locks Node.js to 22 and replaces codecov action), adds a dedicated "Bundle Size Check" CI job, and raises bundle size limits in package.json.

Changes

Cohort / File(s) Summary
CI Workflow
.github/workflows/ci.yml
Updated Actions versions to v4 (actions/checkout, actions/setup-node), fixed Node.js to 22, replaced codecov action with v5, and added a new "Bundle Size Check" job that checks out, installs, builds, and runs size-limit.
Bundle Size Configuration
package.json
Removed bundlesize devDependency and config; added size-limit and @size-limit/preset-small-lib devDependencies; migrated config to the size-limit array and increased limits (e.g., ~800B/1.2kB → ~1.1kB/1.5kB).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I hopped from bundlesize to size-limit's gate,
New actions, Node 22—what a state!
A bundle job now guards the trail,
Limits raised, we still prevail.
Tiny paws, big CI cheer! 🎉

🚥 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 'Migrate from bundlesize to size-limit' accurately and concisely summarizes the main change: replacing the bundlesize tool with size-limit for bundle size monitoring.
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
Copy Markdown

@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: Update the Codecov GitHub Action reference from the old pin "uses:
codecov/codecov-action@v2.1.0" to the current major release (for example "uses:
codecov/codecov-action@v5.5.2") to pick up security fixes and improvements;
locate the workflow step that contains the string "uses:
codecov/codecov-action@v2.1.0" and replace the version tag with the desired v5
release, then run the workflow locally or in CI to verify token/inputs remain
compatible and adjust input names if any breaking changes occur between v2 and
v5.

In `@package.json`:
- Around line 92-95: The CI failed because the size-limit entry for
"dist/final-form-calculate.umd.min.js" (the "size-limit" array entry with path
"dist/final-form-calculate.umd.min.js") is set to "1kB" but the bundle is 1 byte
over; update that limit to a slightly larger value (for example "1.1kB" or
"1025B") in package.json to allow the current build to pass while keeping a
tight size constraint.

@erikras-dinesh-agent
Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

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 fd635e9 into master Feb 11, 2026
4 of 5 checks passed
@erikras erikras deleted the migrate-to-size-limit branch February 11, 2026 08:09
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