Skip to content

Commit

Permalink
Remove strip-ansi
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Oct 22, 2023
1 parent 652a269 commit a19d2a0
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
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 @@ -81,7 +81,6 @@
"set-array": "^4.0.0",
"sort-on": "^6.0.0",
"string-width": "^6.1.0",
"strip-ansi": "^7.1.0",
"strip-final-newline": "^3.0.0",
"time-resolution": "^2.0.0",
"tmp-promise": "^3.0.2",
Expand Down
4 changes: 2 additions & 2 deletions src/report/contents/handle.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import stripAnsi from 'strip-ansi'
import { stripVTControlCharacters } from 'node:util'

import { addPadding } from '../utils/indent.js'
import { wrapRows } from '../utils/wrap.js'
Expand All @@ -20,7 +20,7 @@ export const handleContent = ({ content, padding, colors }) => {
// Reporters should always assume `colors` are true, but the core remove this
// from the returned content if not.
const handleColors = (content, colors) =>
colors ? content : stripAnsi(content)
colors ? content : stripVTControlCharacters(content)

// Trim the end of each line to avoid wrapping-related visual bugs
const trimEnd = (content) => content.split('\n').map(trimEndLine).join('\n')
Expand Down

0 comments on commit a19d2a0

Please sign in to comment.