jaredpalmer / tsdx

Zero-config CLI for TypeScript package development
https://tsdx.io
MIT License
11.26k stars 508 forks source link

deps: add deduplicate script and apply yarn-deduplicate #683

Closed Bnaya closed 4 years ago

Bnaya commented 4 years ago

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

agilgur5 commented 4 years ago

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!

Bnaya commented 4 years ago

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. There's more info and discussions around it on yarn issues and yarn-deduplicate docs

Bnaya commented 4 years ago

Worth noting: I choose to use the "fewer" strategy and not "newer"

vercel[bot] commented 4 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/formium/tsdx/bi15xym0y
✅ Preview: https://tsdx-git-fork-bnaya-deps-dedup-yarn-lock.formium.vercel.app

agilgur5 commented 4 years ago

@all-contributors please add @Bnaya for bug, code

allcontributors[bot] commented 4 years ago

@agilgur5

I've put up a pull request to add @Bnaya! :tada: