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 version - "%s" does not work in independent mode #185
Comments
Lerna-Lite's code is roughly the same as the original Lerna but Pull Request are welcome if you want to look at adding it. You can try the |
Correct me if I am wrong, but the --conventional-commits flag doesn't have anything to do with the commit message. It only has to do with finding out what the version should be. Even if you specify the --conventional-commits flag, the commit message still won't be in the conventional commit format, which is a bug as far as I am concerned. |
hmm what? I'm not sure that I fully understand what you mean, the Also as a reminder, I created Lerna-Lite mainly because Lerna wasn't being maintained for more than a year and I also wanted to make it smaller but even then it's mostly all the same code as the original Lerna, it was created to be a drop-in replacement... However I don't fully understand all the entire library, I also mention that in the main readme as well, so if you're asking about changing the library in a big way then I'm sorry to say that it probably will not happen. The only big feature that I added was the |
No. The commit message is created by lerna-lite, not the user. And the commit message that is created does not follow the conventional commit rules. Try it for yourself and see: mkdir monorepo
cd monorepo
npm init --yes
git init
echo "node_modules" > .gitignore
npm install @lerna-lite/cli --save-dev
npx lerna init --independent
mkdir packages/foo
touch packages/foo/main.ts
git add -A && git commit -a -m "feat: adding foo"
git remote add origin git@github.com:Zamiell/test3.git
git push --set-upstream origin main
# Somehow get lerna to pick up that something has changed ???
echo "// changes" >> packages/foo/main.ts
git add -A && git commit -a -m "fix: foo"
# This doesn't actually work for some reason, but you get the idea.
npx lerna version --conventional-commits --no-changelog
git log |
Ok I didn't understand that you were talking about and this produced the following message on the last release which follows Contentional Commits chore(release): publish new version 1.3.0 Anyway, the code is all here, so if you want to some new flag or something, you can create a PR, however make sure that it's not changing regular format. I don't wish to introduce breaking changes even if you don't like the format. I still think using |
…-message fix(version): improve default git publish message, closes #185
Hello and thanks for the software.
This issue is with respect to
lerna version
.1) Version in the Commit
Is there a way to put the version in the commit message, in independent mode? I'm aware that the "%s" and "%v" magic strings exist, but those seem to do nothing in independent mode.
2) Package in the Commit
Furthermore, I also want to put the package name of the thing that is being released in the commit message.
Thus, a magic string of "%p" would be a really nice feature and probably easy to add.
3) Conventional Commit Messages
From the source code, it seems that lerna-lite does not use conventional commit messages by default. In 2022, most of the ecosystem has embraced conventional commit messages, and even this repository uses them. Thus, I believe that lerna-lite should produce conventional commit messages by default. Specifically, it just needs to add a "chore:" prefix to the existing default, or something along those lines.
The text was updated successfully, but these errors were encountered: