-
Notifications
You must be signed in to change notification settings - Fork 259
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
Fix peer deeps for monorepos #673
base: main
Are you sure you want to change the base?
Conversation
Thanks for reaching out and providing this PR. Can you help me understand the need to add this as a peer dependency? What if people aren't using typescript? Why would they need to pull in the same peer deps? |
@frederikprijck I added |
Thanks for updating the metadata, but I am more curious to understand why you think we should need to have a peer dependency on types, as well as why it solves the issue in your project and why you can not solve it outside of our SDK (in your own project) instead. Would you be able to share a minimal reproduction of the issue for us to look into and see what's causing it and better understand the issue and solution? |
Apologies, as setting up a test monorepo containing two React applications (one with React 17 and another with React 18) will require considerable time. I suggest examining the approaches used by other libraries to understand the concept better. It's important to note that a library supporting multiple versions of React also needs to have corresponding peer dependencies in the types/*. This allows the consumer application to select the appropriate types. https://github.com/radix-ui/primitives/blob/main/packages/react/arrow/package.json |
Please understand this also takes the same effort for us to reproduce and look into. Happy to look at something as soon as possible once something that reproduces it is provided. If not, this will need to wait due to other priorities at the moment and will need to get back to this at a later point (but we will still need more information about your setup to ensure we can reproduce this efficiently). We don't generally just merge PRs with little context (the issue template isnt filled), and we like to understand what code we are adding by seeing it fix a certain issue and ensure we are onboard with the fix, I hope you understand that. |
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
This PR addresses the issue of peer dependencies involving @types/react for monorepos. Essentially, if you're using this package in a monorepo that includes applications utilizing both React 17 and React 18, it fails to accurately fetch the appropriate types.
References
Testing
Checklist