Skip to content

Commit

Permalink
Upgrade dependencies (#133)
Browse files Browse the repository at this point in the history
Signed-off-by: Julien Millau <[email protected]>
  • Loading branch information
devnied authored Feb 17, 2025
1 parent 3fb89b8 commit ab69cb3
Show file tree
Hide file tree
Showing 10 changed files with 1,734 additions and 1,560 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.8.2"
"version": "5.17.0"
}
15 changes: 8 additions & 7 deletions .config/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ ARG grafana_image=grafana-enterprise

FROM grafana/${grafana_image}:${grafana_version}

ARG anonymous_auth_enabled=true
ARG development=false
ARG TARGETARCH

Expand All @@ -14,7 +15,7 @@ ENV DEV "${development}"
# Make it as simple as possible to access the grafana instance for development purposes
# Do NOT enable these settings in a public facing / production grafana instance
ENV GF_AUTH_ANONYMOUS_ORG_ROLE "Admin"
ENV GF_AUTH_ANONYMOUS_ENABLED "true"
ENV GF_AUTH_ANONYMOUS_ENABLED "${anonymous_auth_enabled}"
ENV GF_AUTH_BASIC_ENABLED "false"
# Set development mode so plugins can be loaded without the need to sign
ENV GF_DEFAULT_APP_MODE "development"
Expand All @@ -30,14 +31,14 @@ USER root
# Installing supervisor and inotify-tools
RUN if [ "${development}" = "true" ]; then \
if grep -i -q alpine /etc/issue; then \
apk add supervisor inotify-tools git; \
apk add supervisor inotify-tools git; \
elif grep -i -q ubuntu /etc/issue; then \
DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y supervisor inotify-tools git && \
rm -rf /var/lib/apt/lists/*; \
DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y supervisor inotify-tools git && \
rm -rf /var/lib/apt/lists/*; \
else \
echo 'ERROR: Unsupported base image' && /bin/false; \
echo 'ERROR: Unsupported base image' && /bin/false; \
fi \
fi

Expand Down
5 changes: 3 additions & 2 deletions .config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,10 @@ version: '3.7'

services:
grafana:
container_name: 'myorg-basic-app'
extends:
file: .config/docker-compose-base.yaml
service: grafana
build:
context: ./.config
args:
grafana_version: ${GRAFANA_VERSION:-9.1.2}
grafana_image: ${GRAFANA_IMAGE:-grafana}
Expand Down
1 change: 0 additions & 1 deletion .config/webpack/BuildModeWebpackPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export class BuildModeWebpackPlugin {
const assets = compilation.getAssets();
for (const asset of assets) {
if (asset.name.endsWith('plugin.json')) {
console.log(asset.name);
const pluginJsonString = asset.source.source().toString();
const pluginJsonWithBuildMode = JSON.stringify(
{
Expand Down
27 changes: 14 additions & 13 deletions .config/webpack/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
import path from 'path';
import ReplaceInFileWebpackPlugin from 'replace-in-file-webpack-plugin';
import TerserPlugin from 'terser-webpack-plugin';
import { SubresourceIntegrityPlugin } from 'webpack-subresource-integrity';
import { type Configuration, BannerPlugin } from 'webpack';
import {SubresourceIntegrityPlugin} from 'webpack-subresource-integrity';
import {BannerPlugin, type Configuration} from 'webpack';
import LiveReloadPlugin from 'webpack-livereload-plugin';
import VirtualModulesPlugin from 'webpack-virtual-modules';

import { BuildModeWebpackPlugin } from './BuildModeWebpackPlugin';
import { DIST_DIR, SOURCE_DIR } from './constants';
import { getCPConfigVersion, getEntries, getPackageJson, getPluginJson, hasReadme, isWSL } from './utils';
import {BuildModeWebpackPlugin} from './BuildModeWebpackPlugin';
import {DIST_DIR, SOURCE_DIR} from './constants';
import {getCPConfigVersion, getEntries, getPackageJson, getPluginJson, hasReadme, isWSL} from './utils';

const pluginJson = getPluginJson();
const cpVersion = getCPConfigVersion();
Expand Down Expand Up @@ -176,6 +176,7 @@ const config = async (env): Promise<Configuration> => {
keep: new RegExp(`(.*?_(amd64|arm(64)?)(.exe)?|go_plugin_build_manifest)`),
},
filename: '[name].js',
chunkFilename: env.production ? '[name].js?_cache=[contenthash]' : '[name].js',
library: {
type: 'amd',
},
Expand All @@ -202,14 +203,14 @@ const config = async (env): Promise<Configuration> => {
{ from: 'plugin.json', to: '.' },
{ from: '../LICENSE.txt', to: '.' },
{ from: '../CHANGELOG.md', to: '.', force: true },
{ from: '**/*.json', to: '.' }, // TODO<Add an error for checking the basic structure of the repo>
{ from: '**/*.svg', to: '.', noErrorOnMissing: true }, // Optional
{ from: '**/*.png', to: '.', noErrorOnMissing: true }, // Optional
{ from: '**/*.html', to: '.', noErrorOnMissing: true }, // Optional
{ from: 'img/**/*', to: '.', noErrorOnMissing: true }, // Optional
{ from: 'libs/**/*', to: '.', noErrorOnMissing: true }, // Optional
{ from: 'static/**/*', to: '.', noErrorOnMissing: true }, // Optional
{ from: '**/query_help.md', to: '.', noErrorOnMissing: true }, // Optional
{ from: '**/*.json', to: '.' },
{ from: '**/*.svg', to: '.', noErrorOnMissing: true },
{ from: '**/*.png', to: '.', noErrorOnMissing: true },
{ from: '**/*.html', to: '.', noErrorOnMissing: true },
{ from: 'img/**/*', to: '.', noErrorOnMissing: true },
{ from: 'libs/**/*', to: '.', noErrorOnMissing: true },
{ from: 'static/**/*', to: '.', noErrorOnMissing: true },
{ from: '**/query_help.md', to: '.', noErrorOnMissing: true },
],
}),
// Replace certain template-variables in the README and plugin.json
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
- Rewrite the datasource configuration UI (ease authentication selection).
- Support non encoded private key in the datasource configuration.
- Update deprecated APIs
- Upgrade grafana-plugin-sdk-go to version v0.265.0.
- Upgrade grafana-plugin-sdk-go to version v0.266.0.
- Upgrade gosnowflake to version v1.13.0.
- Upgrade go to version 1.23.
- Upgrade js dependencies.

