Commit Graph

152 Commits

Author SHA1 Message Date
Pascal Hartig
f1abd8a4a4 Update bump binaries
Summary: Update pre-compiled binaries in the repo by running `stack build` on Linux and MacOS.

Reviewed By: nikoant

Differential Revision: D21301515

fbshipit-source-id: f3b648c03a4ec7c680c88574caa3f4abbe5e0fe0
2020-04-29 06:34:58 -07:00
Pascal Hartig
c21a2645ed Fix doc path
Summary: This was broke the script from running.

Reviewed By: nikoant

Differential Revision: D21301581

fbshipit-source-id: 146c4bacb638171d8efe9ba1d25d75cac0b19a06
2020-04-29 06:34:58 -07:00
Anton Nikolaev
cdc851f281 Fix release version bumping in docs
Summary: Fix release version bumping in docs after switching from ".md" to ".mdx".

Reviewed By: mweststrate

Differential Revision: D21282492

fbshipit-source-id: 60ecfd9a058b71d1895945c9c3d05b9df8f6493c
2020-04-28 11:43:58 -07:00
Pascal Hartig
1a794c57dd Update bump binaries
Summary: Ran `stack build`. Currently source and binaries are out of sync.

Reviewed By: jknoxville

Differential Revision: D20895907

fbshipit-source-id: df9a00633a7cb7515927390b49028376e757ccab
2020-04-07 12:21:36 -07:00
Anton Nikolaev
0a79118ee7 Fix bumping podspecs in "Getting Started" docs in prepare-release.sh
Summary: Fixed bumping podspecs in "Getting Started" docs in prepare-release.sh

Reviewed By: mweststrate

Differential Revision: D20869684

fbshipit-source-id: 78a3b7064de51dbd8ca505db863595726d038326
2020-04-06 11:10:56 -07:00
Pascal Hartig
2823307c62 Add RN Android/iOS docs
Summary:
I trimmed the previous versions of this down a lot to only
focus on what RN developers need to know without duplicating
what we have in the non-RN docs.

Reviewed By: mweststrate

Differential Revision: D20816115

fbshipit-source-id: 9d88a6fb0d49e823194cce647e64b86d61d6229a
2020-04-06 08:27:20 -07:00
Pascal Hartig
0a68044649 Split up getting started docs
Summary:
This is a first step in breaking up the getting started docs.
Ultimately, the React Native Android and iOS bits will become
separate sections, too, but I won't to keep the diffs a bit smaller.
This one doesn't really do much apart from reorganising the current
content.

Reviewed By: mweststrate

Differential Revision: D20815235

fbshipit-source-id: 5c85b788211699a2a9f5808b9e2590c7db68a1c1
2020-04-03 06:17:49 -07:00
Anton Nikolaev
3bdfea387b Install yarn modules required for prepare-release script
Summary: Install yarn modules required for release script

Reviewed By: mweststrate

Differential Revision: D20773606

fbshipit-source-id: 97ceda05e2d75229335bb77c7cef6dd328167283
2020-03-31 13:38:54 -07:00
Anton Nikolaev
2a27b47752 Fixed version bumping
Summary: Fixed version bumping in prepare-release script

Reviewed By: priteshrnandgaonkar

Differential Revision: D20771162

fbshipit-source-id: 8b8efa7111269e3f2b39b09c3dff1afe1fd0cf41
2020-03-31 11:20:27 -07:00
Anton Nikolaev
bf32297ad9 Publish all packages to npm on release
Summary: Publish all the public packages (excluding those with "private=true") included as workspaces to "desktop" project.

Reviewed By: jknoxville

Differential Revision: D20765097

fbshipit-source-id: 444541e9a682a90eba02cb3da85ada9bd00d93d0
2020-03-31 06:34:39 -07:00
Anton Nikolaev
eb9a2cb5e7 Bump versions for all npm packages on release
Summary:
Automatically bump versions for all local npm packages included as workspaces and fix local dependencies correspondingly.

As a part of this I have also aligned versioning for all the packages by using the same version for all of them.

Reviewed By: jknoxville

Differential Revision: D20745632

fbshipit-source-id: 2d438c4b23ee72f7d7c068c5ce161063c7ceb9e5
2020-03-31 06:34:39 -07:00
Anton Nikolaev
5ed3e8b1eb Set attributes to Flipper release builds
Summary: Changelog: fixed applying of product attributes (title, publisher etc) to Flipper builds.

Reviewed By: passy

Differential Revision: D20724437

fbshipit-source-id: 70e31484ddd59f1802573e2f963ee37857ab8405
2020-03-30 01:58:30 -07:00
John Knox
6298fd6288 Add "ls" to android debugging script
Summary: Makes it easier to debug.

Reviewed By: mweststrate

Differential Revision: D20645818

fbshipit-source-id: db7cb15487508b5d103db482ecf84adfebc09f48
2020-03-25 12:50:29 -07:00
Anton Nikolaev
e091c21fba Fix prepare-release.sh script
Summary: Fixed paths after moving js code to "desktop" subfolder

Reviewed By: jknoxville, mweststrate

Differential Revision: D20469775

fbshipit-source-id: 4df963550012905dff4c1ddf6e8b6cd2693b8fbe
2020-03-16 09:59:51 -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
Michel Weststrate
1d04fc3e34 extract utility for determing static path [2/n]
Summary: Make the logic to find the static file path reusable

Reviewed By: passy

Differential Revision: D20219731

fbshipit-source-id: a4f1fa021ea958681a078cb103621322bbfc1e48
2020-03-13 04:40:36 -07:00
Michel Weststrate
724fb79fe7 Don't submit release automatically when running on SC
Summary:
Our SC release job failed when submitting directly from the prepare-release script, as the jf context wasn't properly setup. So instead we reuse the code we already have for that in SandcastleFlipperAutoReleaseCommand.

