@grafana/create-plugin 2.1.0 → 2.1.1
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/package.json +2 -2
- package/templates/common/.config/.eslintrc +1 -1
- package/templates/common/.config/.prettierrc.js +9 -9
- package/templates/common/.config/tsconfig.json +1 -1
- package/templates/common/.config/webpack/utils.ts +3 -4
- package/templates/common/.config/webpack/webpack.config.ts +1 -2
- package/templates/common/.eslintrc +1 -1
- package/templates/common/.nvmrc +1 -1
- package/templates/common/.prettierrc.js +2 -2
- package/templates/common/CHANGELOG.md +1 -1
- package/templates/common/tsconfig.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
# v2.1.1 (Fri Oct 13 2023)
|
|
2
|
+
|
|
3
|
+
#### 🐛 Bug Fix
|
|
4
|
+
|
|
5
|
+
- Create Plugin: Format code under templates/common [#451](https://github.com/grafana/plugin-tools/pull/451) ([@zoltanbedi](https://github.com/zoltanbedi))
|
|
6
|
+
|
|
7
|
+
#### Authors: 1
|
|
8
|
+
|
|
9
|
+
- Zoltán Bedi ([@zoltanbedi](https://github.com/zoltanbedi))
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
1
13
|
# v2.1.0 (Fri Oct 13 2023)
|
|
2
14
|
|
|
3
15
|
:tada: This release contains work from a new contributor! :tada:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grafana/create-plugin",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"directory": "packages/create-plugin",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"engines": {
|
|
67
67
|
"node": ">=18"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "9982b3f5d52c51b4ee5c0ecd13c5c2a9cac3e728"
|
|
70
70
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* In order to extend the configuration follow the steps in
|
|
5
5
|
* https://grafana.com/developers/plugin-tools/create-a-plugin/extend-a-plugin/extend-configurations#extend-the-eslint-config
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
{
|
|
8
8
|
"extends": ["@grafana/eslint-config"],
|
|
9
9
|
"root": true,
|
|
10
10
|
"rules": {
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
module.exports = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
};
|
|
8
|
+
endOfLine: 'auto',
|
|
9
|
+
printWidth: 120,
|
|
10
|
+
trailingComma: 'es5',
|
|
11
|
+
semi: true,
|
|
12
|
+
jsxSingleQuote: false,
|
|
13
|
+
singleQuote: true,
|
|
14
|
+
useTabs: false,
|
|
15
|
+
tabWidth: 2,
|
|
16
|
+
};
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* In order to extend the configuration follow the steps in
|
|
5
5
|
* https://grafana.com/developers/plugin-tools/create-a-plugin/extend-a-plugin/extend-configurations#extend-the-typescript-config
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
{
|
|
8
8
|
"compilerOptions": {
|
|
9
9
|
"alwaysStrict": true,
|
|
10
10
|
"declaration": false,
|
|
@@ -2,11 +2,9 @@ import fs from 'fs';
|
|
|
2
2
|
import process from 'process';
|
|
3
3
|
import os from 'os';
|
|
4
4
|
import path from 'path';
|
|
5
|
-
import util from 'util';
|
|
6
5
|
import { glob } from 'glob';
|
|
7
6
|
import { SOURCE_DIR } from './constants';
|
|
8
7
|
|
|
9
|
-
|
|
10
8
|
export function isWSL() {
|
|
11
9
|
if (process.platform !== 'linux') {
|
|
12
10
|
return false;
|
|
@@ -21,7 +19,7 @@ export function isWSL() {
|
|
|
21
19
|
} catch {
|
|
22
20
|
return false;
|
|
23
21
|
}
|
|
24
|
-
}
|
|
22
|
+
}
|
|
25
23
|
|
|
26
24
|
export function getPackageJson() {
|
|
27
25
|
return require(path.resolve(process.cwd(), 'package.json'));
|
|
@@ -40,7 +38,8 @@ export function hasReadme() {
|
|
|
40
38
|
export async function getEntries(): Promise<Record<string, string>> {
|
|
41
39
|
const pluginsJson = await glob('**/src/**/plugin.json', { absolute: true });
|
|
42
40
|
|
|
43
|
-
const plugins = await Promise.all(
|
|
41
|
+
const plugins = await Promise.all(
|
|
42
|
+
pluginsJson.map((pluginJson) => {
|
|
44
43
|
const folder = path.dirname(pluginJson);
|
|
45
44
|
return glob(`${folder}/module.{ts,tsx,js,jsx}`, { absolute: true });
|
|
46
45
|
})
|
|
@@ -97,7 +97,7 @@ const config = async (env): Promise<Configuration> => {
|
|
|
97
97
|
},
|
|
98
98
|
{
|
|
99
99
|
test: /\.css$/,
|
|
100
|
-
use: [
|
|
100
|
+
use: ['style-loader', 'css-loader'],
|
|
101
101
|
},
|
|
102
102
|
{
|
|
103
103
|
test: /\.s[ac]ss$/,
|
|
@@ -207,7 +207,6 @@ const config = async (env): Promise<Configuration> => {
|
|
|
207
207
|
}
|
|
208
208
|
|
|
209
209
|
return baseConfig;
|
|
210
|
-
|
|
211
210
|
};
|
|
212
211
|
|
|
213
212
|
export default config;
|
package/templates/common/.nvmrc
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
18
|