Add an indication of why a package needs a new version when running `lerna version` or `lerna publish`
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 36.1k
- Forks
- 2.3k
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 50
Description
- I'd be willing to implement this feature (contributing guide)
Description
Add an indication of why a given package needs a new version number. This could take the form of a text in parenthesis showing (source change) (when the source of the package has been changed since the last version) or (dependency update) (a dependency of the package will have a new version after the command is executed)
Motivation
When running lerna version in monorepos with a lot of dependencies between packages it is easy to forget which one uses which. This can lead to incomprehension when a package you know didn't change asks for a new version number.
Suggested Implementation
This could take the form of a text in parenthesis showing (source change) (when the source of the package has been changed since the last version) or (dependency update) (a dependency of the package will have a new version after the command is executed)
Ideally the feature should be enabled/disabled with a --flag or a setting in lerna.json (and maybe enabled by default but that's not for me to decide)
if @namespace/package1 has been changed and @namespace/package2 depends on it then the stdout would look like :
yarn exec lerna version
lerna notice cli v8.1.4
lerna info versioning independent
lerna info Looking for changed packages since @imaios-js/anatomy@2.7.10
? Select a new version for @namespace/package1 (currently 1.0.6) Patch (1.0.7) (source change)
? Select a new version for @namespace/package2 (currently 1.0.6) Patch (1.0.7) (dependency update)
Changes:
- @namespace/package1: 1.0.6 => 1.0.7
- @namespace/package2: 1.0.6 => 1.0.7
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the lerna version and lerna publish command entry points, then inspect how changed packages and dependent version bumps are selected; the issue provides no file or test path. Done means package prompts or output identify source changes versus dependency updates, with behavior controllable through a flag or lerna.json setting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- cli, release
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100