Enforce cross-package TypeScript compatibility - #367
Conversation
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Maintainer review completed by I reviewed the root post-build typecheck contract and the Fund Wallet dual-package boundary fix. The runtime and declaration conditions are deliberately aligned to the CommonJS SDK condition used by Wallet Toolbox, avoiding the private-field nominal-identity split without weakening the SDK’s valid ESM/CommonJS type exports. CI and release both enforce the root typecheck after build, and repository-health tests guard the ordering. All hosted checks are green, including full build/typecheck/lint/policy, package and platform tests, every coverage shard, Codecov patch, CodeQL security-extended analysis, Dependency Review, Socket, infrastructure jobs, Sonar, and merge-gate. Sonar reports an OK gate, 0 open/confirmed PR issues, and 0 security hotspots. The PR has 0 review threads or change requests; CodeQL has 0 open source findings; Dependabot and secret scanning are both at 0. GitHub does not permit an author to formally approve their own PR. Per the repository governance recorded in #324 and the operator’s explicit authorization, admin facilitation will cross only that impossible self-review condition after this exact-head attestation. No version or publication is included in this PR. |



Program and scope
ts-jest's<7peer range; no package publication or version bump is performed hereWhat changed
pnpm typecheckcontract that runs every workspace project's governed typecheck after package outputs are built.Root cause
Fund Wallet is ESM, while Wallet Toolbox is currently CommonJS. A normal ESM import of
@bsv/sdkselected the SDK's ESM declarations, while Wallet Toolbox's public constructor selected the CommonJS declarations. SDK classes such asBigNumbercontain private fields, so TypeScript correctly treated those two conditional declaration graphs as distinct nominal identities. The existing per-package build and manifest peer checks did not compile the fully built workspace declaration graph, allowing the mismatch to escape CI.Validation
pnpm install --frozen-lockfile --ignore-scripts;pnpm rebuild esbuildpnpm buildpnpm typecheck— all governed workspace typechecks pass, including Fund Walletpnpm lintpnpm test— full workspace suite passespnpm health:check— 38 tests pass; 37 projects, 30 public packages, 0 contract findingspnpm audit:security— no known vulnerabilitiespnpm check-versionspnpm test:governance— 550 required test files, 25 property suites, governed skips unchangedpnpm codegen:check— 9 generated files currentpnpm format:checkpnpm --filter @bsv/fund-wallet test:coverage— 15 tests; 91.89% statements / 93.15% branches / 92.3% linespnpm --filter @bsv/fund-wallet test:property— 3 property tests passpnpm --filter @bsv/fund-wallet pack:check— clean installed CLI consumer passespnpm --filter @bsv/sdk pack:check— strict ESM/CommonJS types and clean consumers passfund-metanet --helpexecutes successfullyRelease and security
@bsv/fund-wallet; a future protected release should patch it from 1.4.1 to 1.4.2.