oslllo / svg-fixer

Converts SVG Strokes To Fill.
https://docs.oslllo.com/svg-fixer/master/
MIT License
208 stars 16 forks source link

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

Closed voidgraphics closed 2 years ago

voidgraphics commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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

voidgraphics commented 2 years ago

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

Ghustavh97 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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.