yeoman / yo

CLI tool for running Yeoman generators

Home Page:http://yeoman.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Colors.js Error Causes Incompatibility Issue With Chalk

wesleytodd opened this issue · comments

It looks like an issue with Colors.js is causing problems now that Chalk is used for cli coloring. This caused an issue with my generator which has also caused other people to chime in about different generators being broken.

In the linked PR there is a fix that works, but it would be helpful if someone from such a large project would chime in there to help force it through. Thanks!

This has nothing to do with Chalk, but rather two different versions of colors.js used in different sub dependencies, which makes it break. A good example why you should not extend built-ins. This is also the exact reason I created Chalk; it does not interfere with anything. I would recommend you switch to Chalk and help other generator authors to do the same ;)

I've said it a few times. cli-table needs to update from the really old version of colors.

Have you submitted a PR to that project to fix it? If not I will go knock it out and we can end this discussion.

On a side note, I have switched to chalk for my project. Thanks for being nice and helpful @sindresorhus!

@Marak the only problem here is colors.js, not cli-table using an outdated version. It shouldn't matter. Sub-dependencies should never interfere with each other...

Just update to the latest version of colors and it won't happen.

...until another dependency also extends String.prototype in another incompatible way...

I shouldn't have let @ronkorving or @mmalecki perform any commits to the project. The original problem of adding Object.defineProperty snuck in a year ago and was never released until people started bothering me to do another release a month or so ago.

I reverted back to where everything was and stable. Use it or don't. I don't care. I'm tired of being bothered.

huh