Skip to content

Pin local versions to pnpm workspace:*

Add a Pinned Version Group so that local packages are always installed using workspace:* when they are used in devDependencies.

  • An optional label can be added to document the rule.
  • The dependencies array defines the names of the dependencies we want to target.
  • dependencyTypes results in these dependencies only being targeted by this group when they are located in devDependencies.
  • pinVersion states that these dependencies must always use workspace:*.
.syncpackrc
{
"versionGroups": [
{
"label": "Use workspace protocol when developing local packages",
"dependencies": ["@your-repo/node-client-plugin-retry", "@your-repo/node-client", "dashboard-ui"],
"dependencyTypes": ["dev"],
"pinVersion": "workspace:*"
}
]
}