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

69 Коммитов

Автор SHA1 Сообщение Дата
Ruslan Shestopalyuk f8a2dd74e8 Exclude PerformanceObserver from flow/haste
Summary:
[Changelog][Internal]

This is to prevent an accidental use of PerformanceObserver while it's still a work in progress.

PerformanceObserver is also moved into a dedicated folder, `Libraries/WebPerformance`.

Reviewed By: rubennorte

Differential Revision: D40978749

fbshipit-source-id: 09645a95bed72902870ebc00c1b4a3d81ab4c829
2022-11-03 07:14:41 -07:00
Sergei Karpukhin 890805db9c Add various annotation types to markEvent ReactNative API
Summary:
Support various annotations types in QuickPerformanceLogger markEvent for Android.

Changelog:
[Internal][Changed] - Added support for various markEvent annotation types

Reviewed By: dmitry-voronkevich

Differential Revision: D40852658

fbshipit-source-id: fc4053555f65958653be30a58742c83040a19df1
2022-11-03 02:44:08 -07:00
Ruslan Shestopalyuk a671d61b6d Add JS stub for PerformanceObserver specs
Summary:
This stubs all the type definitions for the [PerformanceObserver web perf APIs](https://www.w3.org/TR/performance-timeline/#the-performanceobserver-interface).

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D40892974

fbshipit-source-id: 31fe972fc069eb62e51bca82e9cd42ca65811753
2022-11-02 19:44:29 -07:00
Dmytro Voronkevych c565a770eb Migrating all qpl.markerAnnotate call sites to the new signature
Summary:
As part of unifying JS QPL interface, I'm bringing markerAnnotate to the parity with Web version.

At the moment it supports only string annotations, but I'm adding support for ints, arrays of ints, arrays of strings, etc.

## Changelog:
[Internal] [Changed] - Refactored markerAnnotateWithMap -> markerAnnotate

Reviewed By: eddyerburgh

Differential Revision: D40796535

fbshipit-source-id: 9831e353036835b97bb7b2f60085016034c04269
2022-11-01 12:25:00 -07:00
Dmytro Voronkevych e3eeadb63a Adding new markerAnnotateWithMap method
Summary:
## Changelog:
[Internal] [Added] - Adding new markerAnnotateWithMap to the QPL.

This is part of bigger effort to unify JS QPL interfaces across platforms.

Reviewed By: eddyerburgh

Differential Revision: D40796537

fbshipit-source-id: a75b97c20ca411653552228f7dc2fcbedd8ddca9
2022-11-01 12:25:00 -07:00
Rubén Norte 21dc5c8e99 Remove import cycle from Systrace module
Summary:
Replaced import cycle with Flow type cycle, which will remove the warnings from Metro.

Changelog: [internal]

Reviewed By: motiz88

Differential Revision: D40177136

fbshipit-source-id: e63986d8918e48e8c4cd8014d306d68fcbd2cf10
2022-10-07 07:18:42 -07:00
Rubén Norte bbb6b9631e Add native function to determine if systrace is enabled
Summary:
We're currently using `global.__RCTProfileIsProfiling` to determine if the app is currently profiling to forward calls to Systrace to native.

We're defining `global.__RCTProfileIsProfiling` when the React Native runtime is initialized (which, in most cases, is on startup or shortly after startup), which means that enabling profiling in the middle of the session doesn't set this value to `true`.

This diff adds a new method (in the global scope for now, as the rest of bindings for Systrace) to check if we're profiling in real time. This call should be very cheap as it's implemented as a JSI function that calls into a C++ API directly.

Changelog: [internal]

Reviewed By: rshest

Differential Revision: D40095840

fbshipit-source-id: e7030d6370ecb43d56478b03cb63806ffa0cd0cf
2022-10-05 15:17:53 -07:00
Rubén Norte a0f56adb07 Refactor Systrace module
Summary:
This refactors the systrace module to:
1) Migrate it to ESM
2) Fix the typing of certain parameters (e.g.: `eventName` and `cookie` shouldn't be optional)
2) Fix TypeScript definitions
3) Add inline documentation for methods
4) Add args (metadata) to all methods where it's supported in fbsystrace (`endEvent` and `endAsyncEvent`).
5) Make `setEnabled` a no-op. The only place where this method is called is from native, when starting a profile session. The problem is that implementation for Systrace in OSS (https://github.com/facebook/react-native/blob/main/ReactAndroid/src/main/java/com/facebook/systrace/Systrace.java#L40-L42) doesn't support listeners, so this wouldn't work correctly there. It also doesn't get called with Venice, so instead of fixing it for Venice with the same Meta-internal behavior, I decided to fix it for everyone with the synchronous method.

I'm not considering this a change in the public API of systrace because this module has been broken in OSS for ages and I'm assuming no one's using it at this point.

Changelog: [internal]

Reviewed By: rshest

Differential Revision: D40095842

fbshipit-source-id: fee41b2b7ae23aefe059e390c55d139db75247c5
2022-10-05 15:17:53 -07:00
Tim Yung 494c47360f RN: Sort Imports via ESLint
Summary:
Applies the autofix from the newly introduced `lint/sort-imports` ESLint rule.

Changelog:
[Internal]

Reviewed By: cortinico, skinsshark

Differential Revision: D39907798

fbshipit-source-id: 17f5f11b08a5b4bb66286816b78eb26e07e829b8
2022-09-30 14:28:48 -07:00
Nick Gerleman 8cdc9e7f04 Place TypeScript Declarations Alongside Source Files
Summary:
React Native's TS definitions are currently mostly stored in one monolithic file. This change splits the definitions up to correspond to the source files they came from, and are placed next to the source files. I think this should help inform, and make it easy to update the TS declarations when touching the Flow file.

I noticed as part of the change that the typings have not yet removed many APIs that were removed from RN. This is bad, since it means using the removed/non-functional API doesn't cause typechecker errors. Locating typings next to source should prevent that from being able to happen.

The organization here means individual TS declarations can declare what will be in the RN entrypoint, which is a little confusing. Seems like a good potential next refactor, beyond the literal translation I did.

Changelog:
[General][Changed] - Place TS Declarations Alongside Source Files

Reviewed By: lunaleaps, rshest

Differential Revision: D39796598

fbshipit-source-id: b36366466fd1976bdd2d4c8f7a4104a33c457a07
2022-09-26 12:09:45 -07:00
Rubén Norte 5efb4f09fd Remove (bad) implementation of the User Timing API from Systrace
Summary:
The `Systrace` module implements a polyfill for the User Timing API that's:
1. Incompatible with the Web standard. This polyfill expects `performance.mark` and `performance.measure` to be used exactly like `Systrace.beginEvent` and `Systrace.endEvent` respectively. If not used like those functions, they throw an error at runtime, which is really bad.
2. Never actually used. See below.

This polyfill is only installed if we're actually profiling on startup:
https://www.internalfb.com/code/fbsource/[4d888a933920]/xplat/js/react-native-github/Libraries/Core/setUpSystrace.js?lines=17-21

While the only code that we have that uses this API is actually not installed if we're profiling:

https://www.internalfb.com/code/fbsource/[4d888a933920]/xplat/js/react-native-github/Libraries/Core/setUpDeveloperTools.js?lines=20-21

This should be safe to remove then.

We have plans to add proper support for this API in the short term, so this also gets out of the way of doing that.

Additionally, installing this polyfill was the only reason why we had `setupSystrace`, so we can get rid of that too :)

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D39210813

