@grafana/create-plugin 4.10.5-canary.920.97b6b66.0 → 4.10.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 +12 -0
- package/dist/utils/utils.templates.js +0 -5
- package/package.json +2 -2
- package/src/types.ts +0 -1
- package/src/utils/utils.templates.ts +1 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
# v4.10.5 (Fri May 24 2024)
|
|
2
|
+
|
|
3
|
+
#### 🐛 Bug Fix
|
|
4
|
+
|
|
5
|
+
- Create Plugin: Improve handling of e2e in update cmd [#920](https://github.com/grafana/plugin-tools/pull/920) ([@sunker](https://github.com/sunker))
|
|
6
|
+
|
|
7
|
+
#### Authors: 1
|
|
8
|
+
|
|
9
|
+
- Erik Sundell ([@sunker](https://github.com/sunker))
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
1
13
|
# v4.10.4 (Thu May 16 2024)
|
|
2
14
|
|
|
3
15
|
#### 🐛 Bug Fix
|
|
@@ -66,9 +66,6 @@ export function getTemplateData(cliArgs) {
|
|
|
66
66
|
const getReactRouterVersion = (pluginType) => (shouldUseReactRouterV6(pluginType) ? '6.22.0' : '5.2.0');
|
|
67
67
|
const isAppType = (pluginType) => pluginType === PLUGIN_TYPES.app || pluginType === PLUGIN_TYPES.scenes;
|
|
68
68
|
const isNPM = (packageManagerName) => packageManagerName === 'npm';
|
|
69
|
-
const getE2eTestCmd = (packageManagerName) => useCypress
|
|
70
|
-
? `${packageManagerName} exec cypress install && ${packageManagerName} exec grafana-e2e run`
|
|
71
|
-
: 'playwright test';
|
|
72
69
|
let templateData;
|
|
73
70
|
if (cliArgs) {
|
|
74
71
|
const { packageManagerName, packageManagerVersion } = getPackageManagerFromUserAgent();
|
|
@@ -91,7 +88,6 @@ export function getTemplateData(cliArgs) {
|
|
|
91
88
|
reactRouterVersion: getReactRouterVersion(cliArgs.pluginType),
|
|
92
89
|
usePlaywright,
|
|
93
90
|
useCypress,
|
|
94
|
-
e2eTestCmd: getE2eTestCmd(packageManagerName),
|
|
95
91
|
hasGithubWorkflows: cliArgs.hasGithubWorkflows,
|
|
96
92
|
hasGithubLevitateWorkflow: cliArgs.hasGithubLevitateWorkflow,
|
|
97
93
|
};
|
|
@@ -119,7 +115,6 @@ export function getTemplateData(cliArgs) {
|
|
|
119
115
|
reactRouterVersion: getReactRouterVersion(pluginJson.type),
|
|
120
116
|
usePlaywright,
|
|
121
117
|
useCypress,
|
|
122
|
-
e2eTestCmd: getE2eTestCmd(packageManagerName),
|
|
123
118
|
hasGithubWorkflows: isFile(path.join(githubFolder, 'ci.yml')),
|
|
124
119
|
hasGithubLevitateWorkflow: isFile(path.join(githubFolder, 'is-compatible.yml')),
|
|
125
120
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grafana/create-plugin",
|
|
3
|
-
"version": "4.10.5
|
|
3
|
+
"version": "4.10.5",
|
|
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": "
|
|
90
|
+
"gitHead": "4d66cd9cee829872852a48db28a938597d556ed4"
|
|
91
91
|
}
|
package/src/types.ts
CHANGED
|
@@ -98,6 +98,7 @@ export function getTemplateData(cliArgs?: GenerateCliArgs): TemplateData {
|
|
|
98
98
|
const currentVersion = getVersion();
|
|
99
99
|
const grafanaVersion = EXTRA_TEMPLATE_VARIABLES.grafanaVersion;
|
|
100
100
|
const usePlaywright = features.usePlaywright === true || isFile(path.join(process.cwd(), 'playwright.config.ts'));
|
|
101
|
+
//@grafana/e2e was deprecated in Grafana 11
|
|
101
102
|
const useCypress =
|
|
102
103
|
!usePlaywright && semverLt(grafanaVersion, '11.0.0') && fs.existsSync(path.join(process.cwd(), 'cypress'));
|
|
103
104
|
const bundleGrafanaUI = features.bundleGrafanaUI ?? DEFAULT_FEATURE_FLAGS.bundleGrafanaUI;
|
|
@@ -106,10 +107,6 @@ export function getTemplateData(cliArgs?: GenerateCliArgs): TemplateData {
|
|
|
106
107
|
const getReactRouterVersion = (pluginType: string) => (shouldUseReactRouterV6(pluginType) ? '6.22.0' : '5.2.0');
|
|
107
108
|
const isAppType = (pluginType: string) => pluginType === PLUGIN_TYPES.app || pluginType === PLUGIN_TYPES.scenes;
|
|
108
109
|
const isNPM = (packageManagerName: string) => packageManagerName === 'npm';
|
|
109
|
-
const getE2eTestCmd = (packageManagerName: string) =>
|
|
110
|
-
useCypress
|
|
111
|
-
? `${packageManagerName} exec cypress install && ${packageManagerName} exec grafana-e2e run`
|
|
112
|
-
: 'playwright test';
|
|
113
110
|
|
|
114
111
|
let templateData: TemplateData;
|
|
115
112
|
|
|
@@ -136,7 +133,6 @@ export function getTemplateData(cliArgs?: GenerateCliArgs): TemplateData {
|
|
|
136
133
|
reactRouterVersion: getReactRouterVersion(cliArgs.pluginType),
|
|
137
134
|
usePlaywright,
|
|
138
135
|
useCypress,
|
|
139
|
-
e2eTestCmd: getE2eTestCmd(packageManagerName),
|
|
140
136
|
hasGithubWorkflows: cliArgs.hasGithubWorkflows,
|
|
141
137
|
hasGithubLevitateWorkflow: cliArgs.hasGithubLevitateWorkflow,
|
|
142
138
|
};
|
|
@@ -166,7 +162,6 @@ export function getTemplateData(cliArgs?: GenerateCliArgs): TemplateData {
|
|
|
166
162
|
reactRouterVersion: getReactRouterVersion(pluginJson.type),
|
|
167
163
|
usePlaywright,
|
|
168
164
|
useCypress,
|
|
169
|
-
e2eTestCmd: getE2eTestCmd(packageManagerName),
|
|
170
165
|
hasGithubWorkflows: isFile(path.join(githubFolder, 'ci.yml')),
|
|
171
166
|
hasGithubLevitateWorkflow: isFile(path.join(githubFolder, 'is-compatible.yml')),
|
|
172
167
|
};
|