Commit Graph

1415 Commits

Author SHA1 Message Date
Anton Nikolaev
25ae4a0535 Include information about selected device, app and plugin into analytics events and error reports
Summary:
This diff generalises computation of the currently selected plugin, app, device etc. and adds this information to all the analytics events and error reports.

Slicing of events by os, device, app or selected plugin can be very useful. This is especially true for errors which often affects only certain types of devices, e.g. android only or physical devices only. Having such information can help to narrow down such issues.

Reviewed By: passy

Differential Revision: D28511441

fbshipit-source-id: ed9dc57927c70ed8cc6fe093e21604eae54c2f60
2021-05-19 05:17:41 -07:00
bizzguy
b378d8b946 fix problem with mock request data (#2340)
Summary:
Network Plugin - When creating a mock request from a selected request, the request data is not in the proper format.  It is decoded instead of just being copied from the call (which has already been decoded properly).  This PR fixes that problem.

Below is a screenshot showing the problem (which occurs for all text response data):

![image](https://user-images.githubusercontent.com/337874/118744068-423e3b80-b819-11eb-9076-216459517fdb.png)

## Changelog

Network Plugin - Fix problem with decoding request data for mocks copied from selection

Pull Request resolved: https://github.com/facebook/flipper/pull/2340

Test Plan:
Using the sample Android app, issue a network request

In Flipper, create a mock for the network request by selecting it and using the "Copy Selected Calls" function in the mock

Verify that the request data is readable:

![image](https://user-images.githubusercontent.com/337874/118744220-8af5f480-b819-11eb-9206-0fa40e7d7e46.png)

Note:

Testing was done using the sample app which uses responses with JSON data.  I was not able to provide testing for other types of calls, specifically calls that would return binary data.

Reviewed By: passy

Differential Revision: D28533224

Pulled By: mweststrate

fbshipit-source-id: ce11d23ade60843c110286f7a5bbeba91febbcf0
2021-05-19 03:15:30 -07:00
Denis Colliot
525e8b19fb Detect JSON API content type ('application/vnd.api+json') as textual content (#2337)
Summary:
Network requests and responses using JSON API content type of pattern `application/vnd.api+json` (see https://jsonapi.org/#mime-types) are currently treated as binary data. They should be treated as textual content.

## Changelog

Add regular expression to detect JSON content types.

Pull Request resolved: https://github.com/facebook/flipper/pull/2337

Test Plan: Using an API that return `Content-Type` of pattern `application/vnd.api+json`, verify that the response data in sidebar appears as text rather than `(binary data)`.

Reviewed By: passy

Differential Revision: D28513547

Pulled By: mweststrate

fbshipit-source-id: 3335b7eeb63c2429c2245113c8c83bd7e08a9420
2021-05-18 13:48:17 -07:00
bizzguy
b0313316cc Network Plugin: Add xhtml and xml to 'Textual' check (#2336)
Summary:
Network requests that return a "Content-Type" of 'application/xhtml+xml' are currently being treated as binary data when they should be treated as text.

## Changelog

Network Plugin - treat "Content-Type" of 'application/xhtml+xml' as text

Pull Request resolved: https://github.com/facebook/flipper/pull/2336

Test Plan: Using an API that return "Content-Type" of 'application/xhtml+xml' , verified that the response data in sidebar appears as text rather than '(binary data)'

Reviewed By: nikoant

Differential Revision: D28478695

Pulled By: mweststrate

fbshipit-source-id: ed60c8301dbd0cf65924a80d9e6a5800a59c6bb8
2021-05-18 10:23:38 -07:00
Michel Weststrate
f0f54b19b9 Added basic chart to demo
Summary:
Added demo to show how DataSource can power charts using event sampling and smart windowing.

A more experimental application: use dataSource to power some charts, that leverages the events emitted from an datasource that is continuously being appended:

- incoming events are downsampled 1 in 100 to build up the bottom window
- incoming events are not downsampled to render the topwindow, but since datasource views will ignore events outside the window, things will stay pretty responsive when a window is selected (without a window, the downsampled dataset is used as source for top chart as well).

Compared to a naive (well still slightly optimised with useFastArray) implementation that throws all incoming event in a big array, it performs > 20 times faster (see difference in amount of events processed)

Reviewed By: passy

Differential Revision: D28474409

fbshipit-source-id: 6a7973d1ade3053b1d6c8f72069697d96b1ef4fd
2021-05-18 08:46:18 -07:00
Pascal Hartig
3b6b684f10 Demote user errors
Summary:
One is keytar, which just needed a context.

The second one is happening every time someone uses Flipper
and not being on Lighthouse, spamming our log category besides
actually being properly handled.

Reviewed By: nikoant

Differential Revision: D28479791

fbshipit-source-id: 029721df46d12b2942b590a232618ef039a2323d
2021-05-18 08:34:19 -07:00
Anton Nikolaev
cfedabcdef Attribute error reports with plugin id and version
Summary: This diff adds attributing of all error reports with the information about the plugins caused them. To do that we try to map error stack trace to plugins by searching for plugin directories in it. We can do this only for plugins loaded from disk as we are looking for their physical locations in stack. To make it possible to search for multiple plugins in one go we build and maintain a trie containing all the loaded plugins locations.

Reviewed By: passy

Differential Revision: D28475938

fbshipit-source-id: 59c8ac39ffe54262b1d57f21fad44eb89748dff2
2021-05-18 08:08:30 -07:00
Anton Nikolaev
853ee24c9b Add info about interactions to error reports
Summary: When reporting errors we could add info about interactions which caused errors. Ability to connect errors and interactions could be quite helpful for analysing and debugging errors and where they are coming from.

Reviewed By: passy, mweststrate

Differential Revision: D28467575

fbshipit-source-id: bef69917a4d6c786d762a2f6eb75a47fd4e46b0f
2021-05-18 08:08:30 -07:00
Anton Nikolaev
03a1add092 Fix extracting errors from console.error data
Summary: Flipper logs all errors reported by "console.error", but I found that stack traces are broken for them. It is because a bug in `extractError` function which extracts errors from the data logged to console. It fails to extract original error stack trace and instead always logs stack trace where "console.error" was called.  This diff fixes the issue, so errors are properly reported with their original stack traces. However, sometimes stack trace of console.error call can also be useful to find where the error was actually catched and logged, so we're now writing this stack trace into addition field "log_stack_trace".

Reviewed By: passy

Differential Revision: D28466569

fbshipit-source-id: 55fb8ab52c05e8196efc1e47aec95cc1fbc0e594
2021-05-18 08:08:30 -07:00
Anton Nikolaev
8bbf9c46a3 Keep promise rejections unhandled after catching them for logging
Summary: Tracked component catches rejected promises under it to log them. After catching promises become "handled". This might hide potential promise error handling mistakes, so it's better to ensure we keep promises unhandled after catching them for tracking, so they are properly catched by the unhandled promise handler after that. The easiest solution seems to just make new rejected promise and return it instead of the catched one.

Reviewed By: passy

Differential Revision: D28466570

fbshipit-source-id: 26c1e7af3d6e4f7067b95f20e646462d808bb497
2021-05-18 08:08:30 -07:00
Anton Nikolaev
a4eb2a56d6 Option for "yarn start" and "yarn build" scripts to pre-install default plugin packages instead of bundling them
Summary:
Sorry for long diff! I can try to split it if necessary, but many changes here are 1-1 replacements / renames.

**Preambule**
Currently we bundle default plugins into the Flipper main bundle. This helps us to reduce bundle size, because of plugin dependencies re-use. E.g. if multiple plugins use "lodash" when they are bundled together, only one copy of "lodash" added. When they are bundled separately, the same dependency might be added to each of them. However as we're not going to include most of plugins into Flipper distributive anymore and going to rely on Marketplace instead, this bundling doesn't provide significant size benefits anymore. In addition to that, bundling makes it impossible to differentiate whether thrown errors are originated from Flipper core or one of its plugins.

Why don't we remove plugin bundling at all? Because for "dev mode" it actually quite useful. It makes dev build start much faster and also enables using of Fast Refresh for plugin development (fast refresh won't work for plugins loaded from disk).

**Changes**
This diff introduces new option "no-bundled-plugins" for "yarn start" and "yarn build" commands. For now, by default, we will continue bundling default plugins into the Flipper main bundle, but if this option provided then we will build each default plugin separately and include their packages into the Flipper distributive as "pre-installed" to be able to load them from disk even without access to Marketplace.

For "yarn start", we're adding symlinks to plugin folders in "static/defaultPlugins" and then they are loaded by Flipper. For "yarn build" we are dereferencing these symlinks to include physical files of plugins into folder "defaultPlugins" of the produced distributive. Folder "defaultPlugins" is excluded from asar, because loading of plugins from asar archive might introduce some unexpected issues depending on their implementation.

Reviewed By: mweststrate

Differential Revision: D28431838

fbshipit-source-id: f7757e9f5ba9183ed918d70252de3ce0e823177d
2021-05-18 08:08:30 -07:00
dependabot[bot]
706b3cfca8 Bump socket.io from 4.0.1 to 4.1.1 in /desktop (#2334)
Summary:
Bumps [socket.io](https://github.com/socketio/socket.io) from 4.0.1 to 4.1.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/socketio/socket.io/releases">socket.io's releases</a>.</em></p>
<blockquote>
<h2>4.1.1</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>typings:</strong> properly type server-side events (<a href="b84ed1e41c">b84ed1e</a>)</li>
<li><strong>typings:</strong> properly type the adapter attribute (<a href="891b1870e9">891b187</a>)</li>
</ul>
<h4>Links:</h4>
<ul>
<li>Diff: <a href="https://github.com/socketio/socket.io/compare/4.1.0...4.1.1">https://github.com/socketio/socket.io/compare/4.1.0...4.1.1</a></li>
<li>Client release: <a href="https://github.com/socketio/socket.io-client/releases/tag/4.1.1">4.1.1</a></li>
<li>engine.io version:  <code>~5.1.0</code></li>
<li>ws version: <code>~7.4.2</code></li>
</ul>
<h2>4.1.0</h2>
<p>Blog post: <a href="https://socket.io/blog/socket-io-4-1-0/">https://socket.io/blog/socket-io-4-1-0/</a></p>
<h3>Features</h3>
<ul>
<li>add support for inter-server communication (<a href="93cce05fb3">93cce05</a>)</li>
<li>notify upon namespace creation (<a href="499c89250d">499c892</a>)</li>
<li>add a &quot;connection_error&quot; event (<a href="7096e98a02">7096e98</a>, from <code>engine.io</code>)</li>
<li>add the &quot;initial_headers&quot; and &quot;headers&quot; events (<a href="252754353a">2527543</a>, from <code>engine.io</code>)</li>
</ul>
<h4>Links:</h4>
<ul>
<li>Diff: <a href="https://github.com/socketio/socket.io/compare/4.0.2...4.1.0">https://github.com/socketio/socket.io/compare/4.0.2...4.1.0</a></li>
<li>Client release: <a href="https://github.com/socketio/socket.io-client/releases/tag/4.1.0">4.1.0</a></li>
<li>engine.io version:  <code>~5.1.0</code></li>
<li>ws version: <code>~7.4.2</code></li>
</ul>
<h2>4.0.2</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>typings:</strong> make &quot;engine&quot; attribute public (<a href="b81ce4c9d0">b81ce4c</a>)</li>
<li>properly export the Socket class (<a href="d65b6ee84c">d65b6ee</a>)</li>
</ul>
<h4>Links:</h4>
<ul>
<li>Diff: <a href="https://github.com/socketio/socket.io/compare/4.0.1...4.0.2">https://github.com/socketio/socket.io/compare/4.0.1...4.0.2</a></li>
<li>Client release: <a href="https://github.com/socketio/socket.io-client/releases/tag/4.0.2">4.0.2</a></li>
<li>engine.io version:  <code>~5.0.0</code></li>
<li>ws version: <code>~7.4.2</code></li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/socketio/socket.io/blob/master/CHANGELOG.md">socket.io's changelog</a>.</em></p>
<blockquote>
<h2><a href="https://github.com/socketio/socket.io/compare/4.1.0...4.1.1">4.1.1</a> (2021-05-11)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>typings:</strong> properly type server-side events (<a href="b84ed1e41c">b84ed1e</a>)</li>
<li><strong>typings:</strong> properly type the adapter attribute (<a href="891b1870e9">891b187</a>)</li>
</ul>
<h1><a href="https://github.com/socketio/socket.io/compare/4.0.2...4.1.0">4.1.0</a> (2021-05-11)</h1>
<h3>Features</h3>
<ul>
<li>add support for inter-server communication (<a href="93cce05fb3">93cce05</a>)</li>
<li>notify upon namespace creation (<a href="499c89250d">499c892</a>)</li>
<li>add a &quot;connection_error&quot; event (<a href="7096e98a02">7096e98</a>, from <code>engine.io</code>)</li>
<li>add the &quot;initial_headers&quot; and &quot;headers&quot; events (<a href="252754353a">2527543</a>, from <code>engine.io</code>)</li>
</ul>
<h3>Performance Improvements</h3>
<ul>
<li>add support for the &quot;wsPreEncoded&quot; writing option (<a href="dc381b72c6">dc381b7</a>)</li>
</ul>
<h2><a href="https://github.com/socketio/socket.io/compare/4.0.1...4.0.2">4.0.2</a> (2021-05-06)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>typings:</strong> make &quot;engine&quot; attribute public (<a href="b81ce4c9d0">b81ce4c</a>)</li>
<li>properly export the Socket class (<a href="d65b6ee84c">d65b6ee</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="995f38f4cc"><code>995f38f</code></a> chore(release): 4.1.1</li>
<li><a href="891b1870e9"><code>891b187</code></a> fix(typings): properly type the adapter attribute</li>
<li><a href="b84ed1e41c"><code>b84ed1e</code></a> fix(typings): properly type server-side events</li>
<li><a href="fb6b0efec9"><code>fb6b0ef</code></a> chore(release): 4.1.0</li>
<li><a href="95d9e4a42f"><code>95d9e4a</code></a> test: fix randomly failing test</li>
<li><a href="499c89250d"><code>499c892</code></a> feat: notify upon namespace creation</li>
<li><a href="93cce05fb3"><code>93cce05</code></a> feat: add support for inter-server communication</li>
<li><a href="dc381b72c6"><code>dc381b7</code></a> perf: add support for the &quot;wsPreEncoded&quot; writing option</li>
<li><a href="9fff03487c"><code>9fff034</code></a> chore(release): 4.0.2</li>
<li><a href="b81ce4c9d0"><code>b81ce4c</code></a> fix(typings): make &quot;engine&quot; attribute public</li>
<li>Additional commits viewable in <a href="https://github.com/socketio/socket.io/compare/4.0.1...4.1.1">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=socket.io&package-manager=npm_and_yarn&previous-version=4.0.1&new-version=4.1.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

 ---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>

Pull Request resolved: https://github.com/facebook/flipper/pull/2334

Reviewed By: priteshrnandgaonkar

Differential Revision: D28474762

Pulled By: mweststrate

fbshipit-source-id: 390da943efd6e6e96135d612adb855f132580ff6
2021-05-18 06:42:10 -07:00
dependabot[bot]
26209a0134 Bump @testing-library/dom from 7.30.4 to 7.31.0 in /desktop (#2333)
Summary:
Bumps [testing-library/dom](https://github.com/testing-library/dom-testing-library) from 7.30.4 to 7.31.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/testing-library/dom-testing-library/releases"><code>@​testing-library/dom</code>'s releases</a>.</em></p>
<blockquote>
<h2>v7.31.0</h2>
<h1><a href="https://github.com/testing-library/dom-testing-library/compare/v7.30.4...v7.31.0">7.31.0</a> (2021-05-10)</h1>
<h3>Features</h3>
<ul>
<li>Add extra error messages when <code>screen</code> was passed instead of a DOM element (<a href="https://github-redirect.dependabot.com/testing-library/dom-testing-library/issues/949">https://github.com/facebook/flipper/issues/949</a>) (<a href="c273ed518c">c273ed5</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="c273ed518c"><code>c273ed5</code></a> feat: Add extra error messages when <code>screen</code> was passed instead of a DOM elem...</li>
<li><a href="4b2976d516"><code>4b2976d</code></a> chore: Format codebase with prettier (<a href="https://github-redirect.dependabot.com/testing-library/dom-testing-library/issues/955">https://github.com/facebook/flipper/issues/955</a>)</li>
<li><a href="13efbb3b1d"><code>13efbb3</code></a> chore: Remove unused Nullish type (<a href="https://github-redirect.dependabot.com/testing-library/dom-testing-library/issues/953">https://github.com/facebook/flipper/issues/953</a>)</li>
<li><a href="e061cd1fdd"><code>e061cd1</code></a> docs: add amitmiran137 as a contributor (<a href="https://github-redirect.dependabot.com/testing-library/dom-testing-library/issues/952">https://github.com/facebook/flipper/issues/952</a>)</li>
<li><a href="37d1cc48d9"><code>37d1cc4</code></a> chore: rename master to main (<a href="https://github-redirect.dependabot.com/testing-library/dom-testing-library/issues/942">https://github.com/facebook/flipper/issues/942</a>)</li>
<li><a href="d8a8d581b0"><code>d8a8d58</code></a> docs: add simcha90 as a contributor (<a href="https://github-redirect.dependabot.com/testing-library/dom-testing-library/issues/951">https://github.com/facebook/flipper/issues/951</a>)</li>
<li><a href="b00dff949f"><code>b00dff9</code></a> chore(refactor): move queries to TS / prettify some code according ABC (<a href="https://github-redirect.dependabot.com/testing-library/dom-testing-library/issues/948">https://github.com/facebook/flipper/issues/948</a>)</li>
<li><a href="ffc8f26d48"><code>ffc8f26</code></a> docs: add nickmccurdy as a contributor (<a href="https://github-redirect.dependabot.com/testing-library/dom-testing-library/issues/936">https://github.com/facebook/flipper/issues/936</a>)</li>
<li><a href="9c03efa5f3"><code>9c03efa</code></a> chore: continue testing on Node 15 (<a href="https://github-redirect.dependabot.com/testing-library/dom-testing-library/issues/935">https://github.com/facebook/flipper/issues/935</a>)</li>
<li>See full diff in <a href="https://github.com/testing-library/dom-testing-library/compare/v7.30.4...v7.31.0">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@testing-library/dom&package-manager=npm_and_yarn&previous-version=7.30.4&new-version=7.31.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

 ---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>

Pull Request resolved: https://github.com/facebook/flipper/pull/2333

Reviewed By: priteshrnandgaonkar

Differential Revision: D28474761

Pulled By: mweststrate

fbshipit-source-id: e6d59ad2aef69c7df066c2a01d769083a1f042a4
2021-05-18 06:42:10 -07:00
dependabot[bot]
ea541436c8 Bump jest-environment-jsdom-sixteen from 1.0.3 to 2.0.0 in /desktop (#2335)
Summary:
Bumps [jest-environment-jsdom-sixteen](https://github.com/SimenB/jest-environment-jsdom-sixteen) from 1.0.3 to 2.0.0.
<details>
<summary>Commits</summary>
<ul>
<li><a href="313be06cc4"><code>313be06</code></a> 2.0.0</li>
<li><a href="03837baa9a"><code>03837ba</code></a> Update README.md</li>
<li>See full diff in <a href="https://github.com/SimenB/jest-environment-jsdom-sixteen/compare/v1.0.3...v2.0.0">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=jest-environment-jsdom-sixteen&package-manager=npm_and_yarn&previous-version=1.0.3&new-version=2.0.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

 ---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>

Pull Request resolved: https://github.com/facebook/flipper/pull/2335

Reviewed By: priteshrnandgaonkar

Differential Revision: D28474765

Pulled By: mweststrate

fbshipit-source-id: 69db6e427afd33abb95c5aa204821954b21cfc14
2021-05-18 06:42:10 -07:00
dependabot[bot]
4e4a2bdc00 Bump @typescript-eslint/experimental-utils from 4.22.1 to 4.23.0 in /desktop (#2328)
Summary:
Bumps [typescript-eslint/experimental-utils](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/experimental-utils) from 4.22.1 to 4.23.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/typescript-eslint/typescript-eslint/releases"><code>@​typescript-eslint/experimental-utils</code>'s releases</a>.</em></p>
<blockquote>
<h2>v4.23.0</h2>
<h1><a href="https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.1...v4.23.0">4.23.0</a> (2021-05-10)</h1>
<h3>Bug Fixes</h3>
<ul>
<li><strong>scope-manager:</strong> fix visiting TSAsExpression in assignment (<a href="https://github-redirect.dependabot.com/typescript-eslint/typescript-eslint/issues/3355">#3355</a>) (<a href="87521a0241">87521a0</a>)</li>
</ul>
<h3>Features</h3>
<ul>
<li><strong>experimental-utils:</strong> Include <code>getCwd()</code> in <code>RuleContext</code> type (<a href="https://github-redirect.dependabot.com/typescript-eslint/typescript-eslint/issues/3308">#3308</a>) (<a href="2b75c11d69">2b75c11</a>)</li>
<li>refactor to split AST specification out as its own module (<a href="https://github-redirect.dependabot.com/typescript-eslint/typescript-eslint/issues/2911">#2911</a>) (<a href="25ea953cc6">25ea953</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/experimental-utils/CHANGELOG.md"><code>@​typescript-eslint/experimental-utils</code>'s changelog</a>.</em></p>
<blockquote>
<h1><a href="https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.1...v4.23.0">4.23.0</a> (2021-05-10)</h1>
<h3>Features</h3>
<ul>
<li><strong>experimental-utils:</strong> Include <code>getCwd()</code> in <code>RuleContext</code> type (<a href="https://github-redirect.dependabot.com/typescript-eslint/typescript-eslint/issues/3308">#3308</a>) (<a href="2b75c11d69">2b75c11</a>)</li>
<li>refactor to split AST specification out as its own module (<a href="https://github-redirect.dependabot.com/typescript-eslint/typescript-eslint/issues/2911">#2911</a>) (<a href="25ea953cc6">25ea953</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="18d8151e54"><code>18d8151</code></a> chore: publish v4.23.0</li>
<li><a href="2b75c11d69"><code>2b75c11</code></a> feat(experimental-utils): Include <code>getCwd()</code> in <code>RuleContext</code> type (<a href="https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/experimental-utils/issues/3308">#3308</a>)</li>
<li><a href="25ea953cc6"><code>25ea953</code></a> feat: refactor to split AST specification out as its own module (<a href="https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/experimental-utils/issues/2911">#2911</a>)</li>
<li>See full diff in <a href="https://github.com/typescript-eslint/typescript-eslint/commits/v4.23.0/packages/experimental-utils">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@typescript-eslint/experimental-utils&package-manager=npm_and_yarn&previous-version=4.22.1&new-version=4.23.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

 ---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>

Pull Request resolved: https://github.com/facebook/flipper/pull/2328

Reviewed By: priteshrnandgaonkar

Differential Revision: D28474748

Pulled By: mweststrate

fbshipit-source-id: c300d94244c0210d7082ac33b952f4925caf8b5e
2021-05-18 06:42:10 -07:00
dependabot[bot]
ac25787c0c Bump @types/split2 from 2.1.6 to 3.2.0 in /desktop (#2332)
Summary:
Bumps [types/split2](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/split2) from 2.1.6 to 3.2.0.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/split2">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@types/split2&package-manager=npm_and_yarn&previous-version=2.1.6&new-version=3.2.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

 ---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>

Pull Request resolved: https://github.com/facebook/flipper/pull/2332

Reviewed By: priteshrnandgaonkar

Differential Revision: D28474759

Pulled By: mweststrate

fbshipit-source-id: adf85edf7a04928d3b335e698c547c6bb592e219
2021-05-18 06:42:10 -07:00
dependabot[bot]
a005fea38e Bump glob from 7.1.6 to 7.1.7 in /desktop (#2327)
Summary:
Bumps [glob](https://github.com/isaacs/node-glob) from 7.1.6 to 7.1.7.
<details>
<summary>Commits</summary>
<ul>
<li><a href="ce43ea071e"><code>ce43ea0</code></a> 7.1.7</li>
<li><a href="66c102edf4"><code>66c102e</code></a> force 'en' locale in string sorting</li>
<li><a href="37b44c1ec3"><code>37b44c1</code></a> use tap 15</li>
<li>See full diff in <a href="https://github.com/isaacs/node-glob/compare/v7.1.6...v7.1.7">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=glob&package-manager=npm_and_yarn&previous-version=7.1.6&new-version=7.1.7)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

 ---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>

Pull Request resolved: https://github.com/facebook/flipper/pull/2327

Reviewed By: priteshrnandgaonkar

Differential Revision: D28474747

Pulled By: mweststrate

fbshipit-source-id: 39503c06ab8bb509f4e46d3d58806356473b5ac9
2021-05-18 06:42:10 -07:00
dependabot[bot]
2048d9e7a2 Bump less from 3.12.2 to 4.1.1 in /desktop (#2329)
Summary:
Bumps [less](https://github.com/less/less.js) from 3.12.2 to 4.1.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/less/less.js/releases">less's releases</a>.</em></p>
<blockquote>
<h2>v4.1.1</h2>
<ul>
<li>Bug fixes</li>
</ul>
<h2>v4.1.0</h2>
<h1>Mixin parentheses requirement removed</h1>
<p>This was maybe too big a change without some kind of deprecation or conversion.
So for this version, this works again:</p>
<pre><code>.mixin;
</code></pre>
<h2>v4.0.0</h2>
<p>This release has 2 breaking changes:</p>
<h3>Parentheses required for mixin calls</h3>
<p>This aligns it with syntax for calling detached rulesets.</p>
<p>Example</p>
<pre lang="less"><code>.mixin() {}
.mixin;  // error in 4.0
</code></pre>
<h3>Parens-division now the default math setting</h3>
<p>Parentheses are required (by default) around division-like expressions, to force math evaluation.</p>
<p>Example:</p>
<pre lang="less"><code>ratio_large: 16;
ratio_small: 9;
<p>/** The following will produce <code>device-aspect-ratio: 1.77777778</code> by default in 3.x */
<a href="https://github.com/media"><code>@​media</code></a> all and (device-aspect-ratio: <a href="https://github.com/ratio"><code>@​ratio</code></a>_large / <a href="https://github.com/ratio"><code>@​ratio</code></a>_small) {
.body { max-width: 800px; }
}
</code></pre></p>
<p>Produces:</p>
<pre lang="css"><code>media all and (device-aspect-ratio: 16 / 9) {
  .body {
    max-width: 800px;
  }
}
</code></pre>
<p>You can, of course, get old math behavior. See: <a href="http://lesscss.org/usage/#less-options-math">http://lesscss.org/usage/#less-options-math</a></p>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/less/less.js/blob/master/CHANGELOG.md">less's changelog</a>.</em></p>
<blockquote>
<h2>Change Log</h2>
<h3>v4.0.0 (2020-12-18)</h3>
<ul>
<li><a href="https://github-redirect.dependabot.com/less/less.js/pull/3573">#3573</a> v4.0.0 (<a href="https://github-redirect.dependabot.com/less/less.js/issues/3573">#3573</a>) (<a href="https://github.com/matthew-dean"><code>@​matthew-dean</code></a>)</li>
</ul>
<h3>v3.13.1 (2020-12-18)</h3>
<ul>
<li><a href="https://github-redirect.dependabot.com/less/less.js/pull/3575">#3575</a> Fixes <a href="https://github-redirect.dependabot.com/less/less.js/issues/3574">#3574</a> (<a href="https://github-redirect.dependabot.com/less/less.js/issues/3575">#3575</a>) (<a href="https://github.com/matthew-dean"><code>@​matthew-dean</code></a>)</li>
</ul>
<h3>v3.13.0 (2020-12-12)</h3>
<ul>
<li><a href="https://github-redirect.dependabot.com/less/less.js/pull/3572">#3572</a> Fixes <a href="https://github-redirect.dependabot.com/less/less.js/issues/3434">#3434</a> - memory / runtime improvements (<a href="https://github-redirect.dependabot.com/less/less.js/issues/3572">#3572</a>) (<a href="https://github.com/matthew-dean"><code>@​matthew-dean</code></a>)</li>
<li><a href="https://github-redirect.dependabot.com/less/less.js/pull/3550">#3550</a> Examples contain more valid CSS, to test with a new parser (<a href="https://github-redirect.dependabot.com/less/less.js/issues/3550">#3550</a>) (<a href="https://github.com/matthew-dean"><code>@​matthew-dean</code></a>)</li>
<li><a href="https://github-redirect.dependabot.com/less/less.js/pull/3546">#3546</a> Bug fixes - fixes <a href="https://github-redirect.dependabot.com/less/less.js/issues/3446">#3446</a> <a href="https://github-redirect.dependabot.com/less/less.js/issues/3368">#3368</a> (<a href="https://github-redirect.dependabot.com/less/less.js/issues/3546">#3546</a>) (<a href="https://github.com/matthew-dean"><code>@​matthew-dean</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="f4e752904f"><code>f4e7529</code></a> Merge branch 'master' of <a href="https://github.com/less/less.js">https://github.com/less/less.js</a></li>
<li><a href="9538abae09"><code>9538aba</code></a> Release/v4.1.1 (<a href="https://github-redirect.dependabot.com/less/less.js/issues/3599">#3599</a>)</li>
<li><a href="4cc9b8346f"><code>4cc9b83</code></a> Merge branch 'master' of <a href="https://github.com/less/less.js">https://github.com/less/less.js</a></li>
<li><a href="9d9e650890"><code>9d9e650</code></a> v4.1.1</li>
<li><a href="f727b26de5"><code>f727b26</code></a> Fixes <a href="https://github-redirect.dependabot.com/less/less.js/issues/3586">#3586</a> (<a href="https://github-redirect.dependabot.com/less/less.js/issues/3589">#3589</a>)</li>
<li><a href="63c1827c63"><code>63c1827</code></a> Fix expected response when there's a socket error (<a href="https://github-redirect.dependabot.com/less/less.js/issues/3597">#3597</a>)</li>
<li><a href="3c23217358"><code>3c23217</code></a> Release v4.1.0</li>
<li><a href="d495fb26a8"><code>d495fb2</code></a> v4.1.0</li>
<li><a href="a4b6c8544c"><code>a4b6c85</code></a> Roll back paren requirement on mixin calls (<a href="https://github-redirect.dependabot.com/less/less.js/issues/3588">#3588</a>)</li>
<li><a href="7f1938ec10"><code>7f1938e</code></a> Update rollup and other build dependencies (<a href="https://github-redirect.dependabot.com/less/less.js/issues/3583">#3583</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/less/less.js/compare/v3.12.2...v4.1.1">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=less&package-manager=npm_and_yarn&previous-version=3.12.2&new-version=4.1.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

 ---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>

Pull Request resolved: https://github.com/facebook/flipper/pull/2329

Reviewed By: priteshrnandgaonkar

Differential Revision: D28474751

Pulled By: mweststrate

fbshipit-source-id: 7e568e71b36fd54cbb95eb9eae64ae7e5c260f63
2021-05-18 06:42:10 -07:00
Mathias Fleig Mortensen
996e8ab87c Migrate Images plugin to ant.design
Summary: {gif:xcsasxxe}

Reviewed By: mweststrate

Differential Revision: D28463799

fbshipit-source-id: 280eaaf0ad5858b3507055a278d1f98fd5668fd0
2021-05-18 04:13:16 -07:00
Pascal Hartig
6e206fc054 Fix icon fetching
Reviewed By: nikoant

Differential Revision: D28505372

fbshipit-source-id: e0b001ae56cd9014bd830630ae354ad4d76c2588
2021-05-18 03:45:31 -07:00
Michel Weststrate
0227a7ab8a Fix performance issue
Summary:
Fix performance issue in rendering sidebars

Noticed during debugging that sidebars are continuously re-rendering if the mouse is on top of them, which is caused by the mouseMove handler of resizable containers always updating the state with a fresh object, causing a render (see yellow rectangles in test plan). Short circuited this by checking if the resize state should actually change and bailing out otherwise.

Reviewed By: nikoant

Differential Revision: D28441431

fbshipit-source-id: b3f125f3a392a5cf9b021a6636ba39b5a23d541c
2021-05-17 05:32:39 -07:00
Michel Weststrate
b947a65c51 Fix Network serialization
Summary:
Changelog: [Network] Fix import / export of binary data

Introduced proper serialization of binary data when creating a Flipper export.
Implements / solves https://github.com/facebook/flipper/issues/2308

Reviewed By: nikoant

Differential Revision: D28441021

fbshipit-source-id: 90b524bf2a5d85e373073b50a3ccf2bb29628ee0
2021-05-17 03:17:00 -07:00
Michel Weststrate
5242a81e94 Fix elements jumping around when making a selection
Summary:
Minor usability improvements, addresses: https://fb.workplace.com/groups/flippersupport/permalink/1133169680497022/.

Handcrafted scroll detection, to make sure elements aren't scroll unnecessarily

Reviewed By: nikoant

Differential Revision: D28438078

fbshipit-source-id: 037f1456a5b6f37a0ea1b9e8318e54b3fad382ec
2021-05-17 03:17:00 -07:00
Flipper Bot
877de95ca9 Flipper Release: v0.90.2
Summary: Releasing version 0.90.2

Reviewed By: passy

Differential Revision: D28447388

fbshipit-source-id: 7c7e943d3199c592f09eec617571a4cdfecbb4b5
2021-05-14 13:41:51 -07:00
Anton Nikolaev
0212da0ba5 Re-applied patch for new version of @emotion/cache
Summary: Current patch was created for the previous version and patch-package shows warning about that on each yarn install. This diff re-applies the patch for the new version by invoking `patch-package emotion/cache` as suggested in the warning.

Reviewed By: passy

Differential Revision: D28443089

fbshipit-source-id: 277f8cdb1fb675b19685d9e98cdfdae6878b9ebc
2021-05-14 10:25:21 -07:00
Anton Nikolaev
366752f424 Enforce version "0.0.0" in plugin sources
Summary: I've noticed that two plugins had wrong versions set and because of that they always published with the same version and not auto-updated. This diff fixes that and also adds safeguard which shows error on "yarn install" if some plugin packages has version set to something different from "0.0.0".

Reviewed By: passy

Differential Revision: D28443509

fbshipit-source-id: d982dbe05fa876717799d9464f900f2173b32f70
2021-05-14 10:23:11 -07:00
Flipper Bot
ba3e4500e8 Flipper Release: v0.90.1
Summary: Releasing version 0.90.1

Reviewed By: passy

Differential Revision: D28441602

fbshipit-source-id: c4d1798e493bcd43617b896d1faba9e943b35635
2021-05-14 07:34:52 -07:00
Pascal Hartig
b797fec6cc Daily dep bump
Summary: A bump a day keeps the dependabot away.

Reviewed By: mweststrate

Differential Revision: D28387658

fbshipit-source-id: 5b38b260c3a29b12ea942f18266d5ba74c16d4a1
2021-05-14 05:46:19 -07:00
Flipper Bot
0a3b817429 Flipper Release: v0.90.0
Summary: Releasing version 0.90.0

Reviewed By: mweststrate

Differential Revision: D28424374

fbshipit-source-id: 1ce8cde0fff12cdb6ff973d6824e065d6b735079
2021-05-13 15:33:42 -07:00
Michel Weststrate
9261f0dd40 Fix scroll bar regression
Summary:
Changelog: [Logs] Fix regression causing the scrollbars to be hidden. This diff fixes a regression where the Logs plugin was no longer scrollable (and scrolls indefinitely, killing perf).

As reported in https://fb.workplace.com/groups/flippersupport/permalink/1133775743769749/

The cause of the problem is the swap between the `PluginContainer` and `outOfContentsContainer`.

The deeper root that caused in the first place, is that containers use a `flex: 1` layout, which gets interpreted as `flex: 1 1 0%` (grow, shrink, 0% by default), where it was always inteded to be `flex: 1 1 0` (grow, shrink, by default zero pixels). In practice that difference usually doesn't matter. But sometimes it does... See https://stackoverflow.com/a/42630660/1983583

My whole life has been a lie up to this point.

Will trigger a new release after landing this.

Reviewed By: nikoant

Differential Revision: D28422966

fbshipit-source-id: 3ebd5f8ae76e032c5d698154b021df8ebef2c757
2021-05-13 13:52:39 -07:00
Anton Nikolaev
b5d8f6c63d Output unpacked plugin dir in addition to tar from "build-plugin" command
Summary: "plugin-build" command will produce dir with unpacked plugin sources in addition to tar package. This is required because for publishing to Marketplace we need to retrieve few files from the output package, like "readme.md" and "package.json" and it's better to have it already unpacked rather than pack and then unpack to get these files.

Reviewed By: passy

Differential Revision: D28409930

fbshipit-source-id: 51c8eeb848a72850a2f126eb91a563d52851ed41
2021-05-13 05:32:07 -07:00
Flipper Bot
b8177afbc7 Flipper Release: v0.89.0
Summary: Releasing version 0.89.0

Reviewed By: mweststrate

Differential Revision: D28408535

fbshipit-source-id: 602c6c6f416393e294fdaa10b24071d97f3ac0c2
2021-05-13 02:16:10 -07:00
dependabot[bot]
0de4f11e15 Bump react-markdown from 5.0.3 to 6.0.2 in /desktop (#2298)
Summary:
Bumps [react-markdown](https://github.com/remarkjs/react-markdown) from 5.0.3 to 6.0.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/remarkjs/react-markdown/releases">react-markdown's releases</a>.</em></p>
<blockquote>
<h2>6.0.0</h2>
<p>Please see <a href="https://github.com/remarkjs/react-markdown/blob/main/changelog.md#600---2021-04-15"><code>changelog.md</code></a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/remarkjs/react-markdown/blob/main/changelog.md">react-markdown's changelog</a>.</em></p>
<blockquote>
<h2>6.0.2 - 2021-05-06</h2>
<ul>
<li><a href="https://github.com/remarkjs/react-markdown/commit/cefc02d"><code>cefc02d</code></a>
Add string type for <code>className</code>s</li>
<li><a href="https://github.com/remarkjs/react-markdown/commit/6355e45"><code>6355e45</code></a>
Fix to pass <code>vfile</code> to plugins</li>
<li><a href="https://github.com/remarkjs/react-markdown/commit/5cf6e1b"><code>5cf6e1b</code></a>
Fix to add warning when non-strings are given as <code>children</code></li>
</ul>
<h2>6.0.1 - 2021-04-23</h2>
<ul>
<li><a href="https://github.com/remarkjs/react-markdown/commit/2e956be"><code>2e956be</code></a>
Fix whitespace in table elements</li>
<li><a href="https://github.com/remarkjs/react-markdown/commit/d36048a"><code>d36048a</code></a>
Add architecture section to readme</li>
</ul>
<h2>6.0.0 - 2021-04-15</h2>
<p>Welcome to version 6.
This a major release and therefore contains breaking changes.</p>
<h3>Change <code>renderers</code> to <code>components</code></h3>
<p><code>react-markdown</code> used to let you define components for <em>markdown</em> constructs
(<code>link</code>, <code>delete</code>, <code>break</code>, etc).
This proved complex as users didn’t know about those names or markdown
peculiarities (such as that there are fully formed links <em>and</em> link references).</p>
<p>See [<strong><a href="https://github-redirect.dependabot.com/remarkjs/react-markdown/issues/549">GH-549</a></strong>](<a href="https://github-redirect.dependabot.com/remarkjs/react-markdown/issues/549">remarkjs/react-markdown#549</a>) for more
on why this changed.
See <a href="https://github.com/remarkjs/react-markdown#appendix-b-components"><strong>Appendix B: Components</strong> in
<code>readme.md</code></a>
for more on components.</p>

<p>Before (<strong>broken</strong>):</p>
<pre lang="jsx"><code>&lt;Markdown
  renderers={{
    // Use a fancy hr
    thematicBreak: ({node, ...props}) =&gt; &lt;MyFancyRule {...props} /&gt;
  }}
&gt;{`***`}&lt;/Markdown&gt;
</code></pre>
<p>Now (<strong>fixed</strong>):</p>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="8ed18dafa8"><code>8ed18da</code></a> 6.0.2</li>
<li><a href="cefc02d749"><code>cefc02d</code></a> Add string type for <code>className</code>s</li>
<li><a href="6355e45179"><code>6355e45</code></a> Fix to pass <code>vfile</code> to plugins</li>
<li><a href="5cf6e1b18f"><code>5cf6e1b</code></a> Fix to add warning when non-strings are given as <code>children</code></li>
<li><a href="592599fda4"><code>592599f</code></a> Update dev-dependencies</li>
<li><a href="15b4757082"><code>15b4757</code></a> 6.0.1</li>
<li><a href="4f5e62aa13"><code>4f5e62a</code></a> Fix unneeded <code>ts-ignore</code></li>
<li><a href="2e956be119"><code>2e956be</code></a> Fix whitespace in table elements</li>
<li><a href="d36048a6cb"><code>d36048a</code></a> Add architecture section to readme</li>
<li><a href="a2b611babc"><code>a2b611b</code></a> Update <code>react-syntax-highlighter</code> example</li>
<li>Additional commits viewable in <a href="https://github.com/remarkjs/react-markdown/compare/5.0.3...6.0.2">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=react-markdown&package-manager=npm_and_yarn&previous-version=5.0.3&new-version=6.0.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

 ---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>

Pull Request resolved: https://github.com/facebook/flipper/pull/2298

Reviewed By: mweststrate

Differential Revision: D28323791

Pulled By: cekkaewnumchai

fbshipit-source-id: c5582e7cd357eb5f3c93c7c3d2df81bb2818e105
2021-05-12 15:10:48 -07:00
Michel Weststrate
96cbc81e63 Fix connection and DOM management of React DevTools
Summary:
This diff fixes several existing issues in the React DevTools:

Every time the user opened the plugin we re-instantiated the devtools, which has a few problems: 1) it looses all state (e.g. selection), and 2) this causes the tools to start a websocket listener on a new port, that was never cleaned up, or ever used, since React Native always connects to port 8097 anyway.

To preserve the state the idea of the original implementation was to move the devTools out of the current view, without disposing it. This actually didn't work in practice due to a faulty implementation, causing a full reinialization of the tools every time. Addressed this by reusing the mechanism that is used by the Hermes debugger tools as well.

By properly managing the port (e.g. closing it), there is no need to start (in vain) the devTools on a random port.

Port reversal for physical devices needs to happen only once, in principle upon connecting the device, so moved it to the device logic, which also avoids the need to hack into the global Flipper store.

Avoiding recreating the devTools makes plugin switching near instant, instead of needing to wait for a few seconds until the devTools connect.

When multiple apps are connected the behavior is now consistent: the application that refreshed last will be the one visible in the devTools. (That is still pretty suboptimal, but at least predicable and not a use case that is requested / supported in the DevTools themselves atm)

There is still ugly DOM business going on, did put that in a stand alone component for now.
Didn't extract the shared logic with Hermes plugin yet, but did verify both are still working correctly.

Changelog: [React DevTools] Several improvements that should improve the overal experience, the plugin should load much quicker and behave more predictably.

Reviewed By: bvaughn

Differential Revision: D28382587

fbshipit-source-id: 0f2787b24fa2afdf5014dbf1d79240606405199a
2021-05-12 14:21:53 -07:00
Michel Weststrate
ab17bbd555 Allow using global devTools
Summary:
Currently Flipper embeds the React devTools, and as a result the version of the React devTools is strictly coupled to the Flipper version. This is troublesome when connecting to (slightly) older React Native versions, that use a different version of the tools. That results in errors like this one:

{F615263497}

This diff introduces a feature to use globally installed devTools instead of the embedded ones, giving users the flexibility to pick their own version.

{F615263580}

This addresses

https://fb.workplace.com/groups/flippersupport/permalink/1125669971246993/
https://github.com/facebook/flipper/issues/2250
https://github.com/facebook/flipper/issues/2224

Changelog: [React DevTools] It is now possible to switch between the embedded and globally installed version of the React DevTools. This will enable the React DevTools to connect to older RN versions. Fixes #2250, #2224

Reviewed By: passy

Differential Revision: D28382586

fbshipit-source-id: a5386a5043933acda5aab2db74078bf7ceb105ca
2021-05-12 14:21:53 -07:00
Michel Weststrate
4062950fbe Convert React DevTools to Sandy
Summary:
Converted ReactDevTools to Sandy, no real semantic changes. Will add those in next diffs.

Made some minor flow optimizations.

The port forwarding setup interacted directly with the Flipper store, so made an escape hatch for that. Will clean that up again in next diffs.

Reviewed By: passy

Differential Revision: D28380055

fbshipit-source-id: 053979fd10bf3b62089a4f1e27b0e02b4b05e2e1
2021-05-12 14:21:53 -07:00
Anton Nikolaev
e7670e4e42 Fix retrieving versions for release builds
Summary: Fixed release build version retrieval

Reviewed By: passy, cekkaewnumchai

Differential Revision: D28378502

fbshipit-source-id: 345e7fac327a072a5c84cfa92bf4af78b6829654
2021-05-12 07:49:14 -07:00
Anton Nikolaev
443152aae7 Fix antd patch
Summary: Current master is broken, because every click to button treated as two clicks. That leads to weird issues, e.g. enabling / disabling plugins doesn't work because it quickly enables plugin and then disables it back so it looks like nothing happens.

Reviewed By: passy

Differential Revision: D28364660

fbshipit-source-id: 1ded86c42b6a4a78f3a0f29c942b852f16b4f2d3
2021-05-12 07:49:13 -07:00
Anton Nikolaev
ef091e7a07 Allow specifying min required Flipper version on "build-plugin" command call
Summary: Added an arg for "build-plugin" command to easily set min required flipper version when plugin is packaged. Before that we only saved engine version in Marketplace metadata, but it's better to save it into the package as well, so we can check compatibility for installed packages even when we have no Marketplace metadata for them.

Reviewed By: passy

Differential Revision: D28350276

fbshipit-source-id: 916d891540263a1f99c1f6d2033eb13e1c36d78f
2021-05-12 07:49:13 -07:00
Anton Nikolaev
c0c9363a1f Ignore flipper version when computing plugin checksum
Summary: To be able to save min required Flipper version into the package.json, we need to ignore it when computing hashsum. Otherwise hashsum of plugin will depend on the current Flipper version and so bumping Flipper will change hashsums of all plugins.

Reviewed By: passy

Differential Revision: D28342965

fbshipit-source-id: 289ec7e673bce1f2b1cbb402b56c5b1b31fd84da
2021-05-12 07:49:13 -07:00
Anton Nikolaev
a8ca142c9a Load only compatible plugins on startup
Summary: We currently filtering out incompatible versions from marketplace. This diff also add filtering for incompatible installed plugins on Flipper startup to ensure we always load the latest compatible version.

Reviewed By: passy

Differential Revision: D28341891

fbshipit-source-id: 83afc14a3c07e1763e1bd146251e6d3b71a66248
2021-05-12 07:49:13 -07:00
Anton Nikolaev
252322f525 Fix a bug with duplicated device plugins in "Detected in App" list
Summary: When crash reporter plugin is not installed in Flipper, it can appear duplicated in "Detected in App" list. This diff fixes that.

Reviewed By: passy

Differential Revision: D28325072

fbshipit-source-id: 92011f1f10c6633fbd31ea886fe53f352057f4f8
2021-05-12 07:49:13 -07:00
Anton Nikolaev
00851c6b5d Fix bug with plugin re-installation after uninstallation
Summary:
Fixed a bug when plugin installation status wouldn't be saved between sessions when plugin uninstalled and then re-installed again. Before the fix, after Flipper restart, such plugin was uninstalled again because its package name was not removed from "uninstalledPlugins" state. This was because plugin id was used by mistake instead of name in few places.

To try avoiding this issue in future I've also renamed "uninstalledPlugins" to "uninstalledPluginNames" to make it more clear than package name should be used there rather than ID. As this field is persisted, I also added migration which moves data to the renamed field.

Reviewed By: passy

Differential Revision: D28314447

fbshipit-source-id: fbe3edc258b78fe7fbb0d966f93aabcdf3b66d4b
2021-05-12 07:49:13 -07:00
Anton Nikolaev
22974130c8 Fix metro patches after updating metro version
Summary: There was a warning in console on `yarn install` saying that patches should be reapplied because "metro" and "metro-runtime" updated, so I called `patch-package metro metro-runtime` to re-apply patches.

Reviewed By: passy

Differential Revision: D28312817

fbshipit-source-id: 5e8bcee2d75a50099e71ad9c2812c14ee2c7ce9c
2021-05-12 07:49:13 -07:00
Anton Nikolaev
0dce247741 Fix bug with unnecessary plugin auto-update attempts
Summary: I've noticed that Flipper is trying to schedule auto-update for some plugins on every startup even though they are already updated. I found this happens because of a race condition when the auto-updater can be triggered before plugins initialised. This diff fixes that.

Reviewed By: passy

Differential Revision: D28312086

fbshipit-source-id: 66b0bd2aa9dfede1737d565b1e7e7845c940405e
2021-05-12 07:49:13 -07:00
Anton Nikolaev
32f276b499 Configure jest to automatically pick changes in typescript modules without need to compile them using tsc
Summary: Right now, if you are changing something in one of the modules, e.g. in "flipper-plugin", you'll need to compile the changed module using `tsc` before running tests, otherwise `jest` won't pick up the changes. `yarn test` has a step to run `tsc` before tests, however when tests are started simply by `jest` command, e.g. by VSCode plugin, then `tsc` is not automatically called before tests. This diff makes things easier by configuring `jest` to automatically transpile imported modules. This means simply running `jest` command will automatically pick up and automatically transpile all the changes.

Reviewed By: passy

Differential Revision: D28310318

fbshipit-source-id: 77e9b91daa59a46ce64b1b70eb9a998d7b72de00
2021-05-12 07:49:13 -07:00
Anton Nikolaev
28fd8da615 Install only compatible plugins
Summary: Currently, when user installs a new plugin which was not installed before that, Flipper always takes the latest available version of it. This is not correct, because the latest version might be incompatible with the currently running version of Flipper. To avoid that, instead of always using just the latest version we will be using the most recent version which is compatible with the current Flipper version.

Reviewed By: passy

Differential Revision: D28306505

fbshipit-source-id: 4258a456d6a5d92cbf48af55c0efb17ecf560b57
2021-05-12 07:49:13 -07:00
Anton Nikolaev
2b41fba704 Change Flipper version retrieving
Summary:
Changed retrieving of Flipper version. Now it will be always retrieved from package.json. Before this change we used "remote.app.getVersion()" API which instead returned electron version for dev builds, e.g. "11.2.3". This is not convenient, because we now use Flipper version to check plugin compatibility and unrelated Electron version here makes things more complicated. After this change, if version is not properly bumped then "0.0.0" will be used: 1) when running using "yarn start", 2) when local building with "yarn build --mac" without setting new version, 3) when running tests "yarn test".

In addition to that I added a new command-line argument and env var which allow overriding version number for Flipper. This is useful for testing plugin updates, because compatibility between plugins and Flipper is checked by comparing Flipper version with the min version set in the plugin metadata.

Reviewed By: passy

Differential Revision: D28287354

fbshipit-source-id: 2f9482080e3612b95a24300050d98150c6db6cb7
2021-05-12 07:49:13 -07:00
Anton Nikolaev
21ce694fd5 Retrieve multiple plugin versions from marketplace
Summary: Retrieve multiple plugin versions so we later can choose a version which is compatible with the current version of Flipper (e.g. if user is on old version of Flipper).

Reviewed By: passy

Differential Revision: D28284121

fbshipit-source-id: 3ed9cffb3e9702fc65d19b73fc8cc162b776b7c9
2021-05-12 07:49:13 -07:00
Pascal Hartig
69c7876be9 Enforce react/jsx-boolean-value
Summary: yarn fix results.

Reviewed By: nikoant

Differential Revision: D28329714

fbshipit-source-id: 564aa24bcdb4bc6cdea67dfad10a077a9c817a2d
2021-05-11 10:14:05 -07:00