Граф коммитов

105 Коммитов

Автор SHA1 Сообщение Дата
Luna Wei b85b4f46af Update PerformanceLogger to nullable timespans, points, extras
Summary: Changelog: [Internal][Fixed] - When we close performance loggers (D23845307 (aebb97b9c6)) we cannot rely that a timespan/point/extra will be in perf logger. Update types to reflect that.

Reviewed By: rubennorte

Differential Revision: D23907741

fbshipit-source-id: 63673aa69cd8c76253e4fee3463e37c86265cf7b
2020-09-28 10:53:55 -07:00
Samuel Susla 8fc8cd9aea Add todo notes for nativeID hack
Summary: Changelog: [internal]

Reviewed By: JoshuaGross

Differential Revision: D23003735

fbshipit-source-id: 7814de9e1d280604842e47a969ab3e8d453c50a8
2020-08-10 15:37:12 -07:00
Samuel Susla ee3994530d Force JS inspector to form stacking context
Summary:
Changelog: [Internal]

# Problem

JS inspector overlay gets flattened, therefore `onResponderMove` callback isn't called. JS inspector depends on `onResponderMove` because that's how it knows where on screen user has tapped.

https://our.intern.facebook.com/intern/diffusion/FBS/browse/master/xplat/js/react-native-github/Libraries/Inspector/InspectorOverlay.js?commit=2e9ab04b039a&lines=58

# Workaround

This is just a hack to get it working, setting nativeID forces stacking context to be created and therefore view not being flattened.

Reviewed By: mdvacca

Differential Revision: D21816513

fbshipit-source-id: 83aedbfaecdce22cfe202241cbe91cecb914ed6b
2020-06-01 09:40:06 -07:00
Rick Hanlon 21396bb380 Enable inspector for Fabric
Summary:
## Overview
This diff refactors the Inspector, moving logic to look up view data for a touched view inside the renderer as `getInspectorDataForViewAtPoint`. We then implement that same function for Fabric in order to support the inspector in that renderer.

Requires https://github.com/facebook/react/pull/18388

## Motivation

Reason one for this refactor is that, previously, the inspector held all of the logic to look up view data for a given x,y touch coordinate. To do this, it would take the React tag and coordinates, look up the native view tag, measure it, and then ask React internals for the Fiber information of that tag. All of this is deeply coupled to React internals, yet the logic is outside of React core in the Inspector.

Reason two is that, for Fabric, the logic for getting the view data is different than Paper. In Fabric, we pass the x,y coordinates to native directly, which returns an instance handle. That handle can be used to measure the ShadowNode, or retrieve the Fiber information.

By moving the logic into the renderer in React core, we decouple the implementation details of looking up view data for a tapped point and allow ourselves the ability to add and change renderer-specific code for the actual lookup without impacting outsiders like the Inspector.

Changelog: [Internal]

Reviewed By: TheSavior

Differential Revision: D20291710

fbshipit-source-id: a125223f2e44a6483120c41dc6146ad75a0e3e68
2020-03-30 14:05:27 -07:00
Michael Bolin 0b9ea60b4f Back out "Upgrade Prettier from 1.17 to 2.0.2."
Differential Revision: D20639755

fbshipit-source-id: 5028563f9cf0527a30b4259daac50cdc03934bfd
2020-03-24 21:47:35 -07:00
Michael Bolin cf44650b3f Upgrade Prettier from 1.17 to 2.0.2.
Summary:
This gets us on the latest Prettier 2.x:
https://prettier.io/blog/2020/03/21/2.0.0.html

Notably, this adds support for TypeScript 3.8,
which introduces new syntax, such as `import type`.

Reviewed By: zertosh

Differential Revision: D20636268

