@grafana/create-plugin 5.5.3 → 5.5.4-canary.1199.3e346be.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.
@@ -2,7 +2,6 @@ import { lt as semverLt } from 'semver';
2
2
  import { glob } from 'glob';
3
3
  import path from 'node:path';
4
4
  import fs from 'node:fs';
5
- import { mkdirp } from 'mkdirp';
6
5
  import createDebug from 'debug';
7
6
  import { filterOutCommonFiles, isFile, isFileStartingWith } from './utils.files.js';
8
7
  import { normalizeId, renderHandlebarsTemplate } from './utils.handlebars.js';
@@ -39,7 +38,7 @@ export function compileSingleTemplateFile(pluginType, templateFile, data) {
39
38
  const rendered = renderTemplateFromFile(templateFile, data);
40
39
  const relativeExportPath = templateFile.replace(TEMPLATE_PATHS.common, '').replace(TEMPLATE_PATHS[pluginType], '');
41
40
  const exportPath = path.join(EXPORT_PATH_PREFIX, path.dirname(relativeExportPath), getExportFileName(templateFile));
42
- mkdirp.sync(path.dirname(exportPath));
41
+ fs.mkdirSync(path.dirname(exportPath), { recursive: true });
43
42
  fs.writeFileSync(exportPath, rendered);
44
43
  }
45
44
  export function compileProvisioningTemplateFile(pluginType, templateFile, data) {
@@ -49,7 +48,7 @@ export function compileProvisioningTemplateFile(pluginType, templateFile, data)
49
48
  const rendered = renderTemplateFromFile(templateFile, data);
50
49
  const relativeExportPath = templateFile.replace(TEMPLATE_PATHS[pluginType], '.');
51
50
  const exportPath = path.join(EXPORT_PATH_PREFIX, path.dirname(relativeExportPath), getExportFileName(templateFile));
52
- mkdirp.sync(path.dirname(exportPath));
51
+ fs.mkdirSync(path.dirname(exportPath), { recursive: true });
53
52
  fs.writeFileSync(exportPath, rendered);
54
53
  }
55
54
  export function renderTemplateFromFile(templateFile, data) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grafana/create-plugin",
3
- "version": "5.5.3",
3
+ "version": "5.5.4-canary.1199.3e346be.0",
4
4
  "repository": {
5
5
  "directory": "packages/create-plugin",
6
6
  "url": "https://github.com/grafana/plugin-tools"
@@ -43,9 +43,8 @@
43
43
  "dependencies": {
44
44
  "@types/marked-terminal": "^6.0.1",
45
45
  "@types/minimist": "^1.2.2",
46
- "@types/mkdirp": "^1.0.2",
47
46
  "@types/semver": "^7.3.9",
48
- "@types/which": "^2.0.2",
47
+ "@types/which": "^3.0.0",
49
48
  "boxen": "^7.1.1",
50
49
  "chalk": "^5.3.0",
51
50
  "change-case": "^5.4.0",
@@ -57,13 +56,12 @@
57
56
  "marked": "^10.0.0",
58
57
  "marked-terminal": "^7.0.0",
59
58
  "minimist": "^1.2.8",
60
- "mkdirp": "^3.0.1",
61
59
  "semver": "^7.3.5",
62
60
  "title-case": "^4.3.0",
63
61
  "which": "^4.0.0"
64
62
  },
65
63
  "devDependencies": {
66
- "@types/glob": "^7.0.0",
64
+ "@types/glob": "^8.0.0",
67
65
  "eslint-plugin-react": "^7.26.1",
68
66
  "eslint-plugin-react-hooks": "^4.2.0"
69
67
  },
@@ -88,5 +86,5 @@
88
86
  "engines": {
89
87
  "node": ">=20"
90
88
  },
91
- "gitHead": "59dd46da5d8477229e35294954ab69aba62d530b"
89
+ "gitHead": "3e346be92cdbc06f9b89f848fdd5575b9532c56f"
92
90
  }
@@ -2,7 +2,6 @@ import { lt as semverLt } from 'semver';
2
2
  import { glob } from 'glob';
3
3
  import path from 'node:path';
