Skip to content

Commit

Permalink
feat: replace strip-ansi with util.stripVTControlCharacters (#5267)
Browse files Browse the repository at this point in the history
closes #5265
  • Loading branch information
Phillip9587 authored Jan 2, 2025
1 parent 8f1c8d8 commit 3c191c0
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/_data/usage.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const stripAnsi = require('strip-ansi');
const {stripVTControlCharacters} = require('util');
const {resolve} = require('path');
const {execSync} = require('child_process');

Expand All @@ -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, '..')
Expand Down
1 change: 0 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

1 comment on commit 3c191c0

@JoshuaKGoldberg
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, dangit, I'd meant to rename this to a docs: and missed that the commit itself still had feat:. Fortunately our next release includes another feat: anyway. So I'll just have to massage the changelog manually.

Please sign in to comment.