Do not increment version if a devDep + peerDep?
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 36.1k
- Forks
- 2.3k
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 50
Description
Say we have packages foo, bar, and baz, with bar and baz having foo as a peer dependency. Both of these packages also have a dev dependency for foo so that npm/yarn install/symlink everything correctly.
Now, when foo is updated and I run lerna publish, it increments the foo dev dependency in bar and baz (even when they haven't been modified), which causes a patch version to be published for these 2 packages. These patch versions are completely unnecessary.
It would be nice to avoid this if possible, possibly through a CLI flag.
Expected Behavior
N/A, not sure it's scoped.
Current Behavior
It unnecessarily releases versions when devDeps are updated.
Possible Solution
Disable through a CLI flag? Don't increment devDep if also a peerDep?
Context
This is causing unnecessary patch releases for packages.
Your Environment
| Executable | Version |
|---|---|
lerna --version |
3.10.7 |
npm --version |
6.7.0 |
yarn --version |
1.13.0 |
node --version |
10.14.1 |
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 with the lerna publish flow and the dependency/versioning logic that updates foo in bar and baz; reproduce the case where foo is both a devDependency and peerDependency. Determine the intended scope for a flag or dependency rule, then verify that unchanged packages no longer receive unnecessary patch releases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- release
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100