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.

[Feature]: Update peer dependency versions at publish time

See original GitHub issue

Given 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 on bar 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 of foo if bar 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:open
  • Created 6 years ago
  • Reactions:16
  • Comments:24 (5 by maintainers)

github_iconTop GitHub Comments

9reactions
damienwebdevcommented, Jul 22, 2019

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

4reactions
evocateurcommented, Feb 27, 2019

I suppose this is “awaiting implementation”?

Read more comments on GitHub >

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

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