-
Notifications
You must be signed in to change notification settings - Fork 995
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
Word wrap is lost when Yargs is used as ES module #2112
Comments
@jwbth this was a decision made when migrating to ESM, as the library we used for wordwrap was not yet ported to ESM, I believe we could now go back to using a library that works as expected for ES modules. Edit: one problem, is I do think the word wrap deps we relied on no longer support CJS 🤔 , perhaps we should consider switching behavior in yargs 18, such that word wrap works as expected for ESM, but not CJS. Edit 2: I believe the culprit is |
Any updates on this? I'm getting this behaviour too. ( |
Fixed by yargs/cliui#139 |
Wrapping breaks words at Nth character when Yargs is used as an ES module. As soon as I switch to CommonJS, word wrap is back to normal. That's basically all.
Yargs v17.3.1, Node v14.17.0, Windows 10.
Found a similar issue #1938, it turned out to be a problem of esbuild. It is not used in my case.
The text was updated successfully, but these errors were encountered: