From 711c00baca4427051fd6b83681c1ec321bcae069 Mon Sep 17 00:00:00 2001 From: Dmitry Gusev Date: Sat, 18 Jan 2025 22:13:30 +0300 Subject: [PATCH] Update react-query to v5 --- package.json | 2 +- ui/App.tsx | 2 +- ui/components/Sync/CheckboxActions.tsx | 2 +- ui/components/Sync/SuspendMessageModal.tsx | 2 +- ui/components/Sync/SyncActions.tsx | 6 +- ui/components/__tests__/Footer.test.tsx | 4 +- ui/contexts/CoreClientContext.tsx | 16 +- .../__tests__/CoreClientContext.test.tsx | 2 +- ui/hooks/Policies.ts | 22 +-- ui/hooks/automations.ts | 16 +- ui/hooks/events.ts | 12 +- ui/hooks/flux.ts | 76 +++++----- ui/hooks/imageautomation.ts | 22 +-- ui/hooks/inventory.ts | 12 +- ui/hooks/notifications.ts | 22 +-- ui/hooks/objects.ts | 22 +-- ui/hooks/policyViolations.ts | 22 +-- ui/hooks/sources.ts | 12 +- ui/hooks/version.ts | 16 +- ui/lib/test-utils.tsx | 2 +- ui/lib/types.ts | 2 +- yarn.lock | 138 +++--------------- 22 files changed, 167 insertions(+), 265 deletions(-) diff --git a/package.json b/package.json index e2a4a126cd..9ccb5f9edf 100644 --- a/package.json +++ b/package.json @@ -55,6 +55,7 @@ "@mui/icons-material": "^6.4.0", "@mui/lab": "^6.0.0-beta.21", "@mui/material": "^6.4.0", + "@tanstack/react-query": "^5.64.1", "@types/styled-components": "^5.1.34", "ansi-styles": "^6.2.1", "d3": "^7.9.0", @@ -75,7 +76,6 @@ "react-is": "^18.0.0", "react-lottie-player": "^2.1.0", "react-markdown": "^9.0.3", - "react-query": "^3.39.3", "react-router": "^7.1.1", "react-syntax-highlighter": "^15.6.1", "react-toastify": "^11.0.3", diff --git a/ui/App.tsx b/ui/App.tsx index 60bed3254e..688d85f5b8 100644 --- a/ui/App.tsx +++ b/ui/App.tsx @@ -2,9 +2,9 @@ import { ThemeProvider as MuiThemeProvider, StyledEngineProvider, } from "@mui/material"; +import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import qs from "query-string"; import * as React from "react"; -import { QueryClient, QueryClientProvider } from "react-query"; import { Routes, Route, diff --git a/ui/components/Sync/CheckboxActions.tsx b/ui/components/Sync/CheckboxActions.tsx index 74c18a8279..65160fd2fd 100644 --- a/ui/components/Sync/CheckboxActions.tsx +++ b/ui/components/Sync/CheckboxActions.tsx @@ -83,7 +83,7 @@ function CheckboxActions({ className, checked = [], rows = [] }: Props) { diff --git a/ui/components/__tests__/Footer.test.tsx b/ui/components/__tests__/Footer.test.tsx index f5d0127130..d3aa7d3743 100644 --- a/ui/components/__tests__/Footer.test.tsx +++ b/ui/components/__tests__/Footer.test.tsx @@ -1,4 +1,4 @@ -import { screen } from "@testing-library/dom"; +import { screen, waitFor } from "@testing-library/dom"; import { render } from "@testing-library/react"; import "jest-canvas-mock"; import "jest-styled-components"; @@ -40,6 +40,7 @@ describe("Footer", () => { ); }); + await waitFor(() => expect(screen.getByText("Weave GitOps:"))); const footer = screen.getByRole("footer"); expect(footer).toMatchSnapshot(); }); @@ -57,6 +58,7 @@ describe("Footer", () => { ); }); + await waitFor(() => expect(screen.getByText("Weave GitOps:"))); const footer = screen.getByRole("footer"); expect(footer).toMatchSnapshot(); }); diff --git a/ui/contexts/CoreClientContext.tsx b/ui/contexts/CoreClientContext.tsx index 09f147b2e9..288f63d67f 100644 --- a/ui/contexts/CoreClientContext.tsx +++ b/ui/contexts/CoreClientContext.tsx @@ -1,5 +1,5 @@ +import { useQuery } from "@tanstack/react-query"; import * as React from "react"; -import { useQuery } from "react-query"; import { Core, GetFeatureFlagsResponse } from "../lib/api/core/core.pb"; import { TokenRefreshWrapper } from "../lib/requests"; import { RequestError } from "../lib/types"; @@ -26,14 +26,12 @@ export const CoreClientContext = React.createContext(null); function FeatureFlags(api) { - const { data } = useQuery( - "feature_flags", - () => api.GetFeatureFlags({}), - { - staleTime: Infinity, - cacheTime: Infinity, - }, - ); + const { data } = useQuery({ + queryKey: ["feature_flags"], + queryFn: () => api.GetFeatureFlags({}), + staleTime: Infinity, + gcTime: Infinity, + }); return data?.flags; } diff --git a/ui/contexts/__tests__/CoreClientContext.test.tsx b/ui/contexts/__tests__/CoreClientContext.test.tsx index 587c49b650..f7ee5796ea 100644 --- a/ui/contexts/__tests__/CoreClientContext.test.tsx +++ b/ui/contexts/__tests__/CoreClientContext.test.tsx @@ -1,5 +1,5 @@ +import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import * as React from "react"; -import { QueryClient, QueryClientProvider } from "react-query"; import renderer from "react-test-renderer"; import { Core } from "../../lib/api/core/core.pb"; import CoreClientContextProvider, { diff --git a/ui/hooks/Policies.ts b/ui/hooks/Policies.ts index 4ca8deae5a..0a445ead21 100644 --- a/ui/hooks/Policies.ts +++ b/ui/hooks/Policies.ts @@ -1,5 +1,5 @@ +import { useQuery } from "@tanstack/react-query"; import { useContext } from "react"; -import { useQuery } from "react-query"; import { CoreClientContext } from "../contexts/CoreClientContext"; import { @@ -20,11 +20,11 @@ export function useListPolicies( }, ) { const { api } = useContext(CoreClientContext); - return useQuery( - [LIST_POLICIES_QUERY_KEY, req], - () => api.ListPolicies(req), - opts, - ); + return useQuery({ + queryKey: [LIST_POLICIES_QUERY_KEY, req], + queryFn: () => api.ListPolicies(req), + ...opts, + }); } const GET_POLICY_QUERY_KEY = "get-policy-details"; @@ -37,9 +37,9 @@ export function useGetPolicyDetails( ) { const { api } = useContext(CoreClientContext); - return useQuery( - [GET_POLICY_QUERY_KEY, req], - () => api.GetPolicy(req), - opts, - ); + return useQuery({ + queryKey: [GET_POLICY_QUERY_KEY, req], + queryFn: () => api.GetPolicy(req), + ...opts, + }); } diff --git a/ui/hooks/automations.ts b/ui/hooks/automations.ts index e09ab37d79..ff143c156d 100644 --- a/ui/hooks/automations.ts +++ b/ui/hooks/automations.ts @@ -1,5 +1,5 @@ +import { useMutation, useQuery } from "@tanstack/react-query"; import { useContext } from "react"; -import { useMutation, useQuery } from "react-query"; import { CoreClientContext } from "../contexts/CoreClientContext"; import { ListObjectsResponse, @@ -33,9 +33,9 @@ export function useListAutomations( ) { const { api } = useContext(CoreClientContext); - return useQuery( - ["automations", namespace], - () => { + return useQuery({ + queryKey: ["automations", namespace], + queryFn: () => { const p = [Kind.HelmRelease, Kind.Kustomization].map((kind) => api .ListObjects({ namespace, kind }) @@ -67,8 +67,8 @@ export function useListAutomations( return final; }); }, - opts, - ); + ...opts, + }); } export function useSyncFluxObject(objs: ObjectRef[]) { @@ -77,7 +77,9 @@ export function useSyncFluxObject(objs: ObjectRef[]) { SyncFluxObjectResponse, RequestError, SyncFluxObjectRequest - >(({ withSource }) => api.SyncFluxObject({ objects: objs, withSource }), { + >({ + mutationFn: ({ withSource }) => + api.SyncFluxObject({ objects: objs, withSource }), onSuccess: () => notifySuccess("Sync request successful!"), onError: (error) => notifyError(error.message), }); diff --git a/ui/hooks/events.ts b/ui/hooks/events.ts index c6a6e39cc1..1c86c4cb1f 100644 --- a/ui/hooks/events.ts +++ b/ui/hooks/events.ts @@ -1,5 +1,5 @@ +import { useQuery } from "@tanstack/react-query"; import { useContext } from "react"; -import { useQuery } from "react-query"; import { CoreClientContext } from "../contexts/CoreClientContext"; import { ListEventsResponse } from "../lib/api/core/core.pb"; import { ObjectRef } from "../lib/api/core/types.pb"; @@ -15,12 +15,12 @@ export function useListEvents( ) { const { api } = useContext(CoreClientContext); - return useQuery( - ["events", obj], - () => + return useQuery({ + queryKey: ["events", obj], + queryFn: () => api.ListEvents({ involvedObject: obj, }), - opts, - ); + ...opts, + }); } diff --git a/ui/hooks/flux.ts b/ui/hooks/flux.ts index b531f3070f..42b440ba33 100644 --- a/ui/hooks/flux.ts +++ b/ui/hooks/flux.ts @@ -1,5 +1,5 @@ +import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; import { useContext } from "react"; -import { useMutation, useQuery, useQueryClient } from "react-query"; import { CoreClientContext } from "../contexts/CoreClientContext"; import { ListFluxCrdsResponse, @@ -28,21 +28,22 @@ export function useListFluxRuntimeObjects( ) { const { api } = useContext(CoreClientContext); - return useQuery( - "flux_runtime_objects", - () => api.ListFluxRuntimeObjects({ namespace, clusterName }), - opts, - ); + return useQuery({ + queryKey: ["flux_runtime_objects"], + queryFn: () => api.ListFluxRuntimeObjects({ namespace, clusterName }), + ...opts, + }); } export function useListFluxCrds(clusterName = DefaultCluster) { const { api } = useContext(CoreClientContext); - return useQuery( - "flux_crds", - () => api.ListFluxCrds({ clusterName }), - { retry: false, refetchInterval: 5000 }, - ); + return useQuery({ + queryKey: ["flux_crds"], + queryFn: () => api.ListFluxCrds({ clusterName }), + retry: false, + refetchInterval: 5000, + }); } export function useListRuntimeObjects( @@ -55,21 +56,22 @@ export function useListRuntimeObjects( ) { const { api } = useContext(CoreClientContext); - return useQuery( - "runtime_objects", - () => api.ListRuntimeObjects({ namespace, clusterName }), - opts, - ); + return useQuery({ + queryKey: ["runtime_objects"], + queryFn: () => api.ListRuntimeObjects({ namespace, clusterName }), + ...opts, + }); } export function useListRuntimeCrds(clusterName = DefaultCluster) { const { api } = useContext(CoreClientContext); - return useQuery( - "runtime_crds", - () => api.ListRuntimeCrds({ clusterName }), - { retry: false, refetchInterval: 5000 }, - ); + return useQuery({ + queryKey: ["runtime_crds"], + queryFn: () => api.ListRuntimeCrds({ clusterName }), + retry: false, + refetchInterval: 5000, + }); } export function flattenChildren(children: FluxObject[]) { @@ -116,11 +118,11 @@ export function useGetReconciledTree( ) { const { api } = useContext(CoreClientContext); - return useQuery( - ["reconciled_objects", { name, namespace, type, kinds }], - () => getChildren(api, name, namespace, type, kinds, clusterName), - opts, - ); + return useQuery({ + queryKey: ["reconciled_objects", { name, namespace, type, kinds }], + queryFn: () => getChildren(api, name, namespace, type, kinds, clusterName), + ...opts, + }); } export function useToggleSuspend( @@ -129,18 +131,16 @@ export function useToggleSuspend( ) { const { api } = useContext(CoreClientContext); const queryClient = useQueryClient(); - const mutation = useMutation( - () => api.ToggleSuspendResource(req), - { - onSuccess: () => { - const suspend = req.suspend ? "Suspend" : "Resume"; - notifySuccess(`${suspend} request successful!`); - return queryClient.invalidateQueries(type); - }, - onError: (error) => { - notifyError(error.message); - }, + const mutation = useMutation({ + mutationFn: () => api.ToggleSuspendResource(req), + onSuccess: () => { + const suspend = req.suspend ? "Suspend" : "Resume"; + notifySuccess(`${suspend} request successful!`); + return queryClient.invalidateQueries({ queryKey: [type] }); }, - ); + onError: (error) => { + notifyError(error.message); + }, + }); return mutation; } diff --git a/ui/hooks/imageautomation.ts b/ui/hooks/imageautomation.ts index aa27661c77..c61d1779b5 100644 --- a/ui/hooks/imageautomation.ts +++ b/ui/hooks/imageautomation.ts @@ -1,5 +1,5 @@ +import { useQuery } from "@tanstack/react-query"; import { useContext } from "react"; -import { useQuery } from "react-query"; import { CoreClientContext } from "../contexts/CoreClientContext"; import { ListObjectsResponse } from "../lib/api/core/core.pb"; import { NoNamespace, ReactQueryOptions, RequestError } from "../lib/types"; @@ -15,15 +15,15 @@ export function useListImageAutomation( ) { const { api } = useContext(CoreClientContext); - return useQuery( - ["image_automation", namespace, kind], - () => + return useQuery({ + queryKey: ["image_automation", namespace, kind], + queryFn: () => api.ListObjects({ namespace, kind }).then((res) => { const providers = res.objects?.map((obj) => convertResponse(kind, obj)); return { objects: providers, errors: res.errors }; }), - opts, - ); + ...opts, + }); } export function useCheckCRDInstalled( @@ -35,12 +35,12 @@ export function useCheckCRDInstalled( ) { const { api } = useContext(CoreClientContext); - return useQuery( - ["image_automation_crd_available", name], - () => + return useQuery({ + queryKey: ["image_automation_crd_available", name], + queryFn: () => api.IsCRDAvailable({ name }).then(({ clusters }) => { return Object.values(clusters).some((r) => r === true); }), - opts, - ); + ...opts, + }); } diff --git a/ui/hooks/inventory.ts b/ui/hooks/inventory.ts index 81afe27f7c..c26911a21c 100644 --- a/ui/hooks/inventory.ts +++ b/ui/hooks/inventory.ts @@ -1,6 +1,6 @@ +import { useQuery } from "@tanstack/react-query"; import _ from "lodash"; import { useContext } from "react"; -import { useQuery } from "react-query"; import { ReadyStatusValue, ReadyType } from "../components/KubeStatusIndicator"; import { CoreClientContext } from "../contexts/CoreClientContext"; import { ListError } from "../lib/api/core/core.pb"; @@ -26,9 +26,9 @@ export function useGetInventory( ) { const { api } = useContext(CoreClientContext); - return useQuery( - ["get_inventory", namespace, kind, withChildren], - () => + return useQuery({ + queryKey: ["get_inventory", namespace, kind, withChildren], + queryFn: () => api .GetInventory({ name, namespace, kind, clusterName, withChildren }) .then((res) => { @@ -37,8 +37,8 @@ export function useGetInventory( : res.entries?.map((obj) => new FluxObject(obj)); return { objects: listObjects, errors: [] }; }), - opts, - ); + ...opts, + }); } function convertEntries(entries: InventoryEntry[]) { diff --git a/ui/hooks/notifications.ts b/ui/hooks/notifications.ts index c9ff569499..de83abe754 100644 --- a/ui/hooks/notifications.ts +++ b/ui/hooks/notifications.ts @@ -1,5 +1,5 @@ +import { useQuery } from "@tanstack/react-query"; import { useContext } from "react"; -import { useQuery } from "react-query"; import { CoreClientContext } from "../contexts/CoreClientContext"; import { ListError } from "../lib/api/core/core.pb"; import { Kind } from "../lib/api/core/types.pb"; @@ -18,9 +18,9 @@ export function useListProviders( }, ) { const { api } = useContext(CoreClientContext); - return useQuery( - ["providers", namespace], - () => { + return useQuery({ + queryKey: ["providers", namespace], + queryFn: () => { return api.ListObjects({ namespace, kind: Kind.Provider }).then((res) => { const providers = res.objects?.map( (obj) => convertResponse(Kind.Provider, obj) as Provider, @@ -28,8 +28,8 @@ export function useListProviders( return { objects: providers, errors: res.errors }; }); }, - opts, - ); + ...opts, + }); } export function useListAlerts( @@ -41,9 +41,9 @@ export function useListAlerts( }, ) { const { api } = useContext(CoreClientContext); - return useQuery( - ["alerts", namespace], - () => { + return useQuery({ + queryKey: ["alerts", namespace], + queryFn: () => { return api.ListObjects({ namespace, kind: Kind.Alert }).then((res) => { const alerts = res.objects?.map( (obj) => convertResponse(Kind.Alert, obj) as Alert, @@ -52,6 +52,6 @@ export function useListAlerts( return { objects: matches, errors: res.errors }; }); }, - opts, - ); + ...opts, + }); } diff --git a/ui/hooks/objects.ts b/ui/hooks/objects.ts index 1ea8e07396..8ce8fe5523 100644 --- a/ui/hooks/objects.ts +++ b/ui/hooks/objects.ts @@ -1,5 +1,5 @@ +import { useQuery } from "@tanstack/react-query"; import { useContext } from "react"; -import { useQuery } from "react-query"; import { CoreClientContext } from "../contexts/CoreClientContext"; import { GetObjectResponse, ListError } from "../lib/api/core/core.pb"; import { Kind, Object as ResponseObject } from "../lib/api/core/types.pb"; @@ -70,17 +70,17 @@ export function useGetObject( ) { const { api } = useContext(CoreClientContext); - const response = useQuery( - ["object", clusterName, kind, namespace, name], - () => + const response = useQuery({ + queryKey: ["object", clusterName, kind, namespace, name], + queryFn: () => api .GetObject({ name, namespace, kind, clusterName }) .then( (result: GetObjectResponse) => convertResponse(kind, result.object) as T, ), - opts, - ); + ...opts, + }); if (response.error) { return { ...response, data: convertResponse(kind) as T }; } @@ -101,9 +101,9 @@ export function useListObjects( ) { const { api } = useContext(CoreClientContext); - return useQuery( - ["objects", clusterName, kind, namespace], - async () => { + return useQuery({ + queryKey: ["objects", clusterName, kind, namespace], + queryFn: async () => { const res = await api.ListObjects({ namespace, kind, @@ -116,6 +116,6 @@ export function useListObjects( else objects = []; return { objects: objects, errors: res.errors || [] }; }, - opts, - ); + ...opts, + }); } diff --git a/ui/hooks/policyViolations.ts b/ui/hooks/policyViolations.ts index ead6b884e5..5614ea5113 100644 --- a/ui/hooks/policyViolations.ts +++ b/ui/hooks/policyViolations.ts @@ -1,5 +1,5 @@ +import { useQuery } from "@tanstack/react-query"; import { useContext } from "react"; -import { useQuery } from "react-query"; import { CoreClientContext } from "../contexts/CoreClientContext"; import { @@ -20,11 +20,11 @@ export function useListPolicyValidations( }, ) { const { api } = useContext(CoreClientContext); - return useQuery( - [LIST_POLICY_VIOLATION_QUERY_KEY, req], - () => api.ListPolicyValidations(req), - opts, - ); + return useQuery({ + queryKey: [LIST_POLICY_VIOLATION_QUERY_KEY, req], + queryFn: () => api.ListPolicyValidations(req), + ...opts, + }); } const GET_POLICY_VIOLATION_QUERY_KEY = "get-policy-violation-details"; @@ -37,9 +37,9 @@ export function useGetPolicyValidationDetails( }, ) { const { api } = useContext(CoreClientContext); - return useQuery( - [GET_POLICY_VIOLATION_QUERY_KEY, req], - () => api.GetPolicyValidation(req), - opts, - ); + return useQuery({ + queryKey: [GET_POLICY_VIOLATION_QUERY_KEY, req], + queryFn: () => api.GetPolicyValidation(req), + ...opts, + }); } diff --git a/ui/hooks/sources.ts b/ui/hooks/sources.ts index 376fe70033..beadfd9323 100644 --- a/ui/hooks/sources.ts +++ b/ui/hooks/sources.ts @@ -1,5 +1,5 @@ +import { useQuery } from "@tanstack/react-query"; import { useContext } from "react"; -import { useQuery } from "react-query"; import { CoreClientContext } from "../contexts/CoreClientContext"; import { ListObjectsResponse } from "../lib/api/core/core.pb"; import { Kind } from "../lib/api/core/types.pb"; @@ -29,9 +29,9 @@ export function useListSources( ) { const { api } = useContext(CoreClientContext); - return useQuery( - ["sources", namespace], - () => { + return useQuery({ + queryKey: ["sources", namespace], + queryFn: () => { const p = [ Kind.GitRepository, Kind.HelmRepository, @@ -65,6 +65,6 @@ export function useListSources( return final; }); }, - opts, - ); + ...opts, + }); } diff --git a/ui/hooks/version.ts b/ui/hooks/version.ts index dc1c42aa0f..48adb6d496 100644 --- a/ui/hooks/version.ts +++ b/ui/hooks/version.ts @@ -1,5 +1,5 @@ +import { useQuery } from "@tanstack/react-query"; import { useContext } from "react"; -import { useQuery } from "react-query"; import { CoreClientContext } from "../contexts/CoreClientContext"; import { GetVersionResponse } from "../lib/api/core/core.pb"; import { RequestError } from "../lib/types"; @@ -7,12 +7,10 @@ import { RequestError } from "../lib/types"; export function useVersion() { const { api } = useContext(CoreClientContext); - return useQuery( - "version", - () => api.GetVersion({}), - { - staleTime: Infinity, - cacheTime: Infinity, - }, - ); + return useQuery({ + queryKey: ["version"], + queryFn: () => api.GetVersion({}), + staleTime: Infinity, + gcTime: Infinity, + }); } diff --git a/ui/lib/test-utils.tsx b/ui/lib/test-utils.tsx index ad50843e8a..f7caed06c6 100644 --- a/ui/lib/test-utils.tsx +++ b/ui/lib/test-utils.tsx @@ -2,10 +2,10 @@ import { ThemeProvider as MuiThemeProvider, StyledEngineProvider, } from "@mui/material"; +import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { createMemoryHistory } from "history"; import _ from "lodash"; import * as React from "react"; -import { QueryClient, QueryClientProvider } from "react-query"; import { Router } from "react-router"; import { ThemeProvider } from "styled-components"; import AppContextProvider, { diff --git a/ui/lib/types.ts b/ui/lib/types.ts index e973a662c4..9b9a1a139b 100644 --- a/ui/lib/types.ts +++ b/ui/lib/types.ts @@ -1,4 +1,4 @@ -import { UseQueryOptions } from "react-query"; +import { UseQueryOptions } from "@tanstack/react-query"; import { ClusterNamespaceList, ListError } from "./api/core/core.pb"; import { Condition, Interval, Kind } from "./api/core/types.pb"; diff --git a/yarn.lock b/yarn.lock index 6d3ddb6d0a..fdbb284476 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1455,7 +1455,7 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.3.1, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.6.2, @babel/runtime@npm:^7.7.2, @babel/runtime@npm:^7.7.6, @babel/runtime@npm:^7.8.7": +"@babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.3.1, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.7.6, @babel/runtime@npm:^7.8.7": version: 7.16.7 resolution: "@babel/runtime@npm:7.16.7" dependencies: @@ -3722,6 +3722,24 @@ __metadata: languageName: node linkType: hard +"@tanstack/query-core@npm:5.64.1": + version: 5.64.1 + resolution: "@tanstack/query-core@npm:5.64.1" + checksum: 10c0/89aae104b6c0568d88ca9f4de2c878d290ee296b9a2952c93145a14e36f980ad045d37e12cf6c520a5de5297fab2f01488d3936a77b6e374f28259051fe3cb30 + languageName: node + linkType: hard + +"@tanstack/react-query@npm:^5.64.1": + version: 5.64.1 + resolution: "@tanstack/react-query@npm:5.64.1" + dependencies: + "@tanstack/query-core": "npm:5.64.1" + peerDependencies: + react: ^18 || ^19 + checksum: 10c0/94393e72d8ed4aca112c10a5c421642fcd63e6f767ec68033e916ed66d75c9c515112942fd40e355ffa94ed41b5d48283bfa1b808aba26b4a154eedc82cd03be + languageName: node + linkType: hard + "@testing-library/dom@npm:^10.4.0": version: 10.4.0 resolution: "@testing-library/dom@npm:10.4.0" @@ -4396,6 +4414,7 @@ __metadata: "@parcel/optimizer-data-url": "npm:^2.13.3" "@parcel/transformer-inline-string": "npm:^2.13.3" "@parcel/transformer-typescript-tsc": "npm:^2.13.3" + "@tanstack/react-query": "npm:^5.64.1" "@testing-library/dom": "npm:^10.4.0" "@testing-library/jest-dom": "npm:^6.6.3" "@testing-library/react": "npm:^16.2.0" @@ -4442,7 +4461,6 @@ __metadata: react-is: "npm:^18.0.0" react-lottie-player: "npm:^2.1.0" react-markdown: "npm:^9.0.3" - react-query: "npm:^3.39.3" react-router: "npm:^7.1.1" react-syntax-highlighter: "npm:^15.6.1" react-test-renderer: "npm:^18.0.0" @@ -4914,13 +4932,6 @@ __metadata: languageName: node linkType: hard -"big-integer@npm:^1.6.16": - version: 1.6.51 - resolution: "big-integer@npm:1.6.51" - checksum: 10c0/c8139662d57f8833a44802f4b65be911679c569535ea73c5cfd3c1c8994eaead1b84b6f63e1db63833e4d4cacb6b6a9e5522178113dfdc8e4c81ed8436f1e8cc - languageName: node - linkType: hard - "boolbase@npm:^1.0.0": version: 1.0.0 resolution: "boolbase@npm:1.0.0" @@ -4956,22 +4967,6 @@ __metadata: languageName: node linkType: hard -"broadcast-channel@npm:^3.4.1": - version: 3.7.0 - resolution: "broadcast-channel@npm:3.7.0" - dependencies: - "@babel/runtime": "npm:^7.7.2" - detect-node: "npm:^2.1.0" - js-sha3: "npm:0.8.0" - microseconds: "npm:0.2.0" - nano-time: "npm:1.0.0" - oblivious-set: "npm:1.0.0" - rimraf: "npm:3.0.2" - unload: "npm:2.2.0" - checksum: 10c0/95978446f24c685be666f5508a91350bcd4075c08feda929d26c0c678fb24bd421901f19fa8d36cb6f5ed480a334072f3bdce48fa177a8cb29793d88693911cc - languageName: node - linkType: hard - "browserslist@npm:^4.17.5, browserslist@npm:^4.6.6": version: 4.19.1 resolution: "browserslist@npm:4.19.1" @@ -6182,13 +6177,6 @@ __metadata: languageName: node linkType: hard -"detect-node@npm:^2.0.4, detect-node@npm:^2.1.0": - version: 2.1.0 - resolution: "detect-node@npm:2.1.0" - checksum: 10c0/f039f601790f2e9d4654e499913259a798b1f5246ae24f86ab5e8bd4aaf3bce50484234c494f11fb00aecb0c6e2733aa7b1cf3f530865640b65fbbd65b2c4e09 - languageName: node - linkType: hard - "devlop@npm:^1.0.0, devlop@npm:^1.1.0": version: 1.1.0 resolution: "devlop@npm:1.1.0" @@ -8809,13 +8797,6 @@ __metadata: languageName: node linkType: hard -"js-sha3@npm:0.8.0": - version: 0.8.0 - resolution: "js-sha3@npm:0.8.0" - checksum: 10c0/43a21dc7967c871bd2c46cb1c2ae97441a97169f324e509f382d43330d8f75cf2c96dba7c806ab08a425765a9c847efdd4bffbac2d99c3a4f3de6c0218f40533 - languageName: node - linkType: hard - "js-sha3@npm:0.9.3": version: 0.9.3 resolution: "js-sha3@npm:0.9.3" @@ -9385,16 +9366,6 @@ __metadata: languageName: node linkType: hard -"match-sorter@npm:^6.0.2": - version: 6.3.1 - resolution: "match-sorter@npm:6.3.1" - dependencies: - "@babel/runtime": "npm:^7.12.5" - remove-accents: "npm:0.4.2" - checksum: 10c0/fb805e1f8cd1a41846dd5dcbba810a3bff3e1436a34a8226201d3f7518970171a7dbedb0d99677a6dce2a2925e4fc3cf1d0d82a1203ac9ef65d13d5d290b1dad - languageName: node - linkType: hard - "math-intrinsics@npm:^1.1.0": version: 1.1.0 resolution: "math-intrinsics@npm:1.1.0" @@ -9979,13 +9950,6 @@ __metadata: languageName: node linkType: hard -"microseconds@npm:0.2.0": - version: 0.2.0 - resolution: "microseconds@npm:0.2.0" - checksum: 10c0/59dfae1c696c0bacd79603c4df7cd0dcc9e091b7c5556aaca9b0832017d3c0b40ad8f57ca25e0ee5709ef1973404448c4a2fea6c9c1fad7d9e197ff5c1c9c2d5 - languageName: node - linkType: hard - "mime-db@npm:1.52.0": version: 1.52.0 resolution: "mime-db@npm:1.52.0" @@ -10225,15 +10189,6 @@ __metadata: languageName: node linkType: hard -"nano-time@npm:1.0.0": - version: 1.0.0 - resolution: "nano-time@npm:1.0.0" - dependencies: - big-integer: "npm:^1.6.16" - checksum: 10c0/3bd12e0bcd30867178afdbe8053b3dde5fdd1c665ecd348bf879863049344fbaf05cbb1d7806a825b91efbca011ee115eee52e76fb38b7da9c97931cd9e61f15 - languageName: node - linkType: hard - "nanoid@npm:^3.3.7, nanoid@npm:^3.3.8": version: 3.3.8 resolution: "nanoid@npm:3.3.8" @@ -10489,13 +10444,6 @@ __metadata: languageName: node linkType: hard -"oblivious-set@npm:1.0.0": - version: 1.0.0 - resolution: "oblivious-set@npm:1.0.0" - checksum: 10c0/ca8640474ea1e1feb3b5c98d42f5649f114ac4513ef84774e724f22fc7e529f1de3e7f26a0d9593097ab8942ca0bb8c241f7c1bd63c3e33047dd49de3aca9805 - languageName: node - linkType: hard - "once@npm:^1.3.0": version: 1.4.0 resolution: "once@npm:1.4.0" @@ -11128,24 +11076,6 @@ __metadata: languageName: node linkType: hard -"react-query@npm:^3.39.3": - version: 3.39.3 - resolution: "react-query@npm:3.39.3" - dependencies: - "@babel/runtime": "npm:^7.5.5" - broadcast-channel: "npm:^3.4.1" - match-sorter: "npm:^6.0.2" - peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - react-dom: - optional: true - react-native: - optional: true - checksum: 10c0/319045ef31b9b02aa9b5446169a8c6f95cfe49406466b819cc85e41c29bfe5032d3732577efe56511278db41514772375d416a3e3976e8967c6e0972ff04dd2e - languageName: node - linkType: hard - "react-refresh@npm:>=0.9 <=0.14": version: 0.14.2 resolution: "react-refresh@npm:0.14.2" @@ -11420,13 +11350,6 @@ __metadata: languageName: node linkType: hard -"remove-accents@npm:0.4.2": - version: 0.4.2 - resolution: "remove-accents@npm:0.4.2" - checksum: 10c0/5cbc00efa52df29ce947a0c572ff975b011f5f197ebe7b4f6e527de26aba534cba12d502e3040b72e46ad01de3d4f2d5ef57a6593c964965e43ddb60438da0f8 - languageName: node - linkType: hard - "require-directory@npm:^2.1.1": version: 2.1.1 resolution: "require-directory@npm:2.1.1" @@ -11544,17 +11467,6 @@ __metadata: languageName: node linkType: hard -"rimraf@npm:3.0.2": - version: 3.0.2 - resolution: "rimraf@npm:3.0.2" - dependencies: - glob: "npm:^7.1.3" - bin: - rimraf: bin.js - checksum: 10c0/9cb7757acb489bd83757ba1a274ab545eafd75598a9d817e0c3f8b164238dd90eba50d6b848bd4dcc5f3040912e882dc7ba71653e35af660d77b25c381d402e8 - languageName: node - linkType: hard - "rimraf@npm:^5.0.5": version: 5.0.10 resolution: "rimraf@npm:5.0.10" @@ -12698,16 +12610,6 @@ __metadata: languageName: node linkType: hard -"unload@npm:2.2.0": - version: 2.2.0 - resolution: "unload@npm:2.2.0" - dependencies: - "@babel/runtime": "npm:^7.6.2" - detect-node: "npm:^2.0.4" - checksum: 10c0/0a4f86b502e7aa35d39c27373ebeaad4f2b7da793fb3d6308e5337aab541885cfe7b339ea4a1963477bf73fddabd5d69f4f47023dad71224b4b4a25611ef7dd8 - languageName: node - linkType: hard - "update-browserslist-db@npm:^1.1.1": version: 1.1.1 resolution: "update-browserslist-db@npm:1.1.1"