However, for manual releases we still do submit automatically and in name of the current user.

Reviewed By: passy

Differential Revision: D20384247

fbshipit-source-id: ed5eca180f009611f2890f8cb665bf203789d189
2020-03-11 04:50:45 -07:00
Michel Weststrate
4ada403841 generate-changelog.js should be Node 6 compatible
Summary:
Node on SandCastle is ancient, this change makes sure we can use the node version of `www`.

Node 6 can't parse dangling comma's in argument lists, which is what prettier automatically inserts by fbsource standards

Reviewed By: passy

Differential Revision: D20366026

fbshipit-source-id: 1b2a0c1506e8671fa268fab7a8d3bfcd5064bb0b
2020-03-10 10:41:24 -07:00
Anton Nikolaev
82881b7463 Yarn start Failed with "Error: Unable to resolve module react-redux" (#883)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/883

https://github.com/facebook/flipper/issues/835

Reviewed By: passy

Differential Revision: D20363818

fbshipit-source-id: 66b7cb7236c7b066db32473a9e993ba2ace529bc
2020-03-10 09:18:44 -07:00
Michel Weststrate
9dc187cc25 Make sure prepare-release scripts works when running from another dir
Summary: Yesterday's script failed if prepare-release was invoked from another dir

Reviewed By: jknoxville

Differential Revision: D20362093

fbshipit-source-id: a0ce877a2f145f320cf346dc86e3d2568279b8b9
2020-03-10 07:10:29 -07:00
Michel Weststrate
8f2dd977b7 unify internal and external release into one flow
Summary:
This diff makes updating the internal and external release part of the same flow. The will be changed to:

1. The chronos job is kicked to start a new release
2. That job kicks of `./prepare-release.sh` (see D20304039) which
   1. bumps the version of all packages
   2. generates the changelog
   3. generates a release diff + test instructions for that
   4. generates a diff with snapshot version updates
   5. submit those commits
3. when this is job is completed, the relevant release commits can be checked out and tested.
4. If these job is landed, this will kick off the OSS builds through `release.sh` (as-is). But, this will also generate a diff that updates the flipper pin to the verify same commit (new).

Next steps:
* [ ] update wiki

Code pointers (irrelevant for review):
- Chronos Job entry https://our.intern.facebook.com/intern/diffusion/WWW/browse/master/flib/intern/sandcastle/commands/SandcastleFlipperAutoReleaseCommand.php?lines=85
- Sonar build step: https://our.intern.facebook.com/intern/diffusion/WWW/browse/master/flib/intern/sandcastle/sonar/SandcastleSonarBuildStep.php?lines=84
- Release commit observer: https://our.intern.facebook.com/intern/diffusion/WWW/browse/master/flib/intern/entity/opensource/github/observers/EntOpensourceGitHubCommitBuilderObserver.php?lines=17-48

Reviewed By: passy

Differential Revision: D20283664

fbshipit-source-id: 129ea862bda4721d707f1b6fdd862a937c0ed6d5
2020-03-10 02:48:14 -07:00
Michel Weststrate
3165a5b504 Make changelog part of external rather than internal release
Summary: This makes the changelog generating part of the bump-version process, rather than the build-release

Reviewed By: passy

Differential Revision: D20284211

fbshipit-source-id: f4a5c9bdb98c91f11a216957c9d5175c4b64fe70
2020-03-10 02:48:14 -07:00
Michel Weststrate
52b907fa25 Ignore watchmanconfig in fbsource (#868)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/868

As discussed in D20252170

Reviewed By: passy

Differential Revision: D20278783

fbshipit-source-id: c965520a0ad44bf1838224003017177c149025e9
2020-03-05 08:10:16 -08:00
Pascal Hartig
976efc24e8 Fix prettier issue (#866)
Summary:
I think I broke this. Soz.
Pull Request resolved: https://github.com/facebook/flipper/pull/866

Reviewed By: nikoant

Differential Revision: D20279605

Pulled By: passy

fbshipit-source-id: 4e2ed3b1230adae67f3f3a90020b8539ba00086a
2020-03-05 05:41:29 -08:00
Pascal Hartig
1351496c2c Re-enable release editing on windows
Summary:
There's a lot going on here:

- I'm moving over to android build hosts. They're are faster and more plentiful. They seem to work just fine for what we do. We already have a tenant capacity for them. *Edit:* Even more importantly, we need `adb` for certain tasks. The Android SDK isn't installed on Lego.
- I'm splitting our `sandcastle_setup` up into a pure yarn setup and an electron setup. The latter downloads from LFS and installs Wine (on Linux) which takes some time. This isn't needed unless we actually run Electron. That's for builds and Electron tests only.
- There were so, so many weird little edge cases. One of them is that `electron-builder`'s `app-builder` (a go app) switches between an x86 and an x86_64 version of wine to use for signing Windows apps, but only on Mac. On Linux it's hard-coded to 32bits. So we need to manually override the binary in the cache. I do this in the script rather in the cache because this is impossible to remember when upgrading.
- Wine is only bundled for Mac. On Linux you have to get it somewhere else. Luckily, we run as root, so we can do that.
- `$HOME` is set to `/var/twscsvc` which isn't owned by `root` but by `twscsvc`. Wine no happy. So we have to manually set this to a path that `root` owns. Hence the `export HOME`.

Reviewed By: nikoant

Differential Revision: D20223753

fbshipit-source-id: 0b2b09d19409ce172f395a7d1f85ec601654c6f6
2020-03-04 11:06:15 -08:00
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