npm Workspaces for Small Monorepos: Hoisting, Phantom Dependencies, and Lockfile Control
npm workspaces replace npm link and file: protocols with symlinks and a single lockfile, but hoisting can hide undeclared dependencies. Here is how to set them up, verify linking, and catch phantom imports before they reach CI.