Commit Graph

102 Commits

Author SHA1 Message Date
Nurzhan Bakibayev 10814e2e61 Remove __fbUninstallRNGlobalErrorHandler
Reviewed By: pakoito

Differential Revision: D7831179

fbshipit-source-id: 6db9fe617d5a1a23a4aa46c9c3028db13a7a52a0
2018-05-21 11:12:46 -07:00
Dmitry Zakharov a93e281428 Detach RN Bridge and CS
Reviewed By: danzimm

Differential Revision: D7833851

fbshipit-source-id: 14533c519f08bd39d69f5203040ad54415228f9f
2018-05-11 10:57:53 -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 cd7c91f35d Convert react-native-github/Libraries to let/const
Reviewed By: sahrens

Differential Revision: D7961763

fbshipit-source-id: ff7dd1d2c7101c8019e0b4f844d8c377b4d13a13
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
Riley Dulin d4d515cdc3 MessageQueue not initializing inCall
Reviewed By: yungsters

Differential Revision: D7898700

fbshipit-source-id: c2b4d6e75e7f5871cd40b00bd173e6f1a929b26a
2018-05-10 11:02:45 -07:00
Spencer Ahrens 5b923e0eaf Add args to bridge function call systrace markers
Reviewed By: yungsters

Differential Revision: D7797728

fbshipit-source-id: 615affc57e658d4dd08a88f829d38be930804372
2018-04-30 09:55:49 -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
Paco Estevez Garcia 976712afa3 Replace RN exception handling override with new version
Reviewed By: Hypuk

Differential Revision: D7385541

fbshipit-source-id: 287d3f4d681046f740ed0552e00a2249c3803a0b
2018-04-03 06:01:37 -07:00
Charles Dick aabd5d1458 Use map instead of array
Reviewed By: dcaspi

Differential Revision: D7327839

fbshipit-source-id: e48d2b9f34e337d14f9519eac16b6a15fa56deb5
2018-03-20 04:17:55 -07: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
Semen Zhydenko d2c569795c Typos in comments and log messages
Summary:
No code changes, no testing required.

alligned -> aligned
allignment -> alignment
completly -> completely
conseptually -> conceptually
decendents -> descendants
indefinetly -> indefinitely
dimention -> dimension
doesnt -> doesn't
safegaurd -> safeguard
intialization -> initialization
hierachy -> hierarchy
happend -> happened
gaurd -> guard
programatically -> programmatically
initalized -> initialized
immidiately -> immediately
occured -> occurred
unkown -> unknown
neccessary -> necessary
neccesarily -> necessarily
occuring -> occurring
comoponent -> component
propogate -> propagate
recieved -> received
referece -> reference
perfomance -> performance
recieving -> receiving
subsquently -> subsequently
scoll -> scroll
suprisingly -> surprisingly
targetting -> targeting
tranform -> transform
symetrical -> symmetrical
wtih -> with
Closes https://github.com/facebook/react-native/pull/17578

Differential Revision: D6718791

Pulled By: shergin

fbshipit-source-id: 4ab79c1131ec5971d35a0c7199eba7ec0a0918ad
2018-01-12 22:18:45 -08:00
Eli White 79902f99b8 Finish migration from jasmine to jest
Reviewed By: cpojer

Differential Revision: D6671373

fbshipit-source-id: e9570b9a9da6063576905719f7ffc5465cda737a
2018-01-08 14:17:55 -08:00
Marc Horowitz ea2e2c54cb Make the __DEV__ argument check more robust
Summary: JSON.stringify will convert a function to null, but folly::dynamic in the native code can't represent a JS function. Props do sometimes have functions, but don't permit them everywhere.

Reviewed By: johnislarry

Differential Revision: D6541878

fbshipit-source-id: b2a9d3ba7899dfb98a6a2ada3aa91a26549fdd94
2017-12-14 11:17:39 -08:00
Paco Estevez Garcia 1d16923063 Add remote API to uninstall the global error handler in RN
Reviewed By: fromcelticpark

