Summary: As of flow 0.36.0, `requestIdleCallback` and `cancelIdleCallback` are part of the builtin lib defs. https://github.com/facebook/flow/pull/2800
Reviewed By: yungsters
Differential Revision: D4280306
fbshipit-source-id: 30328675c7dbfe12f603321f1196c87800a19ba8
Summary:
Internal research at FB has shown that many devs don't know why they should use ListView instead of ScrollView, or that ListView even exists. This PR changes ScrollView's docs to upsell ListView.
I could put this as a separate guide in the docs, but I think this place will have the best possible reach for target audience.
Suggestions welcome. Let me know if it doesn't make sense or is too verbose.
Closes https://github.com/facebook/react-native/pull/11349
Differential Revision: D4292109
Pulled By: mkonicek
fbshipit-source-id: e4a14e5a55333c9282d0e407461505e71e850b20
Summary:
We stopped using Yeoman in https://github.com/facebook/react-native/pull/10786
I almost forgot to remove the now-unused dependency :)
**Test Plan**
- Published react-native to Sinopia
- Ran `react-native init MyApp`
- The app was generated correctly
- The app's node_modules folder doesn't contain Yeoman
Reviewed By: cpojer
Differential Revision: D4291619
fbshipit-source-id: 44c1ef8035fa2d8c40d4e8c505207245e1a95d3c
Summary: Rather than using relative paths from the build root, this switches all paths to absolute paths from the build root. This makes integration with a lot of tooling easier.
Reviewed By: jeanlauliac
Differential Revision: D4285474
fbshipit-source-id: 80d20e0f6dc61a310e72112b9654628bff81a4f0
Summary:
I missed this while doing the Yeoman wipeout.
Currently we just print:
Installing React...
Installing Jest...
This diff makes it print the output of those commands.
**Test Plan**
Published react-native to Sinopia, ran `react-native init MyApp`, saw the output:
Installing Jest...
⸨░░░░░░░░░░░░░░░⸩ ⠸ normalizeTree: ...
Reviewed By: bestander
Differential Revision: D4286640
fbshipit-source-id: e554f03a4729c2de85eba527f10f4b727de722e4
Summary:
- Added an option to override the install command in CI environments (see comment in code)
- Simplify the verbose mode
- Simplify how options are passed round
Test plan (only tested on Mac OS):
react-native init TestApp
react-native init TestApp --version 0.36
In both cases the app was generated, package.json contained the correct version (latest, or 0.36).
react-native init TestApp --verbose
Saw progress bar.
react-native init InstallCommandTest --installCommand "npm install bad-package-doesnt-exist"
404 error is printed to stdout correctly.
react-native init TestApp --installCommand "npm install react-native"
The app was generated.
react-native init InstallCommandTest --installCommand "npm install react-native --verbose" --verbose
Saw verbose output from npm.
Reviewed By: bestander
Differential Revision: D4284642
fbshipit-source-id: f2cdee52ab64831ae3ca064d50f23c5f73a0301f
Summary:
Currently any React Native apps that target API 23 or greater will crash on the first initial debug/dev build due to the overlay permission.
Sadly there isn't a concrete "request permission" baked into the Marshmallow permission system.
However, we can launch the overlay screen without starting the react app and once its turned on start the app.
- https://github.com/facebook/react-native/issues/10454 - targetSdkVersion 23 lead crash / App crash for targeting 23+
- https://github.com/facebook/react-native/pull/10479 - Add the overlay permission information / Larger discussion around targeting API 23+
- Intent to Overlay permission goes directly to the app in question, rather then the general full listing of applications. This allows a developer who is not familiar with the system to easily toggle the overlay without getting confused.
**Test plan (required)**
* Ran UIExplorer App on fresh install with Target 23
```
cd react-native
./gradlew :Examples:UI
Closes https://github.com/facebook/react-native/pull/11316
Differential Revision: D4286351
fbshipit-source-id: 024e97c08c40ee23646dd153794fcde7127b2308
Summary: The target config inside React.xcodeproj was messed up, with source files being included in multiple or wrong targets. I went over the files in React.xcodeproj and verified that each .m file was included only once and was in the right target and .h were in the right projects.
Reviewed By: majak
Differential Revision: D4284673
fbshipit-source-id: 99af61083c6ca81311e30f0ea0045d4e7bffc20c
Summary:
**Description:**
Jest tests that use that StatusBar failing because the status bar functions aren't mocked.
Errors I ran into:
`TypeError: StatusBarManager. setNetworkActivityIndicatorVisible is not a function`
`TypeError: StatusBarManager. setHidden is not a function`
`TypeError: StatusBarManager. setStyle is not a function`
**Fix:**
Added mocks for all the functions that the StatusBar offers according to the docs: https://facebook.github.io/react-native/docs/statusbar.html
**Test plan (required)**
Verify that the tests using StatusBar and its functions succeed.
Closes https://github.com/facebook/react-native/pull/11322
Differential Revision: D4284536
Pulled By: cpojer
fbshipit-source-id: b67be8c0595d91ee9aca4784f457c0959d7e45d5
Summary: Adds the necessary functionality to serialize a series of `Module`s to a bundle and a source map in the context of the new Buck/Packager integration
Reviewed By: cpojer
Differential Revision: D4265867
fbshipit-source-id: f2d3e4ffed64a3dca817101faad7bced9f16edc7
Summary: Since all paths are relative when building with the new Buck integration, `HasteMap` needed support for these.
Reviewed By: cpojer
Differential Revision: D4265888
fbshipit-source-id: 2d454bfd3866028d8d2c268c0fd318b148951dc9
Summary: Adds a helper to produce index source maps for Buck builds
Reviewed By: cpojer
Differential Revision: D4265911
fbshipit-source-id: 9ca3c49876df5db039bae823c0458c98e6e05619
Summary: since we use the same module wrapper amendment function for dev and prod builds, and code is already minified at this point, we minify ourselves by leaving out space.
Reviewed By: cpojer
Differential Revision: D4265967
fbshipit-source-id: 719a3bbfbc02c9af1bb3fa08317b2f1b92c141a5
Summary:
This changes the callback value of `Graph` function so that it also contains a separate property with `Module` instances of the entry points.
Having references to the entry point modules allows to e.g. create require calls to them dynamically to kick of bundle execution.
The commit also contains a refactoring of the `Graph` function and its helpers that reduces the need for extensive parameter passing and long nested functions.
Reviewed By: cpojer
Differential Revision: D4250772
fbshipit-source-id: 2edca77bbef2308d3176a62123b8cecd70e2c8c7
Summary:
This module is not actually used inside of React Native. Projects that use this,
can now depend on https://www.npmjs.com/package/signedsource
Reviewed By: yungsters
Differential Revision: D4272511
fbshipit-source-id: 93eb74aa4ccfa8ef8743de2cfa92b5403de91e0a
Summary:
The typecheck inside of NavigationCard is PropTypes.any while in NavigationCardStack it is View.propTypes.style.
let's make them consistent to avoid unnecessary warnings. (e.g. trying to pass a animationStyle as cardStyle)
Closes https://github.com/facebook/react-native/pull/9808
Differential Revision: D4277323
Pulled By: ericvicenti
fbshipit-source-id: c30b4a21675cad98c19f5c6522e286d776bfa20d
Summary:
`JSIndexedRAMBundle` used to read scripts including the terminating null bytes. That worked on iOS, but not on Android, where we have an ascii-only optimization.
This changes that behavior to only read the actual script data excluding the terminal null.
Reviewed By: javache
Differential Revision: D4265374
fbshipit-source-id: 7e6f943666aee610d79939cef09b103305803c69
Summary:
The line
`Please make sure you export the correct path for 'ANDROID_HOME' if you did not install the Android SDK using Android Studio.`
was visible twice (one on top of another) in the docs when viewing linux instructions. I removed the block that set it visible on both linux and windows and incorporated it into the existing windows block.
Closes https://github.com/facebook/react-native/pull/11276
Differential Revision: D4269783
Pulled By: hramos
fbshipit-source-id: 423fca3219567cf96d91aefc43d1ddabb2403728
Summary:
Add link with more details of how to resolve warnedMissingNativeAnimated warning.
Closes https://github.com/facebook/react-native/pull/11224
Differential Revision: D4268352
fbshipit-source-id: 679574570aea2f4ec7083247d5b6dcba378e8560