[command:version] Version number in related peerDependencies don't update
See original GitHub issueWhen 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
packageA
{
"name": "packageA",
"version": "0.0.1",
}
packageB
{
"name": "packageB",
"version": "0.0.1",
"peerDependencies": {
"@scope/packageA": "0.0.0"
},
"devDependencies": {
"@scope/packageA": "0.0.1"
}
}
Expected Behavior
packageA
{
"name": "packageA",
"version": "0.0.1",
}
packageB
{
"name": "packageB",
"version": "0.0.1",
"peerDependencies": {
"@scope/packageA": "0.0.1"
},
"devDependencies": {
"@scope/packageA": "0.0.1"
}
}
Issue Analytics
- State:
- Created 4 years ago
- Reactions:17
- Comments:5
Top Results From Across the Web
Feature: allow updating peerDependencies in version ...
Lerna should allow updating peerDependencies in the version/publish command, cf the behaviour in previous versions (we were using 2.6.0) ...
Read more >How to fix npm dependency hell - Sylhare's blog
This way you'll be able to update the dependency to the latest version that is not a breaking change, run the tests, build...
Read more >How do I override nested NPM dependency versions?
Adding phantomjs to my package's dependencies first has no effect; both versions are installed and grunt-contrib-jasmine still uses the older versions (see: ...
Read more >npm Peer Dependencies - JavaScript inDepth
Peer Dependencies are used to specify that our package is compatible with a specific version of an npm package. Good examples are Angular...
Read more >How to Fix NPM Package Does Not Satisfy Its Siblings ...
The solution is to either update or uninstall the modules. Afterwards, you can run the install command for the actual package again and...
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 FreeTop 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
Top GitHub Comments
@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
.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.