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
Lerna publishes packages based on files that should be ignored #1508
Comments
The globs themselves should have globstars ( |
I don't get it... I'm using lerna 3.4.3 and running PS: I've updated my |
By the way, the documentation is not using globstars https://github.com/lerna/lerna/blame/master/README.md#L148 |
I don't get it... in your README the property But in you own lerna.json https://github.com/lerna/lerna/blob/master/lerna.json |
@yvele Yep, that's a feature that isn't very well documented. Basically, the scoping works at multiple levels, merged in reverse. So a root-level property will apply to every command, whereas a property scoped to |
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. |
Potentially related to #1357
Expected Behavior
Given the following commit, and the lerna config below:
When running
lerna publish --conventional-commits
, it bumpspackage1
by a minor version.Current Behavior
Given the following commit, and the lerna config below:
When running
lerna publish --conventional-commits
, it bumpspackage1
andpackage2
by a minor version, even though the only affected file inpackage2
is a*.md
file that is meant to be ignored as configured below.Possible Solution
If my understanding is correct,
lerna publish --conventional-commits
determines what packages require version bumps based on their commit message types, and then walks through changes from the last relevant tag to the current HEAD.When walking through commits, we can ignore files files as configured in the
commands.publish.ignore
setting in lerna.json. This way, packages that were not intended to receive version bumps no longer will. With some direction, I can help contribute since this would help avoid unintended publishes or git acrobatics.Steps to Reproduce (for bugs)
If the description above is unclear, I can provide a demonstration repository with reproduction steps.
lerna.json
Context
In my team, we use lerna to publish multiple packages using
independent
mode. We avoid files such as markdown, tests, and snapshots as determiners of version bumps. Though we try to keep the scopes of our commits restricted to individual packages, sometimes other files get added due to precommit linting hooks.The hope is for the
commands.publish.ignore
setting to work consistently when determining changes inlerna updated
as well as the actual packages determined to require version bumps. There are other small ways that can help make lerna's version changes more apparent to users, and I'll leave that idea in a separate ticket #1509.Your Environment
lerna --version
npm --version
yarn --version
node --version
The text was updated successfully, but these errors were encountered: