You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[command:version] Version number in related peerDependencies don't update #2402
When run lerna version also respect dependencies in peerDependencies.
Current Behavior
When execution lerna version the peerDependencies don't update, but the devDependencies do.
Here a result after the bumping version of packageA and packageB from 0.0.0 to 0.0.1
Reacted by liyatang, Xiaobin Cui, Manuel Rueda, Ali Stump, Alfonso Muñoz-Pomer Fuentes, Michael Lin, Ruan Mer, Jefferson Martins de Andrade, Mark Arseneault, Matt Christ and 12 more
May be packageB really can work with packageA@^15.5.1 while recent packageA is 15.7.0 and developer don't want to enforce users to update.
Or, it can even depend on ^1 | ^2 | ^3. Such peerDependencies is quite common.
@ValeryVS true. Peer dependencies don't act the same as dev nor prod dependencies. However, in some case the peerDependencies should follow the current version. Maybe we should add a new option to the version command to cover this need? Something like --update-peer-dependencies.
Reacted by Matt Christ, Fujita Hitoshi, nishino-tsukasa, Jakub Freisler, yucj, chee, Lee Moody, Maciej Adamczak, Justin Lettau, Jimmy Wilson and 4 more
hey guys, I'm looking at implementing this (it's implemented) as an option in Lerna-Lite, it will be opt-in (disabled by default) and it will be very restrictive (it will only work with regular versions). I got an open PR here, feel free to provide feedback on it. I expect to release it within a week or so (done)
An OSS project I work on with many packages in a mono-repo with peer-deps on each other moved to strictly declaring peerDependencies recently now that most package managers properly support and respect them. Unfortunately, this results in peerDependencies being incorrect. We can manually fix the versions during our release process; however, it makes lerna's version command not all that useful since the commit and tag would not include this change.
Experiencing the same issue in the Lingui project. This project contains a couple of packages and some of them have peer dependencies to others. As a result, the lerna version command doesn't update these dependencies
Activity
ValeryVS commentedon Jul 22, 2020
It isn't always the right way.
May be
packageBreally can work withpackageA@^15.5.1while recentpackageAis15.7.0and developer don't want to enforce users to update.Or, it can even depend on
^1 | ^2 | ^3. Such peerDependencies is quite common.arsnl commentedon Jan 13, 2021
@ValeryVS true. Peer dependencies don't act the same as dev nor prod dependencies. However, in some case the peerDependencies should follow the current version. Maybe we should add a new option to the version command to cover this need? Something like
--update-peer-dependencies.ghiscoding commentedon Oct 5, 2022
hey guys,
I'm looking at implementing this(it's implemented) as an option in Lerna-Lite, it will be opt-in (disabled by default) and it will be very restrictive (it will only work with regular versions). I got an open PR here, feel free to provide feedback on it. I expect to release it within a week or so (done)It will update (bump) regular semver like these
1.2.3^1.2.3~1.2.3^1.4.0-alpha.0workspace:^1.2.3but it won't update things like
>=1.0.0>=1.0.0 <2.0.0^1 | ^2 | ^3RS-Sautter commentedon Nov 3, 2022
@JamesHenry can we add this feature also to lerna? If necessary I could help with that.
runspired commentedon Nov 8, 2022
An OSS project I work on with many packages in a mono-repo with peer-deps on each other moved to strictly declaring peerDependencies recently now that most package managers properly support and respect them. Unfortunately, this results in peerDependencies being incorrect. We can manually fix the versions during our release process; however, it makes lerna's
versioncommand not all that useful since the commit and tag would not include this change.andrii-bodnar commentedon May 4, 2023
Experiencing the same issue in the Lingui project. This project contains a couple of packages and some of them have peer dependencies to others. As a result, the
lerna versioncommand doesn't update these dependenciesRS-Sautter commentedon Jul 5, 2023
ping, any news? Would a MR be accepted?