Summary:
Upgrading the embedded version of React DevTools, primarily to pull in [this PR](https://github.com/facebook/react/pull/18397) which will reduce the impact of this package on `node_modules` size.
# Update process
Following a similar process as D15973709, I began by searching for [all of the references](https://our.intern.facebook.com/intern/biggrep/?corpus=xplat&filename=.json&case=false&view=default&extre=&s=%22react-devtools&engine=apr_strmatch&context=false&filter[uninteresting]=false&filter[intern]=false&filter[test]=false&grep_regex=) to the `react-devtools-core` package and updated all v4 usage to to point to the new 4.6.0 release:
1: Manually update "react-devtools-core" versions:
```
js/package.json
js/react-native-github/package.json
nuclide/package.json
sonar/desktop/app/package.json
sonar/desktop/plugins/reactdevtools/package.json
vscode/modules/vscode-webview/package.json
```
2: Setup Yarn proxy:
```
yarn config set proxy http://fwdproxy:8080/
yarn config set https-proxy http://fwdproxy:8080
```
3: Run "yarn" in each of the above directories.
4: Run the lockfile shell script:
```
~/xplat/js/scripts/update-oss-yarn-lockfile.sh
```
5: Update the generated `MOBILE_JS_NODE_MODULE_DEPS.bzl` by running
```
js1 build buckfiles
```
## Changelog:
[General] [Changed] - Upgrade embedded React DevTools backend from v4.0.6 to v4.6.0.
Reviewed By: cpojer, gaearon
Differential Revision: D20676091
fbshipit-source-id: 99865bdba9bce45e2a7d582d5fb550cfdbeeca3a
Summary:
There is error written to console just after launch. It is related to wrong resolution of adbkit-logcat version. This diff forces resolution to the single version everywhere.
{F232416275}
Reviewed By: mweststrate
Differential Revision: D20632452
fbshipit-source-id: bf45bbd6d245dbb1093b093c20e808840689971b
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
Summary:
Quick notes:
- This looks worse than it is. It adds mandatory parentheses to single argument lambdas. Lots of outrage on Twitter about it, personally I'm {emoji:1f937_200d_2642} about it.
- Space before function, e.g. `a = function ()` is now enforced. I like this because both were fine before.
- I added `eslint-config-prettier` to the config because otherwise a ton of rules conflict with eslint itself.
Close https://github.com/facebook/flipper/pull/915
Reviewed By: jknoxville
Differential Revision: D20594929
fbshipit-source-id: ca1c65376b90e009550dd6d1f4e0831d32cbff03
Summary:
Collecting notifications is done in the store.subscribe. If this throws however, the entire original dispatch throws (really Redux?!). So added a try catch around collecting notifications. This stops plugins from crashing while processing the queue (in fact this could happen during any Redux dispatch).
Will look into a more robust mechanism in the future
I suspect this also fixes the hanging graphQL issue
Reviewed By: jknoxville
Differential Revision: D20619226
fbshipit-source-id: 2f6b8e13a5c884dd63b6963d317474a2abf0725c
Summary:
Breaking down 'big' links and diving deeper into stack trace
each link is built from multiple events with same function on top of call stack
Now we can break that group and/or navigate one level deeper in that stack
coloring links: according to the latest event timestamp: blue -> orange gradient
{F232164201}
Reviewed By: SimoneCasagranda
Differential Revision: D20596812
fbshipit-source-id: 9debbc55a716166e20c94f51989742bf40b95878
Summary:
The memoized callback didn't have any dependencies, so whenever a context menu was computed for a component, it was never changed again.
This broke the network plugin as the context menu should change depending on what element is selected.
Reviewed By: cekkaewnumchai
Differential Revision: D20596750
fbshipit-source-id: 275453d972079954e310fd3e97f2dd9f437bf748
Summary:
A lack of correct chaining of promises, error handling and not explicitly dealing with the ADB state 'still connecting' causes errors to be shown in Flipper on the main thread, the browser console and in the debug error bar.
This diff fixes several of those issue, which gives a stabler much stabler experience when disconnecting and connecting emulators and physical devices a lot (it is a bit hard to capture in a movie, but more noticeable when doing it IRL)
Reviewed By: jknoxville
Differential Revision: D20559197
fbshipit-source-id: 643172d322aefe1be209741a48fa0e96358881eb
Summary: Fixed circular dependency warnings and removed some dead code while at it.
Reviewed By: jknoxville
Differential Revision: D20557313
fbshipit-source-id: 856c42113a9abe36d3e14f9d538eb40705ceb87f
Summary:
Our usage of requestIdleCallback (probably) causes more trouble than it solves:
1. It makes sure everything is processed asynchronously. But since everything is arriving over a network stack, that is already the case without wrapping it again to run on a separate event loop tick
2. The timeout we set before `500` forces the app to give _more_ priority to message processing instead of less
3. In a next diff (D20151700) in this stack we will make sure that messages are not processed immediately, but simple stored, which should not be significantly more expensive (probably even cheaper) than scheduling another tick on the event loop
Reviewed By: jknoxville
Differential Revision: D20557104
fbshipit-source-id: 6cc10ba537e3cb5f31e6c32e1fdeb57c20f06f17
Summary: Did run for 2 months stable now, time to remove some dead code.
Reviewed By: passy
Differential Revision: D20556785
fbshipit-source-id: 514673995212d62d21744f304286caa6e91007fb
Summary:
Set line height to make space between lines look better in cramper space (See Test Plan).
This has direct side effect on:
- https://fburl.com/diffusion/0dtt1cgl
- ToggledSection component
In addition, this diff adds an offline cache.
Reviewed By: mweststrate
Differential Revision: D20574486
fbshipit-source-id: 8689bc95e2f18409e82c923fea361e033e77bc00
Summary:
1) moved "sonar/desktop/src" to "sonar/desktop/app/src", so "app" is now a separate package containing the core Flipper app code
2) Configured yarn workspaces with the root in "sonar/desktop": app, static, pkg, doctor, headless-tests. Plugins are not included for now, I plan to do this later.
Reviewed By: jknoxville
Differential Revision: D20535782
fbshipit-source-id: 600b2301960f37c7d72166e0d04eba462bec9fc1