Commit Graph

135 Commits

Author SHA1 Message Date
Anton Nikolaev
dfbf66408a Fix search by query in Plugin Manager
Summary: I accidently broke search by query in a previous diff, so fixing it here

Reviewed By: passy

Differential Revision: D23842187

fbshipit-source-id: 9fcc7a46048ff99e1bf26c8a70ef0240b38018cb
2020-09-22 10:35:55 -07:00
Anton Nikolaev
f03d5d94ed Remove plugin compilation and loading from startup hot path
Summary:
- Removed compilation on startup which is not required anymore after switching to plugin spec v2.
- Removed from Node process ("static" package) all the dependencies which are not required anymore:  e.g. metro, babel etc.
- Plugin loading code from node process moved to browser process and made asyncronous.

Some expected benefits after these changes:
1) Reduced size of Flipper bundle (~4.5MB reduction for lzma package in my tests) as well as startup time. It's hard to say the exact startup time difference as it is very machine-dependent, and on my machine it was already fast ~1500ms (vs 5500ms for p95) and decreased by just 100ms. But I think we should definitely see some improvements on "launch time" analytics graph for p95/p99.
2) Plugin loading is async now and happens when UI is already shown, so perceptive startup time should be also better now.
3) All plugin loading code is now consolidated in "app/dispatcher/plugins.tsx" instead of being splitted between Node and Browser processes as before. So it will be easier to debug plugin loading.
4) Now it is possible to apply updates of plugins by simple refresh of browser window instead of full Electron process restart as before.
5) 60% less code in Node process. This is good because it is harder to debug changes in Node process than in Browser process, especially taking in account differences between dev/release builds. Because of this Node process often ended up broken after changes. Hopefully now it will be more stable.

Changelog: changed the way of plugin loading, and removed obsolete dependencies, which should reduce bundle size and startup time.

Reviewed By: passy

Differential Revision: D23682756

fbshipit-source-id: 8445c877234b41c73853cebe585e2fdb1638b2c9
2020-09-16 06:32:58 -07:00
Anton Nikolaev
75e7261d1e Remove support for plugin format v1
Summary:
Do not list plugins packaged with format v1 in Plugin Manager.

Changelog: removed support for plugins packaged using legacy format (v1), so they won't appear in Plugin Manager anymore.

Reviewed By: passy

Differential Revision: D23681402

fbshipit-source-id: 1c9496ba6b739069d67228a0f4250f2f01aabd4d
2020-09-16 06:32:58 -07:00
Anton Nikolaev
e48707151a Move the code related to plugin loading / installation to "flipper-plugin-lib"
Summary:
Sorry for so long diff, but actually there are no functional changes, just refactoring to make further changes of Plugin Manager easier to understand.

I've de-coupled the code related to plugin management from UI code and moved it from PluginInstaller UI component (which will be replaced soon by new UI) to "flipper-plugin-lib".  So pretty much everything related to plugin discovery and installation now consolidated in this package.

Additionally, this refactoring enables re-using of plugin management code in "flipper-pkg", e.g. to create CLI command for plugin installation from NPM, e.g.: `flipper-pkg install flipper-plugin-reactotron`.

Reviewed By: passy

Differential Revision: D23679346

fbshipit-source-id: 82e7b9de9afa08c508c1b228c2038b4ba423571c
2020-09-16 06:32:58 -07:00
generatedunixname89002005306973
2fcab458bf Flipper Release: v0.57.0
Summary: Releasing version 0.57.0

Reviewed By: passy

Differential Revision: D23729543

fbshipit-source-id: 0156c0214b3665815ca648e995b78bb7cb2eba42
2020-09-16 04:27:08 -07:00
generatedunixname89002005306973
a47ac961f7 Flipper Release: v0.56.0
Summary: Releasing version 0.56.0

Reviewed By: jknoxville

Differential Revision: D23597790

fbshipit-source-id: e0f141eebe81e46619c71c8174fb78b1aaf2c035
2020-09-09 06:46:54 -07:00
root@sandcastle1585.atn1.facebook.com
66692dd722 Flipper Release: v0.55.0
Summary: Releasing version 0.55.0

Reviewed By: priteshrnandgaonkar

Differential Revision: D23444759

fbshipit-source-id: b569ff8e8dce76028e323f906e7415689ae8b1c5
2020-09-01 03:54:11 -07:00
root@sandcastle962.atn2.facebook.com
36825675d1 Flipper Release: v0.54.0
Summary: Releasing version 0.54.0

Reviewed By: mweststrate

