Skip to content

Migrate to Bun - #306

Closed
codebycarson wants to merge 1 commit into
mainfrom
feature/bun
Closed

Migrate to Bun#306
codebycarson wants to merge 1 commit into
mainfrom
feature/bun

Conversation

@codebycarson

Copy link
Copy Markdown
Collaborator

This pull request migrates the project from using pnpm and Yarn to Bun for package management, scripts, and testing. It also updates the configuration and documentation to reflect these changes, and modernizes the linting and formatting setup with Biome. Additionally, several files are refactored for consistency in code style and improved maintainability.

Migration to Bun for package management and CI/CD:

  • All workflow files (.github/workflows/checks.yml, coverage.yml, release.yml) now use Bun for installing dependencies, running builds, tests, and releases, replacing pnpm and Node setup. [1][2][3]
  • The root package.json and workspace scripts are updated to use Bun commands for build, test, release, and linting, and pnpm/Yarn-related fields and dependencies are removed.

Documentation and developer experience:

  • The README.md is updated to instruct users to install and use Bun, including new sections for testing, linting, and formatting.

Linting and formatting modernization:

  • The Biome configuration files (biome.json, packages/create-sei/biome.json) are updated to the latest schema, enable VCS integration, improve file inclusion, and set consistent formatting and linting rules. [1][2]

Refactoring and code consistency:

  • All references to Jest are removed from packages/create-sei, including configuration and test files, and replaced with Bun's test runner and updated import syntax. [1][2][3]
  • Code style in packages/create-sei/extensions/precompiles/src/components/default/index.tsx is standardized to double quotes and improved formatting for readability. [1][2][3][4][5][6][7]
  • The main entry file (src/main.ts) is refactored for import order and code style consistency. [1][2]

This migration streamlines development workflows, improves consistency, and leverages Bun's faster package management and testing capabilities.

@changeset-bot

changeset-botBot commented Mar 4, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 4598afa

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

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

Click here to learn what changesets are, and how to add one.

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

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Migrates the monorepo from pnpm/Yarn + Jest to Bun for package management and testing, while modernizing lint/format tooling around Biome and aligning TypeScript configs for project builds.

Changes:

  • Replaces pnpm/Yarn-based scripts and CI workflows with Bun equivalents (install, build, test, coverage, release).
  • Updates TypeScript configs across packages for tsc -b builds and adjusts package exports/dist layouts.
  • Migrates test suites from Jest to bun:test and updates Biome configuration/schema.

Reviewed changes

Copilot reviewed 188 out of 198 changed files in this pull request and generated 6 comments.

