clack
clack copied to clipboard
[Request] replace `picocolors` with `styleText`
Is your feature request related to a problem? Please describe.
picocolors adds a dependency
https://github.com/bombshell-dev/clack/blob/94fee2a90148c5c09503e9b6d7179fa740f08d7e/packages/core/package.json#L53
Describe the solution you'd like
styleText is built-in to Node and would remove the need for an extra dependency: https://nodejs.org/api/util.html#utilstyletextformat-text-options
Describe alternatives you've considered N/A
Additional context N/A
its available since node 20 it seems
we don't have an engine constraint but our major users probably do. I'd be interested to know who is using clack and what their constraint is (svelte CLI? vite? )
Vite specifies "node": "^20.19.0 || >=22.12.0". Svelte CLI doesn't explicitly specify engines, but I'd be happy to require Node 20 there
In that case I'm happy 😀
Let's see what @dreyfus92 and @natemoo-re think
But seems like an easy change to me that we could do at some point
This is indeed a wise move, we should be able to pull this off once #334 and #335 are merged. The only thing that worries me is that this change requires Node.js 20+, which might affect users on older versions.
Yeah, I waited to suggest it until Node 18 was dropped from LTS for that reason. I figured most people are running somewhat modern versions for local development even if their production or CI environments are a bit older
I will start playing around with this before working on the multiline prompt @43081j 😁 Once I play enough with this i will roll back at you @benmccann 🤘🏻