♻️ refactor(utils): retire Phase 0 compatibility exports - #2086
♻️ refactor(utils): retire Phase 0 compatibility exports#2086roninjin10 wants to merge 1 commit into
Conversation
<prompt>Execute Phase 0 of the @tevm/utils retirement.</prompt>
🦋 Changeset detectedLatest commit: 1f8ae20 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR 💥 An error occurred when fetching the changed packages and changesets in this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
📝 WalkthroughWalkthroughThe PR removes legacy ChangesUtility export cleanup
Emitter and type contracts
Top-level API synchronization
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed: dependency version conflict. Check your lock file or package.json. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tevm/index.js`:
- Line 3: Update the public bytesToBigInt export by adding complete JSDoc with
inline type imports, `@throws` documentation, and a valid working `@example`.
Reformat the export declaration containing bytesToBigInt to comply with Biome’s
120-character line width, preserving all existing exports.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 03654848-1110-4d5c-a580-192ef888ba86
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (22)
.changeset/tidy-utils-retire.mdpackages/blockchain/package.jsonpackages/blockchain/src/Chain.tspackages/utils/docs/globals.mdpackages/utils/docs/type-aliases/AsyncEventEmitter.mdpackages/utils/docs/type-aliases/GenesisState.mdpackages/utils/src/index.tspackages/utils/src/viem.jspackages/vm/src/BaseVm.tspackages/vm/src/utils/VMOpts.tstevm/docs/blockchain/type-aliases/Chain.mdtevm/docs/index/README.mdtevm/docs/index/functions/bytesToBigInt.mdtevm/docs/utils/README.mdtevm/docs/utils/type-aliases/AsyncEventEmitter.mdtevm/docs/utils/type-aliases/GenesisState.mdtevm/docs/vm/interfaces/VMOpts.mdtevm/index.cjstevm/index.d.ctstevm/index.d.tstevm/index.jstevm/index.ts
💤 Files with no reviewable changes (9)
- packages/utils/docs/type-aliases/GenesisState.md
- tevm/docs/utils/type-aliases/GenesisState.md
- tevm/docs/utils/type-aliases/AsyncEventEmitter.md
- tevm/index.cjs
- packages/utils/docs/type-aliases/AsyncEventEmitter.md
- packages/utils/src/viem.js
- tevm/index.ts
- packages/utils/docs/globals.md
- packages/utils/src/index.ts
| export { definePredeploy } from '@tevm/predeploys'; | ||
| export { createContract } from '@tevm/contract'; | ||
| export { PREFUNDED_ACCOUNTS, PREFUNDED_PRIVATE_KEYS, PREFUNDED_PUBLIC_KEYS, PREFUNDED_SEED, boolToBytes, boolToHex, bytesToBigInt, bytesToBigint, bytesToBool, bytesToHex, bytesToNumber, createMemoryDb, decodeAbiParameters, decodeErrorResult, decodeEventLog, decodeFunctionData, decodeFunctionResult, encodeAbiParameters, encodeDeployData, encodeErrorResult, encodeEventTopics, encodeFunctionData, encodeFunctionResult, encodePacked, formatAbi, formatEther, formatGwei, formatLog, fromBytes, fromHex, fromRlp, getAddress, hexToBigInt, hexToBool, hexToBytes, hexToNumber, hexToString, isAddress, isBytes, isHex, keccak256, mnemonicToAccount, numberToHex, parseAbi, parseEther, parseGwei, stringToHex, toBytes, toHex, toRlp } from '@tevm/utils'; | ||
| export { PREFUNDED_ACCOUNTS, PREFUNDED_PRIVATE_KEYS, PREFUNDED_PUBLIC_KEYS, PREFUNDED_SEED, boolToBytes, boolToHex, bytesToBigInt, bytesToBool, bytesToHex, bytesToNumber, createMemoryDb, decodeAbiParameters, decodeErrorResult, decodeEventLog, decodeFunctionData, decodeFunctionResult, encodeAbiParameters, encodeDeployData, encodeErrorResult, encodeEventTopics, encodeFunctionData, encodeFunctionResult, encodePacked, formatAbi, formatEther, formatGwei, formatLog, fromBytes, fromHex, fromRlp, getAddress, hexToBigInt, hexToBool, hexToBytes, hexToNumber, hexToString, isAddress, isBytes, isHex, keccak256, mnemonicToAccount, numberToHex, parseAbi, parseEther, parseGwei, stringToHex, toBytes, toHex, toRlp } from '@tevm/utils'; |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
Document and format the changed public export.
The new bytesToBigInt export has no complete JSDoc and the export list exceeds the configured 120-character Biome width. Add JSDoc with inline type imports, @throws, and a working @example, then let Biome wrap the export declaration.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@tevm/index.js` at line 3, Update the public bytesToBigInt export by adding
complete JSDoc with inline type imports, `@throws` documentation, and a valid
working `@example`. Reformat the export declaration containing bytesToBigInt to
comply with Biome’s 120-character line width, preserving all existing exports.
Source: Coding guidelines
Summary
@tevm/utilsretirement assessment at/Users/williamcory/Desktop/tevm-stack-readiness/utils-voltaire.html.GenesisStateandAsyncEventEmittercompatibility types from@tevm/utils.bytesToBigInt, removesbytesToBigint, and updates the top-leveltevmruntime, declaration, and documentation artifacts.GenesisStatefrom@evmts/zevm/commonandEventEmitterfromeventemitter3.Breaking change and migration
These exports were described as backward-compatibility shims but were not marked deprecated-for-removal, so this PR honestly requests major bumps for
@tevm/utilsandtevm. The repository's linked release group consequently resolves affected packages at the major level.GenesisState: import from@evmts/zevm/common.AsyncEventEmitter: useEventEmitterfromeventemitter3.bytesToBigint: rename tobytesToBigInt.Scope and concurrency
This deliberately does not migrate the ~119 viem/abitype/zevm pass-through call sites or move
signature.js; those remain later phases.pnpm-lock.yamlis also touched by open work. This PR's lockfile change is limited to the three-lineeventemitter3importer entry required by@tevm/blockchain.Verification
pnpm install --frozen-lockfilepnpm --dir packages/utils typecheckpnpm --dir packages/blockchain typecheckpnpm --dir packages/vm typecheckpnpm --dir tevm typecheckpnpm --dir packages/utils exec vitest run— 7 files passed; 59 passed, 1 skippedpnpm --dir packages/blockchain exec vitest run— 16 files passed; 83 passedpnpm exec vitest run packages/vm/src --config vitest.config.ts— Vitest ran 12 files/28 tests successfully, but 9 suites cannot load because they importbun:test(Cannot find package 'bun:test'). I did not substitute the prohibited barebun test.bytesToBigInt: function bytesToBigint: false; removed compatibility types absent from generated declarationspnpm changeset statusSummary by CodeRabbit
Breaking Changes
GenesisStateandAsyncEventEmitterexports.bytesToBiginttobytesToBigInt; update imports accordingly.Documentation
Chores