Skip to content
This documentation is for v14 alpha, the docs for v13 stable are archived.

source

A list of Glob patterns to find package.json files you want to manage with syncpack.

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.

~/my-projects/.syncpackrc.json
{
"source": ["./*/package.json", "./*/packages/*/package.json"]
}

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:

  1. If --source CLI options are provided, use those.
  2. If source is defined in configuration, use that.
  3. If using npm workspaces or Yarn workspaces, read workspaces from ./package.json.
  4. If using pnpm, read packages from ./pnpm-workspace.yaml.
  5. If using Lerna, read packages from ./lerna.json.
  6. Default to 'package.json' and 'packages/*/package.json'.