Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to increase version in lerna?

Tags:

npm

lerna

I want to increase the version in my project (without publish) just by command.

So I try lerna version 1.0.1 or lerna version and the version is stay the same. (1.0.0), in lerna.json and package.json.

How to make it work? I need a lerna command that increase the version in lerna.json and package.json.

like image 302
Jon Sud Avatar asked Oct 21 '25 07:10

Jon Sud


1 Answers

lerna version 1.0.1

When run, this command does the following:

  1. Identifies packages that have been updated since the previous tagged release.
  2. Prompts for a new version.
  3. Modifies package metadata to reflect new release, running appropriate lifecycle scripts in root and per-package.
  4. Commits those changes and tags the commit.
  5. Pushes to the git remote.

So if there is no change in your package, it will not create new version.

If you really want to bump up all packages version use

--force-publish

lerna version --force-publish
like image 148
Rahul Jain Avatar answered Oct 24 '25 12:10

Rahul Jain



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!