Closed jasonfma closed 6 years ago
Changing to support RN 0.50+ because the AndroidProgressBar
had a breaking change in RN 0.49 that was fixed in RN 0.50. Rather than start off backwards compatible with 0.49, just do 0.50+.
Dropping support for Node 4. https://travis-ci.org/RealOrangeOne/react-native-mock/jobs/297785954
Should probably add react
, react-dom
, and react-native
as dev dependencies also. When trying to build locally without those packages, it fails
Initial skim looks good. Would probably be ideal to update the README
stating that we've dropped support for Node <6
(and why?). Will give it a proper review soon, but glad to see the tests are passing!
Looking forward to this @RealOrangeOne and @jasonfma. When I try to pull this branch as a dev dependency for my project running RN 0.50 and React 16 it complains when running haste.js as part of the post install
Error: EISDIR: illegal operation on a directory, read
at Error (native)
at Object.fs.readSync (fs.js:731:19)
at tryReadSync (fs.js:486:20)
at Object.fs.readFileSync (fs.js:534:19)
at /Users/gabrielcebrian/Projects/tes/mobile/app-job-mobile/node_modules/react-native-mock/src/haste.js:32:39
at Function._.each._.forEach (/Users/gabrielcebrian/Projects/tes/mobile/app-job-mobile/node_modules/underscore/underscore.js:153:9)
at Object.<anonymous> (/Users/gabrielcebrian/Projects/tes/mobile/app-job-mobile/node_modules/react-native-mock/src/haste.js:31:3)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
If I clone the project on a different folder the post-install finishes as expected
Adding a mock for FlatList would be a great idea, in my opinion.
@RealOrangeOne just to be clear, this is a PR into the rewrite
branch that you created. This is not a merge into master.
@RealOrangeOne Looks like node 8.0.0 is broken. I'm going to set to 8.9.1 since it's the first LTS version.
Just seen the build log, agreed that's very weird. I think sticking to that version will probably be fine, it's early enough!
@RealOrangeOne can you rebuild? I think it failed because of https://github.com/npm/registry/issues/255
dustinsavery commented on Nov 9, 2017 Should probably add react, react-dom, and react-native as dev dependencies also. When trying to build locally without those packages, it fails
I think this is set up this way so the build can test with various versions of each. I did add them as peerDeps
so you can see the warnings.
@RealOrangeOne comments addressed
@RealOrangeOne will you have some time soon to take a look? I'm happy to help here where I can too. This PR is to merge into your existing rewrite
branch #120 where there are still some merge conflicts to resolve as well - so this is not final or going into master
.
All these changes look good to me! Let's get this into rewrite
and see how it affects it!
I tried rewrite branch but I get this error
Cannot find module './build/react-native-mock.js' from 'mock.js'
Will we use this branch as master ?
If you're downloading straight from GitHub, you'll have to build the compiled code to actually use it.
Yes, this code will eventually be pushed into master. Time frame unknown, but shouldn't be too long!
I get it via yarn, but build folder isn't present. Is that normal ?
Yarn, npm, makes no difference. We don't commit the build/
directory for obviousl reasons, committing build artifacts is bad practice. If you want to use a version from somewhere other than npm, you'll need to run the build yourself from the project directory, else you'll only have the source files, which won't work.
I'm agree with you but I'm not sure to understand.
I get react-native-mock via yarn, that provide source code not built but https://github.com/RealOrangeOne/react-native-mock/blob/rewrite/mock.js call ./build/react-native-mock.js
so is there something wrong here or should I build the package even if I get it via npm/yarn ?
hmm, this sounds odd, and probably not the best place to discuss. Perhaps raise an actual issue so it can be looked into properly
Major upgrade that supports 0.50+
reactNativeVersion
andDeviceInfo
properties to theNativeModules
Navigator
test as it was removed from RNBackAndroid
and addBackHandler
testsNOTE: This is a PR into the existing
rewrite
branch