fbshipit-source-id: a90b6237c311d2157069b41975d10b33f1f464ef
2022-09-08 11:12:06 -07:00
Rubén Norte 9e3156f4c2 Remove unused code from Systrace
Summary: Changelog: [internal]

Reviewed By: javache

Differential Revision: D39210814

fbshipit-source-id: 7129e36d114de3717cfda75b3cc6ac597f06bc4b
2022-09-08 11:12:06 -07:00
Jordan Brown 6064fd0600 Presuppress xplat and upgrade to 0.178.1
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
2022-05-26 12:59:52 -07:00
Dmytro Voronkevych 12a67425ab Adding string annotations to markEvent
Summary:
Adding string annotations support to markEvent API in ReactNative

Changelog:
[Internal][Change] - markEvent API now supports string annotations

Differential Revision: D33795346

fbshipit-source-id: 414cbd08ce5ff6045e2f35ae77059be5add3d834
2022-01-27 04:47:33 -08:00
Dmytro Voronkevych 0e39b95a45 Adding markEvent to the ReactNative QPL
Summary:
QPL in ReactNative were missing markEvent API - adding it in this diff. In the next diff I will add support for annotations.

Customer request: https://fb.workplace.com/groups/QPL.QandA/posts/1228789167531266/

Changelog:
[Internal][Change] - Adding markEvent API to QuickPerformanceLogger

