Use git to combine multiple repos into a single monorepo.
Organizations have a lot of repos and teams. Sometimes one monorepo isn't enough. Sometimes you need bunches.
Yarn Bunches are a solution for teams looking to stay in sync with "release channels" but also work within a singular monorepo setup.
yarn plugins import [release url]
━━━ Workspace-related commands ━━━━━━━━━━━━━━━━━
yarn locate <Workspace Name>
shows workspace path
━━━ Bunch-related commands ━━━━━━━━━━━━━━━━━━━━━
yarn bunch add <name>
Depend on a bunch
yarn bunch init
init bunch
yarn bunch remove <name>
remove a bunch
yarn bunches [--json]
list the active bunches
yarn bunches clean [--full]
clean the active bunches
yarn bunches sync [--json]
sync the active bunches
A bunch name can be a github repo
, a git url
, or a local path
followed by #commit-or-branch
or how the defaults need to be decided
- add a new entry to your workspace array:
".bunches/*/packages/*"
- create a package.json that is within your workspaces config
- run yarn install
- use the .bunches symlink in the package.json directory
It doesn't really seem feasible to maintain individually versioned packages with this approach.
The simplest use cases would be to target one of:
- branches that contain packages that all keep their version number in sync
- branches that contain packages that are PR'd in periodically
- branches that contain unique git "cherrypicks"