How to prevent Lerna from automatically updating dependencies versions?
See original GitHub issueFor example, say that I have 2 packages configured like this:
/packages/foo/package.json
{
"name": "foo",
"version": "1.0.0"
}
/packages/bar/package.json
{
"name": "bar",
"version": "1.0.0",
"dependencies": {
"foo": "1.0.0"
}
}
I then make a breaking change to foo
and on my next lerna publish
three things will happen:
foo
version will be bumped tov2.0.0
foo
dependency inbar
will also be bumped tov2.0.0
bar
version will be bumped tov1.0.1
(due to previous point)
Is there any way to prevent the automatic bump of the foo
dependency in bar
? And, consequentially, prevent the bar
version bump to v1.0.1
(nothing changed after all).
Issue Analytics
- State:
- Created 4 years ago
- Reactions:17
- Comments:15 (2 by maintainers)
Top Results From Across the Web
How to prevent Lerna from automatically updating dependencies ...
How to prevent Lerna from automatically updating dependencies versions ? ... Open Closed Paid Out. Refresh Issue ... Overview; Backers (0); Updates ...
Read more >Does Lerna bump dependency versions when releasing new ...
Yes, if you run lerna version major _all packages in your repo will be updated to a new major version and the package.json...
Read more >lerna-update-wizard - npm Package Health Analysis - Snyk
Command line interface for simplifying the process of bulk updating dependencies across multiple Lerna or Yarn Workspace packages.
Read more >Lerna reborn — What's new in v6?. Lerna v6 is out ... - Nx Blog
As a result, with v6 all Lerna workspaces have the useNx set to true by default even if you don't have it in...
Read more >Configuration Options - Renovate Docs
Its purpose is if you want Renovate to update the version field within your package file any time it updates dependencies within. Usually...
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
package.json
already indicates what it allows to install up to:>1.0.0
- Bump everything, including major.~1.0.0
- Bump only patch versions.^1.0.0
- Bump patch and minor versions.1.0.0
- Don’t touch anythingIf
lerna
could respect these when bumping other packages (while keeping/transferring the prefix) then it would work for many of us with the same needs as @rfgamaral and allow for even more control in other situations.+1 on this issue. Would love if sibling dep version ranges were respected (ie overwritten by a new range only if the new version matches the existing range). Seems that the current behavior is redundant to the “file:path/to/package” specifier but allows no such specification of sibling dep version ranges.