Skip to content

Commit 98b9a6d

Browse files
authored
deps: ui: minor updates, remove react-syntax-highlighter (#7162)
* deps: remove react-syntax-highlighter * deps: yarn upgrade
1 parent dd9f6b4 commit 98b9a6d

File tree

4 files changed

+3148
-3123
lines changed

4 files changed

+3148
-3123
lines changed

internal/web/ui/package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,22 @@
22
"name": "grafana-agent",
33
"private": true,
44
"dependencies": {
5+
"@babel/helpers": "^7.26.10",
6+
"@babel/runtime": "^7.26.10",
57
"@fortawesome/fontawesome-svg-core": "^6.4.0",
68
"@fortawesome/free-solid-svg-icons": "^6.4.0",
79
"@fortawesome/react-fontawesome": "^0.2.0",
10+
"@svgr/webpack": "^8.0.1",
811
"d3": "^7.8.4",
912
"d3-dag": "^0.11.5",
1013
"d3-zoom": "^3.0.0",
1114
"normalize.css": "^8.0.1",
15+
"postcss": "^8.4.31",
1216
"react": "^18.2.0",
1317
"react-dom": "^18.2.0",
1418
"react-router-dom": "^6.11.1",
15-
"react-syntax-highlighter": "^15.5.0",
16-
"typescript": "^5.0.4"
19+
"typescript": "^5.0.4",
20+
"ws": "^8.18.1"
1721
},
1822
"devDependencies": {
1923
"@types/d3": "^7.4.0",

internal/web/ui/src/features/component/ComponentBody.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
import React, { Fragment } from 'react';
2-
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
1+
import { Fragment } from 'react';
32

43
import { riverStringify } from '../river-js/stringify';
54

6-
import { style } from './style';
75
import Table from './Table';
86
import { PartitionedBody } from './types';
97

@@ -24,11 +22,7 @@ const ComponentBody = ({ partition }: ComponentBodyProps) => {
2422
<tr key={name}>
2523
<td className={styles.nameColumn}>{name}</td>
2624
<td>
27-
<pre className={styles.pre}>
28-
<SyntaxHighlighter language="javascript" style={style}>
29-
{riverStringify(value)}
30-
</SyntaxHighlighter>
31-
</pre>
25+
<pre className={styles.pre}>{riverStringify(value)}</pre>
3226
</td>
3327
</tr>
3428
);

internal/web/ui/src/features/component/style.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import React from 'react';
22

33
// Object for react-syntax-highlighter's custom theme
4+
// NOTE: This is not currently used due to removal of react-syntax-highlighter to fix a security
5+
// issue.
46
export const style: {
57
[key: string]: React.CSSProperties;
68
} = {

0 commit comments

Comments
 (0)