Skip to content

Commit

Permalink
Plugin migrations and bump
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksongoode committed Sep 20, 2024
1 parent 8f40e62 commit e86be12
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .config/.cprc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "5.2.1"
"version": "5.3.10"
}
2 changes: 1 addition & 1 deletion .config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,6 @@ services:
grafana_image: ${GRAFANA_IMAGE:-grafana}
```
In this example, we assign the environment variable `GRAFANA_IMAGE` to the build arg `grafana_image` with a default value of `grafana`. This will allow you to set the value while running the docker-compose commands, which might be convenient in some scenarios.
In this example, we assign the environment variable `GRAFANA_IMAGE` to the build arg `grafana_image` with a default value of `grafana`. This will allow you to set the value while running the docker compose commands, which might be convenient in some scenarios.

---
4 changes: 2 additions & 2 deletions .config/jest-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Object.assign(global, { TextDecoder, TextEncoder });
// https://jestjs.io/docs/manual-mocks#mocking-methods-which-are-not-implemented-in-jsdom
Object.defineProperty(global, 'matchMedia', {
writable: true,
value: jest.fn().mockImplementation((query) => ({
value: (query) => ({
matches: false,
media: query,
onchange: null,
Expand All @@ -22,7 +22,7 @@ Object.defineProperty(global, 'matchMedia', {
addEventListener: jest.fn(),
removeEventListener: jest.fn(),
dispatchEvent: jest.fn(),
})),
}),
});

HTMLCanvasElement.prototype.getContext = () => {};
26 changes: 15 additions & 11 deletions .config/webpack/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,18 @@ const config = async (env): Promise<Configuration> => {

module: {
rules: [
// This must come first in the rules array otherwise it breaks sourcemaps.
{
test: /src\/(?:.*\/)?module\.tsx?$/,
use: [
{
loader: 'imports-loader',
options: {
imports: `side-effects grafana-public-path`,
},
},
],
},
{
exclude: /(node_modules)/,
test: /\.[tj]sx?$/,
Expand All @@ -116,17 +128,6 @@ const config = async (env): Promise<Configuration> => {
},
},
},
{
test: /src\/(?:.*\/)?module\.tsx?$/,
use: [
{
loader: 'imports-loader',
options: {
imports: `side-effects grafana-public-path`,
},
},
],
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader'],
Expand Down Expand Up @@ -160,6 +161,9 @@ const config = async (env): Promise<Configuration> => {
format: {
comments: (_, { type, value }) => type === 'comment2' && value.trim().startsWith('[create-plugin]'),
},
compress: {
drop_console: ['log', 'info'],
},
},
}),
],
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"package": "./package.sh",
"release": "tag=$(git describe --abbrev=0) && gh release create ${tag} ./nline-plotlyjs-panel-${tag}.zip ./nline-plotlyjs-panel-${tag}.zip.md5",
"upload": "tag=$(git describe --abbrev=0) && gh release upload ${tag} ./nline-plotlyjs-panel-${tag}.zip ./nline-plotlyjs-panel-${tag}.zip.md5 --clobber",
"server": "docker-compose up --build",
"server": "docker compose up --build",
"sign": "npx --yes @grafana/sign-plugin@latest",
"test": "jest --watch --onlyChanged",
"test:ci": "jest --passWithNoTests --maxWorkers 4",
Expand Down Expand Up @@ -72,7 +72,8 @@
"webpack": "^5.94.0",
"webpack-cli": "^5.1.4",
"webpack-livereload-plugin": "^3.0.2",
"webpack-virtual-modules": "^0.6.2"
"webpack-virtual-modules": "^0.6.2",
"terser-webpack-plugin": "^5.3.10"
},
"dependencies": {
"@emotion/css": "^11.13.0",
Expand Down

0 comments on commit e86be12

Please sign in to comment.