Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[@theia/console] Remove workaround that is no longer necessary #8741

Merged
merged 1 commit into from
Nov 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dependencies": {
"@theia/core": "^1.7.0",
"@theia/monaco": "^1.7.0",
"anser": "^1.4.7"
"anser": "^2.0.1"
},
"publishConfig": {
"access": "public"
Expand Down
7 changes: 2 additions & 5 deletions packages/console/src/browser/ansi-console-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@
import * as React from 'react';
import { ConsoleItem } from './console-session';
import { Severity } from '@theia/core/lib/common/severity';

// TODO: Remove this workaround once issue is fixed by anser.
// REF: https://github.com/IonicaBizau/anser/issues/52
const { ansiToHtml } = (require('anser') as import('anser').default);
import Anser = require('anser');

export class AnsiConsoleItem implements ConsoleItem {

Expand All @@ -30,7 +27,7 @@ export class AnsiConsoleItem implements ConsoleItem {
public readonly content: string,
public readonly severity?: Severity
) {
this.htmlContent = ansiToHtml(this.content, {
this.htmlContent = new Anser().ansiToHtml(this.content, {
use_classes: true,
remove_empty: true
});
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1911,10 +1911,10 @@ alphanum-sort@^1.0.1, alphanum-sort@^1.0.2:
resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3"
integrity sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=

anser@^1.4.7:
version "1.4.10"
resolved "https://registry.yarnpkg.com/anser/-/anser-1.4.10.tgz#befa3eddf282684bd03b63dcda3927aef8c2e35b"
integrity sha512-hCv9AqTQ8ycjpSd3upOJd7vFwW1JaoYQ7tpham03GJ1ca8/65rqn0RpaWpItOAd6ylW9wAw6luXYPJIyPFVOww==
anser@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/anser/-/anser-2.0.1.tgz#8d9069291fee18306ffaf2e364a690dcc8ed78ad"
integrity sha512-4g5Np4CVD3c5c/36Mj0jllEA5bQcuXF0dqakZcuHGeubBzw93EAhwRuQCzgFm4/ZwvyBMzFdtn9BcihOjnxIdQ==

ansi-colors@3.2.3:
version "3.2.3"
Expand Down