4
4
  import fs from 'node:fs';
5
- import { mkdirp } from 'mkdirp';
6
5
  import createDebug from 'debug';
7
6
  import { filterOutCommonFiles, isFile, isFileStartingWith } from './utils.files.js';
8
7
  import { normalizeId, renderHandlebarsTemplate } from './utils.handlebars.js';
@@ -72,7 +71,7 @@ export function compileSingleTemplateFile(pluginType: string, templateFile: stri
72
71
  const relativeExportPath = templateFile.replace(TEMPLATE_PATHS.common, '').replace(TEMPLATE_PATHS[pluginType], '');
73
72
  const exportPath = path.join(EXPORT_PATH_PREFIX, path.dirname(relativeExportPath), getExportFileName(templateFile));
74
73
 
75
- mkdirp.sync(path.dirname(exportPath));
74
+ fs.mkdirSync(path.dirname(exportPath), { recursive: true });
76
75
  fs.writeFileSync(exportPath, rendered);
77
76
  }
78
77
 
@@ -85,7 +84,7 @@ export function compileProvisioningTemplateFile(pluginType: string, templateFile
85
84
  const relativeExportPath = templateFile.replace(TEMPLATE_PATHS[pluginType], '.');
86
85
  const exportPath = path.join(EXPORT_PATH_PREFIX, path.dirname(relativeExportPath), getExportFileName(templateFile));
87
86
 
88
- mkdirp.sync(path.dirname(exportPath));
87
+ fs.mkdirSync(path.dirname(exportPath), { recursive: true });
89
88
  fs.writeFileSync(exportPath, rendered);
90
89
  }
91
90
 
@@ -1,6 +1,6 @@
1
1
  module github.com/{{ kebabCase orgName }}/{{ kebabCase pluginName }}
2
2
 
3
- go 1.21
3
+ go 1.22
4
4
 
5
5
  require github.com/grafana/grafana-plugin-sdk-go v0.156.0
6
6
 
@@ -1,6 +1,6 @@
1
1
  module github.com/{{ kebabCase orgName }}/{{ kebabCase pluginName }}
2
2
 
3
- go 1.21
3
+ go 1.22
4
4
 
5
5
  require github.com/grafana/grafana-plugin-sdk-go v0.156.0
6
6
 
@@ -69,7 +69,7 @@
69
69
  "@grafana/runtime": "^11.2.2",
70
70
  "@grafana/ui": "^11.2.2",
71
71
  "@grafana/schema": "^11.2.2",{{#if_eq pluginType "scenesapp"}}
72
- "@grafana/scenes": "^5.19.0",{{/if_eq}}
72
+ "@grafana/scenes": "^5.20.2",{{/if_eq}}
73
73
  "react": "18.2.0",
74
74
  "react-dom": "18.2.0",{{#if isAppType}}
75
75
  "react-router-dom": "^{{ reactRouterVersion }}",
@@ -61,7 +61,7 @@ jobs:
61
61
  if: steps.check-for-backend.outputs.has-backend == 'true'
62
62
  uses: actions/setup-go@v5
63
63
  with:
64
- go-version: '1.21'
64
+ go-version: '1.22'
65
65
 
66
66
  - name: Test backend
67
67
  if: steps.check-for-backend.outputs.has-backend == 'true'
@@ -172,13 +172,8 @@ jobs:
172
172
  docker compose pull
173
173
  DEVELOPMENT=false GRAFANA_VERSION=$\{{ matrix.GRAFANA_IMAGE.VERSION }} GRAFANA_IMAGE=$\{{ matrix.GRAFANA_IMAGE.NAME }} docker compose up -d
174
174
 
175
- - name: Wait for Grafana to start
176
- uses: nev7n/wait_for_response@v1
177
- with:
178
- url: 'http://localhost:3000/'
179
- responseCode: 200
180
- timeout: 60000
181
- interval: 500
175
+ - name: Wait for grafana server
176
+ uses: grafana/plugin-actions/wait-for-grafana@main
182
177
 
183
178
  - name: Install Playwright Browsers
184
179
  run: {{ packageManagerName }} exec playwright install chromium --with-deps