-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build: lerna publish
upgrades from 0.x.y
to 1.0.0
for breaking changes
#1068
Comments
I vote for option 3, since semver says that "breaking changes" are a post-1.0.0 concept and that the implication of any 0.x.y API is that things can and will break without notice. (source) ==Added by @bajtos==
|
The only question left to answer, IMO, would be whether or not we can do option #3 based on the existing commit messages in our history, since some of them are marked with "BREAKING CHANGE" I assume there's some cutoff built in so that it knows which releases already contain those changes, but we should make sure. |
For those commits that are not published yet, let's use Option 1 to force minor upgrades to reestablish the new baseline. |
Ideally, I'd like to see Option 4: fix our tooling to release breaking changes as 0.x semver-minor, features and bugfixes as 0.x.y semver-patch versions. I filled an issue for that: conventional-changelog/conventional-changelog#294 Let's recall why we switched to
Is this goal still valid?
IIUC, this will require all our dependents to bump up semver-minor part of their Another point to consider: the section BREAKING CHANGE is parsed by the changelog generator to tell our consumers what has changed and how to upgrade. See @loopback/context@0.1.2 for an example. Even if we consider the API as not stable and allow any breaking changes in 0.x releases, I would still prefer if we can start practicing the habit of writing descriptive BREAKING CHANGE entries in our commit messages. Let's build the skill now, while we don't mind too much when we occasionally forget to describe breaking changes, so that we are ready by the time it becomes important. Having wrote that, I agree that Option 3 looks like the best workaround for short-term. Possibly related: lerna/lerna#1195 |
Here is what I have found so far:
|
I'm a +1 for writing the Breaking Change message just for changelogs which imo serves as a great reference to see what's been added to a release and often look at those for packages. That said, changing tooling seems a bit excessive imo since this is only a problem during development but depending on the effort involved it might not be too much work since we do have a while before we release out of preview and as 4.0.0 |
+1 to stay with +1 to explore a fix in |
Considering there have been more than 5 months from the last comment, and we are planning to release 4.0 GA in few months (after which lerna versioning won't be a problem anymore), I think this issue can be closed. |
Our experimental packages are using |
Submitted a PR to lerna to fix the problem: lerna/lerna#2486 |
lerna/lerna#2486 was merged and published, I am closing this issue as resolved. |
We have
conventionalCommits
configured to betrue
inlerna.json
and use0.x.y
versioning for packages. If a commit log containsBREAKING CHANGE
,lerna publish
prompts the new versions as follows:We want to upgrade from
0.<x>.<y>
to0.<x+1>.0
instead 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 CHANGE
in commit logs sincefeat(...)
will upgrade to the next minor version (0.<x>.<y>
to0.<x+1>.0
) anyway.The text was updated successfully, but these errors were encountered: