New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
peerDependencies aren't bumped #333
Comments
If we're reading a few of the comments associated to the issue you referenced, it seems that the original Lerna's maintainer (evocateur) purposely left it this way because it's a rather sensitive subject that can be interpreted differently by many users. Basically this post is explaining it broadly
and then if we scroll up a little and we click on the issue right above that post which is this issue
and we start reading what everyone are saying, we are confronted with a lot of different opinions on the subject but a lot of them seems to think that we shouldn't bump peer dependencies and that goes against your issue In summary, I'm not so sure that I should deviate from the same implementation that Lerna already does, at this point in time, the code in Lerna-Lite follows the same logic as Lerna (it's worth to mention again that evocateur himself didn't want to change/fix the issue you referenced). I think the best I could do would be to implement 1 of these possible suggestions
I would rather go with option 2 or 3 which is to add a flag (need a name) and that wouldn't be too hard to implement in Lerna-Lite because I had already extracted the deps update into a new separate function |
Thank you for the explanation. I'll come up with a proposal. |
I tested a few code change and found out that there's actually another indirect issue in both Lerna/Lerna-Lite. The way that the code is implemented is that it will only update the first dependency that it finds (following the order: 1. in other words, if we take the demo you have {
"name": "B",
"peerDependencies": {
"A": "workspace:^0.105.1"
},
"dependencies": {
"A": "workspace:^0.105.1"
}
} it would only update the first |
@StarpTech could you please review the PR #363 which will close this issue |
Yes, thank you 👍 |
) * feat(version): add `--allow-peer-dependencies-update`, closes #333
Describe the bug
Hi, I have two packages
A
,B
. B has a peerDependency toA
.After publishing
A
to0.106.0
the version independencies
was updated correctly but not for the peer-dependency.I tried it as fixed constraints
0.105.0
and without the workspace protocol. In all cases, the peer-dependency was not bumped.See lerna/lerna#955
Expectation
I'd expect that the peer dependency is updated to the next compatible version based on the version constraint.
A bumps with semver
^0.105.0
to0.105.2
=> B bumps with semver^0.105.0
=>0.105.2
✔️A bumps with semver
0.105.0
to0.106.0
=> B bumps with semver0.105.0
=>0.106.0
❌ because it is not compatibleReproduction
See above.
Lerna config and logs
lerna.json
<!-- Please paste your `lerna.json` here -->
lerna-debug.log
Environment Info
Used Package Manager
pnpm
Validations
The text was updated successfully, but these errors were encountered: