Skip to content

fix: keep adapters compatible with core package - #2

Merged
MuncleUscles merged 1 commit into
v0.1-devfrom
fix/rc1-adapter-core-compat
Sep 3, 2026
Merged

MuncleUscles merged 1 commit into
v0.1-devfrom
fix/rc1-adapter-core-compat

Conversation

@MuncleUscles

Copy link
Copy Markdown
Member

Problem and outcome

The packed React and Vue adapters maintained hand-copied structural versions of the core API. The published declarations had already drifted: a real @genlayer/transaction-kit instance could not be passed to the adapter components because their topUp input types disagreed. This would make 0.1.0-rc.1 unusable in TypeScript consumers such as the v2 Boilerplate.

Use the core package as the single source of truth for adapter public types. Keep the relationship type-only at runtime, and declare the exact matching core package as a peer.

Implementation and validation

  • Re-export core public types from both adapters instead of duplicating the contract.
  • Require the exact same core version as an adapter peer and enforce this in release policy tests.
  • Normalize all supported SDK numeric input forms in the React and Vue mocks.
  • Add lower-level regression coverage for string, number, and bigint fee overrides.
  • Validated the exact packed core/React artifacts in the v2 Boilerplate consumer.

Validation:

  • npm run typecheck
  • npm run build
  • npm test (46 package tests + 6 release-policy tests)
  • npm run pack:check
  • Boilerplate: 10 frontend tests, TypeScript check, and production build

No runtime imports were added to the adapters. Rollback is the single commit on this branch.

@coderabbitai

coderabbitai Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 7bd5222d-9b37-4723-a738-aed7dca8ad68

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

Use core's exported public types from both UI adapters instead of maintaining divergent structural copies. Declare and validate an exact core peer dependency, and normalize the SDK's public numeric input forms in adapter mocks. This prevents publishing an RC whose separately installed core and adapter types are incompatible in real consumers.
@MuncleUscles
MuncleUscles force-pushed the fix/rc1-adapter-core-compat branch from 7aee9e2 to 7d8c625 Compare September 3, 2026 13:48
@MuncleUscles
MuncleUscles merged commit 3b2a831 into v0.1-dev Sep 3, 2026
2 checks passed
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.

1 participant