Differential Revision: D6426209

fbshipit-source-id: 804e73e0dc4e4b85b336e3627c00840d2ff3c9d6
2017-12-11 08:06:24 -08:00
Miguel Jimenez Esun 834b9d4e6e Adding @email tags to most of the tests
Reviewed By: rafeca

Differential Revision: D6185623

fbshipit-source-id: 30df83288fe85516d8d5a1617a4fb8fea826ed6f
2017-11-02 06:25:03 -07:00
Riley Dulin 7b575d669d Improve flow typing and linting for MessageQueue
Differential Revision: D5987892

fbshipit-source-id: 8b9218875944decc5e21863e3c3f3a659ff2e2e4
2017-10-10 16:32:28 -07:00
Riley Dulin 089add4de7 Add @format to MessageQueue
Reviewed By: javache

Differential Revision: D5925489

fbshipit-source-id: 799b530a2540850722ad1910263030afb951c4c5
2017-09-28 13:16:00 -07:00
Jonathan Lee 182874d972 Reverting changes to MessageQueue
Reviewed By: zjj010104

Differential Revision: D5785916

fbshipit-source-id: ed30e3d2763d16c5a1f550f05d2b9f0997b83fbe
2017-09-07 14:30:59 -07:00
Pieter De Baets cb313569e5 Increase information logged to MessageQueue.spy
Reviewed By: dulinriley

Differential Revision: D5517734

fbshipit-source-id: de7ba08130d229882256bcb1496d6efc708bdce7
2017-07-31 06:16:41 -07:00
Kody Greenbaum 26764d4179 Revert D5470356: [react-native] Increase information logged to MessageQueue.spy
Differential Revision: D5470356

fbshipit-source-id: 27b247ac3c538f801c1f9a86f74fb3098064e92e
2017-07-25 11:53:20 -07:00
Pieter De Baets f445ac8ef1 Increase information logged to MessageQueue.spy
Reviewed By: dulinriley

Differential Revision: D5470356

fbshipit-source-id: 663dfa4e0c8cc5292e27f607111fc35a565a0bd8
2017-07-25 08:01:28 -07:00
Arnold Noronha 2639e7f123 Revert D5446953: [react-native] Conditionally export JSTimers
Differential Revision: D5446953

fbshipit-source-id: 8275e1b71b8fac9b120c8ddff486f9cd88b7939d
2017-07-19 13:06:02 -07:00
Pieter De Baets a68f6fab0f Conditionally export JSTimers
Reviewed By: fkgozali

Differential Revision: D5446953

fbshipit-source-id: c08bd873024d591f5186a3a6767f319de3b6b6d8
2017-07-19 05:45:08 -07:00
Miguel Jimenez Esun 1d7c990424 Make a method used externaly (in a test) public
Summary: The method is being used in a test, so if a private method name mangling happens, the name of the method changes and the test fails.

Reviewed By: cpojer

Differential Revision: D5347967

fbshipit-source-id: ee964c2876bcfea5253d2ce7f9f02d4dbeebeab3
2017-07-03 07:53:58 -07:00
Pieter De Baets b6cfad27f8 Allow no args to be passed to rejection callback
Reviewed By: davidaurelio

Differential Revision:
D5301417

Tags: accept2ship

fbshipit-source-id: a4fb74dd50eb63579e7b69a6d48d4020f718b81c
2017-06-22 10:04:09 -07:00
Pieter De Baets 0ae11f12f3 Merge JSTimers and JSTimersExecution
Reviewed By: mmmulani

Differential Revision: D5292923

fbshipit-source-id: d8331cbac28ba3bbf47c9746238a755b707903ea
2017-06-22 09:52:33 -07:00
Pieter De Baets 534bbfac8f Report Java stack from errors from sync native module calls
Reviewed By: mhorowitz

Differential Revision: D5069794

