-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Description
Given the following setup and using independent versioning:
packages
| -- foo
| -- bar
// foo/package.json
{
"version" "0.2.1"
}// bar/package.json
{
"peerDependencies": {
"foo": ">=0.2.0"
},
"devDependencies": {
"foo": "^0.2.1"
}
}If you make changes in foo, and run lerna publish (patch)...
foowill updated to0.2.2, as expected.bar's dev dependency onfoowill be updated to^0.2.2, also as expected.- But
bar's peer depdenncy onfoowill be overwritten to^0.2.2, unexpectedly!
I think the peerDependencies tracking of Lerna should be disabled, since it's impossible for Lerna to know whether a change would have forced a peer dependency upgrade or not.
Peer dependencies should remain as loose as possible, with the absolute earliest accepted version that works, reducing warning noise and increasing interop. With the current logic of forcing a bump with each publish, Lerna forces dependents to upgrade even if there's no need to.
Related to #955
edmorley, qfox, renchap and selbekk
Metadata
Metadata
Assignees
Labels
No labels