Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

heads up: broken colors package #370

Closed
DanielRuf opened this issue Jan 8, 2022 · 10 comments
Closed

heads up: broken colors package #370

DanielRuf opened this issue Jan 8, 2022 · 10 comments

Comments

@DanielRuf
Copy link

webpack/webpack#15130 (comment)
Marak/colors.js#285

@agusterodin
Copy link

Same here. Console gets completely spammed indefinitely when running a project that uses this library.

@DanielRuf
Copy link
Author

@agusterodin see Marak/colors.js#285 (comment) for some possible solutions.

If needed I can prepare the relevant patch.

@rsadr0pyz
Copy link

npx marak-free

@agusterodin
Copy link

I have no idea what that package is. Potentially dangerous given how weird things have been from Marak. Use caution when running commands with npx.

@DanielRuf
Copy link
Author

@xoxys
Copy link

xoxys commented Jan 10, 2022

Other seems to replace colors with chalk e.g. aws/aws-cdk#18329 maybe that's a more reliable solution.

@DanielRuf
Copy link
Author

Other seems to replace colors with chalk e.g. aws/aws-cdk#18329 maybe that's a more reliable solution.

Not in most cases as this might lead to breaking changes. The returned strings are a bit different and parsers may behave differently. See for example cli-table/cli-table3#250 (comment)

The easier and faster fix is to pin the version since you can not remove or change already published package versions.

@xoxys
Copy link

xoxys commented Jan 10, 2022

How does pinning solve the issue in a long term? In case of a future security issue you might end up locked, no idea if and how the colors package will be maintained in the future. Trust is easy to destroy and hard to recover 🤷 Just my two cents.

@DanielRuf
Copy link
Author

How does pinning solve the issue in a long term? In case of a future security issue you might end up locked, no idea if and how the colors package will be maintained in the future

The easier and faster fix

I never said "longterm" fix. The longterm solution would be to switch to something like chalk, which is actively maintained.

Alternatively switch to the fork (DABH is one of its previous contributors and maintainers): https://www.npmjs.com/package/@dabh/colors

@xoxys
Copy link

xoxys commented Jan 10, 2022

Ok then we talk about the same thing now :) because what I said initially was

Other seems to replace colors with chalk e.g. aws/aws-cdk#18329 maybe that's a more reliable solution.

where more reliable means long term/permanent fix and not hotfix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants