Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Conversation

@samouss
Copy link

@samouss samouss commented Apr 7, 2017

Fixed #129

@RealOrangeOne
Copy link
Owner

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.

@samouss
Copy link
Author

samouss commented Apr 7, 2017

Yes, I think it will be the case.

Copy link
Owner

@RealOrangeOne RealOrangeOne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we change the required version numbers in package.json to prevent use on versions <0.43.

@samouss
Copy link
Author

samouss commented Apr 8, 2017

How can I do this ? With peerDependencies ?

@samouss samouss force-pushed the fix-react-16-incompatibility branch from a1114d8 to fb0e2e5 Compare April 8, 2017 12:15
@RealOrangeOne
Copy link
Owner

Yes, change the peerDependencies, but also the react-* dependencies can be updated to 16 if a version is available

@samouss
Copy link
Author

samouss commented Apr 10, 2017

I change the version of the package, change some code for avoid warning due to deprecation.

  • migrate React.PropTypes to prop-types standalone package
  • migrate React.createClass to create-react-class standalone package

But I don't know how to handle the different versions of React.
That's why the CI failed on Node v4.
Ideas?

@RealOrangeOne
Copy link
Owner

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

@samouss
Copy link
Author

samouss commented Apr 15, 2017

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.

@RealOrangeOne
Copy link
Owner

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?

@samouss
Copy link
Author

samouss commented Apr 15, 2017

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

@samouss samouss force-pushed the fix-react-16-incompatibility branch 2 times, most recently from 46ce933 to 501edde Compare April 15, 2017 16:35
@RealOrangeOne
Copy link
Owner

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

@samouss
Copy link
Author

samouss commented Apr 18, 2017

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.

@samouss samouss force-pushed the fix-react-16-incompatibility branch from 501edde to 42bc829 Compare May 8, 2017 12:52
@willdawsonme
Copy link

Any update on this?

@Brian-Kaplan
Copy link

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)

@RealOrangeOne
Copy link
Owner

@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.

@Brian-Kaplan
Copy link

Brian-Kaplan commented May 12, 2017

@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

@gpeal
Copy link

gpeal commented Jun 27, 2017

@samouss @RealOrangeOne @Brian-Kaplan Any update on this?

@dan-kez
Copy link

dan-kez commented Oct 2, 2017

Any update on this?

@samouss samouss force-pushed the fix-react-16-incompatibility branch from 42bc829 to 0a188a1 Compare October 2, 2017 07:45
@evollu
Copy link
Contributor

evollu commented Oct 7, 2017

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

@jeaye
Copy link

jeaye commented Dec 8, 2017

Please merge this so anyone on RN 43, 44, 45, 46, 47, 48, 49, or 50 can use react-native-mock.

@samouss
Copy link
Author

samouss commented Dec 8, 2017

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

@samouss samouss closed this Oct 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incompatibility with react > 16

8 participants