Skip to content

Commit 2064847

Browse files
committed
Upgrade react-query
1 parent 3694427 commit 2064847

File tree

13 files changed

+41
-39
lines changed

13 files changed

+41
-39
lines changed

examples/simple/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
"dependencies": {
1313
"@mui/icons-material": "^5.16.12",
1414
"@mui/material": "^5.16.12",
15-
"@tanstack/react-query": "^5.21.7",
16-
"@tanstack/react-query-devtools": "^5.21.7",
15+
"@tanstack/react-query": "^5.83.0",
16+
"@tanstack/react-query-devtools": "^5.83.0",
1717
"jsonexport": "^3.2.0",
1818
"lodash": "~4.17.5",
1919
"ra-data-fakerest": "^5.9.1",

packages/ra-core/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@
5757
"react-router-dom": "^6.28.1 || ^7.1.1"
5858
},
5959
"dependencies": {
60-
"@tanstack/react-query": "^5.21.7",
61-
"clsx": "^2.1.1",
60+
"@tanstack/react-query": "^5.83.0",
6261
"date-fns": "^3.6.0",
6362
"eventemitter3": "^5.0.1",
6463
"inflection": "^3.0.0",

packages/ra-core/src/auth/useAuthState.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ const useAuthState = <ErrorType = Error>(
150150

151151
return authProvider != null
152152
? result
153-
: (noAuthProviderQueryResult as UseAuthStateResult<ErrorType>);
153+
: (noAuthProviderQueryResult as unknown as UseAuthStateResult<ErrorType>);
154154
};
155155

156156
type UseAuthStateOptions<ErrorType = Error> = Omit<

packages/ra-core/src/auth/useCanAccess.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export const useCanAccess = <
9393

9494
return authProviderHasCanAccess
9595
? result
96-
: (emptyQueryObserverResult as UseCanAccessResult<ErrorType>);
96+
: (emptyQueryObserverResult as unknown as UseCanAccessResult<ErrorType>);
9797
};
9898

9999
const emptyQueryObserverResult = {

packages/ra-core/src/auth/usePermissions.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,10 @@ const usePermissions = <PermissionsType = any, ErrorType = Error>(
108108
);
109109

110110
return !authProvider || !authProvider.getPermissions
111-
? (fakeQueryResult as UsePermissionsResult<PermissionsType, ErrorType>)
111+
? (fakeQueryResult as unknown as UsePermissionsResult<
112+
PermissionsType,
113+
ErrorType
114+
>)
112115
: result;
113116
};
114117

packages/ra-core/src/controller/input/useReferenceInputController.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ export const useReferenceInputController = <RecordType extends RaRecord = any>(
116116
} = useReference<RecordType>({
117117
id: currentValue,
118118
reference,
119-
// @ts-ignore the types of the queryOptions for the getMAny and getList are not compatible
120119
options: {
120+
// @ts-ignore the types of the queryOptions for the getMAny and getList are not compatible
121121
enabled: currentValue != null && currentValue !== '',
122122
meta,
123123
...otherQueryOptions,

packages/ra-core/src/dataProvider/useGetList.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ export const useGetList = <
176176
}
177177
: result,
178178
[result]
179-
) as UseQueryResult<RecordType[], Error> & {
179+
) as unknown as UseQueryResult<RecordType[], Error> & {
180180
total?: number;
181181
pageInfo?: {
182182
hasNextPage?: boolean;

packages/ra-core/src/dataProvider/useGetManyReference.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export const useGetManyReference = <
155155
}
156156
: result,
157157
[result]
158-
) as UseQueryResult<RecordType[], ErrorType> & {
158+
) as unknown as UseQueryResult<RecordType[], ErrorType> & {
159159
total?: number;
160160
pageInfo?: {
161161
hasNextPage?: boolean;

packages/ra-core/src/dataProvider/useInfiniteGetList.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,6 @@ export type UseInfiniteGetListOptions<
248248
GetInfiniteListResult<RecordType>,
249249
ErrorType,
250250
InfiniteData<GetInfiniteListResult<RecordType>>,
251-
GetInfiniteListResult<RecordType>,
252251
QueryKey,
253252
number
254253
>,

packages/ra-no-code/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"react-dom": "^18.0.0 || ^19.0.0"
4343
},
4444
"dependencies": {
45-
"@tanstack/react-query": "^5.21.7",
45+
"@tanstack/react-query": "^5.83.0",
4646
"clsx": "^2.1.1",
4747
"date-fns": "^3.6.0",
4848
"inflection": "^3.0.0",

0 commit comments

Comments
 (0)