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

feat(react 19): update react to 19, testing libraries deps to latest … #819

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

leefreemanxyz
Copy link

@leefreemanxyz leefreemanxyz commented Dec 6, 2024

…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.

  • This change adds test coverage for new/changed/fixed functionality

Checklist

  • I have added documentation for new/changed functionality in this PR or in auth0.com/docs
  • [?] All active GitHub checks for tests, formatting, and security are passing
  • [X ] The correct base branch is being used, if not the default branch

@leefreemanxyz leefreemanxyz requested a review from a team as a code owner December 6, 2024 15:19
@tusharpandey13
Copy link

Acknowledged, @leefreemanxyz, we will take a look and merge if it looks fine.

@FrankBurmo
Copy link

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?

@tusharpandey13
Copy link

tusharpandey13 commented Dec 23, 2024

Hi @FrankBurmo, you can expect a release for react 19 support by January 2025 latest.

@leefreemanxyz
Copy link
Author

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;
Copy link
Author

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

React 19 compatibility
3 participants