diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eebf66b..057af10 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: - uses: actions/checkout@v1 - uses: actions/setup-node@v1 with: - node-version: '14.17' + node-version: '18.19' - name: Install dependencies run: | npm install diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index aa96b69..ac2b18c 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -15,7 +15,7 @@ jobs: - uses: actions/checkout@v1 - uses: actions/setup-node@v1 with: - node-version: '14.17' + node-version: '18.19' - name: Get current version id: version run: echo "::set-output name=version::$(jq -r .version package.json)" diff --git a/.github/workflows/release-nightly.yml b/.github/workflows/release-nightly.yml index 53778ce..b9dd048 100644 --- a/.github/workflows/release-nightly.yml +++ b/.github/workflows/release-nightly.yml @@ -31,7 +31,7 @@ jobs: - uses: actions/checkout@v1 - uses: actions/setup-node@v1 with: - node-version: '14.17' + node-version: '18.19' - name: Get (nightly) TLC run: wget https://nightly.tlapl.us/dist/tla2tools.jar -O tools/tla2tools.jar - name: Get (nightly) CommunityModules diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1b45293..6ad95c2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,7 +9,7 @@ jobs: - uses: actions/checkout@v1 - uses: actions/setup-node@v1 with: - node-version: '14.17' + node-version: '18.19' - name: Get current version id: version run: echo "::set-output name=version::$(jq -r .version package.json)" diff --git a/package-lock.json b/package-lock.json index 858f747..00256f0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "1.6.0", "license": "MIT", "dependencies": { + "@cocalc/ansi-to-react": "^7.0.0", "@microsoft/fast-components": "^2.30.6", "@microsoft/fast-react-wrapper": "^0.3.18", "@vscode/codicons": "^0.0.33", @@ -31,7 +32,7 @@ "@typescript-eslint/eslint-plugin": "^5.59.5", "@typescript-eslint/parser": "^5.59.5", "@vscode/debugadapter-testsupport": "^1.63.0", - "@vscode/test-electron": "^2.3.2", + "@vscode/test-electron": "^2.3.8", "esbuild": "^0.17.19", "eslint": "^8.40.0", "glob": "^8.1.0", @@ -54,6 +55,20 @@ "node": ">=0.10.0" } }, + "node_modules/@cocalc/ansi-to-react": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@cocalc/ansi-to-react/-/ansi-to-react-7.0.0.tgz", + "integrity": "sha512-FOuHtOnuBtqTZSPR78Zg5w86/n+WJ/AOd0Y0PTh7Sx2TttyN3KjXRD8gSD8zEp1Ewf3Qv30tP3m8kNoPQa3lTw==", + "hasInstallScript": true, + "dependencies": { + "anser": "^2.1.1", + "escape-carriage": "^1.3.0" + }, + "peerDependencies": { + "react": "^16.3.2 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.3.2 || ^17.0.0 || ^18.0.0" + } + }, "node_modules/@esbuild/android-arm": { "version": "0.17.19", "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.19.tgz", @@ -893,9 +908,9 @@ "integrity": "sha512-7gewwv69pA7gcJUhtJsru5YN7E1AwwnlBrF5mJY4R/NGInOUqOYOWHlqQwG+4AXn0nXWbcn26MHgaGI9Q26SqA==" }, "node_modules/@vscode/test-electron": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/@vscode/test-electron/-/test-electron-2.3.5.tgz", - "integrity": "sha512-lAW7nQ0HuPqJnGJrtCzEKZCICtRizeP6qNanyCrjmdCOAAWjX3ixiG8RVPwqsYPQBWLPgYuE12qQlwXsOR/2fQ==", + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/@vscode/test-electron/-/test-electron-2.3.8.tgz", + "integrity": "sha512-b4aZZsBKtMGdDljAsOPObnAi7+VWIaYl3ylCz1jTs+oV6BZ4TNHcVNC3xUn0azPeszBmwSBDQYfFESIaUQnrOg==", "dev": true, "dependencies": { "http-proxy-agent": "^4.0.1", @@ -981,6 +996,11 @@ "url": "https://github.com/sponsors/epoberezkin" } }, + "node_modules/anser": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/anser/-/anser-2.1.1.tgz", + "integrity": "sha512-nqLm4HxOTpeLOxcmB3QWmV5TcDFhW9y/fyQ+hivtDFcK4OQ+pQ5fzPnXHM1Mfcm0VkLtvVi1TCPr++Qy0Q/3EQ==" + }, "node_modules/ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", @@ -1361,6 +1381,11 @@ "node": ">=6" } }, + "node_modules/escape-carriage": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/escape-carriage/-/escape-carriage-1.3.1.tgz", + "integrity": "sha512-GwBr6yViW3ttx1kb7/Oh+gKQ1/TrhYwxKqVmg5gS+BK+Qe2KrOa/Vh7w3HPBvgGf0LfcDGoY9I6NHKoA5Hozhw==" + }, "node_modules/escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", diff --git a/package.json b/package.json index 03f4087..e67fc7d 100644 --- a/package.json +++ b/package.json @@ -494,7 +494,7 @@ "@typescript-eslint/eslint-plugin": "^5.59.5", "@typescript-eslint/parser": "^5.59.5", "@vscode/debugadapter-testsupport": "^1.63.0", - "@vscode/test-electron": "^2.3.2", + "@vscode/test-electron": "^2.3.8", "esbuild": "^0.17.19", "eslint": "^8.40.0", "glob": "^8.1.0", @@ -515,6 +515,7 @@ "moment": "^2.29.4", "react": "^18.2.0", "react-dom": "^18.2.0", + "@cocalc/ansi-to-react": "^7.0.0", "vscode-uri": "^3.0.7" } } diff --git a/src/panels/checkResultView.ts b/src/panels/checkResultView.ts index 8911ed2..c274b56 100644 --- a/src/panels/checkResultView.ts +++ b/src/panels/checkResultView.ts @@ -145,7 +145,7 @@ class CheckResultViewPanel { - + Model checking diff --git a/src/webview/checkResultView/errorTraceSection/errorTraceVariable.tsx b/src/webview/checkResultView/errorTraceSection/errorTraceVariable.tsx index cc48b1f..6b75883 100644 --- a/src/webview/checkResultView/errorTraceSection/errorTraceVariable.tsx +++ b/src/webview/checkResultView/errorTraceSection/errorTraceVariable.tsx @@ -4,6 +4,7 @@ import { CollectionValue } from '../../../model/check'; import { VSCodeTreeItem } from '../tree'; import { vscode } from '../vscode'; import { ErrorTraceSettings } from './errorTrace'; +import Ansi from '@cocalc/ansi-to-react'; interface ErrorTraceVariableI {value: CollectionValue, stateId: number, settings: ErrorTraceSettings} export const ErrorTraceVariable = React.memo(({value, stateId, settings}: ErrorTraceVariableI) => { @@ -42,7 +43,7 @@ export const ErrorTraceVariable = React.memo(({value, stateId, settings}: ErrorT
- {value.str} + {value.str}
diff --git a/src/webview/checkResultView/errorTraceSection/index.css b/src/webview/checkResultView/errorTraceSection/index.css index 6375836..130472a 100644 --- a/src/webview/checkResultView/errorTraceSection/index.css +++ b/src/webview/checkResultView/errorTraceSection/index.css @@ -108,3 +108,8 @@ .value-M { text-decoration: underline dotted var(--vscode-gitDecoration-modifiedResourceForeground); } + +code { + color: inherit; /* Reset the text color */ + background: inherit; /* Remove the gray-ish background */ +} \ No newline at end of file