Commit Graph

32 Commits

Author SHA1 Message Date
Anton Nikolaev
eba9bafb74 Fix running "insiders" dev build
Summary: Fixed passing parameter for running dev build as "insiders" via env var. It was broken before and it was only possible to pass it via command line.

Reviewed By: passy

Differential Revision: D26578901

fbshipit-source-id: a579ac5bb6e5527abbe978318bf0c0398f76f1fe
2021-02-23 05:07:44 -08:00
dependabot[bot]
ea4b8b8f8a Bump socket.io from 2.3.0 to 3.1.0 in /desktop (#1845)
Summary:
Bumps [socket.io](https://github.com/socketio/socket.io) from 2.3.0 to 3.1.0.
<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>3.1.0</h2>
<p>In order to ease the migration to Socket.IO v3, the v3 server is now able to communicate with v2 clients:</p>
<pre lang="js"><code>const io = require(&quot;socket.io&quot;)({
  allowEIO3: true // false by default
});
</code></pre>
<p>Note: the <code>allowEIO3</code> refers to the version 3 of the Engine.IO protocol which is used in Socket.IO v2</p>
<h3>Features</h3>
<ul>
<li>confirm a weak but matching ETag (<a href="https://github-redirect.dependabot.com/socketio/socket.io/issues/3485">#3485</a>) (<a href="161091dd4c">161091d</a>)</li>
<li><strong>esm:</strong> export the Namespace and Socket class (<a href="https://github-redirect.dependabot.com/socketio/socket.io/issues/3699">#3699</a>) (<a href="233650c222">233650c</a>)</li>
<li>add support for Socket.IO v2 clients (<a href="9925746c8e">9925746</a>)</li>
<li>add room events (<a href="155fa6333a">155fa63</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>allow integers as event names (<a href="1c220ddbf4">1c220dd</a>)</li>
</ul>
<h4>Links:</h4>
<ul>
<li>Milestone: -</li>
<li>Diff: <a href="https://github.com/socketio/socket.io/compare/3.0.5...3.1.0">https://github.com/socketio/socket.io/compare/3.0.5...3.1.0</a></li>
<li>Client release: <a href="https://github.com/socketio/socket.io-client/releases/tag/3.1.0">3.1.0</a></li>
<li>engine.io version:  <code>~4.1.0</code></li>
<li>ws version: <code>~7.4.2</code></li>
</ul>
<h2>3.0.5</h2>
<h3>Bug Fixes</h3>
<ul>
<li>properly clear timeout on connection failure (<a href="170b739f14">170b739</a>)</li>
</ul>
<h3>Reverts</h3>
<ul>
<li>restore the socket middleware functionality (<a href="bf54327421">bf54327</a>)</li>
</ul>
<h4>Links:</h4>
<ul>
<li>Milestone: -</li>
<li>Diff: <a href="https://github.com/socketio/socket.io/compare/3.0.4...3.0.5">https://github.com/socketio/socket.io/compare/3.0.4...3.0.5</a></li>
<li>Client release: <a href="https://github.com/socketio/socket.io-client/releases/tag/3.0.5">3.0.5</a></li>
<li>engine.io version:  <code>~4.0.6</code></li>
<li>ws version: <code>~7.4.2</code></li>
</ul>

</blockquote>
<p>... (truncated)</p>
</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>
<h1><a href="https://github.com/socketio/socket.io/compare/3.0.5...3.1.0">3.1.0</a> (2021-01-15)</h1>
<h3>Features</h3>
<ul>
<li>confirm a weak but matching ETag (<a href="https://github-redirect.dependabot.com/socketio/socket.io/issues/3485">#3485</a>) (<a href="161091dd4c">161091d</a>)</li>
<li><strong>esm:</strong> export the Namespace and Socket class (<a href="https://github-redirect.dependabot.com/socketio/socket.io/issues/3699">#3699</a>) (<a href="233650c222">233650c</a>)</li>
<li>add support for Socket.IO v2 clients (<a href="9925746c8e">9925746</a>)</li>
<li>add room events (<a href="155fa6333a">155fa63</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>allow integers as event names (<a href="1c220ddbf4">1c220dd</a>)</li>
</ul>
<h2><a href="https://github.com/socketio/socket.io/compare/3.0.4...3.0.5">3.0.5</a> (2021-01-05)</h2>
<h3>Bug Fixes</h3>
<ul>
<li>properly clear timeout on connection failure (<a href="170b739f14">170b739</a>)</li>
</ul>
<h3>Reverts</h3>
<ul>
<li>restore the socket middleware functionality (<a href="bf54327421">bf54327</a>)</li>
</ul>
<h2><a href="https://github.com/socketio/socket.io/compare/3.0.3...3.0.4">3.0.4</a> (2020-12-07)</h2>
<h2><a href="https://github.com/socketio/socket.io/compare/3.0.2...3.0.3">3.0.3</a> (2020-11-19)</h2>
<h2><a href="https://github.com/socketio/socket.io/compare/3.0.1...3.0.2">3.0.2</a> (2020-11-17)</h2>
<h3>Bug Fixes</h3>
<ul>
<li>merge Engine.IO options (<a href="43705d7a91">43705d7</a>)</li>
</ul>
<h2><a href="https://github.com/socketio/socket.io/compare/3.0.0...3.0.1">3.0.1</a> (2020-11-09)</h2>
<h3>Bug Fixes</h3>
<ul>
<li>export ServerOptions and Namespace types (<a href="https://github-redirect.dependabot.com/socketio/socket.io/issues/3684">#3684</a>) (<a href="f62f180eda">f62f180</a>)</li>
<li><strong>typings:</strong> update the signature of the emit method (<a href="50671d984a">50671d9</a>)</li>
</ul>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="f05a4a6f82"><code>f05a4a6</code></a> chore(release): 3.1.0</li>
<li><a href="2c883f5d4e"><code>2c883f5</code></a> chore: bump socket.io-adapter version</li>
<li><a href="161091dd4c"><code>161091d</code></a> feat: confirm a weak but matching ETag (<a href="https://github-redirect.dependabot.com/socketio/socket.io/issues/3485">#3485</a>)</li>
<li><a href="d52532b7be"><code>d52532b</code></a> docs: add other client implementations (<a href="https://github-redirect.dependabot.com/socketio/socket.io/issues/3593">#3593</a>)</li>
<li><a href="6b1d7901db"><code>6b1d790</code></a> docs(examples): Improve the chat example with more ES6 features (<a href="https://github-redirect.dependabot.com/socketio/socket.io/issues/3240">#3240</a>)</li>
<li><a href="b55892ae80"><code>b55892a</code></a> docs: add run on repl.it badge to README (<a href="https://github-redirect.dependabot.com/socketio/socket.io/issues/3617">#3617</a>)</li>
<li><a href="233650c222"><code>233650c</code></a> feat(esm): export the Namespace and Socket class (<a href="https://github-redirect.dependabot.com/socketio/socket.io/issues/3699">#3699</a>)</li>
<li><a href="9925746c8e"><code>9925746</code></a> feat: add support for Socket.IO v2 clients</li>
<li><a href="de8dffd252"><code>de8dffd</code></a> refactor: strict type check in if expressions (<a href="https://github-redirect.dependabot.com/socketio/socket.io/issues/3744">#3744</a>)</li>
<li><a href="f8a66fd11a"><code>f8a66fd</code></a> chore(release): 3.0.5</li>
<li>Additional commits viewable in <a href="https://github.com/socketio/socket.io/compare/2.3.0...3.1.0">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=2.3.0&new-version=3.1.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/1845

Reviewed By: mweststrate

Differential Revision: D25945568

Pulled By: priteshrnandgaonkar

fbshipit-source-id: 31e4955729b2ce16de88243e9520429f59922d58
2021-01-19 18:45:38 -08:00
Michel Weststrate
9cdb36ec0e Add --public-build option to start an OSS like build of Flipper
Summary: This diff adds the `--public-build` option which allows run a devServer emulating the OSS version of flipper. Technical details are explained in the comments.

Reviewed By: passy, nikoant

Differential Revision: D25944966

fbshipit-source-id: 540855808179582752b8aa646f0b8afd4b78396f
2021-01-18 06:48:03 -08:00
Anton Nikolaev
c14bab3677 Unbundle less popular plugins for Insiders builds
Summary: Unbundle most of plugins from Insiders version of Flipper. Users will need to install them from Marketplace.

Reviewed By: passy

Differential Revision: D25558043

fbshipit-source-id: 648b0d4c83d9096972b5463cdcaa3de23426bdda
2020-12-15 09:31:59 -08:00
Anton Nikolaev
bd01b58566 Sandy-based plugin auto-update UI
Summary:
New UX/UI for plugin auto-updates based on Sandy:
- disabled plugins auto-updated silently without any notifications as there is no active state for them so there is nothing to loose.
- enabled plugins can have some state and user can actually work with them, so we cannot reload them automatically. Instead, we show notification in the top of the plugin container asking user to reload the plugin when she is ready.
- if the auto-updated plugin failed to reload - show error notification.
- for non-sandy we continue using notifications as before.

Reviewed By: mweststrate

Differential Revision: D25530384

fbshipit-source-id: de3d0565ef0b930c9343b9e0ed07a4acb51885be
2020-12-15 09:31:57 -08:00
Anton Nikolaev
f3e1a48ff3 Plugin Marketplace state refresh and cache
Summary:
Separate dispatcher for periodic refreshing available plugins data from the Marketplace backend and caching it locally.

The plugin auto update downloader subscribes to these state refreshes and automatically schedules plugin update downloads when required.

Reviewed By: passy

Differential Revision: D25360897

fbshipit-source-id: 5b6d95b63ff47b8ae9ad8b12e2480d1fed524ca5
2020-12-15 09:31:54 -08:00
Anton Nikolaev
56361debb2 Differentiate insider builds from stable builds
Summary: Each build will have an embedded file specifying the target release channel for the build. This allows us to do some customisations, e.g. show "Insiders" label in the title and enable Sandy by default for insiders builds.

Reviewed By: jknoxville

Differential Revision: D25399045

fbshipit-source-id: 8e26d0754d0713ced823f86b30b54491d55b4d97
2020-12-08 12:38:02 -08:00
Michel Weststrate
42ef4d59e6 Introduce FLIPPER_ENABLE_ALL_GKS dev option
Summary: Was tired off figuring out GK's to be able to debug a plugin, so added a flag that allows me  to start Flipper with all plugins enabled :)

Reviewed By: passy

Differential Revision: D25301773

fbshipit-source-id: 668b92c4ddbbeb3f4b056035de394800bbfa5377
2020-12-03 04:41:01 -08:00
Anton Nikolaev
d4debc4185 Use dotenv for dev mode customisation
Summary: Allow using of .env file to pass env vars to be used in dev mode. Currently this allow to configure defaults for enabling fast refresh, automatic opening of dev tools and plugins to load.

Reviewed By: passy

Differential Revision: D24398938

fbshipit-source-id: 30a5d86b7906a7723a404cf84a1b8d50ae497dbc
2020-10-22 11:35:53 -07:00
Anton Nikolaev
2d9cf5a905 Option to load only specific plugins in dev mode
Summary: Currently we load all the plugins even if they are not required in dev mode, e.g. when you are developing a specific plugin. This diff adds an env var and command-line option to specify exact list of plugins to load. This makes dev mode startup faster and consume less memory.

Reviewed By: passy

Differential Revision: D24394146

fbshipit-source-id: 42a78c1ffb2632e657c2411e34e9c80fff18df3a
2020-10-22 11:35:53 -07:00
Michel Weststrate
ecf4cff7cf Fix most lint warnings
Summary:
I noticed that after the typescript upgrade, I got several weird positives from ESLint (like unused parameters in a type definition, which are obviously always unused, e.g. `type onClick = (e: Event) => void`). After some investigation, it turned out these warnings are generated by eslint, but that those rules should be performaned by typescript/eslint instead. For future reference to which rules this applies:

https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/README.md#extension-rules

Updated the config, and while at it, fixed all warnings in our codebase, except for `react-hooks/exhaustive-deps` warnings, since those require semantic changes.

This reduces the amount of eslint warnings from 86 to 39.

Reviewed By: passy

Differential Revision: D23905630

fbshipit-source-id: 0557708fd9ec6b17840a3c191e7d3baf225bdf23
2020-09-28 01:42:48 -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
Pascal Hartig
6233116fed Add devserver check
Reviewed By: jknoxville

Differential Revision: D22864430

fbshipit-source-id: ce37e6abeb3b152aedb2013bc9cd548807cad7b3
2020-07-31 04:57:19 -07:00
Michel Weststrate
2383dc85f8 Initialized flipper-plugin library
Summary: Set up an initial library which can (should) be used by plugins in the future.

Reviewed By: jknoxville

Differential Revision: D22019554

fbshipit-source-id: 502b14b34b2c9c117cea377ab6ebbf150e6faee9
2020-07-01 09:12:35 -07:00
Anton Nikolaev
74a27aafcc Disable plugin auto-update in dev mode
Summary: When Flipper is running in dev mode we should always use bundled version of plugin (e.g. loaded from sources) even if a newer version is installed. Otherwise it could happen that Flipper will load installed version and it will not be possible to test your changes of plugin sources.

Reviewed By: passy

Differential Revision: D22016564

fbshipit-source-id: fbf63d5248b60034dc61688e4faa9b54890b744e
2020-06-12 06:15:29 -07:00
Anton Nikolaev
e65b355fb6 Load either installed or bundled version of plugin depending on which is newer
Summary: Load either installed or bundled version of plugin depending on which is newer.

Reviewed By: mweststrate

Differential Revision: D21858965

fbshipit-source-id: aa46eafe0b5137134fadad827749672441f2c9e5
2020-06-03 07:42:12 -07:00
Pascal Hartig
d7035b7e7d Whitelist cjs extension for metro
Summary: This is required for the new release of promisify-child-process.

Reviewed By: mweststrate

Differential Revision: D21543812

fbshipit-source-id: dc254ea51381696b9927f7c62dd36e10ef00fcac
2020-05-13 10:22:02 -07:00
Anton Nikolaev
c21ccedf14 Dev mode: fixed loading plugins located outside of the Flipper source root folder
Summary: Dev mode: fixed loading of plugins located outside of the Flipper source root folder, e.g. in ~/flipper-plugins as suggested in tutorial docs.

Reviewed By: passy

Differential Revision: D21306639

fbshipit-source-id: bb9044b25324065f0c12169b95fbe663da8d4305
2020-04-30 04:29:41 -07:00
Anton Nikolaev
ca2d04a5da Versioning for plugin format
Summary:
Added versioning for plugin format.

The first version is where "main" points to source code entry and plugins are bundled by Flipper in run-time on loading them.

The second version is where "main" points to the already existing bundle and Flipper just loads it without bundling. The plugins of version 2 must be bundled using "flipper-pkg" tool before publishing.

Changelog: Support new packaging format for plugins.

Reviewed By: mweststrate

Differential Revision: D21074173

fbshipit-source-id: 7b70250e48e5bd5d359c96149fb5b14e67783c4d
2020-04-20 06:03:16 -07:00
Anton Nikolaev
a54aad57a7 Fast refresh
Summary:
This diff enables optional [Fast Refresh](https://reactnative.dev/docs/fast-refresh) for Flipper in dev mode. It can be opted-in using additional argument "--fast-refresh": `yarn start --fast-refresh`. I've copy-pasted the most part of implementation from React Native with some minor changes.

I made this optional for now as it works not ideally. In most cases which I checked it works fine, however for some files it falls back to full refresh (e.g. when `desktop/plugins/network/index.tsx` changed) and sometimes doesn't refresh content even after change detected and re-compiled (e.g. when `src/ui/components/searchable/Searchable.tsx` is changed, Network plugin which is dependent on it is not refreshed automatically).

State from redux is restored after fast refresh, but local state in class-based components is cleared. For function-based components local state is also stored, so it's an additional point to make plugins components functional :)

Also, for now there is no UI for Fast Refresh (loading indicator etc), information is just logged to console.

Changelog: Experimental support for Fast Refresh in dev mode can be enabled by `yarn start --fast-refresh`.

Reviewed By: jknoxville

Differential Revision: D20993073

fbshipit-source-id: 65632788df105a85fac0b924b7808120900b349e
2020-04-14 07:20:40 -07:00
Anton Nikolaev
553c54b63e Include default plugins into app bundle (#998)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/998

After this diff all the default plugins (which are distributed with Flipper) will be included into the main app bundle instead of bundling each of them separately and then loading from file system. This is done by auto-generating plugins index in build-time and importing it from Flipper app bundle, so Metro can follow these imports and bundle all the plugins to the app bundle.
This provides several benefits:
1) reduced Flipper bundle size (~10% reduction of zipped Flipper archive), because Metro bundles each of re-used dependencies only once instead of bundling them for each plugin where such dependency used.
2) Faster Flipper startup because of reduced bundle and the fact that we don't need to load each plugin bundle from disk - just need to load the single bundle where everything is already included.
3) Metro dev server for plugins works in the same way as for Flipper app itself, e.g. simple refresh automatically recompiles bundled plugins too if there are changes. This also potentially should allow us to enable "fast refresh" for quicker iterations while developing plugins.
4) Faster build ("yarn build --mac" is 2 times faster on my machine after this change)

Potential downsides:
1) Currently all the plugins are identically loaded from disk. After this change some of plugins will be bundled, and some of them (third-party) will be loaded from disk.
2) In future when it will be possible to publish new versions of default plugins separately, installing new version of such plugin (e.g. with some urgent fix) will mean the "default" pre-built version will still be bundled (we cannot "unbundle" it :)), but we'll skip it and instead load new version from disk.

Changelog: Internals: include default plugins into the main bundle instead producing separate bundles for them.

Reviewed By: passy

Differential Revision: D20864002

fbshipit-source-id: 2968f3b786cdd1767d6223996090143d03894b92
2020-04-14 07:20:39 -07:00
Anton Nikolaev
452c52c291 Add internal plugins as workspaces to single package.json
Summary: We cannot just add internal plugins as workspaces to the root package.json in "sonar/desktop" as they are not open-sourced, so public build will break. Instead, I have created root package.json for internal plugins and added all internal plugins as workspaces there. This means all these plugins will use the single root yarn.lock and installation of their dependencies will be faster. This also means that plugins can declare dependencies to other local packages included into workspaces and they will be symlinked automatically.

Reviewed By: mweststrate

Differential Revision: D20806237

fbshipit-source-id: f8b3327166963dec7da8ac74079682aebe4527e1
2020-04-14 07:20:38 -07:00
Anton Nikolaev
da7449c20b Enable Metro caching
Summary:
Enabling Metro cache for dev mode. For release builds we reset the cache.

Cache is used for faster compilation in dev mode for both main and renderer bundles, as well as for plugins.

Currently we have few side effects based on env vars, so cache is invalidated when they are changed. Also the cache is invalidated when transformations are changed (changed code, bumped dependency etc). Also added a script to reset the cache if something is going wrong.

Reviewed By: mweststrate

Differential Revision: D20691464

fbshipit-source-id: 478947d438bd3090f052dbfa6ad5c649523ecacb
2020-03-30 09:28:35 -07:00
Anton Nikolaev
5e7a22147b Fix reload after changes in the main app bundle
Summary: Fixed automatic reloading on changes while "yarn start"

Reviewed By: mweststrate

Differential Revision: D20691166

fbshipit-source-id: 78b01a3c5e4a6da1537f2230411069e04ebbc81e
2020-03-27 03:26:52 -07:00
Anton Nikolaev
c1bb656a0d Re-use babel transformations
Summary:
SORRY FOR BIG DIFF, but it's really hard to split it as all these changes are cross-dependent and should be made at once:
1. Moved transformations to separate package "flipper-babel-transformer" and linked it using yarn workspaces to "static" and "pkg" packages where they are re-used. Removed double copies of transformations we had before int these two packages.
2. Converted transformations to typescript
3. Refactored transformations to avoid relying on file system paths for customisation (FB stubs and Electron stubs for headless build)
4. As babel transformations must be built before other builds - enabled incremental build for them and changed scripts to invoke the transformations build before other build scripts
5. As we need to deploy all the dependencies including the fresh "flipper-babel-transformer" as a part of "static" - implemented script which copies package with all the dependencies taking in account yarn workspaces (hoisting and symlinks)

Reviewed By: passy, mweststrate

Differential Revision: D20690662

fbshipit-source-id: 38a275b60d3c91e01ec21d1dbd72d03c05cfac0b
2020-03-27 03:26:51 -07:00
Pascal Hartig
fc9ed65762 prettier 2
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
2020-03-24 09:38:11 -07:00
Anton Nikolaev
3cbeaf2642 Fix Github build (#914)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/914

Fixed Github build I accidentaly broke by a previous diff

Reviewed By: mweststrate

Differential Revision: D20581935

fbshipit-source-id: c14d7e0fe83af79069f8fef432833babf04c59f8
2020-03-21 15:31:20 -07:00
Anton Nikolaev
863f89351e Yarn workspaces
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
2020-03-20 13:37:41 -07:00
Anton Nikolaev
952cb7783a Allow direct references of doctor and pkg from the main bundle
Summary: This diff allows direct referencing pkg and doctor packages from the main bundle so they can be changed and used in the main app without publishing to npm

Reviewed By: mweststrate

Differential Revision: D20390416

fbshipit-source-id: af625a8b7cead4481743a88aec198493d363ce76
2020-03-14 15:59:22 -07:00
Anton Nikolaev
10d990c32c Move plugins to "sonar/desktop/plugins"
Summary:
Plugins moved from "sonar/desktop/src/plugins" to "sonar/desktop/plugins".

Fixed all the paths after moving.

New "desktop" folder structure:
- `src` - Flipper desktop app JS code executing in Electron Renderer (Chrome) process.
- `static` - Flipper desktop app JS code executing in Electron Main (Node.js) process.
- `plugins` - Flipper desktop JS plugins.
- `pkg` - Flipper packaging lib and CLI tool.
- `doctor` - Flipper diagnostics lib and CLI tool.
- `scripts` - Build scripts for Flipper desktop app.
- `headless` - Headless version of Flipper desktop app.
- `headless-tests` - Integration tests running agains Flipper headless version.

Reviewed By: mweststrate

Differential Revision: D20344186

fbshipit-source-id: d020da970b2ea1e001f9061a8782bfeb54e31ba0
2020-03-14 14:35:18 -07:00
Anton Nikolaev
beb5c85e69 Enable eslint import checks and fixed the reported errors (#878)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/878

1) Enabled eslint error reporting for unresolved imports and fixed all the errors
2) Enabled eslint for typings (d.ts) and fixed all the errors

Reviewed By: passy

Differential Revision: D20335151

fbshipit-source-id: 7b142281a406b32df0f02a5cd0d7d05eba941acd
2020-03-14 14:35:18 -07:00
Anton Nikolaev
85c13bb1f3 Move desktop-related code to "desktop" subfolder (#872)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/872
Move all the JS code related to desktop app to "desktop" subfolder.

The structure of "desktop" folder:
- `src` - JS code of Flipper desktop app executing in Electron Renderer (Chrome) process. This folder also contains all the Flipper plugins in subfolder "src/plugins".
- `static` - JS code of Flipper desktop app bootstrapping executing in Electron Main (Node.js) process
- `pkg` - Flipper packaging lib and CLI tool
- `doctor` - Flipper diagnostics lib and CLI tool
- `scripts` - Build scripts for Flipper desktop app
- `headless` - Headless version of Flipper app
- `headless-tests` - Integration tests running agains Flipper headless version

Reviewed By: passy

Differential Revision: D20249304

fbshipit-source-id: 9a51c63b51b92b758a02fc8ebf7d3d116770efe9
2020-03-14 14:35:17 -07:00