Re:Dev corrupts NPM libs 'colors' and 'faker', breaking thou...
by folkhack on Sunday January 09, 2022 @10:03PM
(#29870102)
I use the hell out of chalk and I just want to say thank you for creating/maintaining a solid product. Seeing this is scary to us who still unfortunately have dependencies with Node/npm.
Thank you so much for what you do.
Re:Dev corrupts NPM libs 'colors' and 'faker', breaking thou...
by dimgl on Sunday January 09, 2022 @09:36PM
(#29869937)
I love Chalk! I didn't realize it came after colors. Thanks for maintaining this package.
Re:Dev corrupts NPM libs 'colors' and 'faker', breaking thou...
by pkgland on Monday January 10, 2022 @12:13AM
(#29870915)
Not a question but just want to help developers who needs it: pkg.land (beta) finds similar packages on NPM.
Here are the links for colors and faker:
https://pkg.land/package/colors (chalk is top suggestion!)
Re:Dev corrupts NPM libs 'colors' and 'faker', breaking thou...
by DandyDev on Monday January 10, 2022 @02:46PM
(#29880828)
This is very cool. Sad that it only works for NPM packages. Would love this for PyPI packages
Re:Dev corrupts NPM libs 'colors' and 'faker', breaking thou...
by feupan on Sunday January 09, 2022 @09:40PM
(#29869957)
Is a codemod available for anyone who wants to migrate?
Re:Dev corrupts NPM libs 'colors' and 'faker', breaking thou...
by junon on Sunday January 09, 2022 @10:20PM
(#29870208)
Not at the moment, but the migration should be pretty straightforward if you don't use the more elaborate color functions from `colors` (e.g. we don't have things like "zebra").
If you use `require('colors/safe')` and only use the basic colors, then Chalk is more or less a drop-in replacement.
If you use the property values (e.g. `"my string".green`) then you'll need to change that to `chalk.green("my string")`.
Just reply here and I'll see them.
[0] https://GitHub.com/chalk/chalk
[1] https://npmjs.org/package/chalk