refactor: replace strip-ansi with native node util#178
refactor: replace strip-ansi with native node util#178Namchee wants to merge 1 commit intoyargs:masterfrom
Conversation
|
Oh, I didn't know there was a routine exposed from node. (I wrote one last year!) I was bit concerned whether really does the same thing, as the node code is undocumented regex. However strip-ansi has a note:
|
|
"dependencies": {
"string-width": "^7.2.0",
"strip-ansi": "^7.1.0",
"wrap-ansi": "^9.0.0"
},So I think the suggestion was reasonable, but I don't think it is useful at this time on its own. Benjamin may have different view, so leaving PR open for second opinion. |
Thanks for looking into this! As for your concern, I have investigated this issue and I found out that it seems that the behaviour is consistent on Node 22.10 onwards |
Overview
This pull request replaces
strip-ansidependency with native Node utilstripVTControlCharactersthat do the same thing.This utility is available since Node 16.11