@grafana/create-plugin 5.3.12-canary.1113.8ba4686.0 → 5.3.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ # v5.3.12 (Mon Sep 30 2024)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - Switch to createDataFrame [#1133](https://github.com/grafana/plugin-tools/pull/1133) ([@tolzhabayev](https://github.com/tolzhabayev))
6
+
7
+ #### Authors: 1
8
+
9
+ - Timur Olzhabayev ([@tolzhabayev](https://github.com/tolzhabayev))
10
+
11
+ ---
12
+
1
13
  # v5.3.11 (Wed Sep 25 2024)
2
14
 
3
15
  #### 🐛 Bug Fix
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grafana/create-plugin",
3
- "version": "5.3.12-canary.1113.8ba4686.0",
3
+ "version": "5.3.12",
4
4
  "repository": {
5
5
  "directory": "packages/create-plugin",
6
6
  "url": "https://github.com/grafana/plugin-tools"
@@ -88,5 +88,5 @@
88
88
  "engines": {
89
89
  "node": ">=20"
90
90
  },
91
- "gitHead": "8ba468617dcda8d80701abddaeba0d119682d741"
91
+ "gitHead": "4e0a23205e6f92a34e398ed21c1999d7e868f933"
92
92
  }
@@ -22,7 +22,7 @@
22
22
  "@grafana/e2e": "^11.0.4",
23
23
  "@grafana/e2e-selectors": "^11.2.0",{{/if}}
24
24
  "@grafana/eslint-config": "^7.0.0",{{#if usePlaywright}}
25
- "@grafana/plugin-e2e": "^1.8.1",{{/if}}
25
+ "@grafana/plugin-e2e": "^1.7.2",{{/if}}
26
26
  "@grafana/tsconfig": "^2.0.0",{{#if usePlaywright}}
27
27
  "@playwright/test": "^1.41.2",{{/if}}
28
28
  "@swc/core": "^1.3.90",
@@ -31,7 +31,6 @@
31
31
  "@testing-library/jest-dom": "6.1.4",
32
32
  "@testing-library/react": "14.0.0",
33
33
  "@types/jest": "^29.5.0",
34
- "@types/lodash": "^4.14.194",
35
34
  "@types/node": "^20.8.7",{{#unless useReactRouterV6}}
36
35
  "@types/react-router-dom": "^{{ reactRouterVersion }}",{{/unless}}
37
36
  "@types/testing-library__jest-dom": "5.14.8",
@@ -69,7 +68,7 @@
69
68
  "@grafana/runtime": "^11.2.0",
70
69
  "@grafana/ui": "^11.2.0",
71
70
  "@grafana/schema": "^10.4.0",{{#if_eq pluginType "scenesapp"}}
72
- "@grafana/scenes": "^5.16.0",{{/if_eq}}
71
+ "@grafana/scenes": "^5.14.7",{{/if_eq}}
73
72
  "react": "18.2.0",
74
73
  "react-dom": "18.2.0",{{#if isAppType}}
75
74
  "react-router-dom": "^{{ reactRouterVersion }}",
@@ -5,13 +5,12 @@ import {
5
5
  DataQueryResponse,
6
6
  DataSourceApi,
7
7
  DataSourceInstanceSettings,
8
- MutableDataFrame,
8
+ createDataFrame,
9
9
  FieldType,
10
10
  } from '@grafana/data';
11
11
 
12
12
  import { MyQuery, MyDataSourceOptions, DEFAULT_QUERY, DataSourceResponse } from './types';
13
13
  import { lastValueFrom } from 'rxjs';
14
- import _ from 'lodash';
15
14
 
16
15
  export class DataSource extends DataSourceApi<MyQuery, MyDataSourceOptions> {
17
16
  baseUrl: string;
@@ -37,7 +36,7 @@ export class DataSource extends DataSourceApi<MyQuery, MyDataSourceOptions> {
37
36
 
38
37
  // Return a constant for each query.
39
38
  const data = options.targets.map((target) => {
40
- return new MutableDataFrame({
39
+ return createDataFrame({
41
40
  refId: target.refId,
42
41
  fields: [
43
42
  { name: 'Time', values: [from, to], type: FieldType.time },
@@ -77,7 +76,7 @@ export class DataSource extends DataSourceApi<MyQuery, MyDataSourceOptions> {
77
76
  }
78
77
  } catch (err) {
79
78
  let message = '';
80
- if (_.isString(err)) {
79
+ if (typeof err === 'string') {
81
80
  message = err;
82
81
  } else if (isFetchError(err)) {
83
82
  message = 'Fetch error: ' + (err.statusText ? err.statusText : defaultErrorMessage);