Skip to content
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

Replace chalk with picocolors #1340

Open
Fuzzyma opened this issue Nov 19, 2024 · 2 comments
Open

Replace chalk with picocolors #1340

Fuzzyma opened this issue Nov 19, 2024 · 2 comments

Comments

@Fuzzyma
Copy link

Fuzzyma commented Nov 19, 2024

Describe the feature you'd like:

I want to propose to replace the chalk dependency with the smaller and faster picocolors package.
As part of the e18e initiative (ecosystem cleanup), we try to reduce the burden of old or big libs and modernize the ecosystem.
Considering that chalk is used for exactly one style in the console output in this lib, it might be worthwhile to think about geeting rid of it at all :D.
chalk alone accounted for a whopping 907.93 GB of traffic last month whenever it got installed as part of dom-testing-library.
The tar size of 13.40Kb doesn't seem much (dom-testing-librarys tar is 434.14KB) but every bit counts :).

Suggested implementation:

Either use picocolor or inline the one styling you have.
In your case it would be a full drop-in repacement.

I would be willing to create the PR for you

Describe alternatives you've considered:

Teachability, Documentation, Adoption, Migration Strategy:

@MatanBobi
Copy link
Member

Thanks @Fuzzyma for raising this.
I'm open to reviewing a PR that either removes the library or replaces it with picocolors :)

@Fuzzyma
Copy link
Author

Fuzzyma commented Nov 19, 2024

@MatanBobi there you go #1341

I wasnt able to run the tests because I hit an error. Details in the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants