deps: add deduplicate script and apply yarn-deduplicate#683
deps: add deduplicate script and apply yarn-deduplicate#683agilgur5 merged 2 commits intojaredpalmer:masterfrom
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
agilgur5
left a comment
There was a problem hiding this comment.
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