Skip to content

Commit 42d9c0c

Browse files
authored
Merge pull request #50 from netdata/chore/upgrade-packages
Chore/upgrade packages
2 parents 90be95d + 05b8749 commit 42d9c0c

File tree

3 files changed

+2119
-1641
lines changed

3 files changed

+2119
-1641
lines changed

package.json

Lines changed: 38 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -19,61 +19,60 @@
1919
"devDependencies": {
2020
"@grafana/eslint-config": "^9.0.0",
2121
"@grafana/tsconfig": "^2.0.1",
22-
"@stylistic/eslint-plugin-ts": "^2.9.0",
23-
"@swc/core": "^1.3.90",
24-
"@swc/helpers": "^0.5.0",
25-
"@swc/jest": "^0.2.26",
26-
"@testing-library/jest-dom": "6.1.4",
27-
"@testing-library/react": "14.0.0",
22+
"@stylistic/eslint-plugin-ts": "^4.4.1",
23+
"@swc/core": "^1.15.11",
24+
"@swc/helpers": "^0.5.18",
25+
"@swc/jest": "^0.2.39",
26+
"@testing-library/jest-dom": "6.9.1",
27+
"@testing-library/react": "16.3.2",
2828
"@testing-library/react-hooks": "^8.0.1",
29-
"@types/jest": "^29.5.0",
30-
"@types/node": "^20.8.7",
29+
"@types/jest": "^30.0.0",
30+
"@types/node": "^25.1.0",
3131
"@types/pubsub-js": "^1.8.3",
32-
"@types/testing-library__jest-dom": "5.14.8",
33-
"@typescript-eslint/eslint-plugin": "^6.18.0",
34-
"@typescript-eslint/parser": "^6.18.0",
35-
"copy-webpack-plugin": "^11.0.0",
36-
"css-loader": "^6.7.3",
37-
"eslint": "^8.0.0",
38-
"eslint-config-prettier": "^8.8.0",
39-
"eslint-plugin-deprecation": "^2.0.0",
40-
"eslint-plugin-jsdoc": "^46.8.0",
32+
"@typescript-eslint/eslint-plugin": "^8.54.0",
33+
"@typescript-eslint/parser": "^8.54.0",
34+
"copy-webpack-plugin": "^13.0.1",
35+
"css-loader": "^7.1.3",
36+
"eslint": "^9.39.2",
37+
"eslint-config-prettier": "^10.1.8",
38+
"eslint-plugin-deprecation": "^3.0.0",
39+
"eslint-plugin-jsdoc": "^62.4.1",
4140
"eslint-plugin-react": "^7.33.0",
42-
"eslint-plugin-react-hooks": "^4.6.0",
43-
"eslint-webpack-plugin": "^4.0.1",
44-
"fork-ts-checker-webpack-plugin": "^8.0.0",
45-
"glob": "^10.2.7",
41+
"eslint-plugin-react-hooks": "^7.0.1",
42+
"eslint-webpack-plugin": "^5.0.2",
43+
"fork-ts-checker-webpack-plugin": "^9.1.0",
44+
"glob": "^13.0.0",
4645
"identity-obj-proxy": "3.0.0",
4746
"imports-loader": "^5.0.0",
48-
"jest": "^29.7.0",
47+
"jest": "^30.2.0",
4948
"jest-environment-jsdom": "30.2.0",
50-
"prettier": "^2.8.7",
49+
"prettier": "^3.8.1",
5150
"replace-in-file-webpack-plugin": "^1.0.6",
52-
"sass": "1.63.2",
53-
"sass-loader": "13.3.1",
54-
"style-loader": "3.3.3",
55-
"swc-loader": "^0.2.3",
56-
"terser-webpack-plugin": "^5.3.10",
51+
"sass": "1.97.3",
52+
"sass-loader": "16.0.6",
53+
"style-loader": "4.0.0",
54+
"swc-loader": "^0.2.7",
55+
"terser-webpack-plugin": "^5.3.16",
5756
"ts-node": "^10.9.2",
58-
"typescript": "5.5.4",
59-
"webpack": "^5.94.0",
60-
"webpack-cli": "^5.1.4",
57+
"typescript": "5.9.3",
58+
"webpack": "^5.104.1",
59+
"webpack-cli": "^6.0.1",
6160
"webpack-livereload-plugin": "^3.0.2",
62-
"webpack-subresource-integrity": "^5.1.0",
61+
"webpack-subresource-integrity": "^5.2.0-rc.1",
6362
"webpack-virtual-modules": "^0.6.2"
6463
},
6564
"engines": {
6665
"node": ">=14"
6766
},
6867
"dependencies": {
69-
"@emotion/css": "11.10.6",
70-
"@grafana/data": "12.2.1",
71-
"@grafana/runtime": "^12.2.1",
72-
"@grafana/schema": "^12.2.1",
73-
"@grafana/ui": "12.2.1",
68+
"@emotion/css": "11.13.5",
69+
"@grafana/data": "12.3.2",
70+
"@grafana/runtime": "^12.3.2",
71+
"@grafana/schema": "^12.3.2",
72+
"@grafana/ui": "12.3.2",
7473
"pubsub-js": "^1.9.4",
75-
"react": "18.2.0",
76-
"react-dom": "18.2.0"
74+
"react": "19.2.4",
75+
"react-dom": "19.2.4"
7776
},
7877
"packageManager": "yarn@1.22.21"
7978
}

src/shared/utils/request.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ type RequestParamType = {
1212
data?: { [key: string]: any };
1313
};
1414

15-
const request = async ({ method, path, baseUrl, data }: RequestParamType) => {
16-
const result = await getBackendSrv().datasourceRequest({
15+
const request = async <T = any>({ method, path, baseUrl, data }: RequestParamType) => {
16+
const result = await getBackendSrv().datasourceRequest<T>({
1717
method,
1818
url: `${baseUrl}/base${path}`,
1919
data,
@@ -22,10 +22,10 @@ const request = async ({ method, path, baseUrl, data }: RequestParamType) => {
2222
return result;
2323
};
2424

25-
export const Get = async ({ path, baseUrl }: Pick<RequestParamType, 'path' | 'baseUrl'>) => {
26-
return await request({ method: 'GET', path, baseUrl });
25+
export const Get = async <T = any>({ path, baseUrl }: Pick<RequestParamType, 'path' | 'baseUrl'>) => {
26+
return await request<T>({ method: 'GET', path, baseUrl });
2727
};
2828

29-
export const Post = async ({ path, baseUrl, data }: Pick<RequestParamType, 'path' | 'baseUrl' | 'data'>) => {
30-
return await request({ method: 'POST', path, baseUrl, data });
29+
export const Post = async <T = any>({ path, baseUrl, data }: Pick<RequestParamType, 'path' | 'baseUrl' | 'data'>) => {
30+
return await request<T>({ method: 'POST', path, baseUrl, data });
3131
};

0 commit comments

Comments
 (0)