@grafana/create-plugin 0.11.0-canary.172.32bc606.0 → 0.11.0

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,20 @@
1
+ # v0.11.0 (Fri Feb 03 2023)
2
+
3
+ :tada: This release contains work from a new contributor! :tada:
4
+
5
+ Thank you, Isabella Siu ([@iwysiu](https://github.com/iwysiu)), for all your work!
6
+
7
+ #### 🚀 Enhancement
8
+
9
+ - Update datasource plugin template [#172](https://github.com/grafana/plugin-tools/pull/172) ([@iwysiu](https://github.com/iwysiu) [@jackw](https://github.com/jackw))
10
+
11
+ #### Authors: 2
12
+
13
+ - Isabella Siu ([@iwysiu](https://github.com/iwysiu))
14
+ - Jack Westbrook ([@jackw](https://github.com/jackw))
15
+
16
+ ---
17
+
1
18
  # v0.10.0 (Thu Feb 02 2023)
2
19
 
3
20
  #### 🚀 Enhancement
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grafana/create-plugin",
3
- "version": "0.11.0-canary.172.32bc606.0",
3
+ "version": "0.11.0",
4
4
  "main": "index.js",
5
5
  "repository": {
6
6
  "directory": "packages/create-plugin",
@@ -60,5 +60,5 @@
60
60
  "engines": {
61
61
  "node": ">=16"
62
62
  },
63
- "gitHead": "32bc606c878c2d197a7ec0dc6de2441eeadbb085"
63
+ "gitHead": "6dcb631e3365936592d46f8b4bbceeb35c163bcc"
64
64
  }
@@ -74,7 +74,7 @@ func (d *Datasource) query(_ context.Context, pCtx backend.PluginContext, query
74
74
 
75
75
  err := json.Unmarshal(query.JSON, &qm)
76
76
  if err != nil {
77
- return backend.ErrDataResponse(backend.StatusBadRequest, fmt.Sprintf("json unmarshal: %v", err))
77
+ return backend.ErrDataResponse(backend.StatusBadRequest, fmt.Sprintf("json unmarshal: %v", err.Error()))
78
78
  }
79
79
 
80
80
  // create data frame response.
@@ -5,7 +5,7 @@ import { MyDataSourceOptions, MySecureJsonData } from '../types';
5
5
 
6
6
  interface Props extends DataSourcePluginOptionsEditorProps<MyDataSourceOptions> {}
7
7
 
8
- export const ConfigEditor = (props: Props) => {
8
+ export function ConfigEditor(props: Props) {
9
9
  const { onOptionsChange, options } = props;
10
10
  const onPathChange = (event: ChangeEvent<HTMLInputElement>) => {
11
11
  const jsonData = {
@@ -64,4 +64,4 @@ export const ConfigEditor = (props: Props) => {
64
64
  </InlineField>
65
65
  </div>
66
66
  );
67
- };
67
+ }
@@ -6,7 +6,7 @@ import { MyDataSourceOptions, MyQuery } from '../types';
6
6
 
7
7
  type Props = QueryEditorProps<DataSource, MyQuery, MyDataSourceOptions>;
8
8
 
9
- export const QueryEditor = ({ query, onChange, onRunQuery }: Props) => {
9
+ export function QueryEditor({ query, onChange, onRunQuery }: Props) {
10
10
  const onQueryTextChange = (event: ChangeEvent<HTMLInputElement>) => {
11
11
  onChange({ ...query, queryText: event.target.value });
12
12
  };
@@ -29,4 +29,4 @@ export const QueryEditor = ({ query, onChange, onRunQuery }: Props) => {
29
29
  </InlineField>
30
30
  </div>
31
31
  );
32
- };
32
+ }