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

0.3.7 is broken #152

Closed
zloirock opened this issue Nov 17, 2021 · 6 comments · Fixed by #158
Closed

0.3.7 is broken #152

zloirock opened this issue Nov 17, 2021 · 6 comments · Fixed by #158

Comments

@zloirock
Copy link

After updating implicit cli-table dependency from 0.3.6 that works fine to 0.3.7, I have:

image

How to reproduce it - copy https://github.com/zloirock/core-js/tree/1aaa9b1144b444e9fa1376e2f1d72c34fb99b83e and run npm run r.

zloirock added a commit to zloirock/core-js that referenced this issue Nov 17, 2021
@zloirock
Copy link
Author

@dmeeks91
Copy link

Can confirm that I am seeing the same error.

This line will throw an error if typeof stripped != "string"
Looks like PR #149 introduced a scenario where this constraint is not met. I'm guessing this is when the bug was introduced.

I haven't studied the code enough to determine if the preferred solution is to type check in the strlen utility function or revert the recently merged PR.

@pomek
Copy link

pomek commented Nov 18, 2021

I face the same issue. In my case, I decided to cast all numbers I pass into the table to strings. It helped.

pomek added a commit to ckeditor/ckeditor5-dev that referenced this issue Nov 18, 2021
Fix (env): All numbers returned by the Transifex service will be cast to strings due to an error in the `cli-package`. See: Automattic/cli-table#152. Closes ckeditor/ckeditor5#10861.
@adrianosmond
Copy link

var stripped = ("" + str).replace(code,'');
was changed to
var stripped = stripAnsi(str);

so numbers aren't getting converted to strings before stripping them. Maybe
var stripped = stripAnsi("" + str);
would be a friendlier, more backwards compatible approach?

@dreinert1994
Copy link

This problem is currently crashing my build pipeline as it is a dependency of a dependency for us. I put a PR to try and resolve the issue, hoping to get it reviewed and merged ASAP

@ljharb
Copy link
Contributor

ljharb commented Dec 6, 2021

See #160 - any inclusion of strip-ansi v6 is a breaking change, because it drops support for node < 12, and the v0.3 line claims support for node 0.2+.

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 a pull request may close this issue.

6 participants