Show a summary per file
FileDescription
tsconfig.base.jsonSwitches TS base config to ESNext + bundler-oriented settings and project build flags.
pnpm-workspace.yamlRemoves pnpm workspace configuration in favor of Bun workspaces.
package.jsonAdds npm workspaces and replaces scripts with Bun + Biome equivalents.
biome.jsonUpgrades Biome schema/config and enables VCS integration + assist actions.
README.mdUpdates developer setup instructions to Bun + Biome.
.github/workflows/checks.ymlRuns install/build/test/lint via Bun in CI.
.github/workflows/coverage.ymlRuns Bun coverage and uploads lcov output.
.github/workflows/release.ymlUses Bun for install/build and Changesets publish.
packages/sei-global-wallet/tsconfig.jsonAligns build output to dist/ and tightens include/exclude.
packages/sei-global-wallet/tsconfig.declaration.jsonRemoves separate declarations-only tsconfig in favor of tsc -b.
packages/sei-global-wallet/src/zerodev.tsNormalizes import quoting/style.
packages/sei-global-wallet/src/solana.tsRemoves Solana entrypoint side-effect registration and exports.
packages/sei-global-wallet/src/lib/wallet.tsNormalizes formatting/quoting.
packages/sei-global-wallet/src/lib/registerSolanaStandard.tsRemoves Solana wallet-standard registration helper.
packages/sei-global-wallet/src/lib/tests/registerSolanaStandard.tsRemoves Jest test for Solana registration helper.
packages/sei-global-wallet/src/lib/tests/EIP6963Emitter.spec.tsMigrates Jest test to bun:test + Bun module mocking.
packages/sei-global-wallet/src/lib/EIP6963Emitter.tsNormalizes formatting/quoting.
packages/sei-global-wallet/src/index.tsNormalizes exports/import quoting.
packages/sei-global-wallet/src/ethereum.tsNormalizes export quoting.
packages/sei-global-wallet/src/eip6963.tsNormalizes import quoting.
packages/sei-global-wallet/package.jsonSwitches build/test to Bun/tsc build mode, updates exports, and adjusts peer deps/optionals.
packages/sei-global-wallet/jest.config.mjsRemoves Jest configuration.
packages/sei-global-wallet/.npmignoreAdds publish ignores aligned to new dist layout.
packages/registry/tsconfig.jsonUpdates build output to dist/ and refines include/exclude patterns.
packages/registry/tsconfig.declaration.jsonRemoves separate declarations-only tsconfig.
packages/registry/src/wallets/index.tsNormalizes quoting/style.
packages/registry/src/wallets/tests/index.spec.tsMigrates Jest tests to bun:test.
packages/registry/src/tokens/index.tsNormalizes quoting/style.
packages/registry/src/tokens/tests/index.spec.tsMigrates Jest tests to bun:test.
packages/registry/src/networks/index.tsNormalizes quoting/style.
packages/registry/src/networks/tests/index.spec.tsMigrates Jest tests to bun:test.
packages/registry/src/index.tsNormalizes exports order + quoting and updates constants formatting.
packages/registry/src/ibc/index.tsNormalizes quoting/style.
packages/registry/src/ibc/tests/index.spec.tsMigrates Jest tests to bun:test.
packages/registry/src/gas/index.tsNormalizes quoting/style.
packages/registry/src/gas/tests/index.spec.tsMigrates Jest tests to bun:test.
packages/registry/src/chain-info/index.tsNormalizes quoting/style.
packages/registry/src/chain-info/tests/index.spec.tsMigrates Jest tests to bun:test.
packages/registry/package.jsonSwitches to ESM dist layout + Bun scripts and adds explicit exports.
packages/registry/jest.config.jsRemoves Jest configuration.
packages/precompiles/tsconfig.jsonUpdates build output to dist/ and broadens include scope.
packages/precompiles/tsconfig.declaration.jsonRemoves separate declarations-only tsconfig.
packages/precompiles/src/viem/*.tsNormalizes quoting/import style across Viem helpers.
packages/precompiles/src/viem/index.tsReorders exports and normalizes quoting.
packages/precompiles/src/viem/tests/viemPrecompiles.spec.tsMigrates Jest tests to bun:test.
packages/precompiles/src/viem/tests/chain.spec.tsMigrates Jest tests to bun:test.
packages/precompiles/src/precompiles/*.tsNormalizes quoting/formatting for ABI/address definitions.
packages/precompiles/src/precompiles/index.tsNormalizes export paths/quoting.
packages/precompiles/src/index.tsNormalizes export paths/quoting.
packages/precompiles/src/ethers/*.tsNormalizes quoting/import style across Ethers helpers.
packages/precompiles/src/ethers/index.tsNormalizes export paths/quoting.
packages/precompiles/src/ethers/tests/ethersPrecompiles.spec.tsMigrates Jest tests to bun:test and refactors imports.
packages/precompiles/package.jsonSwitches to ESM dist layout + Bun scripts and adds explicit exports.
packages/precompiles/jest.config.jsRemoves Jest configuration.
packages/precompiles/.npmignoreUpdates ignore list to reflect Jest removal.
packages/mcp-server/tsconfig.test.jsonRemoves Jest-focused test tsconfig.
packages/mcp-server/tsconfig.jsonSwitches build output to dist/ and excludes src/tests.
packages/mcp-server/tsconfig.declaration.jsonRemoves separate declarations-only tsconfig.
packages/mcp-server/src/tests/server/transport/stdio.test.tsRemoves Jest transport tests (stdio).
packages/mcp-server/src/tests/server/server.test.tsRemoves Jest server-module tests.
packages/mcp-server/src/tests/index.test.tsRemoves Jest CLI entry tests.
packages/mcp-server/src/tests/core/wallet/types.test.tsMigrates Jest to bun:test.
packages/mcp-server/src/tests/core/wallet/providers/disabled.test.tsMigrates Jest to bun:test.
packages/mcp-server/src/tests/core/wallet/index.test.tsMigrates Jest to bun:test and changes mocking strategy.
packages/mcp-server/src/tests/core/services/utils.test.tsMigrates Jest to bun:test.
packages/mcp-server/src/tests/core/helpers/tool-test-helpers.tsRemoves Jest tool-test helpers.
packages/mcp-server/src/server/transport/types.tsNormalizes quoting and transport mode string literals.
packages/mcp-server/src/server/transport/streamable-http.tsRefactors/import-order + normalizes quoting and error responses.
packages/mcp-server/src/server/transport/stdio.tsNormalizes quoting and logging.
packages/mcp-server/src/server/transport/security.tsNormalizes quoting; keeps wallet-vs-http transport safety enforcement.
packages/mcp-server/src/server/transport/index.tsReorders exports and normalizes quoting.
packages/mcp-server/src/server/transport/http-sse.tsNormalizes quoting and minor handler cleanup.
packages/mcp-server/src/server/transport/factory.tsNormalizes quoting and switch cases for modes.
packages/mcp-server/src/server/server.tsNormalizes imports + error handling/log strings.
packages/mcp-server/src/server/package-info.tsNormalizes quoting and JSON read paths.
packages/mcp-server/src/server/args.tsNormalizes quoting and help text formatting.
packages/mcp-server/src/mintlify/search.tsNormalizes quoting and ensures trailing commas/format consistency.
packages/mcp-server/src/mintlify/index.tsNormalizes export path quoting.
packages/mcp-server/src/mintlify/config.tsNormalizes constants quoting.
packages/mcp-server/src/index.tsNormalizes import order/quoting and logging strings.
packages/mcp-server/src/docs/server.tsNormalizes quoting and response typing/coercion.
packages/mcp-server/src/docs/index.tsNormalizes export path quoting.
packages/mcp-server/src/core/wallet/types.tsNormalizes quoting and constructor formatting.
packages/mcp-server/src/core/wallet/providers/private-key.tsNormalizes quoting and refactors error throws; renames unused params to _tx.
packages/mcp-server/src/core/wallet/providers/disabled.tsNormalizes quoting and renames unused params to _tx/_network.
packages/mcp-server/src/core/wallet/index.tsNormalizes quoting and reorders exports.
packages/mcp-server/src/core/services/utils.tsNormalizes quoting and formatting of helper methods.
packages/mcp-server/src/core/services/transactions.tsNormalizes quoting/import style.
packages/mcp-server/src/core/services/tokens.tsNormalizes quoting and parameter defaults; refactors ABI literals formatting.
packages/mcp-server/src/core/services/index.tsReorders exports and normalizes viem type re-exports.
packages/mcp-server/src/core/services/contracts.tsTightens types (WriteContractParameters/Abi), normalizes quoting.
packages/mcp-server/src/core/services/clients.tsRemoves unused wallet-client imports and normalizes config style.
packages/mcp-server/src/core/services/blocks.tsNormalizes quoting/import style.
packages/mcp-server/src/core/services/balance.tsNormalizes quoting and formatting across ABI and service calls.
packages/mcp-server/src/core/config.tsNormalizes quoting and env schema defaults.
packages/mcp-server/src/core/chains.tsReplaces seiDevnet import with a local defineChain definition.
packages/mcp-server/package.jsonSwitches to Bun scripts, removes Jest deps, and adds Biome scripts.
packages/mcp-server/jest.config.jsRemoves Jest configuration.
packages/mcp-server/.env.exampleUpdates wallet mode comment to supported modes.
packages/ledger/tsconfig.jsonUpdates build output to dist/ and excludes tests.
packages/ledger/tsconfig.declaration.jsonRemoves separate declarations-only tsconfig.
packages/ledger/src/index.tsNormalizes export quoting.
packages/ledger/src/cosmos/utils.tsNormalizes import quoting.
packages/ledger/src/cosmos/seiLedgerOfflineAminoSigner.tsNormalizes quoting and formatting.
packages/ledger/src/cosmos/index.tsNormalizes export quoting.
packages/ledger/src/cosmos/tests/utils.spec.tsMigrates Jest tests to bun:test with Bun module mocks.
packages/ledger/src/cosmos/tests/seiLedgerOfflineAminoSigner.spec.tsMigrates Jest tests to bun:test with Bun mocks.
packages/ledger/package.jsonSwitches to ESM dist layout + Bun scripts and adds explicit exports.
packages/ledger/jest.config.jsRemoves Jest configuration.
packages/ledger/.npmignoreRemoves Yarn-specific ignore entry.
packages/create-sei/tsconfig.jsonAligns build output to dist/ + rootDir and expands include glob.
packages/create-sei/templates/next-template/tailwind.config.jsNormalizes quoting and formatting.
packages/create-sei/templates/next-template/src/components/shell/shell.tsxNormalizes quoting/formatting and refactors JSX formatting.
packages/create-sei/templates/next-template/src/components/shell/index.tsNormalizes export quoting.
packages/create-sei/templates/next-template/src/components/providers/providers.tsxNormalizes quoting/formatting and refactors connectors config formatting.
packages/create-sei/templates/next-template/src/components/providers/index.tsNormalizes export quoting.
packages/create-sei/templates/next-template/src/components/landing/index.tsxNormalizes quoting and refactors JSX formatting.
packages/create-sei/templates/next-template/src/components/index.tsNormalizes export quoting.
packages/create-sei/templates/next-template/src/app/resources/resources.tsNormalizes quoting and refactors imports formatting.
packages/create-sei/templates/next-template/src/app/resources/page.tsxNormalizes quoting and refactors JSX formatting.
packages/create-sei/templates/next-template/src/app/page.tsxNormalizes quoting and import style.
packages/create-sei/templates/next-template/src/app/layout.tsxNormalizes quoting and refactors layout signature formatting.
packages/create-sei/templates/next-template/src/app/globals.cssRemoves leading blank line.
packages/create-sei/templates/next-template/biome.jsonUpgrades Biome schema and adds Tailwind CSS parser configuration.
packages/create-sei/src/main.tsRefactors import order, typing, and updates printed instructions to Bun.
packages/create-sei/src/main.test.tsMigrates Jest tests to bun:test and adjusts path resolution.
packages/create-sei/package.jsonSwitches scripts to tsc -b + Bun tests and adds publishConfig.
packages/create-sei/jest.config.jsRemoves Jest configuration.
packages/create-sei/biome.jsonUpgrades Biome schema and adjusts include patterns.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment threadpackages/precompiles/tsconfig.json Outdated
"outDir": "dist",
"rootDir": "src"
},
"include": ["src/**/*"]

