Problem
When running build:modified or test:modified on a clean environment (fresh checkout, no dist/ present), any workspace that depends on another workspace will fail.
Root cause
yarn workspaces foreach --since -Rpt run build will affect modified workspaces and its dependants, but not dependencies. vite build and vitest resolve workspace imports using the main/module/exports fields in package.json, which all point to dist/. On a clean checkout dist/ does not exist, so build or test of modified workspaces with cross-dependencies on unmodified workspaces fails immediately.
Example
packages/core (no workspace deps)
packages/javascript (depends on @hawk.so/core)
packages/sveltekit (depends on @hawk.so/javascript)
Change only packages/javascript. --since -R selects javascript + sveltekit. Build order: javascript → sveltekit.
packages/javascript tries to import @hawk.so/core → resolves to packages/core/dist/ → not found → build fails
packages/sveltekit is never reached
Same issue for vitest: even though @hawk.so/core is not in the --since set, the test runner still needs to resolve it.
Impact
build:modified and test:modified are broken on CI (fresh checkout) whenever a changed workspace has workspace dependencies that are not themselves changed
- Developers on a clean clone must manually run
build:all before build:modified or test:modified can work
Problem
When running
build:modifiedortest:modifiedon a clean environment (fresh checkout, nodist/present), any workspace that depends on another workspace will fail.Root cause
yarn workspaces foreach --since -Rpt run buildwill affect modified workspaces and its dependants, but not dependencies.vite buildandvitestresolve workspace imports using themain/module/exportsfields inpackage.json, which all point todist/. On a clean checkoutdist/does not exist, so build or test of modified workspaces with cross-dependencies on unmodified workspaces fails immediately.Example
Change only
packages/javascript.--since -Rselectsjavascript+sveltekit. Build order:javascript→sveltekit.packages/javascripttries to import@hawk.so/core→ resolves topackages/core/dist/→ not found → build failspackages/sveltekitis never reachedSame issue for
vitest: even though@hawk.so/coreis not in the--sinceset, the test runner still needs to resolve it.Impact
build:modifiedandtest:modifiedare broken on CI (fresh checkout) whenever a changed workspace has workspace dependencies that are not themselves changedbuild:allbeforebuild:modifiedortest:modifiedcan work