Skip to content

Commit

Permalink
fix(deps): update tanstack-query monorepo to v5 (major) (#119)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Orka Arnest CRUZE <[email protected]>
Co-authored-by: Orka Arnest CRUZE <[email protected]>
  • Loading branch information
3 people authored Oct 18, 2023
1 parent 67a7592 commit d79454c
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 74 deletions.
8 changes: 1 addition & 7 deletions assets/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,7 @@ import RouterRenderer from "./router/RouterRenderer";
import { RouteProvider } from "./router/router";
import { FC } from "react";

const queryClient = new QueryClient({
defaultOptions: {
queries: {
useErrorBoundary: false,
},
},
});
const queryClient = new QueryClient();

const App: FC = () => {
return (
Expand Down
1 change: 0 additions & 1 deletion assets/hooks/useCapabilities.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ const useCapabilities = (key = "cartes") => {
return capabilities;
},
staleTime: Infinity,
cacheTime: Infinity,
});
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ const DatasheetNewIntegrationDialog: FC<DatasheetNewIntegrationDialogProps> = ({
setShouldPingIntProg(false);

if (uploadQuery?.data?.tags?.datasheet_name) {
queryClient.invalidateQueries(RQKeys.datastore_datasheet(datastoreId, uploadQuery?.data?.tags?.datasheet_name));
queryClient.invalidateQueries({
queryKey: RQKeys.datastore_datasheet(datastoreId, uploadQuery?.data?.tags?.datasheet_name),
});
routes.datastore_datasheet_view({ datastoreId, datasheetName: uploadQuery?.data?.tags?.datasheet_name }).push();
}
}
Expand Down
4 changes: 2 additions & 2 deletions assets/pages/datasheet/DatasheetView/DatasheetView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const DatasheetView: FC<DatasheetViewProps> = ({ datastoreId, datasheetName }) =
staleTime: 20000,
refetchInterval: 20000,
retry: false,
enabled: !datasheetDeleteMutation.isLoading,
enabled: !datasheetDeleteMutation.isPending,
});

return (
Expand Down Expand Up @@ -132,7 +132,7 @@ const DatasheetView: FC<DatasheetViewProps> = ({ datastoreId, datasheetName }) =
</>
)}

{datasheetDeleteMutation.isLoading && (
{datasheetDeleteMutation.isPending && (
<Wait>
<div className={fr.cx("fr-container")}>
<div className={fr.cx("fr-grid-row", "fr-grid-row--middle")}>
Expand Down
18 changes: 10 additions & 8 deletions assets/pages/service/view/ServiceView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,16 @@ const ServiceView: FC<ServiceViewProps> = ({ datastoreId, offeringId, datasheetN
<>
<div className={fr.cx("fr-grid-row", "fr-grid-row--middle", "fr-mb-4w")}>
{getBackBtn(datasheetName)}
{serviceQuery.data.layer_name}
<Badge noIcon={true} severity="info" className={fr.cx("fr-ml-2w")}>
{serviceQuery.data.type}
</Badge>
{serviceQuery?.data?.layer_name}
{serviceQuery?.data?.type && (
<Badge noIcon={true} severity="info" className={fr.cx("fr-ml-2w")}>
{serviceQuery?.data?.type}
</Badge>
)}
</div>

<div className={fr.cx("fr-grid-row", "fr-mb-4w")}>
<div className={fr.cx("fr-col-12", "fr-col-md-8")}>
<RMap service={serviceQuery.data} />
</div>
<div className={fr.cx("fr-col-12", "fr-col-md-8")}>{serviceQuery.data && <RMap service={serviceQuery.data} />}</div>
<div className={fr.cx("fr-col-12", "fr-col-md-4", "fr-p-1w", "fr-px-2w")}>
<div className={fr.cx("fr-grid-row")}>
<strong className={fr.cx("fr-text--xl")}>Diffuser le service</strong>
Expand Down Expand Up @@ -106,7 +106,9 @@ const ServiceView: FC<ServiceViewProps> = ({ datastoreId, offeringId, datasheetN
<strong>Adresse du service de données</strong>
</div>

<TextCopyToClipboard text={serviceQuery.data.urls.map((url) => url.url).join(",")} className="fr-mb-4w" />
{serviceQuery?.data?.urls && (
<TextCopyToClipboard text={serviceQuery?.data?.urls.map((url) => url.url).join(",")} className="fr-mb-4w" />
)}
</div>
</div>
</>
Expand Down
2 changes: 1 addition & 1 deletion assets/pages/service/wms-vector/WmsVectorServiceNew.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ const WmsVectorServiceNew: FC<WmsVectorServiceNewProps> = ({ datastoreId, vector
/>
</>
)}
{createServiceMutation.isLoading && (
{createServiceMutation.isPaused && (
<Wait>
<div className={fr.cx("fr-container")}>
<div className={fr.cx("fr-grid-row", "fr-grid-row--middle")}>
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"@hookform/resolvers": "^3.1.1",
"@mui/material": "^5.14.9",
"@symfony/webpack-encore": "^4.4.0",
"@tanstack/react-query": "^4.29.25",
"@tanstack/react-query-devtools": "^4.29.25",
"@tanstack/react-query": "^5.0.0",
"@tanstack/react-query-devtools": "^5.0.0",
"@uiw/react-md-editor": "^3.23.5",
"autoprefixer": "^10.4.14",
"core-js": "^3.31.1",
Expand Down
70 changes: 18 additions & 52 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1554,34 +1554,29 @@
webpack-dev-server "^4.8.0"
yargs-parser "^21.0.0"

"@tanstack/match-sorter-utils@^8.7.0":
version "8.8.4"
resolved "https://registry.yarnpkg.com/@tanstack/match-sorter-utils/-/match-sorter-utils-8.8.4.tgz#0b2864d8b7bac06a9f84cb903d405852cc40a457"
integrity sha512-rKH8LjZiszWEvmi01NR72QWZ8m4xmXre0OOwlRGnjU01Eqz/QnN+cqpty2PJ0efHblq09+KilvyR7lsbzmXVEw==
dependencies:
remove-accents "0.4.2"
"@tanstack/[email protected]":
version "5.0.0"
resolved "https://registry.yarnpkg.com/@tanstack/query-core/-/query-core-5.0.0.tgz#b37a50bb3a4f54336b6131db00b72cd29e79b480"
integrity sha512-Y1BpiA6BblJd/UlVqxEVeAG7IACn568YJuTTItAiecBI7En+33g780kg+/8lhgl+BzcUPN7o+NjBrSRGJoemyQ==

"@tanstack/query-[email protected]":
version "4.35.3"
resolved "https://registry.yarnpkg.com/@tanstack/query-core/-/query-core-4.35.3.tgz#1c127e66b4ad1beeac052db83a812d7cb67369e1"
integrity sha512-PS+WEjd9wzKTyNjjQymvcOe1yg8f3wYc6mD+vb6CKyZAKvu4sIJwryfqfBULITKCla7P9C4l5e9RXePHvZOZeQ==
"@tanstack/query-[email protected]":
version "5.0.0"
resolved "https://registry.yarnpkg.com/@tanstack/query-devtools/-/query-devtools-5.0.0.tgz#bed467c2a8055ceaaf5e582d30ef46df039d94c8"
integrity sha512-WATg9+nreAmtTRHzxvCFN6j4ucUVbkJNd8ErcYmf7Y6GsJw/BGscd4rWS7cdAP7zfTcPjHjGaRB041pcv8dNvA==

"@tanstack/react-query-devtools@^4.29.25":
version "4.35.3"
resolved "https://registry.yarnpkg.com/@tanstack/react-query-devtools/-/react-query-devtools-4.35.3.tgz#f03b39b613782a97794a42798d979c02ba51a7df"
integrity sha512-UvLT7qPzCuCZ3NfjwsOqDUVN84JvSOuW6ukrjZmSqgjPqVxD6ra/HUp1CEOatQY2TRvKCp8y1lTVu+trXM30fg==
"@tanstack/react-query-devtools@^5.0.0":
version "5.0.0"
resolved "https://registry.yarnpkg.com/@tanstack/react-query-devtools/-/react-query-devtools-5.0.0.tgz#2f9b1aa6372f8bc42d8c5144392db92b8fa5d9ca"
integrity sha512-4yw29d89eOqUmliRKGmEOjuq2AGSM3i4jjw/YFMrErg0neVITy2bkoU3fPXZ339czlupqq0b4e20uFVtqkEqGQ==
dependencies:
"@tanstack/match-sorter-utils" "^8.7.0"
superjson "^1.10.0"
use-sync-external-store "^1.2.0"
"@tanstack/query-devtools" "5.0.0"

"@tanstack/react-query@^4.29.25":
version "4.35.3"
resolved "https://registry.yarnpkg.com/@tanstack/react-query/-/react-query-4.35.3.tgz#03d726ef6a19d426166427c6539b003dd9606d1b"
integrity sha512-UgTPioip/rGG3EQilXfA2j4BJkhEQsR+KAbF+KIuvQ7j4MkgnTCJF01SfRpIRNtQTlEfz/+IL7+jP8WA8bFbsw==
"@tanstack/react-query@^5.0.0":
version "5.0.0"
resolved "https://registry.yarnpkg.com/@tanstack/react-query/-/react-query-5.0.0.tgz#707fecb71cf53ae098f682f45520d7b1640bcaa9"
integrity sha512-diQoC8FNBcO5Uf5yuaJlXthTtbO1xM8kzOX+pSBUMT9n/cqQ/u1wJGCtukvhDWA+6j07WmIj4bfqNbd2KOB6jQ==
dependencies:
"@tanstack/query-core" "4.35.3"
use-sync-external-store "^1.2.0"
"@tanstack/query-core" "5.0.0"

"@trysound/[email protected]":
version "0.2.0"
Expand Down Expand Up @@ -2983,13 +2978,6 @@ [email protected]:
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b"
integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==

copy-anything@^3.0.2:
version "3.0.5"
resolved "https://registry.yarnpkg.com/copy-anything/-/copy-anything-3.0.5.tgz#2d92dce8c498f790fa7ad16b01a1ae5a45b020a0"
integrity sha512-yCEafptTtb4bk7GLEQoM8KVJpxAfdBJYaXyzQEgQQQgYrZiDp8SJmGKlYza6CYjEDNstAdNdKA3UuoULlEbS6w==
dependencies:
is-what "^4.1.8"

core-js-compat@^3.31.0, core-js-compat@^3.32.2:
version "3.32.2"
resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.32.2.tgz#8047d1a8b3ac4e639f0d4f66d4431aa3b16e004c"
Expand Down Expand Up @@ -5137,11 +5125,6 @@ is-weakset@^2.0.1:
call-bind "^1.0.2"
get-intrinsic "^1.1.1"

is-what@^4.1.8:
version "4.1.15"
resolved "https://registry.yarnpkg.com/is-what/-/is-what-4.1.15.tgz#de43a81090417a425942d67b1ae86e7fae2eee0e"
integrity sha512-uKua1wfy3Yt+YqsD6mTUEa2zSi3G1oPlqTflgaPJ7z63vUGN5pxFpnQfeSLMFnJDEsdvOtkp1rUWkYjB4YfhgA==

is-wsl@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271"
Expand Down Expand Up @@ -7275,11 +7258,6 @@ remark-rehype@^10.0.0:
mdast-util-to-hast "^12.1.0"
unified "^10.0.0"

[email protected]:
version "0.4.2"
resolved "https://registry.yarnpkg.com/remove-accents/-/remove-accents-0.4.2.tgz#0a43d3aaae1e80db919e07ae254b285d9e1c7bb5"
integrity sha512-7pXIJqJOq5tFgG1A2Zxti3Ht8jJF337m4sowbuHsW30ZnkQFnDzy9qBNhgzX8ZLW4+UBcXiiR7SwR6pokHsxiA==

renderkid@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/renderkid/-/renderkid-3.0.0.tgz#5fd823e4d6951d37358ecc9a58b1f06836b6268a"
Expand Down Expand Up @@ -7899,13 +7877,6 @@ [email protected]:
resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.2.0.tgz#79daee0208964c8fe695a42fcffcac633a211a51"
integrity sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw==

superjson@^1.10.0:
version "1.13.1"
resolved "https://registry.yarnpkg.com/superjson/-/superjson-1.13.1.tgz#a0b6ab5d22876f6207fcb9d08b0cb2acad8ee5cd"
integrity sha512-AVH2eknm9DEd3qvxM4Sq+LTCkSXE2ssfh1t11MHMXyYXFQyQ1HLgVvV+guLTsaQnJU3gnaVo34TohHPulY/wLg==
dependencies:
copy-anything "^3.0.2"

supports-color@^5.3.0:
version "5.5.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
Expand Down Expand Up @@ -8347,11 +8318,6 @@ use-deep-compare-effect@^1.8.1:
"@babel/runtime" "^7.12.5"
dequal "^2.0.2"

use-sync-external-store@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz#7dbefd6ef3fe4e767a0cf5d7287aacfb5846928a"
integrity sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==

util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
Expand Down

0 comments on commit d79454c

Please sign in to comment.