
Syncpack
- 55 installs
- 2 repo stars
- Updated August 3, 2026
- fandhe-ai/agent-reference-skills
Helps with ai & agent building tasks.
About
syncpack is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted coding.
- syncpack
- AI & Agent Building
- AI-coding skill
Syncpack by the numbers
- 55 all-time installs (skills.sh)
- Ranked #6,762 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 3, 2026 (Skillselion catalog sync)
npx skills add https://github.com/fandhe-ai/agent-reference-skills --skill syncpackAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 55 |
|---|---|
| repo stars | ★ 2 |
| Last updated | August 3, 2026 |
| Repository | fandhe-ai/agent-reference-skills ↗ |
What it does
Helps with ai & agent building tasks.
Files
Syncpack リファレンス
Syncpack(syncpack.dev)の全ドキュメントを網羅したスキル。 ユーザーのタスクに応じて適切な README.md を読み、そこから個別ファイルへ辿ること。
ディレクトリ構成
skills/syncpack/
SKILL.md
references/
guide/
README.md
getting-started.md
migrate-v14.md
migrate-v15.md
peer-dependencies.md
whats-new.md
commands/
README.md
fix.md
format.md
json.md
lint.md
list.md
update.md
version-groups/
README.md
banned.md
catalog.md
highest-semver.md
ignored.md
lowest-semver.md
pinned.md
range-only.md
same-minor.md
same-range.md
snapped-to.md
semver-groups/
README.md
ignored.md
with-range.md
update-groups/
README.md
ignored.md
targeted.md
config/
README.md
syncpackrc.md
custom-types.md
dependency-groups.md
format-bugs.md
format-repository.md
indent.md
max-concurrent-requests.md
minimum-release-age.md
semver-groups.md
severity.md
sort-az.md
sort-exports.md
sort-first.md
sort-packages.md
source.md
source-mode.md
strict.md
update-groups.md
reference/
README.md
dependency-types.md
glossary.md
specifier-types.md
status.md
samples/
README.md
basic-lint-and-fix.md
ban-dependency.md
ci-workflow.md
custom-types.md
format-package-json.md
minimal-config.md
pin-version.md
semver-range-policy.md
snap-to-source.md
update-dependencies.md
workspace-protocol.md
scripts/
README.md
cli.md
install.md探索手順
タスクからカテゴリを引き、カテゴリの README.md で目的のページを特定する:
1. 下記マッピング表でタスクに対応するカテゴリを探す 2. そのカテゴリの references/{category}/README.md を参照して目的のページを特定する 3. 該当ページの .md を Read して詳細を確認する
タスク → カテゴリ マッピング
| タスク | カテゴリ | 参照 README |
|---|---|---|
| インストール、初期設定、Getting Started | guide | references/guide/README.md |
| v14 / v15 移行、マイグレーション | guide | references/guide/README.md |
| peerDependencies の誤検知対策 | guide | references/guide/README.md |
| What's New、新機能確認 | guide | references/guide/README.md |
| syncpack lint、バージョン不一致チェック | commands | references/commands/README.md |
| syncpack fix、バージョン修正 | commands | references/commands/README.md |
| syncpack update、最新バージョン更新 | commands | references/commands/README.md |
| syncpack format、package.json 整形 | commands | references/commands/README.md |
| syncpack list / json、依存関係出力 | commands | references/commands/README.md |
| 特定バージョンに固定(pinned)、最高・最低バージョンに統一 | version-groups | references/version-groups/README.md |
| 依存関係の禁止(banned)、チェック除外(ignored) | version-groups | references/version-groups/README.md |
| catalog プロトコル強制、pnpm/Bun catalog 対応 | version-groups | references/version-groups/README.md |
| snapTo、sameRange、sameMinor、semverRangeOnly ポリシー | version-groups | references/version-groups/README.md |
| semver range 統一(^ ~ 固定)、range チェック除外 | semver-groups | references/semver-groups/README.md |
| updateGroups、patch/minor のみ更新制限 | update-groups | references/update-groups/README.md |
| 特定依存のアップデート除外 | update-groups | references/update-groups/README.md |
| .syncpackrc 設定ファイル、設定形式 | config | references/config/README.md |
| customTypes、source、sourceMode、dependencyGroups 設定 | config | references/config/README.md |
| sortAz、sortFirst、sortExports、sortPackages、ソート設定 | config | references/config/README.md |
| minimumReleaseAge、maxConcurrentRequests、severity、strict | config | references/config/README.md |
| formatBugs、formatRepository、indent 設定 | config | references/config/README.md |
| 依存関係型一覧(dev, peer, prod 等)、specifier 型、ステータスコード、用語集 | reference | references/reference/README.md |
| 典型的な使い方を知りたい、CI 連携、設定例 | samples | samples/README.md |
| インストール・CLI コマンドを知りたい | scripts | scripts/README.md |
fix
Source: https://syncpack.dev/command/fix/
Autofix dependency version mismatches across your monorepo to match configured rules. Addresses issues identified by lint but does not handle formatting (use format for that).
Usage
syncpack fix [options]Options
| Flag | Type | Description |
|---|---|---|
--config <path> | file path | Override default config file location (.cjs, .cts, .js, .json, .mjs, .mts, .ts, .yaml, .yml) |
--dependencies <pattern> | glob | Filter by dependency name; prefix with ! to exclude |
--dependency-types <types> | comma-separated | Include specific dependency categories (e.g. prod,dev,peer) |
--dry-run | boolean | Preview changes without modifying files |
--log-levels <levels> | comma-separated | Control verbosity: off, error, warn, info, debug |
--no-ansi | boolean | Disable colored output and hyperlinks |
--reporter <format> | choice | Output format: pretty (default) or json (NDJSON) |
--show <details> | comma-separated | Display details: instances, hints, statuses, all, none |
--sort <order> | choice | Ordering: count or name |
--source <pattern> | glob | Target specific package.json files |
--specifier-types <types> | comma-separated | Include version specifier types (e.g. exact, latest) |
--help / -h | boolean | Display command documentation |
Examples
# Preview changes without writing
syncpack fix --dry-run
# Fix production and dev dependencies only
syncpack fix --dependency-types prod,dev
# Fix exact versions only (e.g. "1.2.3", not ranges)
syncpack fix --specifier-types exact
# Fix a specific dependency across all packages
syncpack fix --dependencies react
# Fix scoped packages using a wildcard
syncpack fix --dependencies '@types/**'
# Output machine-readable NDJSON
syncpack fix --reporter jsonNotes
- Use
--dry-runto preview what would change before committing - Quote special characters (
!,{,},*) to prevent shell interpretation - Config file discovery order:
--configflag → config filesourcesetting → workspace definitions (npm/Yarn/pnpm/Lerna) → defaults (package.jsonandpackages/*/package.json)
Related
- lint
- format
format
Source: https://syncpack.dev/command/format/
Sort package.json fields into a consistent order and alphabetize nested fields across all packages in a monorepo. Does not alter version numbers.
Usage
syncpack format [options]Options
| Flag | Type | Description |
|---|---|---|
--check | boolean | Lint formatting only; exits with code 1 if issues found (no writes) |
--config <path> | file path | Override default config file location (.cjs, .cts, .js, .json, .mjs, .mts, .ts, .yaml, .yml) |
--dry-run | boolean | Preview changes without modifying files |
--log-levels <levels> | comma-separated | Control verbosity: off, info, warn, error, debug |
--no-ansi | boolean | Disable ANSI color codes and hyperlinks |
--reporter <format> | choice | Output format: pretty (default) or json (NDJSON) |
--source <pattern> | glob | Target specific package.json files |
--help / -h | boolean | Display command documentation |
Examples
# Format all packages
syncpack format
# Check formatting without writing
syncpack format --check
# Check a single package only
syncpack format --check --source 'packages/pingu/package.json'
# Preview changes without writing
syncpack format --dry-run
# Output machine-readable NDJSON
syncpack format --reporter jsonNotes
--checkis for CI validation;--dry-runis for local preview- JSON reporter outputs one line per issue (e.g. status
PropertyIsNotSortedAz) - Quote special characters in glob patterns to prevent shell interpretation
- Source discovery order:
--sourceflag → config file → workspace definitions → defaults
Related
- lint
- fix
json
Source: https://syncpack.dev/command/json/
Export all dependency instance data from a monorepo as newline-delimited JSON (one object per instance). Each line contains version, location, and status information. Designed for piping into jq or other tooling.
Note:fixandformatalso support--reporter jsonfor machine-readable output.
Usage
syncpack json [options]Options
| Flag | Type | Description |
|---|---|---|
--config <path> | file path | Override default config file location (.cjs, .cts, .js, .json, .mjs, .mts, .ts, .yaml, .yml) |
--dependencies <pattern> | glob | Filter by dependency name; prefix with ! to exclude |
--dependency-types <types> | comma-separated | Filter by dependency category (dev, prod, peer, etc.); prefix with ! to exclude |
--log-levels <levels> | comma-separated | Control verbosity: off, error, warn, info, debug |
--no-ansi | boolean | Disable ANSI color codes and hyperlinks |
--sort <order> | choice | Ordering: count (descending) or name (A–Z) |
--source <pattern> | glob | Target specific package.json files |
--specifier-types <types> | comma-separated | Filter by version specifier: exact, missing, unsupported, latest, workspace-protocol, etc. |
--help / -h | boolean | Display command documentation |
Examples
# All dependencies as NDJSON
syncpack json
# Filter by scoped package name pattern
syncpack json --dependencies '@aws-sdk/**'
# Count dependencies by type using jq
syncpack json | jq -r '.dependencyType' | sort | uniq -cOutput
Each line is a JsonOutput object containing:
- Dependency name and version
- Location (which
package.jsonfile and field) - Status (mismatch, valid, ignored, etc.)
Related
- list
- lint
lint
Source: https://syncpack.dev/command/lint/
Check for dependency version mismatches across a monorepo. Reports issues without modifying files. Exits with code 1 if issues are found. Use fix to resolve version mismatches; use format --check for formatting validation.
Usage
syncpack lint [options]Options
| Flag | Type | Description |
|---|---|---|
--config <path> | file path | Override default config file location (.cjs, .cts, .js, .json, .mjs, .mts, .ts, .yaml, .yml) |
--dependencies <pattern> | glob | Filter by dependency name; prefix with ! to exclude |
--dependency-types <types> | comma-separated | Target specific categories (prod, dev, peer, etc.); prefix with ! to exclude |
--log-levels <levels> | comma-separated | Control verbosity: off, info, warn, error, debug |
--no-ansi | boolean | Disable ANSI color codes and hyperlinks |
--show <details> | comma-separated | Display: instances, hints, statuses, all, or none |
--sort <order> | choice | Ordering: count (descending) or name (A–Z) |
--source <pattern> | glob | Target specific package.json files |
--specifier-types <types> | comma-separated | Filter by version specifier: exact, missing, unsupported, latest, workspace-protocol; prefix with ! to exclude |
--help / -h | boolean | Display command documentation |
Examples
# Check prod and dev dependencies
syncpack lint --dependency-types prod,dev
# Check a specific dependency
syncpack lint --dependencies react
# Check scoped packages with wildcard
syncpack lint --dependencies '@types/**'
# Exclude peer dependencies
syncpack lint --dependency-types '!peer'
# Show instance-level detail for exact versions only
syncpack lint --show instances --specifier-types exact
# Sort issues by frequency
syncpack lint --sort countNotes
- Read-only: never modifies files
- Exit code
0= no issues; exit code1= issues found - Quote special characters (
!,{,},*) to prevent shell interpretation - Config discovery order:
--sourceflag → config file → workspace definitions (npm/Yarn/pnpm/Lerna) → defaults
Related
- fix
- format
- list
list
Source: https://syncpack.dev/command/list/
Display all dependencies across a monorepo with their versions and locations. Shows which dependencies have mismatches, are ignored, or comply with configured rules. Useful for exploration before running lint or fix.
Usage
syncpack list [options]Options
| Flag | Type | Description |
|---|---|---|
--config <path> | file path | Override default config file location (.cjs, .cts, .js, .json, .mjs, .mts, .ts, .yaml, .yml) |
--dependencies <pattern> | glob | Filter by dependency name; prefix with ! to exclude |
--dependency-types <types> | comma-separated | Restrict to specific categories (dev, prod, peer, etc.); prefix with ! to exclude |
--log-levels <levels> | comma-separated | Control verbosity: off, info, warn, error, debug |
--no-ansi | boolean | Disable colored output and hyperlinks |
--show <details> | comma-separated | Display: hints, statuses, instances, ignored, or all |
--sort <order> | choice | Ordering: count (descending) or name (A–Z) |
--source <pattern> | glob | Target specific package.json files |
--specifier-types <types> | comma-separated | Filter by version specifier: exact, latest, workspace-protocol, etc.; prefix with ! to exclude |
--help / -h | boolean | Display command documentation |
Examples
# Sort by most common dependency
syncpack list --sort count
# Show per-package instance detail
syncpack list --show instances
# Peer dependencies only
syncpack list --dependency-types peer
# Scoped package filter
syncpack list --dependencies '@types/**'
# Combine filters
syncpack list --specifier-types exact --show instances --dependency-types peerRelated
- lint
- fix
- json
Commands
syncpack CLI コマンド一覧。
| Name | Description | Path |
|---|---|---|
| fix | Autofix dependency version mismatches across your monorepo to match configured rules. | fix.md |
| format | Sort package.json fields into a consistent order and alphabetize nested fields across all packages. | format.md |
| json | Export all dependency instance data from a monorepo as newline-delimited JSON (one object per instance). | json.md |
| lint | Check for dependency version mismatches across a monorepo. Reports issues without modifying files. | lint.md |
| list | Display all dependencies across a monorepo with their versions and locations. | list.md |
| update | Update dependencies in your monorepo to newer versions from the npm registry. | update.md |
update
Source: https://syncpack.dev/command/update/
Update dependencies in your monorepo to newer versions from the npm registry. Fetches latest published versions and modifies package.json files. Differs from fix, which synchronizes versions across packages without consulting npm.
Usage
syncpack update [options]Options
| Flag | Type | Description |
|---|---|---|
--check | boolean | List outdated dependencies without modifying files; exits with code 1 if updates exist |
--config <path> | file path | Override default config file location (.cjs, .cts, .js, .json, .mjs, .mts, .ts, .yaml, .yml) |
--dependencies <pattern> | glob | Filter by dependency name; prefix with ! to exclude |
--dependency-types <types> | comma-separated | Include specific categories (dev, prod, peer, etc.) |
--dry-run | boolean | Preview changes without modifying files |
--interactive | boolean | Pick which updates to apply through an interactive prompt (↑↓ navigate, space toggle, a toggle all, enter confirm) |
--log-levels <levels> | comma-separated | Control verbosity: off, error, warn, info, debug |
--no-ansi | boolean | Disable colored output and hyperlinks |
--no-cache | boolean | Bypass npm registry response caching (responses are cached locally for 30 minutes by default) |
--source <pattern> | glob | Target specific package.json files |
--source-mode <mode> | enum | How custom source patterns interact with workspace discovery: replace (default) or extend |
--specifier-types <types> | comma-separated | Filter by version specifier format (exact, range, latest, etc.) |
--target <strategy> | enum | Update boundary: latest, minor, or patch |
--help / -h | boolean | Display command documentation |
Update Strategies (--target)
| Value | Behavior |
|---|---|
latest | Accept any newer version (x.x.x) |
minor | Restrict to minor updates (1.x.x) |
patch | Restrict to patch updates (1.2.x) |
Examples
# Accept any available update
syncpack update --target latest
# Minor updates only
syncpack update --target minor
# Patch updates only
syncpack update --target patch
# Check without modifying
syncpack update --check
# Check a single package
syncpack update --check --source 'packages/pingu/package.json'
# Update prod and dev only
syncpack update --dependency-types dev,prod
# Update a specific dependency
syncpack update --dependencies react
# Wildcard match
syncpack update --dependencies '**react**'
# Scoped packages
syncpack update --dependencies '@aws-sdk/**'Notes
- Requires network access to the npm registry
- Versions newer than
minimumReleaseAge(default: 1440 minutes) are excluded to reduce supply chain attack risk - Registry responses are cached locally for 30 minutes; use
--no-cacheto bypass - Per-dependency update control is available via
updateGroupsin the config file; the stricter of CLI--targetand grouptargetwins - Quote special characters in glob patterns to prevent shell interpretation
- Config discovery order:
--configflag → config file → workspace definitions → defaults
Related
- fix
- lint
customTypes
Source: https://syncpack.dev/config/custom-types/
Define custom package.json properties to manage beyond standard dependency types such as prod, dev, and peer.
Property
| Name | Type | Required | Description |
|---|---|---|---|
customTypes | object | No | Map of custom type name to type definition |
customTypes[name] | object | — | Custom type definition identified by name |
customTypes[name].path | string | Yes | Location within package.json where versions are stored |
customTypes[name].strategy | string | Yes | How syncpack reads/writes dependency names and versions |
Strategies
| Strategy | Description | Example Value |
|---|---|---|
name@version | Name and version combined in a single string separated by @ | "pnpm@7.27.0" |
name~version | Name and version stored at separate paths (each pointing to a string value) | devEngines.runtime.name + devEngines.runtime.version |
version | Bare version string; the custom type's key is used as the dependency name | "engines": { "node": "22.11.0" } |
versionsByName | Standard dependency object with package names as keys | { "pnpm": "10.10.0" } |
Default Configuration
The built-in types are defined internally as:
{
"customTypes": {
"dev": {
"strategy": "versionsByName",
"path": "devDependencies"
},
"prod": {
"strategy": "versionsByName",
"path": "dependencies"
}
}
}Example: engines and packageManager
{
"customTypes": {
"engines": {
"strategy": "versionsByName",
"path": "engines"
},
"packageManager": {
"strategy": "name@version",
"path": "packageManager"
}
}
}Notes
- Custom types can be referenced by name in the
--dependency-typesCLI option - Custom types work with
dependencyTypesin Version Groups, Semver Groups, and Dependency Groups - Nested paths use dot notation (e.g.,
"some.nested.property")
dependencyGroups
Source: https://syncpack.dev/config/dependency-groups/
Group multiple dependencies to be treated as a single entity for version management. Useful for package families such as @aws-sdk/** that should always share the same version.
Properties
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
aliasName | string | Yes | — | Unified name used when referencing this group in version/semver group assignments |
dependencies | string[] | No | All dependencies | Package name patterns to include (supports exact names and glob patterns) |
dependencyTypes | string[] | No | All locations | Locations in package.json (e.g., "dev", "prod"). Supports ! negation |
specifierTypes | string[] | No | All specifiers | Filter by version specifier format. Supports ! negation |
label | string | No | Auto-generated | Display name shown in syncpack output |
packages | string[] | No | All packages | Package names (from the name field) to include. Supports glob patterns |
Dependency Pattern Examples
| Pattern | Matches |
|---|---|
["**"] | Every dependency |
["@aws-sdk/**"] | All scoped @aws-sdk packages |
["react", "react-dom"] | Exact name matches only |
Example
{
"dependencyGroups": [
{
"dependencies": ["@aws-sdk/**"],
"aliasName": "aws-sdk-dependencies"
}
]
}Notes
- Cannot mix specific and negated patterns in the same
dependenciesorpackagesarray packagesvalues reference thenamefield in package.json, not file paths- The group alias is used in
versionGroupsandsemverGroupsconfiguration to apply rules to the entire group
formatBugs
Source: https://syncpack.dev/config/format-bugs/
When using the format command, enables formatting of the bugs field of package.json into a shorthand format.
Property
| Name | Type | Default |
|---|---|---|
formatBugs | boolean | false |
Configuration
{
"formatBugs": false
}Notes
- Applies only to the
formatcommand - No corresponding CLI option is available; must be set in the config file
formatRepository
Source: https://syncpack.dev/config/format-repository/
When using the format command, enables formatting of the repository field of package.json into a shorthand format.
Property
| Name | Type | Default |
|---|---|---|
formatRepository | boolean | false |
Configuration
{
"formatRepository": false
}Notes
- Applies only to the
formatcommand - No corresponding CLI option is available; must be set in the config file
indent
Source: https://syncpack.dev/config/indent/
When syncpack writes to package.json files, determines which characters to indent the JSON with.
Property
| Name | Type | Default |
|---|---|---|
indent | string | " " (two spaces) |
Configuration
{
"indent": " "
}Common Values
| Value | Description |
|---|---|
" " | Two spaces (default) |
" " | Four spaces |
"\t" | Tab character |
Notes
- Controls whitespace applied during all syncpack write operations
- Set this to match your project's existing formatting preferences
maxConcurrentRequests
Source: https://syncpack.dev/config/max-concurrent-requests/
The maximum number of HTTP requests to the npm registry to keep in-flight at any given time when running the update command.
Property
| Name | Type | Default |
|---|---|---|
maxConcurrentRequests | number | 12 |
Configuration
{
"maxConcurrentRequests": 12
}Notes
- Only used by the
updatecommand - Lower values reduce network/registry load at the cost of slower update checks
- Higher values speed up update checks but increase concurrent connections
minimumReleaseAge
Source: https://syncpack.dev/config/minimum-release-age/
Minimum age in minutes a published package version must reach before syncpack considers it for updates. Reduces supply chain attack risk by filtering out very recently published versions.
Property
| Name | Type | Default | Description |
|---|---|---|---|
minimumReleaseAge | number | 1440 | Minimum age in minutes. Set to 0 to disable. |
Usage
{
"minimumReleaseAge": 10080
}Notes
- Applies to the
updatecommand only - Default is 1440 minutes (24 hours); "Most malicious releases are detected and unpublished within an hour"
- When omitted from
.syncpackrc, reads frompnpm-workspace.yamlif present - Setting to
0disables the filter entirely - Added in v15.0.0
Related
- update command
- updateGroups
config
| Name | Description | Path |
|---|---|---|
| customTypes | Define custom package.json properties to manage beyond standard… | custom-types.md |
| dependencyGroups | Group multiple dependencies to be treated as a single entity… | dependency-groups.md |
| formatBugs | When using the format command, enables formatting of the… | format-bugs.md |
| formatRepository | When using the format command, enables formatting of the… | format-repository.md |
| indent | When syncpack writes to package.json files, determines which… | indent.md |
| maxConcurrentRequests | The maximum number of HTTP requests to the npm registry to… | max-concurrent-requests.md |
| minimumReleaseAge | Minimum age in minutes a published package version must reach… | minimum-release-age.md |
| semverGroups | Allow some dependencies to have different semver range rules… | semver-groups.md |
| severity | Override the default treatment for status codes syncpack… | severity.md |
| sortAz | When using the format command, sorts the specified… | sort-az.md |
| sortExports | When using the format command, orders the properties of… | sort-exports.md |
| sortFirst | When using the format command, determines which fields… | sort-first.md |
| sortPackages | When using the format command, enables sorting of… | sort-packages.md |
| source | Glob patterns to discover which package.json files syncpack… | source.md |
| sourceMode | Determines how custom source patterns interact with… | source-mode.md |
| strict | Controls whether syncpack exits with a non-zero error code… | strict.md |
| .syncpackrc | Configuration file for syncpack. Only properties you want to… | syncpackrc.md |
| updateGroups | Provide granular control over which registry updates qualify… | update-groups.md |
semverGroups
Source: https://syncpack.dev/semver-groups/
Allow some dependencies to have different semver range rules to the rest of your monorepo. Each dependency can only belong to one semver group — the first rule that matches a given dependency and package will apply.
Property
| Name | Type | Default |
|---|---|---|
semverGroups | array | [] |
Common Matching Properties
All semver group variants share these optional matching properties:
| Name | Type | Default | Description |
|---|---|---|---|
dependencies | string[] | All dependencies | Dependency name patterns. Supports exact names, glob (@aws-sdk/**, **), and negation |
dependencyTypes | string[] | All locations | Locations in package.json: prod, dev, peer, resolutions, overrides, pnpmOverrides, local. Supports ! negation |
specifierTypes | string[] | All specifiers | Filter by version specifier format. Supports ! negation |
packages | string[] | All packages | Package names (from name field). Supports exact, glob, and negated patterns |
label | string | Auto-generated | Display name in syncpack output (e.g., "Version Group 3") |
Variants
ignored
Exclude specific dependencies from semver range validation and enforcement.
| Name | Type | Required | Description |
|---|---|---|---|
isIgnored | boolean | Yes | Must be true to enable ignored group |
{
"semverGroups": [
{
"packages": ["oops-moment", "workaround"],
"isIgnored": true
}
]
}with-range
Ensure all dependencies within this group use the specified semver range format.
| Name | Type | Required | Description |
|---|---|---|---|
range | string | Yes | Semver range format to enforce: "" (exact), "~" (tilde), "^" (caret) |
{
"semverGroups": [
{
"dependencies": ["@foo/**"],
"range": "~"
}
]
}Full Example
{
"semverGroups": [
{
"dependencyTypes": ["prod", "resolutions", "overrides", "pnpmOverrides", "local"],
"range": ""
},
{
"dependencyTypes": ["dev"],
"range": "~"
},
{
"dependencyTypes": ["peer"],
"range": "^"
}
]
}Notes
- Groups are evaluated in order; the first matching group wins
- A dependency belongs to exactly one semver group
- Omitting all matching properties causes the group to match everything (useful as a catch-all last entry)
severity
Source: https://syncpack.dev/config/severity/
Override the default treatment for status codes syncpack assigns to dependencies. Configurable per version group via the optional severity map.
Property
| Name | Type | Required | Description |
|---|---|---|---|
severity | object | No | Map of status code name to severity level ("fix", "warn", or "error") |
Severity Values
| Value | Behavior |
|---|---|
"fix" | Automatically correct during fix; report as error during lint (exit code 1) |
"warn" | Display warning during both commands; exit code 0 |
"error" | Prevent auto-fix; report as error; exit code 1 |
Default Behaviors
| Status Type | Default Severity |
|---|---|
| Fixable | "fix" |
| Unfixable | "error" |
| Suspect | "warn" |
| Conflict | "error" |
RefuseToPinLocal / RefuseToSnapLocal | "warn" |
strict: true escalates unspecified Suspect statuses from "warn" to "error". Explicit severity mappings always take precedence.
Usage
{
"versionGroups": [
{
"label": "Treat banned dependencies as errors",
"dependencies": ["lodash"],
"isBanned": true,
"severity": {
"IsBanned": "error"
}
}
]
}Non-Configurable Status Codes
| Status | Reason |
|---|---|
DiffersToNpmRegistry | Controlled via updateGroups configuration |
| Unfixable conflict statuses | Permanently set to "error" to prevent hiding ambiguities |
Notes
- Added in v15.2.0
strict: trueand explicitseveritymaps can coexist; explicit maps take precedence
Related
- strict
- version-groups
sortAz
Source: https://syncpack.dev/config/sort-az/
When using the format command, sorts the specified package.json fields alphabetically. When the value is an Object, its keys are sorted; when it is an Array, its values are sorted.
Property
| Name | Type | Default |
|---|---|---|
sortAz | string[] | See below |
Default Value
{
"sortAz": [
"bin",
"contributors",
"dependencies",
"devDependencies",
"keywords",
"peerDependencies",
"resolutions",
"scripts"
]
}Notes
- Applies only to the
formatcommand - No corresponding CLI option is available; must be set in the config file
- Add or remove field names to control which package.json fields are sorted
sortExports
Source: https://syncpack.dev/config/sort-exports/
When using the format command, orders the properties of the exports field in package.json according to the specified array. Aligns with Node.js documentation for conditional exports.
Property
| Name | Type | Default |
|---|---|---|
sortExports | string[] | See below |
Default Value
{
"sortExports": [
"types",
"node-addons",
"node",
"browser",
"module",
"import",
"require",
"svelte",
"development",
"production",
"script",
"default"
]
}Disable Sorting
{
"sortExports": []
}Notes
- Applies only to the
formatcommand - No corresponding CLI option is available; must be set in the config file
- An empty array disables export sorting entirely
- The default order follows Node.js package export conventions
sortFirst
Source: https://syncpack.dev/config/sort-first/
When using the format command, determines which fields within package.json files should appear at the top, and in what order. Fields not listed here are sorted alphabetically after (controlled by sortPackages).
Property
| Name | Type | Default |
|---|---|---|
sortFirst | string[] | ["name", "description", "version", "author"] |
Default Value
{
"sortFirst": ["name", "description", "version", "author"]
}Notes
- Applies only to the
formatcommand - No corresponding CLI option is available; must be set in the config file
- Works together with
sortPackages:sortFirstpins priority fields to the top, andsortPackagessorts the remaining fields alphabetically
Related
- ./sort-packages.md
sortPackages
Source: https://syncpack.dev/config/sort-packages/
When using the format command, enables sorting of root-level properties of package.json in alphabetical order.
Property
| Name | Type | Default |
|---|---|---|
sortPackages | boolean | true |
Configuration
{
"sortPackages": true
}Notes
- Applies only to the
formatcommand - No corresponding CLI option is available; must be set in the config file
- Works together with
sortFirst: fields listed insortFirstare pinned to the top, then remaining fields are sorted alphabetically bysortPackages
Related
- ./sort-first.md
sourceMode
Source: https://syncpack.dev/config/source-mode/
Determines how custom source patterns interact with package files automatically discovered from your package manager's workspace configuration.
Property
| Name | Type | Default | Description |
|---|---|---|---|
sourceMode | `"replace" \ | "extend"` | "replace" |
Usage
{
"sourceMode": "extend",
"source": ["tools/scripts/package.json"]
}Values
| Value | Behavior |
|---|---|
"replace" (default) | Custom source patterns completely override workspace discovery from workspaces, pnpm-workspace.yaml, or lerna.json |
"extend" | Custom source patterns are added after auto-discovered patterns; enables gitignore-style negation like !apps/legacy |
CLI Override
--source-mode <replace|extend> takes precedence over the configuration file setting.
Notes
- When using
extend, discovered patterns appear first; custom patterns follow - Added in v15.2.0
Related
- source
- update command
source
Source: https://syncpack.dev/config/source/
Glob patterns to discover which package.json files syncpack should manage. Useful for monorepos and distributed project structures.
Property
| Name | Type | Default |
|---|---|---|
source | string[] | Workspace/Lerna config or ["package.json", "packages/*/package.json"] |
Resolution Priority
Syncpack resolves package.json files in the following order (highest to lowest priority):
1. --source CLI option 2. source configuration property 3. Workspace configurations (npm, Yarn, or pnpm workspaces) 4. Lerna configuration 5. Default patterns: "package.json" and "packages/*/package.json"
Example
{
"source": ["./*/package.json", "./*/packages/*/package.json"]
}Notes
- Supports any glob pattern valid for your file system
- Can target multiple repository structures simultaneously
- Syncpack does not require a monorepo setup;
sourcecan point to multiple separate repositories - Placing a
.syncpackrc.jsonwith appropriatesourcepatterns in a shared parent directory allows cross-repo dependency management
strict
Source: https://syncpack.dev/config/strict/
Controls whether syncpack exits with a non-zero error code when version mismatches are detected.
Property
| Name | Type | Default |
|---|---|---|
strict | boolean | false |
Configuration
{
"strict": false
}Behavior
| Value | Behavior |
|---|---|
false (default) | Reports version inconsistencies but exits with code 0 |
true | Exits with a non-zero error code when mismatches are found |
Notes
- Enable
strict: truein CI/CD pipelines to enforce version consistency as a mandatory gate - Prevents builds or deployments when dependency versions do not align across packages
.syncpackrc
Source: https://syncpack.dev/config/syncpackrc/
Configuration file for syncpack. Only properties you want to change from the defaults need to be specified.
Search Order
Syncpack searches for configuration in the following priority order:
1. .syncpackrc (no extension, JSON format) 2. .syncpackrc.json, .syncpackrc.yaml, .syncpackrc.yml, .syncpackrc.js, .syncpackrc.ts, .syncpackrc.mjs, .syncpackrc.cjs 3. syncpack.config.js, syncpack.config.ts, syncpack.config.mjs, syncpack.config.cjs 4. syncpack or config.syncpack property in package.json
To specify a custom location (requires a file extension):
syncpack list --config ./config/syncpack.jsonSupported Formats
JSON (Recommended)
Preferred for fastest performance — no Node.js/TypeScript overhead.
{
"$schema": "./node_modules/syncpack/schema.json",
"indent": " "
}TypeScript
export default {
indent: " ",
} satisfies import("syncpack").RcFile;JavaScript
// @ts-check
/** @type {import("syncpack").RcFile} */
const config = {
indent: " ",
};
module.exports = config;Notes
- JSON format is recommended for performance (avoids TypeScript/Node.js compilation overhead)
- The
$schemaproperty enables IDE autocompletion when using JSON format - Configuration values are merged with defaults; only overrides need to be specified
updateGroups
Source: https://syncpack.dev/update-groups/
Provide granular control over which registry updates qualify for the update command. Groups are evaluated sequentially through source order; the first matching group applies. Unmatched instances default to the CLI's --target value.
Property
| Name | Type | Required | Description |
|---|---|---|---|
updateGroups | object[] | No | Array of update group definitions evaluated in order |
Usage
{
"updateGroups": [
{
"label": "Storybook — patch only",
"dependencies": ["@storybook/**"],
"target": "patch"
},
{
"label": "Dev dependencies — minor only",
"dependencyTypes": ["dev"],
"target": "minor"
},
{
"label": "Ignore peer dependencies",
"dependencyTypes": ["peer"],
"isIgnored": true
}
]
}Group Types
| Property | Description |
|---|---|
target | Restrict update scope: "patch", "minor", or "latest" — see targeted |
isIgnored | Exclude from registry checks entirely — see ignored |
Target Strictness
The stricter of the CLI --target flag and a group's target wins. A group with target: "latest" cannot override --target patch passed on the CLI.
Notes
- Added in v15.1.1
- All filter properties (
dependencies,dependencyTypes,packages,specifierTypes,label) are optional; omitted properties match all values
Related
- update command
- minimumReleaseAge
- update-groups/ignored
- update-groups/targeted
Getting Started
Source: https://syncpack.dev/
Overview
Syncpack is a CLI tool for maintaining consistent dependency versions across JavaScript monorepos. It can identify and resolve version conflicts, enforce semver range policies, locate outdated packages, pin versions, and standardize package.json formatting.
Used by: AWS, Cloudflare, DataDog, Electron, Microsoft, Vercel, and others.
Try Without Installing
Run from your monorepo root via npx:
npx syncpack list --dependency-types prodInstallation
npm install syncpack --save-devnpm exec syncpack -- listCLI Commands
| Command | Description |
|---|---|
syncpack list | List all dependencies with optional filtering/sorting |
syncpack lint | Show only dependencies that have errors/issues |
syncpack fix | Auto-fix identified inconsistencies |
syncpack update | Check for and apply package upgrades |
syncpack format | Standardize package.json formatting |
All commands support -h (quick summary) and --help (detailed docs with examples).
Common Options
| Option | Description |
|---|---|
--dependency-types | Filter by dependency category (prod, dev, peer, etc.) |
--dependencies | Filter by package name (supports glob patterns) |
--specifier-types | Filter by version specifier type (e.g., exact) |
Examples
# List prod dependencies
syncpack list --dependency-types prod
# List only issues in prod + dev
syncpack lint --dependency-types prod,dev
# Fix everything
syncpack fix
# Fix only react
syncpack fix --dependencies react
# Check for outdated react upgrades
syncpack update --check --dependencies react
# Check for patch-level dev dependency updates
syncpack update --check --dependency-types dev --target patch
# Apply updates (omit --check)
syncpack update --dependencies react
# Glob patterns for filtering
syncpack list --dependencies '**eslint**'
syncpack list --dependencies '@types/**'
# Filter by specifier type
syncpack list --specifier-types exactConfiguration
Create .syncpackrc (JSON, YAML, JS, TS, MJS, CJS) in your repo root. Can also be defined as a syncpack property in package.json.
Custom config path requires an extension:
syncpack list --config ./config/syncpack.jsonMinimal Config (production deps only)
Start narrow, expand gradually:
{
"versionGroups": [
{
"label": "Sync all production dependencies",
"dependencyTypes": ["prod"]
},
{
"label": "Ignore everything else",
"isIgnored": true
}
]
}Focus on Specific Packages
{
"versionGroups": [
{
"label": "Sync react dependencies only",
"dependencies": ["react", "react-dom"],
"dependencyTypes": ["prod"]
},
{
"label": "Ignore everything else",
"isIgnored": true
}
]
}Enforce workspace:* for Internal Packages
{
"versionGroups": [
{
"label": "Use `workspace:*` protocol for local packages",
"dependencies": ["$LOCAL"],
"dependencyTypes": ["dev", "prod"],
"pinVersion": "workspace:*"
},
{
"label": "Ignore everything else",
"isIgnored": true
}
]
}Schema Support (TypeScript / JavaScript)
export default {
indent: " ",
} satisfies import("syncpack").RcFile;/** @type {import("syncpack").RcFile} */
const config = { indent: " " };
module.exports = config;Notes
- After running
fixorupdate, run your package manager (npm install,pnpm install, etc.) to refresh lockfiles. - See Peer Dependencies for monorepos that use peer dependencies.
- See Version Groups and Semver Groups for advanced policies.
Related
- Migrate to v14
- Peer Dependencies
Migrate to v14
Source: https://syncpack.dev/guide/migrate-v14/
Overview
v14 consolidates commands, renames CLI options, and removes config properties in favor of more flexible alternatives. The core change is that semver range management and version mismatch checking are now inseparable.
Command Changes
Merged Commands
| v13 | v14 | Notes |
|---|---|---|
list-mismatches | lint | Checks version + semver group membership |
lint-semver-ranges | lint | Now included in lint |
fix-mismatches | fix | Fixes version + semver ranges |
set-semver-ranges | fix | Now included in fix |
# v13
syncpack list-mismatches --types prod,dev
syncpack lint-semver-ranges
# v14
syncpack lint --dependency-types prod,dev# v13
syncpack fix-mismatches
syncpack set-semver-ranges
# v14
syncpack fixFormatting checks moved to:
syncpack format --checkRemoved Command
prompt — the interactive prompt for issues that can't be auto-fixed — is not available in v14 and will be added at a later date.
CLI Option Changes
| Old | New | Notes |
|---|---|---|
--types | --dependency-types | Filter dependency categories |
--specs | --specifier-types | Filter version specifier types |
--filter | --dependencies | Now uses glob patterns instead of regex |
# v13
syncpack list-mismatches --filter "^@types\/.+"
# v14
syncpack lint --dependencies "@types/**"Configuration Property Changes
Removed: dependencyTypes (top-level)
Use versionGroups instead, or use --dependency-types CLI flag for one-off filtering.
{
"versionGroups": [
{
"label": "Ignore everything except prod, dev, peer",
"dependencies": ["!prod", "!dev", "!peer"],
"isIgnored": true
}
]
}Removed: specifierTypes (top-level)
Use versionGroups with a specifierTypes property, or use --specifier-types CLI flag.
Removed: lintFormatting
Formatting is now exclusively handled by syncpack format.
syncpack format --checkRemoved: lintSemverRanges
Semver range checking is always enabled alongside version linting. The two are inseparable in v14 because changes to semver ranges affect which versions are considered valid.
Removed: lintVersions
Version linting is now always enabled and this option became redundant.
Legacy Version Migrations
| From version | Change |
|---|---|
| v11.2.1 | workspace dependency type renamed to local |
| v9.0.0 | Boolean flags (--prod, --dev, --peer) replaced by --dependency-types; individual config props consolidated into versionGroups |
| v8.0.0 | pnpm overrides use pnpmOverrides dependency type; npm overrides use overrides |
| v7.0.0 | Workspace dependency syncing enabled by default; disable via versionGroups with "dependencyTypes": ["local"], "isIgnored": true |
| v6.0.0 | resolutions and overrides now processed by default; exclude explicitly if not needed |
| v3.0.0 | --source became a repeatable option instead of positional arguments |
Related
- Getting Started
- Peer Dependencies
Migrate to v15
Source: https://syncpack.dev/guide/migrate-v15/
Upgrade guide for Syncpack v15. The install step is unchanged.
npm install --save-dev syncpackBreaking Change: pnpmOverrides
pnpmOverrides now reads from pnpm-workspace.yaml instead of package.json. This aligns with current pnpm conventions.
Legacy compatibility
If your overrides remain in package.json under pnpm.overrides, add a custom type to maintain compatibility:
{
"customTypes": {
"pnpmOverridesLegacy": {
"strategy": "versionsByName",
"path": "pnpm.overrides"
}
}
}The standard pnpmOverrides type will continue to manage pnpm-workspace.yaml going forward.
New Features in v15
| Version | Feature |
|---|---|
| v15.0.0 | catalog: protocol support (pnpm/Bun), minimumReleaseAge |
| v15.1.1 | updateGroups, interactive update picker, registry caching |
| v15.2.0 | severity override map, sourceMode: "extend" |
| v15.3.0 | semverRangeOnly version group policy |
Related
- migrate-v14
- what's new
- catalog version group
- updateGroups config
Peer Dependencies
Source: https://syncpack.dev/guide/peer-dependencies/
Overview
Peer dependencies have fundamentally different version semantics from regular dependencies. Syncpack needs explicit configuration to understand when apparent mismatches are actually valid.
Regular vs Peer Dependency Ranges
| Type | Typical Range | Role |
|---|---|---|
dependencies | 1.2.3, ~1.2.0, ^1.2.0 | Consumer — narrow, predictable |
peerDependencies | ^1, >=6.0.0 <9.0.0 | Provider — broad, maximally compatible |
Peer dependencies use wide ranges because the package is designed to work with as many consuming projects as possible.
The Problem
Syncpack compares versions literally. A peer dependency range and a concrete devDependency version will almost always look like a mismatch, even when they are compatible.
Example:
// ESLint plugin (peerDependencies)
{
"peerDependencies": {
"eslint": ">=6.0.0 <9.0.0"
}
}
// Root package (devDependencies)
{
"devDependencies": {
"eslint": "8.53.0"
}
}Syncpack flags >=6.0.0 <9.0.0 vs 8.53.0 as a mismatch, even though 8.53.0 satisfies the peer range.
Solution
Use versionGroups in .syncpackrc to tell Syncpack how to handle peer dependency instances — typically by ignoring them or isolating them into a separate group with sameRange policy.
Option 1: Ignore All Peer Dependencies
{
"versionGroups": [
{
"label": "Ignore peer dependencies",
"dependencyTypes": ["peer"],
"isIgnored": true
}
]
}Option 2: Use sameRange for Peer Dependencies
Checks that all semver ranges for a dependency overlap (i.e., there exists at least one version that satisfies all of them):
{
"versionGroups": [
{
"label": "Peer dependencies use sameRange policy",
"dependencyTypes": ["peer"],
"policy": "sameRange"
}
]
}Option 3: Isolate Peer + Dev Together
Prevent peer dependency declarations from being compared against other dependency types:
{
"versionGroups": [
{
"label": "Each package manages its own peer + dev versions",
"dependencyTypes": ["peer", "dev"],
"packages": ["@myrepo/eslint-plugin"],
"isIgnored": true
}
]
}Notes
- The right approach depends on your monorepo's architecture. Consult Version Groups for all available policies.
$LOCALcan be used independenciesarrays to match internal workspace packages.- Order
versionGroupsfrom most specific to most general — first match wins.
Related
- Getting Started
- Version Groups
- Semver Groups
guide
| Name | Description | Path |
|---|---|---|
| Getting Started | Syncpack is a CLI tool for maintaining consistent dependency versions across JavaScript monorepos. | getting-started.md |
| Migrate to v14 | v14 consolidates commands, renames CLI options, and removes config properties in favor of more flexible… | migrate-v14.md |
| Migrate to v15 | Upgrade guide for Syncpack v15. | migrate-v15.md |
| Peer Dependencies | Peer dependencies have fundamentally different version semantics from regular dependencies. | peer-dependencies.md |
| What's New | Summary of notable features added in recent Syncpack releases. | whats-new.md |
What's New
Source: https://syncpack.dev/guide/whats-new/
Summary of notable features added in recent Syncpack releases.
v15.3.0
Range Only Version Group (semverRangeOnly): Enforces consistent semver range prefixes (^, ~, or exact) across instances without syncing actual version numbers. See range-only.
Update Summary: The interactive update command now displays only the updates actually applied, rather than all candidates found.
v15.2.0
Severity Override: The severity map on version groups lets you disable autofixes for specific status codes, or escalate to errors. See severity.
sourceMode: New sourceMode: "extend" option appends custom source patterns to workspace-discovered patterns instead of replacing them. See sourceMode.
Non-package.json Support: The source option now accepts other JSON filenames when explicitly specified; improved glob and gitignore matching.
v15.1.1
Update Groups: Control how and whether monorepo sections receive npm updates, with options for patch/minor targeting and ignoring peer dependencies. See updateGroups.
Interactive Picker: The update command gains a keyboard-driven interface (--interactive): space toggles, a toggles all, enter confirms.
Registry Caching: npm registry responses cache locally for 30 minutes by default. Pass --no-cache to bypass.
v15.0.0
Catalog Protocol: Full support for pnpm and Bun catalogs with the catalog: protocol. See catalog version group.
Minimum Release Age: minimumReleaseAge (default: 1440 minutes) excludes recently-published versions for supply-chain security. See minimumReleaseAge.
Breaking Change: pnpmOverrides now reads from pnpm-workspace.yaml instead of package.json. See migrate-v15.
Related
- migrate-v15
- migrate-v14
Dependency Types
Source: https://syncpack.dev/dependency-types/
Dependency types refer to the various locations within package.json files where dependencies can be defined and managed by syncpack.
Default Dependency Types
Syncpack recognizes seven standard dependency type locations defined by npm, pnpm, and yarn:
| Name | package.json Property |
|---|---|
dev | devDependencies |
local | version |
overrides | overrides |
peer | peerDependencies |
pnpmOverrides | pnpm.overrides |
prod | dependencies |
resolutions | resolutions |
Custom Types
Users can extend the default list by defining custom types in configuration to handle additional package.json sections such as:
- Engine versions (
engines) - Package manager versions (
packageManager) - Any other nested property in
package.json
See the custom types guide for implementation details.
Command-Line Usage
Use --dependency-types to filter operations to specific types:
# Production dependencies only
syncpack lint --dependency-types prod
# Multiple types
syncpack lint --dependency-types prod,dev
# Exclude a type (prefix with !)
syncpack lint --dependency-types '!peer'Configuration Usage
Dependency types serve as filters in three configuration contexts:
| Context | Purpose |
|---|---|
| Version Groups | Establish specific versioning policies for targeted dependency categories |
| Semver Groups | Specify semver ranges for particular dependencies |
| Dependency Groups | Consolidate related dependencies under unified aliases |
Related
- ./glossary.md
- ./specifier-types.md
Glossary
Source: https://syncpack.dev/glossary/
Key terms used throughout syncpack documentation.
Terms
| Term | Definition |
|---|---|
| Complex Semver | A semver version with conditional logic, such as `^1.2.3-alpha \ |
| Custom Type | A user-defined configuration extending syncpack to handle package.json sections beyond standard dependency types (e.g. engines, packageManager). |
| Dependency | A package that your project relies on, listed in any dependency field of your package.json files. |
| Dependency Group | A collection of related dependencies that are merged together and treated as one. |
| Dependency Type | The location within package.json files where dependencies are specified. Includes prod, dev, peer, overrides, pnpmOverrides, resolutions, and local. |
| Instance | A specific occurrence of a dependency in a monorepo. For example, if uuid appears in three packages under dependencies and one under devDependencies, that's 4 instances of one dependency. |
| Local Instance | A specific occurrence of a dependency in your monorepo that is defined by the package's own version property. |
| Package | A module within your monorepo defined by a package.json file. |
| Rcfile | A configuration file (.syncpackrc, .syncpackrc.js, etc.) defining dependency management settings including version groups and formatting options. |
| Semver | Semantic Versioning — a versioning scheme that uses a three-part number (MAJOR.MINOR.PATCH). |
| Semver Group | A configuration that defines how semver ranges should be formatted for a specific set of dependencies. |
| Semver Number | The version number portion of the version specifier, such as 1.2.3, excluding any semver range. |
| Semver Range | A pattern that specifies which versions of a dependency are acceptable (e.g. exact, caret, or tilde formats). |
| Simple Semver | A typical semver version such as 1.2.3, ^1.2.3, or 1.2.3-alpha. |
| Specifier | The full version string for a dependency, including any prefixes or range indicators (e.g. ^1.2.3 or >=1.0.0). |
| Specifier Type | Categorization of version specifiers. Includes exact, range, latest, tag, file, git, url, and others. |
| Status Code | A code assigned by syncpack to each dependency instance that indicates its validation status. |
| Version Group | A configuration object that defines a partition of your monorepo with its own versioning policy. |
| Workspace | A collection of packages managed together in a monorepo, typically defined by your package manager. |
Related
- ./dependency-types.md
- ./specifier-types.md
- ./status.md
reference
| Name | Description | Path |
|---|---|---|
| Dependency Types | Dependency types refer to the various locations within package.json files where dependencies can be defined and managed by syncpack. | dependency-types.md |
| Glossary | Key terms used throughout syncpack documentation. | glossary.md |
| Specifier Types | Specifier types classify the different version specifier formats found in package.json files. | specifier-types.md |
| Status | Syncpack assigns one status code to every dependency instance during monorepo analysis. | status.md |
Specifier Types
Source: https://syncpack.dev/specifier-types/
Specifier types classify the different version specifier formats found in package.json files. They enable applying targeted rules to dependencies based on how their versions are specified.
All Specifier Types
| Type | Description | Examples |
|---|---|---|
alias | A dependency that uses npm's alias syntax to reference a package under a different name. | npm:@preact/compat |
catalog | References a version defined in a shared catalog using the catalog: protocol. | catalog: |
exact | A dependency with a precise version number, including potential pre-release identifiers. | 1.2.3, 1.2.3-alpha, 1.2.3-rc.1 |
file | A dependency referencing a local file path on the filesystem. | file:./path/to/package |
git | A dependency directly referencing a Git repository. | git+https://github.com/user/repo.git |
latest | A dependency that resolves to the latest available version. Includes wildcard patterns. | latest, * |
link | A dependency that uses the link: protocol to reference a local path without installing it as a symlink. | link:../other-package |
major | A dependency specifier that only indicates the major version number. | 1 |
minor | A dependency specifier that includes both major and minor version numbers. | 1.2 |
missing | A local package.json that lacks a version field. | — |
range | A dependency that uses standard semver range syntax with a complete version number. | ^1.2.3, ~1.2.3-rc.1 |
range-complex | A dependency that uses multiple ranges combined with logical operators. | `^1.2.3-alpha \ |
range-major | A dependency that uses a range operator with only a major version. | ^1 |
range-minor | A dependency that uses a range operator with major and minor versions. | ^1.2 |
tag | A dependency referencing an npm distribution tag rather than a version. | alpha |
unsupported | A dependency with a version specifier that syncpack cannot parse or handle. | `wtf\ |
url | A dependency referencing a URL to a package distribution. | https://example.com/package |
workspace-protocol | A dependency that uses the workspace protocol for monorepo local references. | workspace:* |
Command-Line Usage
Use --specifier-types to filter operations to specific specifier types:
# Only exact versions
syncpack lint --specifier-types exact
# Exclude URL specifiers
syncpack lint --specifier-types '!url'Configuration Usage
Specifier types can be used in Version Group configurations to apply rules based on version format. For example, you can target only range specifiers or exclude workspace-protocol entries from certain policies.
Related
- ./dependency-types.md
- ./glossary.md
Status
Source: https://syncpack.dev/status/
Syncpack assigns one status code to every dependency instance during monorepo analysis. Codes are organized into five categories. Applies to syncpack v14.
Valid (13 codes)
Dependencies that comply with configuration rules. No action required.
| Status Code | Description |
|---|---|
IsCatalog | The instance matches a catalog entry. |
IsHighestOrLowestSemver | The instance is the highest (or lowest) semver version in its group. |
IsIdenticalToLocal | The instance is identical to the local package version. |
IsIdenticalToPin | The instance is identical to a pinned version. |
IsIdenticalToSnapTarget | The instance is identical to its snap target. |
IsIgnored | The instance is explicitly ignored by configuration. |
IsLocalAndValid | The local package version is present and valid. |
IsNonSemverButIdentical | The instance uses a non-semver specifier but is identical across all usages. |
SatisfiesHighestOrLowestSemver | The instance's range satisfies the highest (or lowest) semver version. |
SatisfiesLocal | The instance's range satisfies the local package version. |
SatisfiesSameMinorGroup | The instance satisfies the same-minor version group policy. |
SatisfiesSameRangeGroup | The instance satisfies the same-range version group policy. |
SatisfiesSnapTarget | The instance's range satisfies its snap target. |
Fixable (12 codes)
Issues that can be automatically corrected by syncpack fix.
| Status Code | Description |
|---|---|
DiffersToCatalog | The instance differs from its catalog entry and can be fixed. |
DiffersToHighestOrLowestSemver | The instance differs from the highest (or lowest) semver version and can be fixed. |
DiffersToLocal | The instance differs from the local package version and can be fixed. |
DiffersToNpmRegistry | The instance differs from the version on the npm registry and can be fixed. |
DiffersToPin | The instance differs from a pinned version and can be fixed. |
DiffersToSnapTarget | The instance differs from its snap target and can be fixed. |
IsBanned | The instance is banned by configuration and will be removed on fix. |
PinOverridesSemverRange | A pinned version overrides a semver range (consistent across usages). |
PinOverridesSemverRangeMismatch | A pinned version overrides a semver range (inconsistent across usages). |
SameMinorOverridesSemverRange | A same-minor policy overrides a semver range (consistent across usages). |
SameMinorOverridesSemverRangeMismatch | A same-minor policy overrides a semver range (inconsistent across usages). |
SemverRangeMismatch | The semver range format does not match the configured format. |
Unfixable (4 codes)
Issues that require manual intervention and cannot be resolved automatically.
| Status Code | Description |
|---|---|
DependsOnInvalidLocalPackage | The instance depends on a local package whose own version is invalid. |
NonSemverMismatch | Non-semver specifiers differ across instances and cannot be auto-resolved. |
SameMinorMismatch | Versions differ in a same-minor group in a way that cannot be auto-resolved. |
SameRangeMismatch | Versions differ in a same-range group in a way that cannot be auto-resolved. |
Suspect (5 codes)
Potentially problematic configurations that warrant review.
| Status Code | Description |
|---|---|
DependsOnMissingSnapTarget | The instance's snap target does not exist in the monorepo. |
InvalidLocalVersion | The local package's version field is missing or not valid semver. |
RefuseToBanLocal | Cannot ban a local package's own version field. |
RefuseToPinLocal | Cannot pin a local package's own version field. |
RefuseToSnapLocal | Cannot snap a local package's own version field. |
Conflict (6 codes)
Competing or contradictory configuration requirements that produce conflicts.
| Status Code | Description |
|---|---|
MatchConflictsWithHighestOrLowestSemver | A "match" rule conflicts with the highest/lowest semver policy. |
MatchConflictsWithLocal | A "match" rule conflicts with the local package version policy. |
MatchConflictsWithSnapTarget | A "match" rule conflicts with a snap target policy. |
MismatchConflictsWithHighestOrLowestSemver | A "mismatch" rule conflicts with the highest/lowest semver policy. |
MismatchConflictsWithLocal | A "mismatch" rule conflicts with the local package version policy. |
MismatchConflictsWithSnapTarget | A "mismatch" rule conflicts with a snap target policy. |
Summary
| Category | Count | Description |
|---|---|---|
| Valid | 13 | Compliant — no action needed |
| Fixable | 12 | Auto-correctable via syncpack fix |
| Unfixable | 4 | Requires manual resolution |
| Suspect | 5 | Potentially problematic — review recommended |
| Conflict | 6 | Contradictory configuration |
| Total | 40 |
Related
- ./glossary.md
Ignored
Source: https://syncpack.dev/semver-groups/ignored/
Instructs syncpack to completely disregard version range validation and enforcement for matched dependencies. Useful as a temporary workaround for dependencies that cannot yet conform to your standard semver rules.
Configuration Example
{
"semverGroups": [
{
"packages": ["oops-moment", "workaround"],
"isIgnored": true
}
]
}Properties
isIgnored (required)
| Type | Value |
|---|---|
| boolean | true |
Must be set to true to activate this group type. Marks all matched dependencies as excluded from semver validation.
dependencies
| Type | Default |
|---|---|
| string[] | matches all dependencies |
Names of dependencies to match. Accepts exact names and glob patterns.
Examples: ["@aws-sdk/**"], ["react", "react-dom"], ["**"]
dependencyTypes
| Type | Default |
|---|---|
| string[] | matches all locations |
Restricts matching to specific package.json property paths. Supports negation with ! prefix.
Valid values: "dev", "prod", "peer", "resolutions", "overrides", "pnpmOverrides", "local"
Example: ["!dev", "!prod"] — matches everything except dependencies and devDependencies.
specifierTypes
| Type | Default |
|---|---|
| string[] | matches all specifiers |
Restricts matching to dependencies with specific version specifier formats. Supports negation.
Example: ["!latest", "!file"] — excludes * and file: specifiers.
label
| Type | Default |
|---|---|
| string | "Version Group N" |
A short descriptive name displayed as a header in syncpack output.
packages
| Type | Default |
|---|---|
| string[] | matches all packages |
Filters by the name property in package.json files. Accepts exact names and glob patterns. Supports negation but cannot mix negated and non-negated entries in the same array.
Valid: ["@my-repo/**"], ["my-server", "my-client"] Invalid: filesystem paths, ["my-client", "!@my-repo/**"]
Notes
- Each dependency matches only the first semver group whose criteria it satisfies.
isIgnoredgroups do not enforce any range format — matched dependencies are silently skipped during all semver checks.- Use this group as a short-term workaround; prefer fixing the root cause over permanent ignore rules.
Related
- With Range
- README
semver-groups
| Name | Description | Path |
|---|---|---|
| Ignored | Instructs syncpack to completely disregard version range validation and enforcement for matched dependencies. | ignored.md |
| With Range | Enforces that all matched dependencies use a specific semantic versioning range format. | with-range.md |
With Range
Source: https://syncpack.dev/semver-groups/with-range/
Enforces that all matched dependencies use a specific semantic versioning range format. Use this to standardize whether versions are pinned exactly, use tilde (~), caret (^), or another supported format.
Configuration Example
{
"semverGroups": [
{
"dependencies": ["@foo/**"],
"range": "~"
}
]
}Properties
range (required)
| Type | Example values |
|---|---|
| string | "", "~", "^" |
Specifies the semver range format to enforce for all matched dependencies.
| Value | Meaning |
|---|---|
"" | Exact/pinned version (e.g. 1.2.3) |
"~" | Patch-level updates allowed (e.g. ~1.2.3) |
"^" | Minor-level updates allowed (e.g. ^1.2.3) |
dependencies
| Type | Default |
|---|---|
| string[] | matches all dependencies |
Names of dependencies to match. Accepts exact names and glob patterns.
Examples: ["**"], ["@aws-sdk/**"], ["react", "react-dom"]
Supported package.json locations scanned for dependency names: name, dependencies, devDependencies, overrides, peerDependencies, pnpm.overrides, resolutions.
dependencyTypes
| Type | Default |
|---|---|
| string[] | matches all locations |
Restricts matching to specific package.json property paths. Supports negation with ! prefix.
Valid values: "dev", "prod", "peer", "resolutions", "overrides", "pnpmOverrides", "local"
Example: ["!dev", "!prod"] — matches everything except dependencies and devDependencies.
specifierTypes
| Type | Default |
|---|---|
| string[] | matches all specifiers |
Filters dependencies by version specifier format. Supports negation.
Example: ["!latest", "!file"] — excludes * and file: specifiers while including all others.
label
| Type | Default |
|---|---|
| string | "Version Group N" |
A short descriptive name displayed as a header in syncpack output.
packages
| Type | Default |
|---|---|
| string[] | matches all packages |
Filters by the name property in package.json files. Accepts exact names and glob patterns. Supports negation but cannot mix negated and non-negated entries in the same array.
Valid: ["**"], ["@my-repo/**"], ["my-server", "my-client"] Invalid: filesystem paths, mixed negation arrays
Notes
- Each dependency matches only the first semver group whose criteria it satisfies — order matters.
- syncpack will report and optionally fix any dependency that does not match the configured
rangeformat. - When
dependencies,dependencyTypes,packages, andspecifierTypesare all omitted, the group matches everything — useful as a catch-all default rule at the end of thesemverGroupsarray.
Related
- Ignored
- README
ignored (Update Group)
Source: https://syncpack.dev/update-groups/ignored/
Exclude specific dependencies from registry update checks. Dependencies matching this group are marked as valid and won't be offered as update candidates, even when newer versions exist on npm.
Usage
{
"updateGroups": [
{
"dependencyTypes": ["peer"],
"isIgnored": true
}
]
}Options
| Property | Type | Required | Description |
|---|---|---|---|
isIgnored | true | Yes | Activates ignore behavior for the group |
dependencies | string[] | No | Dependency names to ignore (exact or glob, e.g. @aws-sdk/**). Defaults to all. |
dependencyTypes | string[] | No | Locations in package.json to match. Supports negation (["!dev", "!prod"]). |
specifierTypes | string[] | No | Version specifier formats to match. Supports negation (["!latest", "!file"]). |
label | string | No | Display name shown in syncpack output. |
packages | string[] | No | Monorepo package names to match (exact or glob). Supports negation. |
Notes
- Particularly useful for peer dependencies, where the consuming project controls the version range rather than the publisher
- Added in v15.1.1
Related
- targeted
- update command
Update Groups
Control how and whether dependencies receive updates from the npm registry via the update command. Groups are evaluated sequentially; the first matching group applies. The stricter of the CLI --target and group target wins.
| Name | Activation Property | Description | Path |
|---|---|---|---|
| ignored | isIgnored: true | Exclude matched dependencies from all registry update checks | ./ignored.md |
| targeted | `target: "patch" | "minor" | "latest"` |
Common Filter Properties
All update groups share these optional filter properties:
| Property | Description |
|---|---|
dependencies | Dependency names to match (exact or glob). Defaults to all. |
dependencyTypes | package.json locations to match. Supports negation. Defaults to all. |
specifierTypes | Version specifier formats to match. Supports negation. Defaults to all. |
packages | Monorepo package names to match (exact or glob). Supports negation. |
label | Display name for syncpack output. |
targeted (Update Group)
Source: https://syncpack.dev/update-groups/targeted/
Restrict the highest registry update offered for matched dependencies. The stricter of the CLI --target flag and the group's target setting wins — a group with target: "latest" cannot override a CLI invocation using --target patch.
Usage
{
"updateGroups": [
{
"label": "Restrict Storybook to patch updates",
"dependencies": ["@storybook/**"],
"target": "patch"
},
{
"label": "Minor updates only for devDependencies",
"dependencyTypes": ["dev"],
"target": "minor"
}
]
}Options
| Property | Type | Required | Description |
|---|---|---|---|
target | `"patch" \ | "minor" \ | "latest"` |
dependencies | string[] | No | Dependency names to match (exact or glob, e.g. @aws-sdk/**). Defaults to all. |
dependencyTypes | string[] | No | Locations in package.json to match. Supports negation. Defaults to all. |
specifierTypes | string[] | No | Version specifier formats to match. Supports negation. |
label | string | No | Display name for syncpack output. |
packages | string[] | No | Monorepo package names to match (exact or glob). Supports negation. Cannot mix positive and negative patterns. |
Target Values
| Value | Behavior |
|---|---|
patch | Only updates within the same major and minor (1.2.x) |
minor | Updates to higher minor or patch within the same major (1.x.x) |
latest | Any newer version including major releases |
Notes
- Added in v15.1.1
- Patterns match against
dependencies,devDependencies,overrides,peerDependencies, and pnpm/Bun catalog locations
Related
- ignored
- update command
Banned
Source: https://syncpack.dev/version-groups/banned/
Prevent dependencies you've decided should never be used. Flags them as issues requiring removal — useful for enforcing policies against legacy packages, conflicting libraries, or security/licensing violations.
Activation
Set isBanned: true in a version group entry.
Configuration Properties
| Property | Required | Description |
|---|---|---|
isBanned | Yes | Activates banned behavior for this version group. Must be true. |
dependencies | No | Array of dependency names (exact or glob patterns). Omitting matches every dependency. |
dependencyTypes | No | Restricts to specific package.json locations. Supports negation. Omitting matches all locations. |
specifierTypes | No | Filters by version specifier format. Supports negation. Omitting matches all. |
label | No | Display name in syncpack output. Defaults to "Version Group N". |
packages | No | Array matching package.json name properties (exact or glob). Supports negation but not mixing specific and negated patterns. |
dependencyTypes values
dependencies, devDependencies, overrides, peerDependencies, pnpm.overrides, resolutions
Negation example: ["!dev", "!prod"]
dependencies glob examples
["**"]— all dependencies["@aws-sdk/**"]— scoped packages["react", "react-dom"]— specific packages
packages glob examples
["**"]— all packages["@my-repo/**"]— scoped packages["my-server", "my-client"]— specific packages
Configuration Example
{
"versionGroups": [
{
"dependencies": ["never-gonna"],
"isBanned": true
}
]
}Status Codes
| Code | Category | Description |
|---|---|---|
IsBanned | Fixable | Detected a banned dependency that requires removal |
RefuseToBanLocal | Suspect | Attempted to ban a local (workspace) package |
Notes
- Local packages cannot be banned; syncpack will flag
RefuseToBanLocalinstead ofIsBanned. IsBannedis "fixable" in the sense that syncpack can report it, but the fix requires manually removing the dependency — syncpack does not auto-remove entries.
catalog
Source: https://syncpack.dev/version-groups/catalog/
Enforce dependencies to be defined in pnpm or Bun catalogs and consumed via the catalog: protocol. Establishes a single source of truth for dependency versions across the monorepo.
Usage
{
"versionGroups": [
{
"policy": "catalog"
}
]
}Options
| Property | Type | Required | Description |
|---|---|---|---|
policy | "catalog" | Yes | Activates catalog enforcement |
dependencies | string[] | No | Dependency names to match (exact or glob, e.g. @aws-sdk/**). Defaults to all. |
dependencyTypes | string[] | No | Locations in package.json to match. Supports negation. Defaults to all. |
specifierTypes | string[] | No | Version specifier formats to match. Supports negation. Defaults to all. |
label | string | No | Display name shown in output reports. |
packages | string[] | No | Monorepo package names to match (exact or glob). Supports negation. |
severity | object | No | Override alert levels for specific status codes. |
Behavior
Syncpack automatically:
- Flags dependencies using literal version specifiers instead of catalog references
- Replaces mismatched versions with appropriate
catalog:pointers duringfix - Inserts missing dependencies into the catalog
- Creates implicit default catalogs for pnpm/Bun projects
Status Codes
| Category | Examples |
|---|---|
| Valid | Dependencies correctly using catalogs |
| Fixable | NotUsingCatalog — automatically resolvable |
| Unfixable | CannotInferCatalogFile — requires manual intervention |
| Suspect | DependsOnMissingCatalogDefinition |
Notes
- Added in v15.0.0 with full support for pnpm and Bun
catalog:protocol pnpmOverridesnow reads frompnpm-workspace.yamlinstead ofpackage.json(v15 breaking change)
Related
- pinned
- snapped-to
- source
Highest Semver
Source: https://syncpack.dev/version-groups/highest-semver/
Ensures all instances of a dependency across the monorepo align to the highest semantic version found. When version discrepancies exist, syncpack standardizes them upward to the maximum installed version.
Activation
This is the default policy when no other policy property is specified in a version group. No special property is required, but you can also set preferVersion: "highestSemver" explicitly.
Configuration Properties
| Property | Required | Description |
|---|---|---|
preferVersion | No | Set to "highestSemver" to explicitly activate. This is the default behavior. |
dependencies | No | Array of dependency names (exact or glob patterns). Omitting matches every dependency. |
dependencyTypes | No | Restricts to specific package.json locations. Supports negation. Omitting matches all locations. |
specifierTypes | No | Filters by version specifier format. Supports negation. Omitting matches all. |
label | No | Display name in syncpack output. Defaults to "Version Group N". |
packages | No | Array matching package.json name properties (exact or glob). Supports negation but not mixing specific and negated patterns. |
dependencyTypes negation example
["!dev", "!prod"]Excludes devDependencies and dependencies, matching only the remaining locations.
specifierTypes negation example
["!latest", "!file"]Excludes wildcard and file-path specifiers.
Configuration Example
{
"versionGroups": [
{
"dependencies": ["react", "react-dom"],
"preferVersion": "highestSemver"
}
]
}Status Codes
| Code | Category | Description |
|---|---|---|
IsHighestOrLowestSemver | Valid | This instance already has the highest version |
SatisfiesHighestOrLowestSemver | Valid | This range satisfies the highest version |
DiffersToHighestOrLowestSemver | Fixable | Version differs from the highest; can be auto-corrected |
MatchConflictsWithHighestOrLowestSemver | Conflict | Incompatible match — requires manual intervention |
MismatchConflictsWithHighestOrLowestSemver | Conflict | Incompatible mismatch — requires manual intervention |
Ignored
Source: https://syncpack.dev/version-groups/ignored/
Completely excludes specified dependencies from all validation and synchronization checks. Useful for incrementally adopting syncpack — handle known-fixable dependencies first, then ignore the rest.
Activation
Set isIgnored: true in a version group entry.
Configuration Properties
| Property | Required | Description |
|---|---|---|
isIgnored | Yes | Activates ignored behavior. Must be true. |
dependencies | No | Array of dependency names (exact or glob patterns). Omitting matches every dependency. |
dependencyTypes | No | Restricts to specific package.json locations. Supports negation. Omitting matches all locations. |
specifierTypes | No | Filters by version specifier format. Supports negation. Omitting matches all. |
label | No | Display name in syncpack output. Defaults to "Version Group N". |
packages | No | Array matching package.json name properties (exact or glob). Supports negation but not mixing specific and negated patterns. |
dependencyTypes values
dependencies, devDependencies, overrides, peerDependencies, pnpm.overrides, resolutions
Negation example: ["!dev", "!prod"]
specifierTypes negation example
["!latest", "!file"]Configuration Example
{
"versionGroups": [
{
"dependencies": ["keep-walking"],
"isIgnored": true
}
]
}Status Codes
| Code | Category | Description |
|---|---|---|
IsIgnored | (informational) | Dependency has been excluded from all checks |
Notes
- Ignored dependencies produce no warnings or errors — they are completely invisible to syncpack.
- A common pattern is to add a catch-all
isIgnoredgroup at the bottom ofversionGroupsto silence everything not yet handled by other groups.
Lowest Semver
Source: https://syncpack.dev/version-groups/lowest-semver/
Ensures all instances of a dependency across the monorepo align to the lowest semantic version found. When version discrepancies exist, syncpack updates them down to the minimum installed version.
Activation
Set preferVersion: "lowestSemver" in a version group entry.
Configuration Properties
| Property | Required | Description |
|---|---|---|
preferVersion | Yes | Must be "lowestSemver" to activate this group type. |
dependencies | No | Array of dependency names (exact or glob patterns). Omitting matches every dependency. |
dependencyTypes | No | Restricts to specific package.json locations. Supports negation. Omitting matches all locations. |
specifierTypes | No | Filters by version specifier format. Supports negation. Omitting matches all. |
label | No | Display name in syncpack output. Defaults to "Version Group N". |
packages | No | Array matching package.json name properties (exact or glob). Supports negation but not mixing specific and negated patterns. |
dependencyTypes values
dependencies, devDependencies, overrides, peerDependencies, pnpm.overrides, resolutions
Negation example: ["!dev", "!prod"]
dependencies glob examples
["react", "react-dom"]— specific packages["@aws-sdk/**"]— scoped packages["**"]— all packages
Configuration Example
{
"versionGroups": [
{
"dependencies": ["swing", "low"],
"preferVersion": "lowestSemver"
}
]
}Status Codes
| Code | Category | Description |
|---|---|---|
IsHighestOrLowestSemver | Valid | This instance already has the lowest version |
SatisfiesHighestOrLowestSemver | Valid | This range satisfies the lowest version |
DiffersToHighestOrLowestSemver | Fixable | Version differs from the lowest; can be auto-corrected |
MatchConflictsWithHighestOrLowestSemver | Conflict | Incompatible match — requires manual intervention |
MismatchConflictsWithHighestOrLowestSemver | Conflict | Incompatible mismatch — requires manual intervention |
Pinned
Source: https://syncpack.dev/version-groups/pinned/
Locks dependencies to a specific version specifier across the entire project, regardless of what versions are used elsewhere. The pinned version can be any specifier supported by a package manager (exact version, range, tag, etc.).
Activation
Set pinVersion to the desired version specifier string.
Configuration Properties
| Property | Required | Description |
|---|---|---|
pinVersion | Yes | The version specifier to enforce. Can be any value supported by a package manager (e.g., "18.14.2", "^18.0.0", "latest"). |
dependencies | No | Array of dependency names (exact or glob patterns). Omitting matches every dependency. |
dependencyTypes | No | Restricts to specific package.json locations. Supports negation. Omitting matches all locations. |
specifierTypes | No | Filters by version specifier format. Supports negation. Omitting matches all. |
label | No | Display name in syncpack output. Defaults to "Version Group N". |
packages | No | Array matching package.json name properties (exact or glob). Supports negation but not mixing specific and negated patterns. |
dependencyTypes values
dependencies, devDependencies, overrides, peerDependencies, pnpm.overrides, resolutions
Negation example: ["!dev", "!prod"]
packages glob examples
["**"]— all packages["@my-repo/**"]— scoped packages["my-server", "my-client"]— specific packages
Configuration Example
{
"versionGroups": [
{
"dependencies": ["@types/node"],
"pinVersion": "18.14.2"
}
]
}Status Codes
| Code | Category | Description |
|---|---|---|
IsIdenticalToPin | Valid | Dependency already matches the pinned version |
DiffersToPin | Fixable | Version differs from the pin; can be auto-corrected |
PinOverridesSemverRange | Fixable | Pin overrides an existing semver range |
RefuseToPinLocal | Suspect | Attempted to pin a local (workspace) package |
Notes
pinVersionaccepts any package manager-supported specifier, not only exact versions. You can pin to ranges like"^18.0.0"or tags like"latest".- Local packages cannot be pinned; syncpack will flag
RefuseToPinLocal.
range-only
Source: https://syncpack.dev/version-groups/range-only/
Enforce consistent semver range prefixes (^, ~, exact, etc.) across matched dependencies without syncing actual version numbers. Unlike sameRange, which verifies overlapping version compatibility, this policy only validates the prefix format.
Usage
{
"versionGroups": [
{
"policy": "semverRangeOnly"
}
]
}Options
| Property | Type | Required | Description |
|---|---|---|---|
policy | "semverRangeOnly" | Yes | Activates range-only enforcement |
dependencies | string[] | No | Dependency names to match (exact or glob, e.g. @aws-sdk/**). Defaults to all. |
dependencyTypes | string[] | No | Locations in package.json to match. Supports negation. Defaults to all. |
specifierTypes | string[] | No | Version specifier formats to match. Supports negation. |
label | string | No | Display name for syncpack output. |
packages | string[] | No | Monorepo package names to match (exact or glob). Supports negation. Cannot mix positive and negative patterns. |
severity | object | No | Customize error/warning levels. Accepts "SemverRangeMismatch" and "DiffersToNpmRegistry" keys. |
Status Codes
| Category | Status |
|---|---|
| Valid | MatchesSemverGroup, IsLocalAndValid, IsIgnored |
| Fixable | SemverRangeMismatch, DiffersToNpmRegistry |
Example with semver group coordination
{
"semverGroups": [
{
"label": "Use exact versions for prod",
"dependencyTypes": ["prod"],
"range": ""
},
{
"label": "Use ~ for devDependencies",
"dependencyTypes": ["dev"],
"range": "~"
}
],
"versionGroups": [
{
"label": "Only enforce semver ranges",
"policy": "semverRangeOnly"
}
]
}Notes
- Added in v15.3.0
- When updates occur, the registry version receives the semver group's designated prefix automatically
Related
- same-range
- semver-groups
Version Groups
| Name | Description | Path |
|---|---|---|
| Banned | Prevent dependencies you've decided should never be used. | banned.md |
| catalog | Enforce dependencies to be defined in pnpm or Bun catalogs and consumed via the catalog: protocol. | catalog.md |
| Highest Semver | Ensures all instances of a dependency across the monorepo align to the highest semantic version found. | highest-semver.md |
| Ignored | Completely excludes specified dependencies from all validation and synchronization checks. | ignored.md |
| Lowest Semver | Ensures all instances of a dependency across the monorepo align to the lowest semantic version found. | lowest-semver.md |
| Pinned | Locks dependencies to a specific version specifier across the entire project. | pinned.md |
| range-only | Enforce consistent semver range prefixes without syncing actual version numbers. | range-only.md |
| Same Minor | Ensures dependencies maintain matching MAJOR.MINOR.x version numbers. | same-minor.md |
| Same Range | Ensures all instances of a dependency use semver ranges that intersect (overlap) with each other. | same-range.md |
| Snapped To | Synchronizes dependency versions by following a designated source package. | snapped-to.md |
Same Minor
Source: https://syncpack.dev/version-groups/same-minor/
Ensures that dependencies maintain matching MAJOR.MINOR.x version numbers across the monorepo while permitting different patch versions. Only ~ (tilde) and exact version specifiers are allowed, as other range types could permit installations outside the intended version band.
Activation
Set policy: "sameMinor" in a version group entry.
Configuration Properties
| Property | Required | Description |
|---|---|---|
policy | Yes | Must be "sameMinor" to activate this behavior. |
dependencies | No | Array of dependency names (exact or glob patterns). Omitting matches every dependency. |
dependencyTypes | No | Restricts to specific package.json locations. Supports negation. Omitting matches all locations. |
specifierTypes | No | Filters by version specifier format. Supports negation. Omitting matches all. |
label | No | Display name in syncpack output. Defaults to "Version Group N". |
preferVersion | No | Determines auto-resolution when instances have different MAJOR.MINOR. Either "highestSemver" or "lowestSemver". |
packages | No | Array matching package.json name properties (exact or glob). Supports negation but not mixing specific and negated patterns. |
preferVersion values
| Value | Behavior |
|---|---|
"highestSemver" | Adopts the highest MAJOR.MINOR version found |
"lowestSemver" | Adopts the lowest MAJOR.MINOR version found |
Warning: SettingpreferVersionloosens requirements and risks issues with0.x.xversions or non-compliant semantic versioning.
dependencyTypes negation example
["!dev", "!prod"]Configuration Example
{
"versionGroups": [
{
"dependencies": ["@aws-sdk/**"],
"policy": "sameMinor"
}
]
}Status Codes
| Code | Category | Description |
|---|---|---|
IsNonSemverButIdentical | Valid | Non-semver value, but identical across all instances |
SatisfiesSameMinorGroup | Valid | All instances satisfy the same minor version constraint |
DiffersToHighestOrLowestSemverMinor | Fixable | Minor version differs; can be auto-corrected |
SameMinorOverridesSemverRange | Fixable | Policy overrides an existing semver range |
SemverRangeMismatch | Fixable | Range format differs but is within the same minor |
SameMinorHasMajorMismatch | Unfixable | Instances have different major versions |
SameMinorMismatch | Unfixable | Instances have the same major but different minor versions |
NonSemverMismatch | Unfixable | Non-semver values that differ |
Notes
- This policy results in multiple package installations for each distinct patch version, which may increase node_modules complexity.
- Primarily useful when aliasing related packages (e.g.,
@aws-sdk/**) that may legitimately have different patch versions within the same minor release. - Only
~x.x.xand exactx.x.xspecifiers are valid under this policy.
Same Range
Source: https://syncpack.dev/version-groups/same-range/
Ensures all instances of a dependency across the monorepo use semver ranges that intersect (overlap) with each other. Ranges don't need to be identical — they just need to share at least one version in common. This is the most permissive version group policy in syncpack.
Activation
Set policy: "sameRange" in a version group entry.
Configuration Properties
| Property | Required | Description |
|---|---|---|
policy | Yes | Must be "sameRange" to activate this behavior. |
dependencies | No | Array of dependency names (exact or glob patterns). Omitting matches every dependency. |
dependencyTypes | No | Restricts to specific package.json locations. Supports negation. Omitting matches all locations. |
specifierTypes | No | Filters by version specifier format. Supports negation. Omitting matches all. |
label | No | Display name in syncpack output. Defaults to "Version Group N". |
packages | No | Array matching package.json name properties (exact or glob). Supports negation but not mixing specific and negated patterns. |
Intersection Examples
Overlapping ranges (valid):
| Range A | Range B | Reason |
|---|---|---|
>=1.0.0 | <=2.0.0 | Versions 1.0.0–2.0.0 satisfy both |
>=1.0.0 | ^1.2.3 | Versions 1.2.3–1.x.x satisfy both |
^1.0.0 | ~1.4.2 | Versions 1.4.2–1.4.x satisfy both |
Non-overlapping ranges (invalid):
| Range A | Range B | Reason |
|---|---|---|
>=1.0.0 | <1.0.0 | No version satisfies both |
~1.0.0 | 1.4.2 | Exact version 1.4.2 is outside ~1.0.0 |
Configuration Example
{
"versionGroups": [
{
"dependencies": ["eslint"],
"policy": "sameRange"
}
]
}Status Codes
| Code | Category | Description |
|---|---|---|
SatisfiesSameRangeGroup | Valid | All ranges intersect |
SemverRangeMismatch | Fixable | Range format issue that can be auto-corrected |
SameRangeMismatch | Unfixable | Ranges do not intersect; requires manual resolution |
Notes
sameRangeonly works with semver ranges (e.g.,^1.2.3,>=1.0.0,~2.0.0). Exact pinned versions like1.0.0and1.0.1are treated as non-overlapping ranges.- Mismatches (
SameRangeMismatch) are not auto-fixable because syncpack cannot determine which range should change. - Common use cases:
- Peer dependencies where packages legitimately need varying ranges
- Type packages (e.g.,
fooand@types/foo) on different release schedules
Snapped To
Source: https://syncpack.dev/version-groups/snapped-to/
Synchronizes dependency versions across packages by following a designated source package. Dependencies in this group adopt versions from the specified "snap" packages, ensuring consistency across a monorepo by treating one or more packages as the authoritative version source.
Activation
Set snapTo to an array of package names that serve as version sources.
Configuration Properties
| Property | Required | Description |
|---|---|---|
snapTo | Yes | Array of package.json name values to use as version sources. Multiple values create fallback packages — if a dependency isn't found in an earlier entry, the next entry is tried. |
dependencies | No | Array of dependency names (exact or glob patterns). Omitting matches every dependency. |
dependencyTypes | No | Restricts to specific package.json locations. Supports negation. Omitting matches all locations. |
specifierTypes | No | Filters by version specifier format. Supports negation. Omitting matches all. |
label | No | Display name in syncpack output. Defaults to "Version Group N". |
packages | No | Array matching package.json name properties (exact or glob). Supports negation but not mixing specific and negated patterns. |
snapTo fallback behavior
When multiple packages are listed in snapTo, syncpack looks for the dependency in each package in order and uses the first match found:
{
"snapTo": ["primary-app", "secondary-app"]
}If a dependency is not present in primary-app, its version is taken from secondary-app.
dependencyTypes negation example
["!dev", "!prod"]packages negation example
["!my-client", "!my-server"]Configuration Example
{
"versionGroups": [
{
"dependencies": ["react", "react-native"],
"snapTo": ["mobile-app"]
}
]
}Status Codes
| Code | Category | Description |
|---|---|---|
IsIdenticalToSnapTarget | Valid | Version is identical to the snap target's version |
SatisfiesSnapTarget | Valid | Version range satisfies the snap target's version |
DiffersToSnapTarget | Fixable | Version differs from the snap target; can be auto-corrected |
RefuseToSnapLocal | Suspect | Attempted to snap a local (workspace) package |
DependsOnMissingSnapTarget | Suspect | The snap target package was not found |
MatchConflictsWithSnapTarget | Conflict | Incompatible match with the snap target |
MismatchConflictsWithSnapTarget | Conflict | Incompatible mismatch with the snap target |
Notes
- The packages listed in
snapToare referenced by theirnamefield inpackage.json, not by their directory path. - Local packages cannot be snapped; syncpack will flag
RefuseToSnapLocal. - If the snap target package does not exist in the monorepo,
DependsOnMissingSnapTargetis reported.
Ban Dependency
Flag disallowed packages so they are reported as issues and must be removed.
{
"versionGroups": [
{
"label": "Ban legacy or disallowed packages",
"dependencies": ["moment", "lodash"],
"isBanned": true
}
]
}# Report banned dependencies
syncpack lint
# Verify the specific packages are flagged
syncpack lint --dependencies momentNotes
IsBannedis reported as a fixable issue, but syncpack does not auto-remove entries — manual deletion is required- Local (workspace) packages cannot be banned;
RefuseToBanLocalis reported instead - Glob patterns are supported in
dependencies(e.g.,["@deprecated/**"]) - Useful for enforcing policies against security violations, conflicting libraries, or migration targets
Basic Lint and Fix
Check for version mismatches across the monorepo and auto-fix them.
# Check all dependency types for issues
syncpack lint
# Auto-fix all identified mismatches
syncpack fix
# Preview changes without writing to disk
syncpack fix --dry-run
# After fixing, refresh lockfiles
npm installNotes
lintexits with code 1 when issues are found, making it suitable for CI gatingfixhandles version alignment only; useformatseparately for field ordering- Always run the package manager install after
fixorupdateto refresh lockfiles - Use
--dependency-types prod,devto narrow scope to specific dependency categories
CI Workflow
Run syncpack checks in CI to enforce version consistency and formatting before merging.
# .github/workflows/syncpack.yml
name: Syncpack
on: [pull_request]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- name: Lint version consistency
run: npx syncpack lint
- name: Check package.json formatting
run: npx syncpack format --check
- name: Check for outdated dependencies
run: npx syncpack update --check --target minorNotes
syncpack lintandsyncpack format --checkexit with code 1 on issues, failing the CI job automaticallysyncpack update --checkreports outdated packages without modifying files- Use
npx syncpackto run without a local install, or addsyncpackto rootdevDependenciesfor caching - Add
--dependency-types prod,devto narrow lint scope and reduce noise in CI output
Custom Types
Extend syncpack to manage non-standard package.json fields such as engines or packageManager.
{
"customTypes": {
"engines": {
"strategy": "versionsByName",
"path": "engines"
},
"packageManager": {
"strategy": "name@version",
"path": "packageManager"
}
},
"versionGroups": [
{
"label": "Sync Node.js engine requirement",
"dependencies": ["node"],
"dependencyTypes": ["engines"]
},
{
"label": "Sync packageManager field",
"dependencies": ["pnpm"],
"dependencyTypes": ["packageManager"]
}
]
}# Lint only custom types
syncpack lint --dependency-types engines,packageManagerNotes
versionsByNamestrategy reads fields like{ "node": ">=18" };name@versionreads"pnpm@9.0.0"strings- Custom type names defined in
customTypescan be referenced by name in--dependency-typesCLI option - Nested paths use dot notation (e.g.,
"some.nested.property") - Custom types work with
dependencyTypesin version groups, semver groups, and dependency groups
Format package.json
Sort and standardize package.json fields consistently across all monorepo packages.
# Apply formatting to all package.json files
syncpack format
# Check formatting without modifying files (exits with code 1 if issues found)
syncpack format --check
# Check a specific package
syncpack format --check --source 'packages/my-app/package.json'{
"indent": " ",
"sortFirst": ["name", "version", "description", "main", "scripts"],
"sortAz": ["dependencies", "devDependencies", "peerDependencies"]
}Notes
formatsorts fields and alphabetizes nested properties but does not modify version numbers--checkis suitable for CI enforcement ofpackage.jsonstyle consistencysortFirstcontrols the order of top-level fields that appear before alphabetical sortingsortAzalphabetizes the named fields; dependency objects are a common target
Minimal Config
Start with a narrow scope targeting production dependencies, then expand gradually.
{
"$schema": "./node_modules/syncpack/schema.json",
"versionGroups": [
{
"label": "Sync all production dependencies",
"dependencyTypes": ["prod"]
},
{
"label": "Ignore everything else",
"isIgnored": true
}
]
}Notes
- Place
.syncpackrc(JSON format) at the monorepo root for fastest performance - The
$schemaproperty enables IDE autocompletion - The final
isIgnoredcatch-all prevents unintended linting of unscoped dependencies - TypeScript and JavaScript config formats (
syncpack.config.ts,.syncpackrc.js) are also supported
Pin Version
Lock a specific dependency to an exact version across the entire monorepo.
{
"versionGroups": [
{
"label": "Pin @types/node to LTS version",
"dependencies": ["@types/node"],
"pinVersion": "18.14.2"
},
{
"label": "Pin all AWS SDK packages to the same range",
"dependencies": ["@aws-sdk/**"],
"pinVersion": "^3.0.0"
}
]
}# Detect and fix any deviation from the pin
syncpack fix --dependencies @types/nodeNotes
pinVersionaccepts any package manager-supported specifier: exact versions, ranges (^,~), or tags (latest)DiffersToPinis reported when a package deviates from the pinned value and can be auto-corrected bysyncpack fixPinOverridesSemverRangeis reported when the pin conflicts with an existing semver range- Local packages cannot be pinned;
RefuseToPinLocalis reported instead
samples
| Name | Description | Path |
|---|---|---|
| Ban Dependency | Flag disallowed packages so they are reported as issues and must be removed. | ban-dependency.md |
| Basic Lint and Fix | Check for version mismatches across the monorepo and auto-fix them. | basic-lint-and-fix.md |
| CI Workflow | Run syncpack checks in CI to enforce version consistency and formatting before merging. | ci-workflow.md |
| Custom Types | Extend syncpack to manage non-standard package.json fields such as engines or packageManager. | custom-types.md |
| Format package.json | Sort and standardize package.json fields consistently across all monorepo packages. | format-package-json.md |
| Minimal Config | Start with a narrow scope targeting production dependencies, then expand gradually. | minimal-config.md |
| Pin Version | Lock a specific dependency to an exact version across the entire monorepo. | pin-version.md |
| Semver Range Policy | Enforce consistent semver range formats across dependency types (e.g., ^ for devDependencies, ~ for prod). | semver-range-policy.md |
| Snap to Source | Synchronize dependency versions across packages by treating one package as the authoritative version source. | snap-to-source.md |
| Update Dependencies | Fetch newer versions from the npm registry and apply them across the monorepo. | update-dependencies.md |
| Workspace Protocol | Enforce workspace:* for all internal package references across the monorepo. | workspace-protocol.md |
Semver Range Policy
Enforce consistent semver range formats across dependency types (e.g., ^ for devDependencies, ~ for prod).
{
"semverGroups": [
{
"label": "Use ~ for production dependencies",
"dependencyTypes": ["prod"],
"range": "~"
},
{
"label": "Use ^ for dev dependencies",
"dependencyTypes": ["dev"],
"range": "^"
},
{
"label": "Pin exact versions for scoped packages",
"dependencies": ["@my-org/**"],
"range": ""
}
]
}Notes
range: ""enforces exact pinning (e.g.,1.2.3);"~"allows patch updates;"^"allows minor updates- Each dependency matches only the first semver group whose criteria it satisfies — order matters
- A catch-all group at the end (with no filters) acts as the default rule for unmatched dependencies
- Run
syncpack lintthensyncpack fixto detect and apply range corrections
Snap to Source
Synchronize dependency versions across packages by treating one package as the authoritative version source.
{
"versionGroups": [
{
"label": "Snap React versions to match mobile-app",
"dependencies": ["react", "react-dom", "react-native"],
"snapTo": ["mobile-app"]
},
{
"label": "Snap shared deps to root, fall back to web-app",
"dependencies": ["typescript", "eslint"],
"snapTo": ["root-package", "web-app"]
}
]
}Notes
snapToreferences packagenamefields frompackage.json, not directory paths- When multiple packages are listed in
snapTo, syncpack checks each in order and uses the first match found (fallback behavior) DiffersToSnapTargetis reported when versions differ and can be auto-corrected bysyncpack fix- Local packages cannot be snapped;
RefuseToSnapLocalis reported instead - If the snap target does not exist in the monorepo,
DependsOnMissingSnapTargetis reported
Update Dependencies
Fetch newer versions from the npm registry and apply them across the monorepo.
# Check what updates are available without modifying files
syncpack update --check
# Apply only patch-level updates for devDependencies
syncpack update --dependency-types dev --target patch
# Apply minor updates for a specific package
syncpack update --dependencies react --target minor
# Interactively approve each update
syncpack update --interactive
# Check for updates in a specific scope
syncpack update --check --dependencies '@aws-sdk/**'
# After updating, refresh lockfiles
pnpm installNotes
--checkexits with code 1 when outdated dependencies are found, suitable for CI--target patchupdates only within the current minor (1.2.x);--target minorupdates within the major (1.x.x);--target latestaccepts any update--interactiveallows keyboard selection of which updates to apply- Use
updateGroupsin.syncpackrcfor per-dependency update policies
Workspace Protocol
Enforce workspace:* for all internal package references across the monorepo.
{
"versionGroups": [
{
"label": "Use workspace:* protocol for local packages",
"dependencies": ["$LOCAL"],
"dependencyTypes": ["dev", "prod"],
"pinVersion": "workspace:*"
},
{
"label": "Ignore everything else",
"isIgnored": true
}
]
}Notes
$LOCALis a built-in placeholder that matches all packages defined within the monorepopinVersioncan be any specifier supported by the package manager, not only exact versions- Syncpack flags
RefuseToPinLocalif a local package is in a version group that cannot apply to it - Compatible with pnpm, Yarn, and Bun workspace protocols
CLI
syncpack の全 CLI コマンドとよく使うオプション
依存関係の一覧表示
syncpack list依存関係の一覧表示(本番依存のみ・件数順)
syncpack list --dependency-types prod --sort count依存関係の一覧表示(glob フィルター)
syncpack list --dependencies '**eslint**'
syncpack list --dependencies '@types/**'バージョン不一致の検出
syncpack lint本番・開発依存のみ検査する場合:
syncpack lint --dependency-types prod,devバージョン不一致の自動修正
syncpack fix警告:package.jsonを直接書き換える。実行後はnpm install/pnpm install等でロックファイルを更新すること。
特定の依存関係のみ修正する場合:
syncpack fix --dependencies react
syncpack fix --dependencies '@types/**'依存カテゴリを絞って修正する場合:
syncpack fix --dependency-types prod,dev変更をプレビュー(ファイルを書き換えない):
syncpack fix --dry-runpackage.json のフォーマット(整形)
syncpack format警告: package.json のフィールド順・アルファベット順を書き換える。バージョン番号は変更しない。フォーマット確認のみ(ファイルを書き換えない):
syncpack format --check特定パッケージのみ確認する場合:
syncpack format --check --source 'packages/pingu/package.json'npm レジストリから最新バージョンへ更新
syncpack update --target latest警告: npm レジストリへのネットワークアクセスが必要。package.jsonを直接書き換える。実行後はnpm install/pnpm install等でロックファイルを更新すること。
更新範囲を制限する場合:
# マイナーバージョンまで(1.x.x)
syncpack update --target minor
# パッチバージョンまで(1.2.x)
syncpack update --target patch更新の確認のみ(ファイルを書き換えない):
syncpack update --check
syncpack update --check --dependencies react
syncpack update --check --dependency-types dev --target patch特定依存関係のみ更新する場合:
syncpack update --dependencies react
syncpack update --dependencies '@aws-sdk/**'依存関係情報を JSON で出力
syncpack json特定依存関係のみ出力する場合:
syncpack json --dependencies '@aws-sdk/**'jq と組み合わせる場合:
syncpack json | jq -r '.dependencyType' | sort | uniq -cヘルプの表示
# 簡易サマリー
syncpack lint -h
# 詳細ドキュメント
syncpack lint --helplint の部分を fix / format / list / update / json に変えて各コマンドのヘルプを確認できる。
共通オプション
全コマンドで利用できる代表的なオプション:
| オプション | 説明 |
|---|---|
--config <path> | 設定ファイルのパスを指定(拡張子必須) |
--dependencies <pattern> | 依存名を glob でフィルター(! プレフィックスで除外) |
--dependency-types <types> | カテゴリを絞る(prod, dev, peer 等、カンマ区切り) |
--specifier-types <types> | バージョン指定形式でフィルター(exact, range 等) |
--source <pattern> | 対象 package.json を glob で指定 |
--source-mode <mode> | replace(デフォルト)または extend でソースパターンを制御 |
--log-levels <levels> | ログ詳細度(off, error, warn, info, debug) |
--no-ansi | カラー出力・ハイパーリンクを無効化 |
--reporter <format> | 出力形式(pretty または json NDJSON) |
Install
syncpack のインストールとセットアップ
npx で試す(インストール不要)
npx syncpack list --dependency-types prodモノレポルートで実行する。インストールなしで動作確認できる。
npm でインストール
npm install syncpack --save-devローカルインストール済みバイナリの実行
npm exec syncpack -- list設定ファイルの作成
.syncpackrc をリポジトリルートに作成する。JSON / YAML / JS / TS / MJS / CJS いずれかの形式で記述する。
# package.json の syncpack プロパティに設定を埋め込む場合は追加ファイル不要
# カスタムパスを指定する場合(拡張子必須)
syncpack list --config ./config/syncpack.jsonscripts
| Name | Description | Path |
|---|---|---|
| CLI | syncpack の全 CLI コマンドとよく使うオプション | cli.md |
| Install | syncpack のインストールとセットアップ | install.md |