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

Pin local versions to pnpm workspace:*

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:*.
{
"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:*"
}
]
}

The above example can be shortened: The $LOCAL keyword is a helper to avoid writing out the names of every local package.

"dependencies": [
"$LOCAL"
"@your-repo/node-client-plugin-retry",
"@your-repo/node-client",
"dashboard-ui"
],