Conversation
Upgrade biome.json to schema v2.x with new formatter rules (spaces, indentWidth=2, LF), tighter file includes, updated linter rules, and assist organizeImports. Remove legacy Jest config/test scaffolding across packages and clean up related test files. Apply dependency and package.json updates and assorted code changes across mcp-server, ledger, precompiles, registry, create-sei, and sei-global-wallet packages.
Bump Biome schema to 2.4.5 and enable CSS parsing with tailwindDirectives across root and package biome configs; add CSS globs to includes. Reformat many TypeScript/TSX files (standardize to double quotes, wrap long JSX/props, consistent imports) across create-sei templates and components, update postcss.config.mjs formatting, and tidy globals.css. Improve create-sei CLI/test code formatting and small CLI enhancements (message formatting, safer prompts, and directory handling). These changes are primarily non-functional style/config updates to support Tailwind directives and maintain consistent code style across the repo.
Various tidy-ups and type fixes across the repo:
- biome.json: add excludes for coverage and dist to file matcher.
- Normalize and reorder imports in multiple modules; export wallet provider classes from wallet index.
- Improve TypeScript typings and function signatures (viem Abi/WriteContractParameters, return types, more precise mock/spy types).
- Replace unused catch parameters with catch { } and add explicit radix (10) to Number.parseInt calls for correctness.
- Adjust tests to use stronger typings for mocks/spies (use never / ReturnType<typeof mock> where appropriate) and reorder test imports for consistency.
- Minor server/transport fixes: avoid unused req param, import/registration ordering, and streamable/http transport/import cleanup.
- Small fixes in ledger/cosmos modules (import ordering) and other minor refactors to satisfy linters/TypeScript.
These changes improve type safety, lint/test reliability, and code consistency.
Replace Node/pnpm toolchain with Bun across CI and repo scripts. Workflows now use oven-sh/setup-bun and run bun install / bun run build / bun test; coverage action now uploads lcov.info. Update README to document Bun-based install, build, test and Biome linting. Update package.json scripts (build, dev, test, release flows), pin @types/bun, remove rimraf, and add clean/dev helpers. Adjust create-sei: add inquirer.d.ts, simplify tsconfig, add tsbuildinfo, change CLI messages and build/dev scripts. Update biome.json VCS and file includes and refresh bun.lock with dependency updates.
|
There was a problem hiding this comment.
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 -bbuilds and adjusts packageexports/dist layouts. - Migrates test suites from Jest to
bun:testand 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
| File | Description |
|---|---|
| tsconfig.base.json | Switches TS base config to ESNext + bundler-oriented settings and project build flags. |
| pnpm-workspace.yaml | Removes pnpm workspace configuration in favor of Bun workspaces. |
| package.json | Adds npm workspaces and replaces scripts with Bun + Biome equivalents. |
| biome.json | Upgrades Biome schema/config and enables VCS integration + assist actions. |
| README.md | Updates developer setup instructions to Bun + Biome. |
| .github/workflows/checks.yml | Runs install/build/test/lint via Bun in CI. |
| .github/workflows/coverage.yml | Runs Bun coverage and uploads lcov output. |
| .github/workflows/release.yml | Uses Bun for install/build and Changesets publish. |
| packages/sei-global-wallet/tsconfig.json | Aligns build output to dist/ and tightens include/exclude. |
| packages/sei-global-wallet/tsconfig.declaration.json | Removes separate declarations-only tsconfig in favor of tsc -b. |
| packages/sei-global-wallet/src/zerodev.ts | Normalizes import quoting/style. |
| packages/sei-global-wallet/src/solana.ts | Removes Solana entrypoint side-effect registration and exports. |
| packages/sei-global-wallet/src/lib/wallet.ts | Normalizes formatting/quoting. |
| packages/sei-global-wallet/src/lib/registerSolanaStandard.ts | Removes Solana wallet-standard registration helper. |
| packages/sei-global-wallet/src/lib/tests/registerSolanaStandard.ts | Removes Jest test for Solana registration helper. |
| packages/sei-global-wallet/src/lib/tests/EIP6963Emitter.spec.ts | Migrates Jest test to bun:test + Bun module mocking. |
| packages/sei-global-wallet/src/lib/EIP6963Emitter.ts | Normalizes formatting/quoting. |
| packages/sei-global-wallet/src/index.ts | Normalizes exports/import quoting. |
| packages/sei-global-wallet/src/ethereum.ts | Normalizes export quoting. |
| packages/sei-global-wallet/src/eip6963.ts | Normalizes import quoting. |
| packages/sei-global-wallet/package.json | Switches build/test to Bun/tsc build mode, updates exports, and adjusts peer deps/optionals. |
| packages/sei-global-wallet/jest.config.mjs | Removes Jest configuration. |
| packages/sei-global-wallet/.npmignore | Adds publish ignores aligned to new dist layout. |
| packages/registry/tsconfig.json | Updates build output to dist/ and refines include/exclude patterns. |
| packages/registry/tsconfig.declaration.json | Removes separate declarations-only tsconfig. |
| packages/registry/src/wallets/index.ts | Normalizes quoting/style. |
| packages/registry/src/wallets/tests/index.spec.ts | Migrates Jest tests to bun:test. |
| packages/registry/src/tokens/index.ts | Normalizes quoting/style. |
| packages/registry/src/tokens/tests/index.spec.ts | Migrates Jest tests to bun:test. |
| packages/registry/src/networks/index.ts | Normalizes quoting/style. |
| packages/registry/src/networks/tests/index.spec.ts | Migrates Jest tests to bun:test. |
| packages/registry/src/index.ts | Normalizes exports order + quoting and updates constants formatting. |
| packages/registry/src/ibc/index.ts | Normalizes quoting/style. |
| packages/registry/src/ibc/tests/index.spec.ts | Migrates Jest tests to bun:test. |
| packages/registry/src/gas/index.ts | Normalizes quoting/style. |
| packages/registry/src/gas/tests/index.spec.ts | Migrates Jest tests to bun:test. |
| packages/registry/src/chain-info/index.ts | Normalizes quoting/style. |
| packages/registry/src/chain-info/tests/index.spec.ts | Migrates Jest tests to bun:test. |
| packages/registry/package.json | Switches to ESM dist layout + Bun scripts and adds explicit exports. |
| packages/registry/jest.config.js | Removes Jest configuration. |
| packages/precompiles/tsconfig.json | Updates build output to dist/ and broadens include scope. |
| packages/precompiles/tsconfig.declaration.json | Removes separate declarations-only tsconfig. |
| packages/precompiles/src/viem/*.ts | Normalizes quoting/import style across Viem helpers. |
| packages/precompiles/src/viem/index.ts | Reorders exports and normalizes quoting. |
| packages/precompiles/src/viem/tests/viemPrecompiles.spec.ts | Migrates Jest tests to bun:test. |
| packages/precompiles/src/viem/tests/chain.spec.ts | Migrates Jest tests to bun:test. |
| packages/precompiles/src/precompiles/*.ts | Normalizes quoting/formatting for ABI/address definitions. |
| packages/precompiles/src/precompiles/index.ts | Normalizes export paths/quoting. |
| packages/precompiles/src/index.ts | Normalizes export paths/quoting. |
| packages/precompiles/src/ethers/*.ts | Normalizes quoting/import style across Ethers helpers. |
| packages/precompiles/src/ethers/index.ts | Normalizes export paths/quoting. |
| packages/precompiles/src/ethers/tests/ethersPrecompiles.spec.ts | Migrates Jest tests to bun:test and refactors imports. |
| packages/precompiles/package.json | Switches to ESM dist layout + Bun scripts and adds explicit exports. |
| packages/precompiles/jest.config.js | Removes Jest configuration. |
| packages/precompiles/.npmignore | Updates ignore list to reflect Jest removal. |
| packages/mcp-server/tsconfig.test.json | Removes Jest-focused test tsconfig. |
| packages/mcp-server/tsconfig.json | Switches build output to dist/ and excludes src/tests. |
| packages/mcp-server/tsconfig.declaration.json | Removes separate declarations-only tsconfig. |
| packages/mcp-server/src/tests/server/transport/stdio.test.ts | Removes Jest transport tests (stdio). |
| packages/mcp-server/src/tests/server/server.test.ts | Removes Jest server-module tests. |
| packages/mcp-server/src/tests/index.test.ts | Removes Jest CLI entry tests. |
| packages/mcp-server/src/tests/core/wallet/types.test.ts | Migrates Jest to bun:test. |
| packages/mcp-server/src/tests/core/wallet/providers/disabled.test.ts | Migrates Jest to bun:test. |
| packages/mcp-server/src/tests/core/wallet/index.test.ts | Migrates Jest to bun:test and changes mocking strategy. |
| packages/mcp-server/src/tests/core/services/utils.test.ts | Migrates Jest to bun:test. |
| packages/mcp-server/src/tests/core/helpers/tool-test-helpers.ts | Removes Jest tool-test helpers. |
| packages/mcp-server/src/server/transport/types.ts | Normalizes quoting and transport mode string literals. |
| packages/mcp-server/src/server/transport/streamable-http.ts | Refactors/import-order + normalizes quoting and error responses. |
| packages/mcp-server/src/server/transport/stdio.ts | Normalizes quoting and logging. |
| packages/mcp-server/src/server/transport/security.ts | Normalizes quoting; keeps wallet-vs-http transport safety enforcement. |
| packages/mcp-server/src/server/transport/index.ts | Reorders exports and normalizes quoting. |
| packages/mcp-server/src/server/transport/http-sse.ts | Normalizes quoting and minor handler cleanup. |
| packages/mcp-server/src/server/transport/factory.ts | Normalizes quoting and switch cases for modes. |
| packages/mcp-server/src/server/server.ts | Normalizes imports + error handling/log strings. |
| packages/mcp-server/src/server/package-info.ts | Normalizes quoting and JSON read paths. |
| packages/mcp-server/src/server/args.ts | Normalizes quoting and help text formatting. |
| packages/mcp-server/src/mintlify/search.ts | Normalizes quoting and ensures trailing commas/format consistency. |
| packages/mcp-server/src/mintlify/index.ts | Normalizes export path quoting. |
| packages/mcp-server/src/mintlify/config.ts | Normalizes constants quoting. |
| packages/mcp-server/src/index.ts | Normalizes import order/quoting and logging strings. |
| packages/mcp-server/src/docs/server.ts | Normalizes quoting and response typing/coercion. |
| packages/mcp-server/src/docs/index.ts | Normalizes export path quoting. |
| packages/mcp-server/src/core/wallet/types.ts | Normalizes quoting and constructor formatting. |
| packages/mcp-server/src/core/wallet/providers/private-key.ts | Normalizes quoting and refactors error throws; renames unused params to _tx. |
| packages/mcp-server/src/core/wallet/providers/disabled.ts | Normalizes quoting and renames unused params to _tx/_network. |
| packages/mcp-server/src/core/wallet/index.ts | Normalizes quoting and reorders exports. |
| packages/mcp-server/src/core/services/utils.ts | Normalizes quoting and formatting of helper methods. |
| packages/mcp-server/src/core/services/transactions.ts | Normalizes quoting/import style. |
| packages/mcp-server/src/core/services/tokens.ts | Normalizes quoting and parameter defaults; refactors ABI literals formatting. |
| packages/mcp-server/src/core/services/index.ts | Reorders exports and normalizes viem type re-exports. |
| packages/mcp-server/src/core/services/contracts.ts | Tightens types (WriteContractParameters/Abi), normalizes quoting. |
| packages/mcp-server/src/core/services/clients.ts | Removes unused wallet-client imports and normalizes config style. |
| packages/mcp-server/src/core/services/blocks.ts | Normalizes quoting/import style. |
| packages/mcp-server/src/core/services/balance.ts | Normalizes quoting and formatting across ABI and service calls. |
| packages/mcp-server/src/core/config.ts | Normalizes quoting and env schema defaults. |
| packages/mcp-server/src/core/chains.ts | Replaces seiDevnet import with a local defineChain definition. |
| packages/mcp-server/package.json | Switches to Bun scripts, removes Jest deps, and adds Biome scripts. |
| packages/mcp-server/jest.config.js | Removes Jest configuration. |
| packages/mcp-server/.env.example | Updates wallet mode comment to supported modes. |
| packages/ledger/tsconfig.json | Updates build output to dist/ and excludes tests. |
| packages/ledger/tsconfig.declaration.json | Removes separate declarations-only tsconfig. |
| packages/ledger/src/index.ts | Normalizes export quoting. |
| packages/ledger/src/cosmos/utils.ts | Normalizes import quoting. |
| packages/ledger/src/cosmos/seiLedgerOfflineAminoSigner.ts | Normalizes quoting and formatting. |
| packages/ledger/src/cosmos/index.ts | Normalizes export quoting. |
| packages/ledger/src/cosmos/tests/utils.spec.ts | Migrates Jest tests to bun:test with Bun module mocks. |
| packages/ledger/src/cosmos/tests/seiLedgerOfflineAminoSigner.spec.ts | Migrates Jest tests to bun:test with Bun mocks. |
| packages/ledger/package.json | Switches to ESM dist layout + Bun scripts and adds explicit exports. |
| packages/ledger/jest.config.js | Removes Jest configuration. |
| packages/ledger/.npmignore | Removes Yarn-specific ignore entry. |
| packages/create-sei/tsconfig.json | Aligns build output to dist/ + rootDir and expands include glob. |
| packages/create-sei/templates/next-template/tailwind.config.js | Normalizes quoting and formatting. |
| packages/create-sei/templates/next-template/src/components/shell/shell.tsx | Normalizes quoting/formatting and refactors JSX formatting. |
| packages/create-sei/templates/next-template/src/components/shell/index.ts | Normalizes export quoting. |
| packages/create-sei/templates/next-template/src/components/providers/providers.tsx | Normalizes quoting/formatting and refactors connectors config formatting. |
| packages/create-sei/templates/next-template/src/components/providers/index.ts | Normalizes export quoting. |
| packages/create-sei/templates/next-template/src/components/landing/index.tsx | Normalizes quoting and refactors JSX formatting. |
| packages/create-sei/templates/next-template/src/components/index.ts | Normalizes export quoting. |
| packages/create-sei/templates/next-template/src/app/resources/resources.ts | Normalizes quoting and refactors imports formatting. |
| packages/create-sei/templates/next-template/src/app/resources/page.tsx | Normalizes quoting and refactors JSX formatting. |
| packages/create-sei/templates/next-template/src/app/page.tsx | Normalizes quoting and import style. |
| packages/create-sei/templates/next-template/src/app/layout.tsx | Normalizes quoting and refactors layout signature formatting. |
| packages/create-sei/templates/next-template/src/app/globals.css | Removes leading blank line. |
| packages/create-sei/templates/next-template/biome.json | Upgrades Biome schema and adds Tailwind CSS parser configuration. |
| packages/create-sei/src/main.ts | Refactors import order, typing, and updates printed instructions to Bun. |
| packages/create-sei/src/main.test.ts | Migrates Jest tests to bun:test and adjusts path resolution. |
| packages/create-sei/package.json | Switches scripts to tsc -b + Bun tests and adds publishConfig. |
| packages/create-sei/jest.config.js | Removes Jest configuration. |
| packages/create-sei/biome.json | Upgrades 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.
packages/precompiles/tsconfig.json
Outdated
| "outDir": "dist", | ||
| "rootDir": "src" | ||
| }, | ||
| "include": ["src/**/*"] |
There was a problem hiding this comment.
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.
| "include": ["src/**/*"] | |
| "include": ["src/**/*"], | |
| "exclude": ["src/**/__tests__", "src/**/*.spec.ts", "src/**/*.test.ts"] |
| "./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" | ||
| }, |
There was a problem hiding this comment.
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.
packages/create-sei/templates/next-template/src/components/shell/shell.tsx
Show resolved
Hide resolved
Add '*.tsbuildinfo' to .gitignore to avoid checking in TypeScript incremental build artifacts. Remove generated tsconfig.tsbuildinfo files from packages/create-sei, packages/ledger, packages/precompiles, and packages/sei-global-wallet.
Codecov Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
Modularize the mcp-server toolset by removing the large core/tools.ts and adding split tool modules (balance-, contract-, network-, token-, transfer-tools and an index). Add/adjust package exports for create-sei and mcp-server to support ESM imports and types. Improve private key handling in mcp-server config (strip/validate and warn for invalid keys) and tighten deployContract types to return an Address. Misc: update CI to pin bun version, add .env patterns to .gitignore, broaden biome.json includes, exclude test files in package tsconfigs, adjust bin import path, and bump @biomejs/biome in package.json devDependencies. Lockfile changes reflect dependency updates.
Split the monolithic core/resources.ts into focused modules (balance, block, network, token, transaction) and added helpers and an index to register all EVM resources. Updated server import to use the new resources index and removed the old resources.ts file. Changed contracts service to stop reading private key from config and rely on wallet provider (removed direct private-key checks). Replaced Console+process.exit security handling with thrown errors in validateSecurityConfig to improve testability and signal unsafe config explicitly. Pinned bun-version to "1.3.x" in CI workflows and updated tests to reflect the refactor and new error behavior.
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:
.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]package.jsonand 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:
README.mdis updated to instruct users to install and use Bun, including new sections for testing, linting, and formatting.Linting and formatting modernization:
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:
packages/create-sei, including configuration and test files, and replaced with Bun's test runner and updated import syntax. [1] [2] [3]packages/create-sei/extensions/precompiles/src/components/default/index.tsxis standardized to double quotes and improved formatting for readability. [1] [2] [3] [4] [5] [6] [7]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.