Differential Revision: D33789590

fbshipit-source-id: 3e9dfde9d413943281d6aa7e85b9feeafc3bef7a
2022-01-27 04:47:33 -08:00
Andres Suarez 8bd3edec88 Update copyright headers from Facebook to Meta
Reviewed By: aaronabramov

Differential Revision: D33367752

fbshipit-source-id: 4ce94d184485e5ee0a62cf67ad2d3ba16e285c8f
2021-12-30 15:11:21 -08:00
Evan Yeung 037e346197 Add LTI annotations to xplat/js
Summary:
This diff runs the codemod to add type annotations to function parameters in preparation for Flow's local type inference (LTI) project. I ran the codemod over xplat/js and reverted any files that had flow errors in them. See the list of commands run to see the regeneration of various files.

Changelog:
[Internal][Changed] - Added type annotations

Reviewed By: yungsters

Differential Revision: D32075270

fbshipit-source-id: 6a9cd85aab120b4d9e690bac142a415525dbf298
2021-11-10 15:40:15 -08:00
Tim Yung 77ecc7ede1 JS: Format with Prettier v2.4.1 [3/n]
Summary:
Changelog:
[General][Internal]

Reviewed By: zertosh

Differential Revision: D31883447

fbshipit-source-id: cbbf85e4bf935096d242336f41bf0cc5d6f92359
2021-11-02 22:14:16 -07:00
Mark Bridges aa98978302 Adding metadata to React Native QPL points
Summary:
Changelog:
[General][Added] - Added data field to markerPoint to allow callers to add additional arbitrary string data to logged points

Reviewed By: dmitry-voronkevich

Differential Revision: D29764274

fbshipit-source-id: b0d21e3b20a5353351424afb10c950f3e8689887
2021-07-21 10:34:27 -07:00
Evan Yeung efd4dafc54 Update xplat to Flow v0.155.0
Summary:
Update flow version to v0.155.0

Changelog: [Internal]

Reviewed By: pieterv

Differential Revision: D29641055

fbshipit-source-id: 601a82fe4fa4ce548a790347a84aea4014c418d9
2021-07-14 09:13:29 -07:00
Shelly Willard 3671712df5 Deprecate markerCancel
Summary:
We have migrated most markerCancel calls to markerDrop. This diff removes the last bit (QPLBase API and bindings)

Changelog: [Internal]

Differential Revision: D26945891

fbshipit-source-id: 09b727809b316286930ced8533f9c79007350687
2021-03-22 06:46:00 -07:00
Micha Reiser 93377ff508 Remove "use strict" directive from ES Modules
Summary:
ES Modules implicitly enable strict mode. Adding the "use strict" directive is, therefore, not required.

This diff removes all "use strict" directives from ES modules.

Changelog:

[Internal]

Reviewed By: motiz88

Differential Revision: D26172715

fbshipit-source-id: 57957bcbb672c4c3e62b1db633cf425c1c9d6430
2021-02-02 11:12:56 -08:00
Micha Reiser 306edff62c Pass Systrace and Refresh as globals
Summary:
The `Systrace` and `Refresh` dependencies are injected into the `metroRequire` implementation by assigning the values to e.g. `require.Systrace = ...`.

The issue with this approach is that some `require` implementations might not support extending the `require` object or doing so results in a degraded performance. An example where this is the case is Hermes where changing the `require` object forces Hermes to opt out of the static require optimization.

This diff extends Metro so that the `Systrace` and `Refresh` implementation can either be injected by assigning to `require.Systrace` or by exposing the implementation in the global scope. It further changes the `Systrace` and `Refresh` modules to inject the instances using the global scope instead of extending `require`.

Changelog:
[Internal][Changed] - Expose Systrace and ReactRefresh as globals instead of extending require.

Reviewed By: motiz88

Differential Revision: D25693381

fbshipit-source-id: 254d66d43e7a56d3310cf1a17d5146b8d1307562
2021-01-04 07:40:19 -08:00
Rubén Norte 4409642811 Migrate large amount of modules to flow strict and strict-local
Summary:
| Group | Before | After | Change |
| Untyped | 50 | 49 | -1 |
| flow | 197 | 155 | -42 |
| flow strict-local | 226 | 185 | -41 |
| flow strict | 33 | 117 | +84

