Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

feat: replace `strip-ansi` with `util.stripVTControlCharacters` (#5267)

Phillip Barta3c191c05d9db
diff --git a/docs/_data/usage.js b/docs/_data/usage.js
index ee13a19d..bffff313 100644
--- a/docs/_data/usage.js
+++ b/docs/_data/usage.js
@@ -1,6 +1,6 @@
'use strict';
-const stripAnsi = require('strip-ansi');
+const {stripVTControlCharacters} = require('util');
const {resolve} = require('path');
const {execSync} = require('child_process');
@@ -11,7 +11,7 @@ const flag = '--help';
* Return the output of `mocha --help` for display
*/
module.exports = () => {
- return stripAnsi(
+ return stripVTControlCharacters(
String(
execSync(`"${process.execPath}" ${executable} ${flag}`, {
cwd: resolve(__dirname, '..')
diff --git a/package-lock.json b/package-lock.json
index 29d95abc..ddf396dd 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -81,7 +81,6 @@
"rollup-plugin-polyfill-node": "^0.8.0",
"rollup-plugin-visualizer": "^5.6.0",
"sinon": "^9.0.3",
- "strip-ansi": "^6.0.0",
"unexpected": "^11.14.0",
"unexpected-eventemitter": "^2.2.0",
"unexpected-map": "^2.0.0",
diff --git a/package.json b/package.json
index f53cfb46..0d2fb66c 100644
--- a/package.json
+++ b/package.json
@@ -162,7 +162,6 @@
"rollup-plugin-polyfill-node": "^0.8.0",
"rollup-plugin-visualizer": "^5.6.0",
"sinon": "^9.0.3",
- "strip-ansi": "^6.0.0",
"unexpected": "^11.14.0",
"unexpected-eventemitter": "^2.2.0",
"unexpected-map": "^2.0.0",