Skip to content

chore: drop cosmos-signer override (0.2.0 published) + fix cross-file mock leaks - #140

Merged
towanTG merged 1 commit into
developfrom
chore/drop-cosmos-signer-override
Aug 24, 2026
Merged

chore: drop cosmos-signer override (0.2.0 published) + fix cross-file mock leaks#140
towanTG merged 1 commit into
developfrom
chore/drop-cosmos-signer-override

Conversation

@towanTG

@towanTG towanTG commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

What

  1. Drop the root @swapkit/cosmos-signer: 0.1.0 override — the stopgap from chore: adopt SwapKit SDK 5.0.0 across all @swapkit/* dependencies #138 while toolboxes' cosmos-signer@0.2.0 peer was unpublished. 0.2.0 is on npm now; the lockfile re-resolves to it (exact peers: noble/scure 2.2.0, cosmjs-types 0.11.0).

  2. Fix cross-file mock.module leaks in four test files — and with them, both long-standing CI mysteries. mock.module replaces a module's whole export namespace process-wide; these files installed partial mocks (e.g. ethers reduced to {BrowserProvider}, toolboxes/evm to a 2-method stub) and never restored them. Whenever the dependency graph shares one copy of the module across workspace packages — GH runners always; locally after this re-resolution — later test files import the crippled mock:

    Each file now snapshots the real module and restores it in afterAll.

Verification

bun 1.3.13: build:ci ✅ · type-check:ci 0 errors ✅ · bun test 106/106 ✅ (previously 105/1 with the leak). No changeset: root-manifest + test-only changes, no published-package dep ranges touched.

🤖 Generated with Claude Code

…ross-file mock leaks

The 0.1.0 override was a stopgap while toolboxes' cosmos-signer@0.2.0
peer was unpublished; 0.2.0 is on npm now, so the override goes and the
lockfile re-resolves to it.

The re-resolution dedupes shared deps across workspace packages, which
surfaced a latent test bug: four test files replace shared modules via
mock.module (ethers, @swapkit/toolboxes/evm|solana|utxo,
@metamask/connect-multichain, wallet-extensions/evm-extensions) with
partial namespaces and never restore them. mock.module is process-global,
so whenever the dependency graph shares one copy of a module across
packages, later test files import the crippled mock — this was both the
phantom "Export named 'AbstractSigner' not found in ethers" CI failure on
the GitHub runners and the order-dependent evm-extensions/keystore
flakes. Each file now snapshots the real module and restores it in
afterAll. Full suite: 106/106.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@towanTG
towanTG merged commit 1dba4dc into develop Aug 24, 2026
2 checks passed
@towanTG
towanTG deleted the chore/drop-cosmos-signer-override branch August 24, 2026 11:29
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