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

severity

Every status code syncpack assigns has a default treatment: some can be auto-fixed and others are errors or warnings that need to be fixed manually. The optional severity map on a version group lets you override that behaviour for the dependencies the group matches.

.syncpackrc.json
{
"versionGroups": [
{
"label": "Don't auto-delete banned dependencies, fail CI instead",
"dependencies": ["lodash", "moment"],
"isBanned": true,
"severity": {
"IsBanned": "error",
},
},
{
"label": "Override syncpack's refusal to rewrite .version",
"dependencies": ["my-pkg"],
"dependencyTypes": ["local"],
"pinVersion": "1.0.0",
"severity": {
"RefuseToPinLocal": "fix",
},
},
{
"label": "Don't auto-fix missing catalog entries, warn instead",
"policy": "catalog",
"severity": {
"MissingFromCatalog": "warn",
},
},
],
}

Possible Values

Valuefixlint
"fix"Fix, exit 0Display error, exit 1
"warn"Display warning, exit 0Display warning, exit 0
"error"Do not fix, display error, exit 1Display error, exit 1

Default Values

When a status has no explicit entry in the map, syncpack falls back to a default appropriate for its kind:

Status Code TypeConfigurable?Default severity
Validnon/a
Fixableyes"fix"
Unfixableno"error"
RefuseToPinLocal / RefuseToSnapLocalyes"warn"
Suspectno"warn"
Conflict (between version + semver groups)no"error"

strict: true escalates every unconfigured Suspect default from "warn" to "error". It does not touch Fixable defaults, and explicit severity always wins: "RefuseToPinLocal": "warn" stays "warn" even under strict: true.

Excluded Values

A few status codes are deliberately not configurable:

  • DiffersToNpmRegistry is owned by updateGroups. Registry-update behaviour is tuned there, not via severity. Writing it as a severity key fails with InvalidSeverityKey.
  • Unfixable and Conflict statuses are always "error". They represent ambiguity that severity cannot resolve: syncpack has no fix to apply and silencing them would hide real problems.