Lerna: Some options of the `version` command are not work when config in the `lerna.json`

Created on 23 Apr 2019  路  3Comments  路  Source: lerna/lerna

Expected Behavior

Config the following options for version command in lerna.json should work as expected:

  • noChangelog
  • noGitTagVersion
  • noPush

Current Behavior

Some options of the version command in lerna.json do not work.
But work fine with: lerna version --conventional-commits --no-changelog --no-git-tag-version --no-push.

Steps to Reproduce (for bugs)

  1. Config the version command as the following lerna.json.
  2. Run lerna version.
  3. You will find that the changelog files generated and git tagged, committed and pushed.

lerna.json


{
  "command": {
    "version": {
      "conventionalCommits": true,
      "noChangelog": true,
      "noGitTagVersion": true,
      "noPush": true
    }
  },
  "packages": [
    "packages/*"
  ],
  "version": "1.0.0"
}

Your Environment

| Executable | Version |
| ---: | :--- |
| lerna --version | v3.13.3 |
| npm --version | v6.4.1|
| yarn --version | - |
| node --version | v10.15.3 |

| OS | Version |
| --- | --- |
| Windows 10 | 10.0.17134 Build 17134 |

Most helpful comment

Any negated boolean options are configured in lerna.json by passing false, not mutating the key name.

lerna version --conventional-commits --no-changelog --no-git-tag-version --no-push equivalent lerna.json:

{
  "command": {
    "version": {
      "conventionalCommits": true,
-      "noChangelog": true,
-      "noGitTagVersion": true,
-      "noPush": true
+      "changelog": false,
+      "gitTagVersion": false,
+      "push": false
    }
  },
  "packages": [
    "packages/*"
  ],
  "version": "1.0.0"
}

All 3 comments

Any negated boolean options are configured in lerna.json by passing false, not mutating the key name.

lerna version --conventional-commits --no-changelog --no-git-tag-version --no-push equivalent lerna.json:

{
  "command": {
    "version": {
      "conventionalCommits": true,
-      "noChangelog": true,
-      "noGitTagVersion": true,
-      "noPush": true
+      "changelog": false,
+      "gitTagVersion": false,
+      "push": false
    }
  },
  "packages": [
    "packages/*"
  ],
  "version": "1.0.0"
}

Any negated boolean options are configured in lerna.json by passing false, not mutating the key name.

Any documentation for this?

Not as such, I suppose. Sure would be nice, wouldn't it?

Was this page helpful?
0 / 5 - 0 ratings