intermediate
npm/pnpm/yarn workspaces
Use workspace package linking, shared installs, filtered scripts, and clear package boundaries before adding heavier orchestration.
npm, pnpm, and Yarn workspaces are the foundation layer for many JavaScript monorepos: one install, local package linking, and per-package scripts. They are often sufficient before adopting Turborepo or Nx.
| Concern | Workspace-native | Often needs orchestration | |---------|------------------|---------------------------| | Shared install | Yes | — | | Local linking | Yes | — | | Task DAG + remote cache | Limited | Turborepo / Nx | | Affected testing | Manual filters | Graph tools |
Declare sibling dependencies explicitly in each package manifest. Root scripts coordinate CI entry points (`pnpm -r test`, `npm run test --workspaces`).
On interviews: workspace discovery, filtered commands, publishing internal packages, version policies, and boundaries between apps and libraries.
Common pitfalls: treating folder structure as architecture; undeclared cross-imports; root-level deps masking missing package deps.
The trade-off is low ceremony multi-package dev versus missing graph-aware automation.
Checklist:
- Explicit package APIs and ownership.
- Declare all sibling dependencies.
- Use filters in CI for changed packages when possible.
- Add orchestration when scripts and cache needs grow.