Skip to content

Commit 23e67e1

Browse files
chore(deps): migrate to @tanstack/react-query (#30154)
* Migrate to tanstack query * chore(deps): migrate to @tanstack/react-query --------- Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
1 parent 00cddbc commit 23e67e1

File tree

4 files changed

+24
-77
lines changed

4 files changed

+24
-77
lines changed

npm/vite-plugin-cypress-esm/cypress/component/edgeCases.cy.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ describe('edge cases', () => {
4848
* This library has some weird things going on with prototypes
4949
* under the hood.
5050
*/
51-
it('works with react-query', () => {
51+
it('works with @tanstack/react-query', () => {
5252
mount(<App />)
5353
})
5454

npm/vite-plugin-cypress-esm/cypress/component/fixtures/reactQuery.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
useQueryClient,
44
QueryClient,
55
QueryClientProvider,
6-
} from 'react-query'
6+
} from '@tanstack/react-query'
77
import React from 'react'
88

99
// Create a client
@@ -27,7 +27,7 @@ function Todos () {
2727
const mutation = useMutation(postTodo, {
2828
onSuccess: () => {
2929
// Invalidate and refetch
30-
queryClient.invalidateQueries('todos')
30+
queryClient.invalidateQueries({ queryKey: ['todos'] })
3131
},
3232
})
3333

npm/vite-plugin-cypress-esm/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
"picomatch": "2.3.0"
1818
},
1919
"devDependencies": {
20+
"@tanstack/react-query": "4.36.1",
2021
"@types/picomatch": "2.3.0",
2122
"@vitejs/plugin-react": "4.3.0",
2223
"react": "16.8.6",
2324
"react-dom": "16.8.6",
24-
"react-query": "3.39.3",
2525
"react-router": "6.10.0",
2626
"react-router-dom": "6.10.0",
2727
"vite": "5.2.11"

yarn.lock

+20-73
Original file line numberDiff line numberDiff line change
@@ -2548,7 +2548,7 @@
25482548
core-js-pure "^3.0.0"
25492549
regenerator-runtime "^0.13.4"
25502550

2551-
"@babel/runtime@^7.0.0", "@babel/runtime@^7.10.0", "@babel/runtime@^7.10.2", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.14.6", "@babel/runtime@^7.18.9", "@babel/runtime@^7.25.0", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.2", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.4":
2551+
"@babel/runtime@^7.0.0", "@babel/runtime@^7.10.0", "@babel/runtime@^7.10.2", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.14.6", "@babel/runtime@^7.18.9", "@babel/runtime@^7.25.0", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.4":
25522552
version "7.25.0"
25532553
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.25.0.tgz#3af9a91c1b739c569d5d80cc917280919c544ecb"
25542554
integrity sha512-7dRy4DwXwtzBrPbZflqxnvfxLF8kdZXPkhymtDeFoFqE6ldzjQFgYTtYIFARcLEYDrqfBfYcZt1WqFxRoyC9Rw==
@@ -7029,6 +7029,19 @@
70297029
resolved "https://registry.yarnpkg.com/@tailwindcss/container-queries/-/container-queries-0.1.1.tgz#9a759ce2cb8736a4c6a0cb93aeb740573a731974"
70307030
integrity sha512-p18dswChx6WnTSaJCSGx6lTmrGzNNvm2FtXmiO6AuA1V4U5REyoqwmT6kgAsIMdjo07QdAfYXHJ4hnMtfHzWgA==
70317031

7032+
"@tanstack/query-core@4.36.1":
7033+
version "4.36.1"
7034+
resolved "https://registry.yarnpkg.com/@tanstack/query-core/-/query-core-4.36.1.tgz#79f8c1a539d47c83104210be2388813a7af2e524"
7035+
integrity sha512-DJSilV5+ytBP1FbFcEJovv4rnnm/CokuVvrBEtW/Va9DvuJ3HksbXUJEpI0aV1KtuL4ZoO9AVE6PyNLzF7tLeA==
7036+
7037+
"@tanstack/react-query@4.36.1":
7038+
version "4.36.1"
7039+
resolved "https://registry.yarnpkg.com/@tanstack/react-query/-/react-query-4.36.1.tgz#acb589fab4085060e2e78013164868c9c785e5d2"
7040+
integrity sha512-y7ySVHFyyQblPl3J3eQBWpXZkliroki3ARnBKsdJchlgt7yJLRDUcf4B8soufgiYt3pEQIkBWBx1N9/ZPIeUWw==
7041+
dependencies:
7042+
"@tanstack/query-core" "4.36.1"
7043+
use-sync-external-store "^1.2.0"
7044+
70327045
"@testing-library/cypress@9.0.0":
70337046
version "9.0.0"
70347047
resolved "https://registry.yarnpkg.com/@testing-library/cypress/-/cypress-9.0.0.tgz#3facad49c4654a99bbd138f83f33b415d2d6f097"
@@ -10434,11 +10447,6 @@ better-sqlite3@9.2.2:
1043410447
bindings "^1.5.0"
1043510448
prebuild-install "^7.1.1"
1043610449

10437-
big-integer@^1.6.16:
10438-
version "1.6.51"
10439-
resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.51.tgz#0df92a5d9880560d3ff2d5fd20245c889d130686"
10440-
integrity sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==
10441-
1044210450
big.js@^5.2.2:
1044310451
version "5.2.2"
1044410452
resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328"
@@ -10713,20 +10721,6 @@ braces@^3.0.3, braces@~3.0.2:
1071310721
dependencies:
1071410722
fill-range "^7.1.1"
1071510723

10716-
broadcast-channel@^3.4.1:
10717-
version "3.7.0"
10718-
resolved "https://registry.yarnpkg.com/broadcast-channel/-/broadcast-channel-3.7.0.tgz#2dfa5c7b4289547ac3f6705f9c00af8723889937"
10719-
integrity sha512-cIAKJXAxGJceNZGTZSBzMxzyOn72cVgPnKx4dc6LRjQgbaJUQqhy5rzL3zbMxkMWsGKkv2hSFkPRMEXfoMZ2Mg==
10720-
dependencies:
10721-
"@babel/runtime" "^7.7.2"
10722-
detect-node "^2.1.0"
10723-
js-sha3 "0.8.0"
10724-
microseconds "0.2.0"
10725-
nano-time "1.0.0"
10726-
oblivious-set "1.0.0"
10727-
rimraf "3.0.2"
10728-
unload "2.2.0"
10729-
1073010724
brorand@^1.0.1, brorand@^1.1.0:
1073110725
version "1.1.0"
1073210726
resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f"
@@ -13663,7 +13657,7 @@ detect-node-es@^1.0.0:
1366313657
resolved "https://registry.yarnpkg.com/detect-node-es/-/detect-node-es-1.0.0.tgz#c0318b9e539a5256ca780dd9575c9345af05b8ed"
1366413658
integrity sha512-S4AHriUkTX9FoFvL4G8hXDcx6t3gp2HpfCza3Q0v6S78gul2hKWifLQbeW+ZF89+hSm2ZIc/uF3J97ZgytgTRg==
1366513659

13666-
detect-node@^2.0.4, detect-node@^2.1.0:
13660+
detect-node@^2.0.4:
1366713661
version "2.1.0"
1366813662
resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.1.0.tgz#c9c70775a49c3d03bc2c06d9a73be550f978f8b1"
1366913663
integrity sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==
@@ -19680,11 +19674,6 @@ js-cookie@3.0.5:
1968019674
resolved "https://registry.yarnpkg.com/js-cookie/-/js-cookie-3.0.5.tgz#0b7e2fd0c01552c58ba86e0841f94dc2557dcdbc"
1968119675
integrity sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==
1968219676

19683-
js-sha3@0.8.0:
19684-
version "0.8.0"
19685-
resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840"
19686-
integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==
19687-
1968819677
"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0:
1968919678
version "4.0.0"
1969019679
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
@@ -21345,14 +21334,6 @@ marked@^9.0.0:
2134521334
resolved "https://registry.npmjs.org/marked/-/marked-9.1.6.tgz#5d2a3f8180abfbc5d62e3258a38a1c19c0381695"
2134621335
integrity sha512-jcByLnIFkd5gSXZmjNvS1TlmRhCXZjIzHYlaGkPlLIekG55JDR2Z4va9tZwCiP+/RDERiNhMOFu01xd6O5ct1Q==
2134721336

21348-
match-sorter@^6.0.2:
21349-
version "6.3.1"
21350-
resolved "https://registry.yarnpkg.com/match-sorter/-/match-sorter-6.3.1.tgz#98cc37fda756093424ddf3cbc62bfe9c75b92bda"
21351-
integrity sha512-mxybbo3pPNuA+ZuCUhm5bwNkXrJTbsk5VWbR5wiwz/GC6LIiegBGn2w3O08UG/jdbYLinw51fSQ5xNU1U3MgBw==
21352-
dependencies:
21353-
"@babel/runtime" "^7.12.5"
21354-
remove-accents "0.4.2"
21355-
2135621337
matchdep@^2.0.0:
2135721338
version "2.0.0"
2135821339
resolved "https://registry.yarnpkg.com/matchdep/-/matchdep-2.0.0.tgz#c6f34834a0d8dbc3b37c27ee8bbcb27c7775582e"
@@ -21565,11 +21546,6 @@ micromatch@^3.0.4, micromatch@^3.1.10, micromatch@^3.1.4:
2156521546
snapdragon "^0.8.1"
2156621547
to-regex "^3.0.2"
2156721548

21568-
microseconds@0.2.0:
21569-
version "0.2.0"
21570-
resolved "https://registry.yarnpkg.com/microseconds/-/microseconds-0.2.0.tgz#233b25f50c62a65d861f978a4a4f8ec18797dc39"
21571-
integrity sha512-n7DHHMjR1avBbSpsTBj6fmMGh2AGrifVV4e+WYc3Q9lO+xnSZ3NyhcBND3vzzatt05LFhoKFRxrIyklmLlUtyA==
21572-
2157321549
miller-rabin@^4.0.0:
2157421550
version "4.0.1"
2157521551
resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d"
@@ -22547,13 +22523,6 @@ nan@^2.10.0, nan@^2.12.1, nan@^2.17.0, nan@^2.18.0:
2254722523
resolved "https://registry.yarnpkg.com/nan/-/nan-2.19.0.tgz#bb58122ad55a6c5bc973303908d5b16cfdd5a8c0"
2254822524
integrity sha512-nO1xXxfh/RWNxfd/XPfbIfFk5vgLsAxUR9y5O0cHMJu/AW9U95JLXqthYHjEp+8gQ5p96K9jUp8nbVOxCdRbtw==
2254922525

22550-
nano-time@1.0.0:
22551-
version "1.0.0"
22552-
resolved "https://registry.yarnpkg.com/nano-time/-/nano-time-1.0.0.tgz#b0554f69ad89e22d0907f7a12b0993a5d96137ef"
22553-
integrity sha512-flnngywOoQ0lLQOTRNexn2gGSNuM9bKj9RZAWSzhQ+UJYaAFG9bac4DW9VHjUAzrOaIcajHybCTHe/bkvozQqA==
22554-
dependencies:
22555-
big-integer "^1.6.16"
22556-
2255722526
nanoid@3.1.20:
2255822527
version "3.1.20"
2255922528
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.20.tgz#badc263c6b1dcf14b71efaa85f6ab4c1d6cfc788"
@@ -23782,11 +23751,6 @@ objectorarray@^1.0.4:
2378223751
resolved "https://registry.yarnpkg.com/objectorarray/-/objectorarray-1.0.4.tgz#d69b2f0ff7dc2701903d308bb85882f4ddb49483"
2378323752
integrity sha512-91k8bjcldstRz1bG6zJo8lWD7c6QXcB4nTDUqiEvIL1xAsLoZlOOZZG+nd6YPz+V7zY1580J4Xxh1vZtyv4i/w==
2378423753

23785-
oblivious-set@1.0.0:
23786-
version "1.0.0"
23787-
resolved "https://registry.yarnpkg.com/oblivious-set/-/oblivious-set-1.0.0.tgz#c8316f2c2fb6ff7b11b6158db3234c49f733c566"
23788-
integrity sha512-z+pI07qxo4c2CulUHCDf9lcqDlMSo72N/4rLUpRXf6fu+q8vjt8y0xS+Tlf8NTJDdTXHbdeO1n3MlbctwEoXZw==
23789-
2379023754
obuf@^1.0.0, obuf@^1.1.2:
2379123755
version "1.1.2"
2379223756
resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e"
@@ -25966,15 +25930,6 @@ react-is@^16.12.0, react-is@^16.13.1, react-is@^16.8.1, react-is@^16.8.6:
2596625930
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
2596725931
integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==
2596825932

25969-
react-query@3.39.3:
25970-
version "3.39.3"
25971-
resolved "https://registry.yarnpkg.com/react-query/-/react-query-3.39.3.tgz#4cea7127c6c26bdea2de5fb63e51044330b03f35"
25972-
integrity sha512-nLfLz7GiohKTJDuT4us4X3h/8unOh+00MLb2yJoGTPjxKs2bc1iDhkNx2bd5MKklXnOD3NrVZ+J2UXujA5In4g==
25973-
dependencies:
25974-
"@babel/runtime" "^7.5.5"
25975-
broadcast-channel "^3.4.1"
25976-
match-sorter "^6.0.2"
25977-
2597825933
react-refresh@^0.14.2:
2597925934
version "0.14.2"
2598025935
resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.14.2.tgz#3833da01ce32da470f1f936b9d477da5c7028bf9"
@@ -26571,11 +26526,6 @@ remedial@^1.0.7:
2657126526
resolved "https://registry.yarnpkg.com/remedial/-/remedial-1.0.8.tgz#a5e4fd52a0e4956adbaf62da63a5a46a78c578a0"
2657226527
integrity sha512-/62tYiOe6DzS5BqVsNpH/nkGlX45C/Sp6V+NtiN6JQNS1Viay7cWkazmRkrQrdFj2eshDe96SIQNIoMxqhzBOg==
2657326528

26574-
remove-accents@0.4.2:
26575-
version "0.4.2"
26576-
resolved "https://registry.yarnpkg.com/remove-accents/-/remove-accents-0.4.2.tgz#0a43d3aaae1e80db919e07ae254b285d9e1c7bb5"
26577-
integrity sha512-7pXIJqJOq5tFgG1A2Zxti3Ht8jJF337m4sowbuHsW30ZnkQFnDzy9qBNhgzX8ZLW4+UBcXiiR7SwR6pokHsxiA==
26578-
2657926529
remove-bom-buffer@^3.0.0:
2658026530
version "3.0.0"
2658126531
resolved "https://registry.yarnpkg.com/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz#c2bf1e377520d324f623892e33c10cac2c252b53"
@@ -30696,14 +30646,6 @@ unixify@1.0.0, unixify@^1.0.0:
3069630646
dependencies:
3069730647
normalize-path "^2.1.1"
3069830648

30699-
unload@2.2.0:
30700-
version "2.2.0"
30701-
resolved "https://registry.yarnpkg.com/unload/-/unload-2.2.0.tgz#ccc88fdcad345faa06a92039ec0f80b488880ef7"
30702-
integrity sha512-B60uB5TNBLtN6/LsgAf3udH9saB5p7gqJwcFfbOEZ8BcBHnGwCf6G/TGiEqkRAxX7zAFIUtzdrXQSdL3Q/wqNA==
30703-
dependencies:
30704-
"@babel/runtime" "^7.6.2"
30705-
detect-node "^2.0.4"
30706-
3070730649
unpipe@1.0.0, unpipe@~1.0.0:
3070830650
version "1.0.0"
3070930651
resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"
@@ -30898,6 +30840,11 @@ use-sidecar@^1.0.1:
3089830840
detect-node-es "^1.0.0"
3089930841
tslib "^1.9.3"
3090030842

30843+
use-sync-external-store@^1.2.0:
30844+
version "1.2.2"
30845+
resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.2.2.tgz#c3b6390f3a30eba13200d2302dcdf1e7b57b2ef9"
30846+
integrity sha512-PElTlVMwpblvbNqQ82d2n6RjStvdSoNe9FG28kNfz3WiXilJm4DdNkEzRhCZuIDwY8U08WVihhGR5iRqAwfDiw==
30847+
3090130848
use@^3.1.0:
3090230849
version "3.1.1"
3090330850
resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f"

0 commit comments

Comments
 (0)