feat(react 19): update react to 19, testing libraries deps to latest …#819
Closed
leefreemanxyz wants to merge 3 commits intoauth0:mainfrom
Closed
feat(react 19): update react to 19, testing libraries deps to latest …#819leefreemanxyz wants to merge 3 commits intoauth0:mainfrom
leefreemanxyz wants to merge 3 commits intoauth0:mainfrom
Conversation
Contributor
|
Acknowledged, @leefreemanxyz, we will take a look and merge if it looks fine. |
|
Do you have an ETA for when 2.2.5 (or what the next release will be named) will be released with support for react 19? |
Contributor
|
Hi @FrankBurmo, you can expect a release for react 19 support by January 2025 latest. |
…ests and providers
Contributor
Author
|
I've removed the explicit JSX.Element typing to let the types flow as they were breaking the build in CI. |
leefreemanxyz
commented
Dec 23, 2024
| * Render a message to show that the user is being redirected to the login. | ||
| */ | ||
| onRedirecting?: () => JSX.Element; | ||
| onRedirecting?: () => React.JSX.Element; |
Contributor
Author
There was a problem hiding this comment.
I would normally type this with React.ReactNode, but that causes breakage elsewhere (and trying to fix it leads me down a TypeScript rabbithole)
|
@tusharpandey13 any news/ETA on this? |
Contributor
|
Closing this as #823 is up, containing your commits @leefreemanxyz |
tusharpandey13
added a commit
that referenced
this pull request
Jan 21, 2025
This change enables React 19 support for `auth0-react` This change builds upon PR #819 by @leefreemanxyz ### Changes - Version bumps of related packages in package.json, package-lock.json update. - Updated tests to use the new version of packages. - Added handling for an edge case where error was not thrown if popup was closed in `loginWithPopup`. - Updated sample code to use React 19. - Linting changes. #### Commits - **feat(react 19): update react to 19, testing libraries deps to latest and fix broken tests** - **chore: update @types/react and @types/react-dom to version 19.0.0** - **refactor: remove explicit return types for functional components in tests and providers** - **add explicit type annotations for React.JSX.Element** - **handle popup closed error not thrown** - **update example code** - **update tests** - **package json changes** ### Testing *PASSING* ```log =============================== Coverage summary =============================== Statements : 100% ( 166/166 ) Branches : 100% ( 72/72 ) Functions : 100% ( 41/41 ) Lines : 100% ( 158/158 ) ================================================================================ Test Suites: 8 passed, 8 total Tests: 81 passed, 81 total Snapshots: 0 total Time: 4.995 s Ran all test suites. ``` - [x] This change adds test coverage for new/changed/fixed functionality ### Checklist - [x] I have added documentation for new/changed functionality in this PR or in auth0.com/docs - [x] All active GitHub checks for tests, formatting, and security are passing - [x] The correct base branch is being used, if not the default branch
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
…and fix broken tests. Closes #818
By submitting a PR to this repository, you agree to the terms within the Auth0 Code of Conduct. Please see the contributing guidelines for how to create and submit a high-quality PR for this repo.
Description
The purpose of this PR is to enable compatability with React 19 without the need for legacy-peer-deps flag in npm.
Updating to React 19 had further knock on effects that required updating testing libraries dependencies. This caused significant breakage in the unit tests due to deprecated functionality being used, which have now been fixed and should be passing.
Testing
The unit tests have been adjusted to be passing, otherwise all behaviour should be identical - I have not tested/run the examples.
Checklist