Wildhoney / ReactShadow

:beginner: Utilise Shadow DOM in React with all the benefits of style encapsulation.
https://react-shadow.herokuapp.com/
MIT License
1.29k stars 80 forks source link

Adds React 18 to peer deps ranges #140

Closed mrspence closed 1 year ago

mrspence commented 1 year ago
  1. Extended peerDependencies ranges to include React 18

  2. Locked Travis Node JS version to 16 (LTS) so existing build/test scripts continue to work

Fix https://github.com/Wildhoney/ReactShadow/issues/137

Wildhoney commented 1 year ago

Thanks 👍 are we doing away with Husky?

mrspence commented 1 year ago

Ahhh! Well spotted, my mistake - brought the husky back home

clmnin commented 1 year ago

@Wildhoney Is the PR ready to be merged? Or should we keep using < react 18?

lmk123 commented 1 year ago

Update: I created a fork to solve this problem https://www.npmjs.com/package/@hcfy/react-shadow


I hope this PR will be merged soon, otherwise my project will report the following error when using npm to install dependencies:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: myapp@0.0.0
npm ERR! Found: react@18.2.0
npm ERR! node_modules/react
npm ERR!   react@"^18.2.0" from myapp@0.0.0
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8.0 || ^17.0.0" from react-shadow@19.0.3
npm ERR! node_modules/react-shadow
npm ERR!   react-shadow@"^19.0.2" from myapp@0.0.0
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

I've tried using --force or --legacy-peer-deps, but they both cause other problems, the biggest problem is that this will result in two versions of react in the project, one for 17 and the other for 18.

mrspence commented 1 year ago

@lmk123 existing tests passing; need repo author (@Wildhoney) to confirm it is ready and approve ✅

Wildhoney commented 1 year ago

Thanks 👍