Repository navigation
Republish prereleased packages during subsequent non-prerelease publish - #1077
Conversation
|
I'll add another commit to update the docs in a few... |
|
Ready for review. Also, I should note that I'm not 100% sure whether this should be a breaking change or not. For me, it feels like a new feature (sorely needed by me), but technically it is changing the default behavior, so I checked the "major" box. |
|
Thanks @spudly, this looks great! I would even argue that this is a bugfix, because this really is what we should have been doing all along. I mean, who wouldn't want this behaviour? If one uses prereleases at all, this is definitely an improvement. |
* master: Generate root changelog in fixed mode (lerna#1078) Republish prereleased packages during subsequent non-prerelease publish (lerna#1077) fix: fail when --hoist and --yarn are used together (lerna#1063) Improve "import" edgecases + (i18n fixes + git tweaks) (lerna#1059) Warn about two or more packages having the same npm package.json name (lerna#1081)
|
🎉 |
|
Any plans to release a new version soon? I'd really love to start using this! |
|
This thread has been automatically locked because there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
When you publish with --cd-version pre-*, and then publish with --cd-version major/minor/patch, some of your packages will still have prerelease version numbers, which is not desirable.
When you're finished with all your changes, all your packages should have non-prerelease version numbers.
This change updates the code to make it release both changed and prereleased versions if the version increment is a non-prerelease increment.
Motivation and Context
Fixes #567
I manage a lerna monorepo with ~150 packages. Our current strategy for getting rid of prerelease version numbers is to run
lerna publish --force-publish=*. Because of this, we often get stuck in merge hell when merging feature branches, because that updates every package's package.json file. Making this change means having conflicts in only a few package.json files instead of hundreds.How Has This Been Tested?
Added a few unit tests and verified that they passed without breaking other unit tests.
Types of changes
Checklist: