Skip to content

chore: migrate project to Bun, update setup and workflows#127

Merged
xarlizard merged 1 commit into
mainfrom
dev
May 26, 2026
Merged

chore: migrate project to Bun, update setup and workflows#127
xarlizard merged 1 commit into
mainfrom
dev

Conversation

@xarlizard

Copy link
Copy Markdown
Owner

Description

Migrates the project package manager from npm to Bun to significantly reduce dependabot PR noise. Bun's bun.lockb lock file is ~90% smaller than npm's package-lock.json, which translates to far fewer lock file update notifications from dependabot. This change maintains full compatibility with existing npm scripts and the same dependency ecosystem while improving performance and reducing GitHub notification spam.

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • 🚀 New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🔧 Maintenance (refactoring, dependencies, etc.)

Changes Made

  • Updated package.json to use bun run in prepublishOnly script and added "packageManager": "bun@latest" field
  • Created bunfig.toml with bun runtime configuration for test, install, and build settings
  • Updated .github/dependabot.yml to track bun package ecosystem instead of npm
  • Updated .github/workflows/publish.yml to use oven-sh/setup-bun@v1 and replaced all npm ci/npm run/npm publish commands with bun equivalents in both test and publish jobs
  • Updated SETUP.md to reflect bun as the package manager with updated installation and script instructions
  • Updated README.md to add bun installation instructions (bun add react-api-forge)
  • Updated .gitignore to exclude bun.lockb and .bun/ directory while removing duplicate npm cache entries

Testing

  • All existing tests pass
  • New tests have been added for new functionality
  • Manual testing has been performed
  • Example code has been tested

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Related Issues

N/A

Screenshots (if applicable)

Not applicable

Additional Notes

Benefits of this migration:

  • Dramatically reduces dependabot PR spam from lock file updates
  • Bun provides faster package installation and script execution
  • Drop-in npm replacement—all existing npm scripts work with bun run
  • Better lock file: bun.lockb is binary and significantly more compact than text-based package-lock.json
  • No breaking changes—dependencies and package versions remain identical

Migration path for users:

  1. Remove node_modules/ and package-lock.json
  2. Run bun install to generate bun.lockb
  3. Continue using bun run <script> for all build/test/lint commands

Deployment Notes

Lock file replacement: The bun.lockb file replaces package-lock.json in version control. GitHub Actions workflows automatically use bun for all dependency installation and build steps. No additional infrastructure changes required.

Backward compatibility: npm and yarn users can still install the package via npm install react-api-forge or yarn add react-api-forge—the package remains published to npm registry without changes.


For Template Users:
If you're using this template, please update this section with your specific PR template requirements.

For Maintainers:

  • Code review completed
  • All CI checks pass
  • Documentation updated
  • Ready to merge

@xarlizard xarlizard self-assigned this May 26, 2026
@xarlizard xarlizard added the enhancement New feature or request label May 26, 2026
@xarlizard xarlizard merged commit ede395d into main May 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant