Closed samouss closed 4 years ago
Correct me if i'm wrong, but making these changes will break compatability with lower versions? This isnt a problem, but if it does, we should change the version numbers to enforce this.
Yes, I think it will be the case.
How can I do this ? With peerDependencies ?
Yes, change the peerDependencies
, but also the react-* dependencies can be updated to 16 if a version is available
I change the version of the package, change some code for avoid warning due to deprecation.
React.PropTypes
to prop-types
standalone packageReact.createClass
to create-react-class
standalone packageBut I don't know how to handle the different versions of React. That's why the CI failed on Node v4. Ideas?
Looks like the versioning issue is because react-native@0.43
needs react@16
, but we're installing everything at 15.5 ish. I think the solution is either change the versions of these up to 16, or change the regexes so they're >=15.5
rather than ^15.5
Sorry for the late answer.
I try the regExp but I still have a warning of missing peerDependencies, because all the package require react@^15.5
and only React Native require the 16 version. It's not a problem on Node 6 but it does on Node 4.
I don't know how to handle it.
How strange. Try reverting all the changes you made to version numbers for constraint then, as it seems it worked before you made these changes. Maybe then it'll work?
I don't think so, because I try to build the master
branch with Node 4 after a fresh clone and I have the same problem with peerDependencies
but with different versions.
I try to revert all the changes related to version, deprecation, etc... I still have the error.
With fresh clone:
npm ERR! Darwin 16.4.0
npm ERR! argv "/Users/s.vaillant/.nvm/versions/node/v4.8.2/bin/node" "/Users/s.vaillant/.nvm/versions/node/v4.8.2/bin/npm" "i"
npm ERR! node v4.8.2
npm ERR! npm v2.15.11
npm ERR! code EPEERINVALID
npm ERR! peerinvalid The package react@15.5.4 does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer react-dom@15.5.4 wants react@^15.5.4
npm ERR! peerinvalid Peer react-native@0.38.1 wants react@~15.4.0-rc.4
npm ERR! Please include the following file with any support request:
npm ERR! /Users/s.vaillant/Web/test/npm-debug.log
Sounds like the issue is because react@16
isn't fully released yet, so other libraries arent supporting it yet. Might have to hold off on this PR until it is, so the other libraries can catch up
It seems a good option, I don't know how to handle this conflict versions.
But it doesn't solve the problem for the master
branch.
If someone send a PR now, the CI will not pass due to this error of peerDependencies
on Node 4.
Any update on this?
Go to Jest, the contributors to this repo are too slow to keep up with facebook and Jest is the official test framework for react (as denoted by facebook)
@Brian-Kaplan I disagree, many people arent able to move to Jest, and being official doesnt necessarily make it better.
I plan to focus most of my time on this and the remaining open issues in the coming weeks, however time has been thin recently.
@RealOrangeOne I definitely didn't say it was better, and I agree it's not. My team now has more work to do in terms of creating a useable test framework with Jest. We are, however, confident that moving to Jest is the right choice. Mainly because the lack of movement on this issue solidifies the fact that we would not be able to keep up to date on react-native if we use this repo. Although it creates more work for us in terms of test framework we get important bug fixes released by facebook.
"however time has been thin recently." - thats clear
@samouss @RealOrangeOne @Brian-Kaplan Any update on this?
Any update on this?
I'm getting Error: Couldn't find preset "airbnb" relative to directory
when running test. which version of babel-preset-airbnb should I use? and why does this lib need airbnb preset? @samouss
Please merge this so anyone on RN 43, 44, 45, 46, 47, 48, 49, or 50 can use react-native-mock.
I don't think it's necessary since the rewrite is almost done. We should probably close this one in favour of #120.
cc @RealOrangeOne
Fixed #129