-
Notifications
You must be signed in to change notification settings - Fork 466
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
Switch to mri and yoctocolors for better performance? #253
Comments
|
Actually yoctocolors supports environment variables. They are handled in tty.WriteStream.prototype.hasColors (a built-in node module)! |
And for now we can switch to mri for smaller size because util.parseArgs is still unstable. |
Thanks for the info! Good to know that. Then I'm not against switching to yoctocolors. However, I just did some research and found that https://packagephobia.com/result?p=picocolors |
It is stable in Node.js 20, and the API isn't much different from what has been implemented in v16 and v18. Considering we will switch to it eventually, I don't feel like migrating to |
Maybe…? However yoctocolors seems to have better performance. Benchmark later :) |
Why does performance matter in the use case of |
Makes sense. Let's switch to picocolors! |
The size of `outfile.cjs` before the change: 143037 bytes Ater the change: 141514 bytes Saved 1523 bytes. I didn't choose `picocolors` despite it being more popular because it doesn't support tree-shaking and actually increases the bundle size a bit. I didn't choose `yoctocolors` because the resulting bundle is also a bit larger than the one produced by `kleur/colors`. Addressed the issue raised in #253
I eventually switched to |
I can contribute to this:)
The text was updated successfully, but these errors were encountered: