-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Open
gwansikk
wants to merge
23
commits into
TanStack:v4
Choose a base branch
from
gwansikk:react-query-4/react-19
base: v4
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
2ad3d5e
chore(react-query): add support for react19 in react-query v4
gwansikk b3cd1dc
chore: update pnpm-lock
gwansikk 463a0db
chore(react-query-devtools): support for react19
gwansikk b5d8992
chore(react-query-persist-client): support for react19
gwansikk b43d443
fix(react-query): react.node types in QueryClientProvider
gwansikk 6fc23c3
fix: update return types to React.JSX.Element
gwansikk ecab788
chore: update test packages for react19
gwansikk bd554f1
chore: update testing-library/react
gwansikk bd1581d
fix: testing-library version match
gwansikk f45149d
fix: import react
gwansikk 45f41d7
chore: jest setup for react19
gwansikk a502c6d
chore: update
gwansikk f7b3cba
fix: svelte-query
gwansikk bbe81e6
chore: add ci for react18
gwansikk 97721c4
chore(.github): update pr-ci
gwansikk 536a99a
chore: update root react version
gwansikk b925b03
chore: update
gwansikk 01f5d48
chore: update
gwansikk 5d3db64
chore: update prettier
gwansikk e85f00c
chore: update
gwansikk ff967c9
chore: update
gwansikk 3bae0c0
chore: update
gwansikk 2c1cc86
chore: react overrides
gwansikk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,15 +97,18 @@ jobs: | |
run: pnpm --filter "./packages/**" --filter query --prefer-offline install | ||
- name: Run prettier | ||
run: pnpm run test:format | ||
test-react-17: | ||
name: 'Test React 17' | ||
test-react-version: | ||
name: 'Test React Version' | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
react-version: [17, 18] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ github.head_ref }} | ||
repository: ${{github.event.pull_request.head.repo.full_name}} | ||
repository: ${{ github.event.pull_request.head.repo.full_name }} | ||
- uses: pnpm/[email protected] | ||
with: | ||
version: 8 | ||
|
@@ -118,12 +121,12 @@ jobs: | |
run: pnpm --filter "./packages/**" --filter query --prefer-offline install | ||
- name: Derive appropriate SHAs for base and head for `nx affected` commands | ||
uses: nrwl/nx-set-shas@v2 | ||
- name: Run Tests | ||
- name: Run Tests for React ${{ matrix.react-version }} | ||
uses: nick-fields/[email protected] | ||
with: | ||
timeout_minutes: 5 | ||
max_attempts: 3 | ||
command: npx nx affected --targets=test:lib --base=${{ github.event.pull_request.base.sha }} | ||
env: | ||
NX_CLOUD_DISTRIBUTED_EXECUTION: false | ||
REACTJS_VERSION: 17 | ||
REACTJS_VERSION: ${{ matrix.react-version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,15 +46,16 @@ | |
"@rollup/plugin-node-resolve": "^13.2.1", | ||
"@rollup/plugin-replace": "^4.0.0", | ||
"@testing-library/jest-dom": "^5.16.4", | ||
"@testing-library/react": "^13.0.0", | ||
"@testing-library/react": "^16.2.0", | ||
"@testing-library/react-17": "npm:@testing-library/[email protected]", | ||
"@testing-library/react-18": "npm:@testing-library/[email protected]", | ||
"@testing-library/react-hooks": "^7.0.2", | ||
"@testing-library/user-event": "14.4.3", | ||
"@types/jest": "^26.0.4", | ||
"@types/luxon": "^2.3.1", | ||
"@types/node": "^17.0.25", | ||
"@types/react": "^18.0.14", | ||
"@types/react-dom": "^18.0.5", | ||
"@types/react": "^19.0.0", | ||
"@types/react-dom": "^19.0.0", | ||
"@types/semver": "^7.3.13", | ||
"@types/testing-library__jest-dom": "^5.14.5", | ||
"@typescript-eslint/eslint-plugin": "^5.41.0", | ||
|
@@ -83,10 +84,12 @@ | |
"nx-cloud": "16.3.0", | ||
"prettier": "^2.6.2", | ||
"prettier-plugin-svelte": "^2.9.0", | ||
"react": "^18.2.0", | ||
"react": "^19.0.0", | ||
"react-17": "npm:react@^17.0.2", | ||
"react-dom": "^18.2.0", | ||
"react-18": "npm:react@^18.2.0", | ||
"react-dom": "^19.0.0", | ||
"react-dom-17": "npm:react-dom@^17.0.2", | ||
"react-dom-18": "npm:react-dom@^18.2.0", | ||
"rimraf": "^3.0.2", | ||
"rollup": "^2.70.2", | ||
"rollup-plugin-preserve-directives": "0.1.0", | ||
|
@@ -102,6 +105,14 @@ | |
"typescript": "^4.7.4", | ||
"vue": "^3.2.33" | ||
}, | ||
"pnpm": { | ||
"overrides": { | ||
"react": "18.2.0", | ||
"react-dom": "18.2.0", | ||
"@types/react": "^18.0.14", | ||
"@types/react-dom": "^18.0.5" | ||
} | ||
}, | ||
"bundlewatch": { | ||
"files": [ | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To test React 17 and 18, I had to use
overrides
.Currently,
react-query
executes the test environment for each React version through PR-CI. However, since the version of@testing-library/react
is fixed at React 19, errors occur due to breaking changes related to JSX andReact.act
.