feat: upgrade to @metanames/sdk 7.0.0 - #1
Merged
Merged
Conversation
Testing an unreleased SDK against this app needed a manual pack-and-install every time, and npm caches a tarball by name and version -- a rebuilt 7.0.0 installs as the previous 7.0.0 unless the file name changes, which is silent and cost a debugging round while verifying v7. `npm run sdk:local [path]` builds the sibling checkout, packs it under a timestamped name and installs that. A tarball rather than `file:../sdk` or `npm link`: a symlinked working tree lets the app resolve files the published package does not ship and makes `next build` follow the SDK's own node_modules, which is not what a release candidate should be tested against. package.json keeps pointing at the published version; the script overwrites the dependency locally and prints how to restore it.
`npm run sdk:local` packs into `.local-sdk/`, which is gitignored: a Vercel preview cloning this branch has no tarball to install. v7 is not published yet, so the candidate is committed under `vendor/` and the dependency points at it. Revert to the published version before merging. Claude-Session: https://claude.ai/code/session_01GceWCwGXu66D1xEBDxZWBb
`@metanames/sdk/dist/...` reached into the package's CJS tree, which the SDK is free to rearrange. v7 exports these four directly and drops the dist paths from its exports map. Claude-Session: https://claude.ai/code/session_01GceWCwGXu66D1xEBDxZWBb
`connectMetaMask` cast `window` itself to the provider and checked `window.isMetaMask`, which no extension ever sets, so every attempt threw "MetaMask not found" and the provider handed to `setSigningStrategy` had no `request` method either. The test installed the same globals on `window`, so it passed against the broken shape. Providers inject on `window.ethereum`, and when several wallets are installed the last to load owns that slot and lists the rest under `providers`. The snap also answers `get_address` with the address itself rather than an object, which the caller rejected as missing. Claude-Session: https://claude.ai/code/session_01GceWCwGXu66D1xEBDxZWBb
The vendored candidate existed only so Vercel previews could build before v7 was on npm. 7.0.0 is published, so the dependency points at the registry and the tarball is gone. Claude-Session: https://claude.ai/code/session_01GceWCwGXu66D1xEBDxZWBb
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upgrades the app to
@metanames/sdk@7.0.0and fixes what the upgrade uncovered.Changes
@metanames/sdk/dist/..., the package's CJS build tree. v7 exportsmodels/domain,providers/config,interfaceandtransactions/ledgerdirectly and no longer mapsdist, so those imports would have failed to resolve.connectMetaMaskreadwindow.isMetaMaskoff the window itself, which no extension sets, so every attempt threwMetaMask not found. It now readswindow.ethereum, searchesproviders[]when several wallets share the slot, hands the real provider tosetSigningStrategy, and accepts the snap's bare-stringget_addressreply. The old test installed the same wrong shape onwindow, so it passed against the bug; it now installs a provider, plus cases for flag-on-window, multi-provider discovery, and the string address.npm run sdk:localpacks and installs a sibling SDK checkout, for testing an unreleased SDK against this app.Verification
tsc --noEmitcleannext buildgreenKnown failures, not from this branch
a11y.spec.tsreports axecolor-contrastviolations on /profile and /renew. Present before this upgrade, tracked separately.https://claude.ai/code/session_01GceWCwGXu66D1xEBDxZWBb