Changelog: [Changed] Improved Flow typing of multiple modules (with migrations to `flow strict` and `flow strict-local`

Reviewed By: motiz88

Differential Revision: D22549140

fbshipit-source-id: ed29415332cfce15b244ee4dea9e13d035543175
2020-07-22 09:46:16 -07:00
Emilis Baliukonis 232517a574 Implement nativePerformanceNow to improve Profiler API results (#27885)
Summary:
When experimenting with React Profiler API (https://reactjs.org/docs/profiler.html), I noticed that durations are integers without a debugger, but they are doubles with higher precision when debugger is attached. After digging into React Profiler code, I found out that it's using `performance.now()` to accumulate execution times of individual units of work. Since this method does not exist in React Native, it falls back to Javascript `Date`, leading to imprecise results.

This PR introduces `global.nativePerformanceNow` function which returns precise native time, and a very basic `performance` polyfill with `now` function.

This will greatly improve React Profiler API results, which is essential for profiling and benchmark tools.

Solves https://github.com/facebook/react-native/issues/27274

## Changelog

[General] [Added] - Implement `nativePerformanceNow` and `performance.now()`
Pull Request resolved: https://github.com/facebook/react-native/pull/27885

Test Plan:
```
const initialTime = global.performance.now();
setTimeout(() => {
  const newTime = global.performance.now();
  console.warn('duration', newTime - initialTime);
}, 1000);
```

### Android + Hermes

![Screenshot_1580198068](https://user-images.githubusercontent.com/13116854/73245757-af0d6c80-41b5-11ea-8130-dde14ebd41a3.png)

### Android + JSC

![Screenshot_1580199089](https://user-images.githubusercontent.com/13116854/73246157-92256900-41b6-11ea-87a6-ac222383200c.png)

### iOS

![Simulator Screen Shot - iPhone 8 - 2020-01-28 at 10 06 49](https://user-images.githubusercontent.com/13116854/73245871-f136ae00-41b5-11ea-9e31-b1eff5717e62.png)

Reviewed By: ejanzer

Differential Revision: D19888289

Pulled By: rickhanlonii

fbshipit-source-id: ab8152382da9aee9b4b3c76f096e45d40f55da6c
2020-03-31 10:23:51 -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
Max Kareta c38318d084 deleting marker cancel 2/N. [DO NOT LAND]
Summary: Added markerDrop API that will replace markerCancel in future.

Reviewed By: furdei

Differential Revision: D20003457

fbshipit-source-id: 38cf68455d9274761a49014d9cbb50d82f4e9437
2020-03-10 07:11:42 -07:00
Eli White e362470305 Convert easy files to flow strict-local
Summary:
This diff was generated by this script used by WWW
https://our.intern.facebook.com/intern/diffusion/WWW/browse/master/scripts/flow/upgrade_to_flow_strict_local.sh?lines=0

Changelog:
[Internal] Upgrade flow to flow strict-local

Reviewed By: zackargyle, rickhanlonii

Differential Revision: D18833630

fbshipit-source-id: e64d4e9a49a0db5e6bf70a0c489567862b578d7f
2019-12-05 16:06:46 -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
Kevin Gozali fb627dac6a TM JS: Revert to import from TurboModuleRegistry.js
Summary:
Changelog: [Internal]

Reverting the import to the previous local module style since importing from react-native seems to introduce some perf regression. We'll revisit this later in the future.

Reviewed By: yungsters

Differential Revision: D18383893

fbshipit-source-id: f11d46a4545768f39199fd6fd22fcf14905d0a74
2019-11-08 11:44:16 -08:00
Kevin Gozali dd06f85bd0 TM JS: cleaned up TurboModuleRegistry types [2]
Summary:
Changelog: [Internal]

Moved the imports for `TurboModuleRegistry` and `TurboModule` from `react-native`. This was a jscodeshift with the script: P120688078

Reviewed By: yungsters

Differential Revision: D18262538

fbshipit-source-id: 48fac15229c897408928511c5ecbb42f17ec7b42
2019-11-04 18:51:05 -08: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
Dominique d'Argent b07bbab392 Remove markerNote from JS bindings
Summary: This diff removes the unused `markerNote` method from QPL.

Differential Revision: D16331769

fbshipit-source-id: c35006af03d6129dc690cfd05bc1bc1c4a0856ba
2019-07-18 03:52:44 -07:00
James Ide a7a7970e54 Replace more Haste imports with path-based imports (#25001)
Summary:
This is another step in moving RN towards standard path-based requires, updating more code to use path-based requires. See the umbrella issue at https://github.com/facebook/react-native/issues/24316 for more detail.

## Changelog

[General] [Changed] - Replace more Haste imports with path-based imports
Pull Request resolved: https://github.com/facebook/react-native/pull/25001

Differential Revision: D15467829

Pulled By: cpojer

fbshipit-source-id: 58c364bb4c1c757689907d5ed0d0f3fac0e22f3f
2019-05-23 00:51:31 -07:00
Eric Lewis 6c573f71f1 spec for JSCSamplingProfiler (#24903)
Summary:
part of #24875.

## Changelog

[General] [Added] - Add TM spec for JSCSamplingProfiler
Pull Request resolved: https://github.com/facebook/react-native/pull/24903

Reviewed By: RSNara

Differential Revision: D15421649

Pulled By: fkgozali

fbshipit-source-id: 3d5a04a135aa7640495a0eb682b9c2300636db8e
2019-05-20 18:05:54 -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
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
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
Eli White eea4842972 Flow strictify possible files in RN core
Summary:
This was done by running the command on: https://our.intern.facebook.com/intern/wiki/Flow_Strict/

```
ag -L --ignore __snapshots__ 'flow strict$|noflow|generated|partially-generated' | ag '\.js$' | xargs ag -l 'flow' | sort > ~/temp
cat ~/temp | xargs ag -L 'flow strict' | xargs sed -i 's/flow$/flow strict/'
cat ~/temp | xargs ag -L 'flow strict$' | xargs sed -i 's/flow strict-local$/flow strict/'
until flow; do flow --json | jq -r '.errors[].message[0].path' | sort | uniq | xargs hg revert; done
```

Reviewed By: sahrens

Differential Revision: D8530207

fbshipit-source-id: c28c7ac5ed3e9b80f3d126d5f30463be8a8a744d
2018-06-20 00:47:21 -07:00
Oleksandr Sokolov 078d6e3a9d QuickPerformanceLogger.js: markerPoint + iOS/Android JS binding
Reviewed By: alexeylang

Differential Revision: D8125546

fbshipit-source-id: bb02921c7d89faba64001bff3b9aaf13f64a7f8b
2018-06-08 08:32:05 -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
Spencer Ahrens 5b2a2bee7a PureComponentDebug
Summary:
Drop in replacement for `React.PureComponent` or can replace `React.PureComponent` for all components.

Logs out what exactly triggered a re-render of a `PureComponent` to make it easier to track down why a component is re-rendering. With some other changes we'll also get component stacks in the YellowBox to make it even easier.

I thought about logging the values, but it's too easy to render something gross or cyclical like react components, so I figured people could break in the debugger to get more detail as needed.

Special flow type should cause errors if people try to commit any usage of this - it should only be used for local debugging.

Reviewed By: yungsters

Differential Revision: D7826325

fbshipit-source-id: fdf7910336452ac1c7acd328c04d441dfb186b59
2018-05-01 19:47:52 -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
Tim Yung 3e141cb6c9 RN: Delete Systrace.swizzleJSON
Reviewed By: TheSavior

Differential Revision: D7207460

fbshipit-source-id: 14b1174d6a5c75e1acba7272376d1c462bc13cb6
2018-03-08 23:43:26 -08:00
Tim Yung a8c4b630fc RN: Delete Systrace for RelayClassic
Reviewed By: TheSavior

Differential Revision: D7207462

fbshipit-source-id: 6dd5c5fd22c0a5a7d77331d6adf7b362c3d3e037
2018-03-08 23:43:26 -08:00
Tim Yung 118521c20b RN: Prettify Systrace
Reviewed By: TheSavior

Differential Revision: D7207468

fbshipit-source-id: 05ae6e003ae3e55bc2d3a905f41c28f7041dd7f0
2018-03-08 23:43:26 -08:00
Tim Yung 973ef9728c RN: Remove React Stack Systrace Logic
Reviewed By: sophiebits

Differential Revision: D7027263

fbshipit-source-id: f4eb3fab402eda337f464e4ebb0771202a9b93f2
2018-02-19 22:32:36 -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