[Feature]: Update peer dependency versions at publish time
See original GitHub issueGiven this package structure:
root
| -- packages
| -- foo
| -- bar
And bar
is a peerDependency of foo
.
When we publish a new version of foo
and bar
also update of the peerDependency in foo
to the latest version.
We should only update the peer dependency on bar
if the following conditions are met:
- When the
peerDependency
onbar
was an exact version. So"bar": "^0.14 || ^15.0.0"
should not be updated, but"bar": "0.5.6"
should be updated. Question: what about"bar": "^0.5.6"
? - When the
foo
dependency is being published. i.e. we should not force a release offoo
ifbar
is updated and we’re running in independent versioning mode. Question: or should we force it?
Edit: Is this feature already implemented? https://github.com/lerna/lerna/blob/master/src/commands/PublishCommand.js#L452
Issue Analytics
- State:
- Created 6 years ago
- Reactions:16
- Comments:24 (5 by maintainers)
Top Results From Across the Web
Understanding Peer Dependencies in JavaScript
Peer dependencies are a must-know feature that many developers overlook ... while front-end devs have been using it for the longest time.
Read more >Npm Including all range of pre-release when defining peer ...
https://classic.yarnpkg.com/en/docs/dependency-versions#toc-pre-release-tags. If a comparator includes a version with a pre-release tag it ...
Read more >Peer Dependencies | Node.js
UPDATE : npm versions 1, 2, and 7 will automatically install peerDependencies if they are not explicitly depended upon higher in the dependency ......
Read more >Updating Dependencies in a Frontend Project in 6 Easy-ish ...
Dependency warnings usually alert you to unmet peer dependencies (less likely if you are using npm >= v7) or incompatible package versions after ......
Read more >npm 7 is now generally available! - The GitHub Blog
Automatically installing peer dependencies is an exciting new feature introduced in npm 7. In previous versions of npm (4-6), peer ...
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 Free
Top 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
@evocateur If you can point me in the right direction, I’d be happy to get this feature completed. We utilize lerna heavily, and getting this right would save at least 10 hours of my life a month.
I suppose this is “awaiting implementation”?