Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(react-query): add support for react19 in v4 #8441

Closed
wants to merge 23 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: update
  • Loading branch information
gwansikk committed Jan 28, 2025
commit 3bae0c0152198f0c26b9fc9308063fd7d1a8007f
13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"@rollup/plugin-commonjs": "22.0.1",
"@rollup/plugin-node-resolve": "^13.2.1",
"@rollup/plugin-replace": "^4.0.0",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^16.2.0",
"@testing-library/react-17": "npm:@testing-library/[email protected]",
"@testing-library/react-18": "npm:@testing-library/[email protected]",
Expand Down Expand Up @@ -77,13 +77,12 @@
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"git-log-parser": "^1.2.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jest": "^27.5.1",
"jsonfile": "^6.1.0",
"luxon": "^2.3.2",
"nx": "16.7.4",
"nx-cloud": "16.3.0",
"prettier": "^2.8.8",
"prettier": "^2.6.2",
"prettier-plugin-svelte": "^2.9.0",
"react": "^19.0.0",
"react-17": "npm:react@^17.0.2",
Expand All @@ -92,16 +91,16 @@
"react-dom-17": "npm:react-dom@^17.0.2",
"react-dom-18": "npm:react-dom@^18.2.0",
"rimraf": "^3.0.2",
"rollup": "^2.79.2",
"rollup-plugin-preserve-directives": "0.4.0",
"rollup": "^2.70.2",
"rollup-plugin-preserve-directives": "0.1.0",
"rollup-plugin-size": "^0.2.2",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-visualizer": "^5.6.0",
"semver": "^7.3.8",
"solid-js": "^1.5.7",
"solid-testing-library": "^0.3.0",
"stream-to-array": "^2.3.0",
"ts-jest": "^29.2.5",
"ts-jest": "^27.1.1",
"ts-node": "^10.7.0",
"typescript": "^4.7.4",
"vue": "^3.2.33"
Expand Down
6 changes: 3 additions & 3 deletions packages/query-core/src/queryObserver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -761,9 +761,9 @@ function shouldFetchOnMount(
function shouldFetchOn(
query: Query<any, any, any, any>,
options: QueryObserverOptions<any, any, any, any, any>,
field: (typeof options)['refetchOnMount'] &
(typeof options)['refetchOnWindowFocus'] &
(typeof options)['refetchOnReconnect'],
field: typeof options['refetchOnMount'] &
typeof options['refetchOnWindowFocus'] &
typeof options['refetchOnReconnect'],
) {
if (options.enabled !== false) {
const value = typeof field === 'function' ? field(query) : field
Expand Down
4 changes: 2 additions & 2 deletions packages/react-query-devtools/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

import * as devtools from './devtools'

export const ReactQueryDevtools: (typeof devtools)['ReactQueryDevtools'] =
export const ReactQueryDevtools: typeof devtools['ReactQueryDevtools'] =
process.env.NODE_ENV !== 'development'
? function () {
return null
}
: devtools.ReactQueryDevtools

export const ReactQueryDevtoolsPanel: (typeof devtools)['ReactQueryDevtoolsPanel'] =
export const ReactQueryDevtoolsPanel: typeof devtools['ReactQueryDevtoolsPanel'] =
process.env.NODE_ENV !== 'development'
? (function () {
return null
Expand Down
1 change: 0 additions & 1 deletion packages/svelte-query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"devDependencies": {
"@sveltejs/package": "^2.0.2",
"@sveltejs/vite-plugin-svelte": "^2.0.2",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/svelte": "^3.2.2",
"@vitest/coverage-istanbul": "^0.27.1",
"eslint-plugin-svelte": "^2.14.1",
Expand Down
7 changes: 1 addition & 6 deletions packages/vue-query/src/__tests__/useMutation.types.test.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import { reactive } from 'vue'
import { useMutation } from '../useMutation'
import {
type Equal,
type Expect,
doNotExecute,
successMutator,
} from './test-utils'
import { doNotExecute, Equal, Expect, successMutator } from './test-utils'

describe('Discriminated union return type', () => {
it('data should be possibly undefined by default', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/vue-query/src/useBaseQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export function useBaseQuery<
})

// fix #5910
const refetch = (...args: Parameters<(typeof state)['refetch']>) => {
const refetch = (...args: Parameters<typeof state['refetch']>) => {
updater()
return state.refetch(...args)
}
Expand Down
Loading
Loading