Build 🛠 and Bundle 📦 your local workspaces. Like Bazel, Buck, Pants and Please but for Yarn Berry. Build any language, mix javascript, typescript, golang and more in one polyglot repo. Ship your bundles to AWS Lambda, Docker, or any nodejs runtime.
Describe the bug
The --exclude-current switch causes yarn.build to also exclude the dependencies of the current workspace. This does not appear to be the intended functionality based on the description in the docs
# For Dev
# this one is really useful at the start of a dev command or similar where you
# are watching for changes in the current workspace but need to ensure your
# dependencies are built
yarn build --exclude-current
In the scenario described, for typical monorepo setup, the --exclude-current results in nothing being built.
To Reproduce
# Using the examples in this repo, with a fresh checkout:
$ cd packages/examples/lorem-ipsum
$ yarn build --dry-run
# Shows 12 packages to be built
$ yarn build --dry-run --exclude-current
# Shows 0 packages to be build; expected 11
$ yarn build --exclude-current
# Shows 1 package excluded, 0 packages built or skipped
$ yarn build
# Successfully builds 12 packages
Expected behavior
Based on the description in the docs, I would expect yarn build --exclude-current to build the same set of packages as yarn build, minus the current workspace.
Describe the bug The
--exclude-current
switch causes yarn.build to also exclude the dependencies of the current workspace. This does not appear to be the intended functionality based on the description in the docsIn the scenario described, for typical monorepo setup, the
--exclude-current
results in nothing being built.To Reproduce
Expected behavior Based on the description in the docs, I would expect
yarn build --exclude-current
to build the same set of packages asyarn build
, minus the current workspace.Screencast of the above repoduction https://asciinema.org/a/511484
Desktop:
Darwin Kernel Version 20.6.0: Tue Apr 19 21:04:45 PDT 2022; root:xnu-7195.141.29~1/RELEASE_X86_64 x86_64