Commit Graph

127 Commits

Author SHA1 Message Date
Pascal Hartig
254cf696d6 Run build job on Linux
Summary:
This works now with the Electron update. Wine doesn't work there so the app signing step needs to be disabled. I'm not entirely sure if this has other consequences than disabling signing - which we don't use.

We also can't build `.dmg`s on Linux because it relies on a CLI tool that only exists on Macs. But we can quite easily move this to GitHub Actions, which I set up with https://github.com/facebook/flipper/pull/852

Reviewed By: nikoant

Differential Revision: D20160545

fbshipit-source-id: a888c8b0e8f7dbe8bec818d57f5f22bcf800322c
2020-03-04 11:06:14 -08:00
Lucas Bento
be360157f6 Add DMG target to mac distribution (#833)
Summary:
Fixes https://github.com/facebook/flipper/issues/807 by adding a DMG target to distribute the application for mac.

The `.dmg` file is `97.2 MB` while the `.zip` is `101.5 MB`. 😄

![image](https://user-images.githubusercontent.com/6207220/75275890-7c32b480-5805-11ea-9d05-9a4f47d03562.png)

## Changelog

Add DMG target for mac distribution
Pull Request resolved: https://github.com/facebook/flipper/pull/833

Test Plan:
1. `yarn build --mac`;
1. Check `flipper-mac.dmg` inside of `dist`.

 ---

**The background is completely discussable, I borrowed it [from an old project](https://github.com/lucasbento/react-native-actions/tree/feature/electron/packages/electron-react-native-actions) of mine and it's [totally not inspired by WebStorm `.dmg` file](https://user-images.githubusercontent.com/6207220/75276024-b3a16100-5805-11ea-8c69-063fe28316c1.png).**

Reviewed By: nikoant

Differential Revision: D20139188

Pulled By: passy

fbshipit-source-id: 1aaaabd7c6ac51d12865388bf962d164f80a7a14
2020-02-27 09:40:31 -08:00
Anton Nikolaev
ab0078a13f Typescriptify the main process code (14/N)
Summary: Converted scripts/yarn-install.js to typescript

Reviewed By: passy

Differential Revision: D20098071

fbshipit-source-id: be56a95a11089cd857efb00e62866213a88b739c
2020-02-27 05:45:24 -08:00
Anton Nikolaev
2bd61bca87 Typescriptify the main process code (13/N)
Summary: Converted src/utils/icons.js to typescript

Reviewed By: passy

Differential Revision: D20076060

fbshipit-source-id: fa6309033f5de7183de7f85ac8318eec36b6bb69
2020-02-27 05:45:24 -08:00
Anton Nikolaev
8d66c3aba7 Typescriptify the main process code (12/N)
Summary: Converted static/watchman.js to typescript

Reviewed By: passy

Differential Revision: D20071220

fbshipit-source-id: 7d86ffa8dd728246eeac8a01e2573564e8fd6bbe
2020-02-27 05:45:24 -08:00
Anton Nikolaev
aff433c8ad Typescriptify the main process code (11/N)
Summary: Converted static/compilePlugins.js to typescript

Reviewed By: passy

Differential Revision: D20070227

fbshipit-source-id: ba360b944440babedef94af0d0bc577711165ff6
2020-02-27 05:45:23 -08:00
Anton Nikolaev
2d551f6b4a Typecscriptify the main process code (10/N)
Summary: Converted scripts/build-utils.js to typescript

Reviewed By: passy

Differential Revision: D20067220

fbshipit-source-id: 29c1a4aed11b9d682290daf57db5507736ad8c69
2020-02-27 05:45:23 -08:00
Anton Nikolaev
caf04e4e4a Typescriptify the main process code (9/N)
Summary: Converted scripts/build-release.js and scripts/build-headless.js to typescript

Reviewed By: passy

Differential Revision: D20066504

fbshipit-source-id: 25f336062361e1211b581f96979978a6bf4fe6d4
2020-02-27 05:45:23 -08:00
Michel Weststrate
74004b6338 Improve unit test robustness
Summary: When running tests locally, some are quite flaky, and there is a lot of error logging noise. This diff doesn't remove all of it, but does reduce it significantly.

Reviewed By: nikoant

Differential Revision: D20034619

fbshipit-source-id: 183f74475b644f803b2f92b1b1301f4d0f6e193a
2020-02-25 14:59:48 -08:00
Anton Nikolaev
609ca27eae Typescriptify the main process code (8/N)
Summary:
- Enabled typescript in "scripts" folder
- Converted start-dev-server.js to typescript

Reviewed By: passy

Differential Revision: D20066501

fbshipit-source-id: 23550cf3774e07fad0a8783831e3d574baee977f
2020-02-24 19:07:08 -08:00
Anton Nikolaev
f6cc7c93ef Typescriptify the main process code (5/N)
Summary: Use dev bundling for "yarn start"

Reviewed By: jknoxville

Differential Revision: D20034300

fbshipit-source-id: a46c75074c969f5a4958f498c5c0e15aab808552
2020-02-24 05:23:47 -08:00
Anton Nikolaev
bd0c7bb58f Typescriptify the main process code (4/N)
Summary: Skip the main process code bundling when nothing changed

Reviewed By: mweststrate

Differential Revision: D20030261

fbshipit-source-id: 78de87377afe7e768627059425c51081239687dd
2020-02-24 05:23:47 -08:00
Anton Nikolaev
0c778af679 Typescriptify the main process code (2/N)
Summary: Converted main.js and setup.js to typescript

Reviewed By: mweststrate

Differential Revision: D19972273

fbshipit-source-id: f777be737da4233de4d7df3d549206efabfeeadf
2020-02-24 05:23:46 -08:00
Anton Nikolaev
18c259dc22 Typescriptify the main process code (1/N)
Summary:
As a first step I've configured bundling for the main process code using Metro. For now I haven't converted anything to ts, just made that possible.

The bundle is just produced into the "static" directory. To avoid too many changes I kept the "static" folder as it is, but probably non-static code should be moved from there.

Also installed modules from "node_modules" for the main process are not bundled to avoid potential issues with node native modules.

Reviewed By: mweststrate

Differential Revision: D19960982

fbshipit-source-id: efbd426254e2b37c913c5f5f75f042c50ccee2f3
2020-02-24 05:23:45 -08:00
Chaiwat Ekkaewnumchai
b5256abd0c Upgrade electron
Summary:
Tried to upgrade both electron and electron-builder but failed due to Windows binary build stuck.

Upgraded only electron for now. electron-builder will be upgraded separately

Reviewed By: nikoant

Differential Revision: D19877865

fbshipit-source-id: a2282c2f4062e6b470cdcba2e9e693419bfeaec4
2020-02-24 03:24:59 -08:00
Anton Nikolaev
1b6ce47be2 Real restart in dev mode
Summary: To test plugin installation I need to restart Flipper often, however restart in dev mode is not "true" restart - instead it just reloads the window and doesn't load freshly installed plugins. To make my life easier I have implemented more realistic way for restart in dev mode.

Reviewed By: jknoxville

Differential Revision: D19770263

fbshipit-source-id: 8755663746dc265e0826ed79b9782e073132537f
2020-02-06 09:43:27 -08:00
Pascal Hartig
939620830e Update binaries
Summary: allow-large-files

Reviewed By: nikoant

Differential Revision: D19691719

fbshipit-source-id: fb4e937410dbef70ad69bee208a4e673c13b1a22
2020-02-03 08:37:00 -08:00
Pascal Hartig
64a4b750a2 Bump version number
Summary: Updated the source a while ago to also include the images plugin.

Reviewed By: nikoant

Differential Revision: D19691720

fbshipit-source-id: 70bf1929e4c571f02db2d8ef787f1130a480d05f
2020-02-03 06:55:32 -08:00
Anton Nikolaev
68510b53bf Debugging in VSCode
Summary:
This diff enables debugging in VSCode. Debugging works for both Flipper core and plugin code. To start debugging:
1. yarn start
2. Go to "Debug and Run" tab in VSCode, select task "Attach to Running Renderer" and launch it (or just press F5).
{F227135377}
3. Debugger will be attached and all the breakpoints set in VSCode will be hit.

Reviewed By: passy

Differential Revision: D19578566

fbshipit-source-id: 609766471ad196a2ee8d4086ddb84b7af4ef05ef
2020-01-27 06:14:46 -08:00
Michel Weststrate
1b7a30ae6c Publish react-native-flipper as NPM package
Summary:
This Diff makes the react-native-flipper package available on NPM.

For simplicity and traceability purposes, this package is released every time Flipper is released, under the same version number. Even though there will be often no changes.

Reviewed By: passy

Differential Revision: D19446815

fbshipit-source-id: 485930e57beac42a2f36dc34a8ac82eed2abe785
2020-01-17 08:21:05 -08:00
Pascal Hartig
acc2f293bd Remove child-process-es6-promise
Summary:
We're using two libraries to do the same thing.
The other one is better.

Reviewed By: mweststrate

Differential Revision: D18954485

fbshipit-source-id: 33ed2f452badf30cb72c69661527edc54708efba
2020-01-13 08:11:15 -08:00
Anton Nikolaev
857b9816a0 Launch without plugin hot reload in case plugin change detection failed to start
Summary: Launch without plugin hot reload in case plugin change detection failed to start

Reviewed By: mweststrate

Differential Revision: D19264418

fbshipit-source-id: 089f818b9101d924c504c7d96f71ebca11c9422f
2020-01-07 06:56:17 -08:00
Michel Weststrate
8a84bcbe29 Make sure non-existing icons do break the build
Summary:
Builds didn't fail when using non-existing icons, and the error message was not very clear

Also added verification that, before automatically adding an icon to the prefetcher, that icon does exists

Reviewed By: jknoxville

Differential Revision: D19264063

fbshipit-source-id: 4320d5b960e85e3f15bbca13d69f3063b983a511
2020-01-02 10:45:59 -08:00
Anton Nikolaev
fa7f970266 Plugin change detection is unreliable on Windows VM
Summary:
On Windows VM when "yarn start" is executed and compilation is in progress for some plugin, fs.watch randomly fires "changed" events for different files of other plugins. This leads to infinite attempts to rebuild the same plugin again and again, and this process never ends, so "yarn start" is almost unusable:
{F225467225}

I've tried to fix this by using watchman instead of fs.watch and on my tests with Windows build it works well:
{F225467508}

Also as watchman is more careful about opening file handles, hopefully this change will fix "too many files opened" problem as Michel suggested here https://fb.workplace.com/groups/flippersupport/permalink/764157990731528/ and here https://github.com/facebook/flipper/issues/699.

Reviewed By: mweststrate

Differential Revision: D19216026

fbshipit-source-id: acc53ae0d003a7936730e6423ac4dbca84f089c8
2019-12-31 04:38:07 -08:00
Anton Nikolaev
1ddf73caf3 Github build is broken because of Doctor module resolution issue
Summary: Fixed doctor module resolution on github by adding doctor src folder into the metro bundler blacklist

Reviewed By: cekkaewnumchai, mweststrate

Differential Revision: D19020038

fbshipit-source-id: a6ab95383b5016fd5e2180d72883a42c63745ec9
2019-12-13 07:08:28 -08:00
Anton Nikolaev
3fefd9de15 Fix module resolution for flipper-doctor and return it to sonar directory and effectively to GitHub
Summary: Fix module resolution for flipper-doctor and return it to sonar directory and effectively to GitHub

Reviewed By: mweststrate

Differential Revision: D18963720

fbshipit-source-id: 61ea78ecbb154de79c7a2d348f347c64325e794c
2019-12-13 04:06:02 -08:00
Michel Weststrate
6e69d20917 Don't bundle react-native dependencies
Summary: Make sure that `.native.js` modules resolutions are _NOT_ prefered over `.js` modules when building flipper or flipper plugins

Reviewed By: jknoxville

Differential Revision: D18297580

fbshipit-source-id: 73f9114d19eb0934cdf69d9668b582966aedc756
2019-11-04 05:07:00 -08:00
Chaiwat Ekkaewnumchai
7017ed3458 Update React-Redux
Summary:
D18169584 introduced state error which I didn't notice. This diff reverted the diff.
`hg backout D18169584`

Original commit changeset: 77a8b034c5e4

Reviewed By: jknoxville

Differential Revision: D18203354

fbshipit-source-id: 3e281f1e8c7e1d2bf41665adfa5ce5f13daca3a1
2019-10-29 12:14:27 -07:00
Chaiwat Ekkaewnumchai
18ea77690e Update React-Redux
Summary: Update and include `react-redux` to Greenkeeper

Reviewed By: passy

Differential Revision: D18169584

fbshipit-source-id: 77a8b034c5e4a13a2ba6c82895e1aee9d852375e
2019-10-28 08:08:39 -07:00
Andres Suarez
0675dd924d Tidy up Flipper license headers [1/2]
Reviewed By: passy

Differential Revision: D17863711

fbshipit-source-id: 259dc77826fb803ff1b88c88529d7f679d3b74d8
2019-10-11 13:46:45 -07:00
John Knox
be72debf99 Improve headless test running script
Summary: Now emits a warning if api version doesn't match expected one.

Reviewed By: cekkaewnumchai

Differential Revision: D17685261

fbshipit-source-id: 2a01d64e2e160d411d7a58125b5bb45437476f8f
2019-10-01 07:47:04 -07:00
John Knox
9d4cc64bc9 Fix outline icon caching
Summary:
The build-release script was using different logic to construct the local url, than the lookup file.
Changed so they both use the same function.
And unit tests added.

Reviewed By: passy

Differential Revision: D17602476

fbshipit-source-id: 6aaedd58eafb2cc59adcdc0ebb4dd329bf99c33a
2019-09-27 03:00:49 -07:00
Pascal Hartig
8a8316097a Update bump binaries
Summary: Compiled versions of scripts/bump/.

Reviewed By: priteshrnandgaonkar

Differential Revision: D17572052

fbshipit-source-id: 91f273b43daf4f59cdb0e7d2cd4ee97648ca53b9
2019-09-26 11:05:36 -07:00
Pascal Hartig
c401f2c27d Add new bump paths
Summary: Make sure our docs get updated on release.

Reviewed By: danielbuechele

Differential Revision: D17571990

fbshipit-source-id: 36d19601cb5fb5d215e0894ef4a362e364d32880
2019-09-26 11:05:36 -07:00
Pascal Hartig
c907e53189 Update bump dependencies
Summary: Update to latest LTS, remove some unnecessary options.

Reviewed By: danielbuechele

Differential Revision: D17571303

fbshipit-source-id: e7eeaec7eb011d814f78126f2cd7862361faa285
2019-09-26 06:44:18 -07:00
Pascal Hartig
38cb7f7031 Upload leakcanary-plugin on release
Summary: Just as the others.

Reviewed By: danielbuechele

Differential Revision: D17571208

fbshipit-source-id: 196da6ac149134cdf93174cbd263245b04961c79
2019-09-26 06:44:18 -07:00
John Knox
9871a6d155 Devserver: Only listen on localhost
Summary:
In response to https://github.com/facebook/flipper/issues/553

This server is just serving the local assets to the electron instance, when you are running flipper from source (`yarn start`). It's not used in production releases.

I don't think there's a need to encrypt this traffic - it's analogous to running a local web server while you are developing it, however I don't see a reason not to restrict it to localhost.

Reviewed By: danielbuechele

Differential Revision: D17500039

fbshipit-source-id: 5b9df3937d71dc542cfa900da8c9e7f285a0e6ac
2019-09-23 03:43:09 -07:00
Pascal Hartig
1ab47f9ca8 Set up Maven distribution for new plugins
Summary:
Setting up the necessary metadata to publish the separate plugins
to Maven/Bintray.

Reviewed By: danielbuechele

Differential Revision: D17480263

fbshipit-source-id: 1772cee5b3744ce52fc6e2510a27cb7f500e72bf
2019-09-20 06:07:42 -07:00
Pascal Hartig
fd8d28ca11 Remove fbjni from release script
Summary:
for_shame

Failing here: https://circleci.com/gh/facebook/flipper/1529

Reviewed By: danielbuechele

Differential Revision: D17375600

fbshipit-source-id: 9765b476f70f96a33e9ef6f4557fd062bedcfe61
2019-09-16 08:20:37 -07:00
Pascal Hartig
f41cbcd429 Add land-time eslint job
Summary: This will block us from landing eslint-failing tests.

Reviewed By: jknoxville

Differential Revision: D17342861

fbshipit-source-id: a42e3bc3fffe8f24420203f399fb702907069132
2019-09-12 10:10:49 -07:00
Pascal Hartig
4f181cc2ea Fix header
Summary: Getting a shipit violation for the missing header.

Reviewed By: danielbuechele

Differential Revision: D17184585

fbshipit-source-id: 1e88c1adec1f1500e16ddd8a461fb11bf1ea86e6
2019-09-04 10:48:22 -07:00
Daniel Büchele
631b743643 npm publish
Reviewed By: jknoxville

Differential Revision: D17161868

fbshipit-source-id: 65be618c6e231eec2d680906e80599889401ced7
2019-09-03 06:44:43 -07:00
John Knox
922019a8d0 Add script to run headless tests easily
Summary:
It's not obvious how to run the headless tests at the moment, and requires manual steps this adds a script to do it.
It still does not start an emulator or the sample app, but it's an improvement.

Reviewed By: passy

Differential Revision: D17155308

fbshipit-source-id: 846b87389823f422030470807aa4aabacce69179
2019-09-02 11:00:11 -07:00
Pascal Hartig
f6dd4c227f Add URL for more info
Summary: Added a wiki page with some more strict mode info.

Reviewed By: danielbuechele

Differential Revision: D17112391

fbshipit-source-id: 53b9e8d417eb9f41adecab42fbf912b999a0c9c3
2019-09-02 07:02:15 -07:00
Pascal Hartig
3cdc32c18b Update binary
Summary: allow-large-files

Reviewed By: danielbuechele

Differential Revision: D17112954

fbshipit-source-id: d0c53e3f5c5502d291212557ac808359e2a925b6
2019-08-30 03:32:47 -07:00
Pascal Hartig
31ce78b128 Add stack.yaml.lock
Summary: Stack has lock files now. Let's use them.

Reviewed By: danielbuechele

Differential Revision: D17112200

fbshipit-source-id: 898fff67ac74cbad918dbe1be6667523c4392b35
2019-08-29 09:23:57 -07:00
Pascal Hartig
f4f7245732 Add README
Summary: Per title.

Reviewed By: danielbuechele

Differential Revision: D17111990

fbshipit-source-id: f5a14b7f0ce544cec324b70b74eeed8d6efb42b0
2019-08-29 09:19:01 -07:00
Pascal Hartig
bc4fc12ea4 Add prebuilt version of stricter
Summary:
Adds a binary we can run on Sandcastle.

allow-large-files

Reviewed By: danielbuechele

Differential Revision: D17093672

fbshipit-source-id: 3695739a65aea72bc8c8268404c9d3e025349e16
2019-08-28 14:31:33 -07:00
Pascal Hartig
a612792995 Add script to watch for TSC strict mode regressions
Summary:
This is a simple script that runs `tsc --strict` twice: on the current revision and the previous one, compares the number of errors and if there are more, prints them out and raises a failure exit code.

This should help us ensure that while we clean up the 500-odd errors we don't land more in the process.

Reviewed By: danielbuechele

Differential Revision: D17093671

fbshipit-source-id: 6c5d1424c729d15d66a32ae17f15b17c3b76fc68
2019-08-28 14:31:33 -07:00
Daniel Büchele
f69bfab0f4 npm
Summary:
Publishing flipper to npm via Sandcastle.
- NPM token added to secrets tool
- removing private flag from package JSON
- adding publish script

Reviewed By: passy

Differential Revision: D16984934

fbshipit-source-id: 334991381d4035928af9a9d98d3905280938736a
2019-08-23 09:33:56 -07:00