@grafana/create-plugin 2.0.1 → 2.0.3-canary.451.a455f3e.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 +16 -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 +2 -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/package.json +1 -1
- package/templates/common/tsconfig.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
# v2.0.2 (Wed Oct 04 2023)
|
|
2
|
+
|
|
3
|
+
:tada: This release contains work from a new contributor! :tada:
|
|
4
|
+
|
|
5
|
+
Thank you, null[@mikkancso](https://github.com/mikkancso), for all your work!
|
|
6
|
+
|
|
7
|
+
#### 🐛 Bug Fix
|
|
8
|
+
|
|
9
|
+
- Create-plugin: Make baseURL absolute and bump swc/core [#424](https://github.com/grafana/plugin-tools/pull/424) ([@mikkancso](https://github.com/mikkancso))
|
|
10
|
+
|
|
11
|
+
#### Authors: 1
|
|
12
|
+
|
|
13
|
+
- [@mikkancso](https://github.com/mikkancso)
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
1
17
|
# v2.0.1 (Tue Oct 03 2023)
|
|
2
18
|
|
|
3
19
|
#### 🐛 Bug Fix
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grafana/create-plugin",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3-canary.451.a455f3e.0",
|
|
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": "a455f3e34e0d7c2e9775ecce1d1a68b4a6fc6d8e"
|
|
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
|
})
|
|
@@ -82,7 +82,7 @@ const config = async (env): Promise<Configuration> => {
|
|
|
82
82
|
loader: 'swc-loader',
|
|
83
83
|
options: {
|
|
84
84
|
jsc: {
|
|
85
|
-
baseUrl: '
|
|
85
|
+
baseUrl: path.resolve(__dirname, 'src'),
|
|
86
86
|
target: 'es2015',
|
|
87
87
|
loose: false,
|
|
88
88
|
parser: {
|
|
@@ -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$/,
|
package/templates/common/.nvmrc
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
18
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@grafana/e2e-selectors": "{{ grafanaVersion }}",
|
|
24
24
|
"@grafana/eslint-config": "^6.0.0",
|
|
25
25
|
"@grafana/tsconfig": "^1.2.0-rc1",
|
|
26
|
-
"@swc/core": "1.3.
|
|
26
|
+
"@swc/core": "^1.3.90",
|
|
27
27
|
"@swc/helpers": "^0.5.0",
|
|
28
28
|
"@swc/jest": "^0.2.26",
|
|
29
29
|
"@testing-library/jest-dom": "^5.16.5",
|