Summary:
`exact_empty_objects` is on by default in 0.191, delete usage
Changelog: [Internal]
Reviewed By: SamChou19815
Differential Revision: D40822684
fbshipit-source-id: 8e84f0542e6b66049cac34e429f0b724f85a9557
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35089
Changelog:
[General][Fixed] - Back out "Add enum example to Android/iOS rn-tester TurboModule"
This broke the rn-tester adding due to an invalid flow-enum setup. Needs further investigation
Reviewed By: cipolleschi
Differential Revision: D40714320
fbshipit-source-id: 9831276762f90df0ffaca3304382fe5925009343
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34713
Changelog: [Internal] - Fix up missing bots usage after we moved everything to packages/react-native-bots in 767f8e0249
Reviewed By: NickGerleman
Differential Revision: D39583230
fbshipit-source-id: 6cc6b7923e67139dc3c81dfe0c39005dde905248
Summary:
The empty object literal `{}` now has the type `{}` - i.e. an exact empty object - rather than being unsealed.
Enable the option in the github flowconfigs
Changelog: [Internal]
Reviewed By: pieterv
Differential Revision: D37836634
fbshipit-source-id: 8ef0cfaf1d0420ae71723e04163f00c43c550e07
Summary:
Turns on the ssa env mode in Flow, which supercedes constrained writes with additional fixes
to refinement invalidation.
Reviewed By: SamChou19815
Differential Revision: D36717890
fbshipit-source-id: 20ee963591e8b454458273ac5aa86798e94a8bbd
Summary:
This diff upgrades xplat to 0.178.1 and pre-suppresses errors from turning on constrained writes.
To generate this diff I:
* Modified every `env_mode=constrain_writes` to `env_mode=ssa` and made a commit (this is so our upgrade script will work)
* Ran scripts/flow/upgrade.sh 0.178.1 to upgrade all the flowconfigs to 178.1 and suppress new-env errors
* Modified arvr/js/flowconfig.ejs to use 0.178.1 and ran `scripts/gen-flowconfig/gen-flowconfig --project arvr`
* Modified xplat/js/flowconfig.ejs to use 0.178.1 and ran `scripts/gen-flowconfig/gen-flowconfig --project xplat`
* Unstacked from the commit in point 1
Reviewed By: SamChou19815
Differential Revision: D36676019
fbshipit-source-id: c3032f18ed838afc327f00de563e7f20713bdc26
Summary:
Flow v0.176.1 has a bug when run in a non-lazy mode.
Changelog: [Internal]
Reviewed By: SamChou19815
Differential Revision: D35665720
fbshipit-source-id: a5fa691adf9ab5f5f4a67188fb3b52b4c69ee325
Summary:
Doing this patch level bump to ensure that all packages consuming `react-native` will get `7.0.3` and not lower 7.x versions.
This is because this new patch contains this fix: https://github.com/react-native-community/cli/pull/1560
(thanks NickGerleman & thymikee for your work!)
We'll have to cherry-pick this into the 0.68 branch.
While at it, I've also done a cheeky `npx yarn-deduplicate` to clean up the `yarn.lock` a bit.
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->
[General] [Changed] - Bump RN CLI to v7.0.3 to address web debugging issue
Pull Request resolved: https://github.com/facebook/react-native/pull/33156
Test Plan:
CI + some local testing via `test-manual-e2e`:
<img width="1779" alt="Screenshot 2022-02-21 at 11 40 54" src="https://user-images.githubusercontent.com/16104054/154948695-8c40bb56-87eb-4326-a740-49930994c08b.png">
Reviewed By: cortinico
Differential Revision: D34385503
Pulled By: motiz88
fbshipit-source-id: f0d8c4e0e92f83c0d819eeaa0fbec27820145968
Summary:
This diff updates the xplat flowconfigs to make existential types an error.
Changelog: [Internal]
Reviewed By: pieterv
Differential Revision: D29967838
fbshipit-source-id: f08bbafe2a0269adb2c9afa4572b7a34fd254a4d
Summary:
A future version of Flow will make the `indexed_access` option on by default. Turn it off explicitly in xplat until we're ready to deploy.
Changelog: [Internal]
Reviewed By: panagosg7
Differential Revision: D29468755
fbshipit-source-id: 1ae5bb5f57315a2dab3072cc25689c3fc72ef871
Summary:
Both new_signatures and abstract_locations are now enabled by default, so we don't need the configuration. Both options are going to be removed soon as well.
Changelog: [Internal]
Reviewed By: gkz
Differential Revision: D27319298
fbshipit-source-id: 30e6dcd2d30a45f630388998957c8db39895a8f7
Summary:
This mode re-implements parts of the types-first architecture, and is a step
toward types-first 2.0, which will greatly reduce memory usage. In this mode,
Flow finds some errors that were missed before.
Changelog: [Internal][Changed] Updated to Flow's new signatures mode for types-first
Reviewed By: panagosg7
Differential Revision: D26890348
fbshipit-source-id: 4c0bc4960a79ae2c4fa4c420bac506c9b2565beb
Summary:
The old generate-tests mode for checking generics is now defaulted to `false`, and the code path that the setting supports is getting deleted, so .flowconfigs no longer should specify that `generate-tests=false`
Changelog: [Internal]
Reviewed By: panagosg7
Differential Revision: D25958102
fbshipit-source-id: a15926f04bd8cd4337f489cddbb8e385821243bc
Summary:
The Flow team has been building a new implementation of the system that typechecks the body of generic functions and classes. This system is more sound than the previous approach and detects errors that were uncaught previously. This diff turns on the new generic system by setting generate_tests=false in the .flowconfig, and suppresses newly discovered errors.
This diff modifies and re-signs some generated modules, because syncing from www pulled in a ton of other changes that have runtime differences, and I'm not equipped to verify that the changes are safe to land.
Changelog: [Internal]
Reviewed By: panagosg7
Differential Revision: D24801184
fbshipit-source-id: bb31fe4c5a4107d183649b436a548df5ff42e217
Summary:
Types First and the various esproposal flags are on by default as of 0.135
Clean up flowconfigs that have to be in sync with the main one
Changelog: [Internal]
Reviewed By: jimmy623
Differential Revision: D24221995
fbshipit-source-id: 5da2867e2f013ad729a436ada192ecab690cb413
Summary:
Removes `fbjs` dependency from `react-native` because it is no longer referenced.
Changelog:
[General][Changed] - Removed `fbjs` dependency from `react-native`.
Reviewed By: cpojer
Differential Revision: D23358201
fbshipit-source-id: 1945590d2e7ea853434c716a151fc1058718d471
Summary:
Changelog: [Internal]
This lint is now an error by default, so we no longer need to manually specify it as such in the flowconfig
Reviewed By: gkz
Differential Revision: D23145523
fbshipit-source-id: 6c104563793fbc67c8b15b7310e96d1750d21df3
Summary:
Changelog: [Internal]
This lint is now an error by default, so we no longer need to manually specify it as such in the flowconfig. This also gets us ready to remove the lint entirely from Flow.
Reviewed By: gkz
Differential Revision: D23134689
fbshipit-source-id: 683a414bb399b823c65b7f687d25344d3e3ba980
Summary:
Changelog: [Internal]
I had to update the types-first flags in the giuthub flowconfigs because they are removed in 0.128. I updated the snapshot test as well
allow-large-files
Reviewed By: mroch
Differential Revision: D22336797
fbshipit-source-id: ebeb0c05479d2dac69a66645d042d5671453f5e8
Summary:
Flow is deprecating this config option, so we are removing it in preparation.
Changelog:
[Internal]
Reviewed By: gkz
Differential Revision: D21642915
fbshipit-source-id: cb2abff067b8702b37d5fdbdd63556f464e2a4a5
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