## 1.9.1

Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ toolchain go1.23.6

require (
github.com/DATA-DOG/go-sqlmock v1.5.2
github.com/grafana/grafana-plugin-sdk-go v0.265.0
github.com/grafana/grafana-plugin-sdk-go v0.266.0
github.com/snowflakedb/gosnowflake v1.13.0
github.com/stretchr/testify v1.10.0
golang.org/x/oauth2 v0.26.0
Expand Down Expand Up @@ -122,7 +122,7 @@ require (
golang.org/x/mod v0.22.0 // indirect
golang.org/x/net v0.34.0 // indirect
golang.org/x/sync v0.11.0 // indirect
golang.org/x/sys v0.29.0 // indirect
golang.org/x/sys v0.30.0 // indirect
golang.org/x/term v0.28.0 // indirect
golang.org/x/text v0.21.0 // indirect
golang.org/x/tools v0.28.0 // indirect
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e h1:JKmoR8x90Iww1
github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
github.com/grafana/grafana-plugin-sdk-go v0.265.0 h1:XshoH8R23Jm9jRreW9R3aOrIVr9vxhCWFyrMe7BFSks=
github.com/grafana/grafana-plugin-sdk-go v0.265.0/go.mod h1:nkN6xI08YcX6CGsgvRA2+19nhXA/ZPuneLMUUElOD80=
github.com/grafana/grafana-plugin-sdk-go v0.266.0 h1:YP+iEpXH3HRX9Xo4NHjsrJhN2W7uVTtkLNzMHYbmiLI=
github.com/grafana/grafana-plugin-sdk-go v0.266.0/go.mod h1:bxkXrBQ4QSmOncsWdIOcpgP+M6wajQNMAPXlbWrqAWY=
github.com/grafana/otel-profiling-go v0.5.1 h1:stVPKAFZSa7eGiqbYuG25VcqYksR6iWvF3YH66t4qL8=
github.com/grafana/otel-profiling-go v0.5.1/go.mod h1:ftN/t5A/4gQI19/8MoWurBEtC6gFw8Dns1sJZ9W4Tls=
github.com/grafana/pyroscope-go/godeltaprof v0.1.8 h1:iwOtYXeeVSAeYefJNaxDytgjKtUuKQbJqgAIjlnicKg=
Expand Down Expand Up @@ -366,8 +366,8 @@ golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU=
golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc=
golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.28.0 h1:/Ts8HFuMR2E6IP/jlo7QVLZHggjKQbhu/7H0LJFr3Gg=
golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
Expand Down
22 changes: 15 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"e2e": "yarn exec cypress install && yarn exec grafana-e2e run",
"e2e:update": "yarn exec cypress install && yarn exec grafana-e2e run --update-screenshots",
"lint": "eslint --cache --ignore-path ./.gitignore --ext .js,.jsx,.ts,.tsx .",
"lint:fix": "yarn run lint --fix",
"lint:fix": "yarn run lint --fix && prettier --write --list-different .",
"server": "docker compose up --build",
"sign": "npx --yes @grafana/sign-plugin@latest",
"start": "yarn watch",
Expand All @@ -22,7 +22,7 @@
"@babel/core": "^7.21.4",
"@grafana/e2e": "^10.0.3",
"@grafana/e2e-selectors": "^10.0.3",
"@grafana/eslint-config": "^7.0.0",
"@grafana/eslint-config": "^8.0.0",
"@grafana/tsconfig": "^2.0.0",
"@swc/core": "^1.3.90",
"@swc/helpers": "^0.5.0",
Expand Down Expand Up @@ -58,17 +58,25 @@
"imports-loader": "^5.0.0",
"terser-webpack-plugin": "^5.3.10",
"webpack-subresource-integrity": "^5.1.0",
"webpack-virtual-modules": "^0.6.2"
"webpack-virtual-modules": "^0.6.2",
"@stylistic/eslint-plugin-ts": "^2.9.0",
"@typescript-eslint/eslint-plugin": "^6.18.0",
"@typescript-eslint/parser": "^6.18.0",
"eslint": "^8.0.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-jsdoc": "^46.8.0",
"eslint-plugin-react": "^7.33.0",
"eslint-plugin-react-hooks": "^4.6.0"
},
"engines": {
"node": ">=14"
},
"dependencies": {
"@emotion/css": "11.10.6",
"@grafana/data": "^11.3.0",
"@grafana/runtime": "^11.3.0",
"@grafana/schema": "^11.3.0",
"@grafana/ui": "^11.3.0",
"@grafana/data": "^11.5.1",
"@grafana/runtime": "^11.5.1",
"@grafana/schema": "^11.5.1",
"@grafana/ui": "^11.5.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"sql-formatter": "^15.2.0",
Expand Down
Loading

0 comments on commit ab69cb3

Please sign in to comment.