News for hackers. Stuff that matters.
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")`.

Re:Dev corrupts NPM libs 'colors' and 'faker', breaking thou... by jwalton on Sunday January 09, 2022 @10:53PM (#29870408)
One thing worth noting is that chalk 5 is ESM only, so if you’re using commonjs, you’ll need to use chalk 4, or transpire it with Babel, or something…