Differential Revision: D23314243

fbshipit-source-id: ce2561b356f082613f656fedac9c08b440845bb1
2020-08-25 08:25:04 -07:00
root@sandcastle1328.prn2.facebook.com
f1c3bf8697 Flipper Release: v0.53.0
Summary: Releasing version 0.53.0

Reviewed By: priteshrnandgaonkar

Differential Revision: D23213490

fbshipit-source-id: 66dfa59dbae33d372bad9e284f9773e2ab88487b
2020-08-19 08:22:00 -07:00
Pascal Hartig
6170bfea41 Upgrade fs-extra
Summary: Bringing this to the latest version everywhere.

Reviewed By: priteshrnandgaonkar

Differential Revision: D23051537

fbshipit-source-id: 5cad59ab6fcc57fc72df8ace985a7b5f39de2bda
2020-08-18 03:32:09 -07:00
generatedunixname89002005306973
d15ae99601 Flipper Release: v0.52.1
Summary: Releasing version 0.52.1

Reviewed By: passy

Differential Revision: D22976342

fbshipit-source-id: a4857df03cd1142615754a52f69d0f1578175f18
2020-08-06 10:14:30 -07:00
Anton Nikolaev
7e84c8e880 Support plugins that contain a scope in their name (#1427)
Summary: Pull Request resolved: https://github.com/facebook/flipper/pull/1427

Reviewed By: mweststrate

Differential Revision: D22868784

fbshipit-source-id: c332e5b05e3fccb74cf5fdcdecf15b8f2e8c5006
2020-08-04 10:52:59 -07:00
generatedunixname89002005306973
f01b84be27 Flipper Release: v0.52.0
Summary: Releasing version 0.52.0

Reviewed By: passy

Differential Revision: D22921075

fbshipit-source-id: 4cab9552dcd5ff1a64d20e1e771a4f5173d54860
2020-08-04 06:15:23 -07:00
generatedunixname89002005306973
5dc98bab9d Flipper Release: v0.51.0
Summary: Releasing version 0.51.0

Reviewed By: nikoant

Differential Revision: D22728768

fbshipit-source-id: 49eabdccc7fd335401618f91b890e94fda11b23f
2020-07-24 10:03:20 -07:00
dependabot[bot]
9b5c71eb90 Bump globby from 10.0.2 to 11.0.1 in /desktop (#1377)
Summary:
Bumps [globby](https://github.com/sindresorhus/globby) from 10.0.2 to 11.0.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/sindresorhus/globby/releases">globby's releases</a>.</em></p>
<blockquote>
<h2>v11.0.1</h2>
<ul>
<li>Normalize file paths to posix for gitignore calculation (<a href="https://github-redirect.dependabot.com/sindresorhus/globby/issues/143">https://github.com/facebook/flipper/issues/143</a>)  f2bdce6</li>
</ul>
<p><a href="https://github.com/sindresorhus/globby/compare/v11.0.0...v11.0.1">https://github.com/sindresorhus/globby/compare/v11.0.0...v11.0.1</a></p>
<h2>v11.0.0</h2>
<h3>Breaking</h3>
<ul>
<li>Require Node.js 10  4a471af</li>
<li>Get rid of <code>glob</code> dependency (<a href="https://github-redirect.dependabot.com/sindresorhus/globby/issues/135">https://github.com/facebook/flipper/issues/135</a>)  d4681a4
If you passed in options to <code>globby.hasMagic()</code>, you need to update to use the <a href="https://github.com/mrmlnc/fast-glob#options-3">new options</a>.</li>
</ul>
<p><a href="https://github.com/sindresorhus/globby/compare/v10.0.2...v11.0.0">https://github.com/sindresorhus/globby/compare/v10.0.2...v11.0.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="39b7636370"><code>39b7636</code></a> 11.0.1</li>
<li><a href="f2bdce6534"><code>f2bdce6</code></a> Normalize file paths to posix for gitignore calculation (<a href="https://github-redirect.dependabot.com/sindresorhus/globby/issues/143">https://github.com/facebook/flipper/issues/143</a>)</li>
<li><a href="45ac58a95d"><code>45ac58a</code></a> 11.0.0</li>
<li><a href="3c93fa16bc"><code>3c93fa1</code></a> Re-enable test for <a href="https://github-redirect.dependabot.com/sindresorhus/globby/issues/97">https://github.com/facebook/flipper/issues/97</a></li>
<li><a href="4a471af4ca"><code>4a471af</code></a> Require Node.js 10</li>
<li><a href="d4681a4d58"><code>d4681a4</code></a> Get rid of <code>glob</code> dependency (<a href="https://github-redirect.dependabot.com/sindresorhus/globby/issues/135">https://github.com/facebook/flipper/issues/135</a>)</li>
<li>See full diff in <a href="https://github.com/sindresorhus/globby/compare/v10.0.2...v11.0.1">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=globby&package-manager=npm_and_yarn&previous-version=10.0.2&new-version=11.0.1)](https://help.github.com/articles/configuring-automated-security-fixes)

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/1377

Reviewed By: mweststrate

Differential Revision: D22528235

Pulled By: passy

fbshipit-source-id: 8590d3d007adf438deeaea7d79d4820ca860dad2
2020-07-15 06:44:35 -07:00
Anton Nikolaev
9031638dca Show plugin title instead of plugin name on update notification
Summary: It's better to use title so user can easily match which plugin updated

Reviewed By: mweststrate

Differential Revision: D22546284

fbshipit-source-id: 5875f1b22e7637df45b8ae427d51e639f0867e2c
2020-07-15 02:53:33 -07:00
generatedunixname89002005306973
fff723d5ef Flipper Release: v0.50.0
Summary: Releasing version 0.50.0

Reviewed By: passy

Differential Revision: D22501533

fbshipit-source-id: 0896efd4eb2b2bb5f557d573526db91dc5dcd1de
2020-07-13 04:15:23 -07:00
dependabot[bot]
150632a2e9 Bump @types/fs-extra from 8.1.0 to 9.0.1 in /desktop (#1362)
Summary:
Bumps [types/fs-extra](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/fs-extra) from 8.1.0 to 9.0.1.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/fs-extra">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@types/fs-extra&package-manager=npm_and_yarn&previous-version=8.1.0&new-version=9.0.1)](https://help.github.com/articles/configuring-automated-security-fixes)

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/1362

Reviewed By: mweststrate

Differential Revision: D22435350

Pulled By: passy

fbshipit-source-id: 029817966f51b9be3ea0b4e601d59cb63cbe154d
2020-07-10 02:12:32 -07:00
Michel Weststrate
8b2d8498e6 Upgrade to TypeScript 3.9
Summary:
Upgrading to TypeScript 3.9 so that we can use `// ts-expect-error`, that allows us to basically write unit tests for typings.

Fixed the typescript path in `settings.json`, because otherwise VSCode kept picking the built-in version (3.8.3 atm) of ts when opening the `sonar` folder as workspace.

Reviewed By: passy

Differential Revision: D22255818

fbshipit-source-id: ae54aedb237445f32f1797b4290656dbfb0e528f
2020-07-01 09:12:36 -07:00
Michel Weststrate
845c9b67f5 Read flipper-plugin from peer deps
Summary:
To know whether plugins should be mounted with the old setup or new setup (with a Provided / context based api), we need to be able to recognize whether a plugin is written with the old or new setup.

We do this by checking if the flipper-plugin dependency is declared as peer dependency. This we can to check for SDK compatibility as well.

Reviewed By: jknoxville

Differential Revision: D22043085

fbshipit-source-id: 21afabb6e58d86253a464470f4690c51cced87ab
2020-07-01 09:12:35 -07:00
generatedunixname89002005306973
8000090eac Flipper Release: v0.49.0
Summary: Releasing version 0.49.0

Reviewed By: cekkaewnumchai

Differential Revision: D22307632

fbshipit-source-id: 105fc71f07a4827a5d6e54cf3200b22f800a5f1e
2020-06-30 06:33:04 -07:00
Pascal Hartig
011952d73c Flipper Release: v0.48.0
Summary: Releasing version 0.48.0

Reviewed By: mweststrate

Differential Revision: D22207960

fbshipit-source-id: 7f21ff151c4e5750646a6dd3e39690229a2e73a5
2020-06-25 02:32:47 -07:00
Pascal Hartig
f088d7ceec Update jest
Summary: Getting some warnings from ts-jest being potentially incompatible.

Reviewed By: nikoant

Differential Revision: D22184492

fbshipit-source-id: b0ff36bd63f45ca71957f882a08dcbedfdd5de87
2020-06-24 05:34:23 -07:00
generatedunixname89002005306973
43b9426ff4 Flipper Release: v0.47.0
Summary: Releasing version 0.47.0

Reviewed By: jknoxville

Differential Revision: D22089288

fbshipit-source-id: 0107d1f17cce8c9adc2b9c26d48a6d80797749be
2020-06-17 09:00:07 -07:00
Anton Nikolaev
ce6f8eea90 Attempt to fix tests on github (#1236)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/1236

I'm not quite sure why tests are failing on GitHub on Windows and Linux, while working well on MacOS. I cannot reproduce fail on my Windows machine. So will use this diff for debugging.

Reviewed By: jknoxville

Differential Revision: D21954828

fbshipit-source-id: bc88a67c4974c8453dcecee3128b354f0b1cb694
2020-06-10 09:18:06 -07:00
generatedunixname89002005306973
c0eb2648b7 Flipper Release: v0.46.0
Summary: Releasing version 0.46.0

Reviewed By: nikoant

Differential Revision: D21952711

fbshipit-source-id: 8681a244d64c50f2ad50f6c9c5e0ea766fd9ff20
2020-06-09 10:14:19 -07:00
Anton Nikolaev
bf62c8cbe4 Unit tests for finishinh plugin installation step
Summary: Added unit test covering finishing of plugin installation on Flipper startup

Reviewed By: mweststrate

Differential Revision: D21949628

fbshipit-source-id: a8b3a320c1ddd151ebbd63d7a6d596320ca8e25a
2020-06-09 04:58:37 -07:00
Anton Nikolaev
d27fa34505 Added module for test-utilities used across all packages
Summary: Added new package with test utilities re-used by other packages

Reviewed By: mweststrate

Differential Revision: D21949629

fbshipit-source-id: 8bfa959401669dc8911a1f647f417cafd92c2e4b
2020-06-09 04:58:37 -07:00
Anton Nikolaev
eeded4e32f Install plugins to pending directory first to enable installing new versions of existing plugins
Summary:
Install plugins to pending directory first to enable installing new versions of existing plugins. On startup Flipper moves all the plugins from pending directory into installed plugins directory.

Auto-update, after downloading a plugin package, will also extract it to "pending", so after restart update will automatically be applied.

Reviewed By: mweststrate

Differential Revision: D21929713

fbshipit-source-id: 141b106415e941156ae598cf810ab3bed8c76ced
2020-06-09 04:58:36 -07:00
Anton Nikolaev
9604e33f3a Fix snapshot tests failing on windows (#1229)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/1229

Fix snapshot tests which are currently failing on Windows.

Reviewed By: mweststrate

Differential Revision: D21928445

fbshipit-source-id: 85ad79f5e01204fedecbef6828c978f76c0380f8
2020-06-08 08:57:07 -07:00
Anton Nikolaev
db3f04a2d7 Use the single type representing plugins
Summary: Use interface PluginDetails everywhere where plugins are handled and removed PluginDefinition type which was effectively a subset of PluginDetails

Reviewed By: mweststrate

Differential Revision: D21927456

fbshipit-source-id: 434ebeef955b922cc11757e78fbba8dec05f1060
2020-06-08 08:57:07 -07:00
Anton Nikolaev
907cb9e3cc Read description from plugin's package json
Summary: Added "description" field to PluginDetails interface and read it from package.json

Reviewed By: passy

Differential Revision: D21927391

fbshipit-source-id: 0513637d3afa3d8be8e2bc8ee87cc1d77c5e2250
2020-06-08 08:57:07 -07:00
Anton Nikolaev
9324bef8cc Moved plugin installation utilities to "plugin-lib" module
Summary: Moved plugin installation utilities to "plugin-lib" module. There are no functional changes in this diff, just refactoring so that plugin installation utils can be re-used by different modules.

Reviewed By: passy

Differential Revision: D21927387

fbshipit-source-id: 340516a544f7cfdcc15d94660dcb74a012054531
2020-06-08 08:57:06 -07:00
Anton Nikolaev
ecfdeb2276 Make external typings re-usable across all the workspaces
Summary: Our external typings were only effective for the main "app" package. In this diff I've made them effective for all other workspaces too, and also cleaned up typescript configs.

Reviewed By: passy

Differential Revision: D21927361

fbshipit-source-id: ceb8009255583d969d79cc11b20dfe8b686f2fb3
2020-06-08 08:57:06 -07:00
Anton Nikolaev
339b786fb5 Added new package "flipper-plugin-lib" which contains re-usable code related to plugin installation
Summary: No functional changes, just refactoring for easier implementation of plugin updates installation

Reviewed By: passy

Differential Revision: D21902525

fbshipit-source-id: fbfa221a89b879b0d08127676b27df65ef63307d
2020-06-05 06:16:19 -07:00