Skip to content

Commit 9038768

Browse files
chore: Runs @grafana/create-plugin@latest update
Fixes associated errors
1 parent c2893d8 commit 9038768

File tree

5 files changed

+927
-758
lines changed

5 files changed

+927
-758
lines changed

.config/jest-setup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import '@testing-library/jest-dom';
99
import { TextEncoder, TextDecoder } from 'util';
10-
10+
1111
Object.assign(global, { TextDecoder, TextEncoder });
1212

1313
// https://jestjs.io/docs/manual-mocks#mocking-methods-which-are-not-implemented-in-jsdom

.config/webpack/webpack.config.ts

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -181,20 +181,22 @@ const config = async (env): Promise<Configuration> => {
181181
],
182182
},
183183
]),
184-
...(env.development ? [
185-
new LiveReloadPlugin(),
186-
new ForkTsCheckerWebpackPlugin({
187-
async: Boolean(env.development),
188-
issue: {
189-
include: [{ file: '**/*.{ts,tsx}' }],
190-
},
191-
typescript: { configFile: path.join(process.cwd(), 'tsconfig.json') },
192-
}),
193-
new ESLintPlugin({
194-
extensions: ['.ts', '.tsx'],
195-
lintDirtyModulesOnly: Boolean(env.development), // don't lint on start, only lint changed files
196-
}),
197-
] : []),
184+
...(env.development
185+
? [
186+
new LiveReloadPlugin(),
187+
new ForkTsCheckerWebpackPlugin({
188+
async: Boolean(env.development),
189+
issue: {
190+
include: [{ file: '**/*.{ts,tsx}' }],
191+
},
192+
typescript: { configFile: path.join(process.cwd(), 'tsconfig.json') },
193+
}),
194+
new ESLintPlugin({
195+
extensions: ['.ts', '.tsx'],
196+
lintDirtyModulesOnly: Boolean(env.development), // don't lint on start, only lint changed files
197+
}),
198+
]
199+
: []),
198200
],
199201

200202
resolve: {

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@
7777
},
7878
"dependencies": {
7979
"@emotion/css": "11.10.6",
80-
"@grafana/data": "^9.3.6",
81-
"@grafana/runtime": "^9.3.6",
80+
"@grafana/data": "10.3.3",
81+
"@grafana/runtime": "10.3.3",
8282
"@grafana/schema": "10.3.3",
8383
"@grafana/sign-plugin": "^1.0.1",
84-
"@grafana/ui": "^9.3.6",
84+
"@grafana/ui": "10.3.3",
8585
"react": "18.2.0",
8686
"react-dom": "18.2.0",
8787
"tslib": "2.5.3"

src/datasource.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ export class DataSource extends DataSourceWithBackend<HaystackQuery, HaystackDat
5050
return frame.refId === refId;
5151
});
5252

53-
let ops: string[] = []
54-
53+
let ops: string[] = [];
54+
5555
let defField = frame?.fields?.find((field: Field<any, Vector<string>>) => {
5656
return field.name === 'def';
57-
})
57+
});
5858
if (defField != null) {
5959
ops = defField.values.map((opSymbol: string) => {
6060
if (opSymbol.startsWith('^op:')) {
@@ -67,7 +67,7 @@ export class DataSource extends DataSourceWithBackend<HaystackQuery, HaystackDat
6767
// Include back-support for old `ops` format, which uses "name", not "defs". Used by nhaystack
6868
let nameField = frame?.fields?.find((field: Field<any, Vector<string>>) => {
6969
return field.name === 'name';
70-
})
70+
});
7171
if (nameField != null) {
7272
ops = nameField.values;
7373
}
@@ -136,7 +136,7 @@ export class DataSource extends DataSourceWithBackend<HaystackQuery, HaystackDat
136136
private opsRequest(refId: string): DataQueryRequest<HaystackQuery> {
137137
return {
138138
requestId: 'ops',
139-
dashboardId: 0,
139+
dashboardUID: '0',
140140
interval: '0',
141141
intervalMs: 0,
142142
panelId: 0,

0 commit comments

Comments
 (0)