Summary:
There was an issue that sometimes sticky headers would stop moving when re-rendering because we did not reattach events properly. This makes sure that we always detach and reatach on rerender in case the scroll view ref changes.
**Test plan**
Tested that this fixes issues with sticky headers we discovered when updating Expo to RN 0.44.
Closes https://github.com/facebook/react-native/pull/14012
Differential Revision: D5094418
Pulled By: javache
fbshipit-source-id: a56050ae786712e8a3de2a6e3b4e8749a2fde86e
Summary: Releases the dependency map of modules after running the factory in release mode in order to save memory.
Reviewed By: cpojer
Differential Revision: D5086693
fbshipit-source-id: 68c57a2f98182ed1a732e1336e6d4fe5ce27abc3
Summary: RN configuration allows to specify a post-minify hook. This wasn’t called in the new Buck integration so far. Added here.
Reviewed By: cpojer
Differential Revision: D5087325
fbshipit-source-id: 74b58bd3a203716d8f01b5d7ba552b6ad1b575ce
Summary: Internally we use `multipart/form-data` to upload transformed files to the global cache, using the keys as file names. Unfortunately the server would read that and consider only the basename as the key, not the full path. So we wouldn't store the data under the right key. This is definitely a bug in the way upload is implemented: we should transmit the keys separately. But, this changeset offers a quick mitigation by avoiding slashes in the key, so that the whole key is a valid base file name.
Reviewed By: davidaurelio
Differential Revision: D5087780
fbshipit-source-id: 9e4a698c1f57c4c3b91b56b43eef82c1c7dd862b
Summary:
Make more views collapse on Android by designating FLEX_BASIS, FLEX_GROW and FLEX_SHRINK as "layout-only" props.
Relies on existing layout tests.
See Issue #13622
Closes https://github.com/facebook/react-native/pull/13868
Reviewed By: astreet
Differential Revision: D5035864
Pulled By: javache
fbshipit-source-id: d2c9e0b33b07e51b19afc383ef913ac41b70415c
Summary: Moves stack trace formatting logic into its own class to facilitate reusage from custom exception managers.
Reviewed By: javache
Differential Revision: D5086336
fbshipit-source-id: f434a1621c599c5c49991b3bfe5f66d05f84b5c9
Summary:
Thanks for submitting a PR! Please read these instructions carefully:
Currently no subspecs are running on CI which causes us to find bugs in the podspec from time to time we upgrade master.
In order to highlight errors for podspecs users when changes happen we should make sure to run all subspecs even though it might take a bit longer when running the CI
Closes https://github.com/facebook/react-native/pull/14019
Differential Revision: D5079230
Pulled By: javache
fbshipit-source-id: 7b3b5dba5ba147b1fc24e79299ed260f9fc6231b
Summary: Better to have *some* Flow coverage (I'd like 100% of packager covered from when we split it apart) than none.
Reviewed By: davidaurelio
Differential Revision: D5077757
fbshipit-source-id: b23169b3edf2bd3eb0e8a399d099151aa705b198
Summary:
It was hard to type the resolution main algo, I had to put type annotations explicitely everywhere, otherwise Flow would get in some kind of loop and do weird errors. I think it's because the algo is recursive and Flow tries to infer types too deeply because of the generics.
Anyway, apart from that it's good to get this extra type security in the few other places. We require Node v4 minimum, that according to the internets supports the `class` syntax without transform, and I verified that inheriting from `Map` actually works as expected.
Reviewed By: davidaurelio
Differential Revision: D5078023
fbshipit-source-id: 05dfc4acf5b07cdda8a7b36ec9cba216d1810643
Summary: Adds flow to `local-cli/bundle/output/meta.js`, and makes some changes to avoid errors.
Reviewed By: cpojer
Differential Revision: D5077563
fbshipit-source-id: bafb9e6705319f6f2e8ae1c820667ad343191b3c
Summary: Or, a case in point that Flow doesn't saves us from all the ills. I think it didn't complain because `MapWithDefaults` doesn't have proper typing. I'll deal with that separately.
Reviewed By: davidaurelio
Differential Revision: D5077707
fbshipit-source-id: c43623c5046d2dea9964685a44ad4877d060232e
Summary:
After examining how React Native sets up `process.env.NODE_ENV` using `global.__DEV__` from `prelude_dev.js` or `prelude.js` by treating them like polyfills I decided to use the same approach for environment variables. I setup my own rn-project.config.js file like so:
```
const blacklist = require('react-native/packager/blacklist');
const pathJoin = require('path').join;
module.exports = {
getBlacklistRE: function() {
return blacklist([/build\/.*/, /app\/assets\/webpack.*/]);
},
polyfillModuleNames: [pathJoin(__dirname, 'globals.js')]
};
```
I ran the packaging server using:
`react-native start --config=config/react-native/rn-project.config.js --reset-cache`
I expected my polyfillModuleNames to be passed into the Packager properly and be handled the same way the built-in polyfills worked. Unfortunately I noticed the Packager wasn't actually getting `opt.polyfillModuleNames`. Digging into the code a bit, it seems the local-cli wasn't passing the polyfillModuleNames from the config.
There are no specs for runServer.js but this change can be tested by using a config that contains polyfillModuleNames. Sample config and run command provided above simple `global.js` provided below:
```
global.process = global.process ? global.process : {};
global.process.env = global.process.env ? global.process.env : {};
global.process.env['PROJECT_ENV'] = 'staging';
```
Closes https://github.com/facebook/react-native/pull/13725
Differential Revision: D5077615
Pulled By: jeanlauliac
fbshipit-source-id: f66a8a8bda2702cd9a4e5b92f5335f43ab2f9089
Summary: I'd like to start typing the front-end so that it's easier to track adding new options, etc.
Reviewed By: davidaurelio
Differential Revision: D5069868
fbshipit-source-id: 9a18dca52efd486ca18f17d0ec434a5ec1c1649c
Summary: This makes it easier to verify correctness when adding new config/args.
Reviewed By: davidaurelio
Differential Revision: D5069537
fbshipit-source-id: 4d8058851900b23163d0f2744e91dd14dfcdd461
Summary:
cc hramos
Pretty sure I've hit all of the places where AppRegistry is called in CRNA-pastable examples. Let me know whether you think we need to approach the version lag differently, I figure a caveat is as natural a place to call it out as any.
If you end up finding anything else that needs tweaking before cherry picking, I'm happy to push that up here too.
Closes https://github.com/facebook/react-native/pull/13744
Differential Revision: D5071038
Pulled By: hramos
fbshipit-source-id: 4a4a6f2a73079aca627f17d75a4e4b395ecbd4a8
Summary:
Thanks for submitting a PR! Please read these instructions carefully:
- [x] Explain the **motivation** for making this change.
- [x] Provide a **test plan** demonstrating that the code is solid.
- [x] Match the **code formatting** of the rest of the codebase.
- [x] Target the `master` branch, NOT a "stable" branch.
The current code for IOS contains deprecated code for incoming urls.
in iOS 10 deprecated openURL.
more details here: https://useyourloaf.com/blog/openurl-deprecated-in-ios10/
1. Create an RN app with iOS 10. set up linking as per instructions.
2. Using the iOS9 code snippet, with the app is open, navigate to the apps url scheme (in safari) appname://value1/value2, the eventListener will not trigger. note: it will however trigger getInitialURL if app is closed.
3. Replace the old iOS9 code with the iOS 10 and trigger an incoming url from a browser appname://
with the new code in the doc it will trigger for both open and closed apps.
Closes https://github.com/facebook/react-native/pull/13942
Differential Revision: D5071851
Pulled By: hramos
fbshipit-source-id: 8394de73014a1d2a5982b22b1b6fd09e0cf524dd
Summary:
Thanks for submitting a PR! Please read these instructions carefully:
- [x] Explain the **motivation** for making this change.
- [x] Provide a **test plan** demonstrating that the code is solid.
- [x] Match the **code formatting** of the rest of the codebase.
- [x] Target the `master` branch, NOT a "stable" branch.
The docs had `backgroundColor` listed as a supported style prop for
native animation, but only `opacity` and `transform` are supported
at this time. See https://github.com/facebook/react-native/blob/master/Libraries/Animated/src/NativeAnimatedHelper.js#L108
My motivation was that I tried to use it and it didn't work. 😄
Github appears to render the change correctly.
Closes https://github.com/facebook/react-native/pull/13933
Differential Revision: D5071869
Pulled By: hramos
fbshipit-source-id: 947c8fa56b99d99c44603d8ef81664455234ed84
Summary:
The example apps link was pointing to a 404 page.
Thanks for submitting a PR! Please read these instructions carefully:
- [x] Explain the **motivation** for making this change.
- [x] Provide a **test plan** demonstrating that the code is solid.
- [x] Match the **code formatting** of the rest of the codebase.
- [x] Target the `master` branch, NOT a "stable" branch.
What existing problem does the pull request solve?
The link to example apps was pointing to a 404 page
A good test plan has the exact commands you ran and their output, provides screenshots or videos if the pull request changes UI or updates the website. See [What is a Test Plan?][1] to learn more.
If you have added code that should be tested, add tests.
N/A
Sign the [CLA][2], if you haven't already.
Small pull requests are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.
Make sure all **tests pass** on both [Travis][3] and [Circle CI][4]. PRs that break tests are unlikely to be merged.
For more info, see the ["Pull Requests"][5] section of our "Contributing" guidelines.
[1]: https://medium.com/martinkonicek/what-is-a-test-plan-8bfc840ec171#.y9lcuqqi9
[2]: https://code.facebook.com/cla
[3]: https://travis-ci.org/facebook/react-native
[4]: http://circleci.com/gh/facebook/react-native
[5]: https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md#pull-requests
Closes https://github.com/facebook/react-native/pull/13986
Differential Revision: D5071821
Pulled By: hramos
fbshipit-source-id: 620902de8445fc3569c3f7b075e271b413a8544c
Summary:
Clarified some steps unique to the Windows installer.
Closes https://github.com/facebook/react-native/pull/13983
Differential Revision: D5065884
Pulled By: hramos
fbshipit-source-id: ab47ad7e7fcf10f8b44ab209807d661c465b76a3
Summary:
The existing resolution logic of assets:
* goes over all the files of the asset's directory for every resolution request;
* duplicates the parsing logic of `AssetPaths` by building up a custom regex for each resolution request.
This changeset proposes to tweak this by building an index for each particular directory in which we're looking for assets, so that we don't have to crawl a single directory twice, and so that it reuses the logic of `AssetPaths.tryParse()` for determining variants.
Reviewed By: davidaurelio
Differential Revision: D5062435
fbshipit-source-id: 708fc5612f57b14565499fad741701269438c806
Summary:
We appended a `sourceMappingURL` in the same place where we write out the files. This will break output that is not a plain text file, like Random Access Bundles.
This moves the corresponding logic into the function that builds the bundle.
Reviewed By: cpojer
Differential Revision: D5061039
fbshipit-source-id: 17fadb5a687c8d4b1f29439e8bf946bae58eb2d9
Summary:
It depends on symbols that are not available.
Closes https://github.com/facebook/react-native/pull/13950
Reviewed By: cwdick
Differential Revision: D5053724
Pulled By: javache
fbshipit-source-id: 9d5676ce5e4ad3ceeb20aeb8c48429319d48799e