question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PNPM workspace: protocol - wrong version rewrite

See original GitHub issue

Describe the bug

Hi, lerna-lite replaced >= with ^. I’m not sure if this is correct.

Reproduction

  1. 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

  1. 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

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
StarpTechcommented, Jun 2, 2022

Question, are you migrating from Lerna? Was that command working in Lerna?

No, first time in that repo https://github.com/wundergraph/wundergraph

Would you like to take a look and submit a PR? I’m still busy looking at how to deal with the other open PR to update pnpm lock file.

Yes, but it doesn’t block me. I’ll fall back to ^ for now.

As a side note and reminder, I’m just a regular developer who created this Lerna-Lite fork from Lerna and I don’t fully understand all of Lerna’s code, though I’m trying to help the community as much as I can with this fork. Thanks for all the useful feedback you provided already and patience as well

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.

0reactions
ghiscodingcommented, Jun 8, 2022

The fix was pushed under the new release v1.5.0, thanks for the feedback

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found