Skip to content

Migrate from bundlesize to size-limit#57

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

Migrate from bundlesize to size-limit#57
erikras merged 3 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/react-final-form-listeners.umd.min.js: 2kB
  • dist/react-final-form-listeners.es.js: 3kB
  • dist/react-final-form-listeners.cjs.js: 3kB

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

Summary by CodeRabbit

  • Chores
    • Updated CI to use Node.js 22 and newer GitHub Actions versions.
    • Added a dedicated bundle-size check job to CI for independent size monitoring.
    • Migrated bundle size tooling to a new size-checking utility and updated project dev-dependencies accordingly.

- 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/react-final-form-listeners.umd.min.js: 2kB
- dist/react-final-form-listeners.es.js: 3kB
- dist/react-final-form-listeners.cjs.js: 3kB
@coderabbitai
Copy link

coderabbitai bot commented Feb 11, 2026

📝 Walkthrough

Walkthrough

The PR updates the GitHub Actions CI to use newer action versions and Node.js 22, adds an independent bundle size job, and replaces bundlesize with size-limit and its preset in package.json, migrating the configuration from threshold to limit.

Changes

Cohort / File(s) Summary
CI Workflow Updates
.github/workflows/ci.yml
Bumped actions/checkout and actions/setup-node from v2 to v4, set node-version: "22" and updated display name to "Use Node.js 22" across jobs. Added a new size job that checks out, sets up Node 22, installs, builds, and runs size-limit.
Build Tool Migration
package.json
Removed bundlesize devDependency; added size-limit and @size-limit/preset-small-lib. Replaced top-level bundlesize config with a size-limit block, converting each threshold key to limit.

Sequence Diagram(s)

mermaid
sequenceDiagram
autonumber
participant Repo as Repo (code)
participant GH as GitHub Actions
participant Runner as Runner (Node 22)
participant Size as size-limit
Repo->>GH: push / PR triggers workflow
GH->>Runner: checkout repo\n(setup Node.js 22)
Runner->>Runner: install deps\nbuild project
Runner->>Size: run size-limit
Size-->>Runner: size report (pass/fail)
Runner-->>GH: emit job result

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I hopped through yml and package.json bright,
Upgraded nodes to twenty-two tonight.
Size-limit hummed, bundlesize took flight,
CI runs cleaner — carrot cake delight! 🎉

🚥 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' directly and accurately reflects the main objective of the pull request—replacing the deprecated bundlesize tool with size-limit.
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

No actionable comments were generated in the recent review. 🎉


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:
- Around line 50-51: Update the Codecov GitHub Action to the latest major
release by changing the uses reference from codecov/codecov-action@v2.1.0 to
codecov/codecov-action@v5 (or `@v5.x`) in the workflow step named "Run code
coverage"; ensure the step's input parameters remain compatible with v5 and
adjust any input keys if the action's v5 interface differs.

In `@package.json`:
- Around line 85-87: The devDependencies block in package.json is not
alphabetically sorted: move "@size-limit/preset-small-lib" into the group of
"@"-scoped packages (near other `@-prefixed` entries such as
"@typescript-eslint/parser") and place "size-limit" in its alphabetical position
(for example after "rollup-plugin-uglify"), ensuring the entire devDependencies
section is sorted lexicographically so new entries are ordered consistently.

@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 9ebcb0c into master Feb 11, 2026
8 of 9 checks passed
@erikras erikras deleted the migrate-to-size-limit branch February 11, 2026 08:04
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