Summary: I am unsure whether there was a reason not to use an `index.js` file from the beginning. It always struck me as confusing and odd to have the main API hidden in a folder somewhere. This changes RN to use the standard `index.js` file that is common in almost all JavaScript packages.
Reviewed By: yungsters, rubennorte
Differential Revision: D17314423
fbshipit-source-id: 10eaf4fddd41e91163de7d10c0879b623dab00d7
Summary: Explicitly define the types of the getters in `react-native-implementation` so we can enable Flow's types-first mode for that file.
Reviewed By: cpojer
Differential Revision: D16937607
fbshipit-source-id: 2e4cf483043a53c5407254ffa2b3211d40211019
Summary: The types-first codemod adds a few of these, so need to sync the suppressions here with the ones in xplat/js/.flowconfig
Reviewed By: jbrown215
Differential Revision: D16690168
fbshipit-source-id: 49d3f80a4ab24badf11a9ac54abfe49670989a91
Summary:
* Adds Flow types to `error-guard.js` and propagates them via the `ErrorUtils` module.
* Fixes some call sites to account for the stricter (correct) types.
Differential Revision: D16619538
fbshipit-source-id: c006ff2736ec380763956c4b89702cf44dd4deb0
Summary:
This view will be re-used for bundle splitting so I'm changing the name to be more generic as it can be used for informing users of any loading activity.
I also cleaned up the files a bit from a class to just an object.
Reviewed By: gaearon
Differential Revision: D16281367
fbshipit-source-id: 5c2ee7790d29ccba473bd6e90737d2f0581e6291
Summary:
**Depends on https://github.com/facebook/react-native/pull/25100**
This is one of the steps unlocked by migrating RN from Haste to path-based imports. This commit sets Flow to use path-based imports by removing all of the Haste-related configuration options.
Additionally, it maps `react-native` to import from within this module to match Node's module resolution behavior. It also adds `<PROJECT_ROOT>` to the image name mapper so that the mapped name doesn't rely on Haste.
## Changelog
[General] [Changed] - Make Flow configs use path-based imports instead of Haste
Pull Request resolved: https://github.com/facebook/react-native/pull/24812
Differential Revision: D15659189
Pulled By: cpojer
fbshipit-source-id: d0efaa2884485a492dcdef8d94061129cebc2566
Summary:
See https://github.com/facebook/react-native/issues/24316 for the motivation.
By adding the .android.js and .ios.js extensions to the respective .flowconfig files, Flow is able to find files that either:
- Are required using Haste
- Are required using standard paths and have a .js extension
- Are required using standard paths and have a .platform.js subextension
[General] [Changed] - Adjusted .flowconfig to support both Haste and standard path-based requires
Pull Request resolved: https://github.com/facebook/react-native/pull/24318
Differential Revision: D14822356
Pulled By: cpojer
fbshipit-source-id: dde0c83692d6170f4a44cd3fb8ede162054157e9
Summary:
This lint setting makes deprecated $call syntax a warning instead of an error,
which is the default. This feature has been deprecated since Flow v0.75.0, and
I'm working to finally remove it, which will also remove this lint setting.
Reviewed By: dsainati1
Differential Revision: D14650366
fbshipit-source-id: 779df61be88996278ea63355517c17ec721cea7f
Summary:
This gets completely rid of this flow ignore. The flow team is using the version
aware `$FlowFixMe` now and the only instance of this used was on www dating back
to 2016: D3235864
My intention here was to slightly simplify the flowconfigs.
Reviewed By: gabelevi
Differential Revision: D14494167
fbshipit-source-id: 0fab176ce326007ac45b47691378812c74a523e6
Summary: 0.95 has a more accurate definition of JSON.stringify which could return void.
Reviewed By: dsainati1
Differential Revision: D14494286
fbshipit-source-id: 6cf9cb5889b4078548665bc66fe899a266c689ce
Summary:
* Added a default value for HMRLoadingView this will prevent errors from being thrown when `HMRClient` attempts to include it in a `web` context.
* [Web] [Added] - HMRLoadingView
Pull Request resolved: https://github.com/facebook/react-native/pull/23389
Differential Revision: D14045475
Pulled By: cpojer
fbshipit-source-id: df5c3cf3536af3b37eaf82342b6346bc25054319
Summary: Turn on xplat warnings individually rather than all at once. This makes it easier for the team to add new lints that we don't necessarily want to enable globally.
Reviewed By: panagosg7
Differential Revision: D13993571
fbshipit-source-id: 019f301f584be268fdcbf5b0540f63ce6fcd54e3
Summary: Now that Flow v0.92.1 is deployed, we can backout {D13942380}, which was a temporary fix.
Reviewed By: avikchaudhuri
Differential Revision: D13952515
fbshipit-source-id: d423379a03fff09316aa499e1152b410a1bb4178
Summary: Flow v0.92 is crashing sometimes after a save when run through Nuclide. This fixes the issue temporarily until we can push a Flow v0.92.1
Reviewed By: samwgoldman
Differential Revision: D13942380
fbshipit-source-id: f7bf2aef0aab90980bbb786d89710f399c9427d5
Summary:
This updates React Native to use latest CLI. We also create Metro configuration, because CLI looks for React Native in "node_modules" by default. Since we are running React Native from source, it will fail to find required files.
To avoid hacky logic to detect if we are running from source backed into the CLI, I decided to leverage the Metro configuration instead.
Pull Request resolved: https://github.com/facebook/react-native/pull/23052
Reviewed By: rickhanlonii
Differential Revision: D13719938
Pulled By: cpojer
fbshipit-source-id: 1f40a40b3cdbb07ccd42daf75feb457556d3e40f
Summary: Upgrades flow in xplat/js to 0.91. This diff also adds and removes suppressions.
Reviewed By: samwgoldman
Differential Revision: D13720697
fbshipit-source-id: 1bf8830ce286db92277476a2d2404cf0c0dddca2
Summary: Remove `$Subtype` and `$Supertype` utilities. Replacement was done on a best-effort basis. In many cases it sufficed to replace `$Supertype<T>` and `$Subtype<T>` with `T`, but when this was not possible `any | T` and `any & T` were used instead.
Reviewed By: jbrown215
Differential Revision: D13624765
fbshipit-source-id: 82ee9d43cfc318ed4bd2d84e0f4c5c1d8f488a9c
Summary:
These comments were confusing since we don't use flow-typed.
cc bvaughn.
I have replaced our local types by flow-typed, removed metro custom stub and deleted `flow-github` directory.
As result, createReactClass, PropTypes and Metro types won't be distributed to RN users. If you need it, you should relay on flow-typed.
Pull Request resolved: https://github.com/facebook/react-native/pull/20320
Reviewed By: TheSavior
Differential Revision: D13517157
Pulled By: rickhanlonii
fbshipit-source-id: e52c0b6114114a706f6152b2031c600e3dece0d2
Summary: This diff moves the React Native template from `local-cli/templates/HelloWorld` to `template`. Keeping it in the react-native repo will allow us to make changes to the template and version it together with react-native, instead of moving it out into a separate repo and trying to keep the template in sync with RN.
Reviewed By: TheSavior
Differential Revision: D13372949
fbshipit-source-id: e68e267b4dcf6384535d7b48fc11e297a12e9676
Summary: This is one more step to remove `fbjs` from `react-native-github`. This changes both the internal and external code to use `invariant` from zertosh instead of the copy in fbjs.
Reviewed By: yungsters
Differential Revision: D13195941
fbshipit-source-id: 73564ca1715110e7da9c7ef56dc57374d61377e0
Summary: Stop ignoring `metro` folder from RN and use their flowtypes correctly
Reviewed By: hramos
Differential Revision: D13085169
fbshipit-source-id: f285223afb7e89ac2c63e53d36be2f3645fa6761
Summary:
We don't want people requiring from this file via haste. This file is the main for the react-native yarn workspace requireable via require('react-native').
https://pxl.cl/jnWC
Reviewed By: mostafaeweda, RSNara
Differential Revision: D10444200
fbshipit-source-id: 3832857e3df01def128525f32c9735e928802b59