Open dahlbyk opened 6 years ago
The path to import/require React Test Utils is now react-dom/test-utils
instead of react-dom/lib/ReactTestUtils
. The tests would have to update all those references.
The react-addons-test-utils
dependency could probably also be removed.
@dahlbyk I found a few more test issues: es2015 references that required a polyfill, createRenderer() moved to another dependency, and a suite that depends on a variable sharing between specs but was failing.
I've got these issues fixed locally and all tests pass now. Do you want this in a separate PR? Or merged into release-0.8.2
? Happy to do whatever is easiest!
@thathenderson a PR into this branch is probably easiest, if you don't mind.
I have never dealt with targeting multiple React versions, so my biggest concern is making sure stuff keeps working with older version (especially for v0.x). Or am I being overly paranoid about devDependencies
?
@dahlbyk You know, I was wondering about that too. As of React 15.5, Test Utils was moved inside react-dom and testutils.createRenderer was moved to a separate react-test-renderer
package, which means the apis the tests use need to change. 15.5 would have to be the lowest supported React/ReactDom versions.
Does v0 still need to offer support for React 15.4 and below (including 0.14.x)?
I guess we could have different react/react-dom versions in devDependencies than in peerDependencies? Is that bad practice?
Does v0 still need to offer support for React 15.4 and below (including 0.14.x)?
I need @joellanciaux and/or @ryanlanciaux to weigh in on this. I'm mostly here for 1.0+.
I guess we could have different react/react-dom versions in devDependencies than in peerDependencies? Is that bad practice?
A bit unconventional, perhaps, but I can't see much way around it if one intends wide support. It does lower one's confidence in tests; realistically tests should be run for React 14 and 15 and 16, but I have no idea how to pull that off.
It does lower one's confidence in tests; realistically tests should be run for React 14 and 15 and 16, but I have no idea how to pull that off.
Agreed. I'm not sure there's a way to continue supporting an api that's multiple deprecations behind, while also trying to support the latest.
Any update on the review here? @ryanlanciaux @joellanciaux
This PR aligns the build process with v1 as of #808.
I have published 0.8.2, to release https://github.com/GriddleGriddle/Griddle/pull/753, but the build is failing due to
react-addons-test-utils
dependency hell.@vakopian do you have any ideas how to resolve the failure due to
react-addons-test-utils
shift fromreact
toreact-dom
peer dependency?