PNPM workspace: protocol - wrong version rewrite
See original GitHub issueDescribe the bug
Hi, lerna-lite replaced >=
with ^
. I’m not sure if this is correct.
Reproduction
- Create a pnpm workspace with two packages (FOO, SDK) and FOO depending on SDK.
FOO: version 0.80.0, use the version constraint workspace:>=0.91.0
on SDK
SDK: version 0.91.0
- Make a change in SDK and commit
Calculate the next version with lerna publish prerelease --no-verify-access --conventional-commits --create-release github
lerna will bump the SDK version in FOO as follow.
--- "SDK": "workspace:>=0.91.0",
+++ "SDK": "workspace:^0.91.6-next.1",
Lerna config and logs
lerna.json
<!-- Please paste your `lerna.json` here -->
lerna-debug.log
<!-- If you have a `lerna-debug.log` available, please paste it here -->
<!-- Otherwise, feel free to delete this <details> block -->
Environment Info
| Executable | Version |
| ----------------- | ------- |
| `lerna --version` | 1.4.0 |
| `npm --version` | VERSION |
| `yarn --version` | VERSION |
| `node --version` | v16.14.2 |
---
OR simply run `npx lerna info` command
Used Package Manager
pnpm
Validations
- Follow our Code of Conduct
- Read the docs.
- Check that there isn’t already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion.
- The provided reproduction is a minimal reproducible example of the bug.
Issue Analytics
- State:
- Created a year ago
- Comments:11 (11 by maintainers)
Top Results From Across the Web
PNPM is not linking matched packages from workspace #2863
PNPM links version from NPM, not from WS. If to change WS package version to "0.27.17" it will link WS version.
Read more >Workspace | pnpm
Luckily, pnpm supports the workspace: protocol. When this protocol is used, pnpm will refuse to resolve to anything other than a local workspace...
Read more >Setup a Monorepo with PNPM workspaces and speed it up ...
In this article we're going to have a deep dive into setting up a new monorepo using PNPM workspaces that hosts a Remix...
Read more >pnpm/pnpm - Gitter
@batfink this error is returned by a pnpm command? ... When a workspace package references older versions of packages that are in the...
Read more >NPM vs PNPM vs Yarn - Rush.js
Yarn: a complete rewrite of the NPM tool that preserves the same installation ... to PNPM often encounter "bad packages" that need workarounds...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
No, first time in that repo https://github.com/wundergraph/wundergraph
Yes, but it doesn’t block me. I’ll fall back to
^
for now.Thanks for the words. Lerna has no support for the workspace protocol. You enabled it for me. You rock! Keep up the good work and don’t try to be a clone of Lerna. I like your methodology: Small utility functions for release and versioning.
The fix was pushed under the new release v1.5.0, thanks for the feedback