@grafana/create-plugin 7.0.4 → 7.0.5

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
+ # v7.0.5 (Fri Mar 06 2026)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - fix: set config version only if migrations ran [#2513](https://github.com/grafana/plugin-tools/pull/2513) ([@jackw](https://github.com/jackw))
6
+
7
+ #### Authors: 1
8
+
9
+ - Jack Westbrook ([@jackw](https://github.com/jackw))
10
+
11
+ ---
12
+
1
13
  # v7.0.4 (Fri Mar 06 2026)
2
14
 
3
15
  #### 🐛 Bug Fix
@@ -25,7 +25,7 @@ async function runMigrations(migrations, options = {}) {
25
25
  ${migration.description}`);
26
26
  }
27
27
  }
28
- setRootConfig({ version: CURRENT_APP_VERSION });
28
+ await setRootConfig({ version: CURRENT_APP_VERSION });
29
29
  if (options.commitEachMigration) {
30
30
  await gitCommitNoVerify(`chore: update .config/.cprc.json to version ${CURRENT_APP_VERSION}.`);
31
31
  }
@@ -22,6 +22,12 @@ const update = async (argv) => {
22
22
  process.exit(0);
23
23
  }
24
24
  const migrations = getMigrationsToRun(version, CURRENT_APP_VERSION);
25
+ if (migrations.length === 0) {
26
+ output.log({
27
+ title: "No migrations to run, exiting."
28
+ });
29
+ process.exit(0);
30
+ }
25
31
  const { _, $0, ...codemodOptions } = argv;
26
32
  await runMigrations(migrations, {
27
33
  commitEachMigration: !!argv.commit,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grafana/create-plugin",
3
- "version": "7.0.4",
3
+ "version": "7.0.5",
4
4
  "repository": {
5
5
  "directory": "packages/create-plugin",
6
6
  "url": "https://github.com/grafana/plugin-tools"
@@ -55,5 +55,5 @@
55
55
  "engines": {
56
56
  "node": ">=20"
57
57
  },
58
- "gitHead": "220f66314c6bdece4a747af46a15dd7412d94748"
58
+ "gitHead": "2c9c3380d7ec3fec0005c6dc6d3cb79249b15b55"
59
59
  }
@@ -43,7 +43,7 @@ export async function runMigrations(migrations: Migration[], options: RunMigrati
43
43
  }
44
44
  }
45
45
 
46
- setRootConfig({ version: CURRENT_APP_VERSION });
46
+ await setRootConfig({ version: CURRENT_APP_VERSION });
47
47
 
48
48
  if (options.commitEachMigration) {
49
49
  await gitCommitNoVerify(`chore: update .config/.cprc.json to version ${CURRENT_APP_VERSION}.`);
@@ -32,6 +32,15 @@ export const update = async (argv: minimist.ParsedArgs) => {
32
32
  }
33
33
 
34
34
  const migrations = getMigrationsToRun(version, CURRENT_APP_VERSION);
35
+
36
+ if (migrations.length === 0) {
37
+ output.log({
38
+ title: 'No migrations to run, exiting.',
39
+ });
40
+
41
+ process.exit(0);
42
+ }
43
+
35
44
  // filter out minimist internal properties (_ and $0) before passing to codemod
36
45
  const { _, $0, ...codemodOptions } = argv;
37
46
  await runMigrations(migrations, {