lerna icon indicating copy to clipboard operation
lerna copied to clipboard

feat(version): add `from-package` bump option

Open luwes opened this issue 2 years ago • 2 comments

Thanks for this great project, we've been using Lerna w/ success over at https://github.com/muxinc/elements Just a little thing came up with versioning and automation, below explains the issue.

Description

This change adds a new positional parameter from-package to keep the versions that are already in the version's of the mono-repo packages. Definitely not set on the naming, it might be confusing with the same positional parameter in the publish command. Just wanted to create this PR and see if there's interest in this functionality? Thanks

Motivation and Context

It solves an issue where one wants to set the package versions manually locally or in a PR and then let an automated CI run the actual version command generating tags (could use --amend to reuse commit), and the changelogs and release notes. This can be used with --conventional-commits because the positional takes priority when it comes to calculating the versions.

(I guess another way to tackle this issue is to have a new CLI param that disables the recommended-bump from --conventional-commits)

How Has This Been Tested?

Yes, I ran the test commands on Mac OS 12.3, Node 16.

Types of changes

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • [x] My code follows the code style of this project.
  • [x] My change requires a change to the documentation.
  • [ ] I have updated the documentation accordingly.
  • [x] I have read the CONTRIBUTING document.
  • [x] I have added tests to cover my changes.
  • [x] All new and existing tests passed.

luwes avatar Mar 30 '22 00:03 luwes

Addresses #3138 ?

joebowbeer avatar Jun 25 '22 04:06 joebowbeer

I don't mind the reuse of from-package

In general, I favor improving lerna's ability to publish from CI/CD

joebowbeer avatar Jun 25 '22 04:06 joebowbeer