Skip to content

refactor: move replaceBigInts + toJson into ensnode-sdk#1978

Merged
shrugs merged 10 commits intomainfrom
refactor/replace-bigints-in-sdk
Apr 23, 2026
Merged

refactor: move replaceBigInts + toJson into ensnode-sdk#1978
shrugs merged 10 commits intomainfrom
refactor/replace-bigints-in-sdk

Conversation

@shrugs
Copy link
Copy Markdown
Member

@shrugs shrugs commented Apr 21, 2026

Summary

  • added replaceBigInts (sourced verbatim from @ponder/utils, with upstream attribution) and toJson to @ensnode/ensnode-sdk, with unit tests for both.
  • migrated all in-repo call sites; deleted the one-off apps/ensindexer/src/lib/json-stringify-with-bigints.ts helper.
  • dropped @ponder/utils from apps/ensapi (no longer needed).
  • dropped vestigial @ponder/utils listing from apps/ensadmin (no source usage; gets it transitively via datasources).
  • inlined the @ponder/utils version spec on @ensnode/datasources (its only runtime consumer) and removed the entry from the workspace catalog.

Why

replaceBigInts was pulling @ponder/utils into ensapi and ponder into a trivial ensindexer helper for a generic bigint-in-JSON utility. owning it in the sdk lets consumers use it without the ponder dependency, and unifies the duplicated toJson pattern across ensindexer/ensapi.

also tightened toJson's api: toJson(value, { pretty?: boolean }), default compact. currently-pretty call sites (ensindexer invariant errors + one thrown ensapi error) pass { pretty: true }; span-attribute sites stay compact.

datasources is now the only runtime consumer of @ponder/utils, so the version spec lives alongside its sole user.

Testing

  • unit tests for replaceBigInts (scalar/array/readonly/nested/mixed/null/empty/identity/String/numberToHex) and toJson (bigint serialization, pretty/compact, nested, primitives).
  • pnpm typecheck across the monorepo → clean.
  • pnpm lint
  • pnpm test --project @ensnode/datasources --project @ensnode/ensnode-sdk --project ensapi --project ensindexer --project ensadmin → 802 passed.

Notes for Reviewer

  • toJson default flipped from pretty to compact — every currently-pretty site was updated to { pretty: true } explicitly.
  • @ponder/utils version spec moved inline to packages/datasources/package.json (^0.2.18) since datasources is the only consumer; catalog entry removed.

Checklist

  • This PR does not change runtime behavior or semantics
  • This PR is low-risk and safe to review quickly

Adds replaceBigInts (sourced from @ponder/utils) and toJson helpers to
@ensnode/ensnode-sdk. toJson now takes an options object with pretty
defaulting to false. Migrates all in-repo call sites and drops
@ponder/utils from ensapi.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 21, 2026 21:47
@shrugs shrugs requested a review from a team as a code owner April 21, 2026 21:47
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
admin.ensnode.io Ready Ready Preview, Comment Apr 22, 2026 11:59pm
ensnode.io Ready Ready Preview, Comment Apr 22, 2026 11:59pm
ensrainbow.io Ready Ready Preview, Comment Apr 22, 2026 11:59pm

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 21, 2026

🦋 Changeset detected

Latest commit: f2aefd5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 23 packages
Name Type
@ensnode/ensnode-sdk Major
ensapi Major
ensindexer Major
ensadmin Major
ensrainbow Major
fallback-ensapi Major
@namehash/ens-referrals Major
@ensnode/ensdb-sdk Major
@ensnode/ensnode-react Major
@ensnode/ensrainbow-sdk Major
@ensnode/integration-test-env Major
@namehash/namehash-ui Major
@docs/ensnode Major
@docs/ensrainbow Major
enssdk Major
enscli Major
enskit Major
ensskills Major
@ensnode/datasources Major
@ensnode/ponder-sdk Major
@ensnode/ponder-subgraph Major
@ensnode/shared-configs Major
@ensnode/enskit-react-example Patch

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

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 21, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: bdacc137-09b6-471e-a171-e6fc0dff2758

📥 Commits

Reviewing files that changed from the base of the PR and between 81fff3c and f2aefd5.

📒 Files selected for processing (6)
  • apps/ensadmin/package.json
  • apps/ensapi/package.json
  • docs/ensnode.io/ensapi-openapi.json
  • packages/datasources/package.json
  • packages/ensnode-sdk/src/shared/replace-bigints.test.ts
  • packages/ensnode-sdk/src/shared/replace-bigints.ts
💤 Files with no reviewable changes (2)
  • apps/ensapi/package.json
  • apps/ensadmin/package.json

📝 Walkthrough

Walkthrough

Adds bigint-handling utilities to ensnode-sdk (replaceBigInts, toJson with { pretty?: boolean }), removes @ponder/utils from several packages, migrates in-repo call sites to SDK helpers, deletes a local bigint JSON helper, and adds tests for the new utilities.

Changes

Cohort / File(s) Summary
Changeset
.changeset/replace-bigints-in-sdk.md
Declares version bumps and documents new replaceBigInts and updated toJson API ({ pretty?: boolean }).
SDK utilities & exports
packages/ensnode-sdk/src/shared/replace-bigints.ts, packages/ensnode-sdk/src/shared/to-json.ts, packages/ensnode-sdk/src/index.ts
Adds typed replaceBigInts runtime utility and a bigint-aware toJson(value, { pretty?: boolean }); re-exports both from SDK index.
SDK tests
packages/ensnode-sdk/src/shared/replace-bigints.test.ts, packages/ensnode-sdk/src/shared/to-json.test.ts
Adds tests verifying bigint replacement, nested structures, custom replacers, and toJson compact/pretty outputs and toJSON preservation.
ensapi dependency & imports
apps/ensapi/package.json, apps/ensapi/src/handlers/api/resolution/resolution-api.ts
Removes @ponder/utils dependency and updates imports to use replaceBigInts (and related types) from @ensnode/ensnode-sdk.
ensadmin dependency change
apps/ensadmin/package.json
Removes @ponder/utils dependency entry.
Datasources dependency pin
packages/datasources/package.json
Pins @ponder/utils from catalog: to ^0.2.18 semver.
Workspace catalog
pnpm-workspace.yaml
Removes @ponder/utils entry from the workspace catalog.
Removal of local helper
apps/ensindexer/src/lib/json-stringify-with-bigints.ts
Deletes local toJson that previously replaced bigints via @ponder/utils.
ensindexer & handlers — import migrations
apps/ensindexer/src/lib/managed-names.ts, apps/ensindexer/src/lib/heal-addr-reverse-subname-label.ts, apps/ensindexer/src/plugins/ensv2/handlers/ensv1/BaseRegistrar.ts, .../NameWrapper.ts, .../RegistrarController.ts, apps/ensindexer/src/plugins/ensv2/handlers/ensv2/ENSv2Registry.ts, .../ETHRegistrar.ts
Replaces local toJson imports with toJson from @ensnode/ensnode-sdk and updates error/invariant message calls to pass { pretty: true } for pretty-printed serialization.
Minor handler import update
apps/ensapi/src/handlers/api/resolution/resolution-api.ts
Consolidates imports to pull replaceBigInts and response types from @ensnode/ensnode-sdk.
OpenAPI metadata
docs/ensnode.io/ensapi-openapi.json
Bumps OpenAPI info.version from 1.10.0 to 1.10.1.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Suggested labels

ensnode-sdk, javascript

Poem

🐰 Bigints hopped from field to crate,
Nestled snug inside one crate.
SDK whiskers tidy and neat,
Pretty JSON — a carrot treat!
I thumped my foot and did a happy beat.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'refactor: move replaceBigInts + toJson into ensnode-sdk' accurately summarizes the main change: moving two JSON utilities into the SDK package.
Description check ✅ Passed The PR description fully covers all required template sections: Summary (3 bullets describing what changed), Why (explaining the rationale and benefits), Testing (comprehensive test details), and a completed pre-review checklist.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/replace-bigints-in-sdk

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Moves bigint-safe JSON serialization utilities into @ensnode/ensnode-sdk, migrates in-repo usages to the SDK, and removes the now-unnecessary @ponder/utils dependency from ensapi.

Changes:

  • Add replaceBigInts and toJson helpers to @ensnode/ensnode-sdk and export them from the SDK entrypoint.
  • Update ensindexer/ensapi call sites to use the SDK helpers; delete the ensindexer one-off helper.
  • Drop @ponder/utils from apps/ensapi (and update lockfile) since it’s no longer needed.

Reviewed changes

Copilot reviewed 16 out of 17 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pnpm-lock.yaml Removes @ponder/utils from the lockfile graph for ensapi.
packages/ensnode-sdk/src/shared/to-json.ts Adds new toJson helper with { pretty?: boolean } option.
packages/ensnode-sdk/src/shared/replace-bigints.ts Adds replaceBigInts utility (sourced from @ponder/utils with attribution).
packages/ensnode-sdk/src/shared/replace-bigints.test.ts Adds unit tests for replaceBigInts behavior and typing.
packages/ensnode-sdk/src/index.ts Exports replaceBigInts and toJson from the SDK public surface.
apps/ensindexer/src/plugins/ensv2/handlers/ensv2/ETHRegistrar.ts Switches to SDK toJson and opts into pretty output for invariant errors.
apps/ensindexer/src/plugins/ensv2/handlers/ensv2/ENSv2Registry.ts Switches to SDK toJson and opts into pretty output for sanity/invariant errors.
apps/ensindexer/src/plugins/ensv2/handlers/ensv1/RegistrarController.ts Switches to SDK toJson and updates pretty formatting call sites.
apps/ensindexer/src/plugins/ensv2/handlers/ensv1/NameWrapper.ts Switches to SDK toJson and updates pretty formatting call sites.
apps/ensindexer/src/plugins/ensv2/handlers/ensv1/BaseRegistrar.ts Switches to SDK toJson and updates pretty formatting call sites.
apps/ensindexer/src/lib/managed-names.ts Switches to SDK toJson for error messages.
apps/ensindexer/src/lib/json-stringify-with-bigints.ts Deletes local helper now replaced by SDK toJson.
apps/ensindexer/src/lib/heal-addr-reverse-subname-label.ts Switches to SDK toJson and opts into pretty output for invariant errors.
apps/ensapi/src/lib/resolution/forward-resolution.ts Replaces ad-hoc replaceBigInts+JSON.stringify with SDK toJson for tracing attributes/errors.
apps/ensapi/src/handlers/api/resolution/resolution-api.ts Imports replaceBigInts from SDK and uses it for JSON response serialization.
apps/ensapi/package.json Drops @ponder/utils dependency.
.changeset/replace-bigints-in-sdk.md Changeset documenting the new SDK exports and toJson API shape/default.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

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

Comment thread packages/ensnode-sdk/src/shared/to-json.ts
Comment thread packages/ensnode-sdk/src/shared/to-json.ts Outdated
Copy link
Copy Markdown
Contributor

@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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/ensnode-sdk/src/index.ts`:
- Around line 31-34: The current toJson implementation pre-walks values with
replaceBigInts which strips built-in toJSON behavior (e.g., Date) and the
ReplaceBigInts type uses an odd mutable-tuple inference pattern; update toJson
to call JSON.stringify with a replacer that converts bigint to string so native
toJSON is preserved (refer to the toJson function), and simplify the
ReplaceBigInts type to a straightforward recursive mapped type that maps bigint
to string while recursing into arrays/objects (refer to the ReplaceBigInts type
and replaceBigInts helper) and adjust the replacer function signature to match
this simpler type.

In `@packages/ensnode-sdk/src/shared/replace-bigints.test.ts`:
- Line 11: The test currently calls expectTypeOf<Hex>(out) without a chained
matcher so no assertion runs; update the assertion to chain a matcher (e.g.,
expectTypeOf(out).toEqualTypeOf<Hex>() or
expectTypeOf(out).toMatchTypeOf<Hex>()) to perform the actual type check, and
for the non-const array case returned by replaceBigInts([5n], ...) use
.toMatchTypeOf() (or change the input to a const/readonly tuple) to avoid a
mismatch between mutable inferred type and the readonly tuple expectation;
locate the test by the expectTypeOf, Hex, out identifiers and the replaceBigInts
call to apply this change.
🪄 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: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 10a2cfd9-d568-4fd4-84eb-7e3431022f3a

📥 Commits

Reviewing files that changed from the base of the PR and between b128f0c and 3be1e96.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (16)
  • .changeset/replace-bigints-in-sdk.md
  • apps/ensapi/package.json
  • apps/ensapi/src/handlers/api/resolution/resolution-api.ts
  • apps/ensapi/src/lib/resolution/forward-resolution.ts
  • apps/ensindexer/src/lib/heal-addr-reverse-subname-label.ts
  • apps/ensindexer/src/lib/json-stringify-with-bigints.ts
  • apps/ensindexer/src/lib/managed-names.ts
  • apps/ensindexer/src/plugins/ensv2/handlers/ensv1/BaseRegistrar.ts
  • apps/ensindexer/src/plugins/ensv2/handlers/ensv1/NameWrapper.ts
  • apps/ensindexer/src/plugins/ensv2/handlers/ensv1/RegistrarController.ts
  • apps/ensindexer/src/plugins/ensv2/handlers/ensv2/ENSv2Registry.ts
  • apps/ensindexer/src/plugins/ensv2/handlers/ensv2/ETHRegistrar.ts
  • packages/ensnode-sdk/src/index.ts
  • packages/ensnode-sdk/src/shared/replace-bigints.test.ts
  • packages/ensnode-sdk/src/shared/replace-bigints.ts
  • packages/ensnode-sdk/src/shared/to-json.ts
💤 Files with no reviewable changes (2)
  • apps/ensapi/package.json
  • apps/ensindexer/src/lib/json-stringify-with-bigints.ts

Comment thread packages/ensnode-sdk/src/index.ts
Comment thread packages/ensnode-sdk/src/shared/replace-bigints.test.ts Outdated
Covers bigint serialization, compact-by-default, pretty option, nested
structures, and primitive passthrough.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 17 out of 18 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

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

Comment thread packages/ensnode-sdk/src/shared/replace-bigints.ts Outdated
datasources is the only runtime consumer of @ponder/utils (mergeAbis);
moving it to peerDependencies avoids double-installation when consumers
also bring ponder-utils transitively. Inlines the version spec in
datasources' package.json and removes it from the workspace catalog
since no other package needs it. Drops the vestigial @ponder/utils
listing from ensadmin (no source usage).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 20 out of 21 changed files in this pull request and generated 2 comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

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

Comment thread packages/ensnode-sdk/src/shared/to-json.ts Outdated
Comment thread packages/datasources/package.json
Comment thread packages/ensnode-sdk/src/shared/to-json.ts Outdated
Comment thread packages/ensnode-sdk/src/shared/replace-bigints.ts Outdated
Comment thread packages/ensnode-sdk/src/shared/replace-bigints.test.ts Outdated
- ReplaceBigInts now matches readonly unknown[] instead of only readonly []
  so non-empty readonly tuples get tuple-mapped types instead of falling
  through to the object branch.
- toJson uses JSON.stringify's replacer callback instead of pre-walking
  with replaceBigInts, preserving native toJSON behavior (Date, etc.).
- Chain .toEqualTypeOf() on expectTypeOf assertions so they actually run.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@shrugs
Copy link
Copy Markdown
Member Author

shrugs commented Apr 22, 2026

@greptile re-review

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 22, 2026

Greptile Summary

This PR moves replaceBigInts (vendored verbatim from @ponder/utils with attribution) and a unified toJson helper into @ensnode/ensnode-sdk, migrates all in-repo call sites, and removes the now-unnecessary @ponder/utils dependency from ensapi and ensadmin. The API for toJson changed: the default flipped from pretty=true to compact (pretty: false), and all previously-pretty call sites have been updated to pass { pretty: true } explicitly.

Confidence Score: 5/5

Safe to merge — purely a refactor with no runtime behavior changes, all call sites updated correctly, and solid test coverage.

No P0 or P1 issues found. The implementation is correct: toJson uses JSON.stringify's native replacer (preserving toJSON), the default flip from pretty=true to compact is handled at every call site, replaceBigInts is vendored verbatim with attribution, and all dependency removals are clean. Tests are thorough.

No files require special attention.

Important Files Changed

Filename Overview
packages/ensnode-sdk/src/shared/to-json.ts New toJson helper using JSON.stringify's replacer callback; correctly handles bigints, preserves native toJSON (e.g. Date), defaults to compact output
packages/ensnode-sdk/src/shared/replace-bigints.ts Vendored verbatim from @ponder/utils with upstream attribution and permalink; implementation and TypeScript generics match the source exactly
packages/ensnode-sdk/src/shared/replace-bigints.test.ts Comprehensive tests covering scalars, arrays, readonly arrays, nested objects, mixed types, null/undefined, identity replacer, and numberToHex replacer
packages/ensnode-sdk/src/shared/to-json.test.ts Tests cover bigint serialization, compact/pretty output, nested structures, primitives, and native toJSON (Date) behavior
apps/ensindexer/src/lib/json-stringify-with-bigints.ts Deleted — functionality fully replaced by the new SDK helpers; all consumers updated
apps/ensapi/src/lib/resolution/forward-resolution.ts Replaced three inline JSON.stringify+replaceBigInts calls with toJson; span-attribute sites stay compact, invariant error now pretty-prints
packages/datasources/package.json @ponder/utils version spec moved inline from catalog; changed from exact pin (0.2.18) to caret range (^0.2.18) — only runtime consumer, acceptable relaxation
pnpm-workspace.yaml Removed @ponder/utils from workspace catalog since datasources is now its sole consumer and carries the version inline

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["ensapi / ensindexer\ncall sites"] -->|"toJson(val, { pretty? })"| B["@ensnode/ensnode-sdk\ntoJson"]
    A -->|"replaceBigInts(val, fn)"| C["@ensnode/ensnode-sdk\nreplaceBigInts"]
    B --> D["JSON.stringify\nwith replacer callback\n(bigint → String)"]
    C --> E["Recursive object\ntraversal (vendored\nfrom @ponder/utils)"]
    F["@ensnode/datasources"] -->|"@ponder/utils ^0.2.18\n(only runtime consumer)"| G["@ponder/utils\n(external)"]
    H["pnpm-workspace catalog"] -.->|"entry removed"| G
Loading

Reviews (1): Last reviewed commit: "fix(ensnode-sdk): address review feedbac..." | Re-trigger Greptile

Copy link
Copy Markdown
Contributor

@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: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/ensnode-sdk/src/shared/replace-bigints.ts`:
- Around line 4-18: The exported ReplaceBigInts type doesn't match runtime
replaceBigInts: _ReplaceBigInts treats only tuple shapes and doesn't recurse
into nested elements, causing bigint[] to become readonly [] and nested bigints
to remain untransformed; fix by updating _ReplaceBigInts/ReplaceBigInts so
arrays (both tuple and general arrays) map element types recursively (i.e., when
arr is a tuple keep tuple recursion but for arr extends readonly (infer T)[]
produce readonly ReplaceBigInts<T, type>[]), and change the tuple branch to use
ReplaceBigInts<first, type> instead of first extends bigint ? type : first; then
add the suggested type assertions in the test using
expectTypeOf(replaceBigInts(...)).toEqualTypeOf<...>() to verify bigint[] ->
readonly string[] and deep nested shapes are correctly transformed.
🪄 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: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: ad4bbe05-1f19-4f24-b6cc-18143903f624

