-
Notifications
You must be signed in to change notification settings - Fork 508
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
deps: add deduplicate script and apply yarn-deduplicate #683
Conversation
Huh, was looking at some of my recent PRs to change deps and did see duplicates -- but Yarn suggests that can't happen -- so I was confused. Guess Yarn has some bugs around this. Thanks for the add! |
That's behaviour of yarn is indeed cryptic, but not completely senseles. |
Worth noting: |
78c4a3c
to
9fb736d
Compare
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/formium/tsdx/bi15xym0y |
Motivation: https://github.com/atlassian/yarn-deduplicate#why-is-this-necessary Benefits: Smaller & less nested node_modules less deps are loaded into node when running dev stuff It's good to run this command after every deps changes Co-Authored-By: Anton Gilgur <agilgur5@gmail.com>
- `--list --fail` will make it error out with a list of the deps that need deduplication - add yarn-deduplicate as a devDep since it's now used in a few places and would be good to cache install of it - ironically, adding it created a duplicate dep on semver, which made it fail precommit until I usd it to resolve that
9fb736d
to
b4227e5
Compare
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.
LGTM, rebased with new deps which doubled the amount of lines de-duped.
Added deduplicate
to devDeps, to precommit, and to CI using the flags suggested. CI checks that it now works and the precommit check was verified running immediately after adding to devDeps, because that ended up adding a duplicate 😅
Thanks for the optimization @Bnaya
@all-contributors please add @Bnaya for bug, code |
I've put up a pull request to add @Bnaya! 🎉 |
Motivation:
https://github.com/atlassian/yarn-deduplicate#why-is-this-necessary
Benefits:
Smaller & less nested node_modules
less deps are loaded into node when running dev stuff
It's good to run this command after every deps changes