Skip to content

Commit f331140

Browse files
authoredMay 26, 2025
chore: upgrade tanstack/react-query to 5.77.0 (#18039)
1 parent 2a15aa8 commit f331140

File tree

98 files changed

+523
-577
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+523
-577
lines changed
 

‎site/.storybook/preview.jsx

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import { DecoratorHelpers } from "@storybook/addon-themes";
2828
import isChromatic from "chromatic/isChromatic";
2929
import { StrictMode } from "react";
3030
import { HelmetProvider } from "react-helmet-async";
31-
import { QueryClient, QueryClientProvider, parseQueryArgs } from "react-query";
31+
import { QueryClient, QueryClientProvider } from "react-query";
3232
import { withRouter } from "storybook-addon-remix-react-router";
3333
import "theme/globalFonts";
3434
import themes from "../src/theme";
@@ -114,20 +114,7 @@ function withQuery(Story, { parameters }) {
114114

115115
if (parameters.queries) {
116116
for (const query of parameters.queries) {
117-
if (query.isError) {
118-
// Based on `setQueryData`, but modified to set the result as an error.
119-
const cache = queryClient.getQueryCache();
120-
const parsedOptions = parseQueryArgs(query.key);
121-
const defaultedOptions = queryClient.defaultQueryOptions(parsedOptions);
122-
// Adds an uninitialized response to the cache, which we can now mutate.
123-
const cachedQuery = cache.build(queryClient, defaultedOptions);
124-
// Setting `manual` prevents retries.
125-
cachedQuery.setData(undefined, { manual: true });
126-
// Set the `error` value and the appropriate status.
127-
cachedQuery.setState({ error: query.data, status: "error" });
128-
} else {
129-
queryClient.setQueryData(query.key, query.data);
130-
}
117+
queryClient.setQueryData(query.key, query.data);
131118
}
132119
}
133120

‎site/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
"@radix-ui/react-slot": "1.1.1",
7070
"@radix-ui/react-switch": "1.1.1",
7171
"@radix-ui/react-tooltip": "1.1.7",
72-
"@tanstack/react-query-devtools": "4.35.3",
72+
"@tanstack/react-query-devtools": "5.77.0",
7373
"@xterm/addon-canvas": "0.7.0",
7474
"@xterm/addon-fit": "0.10.0",
7575
"@xterm/addon-unicode11": "0.8.0",
@@ -103,7 +103,7 @@
103103
"react-dom": "18.3.1",
104104
"react-helmet-async": "2.0.5",
105105
"react-markdown": "9.0.3",
106-
"react-query": "npm:@tanstack/react-query@4.35.3",
106+
"react-query": "npm:@tanstack/react-query@5.77.0",
107107
"react-router-dom": "6.26.2",
108108
"react-syntax-highlighter": "15.6.1",
109109
"react-virtualized-auto-sizer": "1.0.24",

0 commit comments

Comments
 (0)