CopilotAIMar 4, 2026

Copy link

Choose a reason for hiding this comment

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

packages/precompilesincludessrc//*but does not excludesrc//tests. Since this package keeps tests under src//tests, tsc -bwill emit compiled test artifacts intodist/, and "files": ["dist"]will publish them. Add anexcludefor test directories (e.g.src//tests, src/**/*.spec.ts) or move tests outside src/` to avoid shipping test code to consumers.

Suggested change
"include": ["src/**/*"]
"include": ["src/**/*"],
"exclude": ["src/**/__tests__", "src/**/*.spec.ts", "src/**/*.test.ts"]

Copilot uses AI. Check for mistakes.
Comment on lines 63 to 70
"./eip6963": {
"types": "./dist/types/eip6963.d.ts",
"import": "./dist/esm/eip6963.js",
"default": "./dist/cjs/eip6963.js"
"types": "./dist/eip6963.d.ts",
"default": "./dist/eip6963.js"
},
"./ethereum": {
"types": "./dist/types/ethereum.d.ts",
"import": "./dist/esm/ethereum.js",
"default": "./dist/cjs/ethereum.js"
},
"./solana": {
"types": "./dist/types/solana.d.ts",
"import": "./dist/esm/solana.js",
"default": "./dist/cjs/solana.js"
"types": "./dist/ethereum.d.ts",
"default": "./dist/ethereum.js"
},