fbshipit-source-id: ede314034a2eb6b063a22dbd6e5d13c8ad66e20c
2017-06-14 09:32:37 -07:00
James Burnett 51c0e81557 remove disableAutomock from jest tests (new default) @bypass-lint
Reviewed By: cpojer

Differential Revision: D5237192

fbshipit-source-id: dccca52a91259d7fea27931f92bca94184a82d4a
2017-06-13 15:04:09 -07:00
Alex Dvornikov e38641cd73 Fixed error in _getCallableModule method in MessageQueue
Reviewed By: javache

Differential Revision: D5208462

fbshipit-source-id: 13f71e2b7988305eccfa91c349ff120fad9129f0
2017-06-08 12:49:37 -07:00
James Burnett 3360999431 disable automock by default in as many places as possible @bypass-lint
Reviewed By: cpojer

Differential Revision: D5190858

fbshipit-source-id: d3125cf81427dbbe3362ef1f958413394a6dc51d
2017-06-08 07:45:54 -07:00
Alex Dvornikov 485bb70691 Allow lazy modules registration with the BatchedBridge
Reviewed By: javache

Differential Revision: D5181849

fbshipit-source-id: f63562c360488a9818605b25c1338214daac7411
2017-06-06 07:07:19 -07:00
Pieter De Baets 07ee2fb90a Only call callImmediates once per batch
Reviewed By: AaaChiuuu

Differential Revision: D5163897

fbshipit-source-id: bcff70c4a6a6329b9ae771d9cad14876e3a40250
2017-06-02 08:17:07 -07:00
Pieter De Baets 7837bdbf7c Add error message when calling sync methods from the Chrome debugger
Reviewed By: yungsters

Differential Revision: D5123286

fbshipit-source-id: a7ac3fcc0b18e8d9562d99eb60268a3d98b3d647
2017-05-25 06:18:36 -07:00
rh389 0a55e42ef6 Refactor MessageQueue
Summary:
Looking to address a few new `FlowFixMe`s I had to do some minor refactoring of `MessageQueue`. Has the advantage of (IMO) making things clearer by removing a redundant counter and some gratuitous bitwise operations.

Previously `_callbacks` was an array of `?Function`s where even elements were failure callbacks and odd elements were successes. Each new call incremented `_callID` by one and `_callbackID` by two. I've changed this to use two arrays `_successCallbacks` and `_failureCallbacks` indexed by `callID`. That made the `_callbackID` counter unnecessary and reduced the need for computed indices.

Tested with flow and a quick play with UIExplorer.
Closes https://github.com/facebook/react-native/pull/11986

Differential Revision: D4962162

Pulled By: javache

fbshipit-source-id: 17dddfedc0cb5950dbdd9bd06fae6eb6de4c4a7d
2017-04-28 04:04:14 -07:00
Marc Horowitz 1916b38a65 Support passing a collection of native modules to JSContext
Reviewed By: javache

Differential Revision: D4772649

fbshipit-source-id: dd9353edb0c2c013a3b7fe772231db12cdd8cdae
2017-03-31 01:00:52 -07:00
Pieter De Baets 7de59b102d Support calls through MessageQueue when interecting with JSValue directly
Reviewed By: yungsters

Differential Revision: D4756241

fbshipit-source-id: 5c7309a18ac476a620451bf471471596c9f82cf8
2017-03-28 07:18:21 -07:00
Pieter De Baets 3f46e591ff Fix crash when overriding native modules on RCTJSCExecutor
Reviewed By: alexeylang

Differential Revision: D4769955

fbshipit-source-id: 20f4f4c469eafbe2c7a81ad9f5b9a8386195a8ac
2017-03-24 09:31:04 -07:00
Bhuwan Khattar 84a681cea9 Ignore mocks in packager
Reviewed By: cpojer

Differential Revision: D4611759

fbshipit-source-id: 49cf3dbf4a068585b1bb6bca84268bc2631d037f
2017-02-24 13:01:34 -08:00
Pieter De Baets 68135d90a4 Move BatchedBridge module configuration to InitializeCore
Reviewed By: davidaurelio

