RealOrangeOne / react-native-mock

A fully mocked and test-friendly version of react native (maintainers wanted)
MIT License
571 stars 153 forks source link

v0.2.9 may cause error when using Mocha with older versions of react. #118

Closed rubikzube closed 7 years ago

rubikzube commented 7 years ago

Error found in 0.2.9 but not in 0.2.8

Error: Cannot find module 'react/lib/ReactComponentTreeHook'
    at Function.Module._resolveFilename (module.js:337:15)
    at Function.Module._load (module.js:287:25)
    at Module.require (module.js:366:17)

Currently using:

"mocha": "^2.5.3",
"react": "15.1.0",
"react-mixin": "^3.0.5",
"react-native": "^0.27.2",
RealOrangeOne commented 7 years ago

Yes, this is intentional (sorta). As stated in the README, we only maintain support for the most recent versions of react-native, if youre using an older version, you will need to use an older version of react-native. There isnt a definitive guide as to what versions work with what, but if you look at the Releases, it should be simple enough to figure out. I will work on some kind of table at some point.

rubikzube commented 7 years ago

I get where you're coming from, but if the intent is to deprecate support for consumers using older version of react, would this set of changes count as a breaking change and therefore a major version bump instead of a patch bump?

RealOrangeOne commented 7 years ago

Technically yes, if we followed semver, but as react has introduced hundreds of breaking changes as version releases, i'm not fussed. Either way that's what we support, it'd be almost impossible to support all versions of react-native at the same time on a library like this