jedireza / hapi-react-views

:package: A hapi view engine for React components
MIT License
231 stars 33 forks source link

React 17 #87

Closed crccheck closed 1 year ago

crccheck commented 2 years ago

add React 17 support. I kept React 16 because that still works; but upgrading the dev dep to React 17 takes away test support for React 16.

Fixes this error in npm v8:

npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR!   react@"17.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"16.x.x" from hapi-react-views@10.1.3
npm ERR! node_modules/hapi-react-views
npm ERR!   hapi-react-views@"10.1.3" from the root project
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.
crccheck commented 2 years ago

The .travis.yml also probably needs an update but I didn't touch it since it doesn't appear to be running. I had the same problem with all my TravisCI projects and I ended up converting them to Github Actions instead of trying to figure out the new TravisCI


update: TravisCI is running, it's just not reporting back to Github https://app.travis-ci.com/github/crccheck/hapi-react-views The Node 16 global leaks are expected because those are new global variables in Node 16. https://github.com/hapijs/lab/pull/1004

jedireza commented 2 years ago

Thanks for creating a PR. FYI: I don't use this library any longer as I've moved away from hapi.

I wouldn't want to release this change (as is) via a minor or patch release. So I think it's reasonable to do a full dependency revamp and release as v11 if you're down for that.

crccheck commented 2 years ago

sorry I didn't get a notification. that sounds like a plan.

stephencranedesign commented 1 year ago

@jedireza / @crccheck,

Any more work that needs to be done here? we're also seeing npm peer-dep issues and would like to see this merged.

jedireza commented 1 year ago

Wow this aged fast. I think what I mentioned last is still relevant. When we bump major versions of dependencies we should also bump the major version of this lib.

I wouldn't want to release this change (as is) via a minor or patch release. So I think it's reasonable to do a full dependency revamp and release as v11 if you're down for that.

So if we could not only update React but also other outdated deps, we could do a nice v11 release.

stephencranedesign commented 1 year ago

@jedireza just opened #88 which updates all the deps in the repo to the latest.