Skip to content

Minimalist example of a pnpm monorepo using workspace protocol (workspace:) with syncpack to verify the versions are matching

Notifications You must be signed in to change notification settings

LudovicSterlin/pnpm-syncpack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pnpm-syncpack

Minimalist example of a pnpm monorepo using workspace protocol (workspace:) and syncpack to verify the versions are matching.

UPDATE: issue is NOW RESOLVED.

This repo was created with the only purpose to submit this issue (see JamieMason/syncpack/issues/95) in syncpack repo.

Prerequisites

  • pnpm (on MacOS we recommend brew install pnpm)
  • syncpack: npm install --global syncpack

Error

The error was about using the pnpm workspace protocol (workspace:).

How to reproduce the error

To see the error when using workspace:* as the version for locally developed packages.

  1. Set workspace to true in .syncpackrc.yaml
workspace: true

This is actually the default configurations.

  1. Run
syncpack list-mismatches

You should see the error below

- @pnpm-syncpack/shared: 1.0.0 is developed in this repo at packages/shared/package.json
  workspace:* in dependencies of packages/api/package.json
  workspace:* in devDependencies of packages/app/package.json
  1.0.0 in version of packages/shared/package.json

Fixing the error

To use pnpm workspace protocol (workspace:) with syncpack (as of today 2022/09/21).

You just have to set the workspace option to false. This can be done in the config file, like the .syncpackrc.yaml of this repo (see other options for config file in the doc).

workspace: false

About

Minimalist example of a pnpm monorepo using workspace protocol (workspace:) with syncpack to verify the versions are matching

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published