Skip to content

Commit 471261a

Browse files
github-actions[bot]grafana-plugins-platform-bot[bot]zoltanbedi
authored
chore: bump @grafana/create-plugin configuration to 5.25.8 (#496)
Bumps [`@grafana/create-plugin`](https://github.com/grafana/plugin-tools/tree/main/packages/create-plugin) configuration from 5.12.4 to 5.25.8. **Notes for reviewer:** This is an auto-generated PR which ran `@grafana/create-plugin update`. Please consult the create-plugin [CHANGELOG.md](https://github.com/grafana/plugin-tools/blob/main/packages/create-plugin/CHANGELOG.md) to understand what may have changed. Please review the changes thoroughly before merging. --------- Co-authored-by: grafana-plugins-platform-bot[bot] <144369747+grafana-plugins-platform-bot[bot]@users.noreply.github.com> Co-authored-by: Zoltán Bedi <[email protected]>
1 parent 7714fdb commit 471261a

33 files changed

+14849
-10183
lines changed

.config/.cprc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"version": "5.12.4"
2+
"version": "5.25.8"
33
}

.config/.eslintrc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* ⚠️⚠️⚠️ THIS FILE WAS SCAFFOLDED BY `@grafana/create-plugin`. DO NOT EDIT THIS FILE DIRECTLY. ⚠️⚠️⚠️
33
*
44
* In order to extend the configuration follow the steps in
5-
* https://grafana.com/developers/plugin-tools/get-started/set-up-development-environment#extend-the-eslint-config
5+
* https://grafana.com/developers/plugin-tools/how-to-guides/extend-configurations#extend-the-eslint-config
66
*/
77
{
88
"extends": ["@grafana/eslint-config"],
@@ -12,10 +12,9 @@
1212
},
1313
"overrides": [
1414
{
15-
"plugins": ["deprecation"],
1615
"files": ["src/**/*.{ts,tsx}"],
1716
"rules": {
18-
"deprecation/deprecation": "warn"
17+
"@typescript-eslint/no-deprecated": "warn"
1918
},
2019
"parserOptions": {
2120
"project": "./tsconfig.json"
@@ -24,8 +23,8 @@
2423
{
2524
"files": ["./tests/**/*"],
2625
"rules": {
27-
"react-hooks/rules-of-hooks": "off",
28-
},
26+
"react-hooks/rules-of-hooks": "off"
27+
}
2928
}
3029
]
3130
}

.config/README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ We are going to use [`webpack-merge`](https://github.com/survivejs/webpack-merge
106106
// webpack.config.ts
107107
import type { Configuration } from 'webpack';
108108
import { merge } from 'webpack-merge';
109-
import grafanaConfig from './.config/webpack/webpack.config';
109+
import grafanaConfig, { type Env } from './.config/webpack/webpack.config';
110110

111-
const config = async (env): Promise<Configuration> => {
111+
const config = async (env: Env): Promise<Configuration> => {
112112
const baseConfig = await grafanaConfig(env);
113113

114114
return merge(baseConfig, {
@@ -151,9 +151,10 @@ version: '3.7'
151151

152152
services:
153153
grafana:
154-
container_name: 'myorg-basic-app'
154+
extends:
155+
file: .config/docker-compose-base.yaml
156+
service: grafana
155157
build:
156-
context: ./.config
157158
args:
158159
grafana_version: ${GRAFANA_VERSION:-9.1.2}
159160
grafana_image: ${GRAFANA_IMAGE:-grafana}

.config/docker-compose-base.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
services:
2+
grafana:
3+
user: root
4+
container_name: 'grafana-github-datasource'
5+
6+
build:
7+
context: .
8+
args:
9+
grafana_image: ${GRAFANA_IMAGE:-grafana-enterprise}
10+
grafana_version: ${GRAFANA_VERSION:-12.1.0}
11+
development: ${DEVELOPMENT:-false}
12+
anonymous_auth_enabled: ${ANONYMOUS_AUTH_ENABLED:-true}
13+
ports:
14+
- 3000:3000/tcp
15+
- 2345:2345/tcp # delve
16+
security_opt:
17+
- 'apparmor:unconfined'
18+
- 'seccomp:unconfined'
19+
cap_add:
20+
- SYS_PTRACE
21+
volumes:
22+
- ../dist:/var/lib/grafana/plugins/grafana-github-datasource
23+
- ../provisioning:/etc/grafana/provisioning
24+
- ..:/root/grafana-github-datasource
25+
26+
environment:
27+
NODE_ENV: development
28+
GF_LOG_FILTERS: plugin.grafana-github-datasource:debug
29+
GF_LOG_LEVEL: debug
30+
GF_DATAPROXY_LOGGING: 1
31+
GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS: grafana-github-datasource

.config/jest-setup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* ⚠️⚠️⚠️ THIS FILE WAS SCAFFOLDED BY `@grafana/create-plugin`. DO NOT EDIT THIS FILE DIRECTLY. ⚠️⚠️⚠️
33
*
44
* In order to extend the configuration follow the steps in
5-
* https://grafana.com/developers/plugin-tools/get-started/set-up-development-environment#extend-the-jest-config
5+
* https://grafana.com/developers/plugin-tools/how-to-guides/extend-configurations#extend-the-jest-config
66
*/
77

88
import '@testing-library/jest-dom';

.config/jest.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* ⚠️⚠️⚠️ THIS FILE WAS SCAFFOLDED BY `@grafana/create-plugin`. DO NOT EDIT THIS FILE DIRECTLY. ⚠️⚠️⚠️
33
*
44
* In order to extend the configuration follow the steps in
5-
* https://grafana.com/developers/plugin-tools/get-started/set-up-development-environment#extend-the-jest-config
5+
* https://grafana.com/developers/plugin-tools/how-to-guides/extend-configurations#extend-the-jest-config
66
*/
77

88
const path = require('path');
@@ -40,4 +40,5 @@ module.exports = {
4040
// Jest will throw `Cannot use import statement outside module` if it tries to load an
4141
// ES module without it being transformed first. ./config/README.md#esm-errors-with-jest
4242
transformIgnorePatterns: [nodeModulesToTransform(grafanaESModules)],
43+
watchPathIgnorePatterns: ['<rootDir>/node_modules', '<rootDir>/dist'],
4344
};

.config/jest/utils.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,18 @@ const nodeModulesToTransform = (moduleNames) => `node_modules\/(?!.*(${moduleNam
1414
const grafanaESModules = [
1515
'.pnpm', // Support using pnpm symlinked packages
1616
'@grafana/schema',
17+
'@wojtekmaj/date-utils',
1718
'd3',
1819
'd3-color',
1920
'd3-force',
2021
'd3-interpolate',
2122
'd3-scale-chromatic',
23+
'get-user-locale',
24+
'marked',
25+
'memoize',
26+
'mimic-function',
2227
'ol',
28+
'react-calendar',
2329
'react-colorful',
2430
'rxjs',
2531
'uuid',

.config/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* ⚠️⚠️⚠️ THIS FILE WAS SCAFFOLDED BY `@grafana/create-plugin`. DO NOT EDIT THIS FILE DIRECTLY. ⚠️⚠️⚠️
33
*
44
* In order to extend the configuration follow the steps in
5-
* https://grafana.com/developers/plugin-tools/get-started/set-up-development-environment#extend-the-typescript-config
5+
* https://grafana.com/developers/plugin-tools/how-to-guides/extend-configurations#extend-the-typescript-config
66
*/
77
{
88
"compilerOptions": {

.config/types/bundler-rules.d.ts

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// Image declarations
2+
declare module '*.gif' {
3+
const src: string;
4+
export default src;
5+
}
6+
7+
declare module '*.jpg' {
8+
const src: string;
9+
export default src;
10+
}
11+
12+
declare module '*.jpeg' {
13+
const src: string;
14+
export default src;
15+
}
16+
17+
declare module '*.png' {
18+
const src: string;
19+
export default src;
20+
}
21+
22+
declare module '*.webp' {
23+
const src: string;
24+
export default src;
25+
}
26+
27+
declare module '*.svg' {
28+
const src: string;
29+
export default src;
30+
}
31+
32+
// Font declarations
33+
declare module '*.woff';
34+
declare module '*.woff2';
35+
declare module '*.eot';
36+
declare module '*.ttf';
37+
declare module '*.otf';

.config/types/webpack-plugins.d.ts

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
declare module 'replace-in-file-webpack-plugin' {
2+
import { Compiler, Plugin } from 'webpack';
3+
4+
interface ReplaceRule {
5+
search: string | RegExp;
6+
replace: string | ((match: string) => string);
7+
}
8+
9+
interface ReplaceOption {
10+
dir?: string;
11+
files?: string[];
12+
test?: RegExp | RegExp[];
13+
rules: ReplaceRule[];
14+
}
15+
16+
class ReplaceInFilePlugin extends Plugin {
17+
constructor(options?: ReplaceOption[]);
18+
options: ReplaceOption[];
19+
apply(compiler: Compiler): void;
20+
}
21+
22+
export = ReplaceInFilePlugin;
23+
}
24+
25+
declare module 'webpack-livereload-plugin' {
26+
import { ServerOptions } from 'https';
27+
import { Compiler, Plugin, Stats, Compilation } from 'webpack';
28+
29+
interface Options extends Pick<ServerOptions, 'cert' | 'key' | 'pfx'> {
30+
/**
31+
* protocol for livereload `<script>` src attribute value
32+
* @default protocol of the page, either `http` or `https`
33+
*/
34+
protocol?: string | undefined;
35+
/**
36+
* The desired port for the livereload server.
37+
* If you define port 0, an available port will be searched for, starting from 35729.
38+
* @default 35729
39+
*/
40+
port?: number | undefined;
41+
/**
42+
* he desired hostname for the appended `<script>` (if present) to point to
43+
* @default hostname of the page, like `localhost` or 10.0.2.2
44+
*/
45+
hostname?: string | undefined;
46+
/**
47+
* livereload `<script>` automatically to `<head>`.
48+
* @default false
49+
*/
50+
appendScriptTag?: boolean | undefined;
51+
/**
52+
* RegExp of files to ignore. Null value means ignore nothing.
53+
* It is also possible to define an array and use multiple anymatch patterns
54+
*/
55+
ignore?: RegExp | RegExp[] | null | undefined;
56+
/**
57+
* amount of milliseconds by which to delay the live reload (in case build takes longer)
58+
* @default 0
59+
*/
60+
delay?: number | undefined;
61+
/**
62+
* create hash for each file source and only notify livereload if hash has changed
63+
* @default false
64+
*/
65+
useSourceHash?: boolean | undefined;
66+
}
67+
68+
class LiveReloadPlugin extends Plugin {
69+
readonly isRunning: boolean;
70+
constructor(options?: Options);
71+
72+
apply(compiler: Compiler): void;
73+
74+
start(watching: any, cb: () => void): void;
75+
done(stats: Stats): void;
76+
failed(): void;
77+
autoloadJs(): string;
78+
scriptTag(source: string): string;
79+
applyCompilation(compilation: Compilation): void;
80+
}
81+
82+
export = LiveReloadPlugin;
83+
}

0 commit comments

Comments
 (0)