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.

Lerna version bumps up the version of the the packages inside the repo

See original GitHub issue

Hi,

I am using the simplest lerna.json file:

{
  "npmClient": "npm",
  "packages": ["packages/*"],
  "version": "independent"
}

When I run lerna version it bumps up the version of all the packages in my repo.

Expected Behavior

If I make changes in 1 package, it should bump up just that.

Current Behavior

It prompts me to choose version for all the packages in the repo.

Steps to Reproduce (for bugs)

lerna version

Your Environment

Executable Version
lerna --version 3.19.0
npm --version 6.13.1
node --version v12.11.1
OS Version
macOS Mojave 10.14.6

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:9
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
evocateurcommented, Jan 2, 2020

I can’t read minds, so unless there’s a reproduction (or repo) I can look at, I can’t tell you why that’s happening.

Some possible reasons:

  1. You don’t have any annotated release tags in your repo yet, and this is expected behavior.
  2. Your annotated release tags are being mangled by destructive merges or publishing on feature branches. Thus Lerna does not find any annotated release tags, and assumes everything needs to be published.
  3. The changed package is in fact a dependent of all other packages in the repo, and this behavior is expected (#707, etc, etc, etc). That is, all local dependents are automatically bumped when a local dependency changes, reflecting the automatic change to their dependency range.
  4. Spooky ghosts.

As a reminder, “independent” versioning is simply the ability to choose different versions on a package-by-package basis. It does not alter the fundamental change detection algorithm that Lerna uses, and by no means guarantees that a “single” changed package will yield only one versioned package when you run lerna version.

0reactions
github-actions[bot]commented, Jun 17, 2022

Hi Folks 👋

You will have seen in our message above that we at Nrwl are working really hard to bring the lerna repo up to date with what matters most to its community in June 2022.

As previously stated in that message, because we have not heard from the original author of this issue within the last 14 days, we are now automatically closing it.

If any users, including the original author, are still impacted by this issue then we still want to hear from you!

All we ask is that you first update to the latest lerna (5.1.4 at the time of writing) to make sure it is still reproducible, and then fill out one of our new issue templates, providing all the requested details which apply to your situation:

https://github.com/lerna/lerna/issues/new/choose

Many thanks again! 🙏


P.S. Over and above getting to grips with the repo, we have also been hard at work launching a new website, resolving all vulnerabilities, merging exciting new features and reigniting community PR contributions! 🚀

You can read our recent blog post to learn more about what we’ve been up to: https://blog.nrwl.io/lerna-5-1-new-website-new-guides-new-lerna-example-repo-distributed-caching-support-and-speed-64d66410bec7

Read more comments on GitHub >

github_iconTop Results From Across the Web

Version and Publish - Lerna
Lerna detects the current packages, identifies the current version and proposes the next one to choose. Note, you can also pass a semver...
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 >
Automatic versioning in a Lerna monorepo using Github actions
Integrate Lerna in a CI flow to automatically version and publish packages using Github actions. Tagged with lerna, javascript, npm, github.
Read more >
JavaScript Monorepos with Lerna - Semaphore CI
In fixed mode, Lerna maintains the same version for every package in the repository. Updated packages will always be bumped to the same ......
Read more >
Lerna from a DevOps point of view - LinkedIn
Setting up of a simple monorepo and Lerna; Lerna features; Package ... 2.0.0 ) lerna version major //Create a new minor version bump...
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