@grafana/create-plugin 6.3.0-canary.2314.19530787972.0 → 6.3.0-canary.2314.19540148969.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 +12 -0
- package/dist/codemods/migrations/manager.js +3 -1
- package/package.json +2 -2
- package/src/codemods/migrations/manager.ts +2 -1
- package/templates/panel/.config/AGENTS/instructions.md +2 -1
- package/templates/panel/.config/AGENTS/tasks/add-panel-options.md +8 -6
- package/templates/panel/AGENTS.md +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
# v6.2.1 (Thu Nov 20 2025)
|
|
2
|
+
|
|
3
|
+
#### 🐛 Bug Fix
|
|
4
|
+
|
|
5
|
+
- Create Plugin: use migration description for commit messages [#2315](https://github.com/grafana/plugin-tools/pull/2315) ([@jackw](https://github.com/jackw))
|
|
6
|
+
|
|
7
|
+
#### Authors: 1
|
|
8
|
+
|
|
9
|
+
- Jack Westbrook ([@jackw](https://github.com/jackw))
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
1
13
|
# v6.2.0 (Thu Nov 20 2025)
|
|
2
14
|
|
|
3
15
|
#### 🚀 Enhancement
|
|
@@ -20,7 +20,9 @@ async function runMigrations(migrations, options = {}) {
|
|
|
20
20
|
const context = await runCodemod(migration, options.codemodOptions);
|
|
21
21
|
const shouldCommit = options.commitEachMigration && context.hasChanges();
|
|
22
22
|
if (shouldCommit) {
|
|
23
|
-
await gitCommitNoVerify(`chore: run create-plugin migration - ${migration.name}
|
|
23
|
+
await gitCommitNoVerify(`chore: run create-plugin migration - ${migration.name}
|
|
24
|
+
|
|
25
|
+
${migration.description}`);
|
|
24
26
|
}
|
|
25
27
|
}
|
|
26
28
|
setRootConfig({ version: CURRENT_APP_VERSION });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grafana/create-plugin",
|
|
3
|
-
"version": "6.3.0-canary.2314.
|
|
3
|
+
"version": "6.3.0-canary.2314.19540148969.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"directory": "packages/create-plugin",
|
|
6
6
|
"url": "https://github.com/grafana/plugin-tools"
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"engines": {
|
|
62
62
|
"node": ">=20"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "57c7ea99cf1008bc7c1fa894c2cb13ffddfc2a70"
|
|
65
65
|
}
|
|
@@ -38,7 +38,8 @@ export async function runMigrations(migrations: Migration[], options: RunMigrati
|
|
|
38
38
|
const shouldCommit = options.commitEachMigration && context.hasChanges();
|
|
39
39
|
|
|
40
40
|
if (shouldCommit) {
|
|
41
|
-
|
|
41
|
+
// for conventional commits we need to add a newline between the title and the description
|
|
42
|
+
await gitCommitNoVerify(`chore: run create-plugin migration - ${migration.name}\n\n${migration.description}`);
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
45
|
|
|
@@ -55,7 +55,8 @@ A typical panel plugin includes:
|
|
|
55
55
|
- Respect `width` and `height`; keep layout responsive
|
|
56
56
|
- Avoid unnecessary dependencies; ensure Grafana compatibility
|
|
57
57
|
- Use useTheme2() from @grafana/ui for visual tokens
|
|
58
|
-
-
|
|
58
|
+
- Never hardcode colors, spacing, padding, or font sizes.
|
|
59
|
+
- Use useStyles2(), Emotion and visual tokens from the theme to create styles.
|
|
59
60
|
- Follow existing file structure
|
|
60
61
|
- Keep code typed and predictable
|
|
61
62
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Adding a New Panel Option
|
|
2
2
|
|
|
3
|
+
Panel options are settings the user configures to change panel behavior.
|
|
4
|
+
|
|
3
5
|
Always complete **all three steps**:
|
|
4
6
|
|
|
5
7
|
### **1. Extend the options type**
|
|
@@ -13,8 +15,8 @@ export interface SimpleOptions {
|
|
|
13
15
|
}
|
|
14
16
|
```
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
- Property name must match the builder `path`.
|
|
19
|
+
- Type must match expected editor output.
|
|
18
20
|
|
|
19
21
|
---
|
|
20
22
|
|
|
@@ -53,9 +55,9 @@ builder.addXxx({
|
|
|
53
55
|
|
|
54
56
|
Rules:
|
|
55
57
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
- Every option **must** have a `defaultValue`.
|
|
59
|
+
- Put numeric constraints in `settings` (`min`, `max`, `step`).
|
|
60
|
+
- Use `showIf` for conditional display.
|
|
59
61
|
|
|
60
62
|
---
|
|
61
63
|
|
|
@@ -127,4 +129,4 @@ No option may remain unused.
|
|
|
127
129
|
]},
|
|
128
130
|
showIf: (o) => o.showSize,
|
|
129
131
|
})
|
|
130
|
-
```
|
|
132
|
+
```
|
|
@@ -5,4 +5,6 @@ description: Develops Grafana panel plugins
|
|
|
5
5
|
|
|
6
6
|
## Project knowledge
|
|
7
7
|
|
|
8
|
-
This repository contains a **Grafana panel plugin**.
|
|
8
|
+
This repository contains a **Grafana panel plugin**. Follow the [instructions](./.config/AGENTS/instructions.md) before doing any changes.
|
|
9
|
+
|
|
10
|
+
All build, lint, test, and Docker dev-server commands are documented in the "Getting started" section of [README.md](./README.md). Prefer running the non-watch versions of these commands.
|