fbshipit-source-id: fca5833d003804333a05ba16325bbbe0e06d6c8a
2020-03-24 20:24:47 -07:00
Nick Gerleman 161b910494 Do not explicitly include ".js" in Library imports (#28311)
Summary:
A few recent imports have explicitly added ".js" to the end of their path. This prevents Metro from resolving platform-specific JS files, e.g. "Foo.android.js" or "Foo.windows.js" instead of "Foo.js".

React Native Windows provides its own implementation of files in a few cases where stock React Native will share them between Android and iOS. We hope to reduce/eliminate these long term, but requiring explicit ".js" files currently breaks us in a couple of places where we have custom implementations.

This change is a quick regex replace of ES6 and CommonJS imports in 'Libraries/" to eliminate ".js".

## Changelog

[General] [Fixed] - Do not explicitly include ".js" in Library imports
Pull Request resolved: https://github.com/facebook/react-native/pull/28311

Test Plan: I haven't done any manual validation of this, but `flow-check` should catch any issues with this during CI.

Reviewed By: cpojer

Differential Revision: D20486466

Pulled By: TheSavior

fbshipit-source-id: 31e1ccc307967417d7d09c34c859f0b2b69eac84
2020-03-17 02:11:53 -07:00
Eli White fa78a96739 Convert Inspector to call ref.measure
Summary:
`node` is passed to us from react devtools. We can call .measure on that directly instead of using findNodeHandle and UIManager. This makes this call compatible with Fabric.

Changelog:
[Internal]

Reviewed By: mdvacca

Differential Revision: D19152052

fbshipit-source-id: 05ab6d55f3a79221d99289f0341eb25352b96899
2019-12-17 20:09:25 -08:00
Eli White 85529fe356 Refactor Inspector to take a react instance
Summary:
We will need to operate on instances instead of react tags. This diff passes through the instance instead of the tag.

This does not make the inspector work in Fabric, but it is a necessary refactor in that direction.

Changelog:
[Internal]

Reviewed By: mdvacca

Differential Revision: D19149647

fbshipit-source-id: 53fa35a2886bf36a146d473a496409dffc114a80
2019-12-17 18:35:00 -08:00
George Zahariev 8553e1acc4 Exact-by-default codemod for react-native-github
Summary:
We are rolling out exact-by-default syntax to xplat/js.

I had to manually move around some comments to preserve proper placement.

Changelog: [Internal]

Reviewed By: jbrown215

Differential Revision: D18633611

fbshipit-source-id: 48f7468dcc55b1d00985419d035a61c6820b3abe
2019-11-21 09:42:57 -08:00
Eli White 21f1cce148 Remove unused code
Summary:
There are some unused imports and variables. This was flagged by running
```
$ js1 lint --only "no-unused-vars: [1, {vars: 'all', args: 'none', ignoreRestSiblings: true}]" ~/fbsource/xplat/js/react-native-github --only "react/jsx-uses-vars" --only "react/jsx-uses-react" --fast
```

Changelog:
Internal

Reviewed By: zackargyle, JoshuaGross

Differential Revision: D17724836

fbshipit-source-id: 2b6a44f55c878d659c9c23f5878ba34f21f8bb69
2019-10-03 14:33:59 -07:00
Janic Duplessis d67c8d4dec Fix printing of false boolean values in the style inspector (#26431)
Summary:
React can't print false, we can just use `JSON.stringify` for any values except string to avoid adding quotes.

## Changelog

[General] [Fixed] - Fix printing of false boolean values in the style inspector
Pull Request resolved: https://github.com/facebook/react-native/pull/26431

Test Plan:
Before

![image](https://user-images.githubusercontent.com/2677334/64896741-e4724d00-d64e-11e9-82b2-57275754523b.png)

After

![image](https://user-images.githubusercontent.com/2677334/64896725-d8868b00-d64e-11e9-903b-8e5212456d78.png)

Reviewed By: TheSavior, mmmulani

Differential Revision: D17468880

Pulled By: JoshuaGross

fbshipit-source-id: 838d3f512037b067ca96fcf5c9d98e2a18fc9821
2019-09-19 13:44:25 -07:00
Brian Vaughn 92a3c9da0a React DevTools v4 integration
Summary:
This Diff is being posted for discussion purposes. It will not be ready to land until React DevTools v4 has been published to NPM.

Update React Native to be compatible with the [new version 4 React DevTools extension](https://github.com/bvaughn/react-devtools-experimental).

**Note that this is a breaking change**, as the version 3 and version 4 backends are **not compatible**. Once this update ships (in React Native) users will be required to update their version of the [`react-devtools` NPM package](https://www.npmjs.com/package/react-devtools). The same will be true for IDEs like Nuclide as well as other developer tools like Flipper and [React Native Debugger](https://github.com/jhen0409/react-native-debugger).

Related changes also included in this diff are:
* Pass an explicit whitelist of style props for the React Native style editor (to improve developer experience when adding new styles).
* Update `YellowBox` console patching to coordinate with DevTools own console patching.
  * Also improved formatting slightly by not calling `stringifySafe` for strings (since this adds visible quotation marks).

Regarding the console patching- component stacks will be appended by default when there's no DevTools frontend open. The frontend will provide an option to turn this behavior off though:

{F168852162}

React DevTools will detect if the new version is used with an older version of React Native, and offer inline upgrade instructions:

{F169306863}

**Note that the change to the `RCTEnableTurboModule` will not be included in this Diff**. I've just turned those off temporarily so I can use v8+Chrome for debugging.

Reviewed By: rickhanlonii

Differential Revision: D15973709

fbshipit-source-id: bb9d83fc829af4693e7a10a622acc95a411a48e4
2019-08-26 23:56:59 -07:00
Logan Daniels 91f139b941 xplat/js/react-native-github
Reviewed By: panagosg7

Differential Revision: D16657770

fbshipit-source-id: 4e260842c838a35317515044c54ccf55a083da33
2019-08-09 10:11:15 -07:00
Eric Lewis 18fededae0 add spec for I18nManager (#24908)
Summary:
Part of #24875.

## Changelog

[General] [Added] - add TM spec for I18nManager
Pull Request resolved: https://github.com/facebook/react-native/pull/24908

Reviewed By: fkgozali

Differential Revision: D15395163

Pulled By: RSNara

fbshipit-source-id: 8fd3a5a8ce5d0f74132efff4fae7224eab03405b
2019-05-31 19:56:37 -07:00
Alan Kenyon 57a1e7c000 VirtualizedList.RenderItem throws when using function component with hooks (#24832)
Summary:
`<VirtualizedList />` will throw an error if the `renderItem` Prop component uses hooks. Function components without hooks and class components work without issue.

Super contrived Example
```{js}
function FlatListItem({ item }) {
  React.useEffect(() => console.log(item),[])

 return (<Text>{item}</Text>);
}

<FlatList data={[1, 2, 3]} renderItem={FlatListItem} />
```

Example Error:
```
Invariant Violation: Hooks can only be called inside the body of a function component. (https://fb.me/react-invalid-hook-call)

This error is located at:
    in CellRenderer (at VirtualizedList.js:688)
    in RCTScrollContentView (at ScrollView.js:976)
    in RCTScrollView (at ScrollView.js:1115)
    in ScrollView (at VirtualizedList.js:1081)
    in VirtualizedList (at FlatList.js:632)
    in FlatList (at WithoutScrollbars.js:21)
    ...
```

## Changelog

[General] [Added] - VirtualizedList ListItemComponent. An alternative to renderItem that accepts function components with hooks.
[General][Added] - FlatList ListItemComponent. An alternative to renderItem that accepts function components with hooks.
[General][Added] - VirtualizedList and FlatList tests and updated RNTester example
Pull Request resolved: https://github.com/facebook/react-native/pull/24832

Reviewed By: sahrens

Differential Revision: D15334020

Pulled By: cpojer

fbshipit-source-id: 882db722fd6e22f07260b08091b3456d1c66c2c8
2019-05-20 07:46:03 -07:00
James Ide 0ee5f68929 Migrate "Libraries" from Haste to standard path-based requires (sans vendor & renderers) (#24749)
Summary:
This is the next step in moving RN towards standard path-based requires. All the requires in `Libraries` have been rewritten to use relative requires with a few exceptions, namely, `vendor` and `Renderer/oss` since those need to be changed upstream. This commit uses relative requires instead of `react-native/...` so that if Facebook were to stop syncing out certain folders and therefore remove code from the react-native package, internal code at Facebook would not need to change.

See the umbrella issue at https://github.com/facebook/react-native/issues/24316 for more detail.

[General] [Changed] - Migrate "Libraries" from Haste to standard path-based requires
Pull Request resolved: https://github.com/facebook/react-native/pull/24749

Differential Revision: D15258017

Pulled By: cpojer

fbshipit-source-id: a1f480ea36c05c659b6f37c8f02f6f9216d5a323
2019-05-08 08:48:59 -07:00
Georgios Andreadis 972ee2edbd Resolve relative size rendering error in inspector (#23804)
Summary:
Currently, when relative sizes are given in margin or padding stylings (be it a percentage or an auto measure), the inspector crashes, due to frame rendering not properly handling those kinds of measurements. This PR adds a resolution step for them:

* Percentages are evaluated relative to the window size.
* I decided to simply not render `auto` margins/paddings, due to the complexities involved (e.g. when the margin is between multiple elements with relative sizes).

Since the inspector does not crash anymore on relative sizes on paddings or margins, I believe that this addresses #17496.

Fixes #17496

[General] [Fixed] - Fix inspector rendering of relative margins and paddings
Pull Request resolved: https://github.com/facebook/react-native/pull/23804

Differential Revision: D14437273

Pulled By: cpojer

fbshipit-source-id: c9f0f71a2e1b2399a2b2148cef2124787703ead3
2019-03-13 02:07:02 -07:00
Alexander Zhang efd28bdc84 Revert D14186694: [RN] Use global or scoped performance loggers everywhere
Differential Revision:
D14186694

Original commit changeset: 062c76eea8fc

fbshipit-source-id: 6d99b94d21da6df4375e342fdecceeebf05959d5
2019-03-07 13:12:12 -08:00
Alexey Lang a9b3ca7fa7 Use global or scoped performance loggers everywhere
Summary:
I'm changing all callsites to use either global or scoped perf logger explicitly in one diff.
`GlobalPerformanceLogger` is basically a singleton
`scopedPerformanceLogger` is scoped to the React tree by using a React Context

Reviewed By: sahrens

Differential Revision: D14186694

fbshipit-source-id: 062c76eea8fce9d9b531f0eddf153bb79d52f68d
2019-03-06 09:51:56 -08:00
Alexey Lang 1aabbf5dce Allow to create local performance loggers
Reviewed By: bestander

Differential Revision: D14159631

fbshipit-source-id: 62830f67060e575841cbc864dde30c7bee7e7c4c
2019-02-28 03:39:40 -08:00
alanfoster c06473ab46 Update network inspector to have smarter scroll stickiness (#21952)
Summary:
When making use of the network inspector on a react-native app, it can be quite annoying that as new requests come in the network inspector instantly sticks to the bottom.

This PR makes this logic smarter by allowing the user to be scrolled away from the bottom by two rows to override this automatic scrolling to the bottom logic.
Pull Request resolved: https://github.com/facebook/react-native/pull/21952

Differential Revision: D14162762

Pulled By: cpojer

fbshipit-source-id: ad49858509dd74a817ebabab54fdacc99773bf22
2019-02-20 21:51:29 -08:00
Paco Estevez Garcia 5ee738659b Update xplat/js to 0.92.0
Summary: This diff updates `xplat/js` to Flow 0.92.0

Reviewed By: panagosg7

Differential Revision: D13917049

fbshipit-source-id: 69613182badecd4c23aef25b79f7380d5604a13b
2019-02-01 09:35:42 -08:00
TranLuongTuanAnh 46f3285a3f Fix issue #21065 getInspectorDataForViewTag is not a function (#21237)
Summary:
Fix renderer.getInspectorDataForViewTag is not a function when try Toggle Inspector

Fixes #21065

Release Notes:
--------------
[BUGFIX] [MINOR] [/react-native/Libraries/Inspector/Inspector.js]
Pull Request resolved: https://github.com/facebook/react-native/pull/21237

Differential Revision: D13838339

Pulled By: cpojer

fbshipit-source-id: 363a4beba211e7868395578c7941cbda119bc753
2019-01-28 02:00:18 -08:00
Thomas BARRAS 9facd81894 Flow ViewPropTypes (#22504)
Summary:
Related to #22100

Enhance ViewPropTypes flow types.
- I had some troubles with a TODO left for `onResponderGrant` hence the return type.
- I wasn't able to properly type `nativeBackgroundAndroid` and `nativeForegroundAndroid` at the moment.
Pull Request resolved: https://github.com/facebook/react-native/pull/22504

Reviewed By: cpojer

Differential Revision: D13334024

Pulled By: TheSavior

fbshipit-source-id: cada236e0d716ae78cb663172e5315cf11c6406a
2018-12-04 19:32:36 -08:00
Christoph Nakazawa 4148976a83 Use `invariant` instead of `fbjs/lib/invariant`
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
2018-12-03 00:07:02 -08:00
Victor Calvello ffd7195543 Remove unused styles (#22083)
Summary:
Removes unused styles.

NOTE: Lint rule `react-native/no-unused-styles` not added because of custom lint rule internally at Facebook that does this.
Pull Request resolved: https://github.com/facebook/react-native/pull/22083

Differential Revision: D12929443

Pulled By: TheSavior

fbshipit-source-id: d42b0be3db745e445447e65df3b78b61f53e4229
2018-11-05 13:57:47 -08:00
Ramanpreet Nara 614d773e51 Refactor
Summary: I did a bit more refactoring to NetworkOverlay.

Reviewed By: TheSavior

Differential Revision: D10476158

fbshipit-source-id: da26251f8dfd12dd592da3ae5367efa37ec07669
2018-10-22 17:11:50 -07:00
alanfoster efa6016c0d Convert network overlay to use flatlist
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/21837

Reviewed By: TheSavior

Differential Revision: D10449940

Pulled By: RSNara

fbshipit-source-id: 28dcd5906c64070ef50867425ae7517d391300e2
2018-10-22 17:11:50 -07:00
Andrey Lunyov 7541655398 Do not use fbjs/emptyObject
Summary: Remove dependency on fbjs/emptyObject in React Native

Reviewed By: yungsters

Differential Revision: D10342631

fbshipit-source-id: 312bb545b66dd5b2132ca67bbaf91cc98a0c6c8a
2018-10-12 11:33:49 -07:00
Ramanpreet Nara 07ac31eb3f Make Flow types more strict
Summary: Many of the optional types from the PR could have been made non-optional. I just made the change because it was simple enough to make and verify.

Reviewed By: TheSavior

Differential Revision: D10131969

fbshipit-source-id: b84693b5549708d7948fe3fd54295bc80be93790
2018-10-01 14:32:27 -07:00
Dishant Kaushik c8705330d7 InspectorPanel -> Delete PropTypes (#21392)
Summary:
Related to #21342
Pull Request resolved: https://github.com/facebook/react-native/pull/21392

Reviewed By: TheSavior

Differential Revision: D10129812

Pulled By: RSNara

fbshipit-source-id: 79e900b56eb043452ce8e13e998a9ad8d4443897
2018-10-01 14:32:27 -07:00
nd-02110114 c18458b394 Move and Rename custom propType definitions in ColorPropTypes (#21371)
Summary:
related #21342

TODO
* move ColorPropType.js
* fix flow error

CheckList
 - [x] `yarn prettier`
 - [x] `yarn flow-check-android`
 - [x] `yarn flow-check-ios`

All flow checks pass.

[GENERAL] [ENHANCEMENT] [DeprecatedColorPropType.js] - Created.
Pull Request resolved: https://github.com/facebook/react-native/pull/21371

Reviewed By: RSNara

Differential Revision: D10087818

Pulled By: TheSavior

fbshipit-source-id: 48088b441699886eef1fff3aafc2ca6015455006
2018-09-27 17:33:40 -07:00
Jordan Brown 0ee23d0beb Remove unused suppressions in xplat/js
Summary:
There were approximately 350 unused suppressions in xplat/js when checking with .flowconfig.android

The flow team is partially responsible for this, since our release process hasn't changed since we added the flowconfig. In the diff beneath this one, I added the functionality necessary for us to not add any more unused suppressions. To test it, I made this diff. The steps were:

1. Start iOS server
2. Start android server
3. remove unused ios suppressions
4. remove unused android suppressions
5. add ios suppressions with site=react_native_ios_fb
6. add android suppressions with site=react_native_android_fb
7. remove unused ios suppressions. The ones that are unused are ones where an android comment was inserted as well, since the ios comment no longer is next to the error
8. add suppressions using ios flowconfig with site=react_native_fb
9. remove unused android suppressions. The unused ones are ones that were moved up when the cross-platform suppressions were inserted.

I'm going to make this into a script to make sure we don't contribute anymore unused suppressions from our side.

The controller you requested could not be found. nolint

Reviewed By: TheSavior

Differential Revision: D10053893

fbshipit-source-id: 7bee212062f8b2153c6ba906a30cf40df2224019
2018-09-27 11:47:04 -07:00
kdastan 9f8fc8f1eb Remove PropTypes from InspectorOverlay (#21345)
Summary:
Related to #21342
Pull Request resolved: https://github.com/facebook/react-native/pull/21345

Differential Revision: D10081976

Pulled By: TheSavior

fbshipit-source-id: d6a905704fc5c2f10a6a8552f04e9c3feaeb147b
2018-09-27 00:14:23 -07:00
kdastan c650407fe9 Remove PropTypes from ElementProperties (#21350)
Summary:
Related to #21342
Pull Request resolved: https://github.com/facebook/react-native/pull/21350

Differential Revision: D10081454

Pulled By: TheSavior

fbshipit-source-id: db27a1f23c643b7d6d73136254eff91625419583
2018-09-26 22:35:13 -07:00
Héctor Ramos 1151c096da Update copyright headers to yearless format
Summary: This change drops the year from the copyright headers and the LICENSE file.

Reviewed By: yungsters

Differential Revision: D9727774

fbshipit-source-id: df4fc1e4390733fe774b1a160dd41b4a3d83302a
2018-09-11 15:33:07 -07:00
Wayne Cheng f536a0c268 Adding flow strict local to remaining possible files in xplat/JS
Summary:
ag -L --ignore __snapshots__ 'flow strict|noflow|generated|The controller you requested could not be found.' | ag '\.js$' | xargs ag -l 'flow' | sort > ~/temp
  cat ~/temp | xargs ag -L 'flow strict' | xargs sed -i '' 's/flow$/flow strict-local/'
  until flow check; do flow check --json | jq -r '.errors[].message[0].path' | sort | uniq | xargs hg revert; done

allow_many_files
The controller you requested could not be found.
The controller you requested could not be found.

Reviewed By: TheSavior

Differential Revision: D9004573

fbshipit-source-id: 936bd5741706b781be06bf08b6ad805a69407dfd
2018-08-09 08:54:44 -07:00
Tim Yung bfea0e5524 RN: Fix Element Inspector w/ Start + End Styles
Summary:
Fixes how the element inspector displays start and end styles (e.g. `marginStart` or `paddingEnd`).

@public

Reviewed By: TheSavior

Differential Revision: D8607581

fbshipit-source-id: e949927fd86e9b21a8ecf26fbf3e4863ad1486bd
2018-06-26 13:33:43 -07:00
Tim Yung 8b6f1c37ce RN: Fix Element Inspector w/ Negative Margins
Summary:
There is a bug with the React Native element inspector when the inspected element has negative margins because negative margins actually subtract from the content width and height. This fixes the bug.

@public

Reviewed By: TheSavior

Differential Revision: D8607389

fbshipit-source-id: 2cea0d9160b5437fe775b2ba25373072bafd70b9
2018-06-26 13:33:42 -07:00
Eli White 4b1ecb6204 Flowtype ListView
Reviewed By: yungsters

Differential Revision: D7985836

fbshipit-source-id: 6e0944a8d2fb85aabc34dfd3125a07b208749f21
2018-05-14 00:24:44 -07:00
Eli White d01ab66b47 Prettier React Native Libraries
Reviewed By: sahrens

Differential Revision: D7961488

fbshipit-source-id: 05f9b8b0b91ae77f9040a5321ccc18f7c3c1ce9a
2018-05-10 19:10:38 -07:00
Eli White 8f5ebe5952 Convert react-native-github/Libraries to let/const
Reviewed By: sahrens

Differential Revision: D7956042

fbshipit-source-id: 221851aa311f3cdd6326497352b366048db0a1bb
2018-05-10 16:16:35 -07:00
Rubén Norte d5e9e55fa3 Remove @providesModule from all modules
Summary:
This PR removes the need for having the `providesModule` tags in all the modules in the repository.

It configures Flow, Jest and Metro to get the module names from the filenames (`Libraries/Animated/src/nodes/AnimatedInterpolation.js` => `AnimatedInterpolation`)

* Checked the Flow configuration by running flow on the project root (no errors):

```
yarn flow
```

* Checked the Jest configuration by running the tests with a clean cache:

```
yarn jest --clearCache && yarn test
```

* Checked the Metro configuration by starting the server with a clean cache and requesting some bundles:

```
yarn run start --reset-cache
curl 'localhost:8081/IntegrationTests/AccessibilityManagerTest.bundle?platform=android'
curl 'localhost:8081/Libraries/Alert/Alert.bundle?platform=ios'
```

[INTERNAL] [FEATURE] [All] - Removed providesModule from all modules and configured tools.
Closes https://github.com/facebook/react-native/pull/18995

Reviewed By: mjesun

Differential Revision: D7729509

Pulled By: rubennorte

fbshipit-source-id: 892f760a05ce1fddb088ff0cd2e97e521fb8e825
2018-04-25 07:37:10 -07:00
Eli White a3c07c95ef StyleObj -> DangerouslyImpreciseStyleProp
Summary:
Migrating everything to import from StyleSheet instead of StyleSheetTypes.

Search and replaced
```
import type {StyleObj} from 'StyleSheetTypes';
```
to
```
import type {DangerouslyImpreciseStyleProp} from 'StyleSheet';
```

and then replacing `StyleObj` with `DangerouslyImpreciseStyleProp` and fixing up the remaining flow errors by hand.

Reviewed By: yungsters

Differential Revision: D7184077

fbshipit-source-id: b8dabb9d48038b5a997ab715687300bad57aa9d4
2018-03-07 13:24:20 -08:00
Kevin Gozali d7b5b2e9e4 Allow Inspector to handle 2 renderers
Summary: To avoid crashing when there are 2 different renderers, let the Inspector be a bit lenient.

Reviewed By: yungsters

Differential Revision: D7175338

fbshipit-source-id: ee5f86252f090361e42b6e2a93ae56c4c83c8c53
2018-03-06 18:09:52 -08:00
Sophie Alpert 1490ab12ef Update license headers for MIT license
Summary:
Includes React Native and its dependencies Fresco, Metro, and Yoga. Excludes samples/examples/docs.

find: ^(?:( *)|( *(?:[\*~#]|::))( )? *)?Copyright (?:\(c\) )?(\d{4})\b.+Facebook[\s\S]+?BSD[\s\S]+?(?:this source tree|the same directory)\.$
replace: $1$2$3Copyright (c) $4-present, Facebook, Inc.\n$2\n$1$2$3This source code is licensed under the MIT license found in the\n$1$2$3LICENSE file in the root directory of this source tree.

Reviewed By: TheSavior, yungsters

Differential Revision: D7007050

fbshipit-source-id: 37dd6bf0ffec0923bfc99c260bb330683f35553e
2018-02-16 18:31:53 -08:00
Brian Vaughn 6f007e8957 Ran rename-unsafe-lifecycles codemod on xplat/js
Reviewed By: trueadm

Differential Revision: D6889214

fbshipit-source-id: e815cda4b09f3650ae3b0b9a44ae6f5fcb48fe25
2018-02-08 10:58:31 -08:00
Semen Zhydenko 8ffc16c6e7 Typos in code
Summary:
To fix typos

No testing required, changed only internal things names

No

addtionalStyles -> additionalStyles
occured -> occurred
recomendedType -> recommendedType
markDirtyAndPropogate -> markDirtyAndPropagate
targetting -> targeting
RCTApplyTranformationAccordingLayoutDirection -> RCTApplyTransformationAccordingLayoutDirection (tranform -> transform)
Closes https://github.com/facebook/react-native/pull/17587

Differential Revision: D6832696

Pulled By: shergin

fbshipit-source-id: 452287e5ce82df5c6b87126cb21889b7bd9d73c1
2018-01-29 19:17:33 -08:00
Eli White 11a495cb32 Fixing eslint-comments warnings
Reviewed By: yungsters

Differential Revision: D6678252

fbshipit-source-id: ee93b7ee52520b750ca11fcc625cccf3cd82d075
2018-01-08 17:04:29 -08:00