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

🐛 Bug: strip-ansi replacement is native functionality, not a new package #186

Open
JoshuaKGoldberg opened this issue Dec 4, 2024 · 1 comment

Comments

@JoshuaKGoldberg
Copy link

/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

But, https://github.com/es-tooling/module-replacements/blob/main/docs/modules/strip-ansi.md says:

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.

@43081j
Copy link
Contributor

43081j commented Dec 4, 2024

We probably need conditional wording here

It says it can be replaced by a package because all preferred entries so far were package replacements

This one, though, just exists in that manifest since it isn't a native replacement (it needs to work in browsers for that), but also isn't a package replacement

I think the message should probably just be reworded for now globally. Something like:

NAME should be replaced with an alternative package or native functionality

Until we can better define "node natives"

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

No branches or pull requests

2 participants