From 96d92002d089a3e54f29ed442d0546e718aec1b6 Mon Sep 17 00:00:00 2001 From: Alan Alickovic Date: Thu, 2 Mar 2023 08:40:45 +0100 Subject: [PATCH 1/2] 2.2.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index aa54efc..28080d1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-query-auth", - "version": "2.1.2", + "version": "2.2.0", "author": "alan2207", "license": "MIT", "repository": "alan2207/react-query-auth", From 4354631381c1394868988b6ef55e6d67147f3402 Mon Sep 17 00:00:00 2001 From: Mohamed Nehad Date: Mon, 6 Nov 2023 13:44:31 +0200 Subject: [PATCH 2/2] feat: Update @tanstack/react-query --- package.json | 4 ++-- src/index.tsx | 6 +++++- yarn.lock | 24 +++++++++--------------- 3 files changed, 16 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index 28080d1..bcfcf0c 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "size": "size-limit" }, "peerDependencies": { - "@tanstack/react-query": "^4.24.6", + "@tanstack/react-query": ">=4.24.6", "react": ">=16.8.0" }, "husky": { @@ -46,7 +46,7 @@ ], "devDependencies": { "@size-limit/preset-small-lib": "^8.2.4", - "@tanstack/react-query": "^4.24.6", + "@tanstack/react-query": "^5.7.2", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.4.0", "@testing-library/react-hooks": "^8.0.1", diff --git a/src/index.tsx b/src/index.tsx index 07b3f80..29d710c 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -45,7 +45,11 @@ export function configureAuth< UseQueryOptions, 'queryKey' | 'queryFn' > - ) => useQuery(userKey, userFn, options); + ) => useQuery({ + queryKey: userKey, + queryFn: userFn, + ...options + }); const useLogin = ( options?: Omit< diff --git a/yarn.lock b/yarn.lock index dc4419a..867fdaf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -796,18 +796,17 @@ "@size-limit/esbuild" "8.2.4" "@size-limit/file" "8.2.4" -"@tanstack/query-core@4.24.6": - version "4.24.6" - resolved "https://registry.yarnpkg.com/@tanstack/query-core/-/query-core-4.24.6.tgz#8f102bc922308f0c6c5ddea34fe253688314265a" - integrity sha512-Tfru6YTDTCpX7dKVwHp/sosw/dNjEdzrncduUjIkQxn7n7u+74HT2ZrGtwwrU6Orws4x7zp3FKRqBPWVVhpx9w== +"@tanstack/query-core@5.7.2": + version "5.7.2" + resolved "https://registry.yarnpkg.com/@tanstack/query-core/-/query-core-5.7.2.tgz#c4a994d6f2b0a6901741a805c32da94db964880d" + integrity sha512-vPYoNCOI8W+jFLnyEAYQL7/qURE7XzVE/TvkmNSko8LU55jFshee342p4GNFOTsYFgJty7Da5bw4m2P3vaKWMw== -"@tanstack/react-query@^4.24.6": - version "4.24.6" - resolved "https://registry.yarnpkg.com/@tanstack/react-query/-/react-query-4.24.6.tgz#ec406e59314ae13d31a2c82eed0043bb0b67ba2e" - integrity sha512-pbJUVZCS4pcXS0kZiY+mVJ01ude0GrH5OXT2g9whcqSveRG/YVup/XdA9NdRpSMGkP2HxDRxxRNsTXkniWeIIA== +"@tanstack/react-query@^5.7.2": + version "5.7.2" + resolved "https://registry.yarnpkg.com/@tanstack/react-query/-/react-query-5.7.2.tgz#28a697ed9b8e5ae5c19f79a692180e819555c91f" + integrity sha512-NMsfz0Wd3VPDvSpX9sw2x07r0kf9HwuAlNNHQvwMUHM7EcuVN/LYmlmTe40dWER1c/92Jhc5LODdtW0PyvHsFg== dependencies: - "@tanstack/query-core" "4.24.6" - use-sync-external-store "^1.2.0" + "@tanstack/query-core" "5.7.2" "@testing-library/dom@^8.5.0": version "8.19.1" @@ -4356,11 +4355,6 @@ url-parse@^1.5.3: querystringify "^2.1.1" requires-port "^1.0.0" -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== - v8-to-istanbul@^9.0.1: version "9.1.0" resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.1.0.tgz#1b83ed4e397f58c85c266a570fc2558b5feb9265"