Support for yargs 3.28.0
nexdrew opened this issue · comments
This version of yargs added better handling of ANSI escape codes, but it appears that this can adversely affect the application of colors and fonts within yargonaut - namely it removes preceding whitespace from rendered fonts (i.e. lines that begin with whitespace have their whitespace trimmed).
Here's an example. Note the first line of "Commands:", "Options:", and "Examples:" is off.
See if there's something yargonaut can do to avoid this.
@nexdrew I bet we can get the cliui ansi escape tests running without trimming the end of lines.
@bcoe I will do my best to take a look at the cliui tests tomorrow. Thanks!
@bcoe I started looking into cliui today. Something going on with left padding when ANSI escape codes are used. I'll get to the bottom of it tomorrow.
See cliui PR 13.
@nexdrew I've published a release candidate of yargs with your changes to cliui:
npm install yargs@next
Let me know if this does the trick and I'll get the version promoted to latest. I've also pulled in some parsing fixes I made, and a few other tweaks, the extra set of eyes is much appreciated.
@bcoe Yes, now that cliui@3.0.3
is being used by yargs, everything looks great! 👍 Thanks, Ben.
(Note that ANSI output works with yargs@3.28.0
and yargs@3.29.0
now, since their cliui semver dependency both resolve to cliui@3.0.3
)