We have conventionalCommits configured to be true in lerna.json and use 0.x.y versioning for packages. If a commit log contains BREAKING CHANGE, lerna publish prompts the new versions as follows:
Changes:
- @loopback/authentication: 0.1.1 => 1.0.0
- @loopback/boot: 0.1.1 => 1.0.0
- @loopback/build: 0.1.1 => 1.0.0
- @loopback/cli: 0.1.2 => 0.1.3
- @loopback/context: 0.1.1 => 1.0.0
- @loopback/core: 0.1.1 => 0.2.0
- @loopback/example-getting-started: 0.1.1 => 0.2.0 (private)
- @loopback/example-hello-world: 0.1.1 => 0.1.2 (private)
- @loopback/example-log-extension: 0.1.1 => 0.1.2 (private)
- @loopback/example-rpc-server: 0.1.1 => 1.0.0 (private)
- @loopback/metadata: 0.1.1 => 0.1.2
- @loopback/openapi-spec-builder: 0.1.1 => 0.1.2
- @loopback/openapi-spec: 0.1.1 => 0.1.2
- @loopback/openapi-v2: 0.1.1 => 0.1.2
- @loopback/openapi-v3-types: 0.1.1 => 0.2.0
- @loopback/openapi-v3: 0.1.0 => 0.2.0
- @loopback/repository-json-schema: 0.1.1 => 0.1.2
- @loopback/repository: 0.1.1 => 1.0.0
- @loopback/rest: 0.1.1 => 1.0.0
- @loopback/testlab: 0.1.1 => 0.1.2
We want to upgrade from 0.<x>.<y> to 0.<x+1>.0 instead of 1.0.0.
To work around the issue, we have two options:
- Force all modules to be upgraded to the next minor version (
0.<x>.<y> to 0.<x+1>.0) by using lerna publish --cd-version minor. For example:
Changes:
- @loopback/authentication: 0.1.1 => 0.2.0
- @loopback/boot: 0.1.1 => 0.2.0
- @loopback/build: 0.1.1 => 0.2.0
- @loopback/cli: 0.1.2 => 0.2.0
- @loopback/context: 0.1.1 => 0.2.0
- @loopback/core: 0.1.1 => 0.2.0
- @loopback/example-getting-started: 0.1.1 => 0.2.0 (private)
- @loopback/example-hello-world: 0.1.1 => 0.2.0 (private)
- @loopback/example-log-extension: 0.1.1 => 0.2.0 (private)
- @loopback/example-rpc-server: 0.1.1 => 0.2.0 (private)
- @loopback/metadata: 0.1.1 => 0.2.0
- @loopback/openapi-spec-builder: 0.1.1 => 0.2.0
- @loopback/openapi-spec: 0.1.1 => 0.2.0
- @loopback/openapi-v2: 0.1.1 => 0.2.0
- @loopback/openapi-v3-types: 0.1.1 => 0.2.0
- @loopback/openapi-v3: 0.1.0 => 0.2.0
- @loopback/repository-json-schema: 0.1.1 => 0.2.0
- @loopback/repository: 0.1.1 => 0.2.0
- @loopback/rest: 0.1.1 => 0.2.0
- @loopback/testlab: 0.1.1 => 0.2.0
-
Disable conventionalCommits when breaking changes need to be published and manually select the versions package by package.
-
Do not use BREAKING CHANGE in commit logs since feat(...) will upgrade to the next minor version ( 0.<x>.<y> to 0.<x+1>.0) anyway.
We have
conventionalCommitsconfigured to betrueinlerna.jsonand use0.x.yversioning for packages. If a commit log containsBREAKING CHANGE,lerna publishprompts the new versions as follows:We want to upgrade from
0.<x>.<y>to0.<x+1>.0instead of1.0.0.To work around the issue, we have two options:
0.<x>.<y>to0.<x+1>.0) by usinglerna publish --cd-version minor. For example:Disable conventionalCommits when breaking changes need to be published and manually select the versions package by package.
Do not use
BREAKING CHANGEin commit logs sincefeat(...)will upgrade to the next minor version (0.<x>.<y>to0.<x+1>.0) anyway.