Summary:
Added this as part of a random PR to get flow passing. This collides with a similar fix by bvaughn so let's remove mine. Also I messed up and there is a + at the start of the line :o
Closes https://github.com/facebook/react-native/pull/13103
Differential Revision: D4761349
fbshipit-source-id: 0abde66a1ac4c185bbd7142ecd800cf5ac8f3c5b
Summary:
- Properly inherit flow types from base components, including `defaultProps`
- template-ify the `Item` type as it flows from the `data` prop into `ItemComponent`
Note that for `SectionList` is is harder to do the `Item` typing because each section in the
`sections` array can have a different `Item` type, plus all the optional overrides...not sure how to
tackle that.
Reviewed By: yungsters
Differential Revision: D4557523
fbshipit-source-id: a0c5279fcdaabe6aab5fe11743a99c3715a44032
Summary:
This removes support for `require('image!…')`, which has been deprecated for a long time.
It is still possible to use images that are already bundled by the native app using the `nativeImageSource` module.
Check http://facebook.github.io/react-native/docs/images.html for detailed documentation.
Reviewed By: matryoshcow
Differential Revision: D4231208
fbshipit-source-id: 05ec4c1ca0fabdc3fbb652f8ad1acdf240a67955
Summary:
This is the manually imported version of https://github.com/facebook/react-native/pull/10786
This was mostly straigthforward by replacing the local-cli folder with the version I had in my local git checkout,
plus a few other files I listed with git diff --name-only.
Reviewed By: hramos
Differential Revision: D4201118
fbshipit-source-id: 4d0fb54b0edda9de1abba427958e420fd2ac105c
Summary:
* Use `;` instead of `#` for comments because IDEs treat these files are `ini` syntax, and thus by default use `;` for comments. Flow supports both `;` and `#`.
* Fix line lengths and remove trailing comment periods.
* When possible, prefer `<PROJECT_ROOT>` over `*./`.
* Be more specific with certain ignores.
* Remove ignores to modules that don't exist anymore or no longer have issues.
* `class_static_fields` and `class_instance_fields` are enabled by default starting with flow 0.33.0.
Reviewed By: gabelevi
Differential Revision: D4164031
fbshipit-source-id: 7e4b1b91837a675fa7c5a0bb75ec869c5b23f8bb
Summary:
Fixes#9312
(Sorry for inconvenience, could've been removed by mistake!)
Bonus: projectName can be configured rather than always defaulting to package.json name, not sure if helpful, but just added it since we have a `default` function that makes sense in this case.
Closes https://github.com/facebook/react-native/pull/9525
Differential Revision: D3753610
Pulled By: bestander
fbshipit-source-id: 641872855b9865502f4055910262686edc4b504e
Summary:
This is initial (first step) in the merging process. For now, we are just going to move our code as is into `local-cli` folder (first commit). There were other tweaks made in separate commits to make it easier to go through the code as the diff is expected to be rather large. The purpose of this is to make it easier to start working in small batches and improving the CLI incrementally on a daily basis.
Current codebase will still leave in `rnpm` organisation on Github where we keep working on new features, bugs and ship releases to `npm` until we finish our integration and provide a nice interface for users to migrate (in case it changes at all)
Flow, Jest and npm will ignore this folder for now until we integrate it properly.
Tests are to be rewritten from mocha to jest in `rnpm/link`. We will hook them all up as soon as we start using them in local-cli.
For now, there's no point in having them running and possibly breaking the builds.
We will announce next steps with Kureev later this week
Closes https://github.com/facebook/react-native/pull/7550
Differential Revision: D3327772
Pulled By: mkonicek
fbshipit-source-id: 90faa4bd78476d93ed21b1253e0d95c755d28a30
Summary:The WebView component in iOS currently does not support displaying PDFs without providing a remote URI or manually including the assets in the xcodeproj itself. This is because the packager has not whitelisted the 'pdf' extension.
I've gone ahead and whitelisted the 'pdf extension according to the recommendation by nicklockwood
GH comment: https://github.com/facebook/react-native/issues/1846#issuecomment-199302488
Closes https://github.com/facebook/react-native/pull/7004
Differential Revision: D3196019
Pulled By: nicklockwood
fb-gh-sync-id: 10a86a9232095f98f277506141de0b8af5b21ab4
fbshipit-source-id: 10a86a9232095f98f277506141de0b8af5b21ab4
Summary:Flow 0.22.1 is the latest release, but RN asks for 0.22.0 in the .flowconfig file. This commit makes use of Flow's support for semver matching (https://github.com/facebook/flow/issues/592) so that the latest version of Flow can be used as long as it's semver-compatible.
Closes https://github.com/facebook/react-native/pull/6767
Differential Revision: D3133424
fb-gh-sync-id: 5a7a7ff7fc4b0a5a6fd7c162923d3e85a3fc0f08
fbshipit-source-id: 5a7a7ff7fc4b0a5a6fd7c162923d3e85a3fc0f08
Summary:BUCK is faster than Gradle.
For example `gradle app:installDebug` vs `buck install app` is ~7 seconds vs ~2 seconds with warm caches.
This is just the beginning to allow people to become familiar with BUCK.
It is enough for running the app locally and testing on a device.
Gradle is still used for dependency resolution.
Closes https://github.com/facebook/react-native/pull/6733
Differential Revision: D3126328
Pulled By: bestander
fb-gh-sync-id: 56aad276036c029af7e0e23d60c46ba2f77b3d2c
fbshipit-source-id: 56aad276036c029af7e0e23d60c46ba2f77b3d2c
Summary:- lint bot is now managed by Circle CI
- checked that flow and lint errors are caught both by bot and CI
- flow fix for npm 3
- Travis is now using npm 2 and Circle CI npm 3
- Refactored Travis script to be able to be able to fail on multiple lines
Closes https://github.com/facebook/react-native/pull/6508
Differential Revision: D3069500
Pulled By: davidaurelio
fb-gh-sync-id: 02772bf1eae5f2c44489c2e3a01899428a9640cb
shipit-source-id: 02772bf1eae5f2c44489c2e3a01899428a9640cb
Summary:Follow-up to https://github.com/facebook/react-native/pull/5084
This…
- changes all requires within RN to `require('fbjs/lib/…')`
- updates `.flowconfig`
- updates `packager/blacklist.js`
- adapts tests
- removes things from `Libraries/vendor/{core,emitter}` that are also in fbjs
- removes knowledge of `fbjs` from the packager
Closes https://github.com/facebook/react-native/pull/5084
Reviewed By: bestander
Differential Revision: D2926835
fb-gh-sync-id: 2095e22b2f38e032599d1f2601722b3560e8b6e9
shipit-source-id: 2095e22b2f38e032599d1f2601722b3560e8b6e9
Summary:Currently, we're not taking advantage of Flow's built-in type definitions for the React library in all cases because Flow's definition uses `declare module react` and this file uses `import('React')`, which Flow thinks is a different library. After this change, the following starts working which didn't before:
```js
import { Component } from 'react-native';
class MyText extends Component<void, {text: string}, void> {
render() { return <Text>{this.props.text}</Text> }
}
// Correctly throws a Flow error for the missing "text" prop
const renderedText = <MyText />;
```
Closes https://github.com/facebook/react-native/pull/5489
Differential Revision: D2856176
fb-gh-sync-id: 473ca188ad7d990c3e765526c4b33caf49ad9ffd
shipit-source-id: 473ca188ad7d990c3e765526c4b33caf49ad9ffd
Summary:
As spicyj mentioned in commit 6a838a4, the ideal state of affairs when it comes to consuming `react` and `fbjs` from NPM is for the packager not to have knowledge of either package. This PR addresses the `fbjs` part of that, and relies on https://github.com/facebook/fbjs/pull/95. **DO NOT MERGE** until #95 (or a variation) is in `fbjs` and is released to npm.
This PR does several things:
1. Adds stub modules within RN that expose `fbjs` modules to be required using Haste. After discussing a few ideas with spicyj, this seemed like a good option to keep internal FB devs happy (and not make them change the way they write JS), but allow for removing packager complexity and fit in better with the NPM ecosystem. Note -- it skips stubbing `fetch`, `ExecutionEnvironment`, and `ErrorUtils`, due to the fact that these need to have Native specific implementations, and there's no reason for those implementations to exist in `fbjs`.
2. Removes the modules that were previously being used in lieu of their `fbjs` eq
Closes https://github.com/facebook/react-native/pull/5084
Reviewed By: bestander
Differential Revision: D2803288
Pulled By: javache
fb-gh-sync-id: 121ae811ce4cc30e6ea79246f85a1e4f65648ce1
shipit-source-id: 121ae811ce4cc30e6ea79246f85a1e4f65648ce1