@grafana/create-plugin 5.5.2-canary.1165.8443e69.0 → 5.5.2
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.5.2 (Tue Oct 08 2024)
|
|
2
|
+
|
|
3
|
+
#### 🐛 Bug Fix
|
|
4
|
+
|
|
5
|
+
- Create Plugin: Stop prettier from writing files outside the target path [#1166](https://github.com/grafana/plugin-tools/pull/1166) ([@jackw](https://github.com/jackw))
|
|
6
|
+
|
|
7
|
+
#### Authors: 1
|
|
8
|
+
|
|
9
|
+
- Jack Westbrook ([@jackw](https://github.com/jackw))
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
1
13
|
# v5.5.1 (Fri Oct 04 2024)
|
|
2
14
|
|
|
3
15
|
#### 🐛 Bug Fix
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { exec as nodeExec } from 'node:child_process';
|
|
2
|
-
import { promisify } from 'node:util';
|
|
3
2
|
import fs from 'node:fs';
|
|
3
|
+
import { resolve } from 'node:path';
|
|
4
|
+
import { promisify } from 'node:util';
|
|
4
5
|
import { getPackageJson } from './utils.packagejson.js';
|
|
5
6
|
const exec = promisify(nodeExec);
|
|
6
7
|
export async function prettifyFiles(options) {
|
|
@@ -13,9 +14,10 @@ export async function prettifyFiles(options) {
|
|
|
13
14
|
return '';
|
|
14
15
|
}
|
|
15
16
|
const prettierVersion = getPrettierVersion(projectRoot);
|
|
17
|
+
const directoryToWrite = resolve(projectRoot, targetPath);
|
|
16
18
|
try {
|
|
17
|
-
let command = `npx -y prettier@${prettierVersion}
|
|
18
|
-
await exec(command
|
|
19
|
+
let command = `npx -y prettier@${prettierVersion} ${directoryToWrite} --write`;
|
|
20
|
+
await exec(command);
|
|
19
21
|
}
|
|
20
22
|
catch (error) {
|
|
21
23
|
throw new Error('There was a problem running prettier on the plugin files. Please run `npx -y prettier@2 . --write` manually in your plugin directory.');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grafana/create-plugin",
|
|
3
|
-
"version": "5.5.2
|
|
3
|
+
"version": "5.5.2",
|
|
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": "
|
|
91
|
+
"gitHead": "016ea946ae0d4db5744c383a6dcfb7b804d67b25"
|
|
92
92
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { exec as nodeExec } from 'node:child_process';
|
|
2
|
-
import { promisify } from 'node:util';
|
|
3
2
|
import fs from 'node:fs';
|
|
3
|
+
import { resolve } from 'node:path';
|
|
4
|
+
import { promisify } from 'node:util';
|
|
4
5
|
import { getPackageJson } from './utils.packagejson.js';
|
|
5
6
|
|
|
6
7
|
const exec = promisify(nodeExec);
|
|
@@ -26,10 +27,11 @@ export async function prettifyFiles(options: PrettifyFilesArgs) {
|
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
const prettierVersion = getPrettierVersion(projectRoot);
|
|
30
|
+
const directoryToWrite = resolve(projectRoot, targetPath);
|
|
29
31
|
|
|
30
32
|
try {
|
|
31
|
-
let command = `npx -y prettier@${prettierVersion}
|
|
32
|
-
await exec(command
|
|
33
|
+
let command = `npx -y prettier@${prettierVersion} ${directoryToWrite} --write`;
|
|
34
|
+
await exec(command);
|
|
33
35
|
} catch (error) {
|
|
34
36
|
throw new Error(
|
|
35
37
|
'There was a problem running prettier on the plugin files. Please run `npx -y prettier@2 . --write` manually in your plugin directory.'
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"@grafana/runtime": "^11.2.2",
|
|
70
70
|
"@grafana/ui": "^11.2.2",
|
|
71
71
|
"@grafana/schema": "^10.4.0",{{#if_eq pluginType "scenesapp"}}
|
|
72
|
-
"@grafana/scenes": "^5.
|
|
72
|
+
"@grafana/scenes": "^5.16.3",{{/if_eq}}
|
|
73
73
|
"react": "18.2.0",
|
|
74
74
|
"react-dom": "18.2.0",{{#if isAppType}}
|
|
75
75
|
"react-router-dom": "^{{ reactRouterVersion }}",
|