CopilotAIMar 4, 2026

Copy link

Choose a reason for hiding this comment

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

The package no longer exports a "./solana" entrypoint (and the backing source file was deleted). This is a breaking change for consumers that import "@sei-js/sei-global-wallet/solana". If Solana support is still intended, consider keeping a compatibility export (even as a thin re-export) or providing a deprecation/stub module that throws a clear runtime error + documents the migration path; otherwise, explicitly call out the removal as a breaking API change in release notes/versioning.

Copilot uses AI. Check for mistakes.
Comment threadpackages/mcp-server/src/core/services/contracts.ts Outdated
Comment threadbiome.json Outdated
Comment threadpackages/mcp-server/src/server/transport/factory.ts
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.86283% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 99.88%. Comparing base (184d715) to head (c0085a5).

Files with missing linesPatch %Lines
packages/mcp-server/src/core/services/clients.ts95.65%1 Missing ⚠️
packages/mcp-server/src/server/package-info.ts95.45%1 Missing ⚠️
Additional details and impacted files
@@ Coverage Diff @@## main #306 +/- ##
===========================================
+ Coverage 79.69% 99.88% +20.18% 
===========================================
Files 83 70 -13 Lines 1305 1671 +366 Branches 158 0 -158 ===========================================
+ Hits 1040 1669 +629 + Misses 265 2 -263 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

- migrate workflows and scripts to Bun\n- refactor MCP server tools/resources structure and security handling\n- apply formatting and config cleanup across packages
@github-actions

Copy link
Copy Markdown
Contributor

We truly appreciate your contribution and the time you’ve invested in this PR.
Before we can merge it, we’d love your help addressing the remaining feedback or sharing your perspective.
If we don’t hear back within 2 day(s), this PR will close automatically — but don’t worry, you can reopen it anytime when you’re ready to continue.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@codebycarson@codecov-commenter