Add Support for React 18.3.1 and React 19 - #18
Open
esitarz wants to merge 8 commits into
Open
Conversation
Expand peer ranges so React 19 consumers can install without peer conflicts, while keeping 18.3.1 as the minimum. Co-authored-by: Cursor <cursoragent@cursor.com>
StrictMode remounts left duplicate Axios interceptors, and useAuthMutation returned onError instead of calling it. Also import JSX types for React 19 typecheck. Co-authored-by: Cursor <cursoragent@cursor.com>
Cover provider context, auth query/mutation gating, form wiring, and StrictMode interceptor lifecycle without deprecated test utils. Co-authored-by: Cursor <cursoragent@cursor.com>
Run lint/test/build against React 18.3.1 and 19, inspect npm pack output, and smoke-install the tarball in an isolated consumer. Co-authored-by: Cursor <cursoragent@cursor.com>
Update install guidance and changelog; migrate ESLint to flat config so CI lint works on ESLint 9. Co-authored-by: Cursor <cursoragent@cursor.com>
Add `test:consumer` script to `package.json` to run the packed consumer validation against React 18.3.1 and 19. Update `scripts/validate-consumer.mjs` to: - Remove `npm install --legacy-peer-deps`, as peer dependency issues are now resolved. - Refine version checking to use `includes` for more flexible matching of React and ReactDOM versions, accommodating release candidates.
5 tasks
Collaborator
Author
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.

Expands
reactandreact-dompeer ranges to include React 19, while retaining support for React 18.3.1. This ensures broader compatibility for consumers leveraging newer React versions.Addresses an issue where Axios request interceptors could duplicate in React StrictMode by introducing an effect cleanup mechanism. Ensures
useAuthMutationcorrectly invokes providedonErrorcallbacks, preferring per-call handlers over global defaults. GuardslocalStorageaccess to prevent errors in non-browser environments.Introduces a CI matrix to validate the library against both React 18.3.1 and React 19. Adds comprehensive Vitest integration tests for core hooks and provider functionality. Implements
npm packinspection and consumer validation scripts to ensure package integrity and correct peer dependency resolution. Updates ESLint to a flat configuration format and integrates linting and testing into CI workflows.Updates documentation to reflect new peer dependency support and important installation considerations for React 19. Externalizes additional
react-hook-formresolver dependencies in the library bundle.