source
A list of Glob patterns to find package.json files you want to manage with syncpack.
Example
Section titled “Example”In this example we have a directory on our machine called my-projects
where we git clone
all of the repositories we work on for our company.
Despite us not having a monorepo, a .syncpackrc.json placed alongside each git clone
allows us to use syncpack to find and fix problems.
{ "source": ["./*/package.json", "./*/packages/*/package.json"]}
Resolving Packages
Section titled “Resolving Packages”Syncpack will look in the following places for glob patterns matching package.json files, in this order of precedence, and stop looking when a match is found:
- If
--source
CLI options are provided, use those. - If
source
is defined in configuration, use that. - If using npm workspaces or Yarn workspaces, read
workspaces
from./package.json
. - If using pnpm, read
packages
from./pnpm-workspace.yaml
. - If using Lerna, read
packages
from./lerna.json
. - Default to
'package.json'
and'packages/*/package.json'
.