Commit Graph

2632 Commits

Author SHA1 Message Date
Michel Weststrate
bc36c1607d Apply idle optimizations throughout code base
Summary:
See explanation in parent diff, make sure the idler is used efficiently, instead of wasting a lot of CPU creating a new callstack every time `idle` is called.

Also fixed that cancelled idlers could result in an _uncaught_ exception

Reviewed By: nikoant

Differential Revision: D19158593

fbshipit-source-id: 0be505a74c374e0ca6ee0e79b1f1e98ac9b80467
2019-12-19 04:27:27 -08:00
Michel Weststrate
0a5df48639 Introduce a Test Idler to have a remotely controlled idler
Summary:
To test things that depend on `Idler`, we would so far need to depend on timing in the unit tests, which is very error prone. So introduced a `TestIdler` as well to make sure we can create an idler we can control remotely (as demonstrated in the unit test)

Note that idler smells like generator functions all over the place, so maybe I'll take a stab later to see if we can replace idlers with generators, which gives a much clearer control flow imho.

Reviewed By: nikoant

Differential Revision: D19158369

fbshipit-source-id: 605d120860ecb02883442524df6f876e050ff092
2019-12-19 02:38:08 -08:00
Michel Weststrate
f4fdeef692 Make it possible to override GK's in unit tests
Summary: Previously it was not possible to run unit tests to test logic that requires GK's to be enabled. This fixes that

Reviewed By: passy

Differential Revision: D19158368

fbshipit-source-id: b89691bdd2f975a3b4be343bd966ed77b2ad3763
2019-12-19 02:38:07 -08:00
Michel Weststrate
4e76256d6d Avoid confusion variable reassignments in transformer
Summary:
While trying to find a simple fix for the broken source maps when unit testing (see previous diff), I noticed that control flow in the transformer was unnecessarily complicated.

This doesn't fix the sourcemap issue btw

Reviewed By: passy

Differential Revision: D19158367

fbshipit-source-id: 7dfe4b28eabd4534a32dcb655e534d0f418f0db4
2019-12-19 02:38:07 -08:00
Vladyslav Stepanov
09184a999f Fix various errors and warnings
Summary: Fix various errors that Flipper was complaining about in Watch plugin

Reviewed By: ankursadhoo

Differential Revision: D19168777

fbshipit-source-id: eefb98818ddb0da78de1daf2d67045cb90cd90aa
2019-12-18 17:46:42 -08:00
Chaiwat Ekkaewnumchai
a61ae2ec98 Update jest-fetch-mock to the latest version
Summary: per title

Reviewed By: mweststrate

Differential Revision: D19158693

fbshipit-source-id: 6913c2e1453f414746dae1fa5ba4a71c5fb806e0
2019-12-18 07:40:31 -08:00
Chaiwat Ekkaewnumchai
9b84de0c0a Ignore Non-existed Key in Searchable to Prevent Flipper from Crashing
Summary: per title

Reviewed By: mweststrate

Differential Revision: D19143735

fbshipit-source-id: 67cb65a98760a82fd71073621bcbca819ebb1e5f
2019-12-18 07:30:14 -08:00
Anton Nikolaev
b716b50729 Safer workaround for Android SDK detection with Java 9/10
Summary: Safer workaround for Android SDK detection with Java 9/10

Reviewed By: mweststrate

Differential Revision: D19158381

fbshipit-source-id: 8c4ce456543712204423f14abe8a1840308c8bf9
2019-12-18 07:24:41 -08:00
Chaiwat Ekkaewnumchai
db721e94a6 Clear Search Input After Entering It
Summary: per title

Reviewed By: nikoant

Differential Revision: D19143025

