Skip to content
This documentation is for v14 and up, the docs for v13 are archived.

sourceMode

Controls whether your source patterns (and --source CLI options) replace the patterns discovered from your package manager or are appended to them.

  • "replace" (default): your patterns replace workspace discovery entirely.
  • "extend": your patterns are appended after the discovered patterns from workspaces / pnpm-workspace.yaml / lerna.json.
.syncpackrc.json
{
"sourceMode": "extend",
"source": ["tools/scripts/package.json"]
}

The CLI flag --source-mode <replace|extend> overrides whatever is set in the rcfile.

Discovered patterns are emitted first; your patterns are appended last, so gitignore-style negations such as !apps/legacy can exclude discovered entries.