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
Summary: Now as we can install device plugins from Marketplace, I was able to unbundle device plugins which were used quite rarely, but still added ~3 MB to the final Flipper bundle.
Reviewed By: mweststrate
Differential Revision: D26337297
fbshipit-source-id: 23a36cc15ca976a1215440192718d985e1f322fd
Summary:
This is quite hacky but avoids having to patch electron-builder directly.
We're intercepting the signing/editing process on Windows and triggering it ourselves while overriding version information that otherwise changes for every release causing cache invalidations to occur. This does *not* change the version display in the app as we're not depending on the PE metadata but on the version in the `package.json`.
Reviewed By: nikoant, mweststrate
Differential Revision: D25973921
fbshipit-source-id: 0fad07f3597fba9927643d24fba12f8750ca54bc
Summary:
We're skipping the signing and editing of EXEs on Windows. This is only temporary but I want to have an atomic commit we can go back to. This is to avoid cache eviction due to version numbers being encoded in the binary.
This means you're not getting the logo on the binary and copyright information, etc. We're not actually shipping these right now, so the real-world impact of this is zero.
Reviewed By: mweststrate
Differential Revision: D25973944
fbshipit-source-id: d076919acfaac1f618178294baff3e9122d820bf
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
Summary: In D25584424 (V1), Sandcastle complained about trailing whitespace. This diff removes the adde description if none can be retrieved
Reviewed By: nikoant
Differential Revision: D25608443
fbshipit-source-id: a798bb0c40afaaafd55c90c70177f7c2af79af34
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
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
Summary:
I've re-designed interfaces describing plugins as I found that mental overhead working with them became too expensive because of slightly flawed design. However this cascaded changes in many files so you can see how extensively these interfaces used in our codebase.
Before this change we had one interface PluginDetails which described three different entities: 1) plugins installed on the disk 2) plugins bundled into Flipper 3) plugins available on Marketplace. It's hard to use this "general" PluginDetails interface because of this as you always need to think about all three use cases everywhere.
After this change we have 3 separate interfaces: InstalledPluginDetails, BundledPluginDetails and DownloadablePluginDetails and things became much type-safer now.
Reviewed By: mweststrate
Differential Revision: D25530383
fbshipit-source-id: b93593916a980c04e36dc6ffa168797645a0ff9c
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
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
Summary: We have some custom parsing here and there and I'm going to add some more args, so decided it's better to cleanup this a bit.
Reviewed By: jknoxville
Differential Revision: D25398421
fbshipit-source-id: 9d43029eef07648d0b01590e9cf7e7fe400b31d0
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
Summary:
This diff sets all package version to "0.0.0" except of the root package and changes the bump script to only bump version in the root package. This should reduce possibility of conflicts on release diffs. Anyway we always use the same version for all of our packages, so we can only set it to the root.
Before npm publishing we will set all package versions to the same number as in the root package (we actually already do that) so there will be no differences except we won't need to bump version in more than 100 packages each release.
Reviewed By: mweststrate
Differential Revision: D25162373
fbshipit-source-id: 02fe401bee72845339c67925c130027bdaee559d
Summary: Just rolling back a part of D24782300 (dce7422ba6) where I've accidently removed using of unique number because did not understood how it is passed and wrongly decided it is not needed.
Reviewed By: passy
Differential Revision: D25027458
fbshipit-source-id: f623732c161bca01859f91444c2a0ed211a5fad6
Summary: Scripts now accept full version instead of only patch part of it.
Reviewed By: jknoxville
Differential Revision: D24782300
fbshipit-source-id: 1c454beb9640a5b38669fe39eab642245b0f0f91
Summary:
This quite often fails in CI. Adobe's fetch has some very sensible defaults
and will do exponential backoff and retry for up to a minute.
That should hopefully fix issues where we have to restart the whole build
just to fix one measly icon download.
Reviewed By: jknoxville
Differential Revision: D24649807
fbshipit-source-id: efbc9eb29e4b5a0f74b0b6ad6dea4aaf86391363
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/1612
* Use the QPL-managed QPLCore and PigeonClient.
**Facebook:**
js-shared/qpl and js-shared/pigeon-client are maintained by QPL in xplat/js-shared. I've updated the Metro config and tsconfig to allow the packages to be imported without breaking the open-source version.
Reviewed By: passy
Differential Revision: D24358369
fbshipit-source-id: 7f13d6c99d8ca6ebcd0e66bf0e5f25069370cce7
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
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
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
Summary:
allow-large-files
Updated to typescript 4. Note that this is no new major, the way TS numbers is that 4.0 is simply the number after 3.9 (so they refuse to use 3.10).
Primarily reason is that it allows us to use `/** deprecated */`. although there are definitely more interesting improvements
Reviewed By: passy, nikoant
Differential Revision: D23869445
fbshipit-source-id: 54e251b398b8698d9b18898ce66c3203b32aa356
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
Summary:
thefutureisnowoldman
Changelog: Changelog entries now link to their GitHub commits
Reviewed By: passy
Differential Revision: D22999105
fbshipit-source-id: 77e4884a3515245ba9296d8c4f59cdcb3c4b098d
Summary: Fixed scripts to return exit code 1 in case of error.
Reviewed By: passy
Differential Revision: D22357664
fbshipit-source-id: 1e067fe507e8f33cf21e70f3d15fd97175b9544e
Summary:
Changed "build-plugin" script to allow triggering release by plugin name (required to enable triggering releases by button in Marketplace):
1) Added new script to resolve plugin dir by name
2) Allow passing either plugin dir or name to "build-plugin" script
Reviewed By: passy
Differential Revision: D22354643
fbshipit-source-id: b7aca57acefc81ca0b6d9c7f359f63d8f0599e39
Summary: Unit tests tend to randomly bail out once FBLogger is (indirectly) required by some module under test. This makes sure FBLogger is stubbed by default. We might want to do the same for `User` in the future.
Reviewed By: jknoxville
Differential Revision: D22186274
fbshipit-source-id: 2ede364c4b691d69826781355592226b075d8367
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
Summary: Script to list all plugins included into Flipper desktop workspaces.
Reviewed By: passy
Differential Revision: D22256917
fbshipit-source-id: a3d8a0f9faea6e462a2f22be155d99eb22eb59d8
Summary: Added "build-plugin" command. Can be used like this: `yarn build-plugin fresco` which produces package to 'sonar/dist/plugins/fresco.tgz'
Reviewed By: mweststrate
Differential Revision: D22160253
fbshipit-source-id: 48b202984b0f515bf253b595be1f59953a9ce411
Summary: Disabled producing inline source maps for debug builds. Source maps are already writte to "map" files, so this does not make sense to also inline them to the js bundle. Passing "sourceMapUrl" parameter to Metro fixed this.
Reviewed By: mweststrate
Differential Revision: D22159501
fbshipit-source-id: f06225cd43f44a7f93afcc32bb0501323b35d0c3
Summary:
Disabled source maps for Flipper release builds.
1) I found that source maps was not only written to the "bundle.map" file, but also inlined into "bundle.js" in base64 format which hugely affected the total bundle size.
2) In addition to the size, these inlined source maps were also one of 2 causes that Flipper package size was not deterministic and changed so significantly in every diff even when Flipper was not touched at all.
Changelog: Disabled source maps in Flipper release builds thus reducing size by ~20%.
Reviewed By: mweststrate
Differential Revision: D22158898
fbshipit-source-id: b35cfba80553d01aec256983c3ba772ed0534d8f
Summary:
Updated "bump-versions" script to also bump version of all plugins when we're releasing Flipper.
Changelog: Versions of bundled plugins will be matching Flipper core version.
Reviewed By: mweststrate
Differential Revision: D22042960
fbshipit-source-id: b2d361ce9cbfc8022e12aecbbf7c6101029844e5
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
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
Summary: Load either installed or bundled version of plugin depending on which is newer.
Reviewed By: mweststrate
Differential Revision: D21858965
fbshipit-source-id: aa46eafe0b5137134fadad827749672441f2c9e5
Summary:
This strips another 8MB from our node_modules.
Checked out the largest individual files in with Disk Inventory X.
{F238464588}
Reviewed By: nikoant
Differential Revision: D21765847
fbshipit-source-id: d74b0eae270b86f0518d7e73288fd773b24535da
Summary: To make testing easier, I've implemented dry-run for version bumping and npm publishing scripts
Reviewed By: mweststrate
Differential Revision: D21721142
fbshipit-source-id: 72fc5a78bfc102a8fca9087decfbed6ebbda5e51
Summary: This is required for the new release of promisify-child-process.
Reviewed By: mweststrate
Differential Revision: D21543812
fbshipit-source-id: dc254ea51381696b9927f7c62dd36e10ef00fcac
Summary:
I'm adding the `.deb` option to linux build, it makes easier to install.
```bash
cd desktop
yarn build --linux --linux-deb
```
## Changelog
- Add deb target to linux build
Pull Request resolved: https://github.com/facebook/flipper/pull/1093
Reviewed By: mweststrate
Differential Revision: D21378807
Pulled By: passy
fbshipit-source-id: a72a85705d3c464cddd80091d38c92012bdbee2c
Summary: Fixed bumping of local peer dependencies and manually bumped the version which was not bumped automatically during the latest release.
Reviewed By: passy
Differential Revision: D21308701
fbshipit-source-id: 936a04b432ad3c9313644c1bf96966c52e022d7e
Summary: Just a small refactoring to only create array with plugins once. This should make transformations a bit faster as all these methods are called many times for each file in the project.
Reviewed By: passy
Differential Revision: D21308498
fbshipit-source-id: 0ed47f13cebfebd2992817caa207dc55f1dbeb0a