Workspace Support
Oink recognises both Yarn and PNPM workspaces, so you can link once and keep every consumer package updated.
Detecting workspace roots
Section titled “Detecting workspace roots”- Yarn: any folder whose
package.jsonincludes aworkspacesarray is treated as the root. - PNPM: Oink reads
pnpm-workspace.yamland uses the listedpackagesglobs to find child projects.
Running oink learn from the root brings every child package into the registry automatically.
Linking inside a workspace
Section titled “Linking inside a workspace”oinkgathers dependencies for every child package, removes duplicates, and ignores packages that already live inside the workspace.- Copies go into each matching
node_modulesfolder, covering hoisted installs at the root and nested installs inside individual packages.
Troubleshooting
Section titled “Troubleshooting”- Nothing showing up? Confirm that your workspace file matches the expected format (string array for Yarn,
packageslist for PNPM). - If a package is both inside the workspace and linked externally, avoid learning it. Otherwise it may appear as both source and destination.
- Keep workspace roots within a few directory levels of their children. Extremely deep nesting can fall outside the default search depth.
With these tips, you can keep a whole workspace in sync with a single command.