Jon Sud
Jon Sud

Reputation: 11641

How to increase version in 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.

Upvotes: 4

Views: 19372

Answers (1)

Rahul Jain
Rahul Jain

Reputation: 429

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

Upvotes: 6

Related Questions