Skip to content

Commit ab642b6

Browse files
committed
feat: replace strip-ansi with built-in util.stripVTControlCharacters
1 parent 8d2d23f commit ab642b6

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,6 @@
402402
"dependencies": {
403403
"@octokit/types": "14.1.0",
404404
"octokit": "5.0.3",
405-
"semver": "7.7.2",
406-
"strip-ansi": "7.1.0"
405+
"semver": "7.7.2"
407406
}
408407
}

pnpm-lock.yaml

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/services/taskfile.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import * as vscode from 'vscode';
88
import { Namespace, Task } from '../models/models.js';
99
import { OutputTo, TerminalClose, TerminalPer, TreeSort, settings } from '../utils/settings.js';
1010
import { log } from '../utils/log.js';
11-
import stripAnsi from 'strip-ansi';
11+
import { stripVTControlCharacters} from 'node:util';
1212

1313
const octokit = new Octokit();
1414
type ReleaseRequest = Endpoints["GET /repos/{owner}/{repo}/releases/latest"]["parameters"];
@@ -279,13 +279,13 @@ class TaskfileService {
279279
// Listen for stderr
280280
child.stderr.setEncoding('utf8');
281281
child.stderr.on("data", data => {
282-
TaskfileService.outputChannel.append(stripAnsi(data.toString()));
282+
TaskfileService.outputChannel.append(stripVTControlCharacters(data.toString()));
283283
});
284284

285285
// Listen for stdout
286286
child.stdout.setEncoding('utf8');
287287
child.stdout.on("data", data => {
288-
TaskfileService.outputChannel.append(stripAnsi(data.toString()));
288+
TaskfileService.outputChannel.append(stripVTControlCharacters(data.toString()));
289289
});
290290

291291
// When the task finishes, print the exit code and resolve the promise

0 commit comments

Comments
 (0)