fbshipit-source-id: b371a55584b255b8f0a704eaa46e6a3eebad4a79
2019-12-18 05:00:46 -08:00
greenkeeper[bot]
e705024010 Greenkeeper/@types/node 12.12.20 (#710)
Summary:
Fix https://github.com/facebook/flipper/issues/686
Pull Request resolved: https://github.com/facebook/flipper/pull/710

Reviewed By: nikoant

Differential Revision: D19157830

Pulled By: passy

fbshipit-source-id: 705be1906bd29362a531d821f0154569850ec6fa
2019-12-18 04:27:39 -08:00
greenkeeper[bot]
2ee251022b Update flow-bin to the latest version � (#700)
Summary:
## The devDependency [flow-bin](https://github.com/flowtype/flow-bin) was updated from `0.113.0` to `0.114.0`.
This version is **not covered** by your **current version range**.

If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.

 ---

**Publisher:** [mroch](https://www.npmjs.com/~mroch)
**License:** MIT

[Find out more about this release](https://github.com/flowtype/flow-bin).

 ---

<details>
  <summary>FAQ and help</summary>

  There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html). If those don’t help, you can always [ask the humans behind Greenkeeper](https://github.com/greenkeeperio/greenkeeper/issues/new).
</details>

 ---

Your [Greenkeeper](https://greenkeeper.io) bot 🌴
Pull Request resolved: https://github.com/facebook/flipper/pull/700

Reviewed By: mweststrate

Differential Revision: D19087103

Pulled By: passy

fbshipit-source-id: 1e9c22a5a7b8e991b68596256900bfa69f974ee3
2019-12-18 02:18:31 -08:00
Pascal Hartig
521b6222cd Broaden ws range
Summary:
I believe we set this to a specific version because of an earlier security
warning from GitHub, but that's no longer needed and just creates
Greenkeeper spam.

Reviewed By: nikoant

Differential Revision: D19088846

fbshipit-source-id: f2c886f296d2ba87c40c3605633aeb73b262ca59
2019-12-18 02:14:03 -08:00
Anton Nikolaev
5eaa87c676 Rollback workaround for Android SDK detection
Summary: Rolling back workaround for Android SDK detection as it breaks detection with Java 8 while fixing Java 9+

Reviewed By: cekkaewnumchai

Differential Revision: D19146945

fbshipit-source-id: 2bea318d5f5cfafdf213d2ec73e837f6e86c9f33
2019-12-17 18:26:04 -08:00
Michel Weststrate
91d5b95341 make it easier to test plugin logic
Summary:
This diff will make it easier to test a plugin in a "fully loaded" Flipper state. This makes it possible to test all the wiring of flipper, rather than the individual reducers.

This is in preparation of processing the message queue async.

Reviewed By: passy

Differential Revision: D19140879

fbshipit-source-id: 5a333abe9c7a4d0c33d1d06a105cd094cb8fc19f
2019-12-17 06:07:35 -08:00
Anton Nikolaev
5d17eede85 Workaround for Anrdoid SDK detection not working with Java 9+ installed
Summary: Workaround for Anrdoid SDK detection not working with Java 9+ installed

Reviewed By: mweststrate

Differential Revision: D19094906

fbshipit-source-id: a7c8c9c8403d25ecc9b2d95113718ddf1821a349
2019-12-16 16:40:09 -08:00
Anton Nikolaev
d32774f439 Skip Android health-checks when the "Android Developer" option is disabled in Flipper settings
Summary:
Skip Android health-checks when the "Android Developer" option is disabled in Flipper settings.

Also made some refactoring to use immer for healthcheck reducer.

Reviewed By: mweststrate

Differential Revision: D19088322

fbshipit-source-id: 801d874b6e7e5af80802b4bf4313d98f1cee13f6
2019-12-16 16:40:08 -08:00
Denis Nedelyaev
be53990613 Add setting for skipping fbsource version check
Summary: Added a setting "Match local fbsource chekout", which inverserly corresponds to the `ignore_local_pin` setting in `flipper-launcher.toml`.

Reviewed By: passy

Differential Revision: D19030456

fbshipit-source-id: deaaf4e873a00bbc4e8bd3034353cf580df95a36
2019-12-16 07:01:01 -08:00
greenkeeper[bot]
4db9388984 Greenkeeper/promisify child process 3.1.3 (#697)
Summary:
Fixes the breakage that came with 3.1.2. Closes https://github.com/facebook/flipper/issues/694.
Pull Request resolved: https://github.com/facebook/flipper/pull/697

Reviewed By: mweststrate

Differential Revision: D19019119

Pulled By: passy

fbshipit-source-id: 59619ca5efb0c256a1e56349d5c7fa57dcc06e38
2019-12-16 04:53:09 -08:00
Pascal Hartig
5a3f107a50 Remove child-process-es6-promise
Summary: Replacing this with promisify-child-process, which is better.

Reviewed By: mweststrate

Differential Revision: D18954702

fbshipit-source-id: 2dad756a2cd4dd21b2efc8b1780d589607d6ff05
2019-12-16 03:57:29 -08:00
Pascal Hartig
0d7fd11048 Flipper Bump: v0.30.2-SNAPSHOT
Summary: Back to snapshots

Reviewed By: priteshrnandgaonkar

Differential Revision: D19030536

fbshipit-source-id: 25ee980b467b30cfb8e6d9d8c940fd43b65fe6ae
2019-12-16 03:17:16 -08:00
Pascal Hartig
21be861894 Flipper Release: v0.30.1
Summary: New release built against Litho 0.33.

Reviewed By: priteshrnandgaonkar

Differential Revision: D19030537

fbshipit-source-id: a14b04decf3023e9ee78ef2a894061d8b04d232e
2019-12-13 11:33:36 -08:00
Michel Weststrate
edd894258c Favorite plugins are now stored per app rather than globally
Summary:
This diff is a refinement of D18780965, which fixed plugin preferences to be stored per device. Instead of storing plugin preferences globally, we now store them per app, so that every app can have their own favorites, which are shared regardless the device

Note that the current favorite selection will be lost.

Reviewed By: nikoant

Differential Revision: D19018169

fbshipit-source-id: acfa05ece8516840bb91aee4059886365b346582
2019-12-13 10:07:13 -08:00
Michel Weststrate
02ad5c64aa Fix last startup warnings
Summary: There were a few warnings printed when starting Flipper. This fixes the last of them!

Reviewed By: nikoant

Differential Revision: D19011385

fbshipit-source-id: 15bc46c4a67e8c8fd3c8b5d96dc67e61911a7e53
2019-12-13 07:11:43 -08:00
Michel Weststrate
cf9f4e0c5b Document how to test JavaScript plugins
Summary: It's not much, but at least more than nothing :)

Reviewed By: nikoant

Differential Revision: D18930725

fbshipit-source-id: b1e5fa203b0020de7b5f16d040808cbb247b8dd4
2019-12-13 07:11:43 -08:00
Michel Weststrate
8da2c8868b Expose Immer's produce from Flipper
Summary: Diff preparing for optimizing GraphQL (and other) plugins, and simplifying writing reducers by others

Reviewed By: nikoant

Differential Revision: D18930858

fbshipit-source-id: 91d176d77543978d65ea50635d4ed380690b1fa2
2019-12-13 07:11:43 -08:00
Michel Weststrate
334e0dd2d9 Generated unit test to verify regression and performance
Summary:
This is a preparation diff to address performance issues in the GraphQL plugin, by making sure we can detect functional regressions and measure performance changes.

For reference, current performance impact: `Reducer took 6338ms. to process 42 events` on my machine with this data snapshot (~10sec of recorinding graphQL events on FB4a)

See D18907455 for some background.

Reviewed By: passy

Differential Revision: D18930652

fbshipit-source-id: 58c832f21ae60954bbd7a60c088479aef29ab874
2019-12-13 07:11:42 -08:00
Anton Nikolaev
1ddf73caf3 Github build is broken because of Doctor module resolution issue
Summary: Fixed doctor module resolution on github by adding doctor src folder into the metro bundler blacklist

Reviewed By: cekkaewnumchai, mweststrate

Differential Revision: D19020038

fbshipit-source-id: a6ab95383b5016fd5e2180d72883a42c63745ec9
2019-12-13 07:08:28 -08:00
Anton Nikolaev
3fefd9de15 Fix module resolution for flipper-doctor and return it to sonar directory and effectively to GitHub
Summary: Fix module resolution for flipper-doctor and return it to sonar directory and effectively to GitHub

Reviewed By: mweststrate

Differential Revision: D18963720

fbshipit-source-id: 61ea78ecbb154de79c7a2d348f347c64325e794c
2019-12-13 04:06:02 -08:00
Alexander Putilin
c7af0b53e6 KaiOS device plugin for recording memory allocations
Summary:
This adds basic plugin for recording memory allocations.
{F224005997}

Reviewed By: passy

Differential Revision: D18837209

fbshipit-source-id: aa29680b3a44c51135b760fe4ee76edc6d0ec109
2019-12-12 08:12:52 -08:00
greenkeeper[bot]
cf512e5b83 Greenkeeper/pkg 4.4.1 (#691)
Summary:
Fix https://github.com/facebook/flipper/issues/681
Pull Request resolved: https://github.com/facebook/flipper/pull/691

Reviewed By: mweststrate

Differential Revision: D18929820

Pulled By: passy

fbshipit-source-id: 9e8b187ca257ab79326618029d5c0d3eba686a64
2019-12-12 08:05:01 -08:00
greenkeeper[bot]
7815618d84 chore(package): update websocket to version 1.0.31 (#693)
Summary:
Fix https://github.com/facebook/flipper/issues/677
Pull Request resolved: https://github.com/facebook/flipper/pull/693

Reviewed By: mweststrate

Differential Revision: D18929823

Pulled By: passy

fbshipit-source-id: 41c459eca8a732eb60f2e637687c4f8d69ec009c
2019-12-12 07:57:16 -08:00
Pascal Hartig
e3235f8085 Bump Litho version
Summary: colriot put out a new release last night.

Reviewed By: cekkaewnumchai

Differential Revision: D18953863

fbshipit-source-id: 32c4fe6a4aa66bb98606a78927e46b55e2196e33
2019-12-12 07:13:47 -08:00
Anton Nikolaev
c030cbe204 No Icons on Windows with locale other than en-US
Reviewed By: mweststrate

Differential Revision: D18953063

fbshipit-source-id: d21116b11189851dff271fcfa7334a51b13c693f
2019-12-12 04:01:26 -08:00
Uma Sankar
559285f5f9 Producing new state when any change to preferences happen to address #470 (#623)
Summary:
Fixed issue https://github.com/facebook/flipper/issues/470

## Changelog

Producing new state when preferences gets updated in SharedPreferences plugin
Pull Request resolved: https://github.com/facebook/flipper/pull/623

Reviewed By: mweststrate

Differential Revision: D18929828

Pulled By: passy

fbshipit-source-id: 8e9e61f90838fd3676aa52c4c6117b3f452aa7c0
2019-12-11 10:18:41 -08:00
greenkeeper[bot]
838fb7b274 Greenkeeper/eslint plugin import 2.19.0 (#689)
Summary:
https://github.com/facebook/flipper/issues/683
Pull Request resolved: https://github.com/facebook/flipper/pull/689

Reviewed By: mweststrate

Differential Revision: D18929813

Pulled By: passy

fbshipit-source-id: 2afd26bc820c9703e92f615e5620884aaaf2266b
2019-12-11 10:08:47 -08:00
greenkeeper[bot]
021301e5aa Greenkeeper/website/monorepo.babel7 20191208003358 (#692)
Summary:
Fix https://github.com/facebook/flipper/issues/680
Pull Request resolved: https://github.com/facebook/flipper/pull/692

Reviewed By: mweststrate

Differential Revision: D18929821

Pulled By: passy

fbshipit-source-id: 6de0f6c505eb998de25035686e7a52ed8fdb4d06
2019-12-11 09:45:48 -08:00
Anton Nikolaev
c0f902f81a Upgrade to emotion v10
Summary: React 16 is not compatible with react-emotion 9 (it prints warnings, see also https://github.com/emotion-js/emotion/issues/644). So we should upgrade to 10.

Reviewed By: mweststrate

Differential Revision: D18905889

fbshipit-source-id: c00d2dbbadb1c08544632cb9bfcd63f2b1818a25
2019-12-11 09:43:24 -08:00
Pritesh Nandgaonkar
c3dfcbe601 Show the plugins from the redux store only belonging to the selected app
Summary: It fixes the bug, where currently we show all active persistent plugins for the export functionality irrespective of the fact that the plugin is active for the selected client. With this diff we will only show active persistent plugins for the selected client.

Reviewed By: mweststrate

Differential Revision: D18890247

fbshipit-source-id: e567da0ccf04e051ca0eabb497a6bd72cc8a0d76
2019-12-11 06:27:22 -08:00
Michel Weststrate
5429d1f235 Make it possible to generate regression tests for Flipper plugins
Summary:
This Pull request makes it possible to automatically generate regression tests for plugins. The idea here is to record all incoming states for a specific plugin, the start state of the plugin, and the enstate of the plugin.

By replaying the same events in a test, the same plugin should result in the same end state. This will make it easy to test regressions and refactorings on real life scenarios. Execution time is recorded as well.

The API's are exposed as

- `flipperStartPluginRecording()`
- `flipperStopPluginRecording()`

This process generates both a data snapshot and unit test.

Reviewed By: passy

Differential Revision: D18907455

fbshipit-source-id: 923f814f534ccfa6aa2ff2bfa2f80bee41a1c182
2019-12-11 05:53:22 -08:00
greenkeeper[bot]
99547168fc Update live-plugin-manager to the latest version � (#679)
Summary:
## The dependency [live-plugin-manager](https://github.com/davideicardi/live-plugin-manager) was updated from `0.13.2` to `0.14.0`.
This version is **not covered** by your **current version range**.

If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.

 ---

**Publisher:** [davideicardi](https://www.npmjs.com/~davideicardi)
**License:** ISC

<details>
<summary>Release Notes for v0.14.0</summary>

<ul>
<li>compatibility with recent node versions</li>
</ul>
</details>

<details>
<summary>Commits</summary>
<p>The new version differs by 3 commits.</p>
<ul>
<li><a href="5fb7e8a1ed"><code>5fb7e8a</code></a> <code>0.14.0</code></li>
<li><a href="d141cbfd4d"><code>d141cbf</code></a> <code>fix: node v12 support+update dependencies</code></li>
<li><a href="62ff0ef291"><code>62ff0ef</code></a> <code>Enable esModuleInterop (https://github.com/facebook/flipper/issues/16)</code></li>
</ul>
<p>See the <a href="bda77f970a...5fb7e8a1ed">full diff</a></p>
</details>

 ---

<details>
  <summary>FAQ and help</summary>

  There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html). If those don’t help, you can always [ask the humans behind Greenkeeper](https://github.com/greenkeeperio/greenkeeper/issues/new).
</details>

 ---

Your [Greenkeeper](https://greenkeeper.io) bot 🌴
Pull Request resolved: https://github.com/facebook/flipper/pull/679

Reviewed By: mweststrate

Differential Revision: D18910892

Pulled By: passy

fbshipit-source-id: a7b7e3b1fed0c2ab3bc6dd6ba3b6b14c5cddd51c
2019-12-11 05:50:42 -08:00
greenkeeper[bot]
0febcd44ac chore(package): update uglify-js to version 3.7.2 (#690)
Summary:
Fix https://github.com/facebook/flipper/issues/682
Pull Request resolved: https://github.com/facebook/flipper/pull/690

Reviewed By: mweststrate

Differential Revision: D18929815

Pulled By: passy

fbshipit-source-id: 3e792b14e956702cd36d169dea0fc5048ed90322
2019-12-11 05:27:59 -08:00
Michel Weststrate
16b2addbc2 Enable null coalescing operator
Summary: Enable using the `??` operator in plugin code

Reviewed By: passy

Differential Revision: D18906291

fbshipit-source-id: b0a9b29ebb2896ede10540ba2e4cfd937fb99c7d
2019-12-11 03:46:48 -08:00
Michel Weststrate
382330bfaf Convert to TypeScript
Summary: Before looking into performance bottlenecks, I thought it wise to upgrade to TypeScript as that is where all plugins are heading

Reviewed By: jknoxville

Differential Revision: D18829689

fbshipit-source-id: 4c515f240d742f77e89f3cbdff500c69afb3ac06
2019-12-11 03:46:48 -08:00
Pritesh Nandgaonkar
938f9542ee Fix the issue where perf events were not getting logged
Summary: I noticed a bug where the export data perf events were not logged. The issue was that, it used the `Logger.getTrackTimeSince` method which used the `performance` from `perf-hooks` and not an ordinary performance object available in the global scope. So just importing performance from perf-hooks solved the issue.

Reviewed By: mweststrate

Differential Revision: D18887666

fbshipit-source-id: 66c24f47b95b25d2f3703c16c70cbe8b35fe0ec3
2019-12-10 08:21:28 -08:00
Pritesh Nandgaonkar
41a5fa2ba0 Use cached artefacts for iOS travis tests (#685)
Summary:
Updates travis iOS tests to use already built artefacts by not clean building it.
## Changelog
Pull Request resolved: https://github.com/facebook/flipper/pull/685

Test Plan: Travis Tests

Reviewed By: passy, mweststrate

Differential Revision: D18890270

Pulled By: priteshrnandgaonkar

fbshipit-source-id: 0b686b82e8418d1135667321d8e4580e4e3fc4fc
2019-12-10 07:45:42 -08:00
Nicolas Charpentier
201203ab84 Refresh Getting Started with the latest React Native integration (#676)
Summary:
Sync the Getting Started section about React Native integration with the latest changes in https://github.com/facebook/react-native/pull/27426.

## Changelog

Refresh Getting Started with the latest React Native integration
Pull Request resolved: https://github.com/facebook/flipper/pull/676

Test Plan: Tested in RN's template.

Reviewed By: mweststrate

Differential Revision: D18853584

Pulled By: passy

fbshipit-source-id: d001046106743b68d2f08b084c7618d8f768dea1
2019-12-10 06:07:03 -08:00
Mateo Silguero
c4730c3e49 Parse all values on json fields (#678)
Summary:
I want to get a better visualisation of the databases values from a device, like the localStorage from ReactNative.

## Changelog

Iterate on the object value to parse all values from a json
Pull Request resolved: https://github.com/facebook/flipper/pull/678

Test Plan:
before:
<img width="1185" alt="Captura de Pantalla 2019-12-06 a la(s) 19 57 13" src="https://user-images.githubusercontent.com/25598400/70362212-e4a37280-1862-11ea-8b8b-a96edfece5c9.png">

after:
<img width="1185" alt="Captura de Pantalla 2019-12-06 a la(s) 19 55 52" src="https://user-images.githubusercontent.com/25598400/70362211-e4a37280-1862-11ea-8d16-00691c0f21c4.png">

Reviewed By: nikoant

Differential Revision: D18874887

Pulled By: passy

fbshipit-source-id: 679519fe2746a698e41ba015fd811a342c96c4fd
2019-12-10 06:04:19 -08:00
Anton Nikolaev
f9c89c09ae Null ref exception during build on Windows VM
Summary: https://pxl.cl/STmd

Reviewed By: passy

Differential Revision: D18883703

fbshipit-source-id: ff4ee954ee253d46683f162f26c0de734c6acbb3
2019-12-09 10:01:32 -08:00
Pritesh Nandgaonkar
0c13943139 Allow user to copy the row attributes in the layour inspector
Summary: Allows user to copy the row attributes.

Reviewed By: passy

Differential Revision: D18811929

fbshipit-source-id: 62335a7c0b5f1557704c0d8d9ea258b4c7cbfdcf
2019-12-09 05:10:06 -08:00
Pascal Hartig
3696697c6b Increase xcodebuild timeout (#684)
Summary:
Until we have a better solution
Pull Request resolved: https://github.com/facebook/flipper/pull/684

Reviewed By: nikoant

Differential Revision: D18881940

Pulled By: passy

fbshipit-source-id: 44960f6602da8e50c5c9cb4fc35e5009fb21e9d5
2019-12-09 05:01:17 -08:00