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

Updated cli-progress to ^3.10.0 - Fixes zalgo issue from colors.js dependency #61

Merged
merged 4 commits into from
Jan 11, 2022
Merged

Conversation

voidgraphics
Copy link
Contributor

This packages depends on cli-progress which in turn depends on colors.js which has made a few waves on the internet the past few days. Here is a full explanation for those who have not heard.

cli-progress has made a new release which fixes the problem by forcing the colors dependency to version 1.4.0: read up on it here.

I ran the tests locally after my edit and all seemed to pass. Fingers crossed everything is OK, as I am not at all familiar with the codebase for this module. Let me know if anything looks wrong.

@Ghustavh97 Ghustavh97 self-requested a review January 10, 2022 18:39
@Ghustavh97
Copy link
Contributor

Ghustavh97 commented Jan 10, 2022

Meh, I would rather colors be removed completely since its not essential and is just there to make things look nice. Are you interested in removing it in this pull request or should I close this one and do it myself in another pull request?

example

  - console.log("\n" + colors.red("ERR: " + err.message + "\n")); // eslint-disable-line no-console
  - console.log(colors.yellow("STACK: " + err.stack + "\n")); // eslint-disable-line no-console
  +  console.log("\n" + "ERR: " + err.message + "\n"); // eslint-disable-line no-console
  +  console.log("STACK: " + err.stack + "\n"); // eslint-disable-line no-console

@Ghustavh97
Copy link
Contributor

Actually on second thought lets me switch to https://www.npmjs.com/package/ansi-colors

@voidgraphics
Copy link
Contributor Author

Okay, sounds good! Although cli-progress still needs to be upgraded to ^3.10.0, or be replaced as well.

@Ghustavh97
Copy link
Contributor

Okay, sounds good! Although cli-progress still needs to be upgraded to ^3.10.0, or be replaced as well.

I agree, v3.10.0 is a must since they also remove colors.js

@voidgraphics
Copy link
Contributor Author

That was easy enough! Everything should be ready in this PR now. Tests still pass (at least locally). Thankfully colors.js and ansi-colors have the same API.

@Ghustavh97
Copy link
Contributor

Thanks alot for this! I will fix the failing tests before releasing in another PR since im not at my main workstation right now. I think running 'npx browserslist@latest --update-db' might fix it but im not sure. I think its an GH actions issue.

@Ghustavh97 Ghustavh97 merged commit 5920f55 into oslllo:master Jan 11, 2022
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

Successfully merging this pull request may close these issues.

None yet

2 participants