cfaester / enzyme-adapter-react-18

MIT License
38 stars 12 forks source link

Fix peer dependency issues #7

Closed friederbluemle closed 5 months ago

friederbluemle commented 1 year ago

Using this module results in several warnings regarding peer dependencies:

warning " > @cfaester/enzyme-adapter-react-18@0.7.1" has incorrect peer dependency "react@^18.2.0".
warning " > @cfaester/enzyme-adapter-react-18@0.7.1" has incorrect peer dependency "react-dom@^18.2.0".
warning "@cfaester/enzyme-adapter-react-18 > react-test-renderer@18.2.0" has incorrect peer dependency "react@^18.2.0".

This is due to an unnecessarily strict peer dependency range ^18.2.0 - The PR replaces that with simply >=18. Also directly related to it, the two dependencies react-is and react-test-renderer have been moved to peer dependencies as well. It is not really recommended to list a specific version of these packages as a direct dependency (unless that specific version is required). Instead, it is better to leave it up to the integrating project to supply a compatible version of the necessary module. In a separate commit, a few @types packages were added to dev dependencies (this could also be moved to a separate PR if preferred, please let me know).

cfaester commented 1 year ago

@friederbluemle Hey Frieder. Thanks for taking the time to open a PR. I'll run a few internal tests, and if it looks good submit a version next week 🙂

friederbluemle commented 11 months ago

Hi @cfaester - Just checking, have you had a chance to run the tests? Any questions/issues?

tmc commented 11 months ago

@cfaester ping

cfaester commented 9 months ago

Hey everyone. I just wanted to chime in. I've been away for holidays for a while, and more importantly away from a comprehensive test-solution for a while. I will push a "next" version with these fixes, but bear in mind, they are untested.

cfaester commented 9 months ago

Hey everyone. I just wanted to chime in. I've been away for holidays for a while, and more importantly away from a comprehensive test-solution for a while. I will push a "next" version with these fixes, but bear in mind, they are untested.

Live at: https://www.npmjs.com/package/@cfaester/enzyme-adapter-react-18/v/0.7.2-next-peer-deps

@tmc @friederbluemle

cfaester commented 5 months ago

Alright guys, I am including this in 0.8.0

friederbluemle commented 5 months ago

Thank you @cfaester :+1:

friederbluemle commented 5 months ago

I saw the 0.8.0 version is already published to npmjs.com - It would be nice to also create an entry for it on GitHub Releases, along with a brief explanation of differences (changelog). Thanks again!