ds300 / patch-package

Fix broken node modules instantly 🏃🏽‍♀️💨
MIT License
10.48k stars 295 forks source link

[Proposal] Reduce `patch-package` installation size #499

Open SukkaW opened 1 year ago

SukkaW commented 1 year ago

The installation size of the patch-package is reaching 2.33 MiB:

image

(https://packagephobia.com/result?p=patch-package)

And here is the current npm dependency graph of the patch-package:

https://npmgraph.js.org/?q=patch-package#zoom=w

image

I am wondering if we can reduce the installation size. And here is what I propose:

Together we can reduce the installation size of the patch-package by 470 KiB.

@ds300 What do you think?

sesm commented 1 year ago

I thought picocolors was a joke in response to nanocolors drama, but apparently it's now used by the author of nanocolors in his projects (yes, all 3 projects you mentioned above have the same author, so it's just a personal preference, not a statistic). Anyway, why not colorette? (the project from which nanocolors was originally copied)

SukkaW commented 1 year ago

Anyway, why not colorette? (the project from which nanocolors was originally copied)

The installation size of the colorette (17 KiB) is 3x of picocolors (5.66 KiB) while only 7% faster (https://www.npmjs.com/package/colorette?activeTab=readme#benchmarks). So I'd still prefer picocolors.

sindresorhus commented 3 months ago

Replace chalk@4.1.2 with picocolors

Relevant: https://github.com/chalk/chalk#why-not-switch-to-a-smaller-coloring-package