Open trivikr opened 1 month ago
Happy to take a PR switching to picocolors
(which babel etc. uses) or something else if there are better alternatives 👍
Hey @SimenB, I would like to work on this issue!
Also, I went through a bunch of relevant npm
packages (kleur
, colorette
, etc.) and I also feel like picocolors
would be the best option here, as it beats others in terms of the package size.
Sweet thanks! Looking forward to it 👍
I recommend reading this: https://github.com/chalk/chalk#why-not-switch-to-a-smaller-coloring-package
I recommend reading this: https://github.com/chalk/chalk#why-not-switch-to-a-smaller-coloring-package
Thanks for sharing the link @sindresorhus and I agree to a great extent, smaller packages somewhere fall short on providing the range of colors, something which I experienced in the linked draft PR, not to mention the package specific quirks that need to be accommodated on top of that.
Fair enough, but for jest specifically that probably doesn't apply as much:
I would like to work on this issue!
@ishon19 Are you still working on this?
My PR on changesets was just merged and released https://github.com/changesets/changesets/pull/1417, and I don't mind taking this up.
@ishon19 Are you still working on this?
My PR on changesets was just merged and released changesets/changesets#1417, and I don't mind taking this up.
Hey @trivikr, that's awesome! Sure, you can take this up if you'd like to. I was stuck on the type extraction; the yarn build
was failing as API Extractor couldn't extract picocolors
type, I created an issue with picocolors
too (linked in the draft PR) but haven't received any official response yet.
linked in the draft PR
My bad. I see that you've already posted PR on Jul 18th which I didn't know about https://github.com/jestjs/jest/pull/15197
Thank you for posting the PR, and following up with the maintainer.
My bad. I see that you've already posted PR on Jul 18th which I didn't know about #15197
Thank you for posting the PR, and following up with the maintainer.
No problem! Hoping to get a response from the maintainer soon so that we're good to go.
🚀 Feature Proposal
Replace
chalk
dependency with a lighter alternativeMotivation
Recently, the Ecosystem Performance was formed to cleanup, speedup, levelup the JavaScript Ecosystem. Socket Security team wrote a blog post about it https://socket.dev/blog/javascript-community-launches-e18e-initiative-to-improve-ecosystem-performance
On the e18e cleanup channel on Discord, multiple solutions are being discussed. One of them is to replace
chalk
withpicocolors
.I see that
jest
uses chalk https://github.com/jestjs/jest/blob/cce44d767e5e1d5c62eaaf5f93fb73748c25266b/package.json#L31And it's upgrade to chalk@5.x is blocked since it's ESM only https://github.com/jestjs/jest/pull/14253#issuecomment-1604065296
Example
No response
Pitch
Replace
chalk
with a lighter alternative likepicocolors
.