-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
"--include-merged-tags" not working in "lerna publish" and "lerna version" #507
Comments
can't help without a repro that I can clone, also this code came from the original Lerna code and the behavior didn't change. I would also suggest to look at Lerna's issues to see if there's anything similar. It's also not very clear if run this command from master branch or a different branch, Lerna doesn't always produce expected result when on a different branch, for example this Stack Overflow question A possible alternative is to use |
I also use Lerna, and the result of Lerna is right. Currently, there is no way to provide repo, because this is the company's private library. |
The implementation should be the same as Lerna, there aren't much differences in code from to Lerna vs Lerna-Lite (the only major difference is that Nrwl are starting to add a lot of Nx related code which will not be added to Lerna-Lite). There are Jest unit tests that exist for |
The reason is found. It is the tag pattern problem. The lerna-lite
In version lerna-lite/packages/version/src/conventional-commits/get-commits-since-last-release.ts Line 57 in 4fe2a70
For some reasons, my project cannot set tagPattern as |
in that case it must be related to issue #220 and PR #267 which changed the behavior, @StarpTech might have more details to share since he created the original PR, in any case feel free to create a Pull Request if you know how to fix it. That change was indeed only merged to Lerna-Lite, even though it was originally created in Lerna but never merged (from what I recall) The PR #267 that basically changed the behavior is calling this git command, what does that return on your side? If that returns nothing then what are your version tags look like (executing git tag --list '*@*' I guess that I could maybe add an option as you suggested, however it would probably be better if it works out of the box but still... a custom tag might be an alternative |
My usage scenario is in the company's automated process, so the tag is automatically added by the automated process, and the module name is used as the tag, such as |
@xueran
a similar issue was also opened in Lerna-Lite under #404 and we did resolve this issue with PR #415, so this should work as expected in Lerna-Lite. I've set a list of properties to be overridden, you can see the list below (the list is actually a copy of what pnpm have in their own repo)... so anyway, I just thought of letting you know in case you didn't know that this issue was actually fixed in Lerna-Lite (requires >=1.13.0) but wasn't fixed in Lerna itself (at least not yet) lerna-lite/packages/publish/src/lib/override-publish-config.ts Lines 3 to 21 in 2e9dc7a
|
@ghiscoding I don't know the repo so well. Filtering tags based on
Please provide a repro with your lerna.json, and expectations. The source is not important. |
Describe the bug
when use "lerna changed",it is found 1 package ready to publish, but when use "lerna publish" or "erna version", it is assuming all packages changed
Expectation
In the above questions,found 1 package ready to publish is right, so expect the "lerna publish" and "lerna version" behavior to be consistent with the "lerna changed" behavior
Reproduction
Git log need contain "Merge branch xxx".
The following steps may be required for problem recurrence:
Lerna config and logs
lerna.json
<!-- Please paste your `lerna.json` here -->
lerna-debug.log
Environment Info
System:
OS: macOS 11.3.1
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 126.13 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
Yarn: 1.22.19 - ~/.nvm/versions/node/v16.13.0/bin/yarn
npm: 8.1.0 - ~/.nvm/versions/node/v16.13.0/bin/npm
Browsers:
Chrome: 110.0.5481.177
Firefox: 78.9.0
Safari: 14.1
Used Package Manager
pnpm
Validations
The text was updated successfully, but these errors were encountered: