-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
Current Behavior
I maintain nivo, and I recently moved to pnpm and upgraded lerna to ^6.6.1.
I published a new version of the packages a day ago, but someone reported the following error:
npm ERR! code EUNSUPPORTEDPROTOCOL
npm ERR! Unsupported URL Type "workspace:": workspace:*
I use the workspace protocol for all packages defined within the repo.
I checked the content of one of the published package package.json, and found out that while dependencies (and devDependencies) versions are properly replaced:
"dependencies": {
"@nivo/scales": "0.82.0"
},
peerDependencies aren't:
"peerDependencies": {
"@nivo/core": "workspace:*"
},
I tried to run pnpm pack on one of the package to see how it was handling this, and it properly replaced the peerDependencies version: "@nivo/core": "0.82.0" while lerna didn't.
Expected Behavior
I would expect the peerDependencies to be replaced as well.
Steps to Reproduce
Please see this repository.
The command I run is pnpm lerna publish --exact, defined in the project's make file under the pkgs-publish target.
You can install the @nivo/annotations@0.82.0 package to observe the issue.
Configuration
lerna.json
{
"packages": ["packages/*", "api"],
"version": "0.82.0",
"npmClient": "pnpm",
"useWorkspaces": true
}Environment
Environment info:
System:
OS: macOS 13.2
CPU: (10) arm64 Apple M1 Max
Binaries:
Node: 18.15.0 - ~/.nvm/versions/node/v18.15.0/bin/node
npm: 9.5.0 - ~/.nvm/versions/node/v18.15.0/bin/npm
Utilities:
Git: 2.39.2 - /usr/bin/git