Skip to content

Replaces kolorist with picocolors #160

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

Merged
merged 1 commit into from
Mar 23, 2025
Merged

Replaces kolorist with picocolors #160

merged 1 commit into from
Mar 23, 2025

Conversation

JoviDeCroock
Copy link
Member

50kb vs 6kb in package size so that would be a 44kb reduction for us

@rschristian
Copy link
Member

rschristian commented Mar 22, 2025

simple-code-frame relies upon it yet so there's no reduction

Sorry about that, code-frame actually comes from vite-prerender-plugin (which we can probably get away with making an optional peer dep instead?) -- I thought it was a dep here. No reason not to then.

@JoviDeCroock JoviDeCroock merged commit f97887e into main Mar 23, 2025
1 check passed
@JoviDeCroock JoviDeCroock deleted the replace-kolorist branch March 23, 2025 09:17
@marvinhagemeister
Copy link
Member

FYI: I wrote the kolorist package. There is nothing in the kolorist package that would be that big. Main difference to picocolors is that kolorist supports ansi256 + true color codes. It's not that much code and we don't use that here so all good with replacing it. We only have two simple color usages in this PR which is nothing 👍

@rschristian
Copy link
Member

rschristian commented Mar 23, 2025

FWIW I knew that at least, but Jovi is referring to the size on disk which is in fact ≈50kb: https://packagephobia.com/result?p=kolorist

Hardly a problem, though I guess it could result in a slightly smaller install (only if we fiddle with vite-prerender-plugin which also uses it of course) 🤷

@marvinhagemeister
Copy link
Member

Ah sorry my bad. Looks like it contains cjs + old style module copies.

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

Successfully merging this pull request may close these issues.

3 participants