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

🚀 Feature: Replace strip-ansi with util.stripVTControlCharacters #5265

Open
3 tasks done
JoshuaKGoldberg opened this issue Dec 4, 2024 · 0 comments · May be fixed by #5267
Open
3 tasks done

🚀 Feature: Replace strip-ansi with util.stripVTControlCharacters #5265

JoshuaKGoldberg opened this issue Dec 4, 2024 · 0 comments · May be fixed by #5267
Labels
status: in triage a maintainer should (re-)triage (review) this issue type: feature enhancement proposal

Comments

@JoshuaKGoldberg
Copy link
Member

Feature Request Checklist

Overview

I ran eslint-plugin-depend on the Mocha repo. Here's one of the outputs:

/Users/josh/repos/mocha/docs/_data/usage.js
  3:19  error  "strip-ansi" should be replaced with an alternative package. Read more here: https://github.com/es-tooling/module-replacements/blob/main/docs/modules/strip-ansi.md  depend/ban-dependencies

Perhttps://github.com/es-tooling/module-replacements/blob/main/docs/modules/strip-ansi.md:

strip-ansi is a simple utility function that can be replaced with native APIs.

...

Added in v16.11.0, util.stripVTControlCharacters can be used to strip ANSI escape codes from a string.

Suggested Solution

One less dependency is always nice IMO! Now v11 is shipped and we don't support Node <18.18, I think we can rely on node:util existing.

Proposal: let's drop the strip-ansi dependency in favor of util.stripVTControlCharacters?

Alternatives

We could stay on strip-ansi, but I see no reason to.

Additional Info

💖

@JoshuaKGoldberg JoshuaKGoldberg added status: in triage a maintainer should (re-)triage (review) this issue type: feature enhancement proposal labels Dec 4, 2024
Phillip9587 added a commit to Phillip9587/mocha that referenced this issue Dec 6, 2024
@Phillip9587 Phillip9587 linked a pull request Dec 6, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: in triage a maintainer should (re-)triage (review) this issue type: feature enhancement proposal
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant