-
Notifications
You must be signed in to change notification settings - Fork 269
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
feat(react 19): update react to 19, testing libraries deps to latest … #819
Conversation
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? |
Hi @FrankBurmo, you can expect a release for react 19 support by January 2025 latest. |
…ests and providers
I've removed the explicit JSX.Element typing to let the types flow as they were breaking the build in CI. |
@@ -52,7 +52,7 @@ export interface WithAuthenticationRequiredOptions { | |||
* | |||
* Render a message to show that the user is being redirected to the login. | |||
*/ | |||
onRedirecting?: () => JSX.Element; | |||
onRedirecting?: () => React.JSX.Element; |
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.
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? |
Closing this as #823 is up, containing your commits @leefreemanxyz |
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
…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