lerna: Lerna publish flag `--conventional-commits` doesn't work with `--npm-tag` flag

Expected Behavior

I have one project that have one trunk branch to release with dist-tag latest. For next major version, there is another branch task/v3 to release with dist-tag v3.

The script is like below:

lerna publish --conventional-commits --exact --npm-tag=v3

It is expected to publish all packages with conventional-commits and on dist-tag v3.

Current Behavior

The script failed with message like below:

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! publish:v3: lerna publish --conventional-commits --exact --npm-tag=v3 npm ERR! Exit status 1

Possible Solution

It looks that the two flags --conventional-commits and --npm-tag are not compatible.

Your Environment

Executable Version
lerna --version 3.0.0-beta.21
npm --version 5.6.0
node --version v6.13.0
OS Version
macOS Sierra 10.13.5

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 15 (7 by maintainers)

Most upvoted comments

Would you believe I had no tests around the presence or absence of publishConfig.tag?

Narrator: He didn’t.

Coincidentally, I’m working on making --npm-tag override publishConfig.tag when it is not latest, which I think makes more sense, especially in the --canary case.

So I tried it again without --conventional-commits at all and it’s still not taking it. I’ll create a separate issue if I can narrow it down any further so as not to hijack this one.