Commit Graph

105 Commits

Author SHA1 Message Date
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
Daniel Büchele
853d80f182 headless
Summary: _typescript_

Reviewed By: passy

Differential Revision: D16962733

fbshipit-source-id: 6583c5a4471b12f91895f6449ed9c510265a63e2
2019-08-23 09:33:56 -07:00
Pritesh Nandgaonkar
d850f1ff43 Update the bump version script
Summary: Updates the bump_version script to update the flipperkit version in Tutorial's Podfile.

Reviewed By: passy

Differential Revision: D16916433

fbshipit-source-id: dd5cf24fbbe4e9ca322178632613caebe178cc17
2019-08-20 08:41:30 -07:00
Daniel Büchele
d0da0d66a5 main folder
Summary: _typescript_

Reviewed By: passy

Differential Revision: D16762117

fbshipit-source-id: b6ee32e0bb3fc686fc69cfccab703e2ef4989571
2019-08-15 03:33:06 -07:00
Daniel Büchele
16e913a819 local icons
Summary:
Currently icons were always fetched remotely. We used a service worker to prefetch and cache some icons, that were critical to the UI.

In this diff, we are bundling icons at build time, with the app. In utils/icons.js we still specfify the list of icons which should be bundled. These are downloaded as part of the build step and bundled with the app. We are downloading the icons in 1x and 2x (the two most common pixel densities).

Reviewed By: jknoxville

Differential Revision: D16620764

fbshipit-source-id: 965a7793ad1f08aebb292606add00218429cdaf4
2019-08-02 09:00:00 -07:00
John Knox
df55ac263d Make android file pulling script public
Summary: This could be useful for OSS users, e.g. https://github.com/facebook/flipper/issues/498

Reviewed By: passy

Differential Revision: D16457362

fbshipit-source-id: 73fad6a30383f622e49cecc3a20d7fbbec2b318b
2019-07-24 06:25:40 -07:00
John Knox
5d99817555 Add --no-plugins arg to speed up headless development
Summary:
Compiling headless flipper takes a long time. This is because it individually compiles and bundles every plugin.

When debugging core headless, you don't need to compile any plugins, so this adds a build flag `--no-plugins` to skip that and vastly speed up iteration speed.

Reduces build time from 3 minutes to 20s

Reviewed By: priteshrnandgaonkar

Differential Revision: D16131322

fbshipit-source-id: 2b38ee37183a1257b3993f392cf623b2631fd7da
2019-07-05 08:09:18 -07:00
Pascal Hartig
4aafc49aaf Remove unneeded pod instructions from release script
Summary: Per title.

Reviewed By: jknoxville

Differential Revision: D15964257

fbshipit-source-id: 7f5888cff480df3a598d703b0f2c58bc9fa0ab89
2019-06-24 06:24:01 -07:00
Andres Suarez
198841d1d7 Rename uses of install-node-modules.sh in fbsource
Differential Revision: D15848788

fbshipit-source-id: b98626083ed7aee108f27d6e8c5c7b637e1b2327
2019-06-17 06:07:19 -07:00
Pascal Hartig
b8f3729752 Update Mac binary
Summary: Checking in a new binary pre-compiled for MacOS.

Reviewed By: jknoxville

Differential Revision: D15374540

fbshipit-source-id: a69e6f497a8c8b9f08144e1482450ff43b85f5da
2019-05-17 02:36:18 -07:00
Pascal Hartig
704634768f Update bump binary for Linux
Summary: This is the one used on sandcastle, built statically.

Reviewed By: jknoxville

Differential Revision: D15374415

fbshipit-source-id: 7b200e8630ce0a3a336cc46df26df367ed712fa1
2019-05-17 02:36:18 -07:00
Pascal Hartig
85f06c53eb Bump noop versions
Summary:
When running bump, also update the docs references to the noop package.

Will update binaries in subsequent diffs.

Reviewed By: jknoxville

Differential Revision: D15374370

fbshipit-source-id: 5558d33a91dc5e690f5754891b2e5aa29385646a
2019-05-17 02:36:17 -07:00
Pritesh Nandgaonkar
31542ca790 Update the open source release script
Summary: We no longer require to host the pods on our repository, thus I updated the release script to get rid off the copying part.

Reviewed By: passy

Differential Revision: D15166526

fbshipit-source-id: 1989eff335f83c191b16a78d9562470d7819bc17
2019-05-02 04:58:38 -07:00
Pascal Hartig
cfb4f52359 Automatically release noop packages
Summary: This is used by the public Circle CI release task.

Reviewed By: jknoxville

Differential Revision: D15149586

fbshipit-source-id: de631f930649fdbe582d525874ac6a6bf1fd4bad
2019-05-01 08:38:23 -07:00
Pascal Hartig
1831a672b5 More copyright headers for misc stuff
Summary: Scripts and Portforwarding things.

Reviewed By: jknoxville

Differential Revision: D15164852