Differential Revision: D4599060

fbshipit-source-id: bd0f1f6910f4fd9b68d6a9678fd5e97cdf6be553
2017-02-22 15:01:11 -08:00
Spencer Ahrens 5d4d62f474 Some perf tools for debugging js stalls
Summary:
The stall watchdog is handy to detect stalls, but it doesn't really tell us what was
happening. This diff makes it easy to track React perf and bridge traffic during any stall, and
prints it out if the stall exceeds the threshold.

Reviewed By: yungsters

Differential Revision: D4479439

fbshipit-source-id: 87f94913ec341a648d7744249597dc30b29759ab
2017-02-06 17:46:34 -08:00
Alex Kotliarskyi 99b81da629 Remove obsolete mocks
Reviewed By: cpojer

Differential Revision: D4466121

fbshipit-source-id: a318deb6485cb3e2e8e7bd52278bce9f9d16fefd
2017-01-26 11:28:33 -08:00
Gabe Levi e2ce98b7c6 Fix the suppress comment regex for react_native
Reviewed By: davidaurelio

Differential Revision: D4435640

fbshipit-source-id: c680aee6931979859f04c0dca47037ba6f6cba73
2017-01-19 10:28:28 -08:00
Gabe Levi a4bfac907e Deploy v0.38.0
Reviewed By: jeffmo

Differential Revision: D4428858

fbshipit-source-id: 10dc69349a2b563e1fa444a8b0612e3b2d4ccd1c
2017-01-18 11:13:30 -08:00
Alan Norbauer 4aabf4b6b3 Replace jest.resetModuleRegistry() with jest.resetModules()
Reviewed By: cpojer

Differential Revision: D4344961

fbshipit-source-id: 45453ec7ee3211743946ab9156f51430322b5832
2016-12-18 17:13:38 -08:00
Gabe Levi 61d1a4fb39 Deploy v0.35.0
Reviewed By: davidaurelio

Differential Revision: D4177391

fbshipit-source-id: c02cf98ed275b7032103b11eab6d0e189f8d8f24
2016-11-14 20:45:17 -08:00
Pieter De Baets 292cc82d0e Reorganize core JS files
Reviewed By: lexs

Differential Revision: D3987463

fbshipit-source-id: fa8f1d1bea7ed699120b9705ddc1c83767fcf8e4
2016-10-11 10:14:28 -07:00
Pieter De Baets 9ed9bca0bf Lazily instantiate native modules
Summary: Instead of sending a list of modules over to JS on startup (and actually blocking script execution) instead provide a proxy object that constructs each of these lazily.

Reviewed By: lexs

Differential Revision: D3936979

fbshipit-source-id: 71bde822f01eb17a29f56c5e60e95e98e207d74d
2016-10-11 07:28:42 -07:00
Michał Łazowik f77185f27e Fix rest operator syntax errors
Summary:
These are caused by new [syntax checking](1285131e3e/CHANGELOG.md (v6113-2016-10-01)) introduced by babylon.

"The single rest at the end only applies to binding `let { x, ...y } = obj;` and assignment `({ x, ...y } = obj).`"

I'd say this really should be cherry picked into the stable branch.

**Test plan**
1. install babylon@6.11.3
2. see that things break
3. apply patch
4. things work
5. make sure all instances were fixed (I used `\.\.\..*,.*\n.*=` in IntelliJ regex format—find all ... followed by newline followed by =)

Issue #10199
Closes https://github.com/facebook/react-native/pull/10200

Differential Revision: D3974066

Pulled By: javache

fbshipit-source-id: 3f3c1e9df01a3b3bdd61dd3863416c638d3ed98d
2016-10-05 04:43:45 -07:00
Pieter De Baets 76c54847bb Extract native module logic from BatchedBridge
Reviewed By: lexs

Differential Revision: D3901630

fbshipit-source-id: c119ffe54a4d1e716e6ae98895e5a3a48b16cf43
2016-09-23 11:14:11 -07:00