diff --git a/docs/_data/usage.js b/docs/_data/usage.js index ee13a19de9..bffff31362 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 e56c9eb3f4..b21c856bc5 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 bb4f2a1d45..9c4d4095e9 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",