Skip to content

Commit 05b8749

Browse files
committed
Remove deprecated package.
1 parent 20b37e3 commit 05b8749

File tree

3 files changed

+8
-16
lines changed

3 files changed

+8
-16
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"@types/jest": "^30.0.0",
3030
"@types/node": "^25.1.0",
3131
"@types/pubsub-js": "^1.8.3",
32-
"@types/testing-library__jest-dom": "6.0.0",
3332
"@typescript-eslint/eslint-plugin": "^8.54.0",
3433
"@typescript-eslint/parser": "^8.54.0",
3534
"copy-webpack-plugin": "^13.0.1",

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
};

yarn.lock

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2153,7 +2153,7 @@
21532153
resolved "https://registry.yarnpkg.com/@tanstack/virtual-core/-/virtual-core-3.13.12.tgz#1dff176df9cc8f93c78c5e46bcea11079b397578"
21542154
integrity sha512-1YBOJfRHV4sXUmWsFSf5rQor4Ss82G8dQWLRbnk3GA4jeP8hQt1hxXh0tmflpC0dz3VgEv/1+qwPyLeWkQuPFA==
21552155

2156-
"@testing-library/jest-dom@*", "@testing-library/jest-dom@6.9.1":
2156+
"@testing-library/jest-dom@6.9.1":
21572157
version "6.9.1"
21582158
resolved "https://registry.yarnpkg.com/@testing-library/jest-dom/-/jest-dom-6.9.1.tgz#7613a04e146dd2976d24ddf019730d57a89d56c2"
21592159
integrity sha512-zIcONa+hVtVSSep9UT3jZ5rizo2BsxgyDYU7WFD5eICBE7no3881HGeb/QkGfsJs6JTkY1aQhT7rIPC7e+0nnA==
@@ -2411,13 +2411,6 @@
24112411
resolved "https://registry.yarnpkg.com/@types/systemjs/-/systemjs-6.15.3.tgz#d758dceafee62d2ed4aad7d07342b145d623e260"
24122412
integrity sha512-STyj2LUevlyVqEQ1wjOORLQTJbNnM2V1DNzmemxVHlOovdKBKqccALDbR9aCcTRThhcXzew88SMbN4SMm6JOcw==
24132413

2414-
"@types/testing-library__jest-dom@6.0.0":
2415-
version "6.0.0"
2416-
resolved "https://registry.yarnpkg.com/@types/testing-library__jest-dom/-/testing-library__jest-dom-6.0.0.tgz#b558b64b80a72130714be1f505c6df482d453690"
2417-
integrity sha512-bnreXCgus6IIadyHNlN/oI5FfX4dWgvGhOPvpr7zzCYDGAPIfvyIoAozMBINmhmsVuqV0cncejF2y5KC7ScqOg==
2418-
dependencies:
2419-
"@testing-library/jest-dom" "*"
2420-
24212414
"@types/tough-cookie@*":
24222415
version "4.0.5"
24232416
resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-4.0.5.tgz#cb6e2a691b70cb177c6e3ae9c1d2e8b2ea8cd304"
@@ -7054,7 +7047,7 @@ react-custom-scrollbars-2@4.5.0:
70547047
prop-types "^15.5.10"
70557048
raf "^3.1.0"
70567049

7057-
"react-data-grid@github:grafana/react-data-grid#a922856b5ede21d55db3fdffb6d38dc76bdc7c58":
7050+
react-data-grid@grafana/react-data-grid#a922856b5ede21d55db3fdffb6d38dc76bdc7c58:
70587051
version "7.0.0-beta.56"
70597052
resolved "https://codeload.github.com/grafana/react-data-grid/tar.gz/a922856b5ede21d55db3fdffb6d38dc76bdc7c58"
70607053
dependencies:

0 commit comments

Comments
 (0)