Summary: Currently Flipper shows empty Changelog with only "pre-history" entry. This is because of path in generation script is wrong now. Flipper shows Changelog.md from desktop/static, so generated entries should be added there rather than to Changelog.md in the root.
Reviewed By: passy
Differential Revision: D21016884
fbshipit-source-id: 8709a2556374ec70bc665eaf0729bb85fd0d913f
Summary:
This diff enables optional [Fast Refresh](https://reactnative.dev/docs/fast-refresh) for Flipper in dev mode. It can be opted-in using additional argument "--fast-refresh": `yarn start --fast-refresh`. I've copy-pasted the most part of implementation from React Native with some minor changes.
I made this optional for now as it works not ideally. In most cases which I checked it works fine, however for some files it falls back to full refresh (e.g. when `desktop/plugins/network/index.tsx` changed) and sometimes doesn't refresh content even after change detected and re-compiled (e.g. when `src/ui/components/searchable/Searchable.tsx` is changed, Network plugin which is dependent on it is not refreshed automatically).
State from redux is restored after fast refresh, but local state in class-based components is cleared. For function-based components local state is also stored, so it's an additional point to make plugins components functional :)
Also, for now there is no UI for Fast Refresh (loading indicator etc), information is just logged to console.
Changelog: Experimental support for Fast Refresh in dev mode can be enabled by `yarn start --fast-refresh`.
Reviewed By: jknoxville
Differential Revision: D20993073
fbshipit-source-id: 65632788df105a85fac0b924b7808120900b349e
Summary: Auto-format for js files was broken on my machine. It seems that there is a conflict between eslint and prettier and the latter is trying to format files after eslint using different rules for that. Option to disable prettier formatting for already formatted files fixed this issue for me.
Reviewed By: jknoxville
Differential Revision: D20994053
fbshipit-source-id: 6e90be7f58f2891ce2143bca8c3d76118b9cfba3
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/998
After this diff all the default plugins (which are distributed with Flipper) will be included into the main app bundle instead of bundling each of them separately and then loading from file system. This is done by auto-generating plugins index in build-time and importing it from Flipper app bundle, so Metro can follow these imports and bundle all the plugins to the app bundle.
This provides several benefits:
1) reduced Flipper bundle size (~10% reduction of zipped Flipper archive), because Metro bundles each of re-used dependencies only once instead of bundling them for each plugin where such dependency used.
2) Faster Flipper startup because of reduced bundle and the fact that we don't need to load each plugin bundle from disk - just need to load the single bundle where everything is already included.
3) Metro dev server for plugins works in the same way as for Flipper app itself, e.g. simple refresh automatically recompiles bundled plugins too if there are changes. This also potentially should allow us to enable "fast refresh" for quicker iterations while developing plugins.
4) Faster build ("yarn build --mac" is 2 times faster on my machine after this change)
Potential downsides:
1) Currently all the plugins are identically loaded from disk. After this change some of plugins will be bundled, and some of them (third-party) will be loaded from disk.
2) In future when it will be possible to publish new versions of default plugins separately, installing new version of such plugin (e.g. with some urgent fix) will mean the "default" pre-built version will still be bundled (we cannot "unbundle" it :)), but we'll skip it and instead load new version from disk.
Changelog: Internals: include default plugins into the main bundle instead producing separate bundles for them.
Reviewed By: passy
Differential Revision: D20864002
fbshipit-source-id: 2968f3b786cdd1767d6223996090143d03894b92
Summary:
Refactored plugins compilation script by splitting it into 3 scripts: 1) search plugins 2) compile plugins 3) watch plugins.
No functional changes in this review, it's just preparation for further changes.
Reviewed By: passy
Differential Revision: D20860443
fbshipit-source-id: 02900430199875574b992e597d09b82d0d7f32ef
Summary:
Treat only packages with "flipper-plugin" keyword as Flipper plugins. This will allow to place lib packages re-used by different plugins into "plugins" folder.
Changelog: Internals: it is now possible to add modules for re-use by different plugins into `desktop/plugins` folder.
Reviewed By: mweststrate
Differential Revision: D20898133
fbshipit-source-id: 8934870350ce42af3dc8060d1494025519ed307e
Summary: We cannot just add internal plugins as workspaces to the root package.json in "sonar/desktop" as they are not open-sourced, so public build will break. Instead, I have created root package.json for internal plugins and added all internal plugins as workspaces there. This means all these plugins will use the single root yarn.lock and installation of their dependencies will be faster. This also means that plugins can declare dependencies to other local packages included into workspaces and they will be symlinked automatically.
Reviewed By: mweststrate
Differential Revision: D20806237
fbshipit-source-id: f8b3327166963dec7da8ac74079682aebe4527e1
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/969
Added all public plugins as workspaces to the root package.json. This means all these plugins will use the single root yarn.lock and installation of their dependencies will be faster. This also means that plugins can declare dependencies to other local packages included into workspaces and they will be symlinked automatically.
Changelog: Internals: plugins added as "yarn workspaces" into the root package.json to simplify dependency management between them
Reviewed By: mweststrate
Differential Revision: D20805231
fbshipit-source-id: e85c62d3195d1ea3c5c60def6ca12318a2b53466
Summary: Adding id field for the currently logged in user in the store's state
Reviewed By: passy
Differential Revision: D20928642
fbshipit-source-id: eff5373bd88ed8fd228193b47649f586cf20b585
Summary: As per the title it adds the CK support to the Flipper's support form.
Reviewed By: jknoxville
Differential Revision: D20943408
fbshipit-source-id: bc8f0ac6a4974fe8258e91d7ac9437931c4d4abd
Summary: Allow optionally to provide the device title to select a plugin in. Currently, there's only support for `flipper://<app>/<plugin_id>`. This allows to add a `?device=<specifier>`.
Reviewed By: mweststrate
Differential Revision: D20920587
fbshipit-source-id: e7df4b510f1adfa9c2c9d072f6aebca1edb89cc0
Summary: When an android package is not an application, the `run-as` command will fail. In this case, the package might be an operating system service package. In this case, it may be possible for the user to run adb as root. Note that Flipper does not restart adbd via `adb root` on behalf of the user; the command is simply retried without `run-as`.
Reviewed By: jknoxville
Differential Revision: D20920582
fbshipit-source-id: 8db86084c3c3a61d8322edb1e34fdfdf48d0412d
Summary:
Added a graph to show how much data is sent to plugins. The tooltip shows a sorted overview of the amount of data.
Will put up a GK so that plugin devs can get this data also more easily
Reviewed By: jknoxville
Differential Revision: D20919321
fbshipit-source-id: f2b78b21ef34551e0ed562b009589d2a5dba9ff3
Summary:
Measure how many byte we receive per plugin, and add this to the plugin stats that are collected
Will add a graph to the flipper dashboard, and probably a small visualization in a next diff as well.
Reviewed By: priteshrnandgaonkar
Differential Revision: D20917583
fbshipit-source-id: bb341531ecf8492080af82c56e73c0ec608f7b36
Summary:
***
☝️ **Important announcement:** Greenkeeper will be saying goodbye 👋 and passing the torch to Snyk on June 3rd, 2020! [Find out how to migrate to Snyk and more at greenkeeper.io](https://greenkeeper.io)
***
## The dependency [electron-devtools-installer](https://github.com/MarshallOfSound/electron-devtools-installer) was updated from `2.2.4` to `3.0.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:** [marshallofsound](https://www.npmjs.com/~marshallofsound)
**License:** MIT
<details>
<summary>Release Notes for v3.0.0</summary>
<h1><a href="https://urls.greenkeeper.io/MarshallOfSound/electron-devtools-installer/compare/v2.2.4...v3.0.0">3.0.0</a> (2020-04-07)</h1>
<h3>Bug Fixes</h3>
<ul>
<li>make extension store directory recursively (<a href="82479523e2">8247952</a>)</li>
<li>only allow installs from the main process (<a href="fc1d8781b6">fc1d878</a>)</li>
<li>support dynamic application path (<a href="https://urls.greenkeeper.io/MarshallOfSound/electron-devtools-installer/issues/88" data-hovercard-type="pull_request" data-hovercard-url="/MarshallOfSound/electron-devtools-installer/pull/88/hovercard">https://github.com/facebook/flipper/issues/88</a>) (<a href="e9471f9042">e9471f9</a>)</li>
<li>use ES6 standard imports for electron modules. Closes <a href="https://urls.greenkeeper.io/MarshallOfSound/electron-devtools-installer/issues/116" data-hovercard-type="pull_request" data-hovercard-url="/MarshallOfSound/electron-devtools-installer/pull/116/hovercard">https://github.com/facebook/flipper/issues/116</a> (<a href="dc0f6e4391">dc0f6e4</a>)</li>
</ul>
<h3>Features</h3>
<ul>
<li><strong>test:</strong> add mobx to unit tests (<a href="https://urls.greenkeeper.io/MarshallOfSound/electron-devtools-installer/issues/95" data-hovercard-type="pull_request" data-hovercard-url="/MarshallOfSound/electron-devtools-installer/pull/95/hovercard">https://github.com/facebook/flipper/issues/95</a>) (<a href="6d4f699877">6d4f699</a>)</li>
<li>Only allow installs from the main process (<a href="d692149da5">d692149</a>)</li>
</ul>
<h3>BREAKING CHANGES</h3>
<ul>
<li>Only allow installs from the main process</li>
</ul>
<p>The remote is being deprecated and as such we should not rely on it for what is a buggy and very small usability tweak.</p>
</details>
<details>
<summary>Commits</summary>
<p>The new version differs by 22 commits.</p>
<ul>
<li><a href="d692149da5"><code>d692149</code></a> <code>feat: Only allow installs from the main process</code></li>
<li><a href="0f3ebfc9d3"><code>0f3ebfc</code></a> <code>chore: update NPM readme badge</code></li>
<li><a href="ba9648c2b9"><code>ba9648c</code></a> <code>chore: update README badges</code></li>
<li><a href="776912cf7d"><code>776912c</code></a> <code>BREAKING CHANGE: Only allow installs from the main process</code></li>
<li><a href="ae075d13bc"><code>ae075d1</code></a> <code>build: update CFA plugin</code></li>
<li><a href="0dde83b4a7"><code>0dde83b</code></a> <code>build: use latest v10 node for release CI</code></li>
<li><a href="cc8700c784"><code>cc8700c</code></a> <code>build: update version number for CFA</code></li>
<li><a href="9628782f2f"><code>9628782</code></a> <code>build: add CFA</code></li>
<li><a href="7d5f157939"><code>7d5f157</code></a> <code>docs: clean up README</code></li>
<li><a href="6d4f699877"><code>6d4f699</code></a> <code>feat(test): add mobx to unit tests (https://github.com/facebook/flipper/issues/95)</code></li>
<li><a href="dc0f6e4391"><code>dc0f6e4</code></a> <code>fix: use ES6 standard imports for electron modules. Closes https://github.com/facebook/flipper/issues/116</code></li>
<li><a href="82479523e2"><code>8247952</code></a> <code>fix: make extension store directory recursively</code></li>
<li><a href="fc1d8781b6"><code>fc1d878</code></a> <code>fix: only allow installs from the main process</code></li>
<li><a href="a5dfe4c1b1"><code>a5dfe4c</code></a> <code>build: rename prepublish to prepare, closes https://github.com/facebook/flipper/issues/120</code></li>
<li><a href="a5242e1fd8"><code>a5242e1</code></a> <code>build: update dependencies</code></li>
</ul>
<p>There are 22 commits in total.</p>
<p>See the <a href="0b07982a06...d692149da5">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/988
Test Plan:
{F233368502}
Tested in Flipper
Reviewed By: cekkaewnumchai
Differential Revision: D20889307
Pulled By: passy
fbshipit-source-id: 63ed886cceefe34dc7d4212f25d05c5e13f7dab8
Summary:
* Fixed issue where the test wouldn't be reliable if it fired to quickly since the process has started
* Increased all test timings with a factor 10, to make the test less sensitive to system load
Reviewed By: passy
Differential Revision: D20914978
fbshipit-source-id: a3870e6374e61cf9ec1b11da529077876ef85bf8
Summary:
This adds another field to the exit data to record whether we had a clean exit where the app was closed as it should.
Note that doing a reload inside Flipper will be recorded as an unclean exit.
Reviewed By: passy
Differential Revision: D20915481
fbshipit-source-id: 240192d7a69bf620bfaa316e3e5cb0f45d6a34cc
Summary:
This means that Linux builds have a `flipper` executable
in the directory again.
Reviewed By: cekkaewnumchai
Differential Revision: D20915156
fbshipit-source-id: 9f792bcffef41168fe5a3e43c29b59f37a4cc673
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/992
Right now our sample app's fail to build when built against "Generic iOS Device", but it built successfully when built against simulator. Reason being all the simulators are 64 bit's, but when built against generic iOS device type, it didn't work for all the architecture as our Flipper and Flipper-Folly pod had 64bit architecture in their settings. But as soon as you build Flipper-Folly for standard architecture, RCU.cpp fails to build as that file is incompatible for lower standard architecture. Got the following error
{F233400670}
But, we do not need that file of Folly to build Flipper and RSocket. Thus in the podfile I have excluded it from its source. Also along with it I upgraded both Folly and RSocket to the latest releases.
Even with this changes i got one more problem, our openssl static library is not bitcode enabled for arm architecture, this error popped up when built against "Generic iOS Device". Right now I have disabled bitcode, the proper fix of this would be to find a dependency of openssl which is bitcode enabled. Its really hard to find the proper cocoapod dependency of openssl which is bitcode enabled. But disabling bitcode is not a big ask, also people will face this error only when they try to publish flipper in their release.
I discovered this problem from an issue posted in [RN](https://github.com/react-native-community/upgrade-support/issues/35), it also takes care of this issue.
Reviewed By: passy
Differential Revision: D20897590
fbshipit-source-id: 8c79d239572bb7efe2d65b2a7f1cfe8c608c1df4
Summary:
# Zero Redux DevTools
Our awesome new Zero Rating SDK is based on a Redux/Saga Library, and part of the reason for it is the amazing DevTools we can add around it.
State & Sagas visibility, manipulation, and even time-machine.
Comes as a Flipper Plugin to Android first, then iOS.
Inspired by JavaScript's [Redux DevTools @ GitHub](https://github.com/reduxjs/redux-devtools).
## This Diff
**Adding UI to our Flipper Desktop App.**
- React components to structure our plugin. Root + Tabs.
- Currently enabled: Actions Tab. with Actions (& state) Details side view
- Currently Disabled: SDK Tab, Sagas Tab.
- added a get "PluginFeatures" command to enable/disable desktop feature based on the app implementation (Fb4a/ FBLite / Wild, etc)
{F232877109}
Reviewed By: egergo
Differential Revision: D20350029
fbshipit-source-id: 000a7fda70026fbc3e121e46a6ac5905af9c807d
Summary: Ran `stack build`. Currently source and binaries are out of sync.
Reviewed By: jknoxville
Differential Revision: D20895907
fbshipit-source-id: df9a00633a7cb7515927390b49028376e757ccab
Summary:
React component to show Bloks scripts + simple ad-hoc code formatter
built on top of codemirrror https://codemirror.net/
Differential Revision: D20868214
fbshipit-source-id: 7c399347a6595b9aad354bad166bb72890a9ce57
Summary: I think that's a good thing to keep up-to-date?
Reviewed By: mweststrate
Differential Revision: D20890360
fbshipit-source-id: a9c95d4afb2f6b6f0b32f595c53f3799b9ffaa73
Summary:
I think I accidentally pinned this before. That's not necessary.
Pull Request resolved: https://github.com/facebook/flipper/pull/964
Test Plan: yarn test
Reviewed By: mweststrate
Differential Revision: D20835725
Pulled By: passy
fbshipit-source-id: 627594d4f1a425cf0db410a097c82af6758d7d11
Summary:
***
☝️ **Important announcement:** Greenkeeper will be saying goodbye 👋 and passing the torch to Snyk on June 3rd, 2020! [Find out how to migrate to Snyk and more at greenkeeper.io](https://greenkeeper.io)
***
## The devDependency [types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped) was updated from `24.9.1` to `25.1.5`.
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:** [types](https://www.npmjs.com/~types)
**License:** MIT
[Find out more about this release](https://github.com/DefinitelyTyped/DefinitelyTyped).
---
<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/963
Reviewed By: mweststrate
Differential Revision: D20867651
Pulled By: passy
fbshipit-source-id: 59c686a3bfc1f7807357050a2bd6b18e3a362aef
Summary:
I trimmed the previous versions of this down a lot to only
focus on what RN developers need to know without duplicating
what we have in the non-RN docs.
Reviewed By: mweststrate
Differential Revision: D20816115
fbshipit-source-id: 9d88a6fb0d49e823194cce647e64b86d61d6229a
Summary:
This is in line with the most recent stable Android Studio Release.
Pull Request resolved: https://github.com/facebook/flipper/pull/958
Test Plan:
Used it myself.
Open Source CI required a higher NDK, so let's first check what CI says to that internally now.
Reviewed By: jknoxville
Differential Revision: D20794634
Pulled By: passy
fbshipit-source-id: c32f934634b036ad3c1cad9fc49541e585d64329
Summary:
D20559197 inadvertantly broke support for old SDKs by properly handling an
exception that we previously ignored. However, this meant that Android versions
that don't support reverse-proxying will not fail to get registered although
they're otherwise supported.
Changelog: Fix connections on Android devices with older SDKs (19)
Reviewed By: jknoxville
Differential Revision: D20868923
fbshipit-source-id: 409fe20a0875dc26ecc971d33264a1145012d586
Summary:
The current upload process is broken because the publish step only works on Linux.
This first uploads the binary to artifact storage, then downloads it on Linux and runs the publish step.
Pull Request resolved: https://github.com/facebook/flipper/pull/984
Test Plan:
@public
https://github.com/facebook/flipper/pull/984/checks?check_run_id=563996817
Everything here works apart from the publish action which throws a 400, which is expected as there's no tag/release associated with the PR. We can only really test the entire thing on a new release.
Reviewed By: nikoant
Differential Revision: D20868825
Pulled By: passy
fbshipit-source-id: 97304328ec7eb1243280ca7a9f26e8049869d33b
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/983
This diff fixes broken test jobs on GitHub. Tests for all the packages are already being run by the "yarn test" in the root package, so I'm disabling running them separately.
Reviewed By: jknoxville
Differential Revision: D20868138
fbshipit-source-id: 04a86a8127481fecaee63af1f9fd9c7ad0f4269b
Summary: Accept websocket connections from any localhost origin, in addition to the existing chrome extensions support.
Reviewed By: jknoxville
Differential Revision: D20792131
fbshipit-source-id: d3991aa375bfb4e6f492c02dfab9bf72b1f8c412
Summary:
Another day ending in y, another minimist vulnerability. Bumping
to `1.2.3`.
(Note: this ignores all push blocking failures!)
Reviewed By: cekkaewnumchai
Differential Revision: D20860264
fbshipit-source-id: 569abd7e521efef92cd0b31113e0325493645c2a
Summary:
Got an open security alert for this one.
(Note: this ignores all push blocking failures!)
Reviewed By: cekkaewnumchai
Differential Revision: D20840586
fbshipit-source-id: b57fda5a7c3244c7bf893082896ea8d1ee138493
Summary:
Fixed npm packaging/publishing scripts for "flipper-doctor", "flipper-pkg" and "flipper-babel-transformer".
Also removed scripts for testing and linting, because these packages are tested and linted by root level package.json.
Reviewed By: jknoxville
Differential Revision: D20839959
fbshipit-source-id: 4d9d037d4921fc97356c849054c389dfece05652
Summary:
The url for the getting started page was changed yesterday. (no longer getting-started.html)
This fixes some links that were broken because of it.
Reviewed By: cekkaewnumchai
Differential Revision: D20855343
fbshipit-source-id: 788efb75f3581e4fe6cecd5f69f11dd64b03e7df
Summary:
Fix https://github.com/facebook/flipper/issues/931
This is not how I would *like* to fix this, but it should do the job.
When the switch over to AndroidX was made, the overall abstraction
started to leak and we really need to remodel this in its entirety.
There's also the question of whether we want to support both support
fragments and AndroidX fragments or not. Right now it's kinda-sorta
supported but only under some circumstances, which is not great.
I also added some more defensive try/catches as there's some unsafe casting
involved and future changes may break this causing the entire layout to disappear.
Change Log: Fix support for AndroidX fragments in Layout Inspector.
Pull Request resolved: https://github.com/facebook/flipper/pull/957
Test Plan:
Changed the sample app to include some AndroidX fragments and they
now show up (again) in the view hierarchy:

Tested internally that FB4A fragments show up again, too:
{F233098198}
Reviewed By: mweststrate
Differential Revision: D20792503
Pulled By: passy
fbshipit-source-id: 7030b897ab547d1e8803b7f0d7aaa34263cfaed2
Summary:
This is a first step in breaking up the getting started docs.
Ultimately, the React Native Android and iOS bits will become
separate sections, too, but I won't to keep the diffs a bit smaller.
This one doesn't really do much apart from reorganising the current
content.
Reviewed By: mweststrate
Differential Revision: D20815235
fbshipit-source-id: 5c85b788211699a2a9f5808b9e2590c7db68a1c1
Summary: Metro shows cyclic dependencies warnings in dev mode even if they are caused by 3rd party packages installed into node_modules. This produces a lot of noise, but totally unactionable. In this diff I have implemented patch for "metro" package wich disables these unactionable warnings.
Reviewed By: passy
Differential Revision: D20835057
fbshipit-source-id: 2aebc59a0f8c0adfc768ed4c170e5d0b9ced7e0e