Summary:
Used the deploy_xplat.sh script.
There were a few errors after running the script, so I reverted the changes to those files and the errors went away. This is expected because the new version does not introduce errors, so these errors were caused by the deploy script.
Changelog: [Internal]
Reviewed By: samwgoldman
Differential Revision: D20070916
fbshipit-source-id: 56b8f56eab952010f44219ce1b5c4ec66a0b084a
Summary:
With the release of 0.118 Flow now checks for unsafe additions between numbers and null/void. This enables this check in xplat.
```~/fbsource/fbcode/flow/tool add-comments --bin `which flow` --comment="//flowlint-next-line unsafe-addition=off" ~/fbsource/xplat/js```
`js1 test -u __tests__/flowconfig-sync-test.js`
Changelog: [Internal]
bypass-lint
Reviewed By: nmote
Differential Revision: D19823403
fbshipit-source-id: 1f059de6c9d973cda11930f1fadb485679d4ecec
Summary:
After changes to the semantics of spread, this lint is no longer relevant and will be removed in an upcoming version of Flow.
Changelog: [Internal]
Reviewed By: jbrown215
Differential Revision: D19241147
fbshipit-source-id: 2cad93725055601f2ceaa2379ed3643f136ff69b
Summary:
Turns on the exact-by-default flag in xplat/js and gets rid of the implicit inexact object lint, which has no effect when exact-by-default is on.
Will land this on Monday along with an announcement post.
Changelog: [Internal]
Reviewed By: gkz
Differential Revision: D18863276
fbshipit-source-id: 07a31e957bea1d1e053e8fa5975fdb1b6da1bdc4
Summary:
This will ensure we don't get any more implicit inexact objects in xplat/js. Before we turn on exact-by-default we are going to make an announcement post, so this diff will hold the line until that's out.
Changelog: [Internal]
Reviewed By: gkz
Differential Revision: D18785892
fbshipit-source-id: caeb662f08b44cebe34b9e1b52bdd5842fe06176
Summary:
I'll land this once the upgrade to v0.111 is rolled out here. That release turns this flag on by default.
Changelog: [Internal] Adjust Flow configuration
Reviewed By: panagosg7
Differential Revision: D18329245
fbshipit-source-id: a9ab92fda06d546f3246dcdd066e904b5a657062
Summary:
Now that types-first is out in xplat, we can turn abstract locations on for improved recheck optimizations.
This was rolled out in www before we had the rollouts feature. This is a chance to get better data on how abstract locations actually performs.
Changelog: [Internal] Update Flow options to improve recheck speed
Reviewed By: panagosg7
Differential Revision: D18145269
fbshipit-source-id: 33941251288884ded4b0d8c9fe7df8225d3429f6
Summary:
This has been [proven in www](https://fb.workplace.com/groups/floweng/permalink/2900038803378049/). Now that xplat is on types-first, we can turn this on.
Changelog: [Internal] Update Flow options to improve recheck speed
Reviewed By: panagosg7
Differential Revision: D18144757
fbshipit-source-id: b67660206c70d7ea81057195f365b03a7198bd07
Summary:
I am importing an image from a scoped package and I expected this to be recognized by the `module.name_mapper` and treated as a `RelativeImageStub`. But since there's an `@` in the path, the string does not match the regex pattern as it is defined today. Therefore I added the possibility of a `@` in the start of the path to the regex pattern.
Example import not recognized by the name_mapper today:
```
import NicePicture from 'example-pkg/assets/nice-picture.png'
```
## Changelog
[General] [Fixed] - Make RelativeImageStub regex match images in scoped packages
Pull Request resolved: https://github.com/facebook/react-native/pull/26567
Test Plan:
* I have run `yarn flow` in the `react-native` project
* I tested that it resolves my issue with images in scoped packages in my own app's repo
Differential Revision: D17589473
Pulled By: cpojer
fbshipit-source-id: d0c18f2b36456fd974012a0605f3d9ceff0ad744
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