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

deps: update peerDeps to support React 19 without warnings #116

Merged
merged 3 commits into from
Jan 3, 2025

Conversation

agilgur5
Copy link
Owner

@agilgur5 agilgur5 commented Jan 3, 2025

Summary

Update peerDependencies range to support React 19. Update devDeps, typings, tests to support / use React 19

Details

  • seems to work without any source component modifications needed on React 19

  • ensure tests pass with React 19

    • update devDeps to React 19, react-dom 19, @types/react 19
    • update devDeps to RTL 16.1.0 which supports React 19

Future Work

  1. Backport this to v1.0.7, i.e. prior to the TypeScript rewrite (TypeScript Rewrite #42) being merged

@agilgur5 agilgur5 added kind: feature New feature or request scope: dependencies Pull requests that update a dependency file scope: tests Tests could be improved. Or changes that only affect tests labels Jan 3, 2025

This comment was marked as resolved.

@agilgur5
Copy link
Owner Author

agilgur5 commented Jan 3, 2025

Example seems to be working fine and not require any changes:
Screenshot 2025-01-03 at 4 29 45 PM

@agilgur5
Copy link
Owner Author

agilgur5 commented Jan 3, 2025

I was wondering if fully updating to the new JSX transform might require a breaking change to not have the warning, but it seems like the end-user compiler can handle that automatically without the library needing to update? I didn't have any warnings like the upgrade guide mentions. The render function of this component only has one element too (the canvas), so that might simplify things

@agilgur5 agilgur5 marked this pull request as ready for review January 3, 2025 21:45
Copy link
Owner Author

@agilgur5 agilgur5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Code LGTM. Tests pass, example works with no console warnings

@agilgur5 agilgur5 merged commit ebec40b into main Jan 3, 2025
8 checks passed
@agilgur5 agilgur5 deleted the deps-react-19 branch January 3, 2025 21:47
agilgur5 added a commit that referenced this pull request Jan 3, 2025
* deps: update peerDeps to support React 19 without warnings

- react 19 is also incompatible with `@testing-library/react` 13, so it needs updating as well, see next commits

* typings fixes required in new version

* update @testing-library/react to compatible 16.1 version

- react 19 support in https://github.com/testing-library/react-testing-library/releases/tag/v16.1.0

(cherry picked from commit ebec40b)
- fixed various merge conflicts:
  - no typings changes as there is no TS on the `v1.0.x` branch
  - no `@types/` updates either
  - isolate surrounding deps changes etc (only update `react`, `react-dom`, and `@testing-library/react`)
@agilgur5
Copy link
Owner Author

agilgur5 commented Jan 3, 2025

  1. Backport this to v1.0.7

Backported as 84cf637 and released in v1.0.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: feature New feature or request scope: dependencies Pull requests that update a dependency file scope: tests Tests could be improved. Or changes that only affect tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add React 19 to peerDep range
1 participant