Skip to content

feat: layered monorepo readiness (install → types + unit tests) - #140

Draft
ulissesferreira wants to merge 9 commits into
mainfrom
ulissesferreira/layered-monorepo-readiness-1493
Draft

feat: layered monorepo readiness (install → types + unit tests)#140
ulissesferreira wants to merge 9 commits into
mainfrom
ulissesferreira/layered-monorepo-readiness-1493

Conversation

@ulissesferreira

@ulissesferreira ulissesferreira commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Explanation

After a normal yarn, TypeScript typechecking and Snap unit Jest suites did not work reliably: workspace imports pointed at dist/, Snap bundles were required for ordinary unit tests, and library dist/ was missing until a full build. This PR aligns local install with what CI already does for libraries, and separates Snap unit tests from installSnap integration tests.

  • TypeScript: Root-correct @metamask/* path mappings to ./packages/*/src; shared tsconfig.snaps.json with composite: false for Snap packages.
  • Install / build: allow-scripts runs yarn build:libs (library packages only). Added build:snaps and scripts/build-workspace-kind.mjs to build by workspace kind.
  • Lint: lint:eslint runs build:libs after cleaning dist/, so lint does not leave libraries without build output.
  • Jest: Bitcoin, Tron, and sample Snap unit tests run in Node; installSnap suites moved to integration configs. Solana keeps snaps-jest for unit tests with lazy Snap build in jest.globalSetup.
  • Snap configs: Solana and Tron snap.config.ts (and Tron Jest setup) use local defaults so builds and tests work without a secrets .env.
  • Docs: Updated getting-started, building, testing, and AGENTS.md for the install → typecheck → unit-test workflow.

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

cursoragent and others added 6 commits August 8, 2026 20:15
Capture Approach C: post-install library builds, fixed TS paths,
snap unit vs integration Jest split, and lint/build DX fixes.

Co-authored-by: Ulisses Ferreira <ulisses@hey.com>
Resolve @metamask/* paths from the monorepo root and share snap TS
settings with composite disabled so sibling packages typecheck without
built declaration artifacts.

Co-authored-by: Ulisses Ferreira <ulisses@hey.com>
Add build:libs/build:snaps helpers, chain build:libs from allow-scripts,
and rebuild libraries after eslint's dist clean.

Co-authored-by: Ulisses Ferreira <ulisses@hey.com>
Run bitcoin/tron/sample unit tests in Node without a Snap bundle.
Keep solana on snaps-jest with lazy globalSetup build. Move installSnap
coverage into integration configs and add safe local env defaults.

Co-authored-by: Ulisses Ferreira <ulisses@hey.com>
Remove the empty examples workspace glob and the dead migration-guide
link, and describe build:libs / unit vs integration testing.

Co-authored-by: Ulisses Ferreira <ulisses@hey.com>
Rename shared snap Jest config to .cjs, make build/globalSetup scripts
async-safe for lint rules, and retarget suppressions for renamed
integration tests.

Co-authored-by: Ulisses Ferreira <ulisses@hey.com>
@cursor cursor Bot changed the title docs: layered monorepo readiness design and implementation plan feat: layered monorepo readiness (install → types + unit tests) Aug 8, 2026
ulissesferreira and others added 3 commits August 10, 2026 09:20
Wallet snaps should read configuration from a proper .env file supplied
by the developer. Reverts snap.config.ts defaults, jest.setup test
defaults, and ConfigProvider ENVIRONMENT fallback added in the layered
monorepo readiness work.

Co-authored-by: Ulisses Ferreira <ulisses@hey.com>
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.

2 participants