json-schema-to-typescript icon indicating copy to clipboard operation
json-schema-to-typescript copied to clipboard

switch to picocolors for console formatting

Open benmccann opened this issue 1 year ago • 7 comments

https://npmgraph.js.org/?q=cli-color - 14 dependencies https://npmgraph.js.org/?q=picocolors - 0 dependencies

benmccann avatar Sep 03 '24 01:09 benmccann

Thanks for the contribution!

Is there a benefit of this approach for your use case? Presumably, this would add a dependency to your project.

bcherny avatar Sep 03 '24 01:09 bcherny

It doesn't require someone to install an undocumented dependency in order to get highlighting. We could keep it as being included at runtime, but it might be nice to mention that you need to install it and this would still be a lightweight package that users are more likely to already have in their dependency tree

benmccann avatar Sep 03 '24 02:09 benmccann

Log highlighting is something you can only enable locally, in development -- I'm not sure it would make much sense in production, unless you have a use case in mind?

See https://github.com/bcherny/json-schema-to-typescript/blob/118d6a8e7a5a9397d1d390ce297f127ae674a623/src/utils.ts#L238-L241

bcherny avatar Sep 03 '24 03:09 bcherny

Yeah, I agree it doesn't really make sense in production. I've moved it back to dynamically requiring the library

benmccann avatar Sep 03 '24 15:09 benmccann

Any news?

cli-color -> es5-ext detected as a virus

https://github.com/medikoo/es5-ext/issues/186

JounQin avatar Apr 03 '25 17:04 JounQin

To be clear, there's no security concern. The package prints a message instructing users how to circumvent Russian censorship regarding the war in Ukraine using Tor and a Russian anti-virus company is flagging it as a result.

However, I still think this is a good change as it dramatically reduces the number of dev dependencies

benmccann avatar Apr 03 '25 17:04 benmccann

I know, and I don't care the background. 🤣

JounQin avatar Apr 03 '25 18:04 JounQin