chore: support intra-repository dependencies - #126
Open
ulissesferreira wants to merge 2 commits into
Open
Conversation
Upload packages/*/dist from the monorepo Build job and restore them into packages/ in each Test matrix cell so snaps-jest finds dist/bundle.js without a per-package rebuild. Pin upload/download-artifact to commit SHAs. Co-authored-by: Ulisses Ferreira <ulisses@hey.com>
cursor
Bot
force-pushed
the
ulissesferreira/ci-share-build-artifacts-cb0e
branch
from
August 5, 2026 18:06
d2334bb to
d5b6944
Compare
2 tasks
ulissesferreira
marked this pull request as ready for review
August 5, 2026 18:31
Add --topological-dev to the root yarn build script so workspace libraries (e.g. @metamask/snap-networks-utils) finish building before packages that depend on them. Keeps --parallel for independent packages. Co-authored-by: Ulisses Ferreira <ulisses@hey.com>
cursor
Bot
force-pushed
the
ulissesferreira/ci-share-build-artifacts-cb0e
branch
from
August 5, 2026 19:08
9eb091f to
e05970e
Compare
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.
Summary
The Test matrix was rebuilding each package in isolation (
yarn workspace <pkg> build), so workspace libraries like@metamask/snap-networks-utilswere not available when dependents ran tests.This PR makes two related changes:
1. CI: share Build job artifacts with Test matrix
The existing Build job becomes the single source of truth for compiled output:
yarn build, then uploadspackages/*/distpackages/(so paths restore correctly after glob stripping), and runs tests without rebuildingupload-artifact/download-artifactare pinned to commit SHAs for zizmor. Same pattern aspublish-release.yml. Lint and other jobs are unchanged.2. Root build: topological workspace ordering
The root
yarn buildscript now passes--topological-devtoyarn workspaces foreach. Workspace libraries build before packages that depend on them (viadependenciesordevDependencies), while independent packages still build in parallel.This aligns local development and the CI Build job with upcoming workspace dependencies (e.g. snaps importing
@metamask/snap-networks-utils).Test plan
package-dist-<sha>packages/<pkg>/distand pass without a per-package build stepdist/bundle.jsfor snaps-jestyarn workspaces foreach --topological-dev --dry-run run buildaccepts the updated root build script