diff --git a/package.json b/package.json index 4b9a7c47a12..f3e771aa26f 100644 --- a/package.json +++ b/package.json @@ -315,7 +315,7 @@ "@react-aria/overlays": "3.27.3", "@react-aria/utils": "3.29.1", "@react-awesome-query-builder/ui": "6.6.15", - "@reduxjs/toolkit": "2.5.1", + "@reduxjs/toolkit": "2.8.2", "@visx/event": "3.12.0", "@visx/gradient": "3.12.0", "@visx/group": "3.12.0", diff --git a/packages/grafana-prometheus/package.json b/packages/grafana-prometheus/package.json index a4250666abd..2927ed8e76c 100644 --- a/packages/grafana-prometheus/package.json +++ b/packages/grafana-prometheus/package.json @@ -54,7 +54,7 @@ "@lezer/highlight": "1.2.1", "@lezer/lr": "1.4.2", "@prometheus-io/lezer-promql": "0.305.0", - "@reduxjs/toolkit": "2.5.1", + "@reduxjs/toolkit": "2.8.2", "@types/debounce-promise": "3.1.9", "@types/lodash": "4.17.20", "@types/react": "18.3.18", diff --git a/public/app/features/migrate-to-cloud/api/index.ts b/public/app/features/migrate-to-cloud/api/index.ts index 31934637db5..b7087cde2b5 100644 --- a/public/app/features/migrate-to-cloud/api/index.ts +++ b/public/app/features/migrate-to-cloud/api/index.ts @@ -84,16 +84,27 @@ export const cloudMigrationAPI = generatedAPI }, }); -function suppressErrorsOnQuery( - endpoint: EndpointDefinition -) { +function suppressErrorsOnQuery< + QueryArg, + BaseQuery extends BaseQueryFn, + TagTypes extends string, + ResultType, + ReducerPath extends string, + PageParam, +>(endpoint: EndpointDefinition) { if (!endpoint.query) { return; } + // internal type from rtk-query that isn't exported + type InfiniteQueryCombinedArg = { + queryArg: QueryArg; + pageParam: PageParam; + }; + const originalQuery = endpoint.query; - endpoint.query = (...args) => { - const baseQuery = originalQuery(...args); + endpoint.query = (arg: QueryArg & InfiniteQueryCombinedArg) => { + const baseQuery = originalQuery(arg); baseQuery.showErrorAlert = false; return baseQuery; }; diff --git a/yarn.lock b/yarn.lock index de11304870d..60968a094be 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3471,7 +3471,7 @@ __metadata: "@lezer/highlight": "npm:1.2.1" "@lezer/lr": "npm:1.4.2" "@prometheus-io/lezer-promql": "npm:0.305.0" - "@reduxjs/toolkit": "npm:2.5.1" + "@reduxjs/toolkit": "npm:2.8.2" "@rollup/plugin-dynamic-import-vars": "npm:2.1.5" "@rollup/plugin-image": "npm:3.0.3" "@rollup/plugin-json": "npm:6.1.0" @@ -6683,10 +6683,12 @@ __metadata: languageName: node linkType: hard -"@reduxjs/toolkit@npm:2.5.1": - version: 2.5.1 - resolution: "@reduxjs/toolkit@npm:2.5.1" +"@reduxjs/toolkit@npm:2.8.2": + version: 2.8.2 + resolution: "@reduxjs/toolkit@npm:2.8.2" dependencies: + "@standard-schema/spec": "npm:^1.0.0" + "@standard-schema/utils": "npm:^0.3.0" immer: "npm:^10.0.3" redux: "npm:^5.0.1" redux-thunk: "npm:^3.1.0" @@ -6699,7 +6701,7 @@ __metadata: optional: true react-redux: optional: true - checksum: 10/f291b560a16d66092086b222aa950fc19493d6775ce0359d263d99486302fbf013eec1989b1e87921b0d84e5008a8f1a029522999cfb3be485cfa3c015fef197 + checksum: 10/7834b7b91a364f98f5ffa932b1027179d9a0a27a145206a7b5256304acafe5516c6622540656435e310e4a08e579eecaee5c2582442c4ef6a4dbe6f417b7d395 languageName: node linkType: hard @@ -7268,6 +7270,20 @@ __metadata: languageName: node linkType: hard +"@standard-schema/spec@npm:^1.0.0": + version: 1.0.0 + resolution: "@standard-schema/spec@npm:1.0.0" + checksum: 10/aee780cc1431888ca4b9aba9b24ffc8f3073fc083acc105e3951481478a2f4dc957796931b2da9e2d8329584cf211e4542275f188296c1cdff3ed44fd93a8bc8 + languageName: node + linkType: hard + +"@standard-schema/utils@npm:^0.3.0": + version: 0.3.0 + resolution: "@standard-schema/utils@npm:0.3.0" + checksum: 10/7084f875d322792f2e0a5904009434c8374b9345b09ba89828b68fd56fa3c2b366d35bf340d9e8c72736ef01793c2f70d350c372ed79845dc3566c58d34b4b51 + languageName: node + linkType: hard + "@storybook/addon-a11y@npm:^8.6.2": version: 8.6.2 resolution: "@storybook/addon-a11y@npm:8.6.2" @@ -18249,7 +18265,7 @@ __metadata: "@react-types/menu": "npm:3.9.14" "@react-types/overlays": "npm:3.8.12" "@react-types/shared": "npm:3.27.0" - "@reduxjs/toolkit": "npm:2.5.1" + "@reduxjs/toolkit": "npm:2.8.2" "@rsdoctor/webpack-plugin": "npm:^0.4.6" "@rtk-query/codegen-openapi": "npm:^2.0.0" "@rtsao/plugin-proposal-class-properties": "npm:7.0.1-patch.1"