📥 Commits

Reviewing files that changed from the base of the PR and between 3be1e96 and 81fff3c.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (7)
  • apps/ensadmin/package.json
  • packages/datasources/package.json
  • packages/ensnode-sdk/src/shared/replace-bigints.test.ts
  • packages/ensnode-sdk/src/shared/replace-bigints.ts
  • packages/ensnode-sdk/src/shared/to-json.test.ts
  • packages/ensnode-sdk/src/shared/to-json.ts
  • pnpm-workspace.yaml
💤 Files with no reviewable changes (2)
  • pnpm-workspace.yaml
  • apps/ensadmin/package.json

Comment thread packages/ensnode-sdk/src/shared/replace-bigints.ts Outdated
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 21 out of 22 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

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

Comment thread packages/ensnode-sdk/src/shared/replace-bigints.ts
Comment thread packages/ensnode-sdk/src/shared/replace-bigints.ts Outdated
…ecursion

- General arrays (e.g. bigint[]) now produce ReplaceBigInts<T, U>[]
  instead of collapsing to readonly [].
- Tuple branch now recurses via ReplaceBigInts<first, type> so nested
  bigints inside tuple elements are transformed.
- Output is mutable (arrays via map, objects via Object.fromEntries —
  both produce mutable values at runtime).
- Documented that the helper is designed for plain JSON-like values;
  non-plain objects (Date, Map, class instances) are not preserved.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
},
"dependencies": {
"@ponder/utils": "catalog:"
"@ponder/utils": "^0.2.18"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I note how we still rely on @ponder/util dependency her to support using mergeAbis function inside the datasources package.

Copy link
Copy Markdown
Member

@tk-o tk-o left a comment

Choose a reason for hiding this comment

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

LGTM

@shrugs shrugs merged commit 0d64d9e into main Apr 23, 2026
20 checks passed
@shrugs shrugs deleted the refactor/replace-bigints-in-sdk branch April 23, 2026 16:55
@github-actions github-actions Bot mentioned this pull request Apr 23, 2026
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.

3 participants