-
Notifications
You must be signed in to change notification settings - Fork 205
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
Chore: Add lerna as peer dependency #2441
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2441 +/- ##
==========================================
- Coverage 80.63% 80.56% -0.08%
==========================================
Files 69 69
Lines 5680 5680
Branches 1277 1277
==========================================
- Hits 4580 4576 -4
- Misses 718 719 +1
- Partials 382 385 +3 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should refactor a little bit so that all users of the all-contributors plugin don''t need to install lerna
In both places it could be an optionalPeerDep probably
@@ -79,7 +79,8 @@ | |||
"url-join": "^4.0.0" | |||
}, | |||
"peerDependencies": { | |||
"typescript": ">=2.7" | |||
"typescript": ">=2.7", | |||
"lerna": "^7.1.4" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm it probably doesn't make sense for core to depend on lerna...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only the all contributors plugin depends on that.
I think we should either:
- move that function into a dep
- just copy the function into the 2 places we use it (npm and all-contributors)
I think 2 is better. then we can say lerna is an optionalPeerDep of the all-contributors plugin
Sorry for not getting back to this sooner, I've not forgotten about it got moved down the priority list I'm afraid. I'll try and make the refactors as per your feedback asap @hipstersmoothie. 👍 |
I completely understand :D |
What Changed
Added lerna as a peerDependency to auto and auto/npm as they both internally call lerna with npx.
Why
Calling lerna with npx without a local copy installed could cause bugs as it will either pull the latest version from the npm registry or use a locally cached version. By setting peer dependencies lerna will either be installed when auto is installed or show a warning telling the user that lerna is a missing dependency.
@hipstersmoothie not 💯 sure about the version of lerna to support here. Do we want to widen the semver range for something like
>6.0.0 <8.0.0
? I'm also unsure which type of change this should be.Todo:
Change Type
Indicate the type of change your pull request is:
documentation
patch
minor
major