fbshipit-source-id: a9dcdcb5e6c19dc51d1aa0158fceafe21ab7615f
2019-05-01 08:14:55 -07:00
Pascal Hartig
939cc531e2 Fix revision bundling
Summary:
This fixes headless not terminating due to the `package.json` not being readable.
I instead write this to the `global` object in the same way that the version is
set.

Reviewed By: jknoxville

Differential Revision: D14579316

fbshipit-source-id: 238afe912366c423552305e120088f4abac4c20b
2019-03-22 10:41:01 -07:00
Pascal Hartig
c2b6df7c3b Use prefixed temp folder
Summary:
I'm accumulating a lot of those in my tmpfs and
it would be great to immediately identify the
ones coming from Flipper.

Reviewed By: danielbuechele

Differential Revision: D14406809

fbshipit-source-id: 6b74e8260a841d5db76ac34643ee0226abba735a
2019-03-13 03:40:06 -07:00
Pascal Hartig
1b1d349dba Add revision to build manifest
Summary:
Package up the current repository's revision when building
a release.

This will then be used to write it into exported traces
so we can find a compatible version when opening it up
again.

Reviewed By: danielbuechele

Differential Revision: D14406684

fbshipit-source-id: 761a51e69adbcab1d541c2daa78c9827ea299e79
2019-03-13 03:40:06 -07:00
Pascal Hartig
31c240ba00 Blacklist dist/ from devserver
Summary:
Having previously run `yarn build` can otherwise
cause your devserver to stop working.

Caveat: If you have a Flipper checkout and it's called neither `sonar` nor `flipper`, you're still screwed.

Reviewed By: danielbuechele

Differential Revision: D14364984

fbshipit-source-id: 1652c94a95b1dcb6d34bb9040a9cd4cd70c6df55
2019-03-07 05:47:32 -08:00
Pascal Hartig
f0722287be Fix Mac ZIP building
Summary:
The current Mac zip creation in electron-builder is broken and creates corrupt zip builder. Other platforms are still fine. This just zips stuff up manually and ensures that symlinks are preserved.

Thanks a lot to Daniel Büchele for helping me wrap my head around untyped promises.

Reviewed By: jknoxville

Differential Revision: D14243002

fbshipit-source-id: 908d176275e5d22173e587c0eb4d7c4b2b7c2e0f
2019-02-27 15:07:46 -08:00
Daniel Büchele
520ffec7c9 removing entry, rootDir from defaultPlugins
Summary:
When bundling default plugins, we create a JSON-file containing information about the plugin and where to require it from. This information contained two filed: `entry` and `rootDir`, which were written while bundling the plugins. Because the plugins are bundled on Sandcastle, this was a path on the Sandcastle machine.

This also happened for the OSS version, see the screenshot from a GitHub issue.
Entry and rootDir are only used during the build process and not needed afterwards, so it is save to remove them from the JSON.

https://pxl.cl/qQSx

Reviewed By: passy

Differential Revision: D14165679

fbshipit-source-id: 4e7c5ac25652758ccfc3a459f4dd197254c6f897
2019-02-21 09:39:54 -08:00
Daniel Büchele
13f7444013 electron update
Summary:
Started with upgrading electron from 3.0.0 to 4.0.5. This required a bunch of subsequent updates:
* upgrading `electron-builder` to latest version, because the old version couldn't build electron 4 apps.
  * `appDir` is deprecated in builder config, `projectDir` is used instead, which we already had set, so its fine to just remove this ([see GitHub commit](a5e457163e)).
* upgrading `jest-runner/electron` because the old version couldn't run electron 4 tests.
  * upgrading our custom dependency resolution to use electron 4.0.5, because the test runner still resolves to 2.0.8 ([see GitHub issue](https://github.com/facebook-atom/jest-electron-runner/issues/31)).
* updating `sandcastle.sh` to use the new cache files from D14131344.
* removing `package-lock.json` as is was causing warnings. We use `yarn` and `yarn.lock` anyways. This file must have been committed by accident.
* updating our check to only run one version of Flipper at a time to use the new electron API `app.requestSingleInstanceLock` as the old one was removed in electron 4.
* updating the snapshot test that checks App rendering, which changed a little due to the electron upgrade.
* upgrading flow-type definitions to `electron-v4.0.5.js` generated by [electron-flowtype-definitions](https://github.com/danielbuechele/electron-flowtype-definitions).

**PS: Best new feature in Electron 4: Copy&paste working in dev tools**

Reviewed By: jknoxville

Differential Revision: D14131360

fbshipit-source-id: d7ed9643875629a1fa1860bb61b11dd0c64112ab
2019-02-21 02:46:12 -08:00
Daniel Büchele
6ada04bc38 ignore flipper-public/dist folder in build
Summary:
Builds in flipper-public are failing, because duplicate imports: https://our.intern.facebook.com/intern/sandcastle/job/22517998213713260

That's most likely because the `flipper-public` is not blacklisted in metro, so let's add it!

Reviewed By: passy

Differential Revision: D14134423

fbshipit-source-id: 52f87196957c8578b8ac7f578efa74e3c13fe1bb
2019-02-20 06:58:54 -08:00