@grafana/create-plugin 5.11.0 → 5.11.2-canary.1396.bd5ad63.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,15 @@
1
+ # v5.11.1 (Mon Dec 09 2024)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - Dependencies: Use latest release of plugin-e2e [#1390](https://github.com/grafana/plugin-tools/pull/1390) ([@sunker](https://github.com/sunker))
6
+
7
+ #### Authors: 1
8
+
9
+ - Erik Sundell ([@sunker](https://github.com/sunker))
10
+
11
+ ---
12
+
1
13
  # v5.11.0 (Mon Dec 09 2024)
2
14
 
3
15
  #### 🚀 Enhancement
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grafana/create-plugin",
3
- "version": "5.11.0",
3
+ "version": "5.11.2-canary.1396.bd5ad63.0",
4
4
  "repository": {
5
5
  "directory": "packages/create-plugin",
6
6
  "url": "https://github.com/grafana/plugin-tools"
@@ -86,5 +86,5 @@
86
86
  "engines": {
87
87
  "node": ">=20"
88
88
  },
89
- "gitHead": "25d29975ed30ab9a0fb6a9b80c1557a9f899c300"
89
+ "gitHead": "bd5ad63015da7988aa9340f2014b2ad9c144ff5b"
90
90
  }
@@ -6,7 +6,7 @@ import { getBackendSrv } from '@grafana/runtime';
6
6
  import { Button, Field, FieldSet, Input, SecretInput, useStyles2 } from '@grafana/ui';
7
7
  import { testIds } from '../testIds';
8
8
 
9
- export type AppPluginSettings = {
9
+ type AppPluginSettings = {
10
10
  apiUrl?: string;
11
11
  };
12
12
 
@@ -133,7 +133,7 @@ const updatePluginAndReload = async (pluginId: string, data: Partial<PluginMeta<
133
133
  }
134
134
  };
135
135
 
136
- export const updatePlugin = async (pluginId: string, data: Partial<PluginMeta>) => {
136
+ const updatePlugin = async (pluginId: string, data: Partial<PluginMeta>) => {
137
137
  const response = await getBackendSrv().fetch({
138
138
  url: `/api/plugins/${pluginId}/settings`,
139
139
  method: 'POST',
@@ -8,7 +8,7 @@
8
8
  "test:ci": "jest --passWithNoTests --maxWorkers 4",
9
9
  "typecheck": "tsc --noEmit",
10
10
  "lint": "eslint --cache --ignore-path ./.gitignore --ext .js,.jsx,.ts,.tsx .",
11
- "lint:fix": "{{ packageManagerName }} run lint{{#if isNPM}} --{{/if}} --fix",{{#if usePlaywright}}
11
+ "lint:fix": "{{ packageManagerName }} run lint{{#if isNPM}} --{{/if}} --fix && prettier --write --list-different .",{{#if usePlaywright}}
12
12
  "e2e": "playwright test",{{/if}}{{#if useCypress}}
13
13
  "e2e": "{{ packageManagerName }} exec cypress install && {{ packageManagerName }} exec grafana-e2e run",
14
14
  "e2e:update": "{{ packageManagerName }} exec cypress install && {{ packageManagerName }} exec grafana-e2e run --update-screenshots",{{/if}}
@@ -18,11 +18,10 @@
18
18
  "author": "{{ sentenceCase orgName }}",
19
19
  "license": "Apache-2.0",
20
20
  "devDependencies": {
21
- "@babel/core": "^7.21.4",{{#if useCypress}}
22
- "@grafana/e2e": "^11.0.7",
21
+ {{#if useCypress}} "@grafana/e2e": "^11.0.7",
23
22
  "@grafana/e2e-selectors": "^11.3.1",{{/if}}
24
23
  "@grafana/eslint-config": "^8.0.0",{{#if usePlaywright}}
25
- "@grafana/plugin-e2e": "^1.12.5-canary.1385.53e964a.0",{{/if}}
24
+ "@grafana/plugin-e2e": "^1.13.1",{{/if}}
26
25
  "@grafana/tsconfig": "^2.0.0",{{#if usePlaywright}}
27
26
  "@playwright/test": "^1.41.2",{{/if}}
28
27
  "@stylistic/eslint-plugin-ts": "^2.9.0",
@@ -32,8 +31,8 @@
32
31
  "@testing-library/jest-dom": "6.1.4",
33
32
  "@testing-library/react": "14.0.0",
34
33
  "@types/jest": "^29.5.0",
35
- "@types/node": "^20.8.7",{{#unless useReactRouterV6}}
36
- "@types/react-router-dom": "^{{ reactRouterVersion }}",{{/unless}}
34
+ "@types/node": "^20.8.7",{{#if isAppType}}{{#unless useReactRouterV6}}
35
+ "@types/react-router-dom": "^{{ reactRouterVersion }}",{{/unless}}{{/if}}
37
36
  "@types/testing-library__jest-dom": "5.14.8",
38
37
  "@typescript-eslint/eslint-plugin": "^6.18.0",
39
38
  "@typescript-eslint/parser": "^6.18.0",
@@ -61,7 +60,6 @@
61
60
  "swc-loader": "^0.2.3",
62
61
  "terser-webpack-plugin": "^5.3.10",
63
62
  "ts-node": "^10.9.2",
64
- "tsconfig-paths": "^4.2.0",
65
63
  "typescript": "5.5.4",
66
64
  "webpack": "^5.94.0",
67
65
  "webpack-cli": "^5.1.4",
@@ -80,10 +78,9 @@
80
78
  "@grafana/schema": "^11.3.2",{{#if_eq pluginType "scenesapp"}}
81
79
  "@grafana/scenes": "^5.28.1",{{/if_eq}}
82
80
  "react": "18.2.0",
83
- "react-dom": "18.2.0",{{#if isAppType}}
81
+ "react-dom": "18.2.0"{{#if isAppType}},
84
82
  "react-router-dom": "^{{ reactRouterVersion }}",
85
- "rxjs": "7.8.1",{{/if}}
86
- "tslib": "2.5.3"
83
+ "rxjs": "7.8.1"{{/if}}
87
84
  },
88
85
  "packageManager": "{{ packageManagerName }}@{{ packageManagerVersion }}"
89
86
  }
@@ -21,4 +21,4 @@ jobs:
21
21
  - name: Build plugin
22
22
  run: {{ packageManagerName }} run build
23
23
  - name: Compatibility check
24
- run: npx @grafana/levitate@latest is-compatible --path src/module.ts --target @grafana/data,@grafana/ui,@grafana/runtime
24
+ run: npx --yes @grafana/levitate@latest is-compatible --path src/module.ts --target @grafana/data,@grafana/ui,@grafana/runtime
@@ -17,7 +17,7 @@ jobs:
17
17
  runs-on: ubuntu-latest
18
18
  steps:
19
19
  - uses: actions/checkout@v4
20
- - uses: grafana/plugin-actions/build-plugin@release
20
+ - uses: grafana/plugin-actions/build-plugin@main
21
21
  # Uncomment to enable plugin signing
22
22
  # (For more info on how to generate the access policy token see https://grafana.com/developers/plugin-tools/publish-a-plugin/sign-a-plugin#generate-an-access-policy-token)
23
23
  #with:
@@ -6,7 +6,7 @@ import { css } from '@emotion/css';
6
6
  import { testIds } from '../testIds';
7
7
  import { lastValueFrom } from 'rxjs';
8
8
 
9
- export type JsonData = {
9
+ type JsonData = {
10
10
  apiUrl?: string;
11
11
  isApiKeySet?: boolean;
12
12
  };
@@ -140,7 +140,7 @@ const updatePluginAndReload = async (pluginId: string, data: Partial<PluginMeta<
140
140
  }
141
141
  };
142
142
 
143
- export const updatePlugin = async (pluginId: string, data: Partial<PluginMeta>) => {
143
+ const updatePlugin = async (pluginId: string, data: Partial<PluginMeta>) => {
144
144
  const response = getBackendSrv().fetch({
145
145
  url: `/api/plugins/${pluginId}/settings`,
146
146
  method: 'POST',
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { SceneComponentProps, SceneObjectBase, SceneObjectState } from '@grafana/scenes';
3
3
  import { Input } from '@grafana/ui';
4
4
 
5
- export interface CustomSceneObjectState extends SceneObjectState {
5
+ interface CustomSceneObjectState extends SceneObjectState {
6
6
  counter: number;
7
7
  }
8
8