Skip to content

Commit 2a34ce5

Browse files
github-actions[bot]grafana-plugins-platform-bot[bot]itsmylife
authored
chore: bump @grafana/create-plugin configuration to 5.26.9 (#512)
Bumps [`@grafana/create-plugin`](https://github.com/grafana/plugin-tools/tree/main/packages/create-plugin) configuration from 5.25.8 to 5.26.9. **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: ismail simsek <ismailsimsek09@gmail.com>
1 parent 521a706 commit 2a34ce5

File tree

9 files changed

+403
-342
lines changed

9 files changed

+403
-342
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.25.8"
2+
"version": "5.26.9"
33
}

.config/bundler/externals.ts

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import type { Configuration, ExternalItemFunctionData } from 'webpack';
2+
3+
type ExternalsType = Configuration['externals'];
4+
5+
export const externals: ExternalsType = [
6+
// Required for dynamic publicPath resolution
7+
{ 'amd-module': 'module' },
8+
'lodash',
9+
'jquery',
10+
'moment',
11+
'slate',
12+
'emotion',
13+
'@emotion/react',
14+
'@emotion/css',
15+
'prismjs',
16+
'slate-plain-serializer',
17+
'@grafana/slate-react',
18+
'react',
19+
'react-dom',
20+
'react-redux',
21+
'redux',
22+
'rxjs',
23+
'i18next',
24+
'react-router',
25+
'd3',
26+
'angular',
27+
/^@grafana\/ui/i,
28+
/^@grafana\/runtime/i,
29+
/^@grafana\/data/i,
30+
31+
// Mark legacy SDK imports as external if their name starts with the "grafana/" prefix
32+
({ request }: ExternalItemFunctionData, callback: (error?: Error, result?: string) => void) => {
33+
const prefix = 'grafana/';
34+
const hasPrefix = (request: string) => request.indexOf(prefix) === 0;
35+
const stripPrefix = (request: string) => request.slice(prefix.length);
36+
37+
if (request && hasPrefix(request)) {
38+
return callback(undefined, stripPrefix(request));
39+
}
40+
41+
callback();
42+
},
43+
];

.config/docker-compose-base.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ services:
77
context: .
88
args:
99
grafana_image: ${GRAFANA_IMAGE:-grafana-enterprise}
10-
grafana_version: ${GRAFANA_VERSION:-12.1.0}
10+
grafana_version: ${GRAFANA_VERSION:-12.2.0}
1111
development: ${DEVELOPMENT:-false}
1212
anonymous_auth_enabled: ${ANONYMOUS_AUTH_ENABLED:-true}
1313
ports:

.config/webpack/webpack.config.ts

Lines changed: 6 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@ import VirtualModulesPlugin from 'webpack-virtual-modules';
1919
import { BuildModeWebpackPlugin } from './BuildModeWebpackPlugin.ts';
2020
import { DIST_DIR, SOURCE_DIR } from './constants.ts';
2121
import { getCPConfigVersion, getEntries, getPackageJson, getPluginJson, hasReadme, isWSL } from './utils.ts';
22+
import { externals } from '../bundler/externals.ts';
2223

2324
const pluginJson = getPluginJson();
2425
const cpVersion = getCPConfigVersion();
26+
const pluginVersion = getPackageJson().version;
2527

2628
const virtualPublicPath = new VirtualModulesPlugin({
2729
'node_modules/grafana-public-path.js': `
@@ -54,44 +56,7 @@ const config = async (env: Env): Promise<Configuration> => {
5456

5557
entry: await getEntries(),
5658

57-
externals: [
58-
// Required for dynamic publicPath resolution
59-
{ 'amd-module': 'module' },
60-
'lodash',
61-
'jquery',
62-
'moment',
63-
'slate',
64-
'emotion',
65-
'@emotion/react',
66-
'@emotion/css',
67-
'prismjs',
68-
'slate-plain-serializer',
69-
'@grafana/slate-react',
70-
'react',
71-
'react-dom',
72-
'react-redux',
73-
'redux',
74-
'rxjs',
75-
'react-router',
76-
'd3',
77-
'angular',
78-
/^@grafana\/ui/i,
79-
/^@grafana\/runtime/i,
80-
/^@grafana\/data/i,
81-
82-
// Mark legacy SDK imports as external if their name starts with the "grafana/" prefix
83-
({ request }, callback) => {
84-
const prefix = 'grafana/';
85-
const hasPrefix = (request: string) => request.indexOf(prefix) === 0;
86-
const stripPrefix = (request: string) => request.substr(prefix.length);
87-
88-
if (request && hasPrefix(request)) {
89-
return callback(undefined, stripPrefix(request));
90-
}
91-
92-
callback();
93-
},
94-
],
59+
externals,
9560

9661
// Support WebAssembly according to latest spec - makes WebAssembly module async
9762
experiments: {
@@ -195,7 +160,8 @@ const config = async (env: Env): Promise<Configuration> => {
195160
virtualPublicPath,
196161
// Insert create plugin version information into the bundle
197162
new webpack.BannerPlugin({
198-
banner: '/* [create-plugin] version: ' + cpVersion + ' */',
163+
banner: `/* [create-plugin] version: ${cpVersion} */
164+
/* [create-plugin] plugin: ${pluginJson.id}@${pluginVersion} */`,
199165
raw: true,
200166
entryOnly: true,
201167
}),
@@ -225,7 +191,7 @@ const config = async (env: Env): Promise<Configuration> => {
225191
rules: [
226192
{
227193
search: /\%VERSION\%/g,
228-
replace: getPackageJson().version,
194+
replace: pluginVersion,
229195
},
230196
{
231197
search: /\%TODAY\%/g,

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,11 @@ mage_output_file.go
1717

1818
# provisioning
1919
/provisioning/
20+
21+
.pnp.*
22+
.yarn/*
23+
!.yarn/patches
24+
!.yarn/plugins
25+
!.yarn/releases
26+
!.yarn/sdks
27+
!.yarn/versions

.yarn/install-state.gz

-1.37 MB
Binary file not shown.

package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@
2121
},
2222
"dependencies": {
2323
"@emotion/css": "11.10.6",
24-
"@grafana/data": "^12.1.0",
24+
"@grafana/data": "^12.2.0",
25+
"@grafana/i18n": "^12.2.0",
2526
"@grafana/plugin-ui": "^0.10.9",
26-
"@grafana/runtime": "^12.1.0",
27-
"@grafana/schema": "^12.1.0",
28-
"@grafana/ui": "^12.1.0",
27+
"@grafana/runtime": "^12.2.0",
28+
"@grafana/schema": "^12.2.0",
29+
"@grafana/ui": "^12.2.0",
2930
"react": "18.2.0",
3031
"react-dom": "18.2.0",
3132
"tslib": "2.5.3"
@@ -34,8 +35,8 @@
3435
"@babel/core": "^7.21.4",
3536
"@changesets/cli": "^2.27.12",
3637
"@grafana/e2e-selectors": "12.1.0",
37-
"@grafana/eslint-config": "^8.0.0",
38-
"@grafana/plugin-e2e": "^2.1.7",
38+
"@grafana/eslint-config": "^8.2.0",
39+
"@grafana/plugin-e2e": "^2.1.13",
3940
"@grafana/plugin-meta-extractor": "^0.0.2",
4041
"@grafana/tsconfig": "^2.0.0",
4142
"@playwright/test": "^1.52.0",

src/components/Filters.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,13 @@ export const Filters: React.FC<Props> = (props: Props) => {
9999
/>
100100
{loading === i && <div className={styles.loading}>Loading...</div>}
101101
</span>
102-
<Button variant="secondary" onClick={remove(i)} icon="trash-alt" />
102+
<Button variant="secondary" aria-label="Remove filter" onClick={remove(i)} icon="trash-alt" />
103103
{list.length > 1 && i !== list.length - 1 && (
104104
<Segment onChange={onConjunctionChange(i)} options={opList} value={filter.conjunction || 'and'}></Segment>
105105
)}
106106
</>
107107
))}
108-
<Button variant="secondary" onClick={add} icon="plus" />
108+
<Button variant="secondary" aria-label="Add filter" onClick={add} icon="plus" />
109109
</>
110110
</InlineFieldRow>
111111
);

0 commit comments

Comments
 (0)