@grafana/create-plugin 5.1.0-canary.1030.d9383c4.0 → 5.1.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,19 @@
1
+ # v5.1.0 (Tue Aug 06 2024)
2
+
3
+ #### 🚀 Enhancement
4
+
5
+ - Create Plugin: Improve cli args and add docs [#1030](https://github.com/grafana/plugin-tools/pull/1030) ([@jackw](https://github.com/jackw))
6
+
7
+ #### 🐛 Bug Fix
8
+
9
+ - Create Plugin: Clean up unused publicPath.ts when updating [#1035](https://github.com/grafana/plugin-tools/pull/1035) ([@jackw](https://github.com/jackw))
10
+
11
+ #### Authors: 1
12
+
13
+ - Jack Westbrook ([@jackw](https://github.com/jackw))
14
+
15
+ ---
16
+
1
17
  # v5.0.0 (Wed Jul 31 2024)
2
18
 
3
19
  #### 💥 Breaking Change
@@ -5,6 +5,8 @@ import { isGitDirectory, isGitDirectoryClean } from '../utils/utils.git.js';
5
5
  import { isPluginDirectory, updateDotConfigFolder } from '../utils/utils.plugin.js';
6
6
  import { getVersion, getGrafanaRuntimeVersion } from '../utils/utils.version.js';
7
7
  import { getPackageManagerFromUserAgent } from '../utils/utils.packageManager.js';
8
+ import { UDPATE_CONFIG } from '../constants.js';
9
+ import { getOnlyExistingInCwd, removeFilesInCwd } from '../utils/utils.files.js';
8
10
  export const update = async (argv) => {
9
11
  const { packageManagerName } = getPackageManagerFromUserAgent();
10
12
  try {
@@ -40,6 +42,10 @@ In case you want to proceed as is please use the ${chalk.bold('--force')} flag.)
40
42
  onlyOutdated: true,
41
43
  ignoreGrafanaDependencies: false,
42
44
  });
45
+ const filesToRemove = getOnlyExistingInCwd(UDPATE_CONFIG.filesToRemove);
46
+ if (filesToRemove.length) {
47
+ removeFilesInCwd(filesToRemove);
48
+ }
43
49
  printBlueBox({
44
50
  title: 'Update successful ✔',
45
51
  content: `${chalk.bold('@grafana/* package version:')} ${getGrafanaRuntimeVersion()}
package/dist/constants.js CHANGED
@@ -59,6 +59,7 @@ export const MIGRATION_CONFIG = {
59
59
  };
60
60
  export const UDPATE_CONFIG = {
61
61
  filesToOverride: ['.config/', '.cprc.json'],
62
+ filesToRemove: ['.config/webpack/publicPath.ts'],
62
63
  };
63
64
  export const TEXT = {
64
65
  overrideFilesPrompt: '**The following files will be overriden, would you like to continue?**',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grafana/create-plugin",
3
- "version": "5.1.0-canary.1030.d9383c4.0",
3
+ "version": "5.1.0",
4
4
  "repository": {
5
5
  "directory": "packages/create-plugin",
6
6
  "url": "https://github.com/grafana/plugin-tools"
@@ -87,5 +87,5 @@
87
87
  "engines": {
88
88
  "node": ">=20"
89
89
  },
90
- "gitHead": "d9383c4891e89801656fecc29077b609b58051ad"
90
+ "gitHead": "f569fb8f674bf09b3cec1aaa8a3ccaa6b4b060cd"
91
91
  }
@@ -6,6 +6,8 @@ import { isGitDirectory, isGitDirectoryClean } from '../utils/utils.git.js';
6
6
  import { isPluginDirectory, updateDotConfigFolder } from '../utils/utils.plugin.js';
7
7
  import { getVersion, getGrafanaRuntimeVersion } from '../utils/utils.version.js';
8
8
  import { getPackageManagerFromUserAgent } from '../utils/utils.packageManager.js';
9
+ import { UDPATE_CONFIG } from '../constants.js';
10
+ import { getOnlyExistingInCwd, removeFilesInCwd } from '../utils/utils.files.js';
9
11
 
10
12
  export const update = async (argv: minimist.ParsedArgs) => {
11
13
  const { packageManagerName } = getPackageManagerFromUserAgent();
@@ -54,6 +56,11 @@ In case you want to proceed as is please use the ${chalk.bold('--force')} flag.)
54
56
  ignoreGrafanaDependencies: false,
55
57
  });
56
58
 
59
+ const filesToRemove = getOnlyExistingInCwd(UDPATE_CONFIG.filesToRemove);
60
+ if (filesToRemove.length) {
61
+ removeFilesInCwd(filesToRemove);
62
+ }
63
+
57
64
  printBlueBox({
58
65
  title: 'Update successful ✔',
59
66
  content: `${chalk.bold('@grafana/* package version:')} ${getGrafanaRuntimeVersion()}
package/src/constants.ts CHANGED
@@ -86,6 +86,8 @@ export const MIGRATION_CONFIG = {
86
86
  export const UDPATE_CONFIG = {
87
87
  // Files that should be overriden between configuration version updates.
88
88
  filesToOverride: ['.config/', '.cprc.json'],
89
+ // Files that are no longer needed for the project and can be removed.
90
+ filesToRemove: ['.config/webpack/publicPath.ts'],
89
91
  };
90
92
 
91
93
  // prettier-ignore