Summary:
Previously we had requested non existing icons. This fixes missing icons on pixel dense screens (macbook pro, 4k screens).
I could add x4, x5 icons as well. Though they are no better than x3. Even x3 is pretty raterized. Ideally we should be serving icons with higher resolution and scaling them down instead of doing this. Even better use SVG icons which we do not have.
Reviewed By: LukeDefeo
Differential Revision: D50454271
fbshipit-source-id: cda90972abb56069e160ddefdc6de460c49d06c0
Summary: This is the immediate follow-up from the previous diff which aims to integrate the MacOS app into our release build script, meta only.
Reviewed By: antonk52, aigoncharov
Differential Revision: D50301369
fbshipit-source-id: 23a4842666c3a7aa9616c6237e16b71bae87ba36
Summary: Changelog: When requesting Keychain Access, you will now see "flipper-runtime" instead of a generic "node" process.
Reviewed By: lblasa
Differential Revision: D50261830
fbshipit-source-id: ef6fd7d5099c4ff7370f0401a5de3fde1659f1f3
Summary: This is more reliable and follows redirect which we need for GitHub downloads.
Reviewed By: antonk52
Differential Revision: D50263976
fbshipit-source-id: d001b6eb460510b0b673ea66651e7c39cac3092f
Summary:
Copying files will randomly fail with something akin to
```
Error: Cannot copy '../acirb/bin/acorn' to a subdirectory of itself, '../acorn/bin/acorn'.
```
See https://github.com/jprichardson/node-fs-extra/issues/708
Reviewed By: antonk52
Differential Revision: D50263977
fbshipit-source-id: 39091ef57b79c692ec89e7a250595509839e2af8
Summary:
As discussed with lblasa. This solves a few issues:
- Confusing names in `ps` and Activity Monitor related to Flipper.
- Permission requests for the Keychain from "node" lead users to deny it.
- Seeing "node" as allowed apps for an entry in Keychain is confusing.
Reviewed By: lblasa
Differential Revision: D50232337
fbshipit-source-id: 3bc92aae0ca31d1a80582fb8a794bbc64fc2f2e5
Summary: Add an option to archive the server build inside a DMG.
Reviewed By: antonk52
Differential Revision: D49504225
fbshipit-source-id: 3c34e6f0e4c9a685d36771199a6e20394f68baef
Summary: A few improvements to the installation wizard.
Reviewed By: antonk52
Differential Revision: D49145069
fbshipit-source-id: 1aadd85e1d187bd61983a0b4201b530cbdbf509a
Summary:
We recently raised a concern that for some packages types/* version is different than the package we are using. This can cause runtime errors as typescript can suggest usage that no longer reflects current API of a library. To combat this issue we decided to add a CI check to verify that major versions of types and a libriary match.
This script will be refined if in the next few diffs
Reviewed By: LukeDefeo
Differential Revision: D48779652
fbshipit-source-id: 2a826ba9d00565563553f04cd809ae0638db6282
Summary: Need to copy this resource too from the static directory.
Reviewed By: aigoncharov
Differential Revision: D48864174
fbshipit-source-id: 0f3bfe9608bb9d48ec1cfb7243b3f0701d2fd8cf
Summary: Updating the remaining tsconfigs to build for an ES2021 target.
Reviewed By: antonk52
Differential Revision: D48687661
fbshipit-source-id: 2761704d251f701594ca5d362a17731f287088ed
Summary:
Session Id should be shared between client and server, but it was defined deep in the client (redux store).
The proposed solution presented below is to move the session id to the server configuration. By doing this, it becomes available to both server and client VERY early in the application life-cycle for both Electron and non-Electron builds.
Reviewed By: LukeDefeo
Differential Revision: D48520367
fbshipit-source-id: ca959b27ab18b1a2e4cd2fac1d28545664f1b514
Summary:
Electron-builder puts its results in a different directory, based on the architecture you build on.
While we don't have plans to release an arm64 build internally, we still need to support local builds for testing.
Without this, it fails with a rather confusing error message:
```
Script termnated. Error: spawn zip ENOENT
at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
at onErrorNT (node:internal/child_process:476:16)
at processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -2,
code: 'ENOENT',
syscall: 'spawn zip',
path: 'zip',
spawnargs: [ '-qyr9', '../Flipper-mac.zip', 'Flipper.app' ]
```
Reviewed By: lblasa
Differential Revision: D48517426
fbshipit-source-id: 21a133f8fce3aee0737ce5cbccc7a692a613b98e
Summary:
This updates minor and patch level dependencies. Frustratingly, I had to revert a bunch
of changes in that version range that still caused incompatibilities and test failures.
If I find time, I'll dig a bit deeper.
Reviewed By: ivanmisuno
Differential Revision: D48433210
fbshipit-source-id: 9ab12e774c1992d4f22cc1428d34f102ce820b75
Summary: UDS will be removed. The first step would be to remove the TCP optionality.
Reviewed By: passy
Differential Revision: D48264741
fbshipit-source-id: ca9e1b68be61e99240e95bcd4f26f2db63a64005
Summary: This is needed on Windows, otherwise it just throws an error when using spawn.
Reviewed By: passy
Differential Revision: D47832379
fbshipit-source-id: c1a5094c2e72683a695949cd99b2a1054f01aced
Summary: Just adds a function stub that will add the necessary run script for windows.
Reviewed By: passy
Differential Revision: D47627532
fbshipit-source-id: 09b6a203c2a5def20e586b5753d95ca58797852a
Summary:
Right now, both Launcher and PWA share the same icon.
As to make it easier to identify which one is which, PWA will have a greyed icon instead.
Reviewed By: antonk52
Differential Revision: D47436998
fbshipit-source-id: 69d4d273c35e327263fbbf02d4ac7a005013f1d9
Summary: This diff follows up on the previous one, by trying a larger icon size if the original requested icon size was missing.
Reviewed By: lblasa
Differential Revision: D46556076
fbshipit-source-id: 4a078088aa27390f247e39afeda4b1df261d8b30
Summary:
Since ~yesterday all our builds started failing due to being unable to download static assets. Although those assets load correctly in the browser, and by using the browsers's generated `curl` command, which looks like:
```
curl 'https://facebook.com/assets/?name=face-unhappy&variant=outline&size=24&set=facebook_icons&density=1x' \
-H 'authority: facebook.com' \
-H 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7' \
-H 'accept-language: nl,en-GB;q=0.9,en;q=0.8,nl-NL;q=0.7,en-US;q=0.6' \
-H 'cache-control: no-cache' \
-H 'cookie: OMITTED' \
-H 'pragma: no-cache' \
-H 'sec-ch-ua: "Not.A/Brand";v="8", "Chromium";v="114", "Google Chrome";v="114"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua-platform: "macOS"' \
-H 'sec-fetch-dest: document' \
-H 'sec-fetch-mode: navigate' \
-H 'sec-fetch-site: none' \
-H 'sec-fetch-user: ?1' \
-H 'upgrade-insecure-requests: 1' \
-H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36' \
--compressed
```
Download fails as soon as the cookie header is dropped.
Changes the base url to `https://facebook.com/images/assets_DO_NOT_HARDCODE/facebook_icons/` fixes that problem, unless the resolution doesn't exist (addressed in next diff).
This also seems to remove the flakiness we were experiencing before, so dropped the retry mechanism for now.
Also made failing to download an icon a warning instead of a build failure.
Reviewed By: lblasa
Differential Revision: D46552986
fbshipit-source-id: f1382d6a8fc6669691f0c8da6b77834d24a373c5
Summary:
^
Basically, update Jest and fix any raised issues. Mainly:
- Update necessary dependencies
- Update snapshots
- `useFakeTimers` caused a few issues which meant that the way we hook into the performance object had to be tweaked. The main code change is: `//fbsource/xplat/sonar/desktop/scripts/jest-setup-after.tsx`
- `mocked` -> `jest.mocked`
Changelog: Update Jest to v29.5.1
Reviewed By: antonk52
Differential Revision: D46319818
fbshipit-source-id: d218ca8f7e43abac6b00844953ddeb7f4e1010a2
Summary:
It seems the available binary for macOS arm64 is not signed:
```
codesign -dv --verbose=4 ./node-v16.16.0-macos-arm64
./node-v16.16.0-macos-arm64: code object is not signed
```
This is an issue as it crashes for our flipper server releases.
This can be compared to a binary downloaded from the Node distribution page:
```
codesign -dv --verbose=4 ./node
Executable=/Users/realpassy/Downloads/node-v16.15.0-darwin-arm64/bin/node
Identifier=node
Format=Mach-O thin (arm64)
CodeDirectory v=20500 size=597360 flags=0x10000(runtime) hashes=18657+7 location=embedded
VersionPlatform=1
VersionMin=720896
VersionSDK=721152
Hash type=sha256 size=32
CandidateCDHash sha256=31cdf84cac42a622c1a68558376700a2dd12d40d
CandidateCDHashFull sha256=31cdf84cac42a622c1a68558376700a2dd12d40d81c5118f3b0e0370c414eb69
Hash choices=sha256
CMSDigest=31cdf84cac42a622c1a68558376700a2dd12d40d81c5118f3b0e0370c414eb69
CMSDigestType=2
Executable Segment base=0
Executable Segment limit=56082432
Executable Segment flags=0x1
Page size=4096
Launch Constraints:
None
CDHash=31cdf84cac42a622c1a68558376700a2dd12d40d
Signature size=8986
Authority=Developer ID Application: Node.js Foundation (HX7739G8FX)
Authority=Developer ID Certification Authority
Authority=Apple Root CA
Timestamp=26 Apr 2022 at 23:00:57
Info.plist=not bound
TeamIdentifier=HX7739G8FX
Runtime Version=11.1.0
Sealed Resources=none
Internal requirements count=1 size=164
```
For additional context:
Node binary by using pkg-fetch. We just get the binary from this release page: https://github.com/vercel/pkg-fetch/releases/tag/v3.4
The exact binary we're downloading is https://github.com/vercel/pkg-fetch/releases/download/v3.4/node-v16.15.0-macos-arm64
If you just download that via Chrome, it will trigger Gatekeeper and you need to manually click "Allow" in the system privacy settings. You can also do the same by just running:
xattr -c ./node-v16*
Afterwards you can:
chmod +x ./node*
It will crash in the same way that it does after our distribution.
Reviewed By: passy
Differential Revision: D46225503
fbshipit-source-id: f0ae2d5101b99c9db7fe80333573caef52c787a2
Summary:
The file manifest.json is injected with the auth token and it happens with every launch.
Because the file is tracked, these changes will always get picked no matter what the .gitignore file specifies, because is a tracked file.
So, the solution is to have a template with a different name, that gets copied into the right location during build time.
Reviewed By: LukeDefeo
Differential Revision: D46184772
fbshipit-source-id: 938b9433045485d9846a6a50c1c955ebe7925581
Summary:
Replace an existing running instance, if any.
This is useful for:
- Applying updates
- Ensuring freshness of server
Reviewed By: passy
Differential Revision: D46146814
fbshipit-source-id: bfb760f3ab26b7632510773609f1c6ca3a97c4ec
Summary:
I've just packaged Flipper for Gentoo Linux and I wanted to use the system electron instead of bundling its own copy into the flipper executable. To do so I use my custom `electron-builder` and `app-builder` versions, which also allows me to support otherwise unsupported architectures like ppc64. That means skipping the downloading/unzipping/bundling steps for electron, which greatly shortens the overall build process.
Being that fast resulted in countless hours of debugging, because the resulting `app.asar` wouldn't work. At some point I noticed that electron-builder cli was working flawlessly while processing the same exact config through the Javascript API resulted in failure, so I started digging into your scripts and I've noticed that you didn't await `stripSourceMapComment` into `desktop/scripts/build-utils.ts`.
In particular the `compile` function was returning before `stripSourceMapComment` had finished doing its stuff, which ended up messing with electron-builder later.
You didn't notice because you download electron, unzip it, etc which takes enough time to let `stripSourceMapComment` finish its stuff before the actual build starts, but since I skip these steps in order to use system electron I've been able to notice it.
## Changelog
I simply await `stripSourceMapComment` promises in `build-utils`.
Pull Request resolved: https://github.com/facebook/flipper/pull/4586
Test Plan:
`cd desktop && yarn && yarn build` is enough to test this.
## Additional Suggestions
I also suggest to enable the [no-floating-promises](https://typescript-eslint.io/rules/no-floating-promises/) eslint rule in order to ensure similar mistakes won't happen in the future.
Reviewed By: ivanmisuno, mweststrate
Differential Revision: D43974442
Pulled By: passy
fbshipit-source-id: 5acfa3d1479828e9373070c40fe3dd865a862561
Summary: Currently, Flipper server cannot be used with Flipper Launcher on Linux because there is no `flipper` binary in the root of the directory. Adding a quick shell script bridges the call from the checked-in node binary and the server JS file.
Reviewed By: ardavank
Differential Revision: D43837781
fbshipit-source-id: d954ae21d5330aa549d4bc76aefb1d76af8e2c84
Summary:
Bumps [metro-minify-terser](https://github.com/facebook/metro) from 0.70.2 to 0.75.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/facebook/metro/releases">metro-minify-terser's releases</a>.</em></p>
<blockquote>
<h2>Release v0.75.0</h2>
<ul>
<li><strong>[Breaking]</strong>: Formalise minimum Node JS requirement at 14.17.0 via <code>package.json#engines</code>. (<a href="c3e453ede5</a>)</li>
<li><strong>[Breaking]</strong>: Filter untyped context properties passed to custom resolvers. (<a href="cb01ec09c6</a>)</li>
<li><strong>[Breaking]</strong>: Change default <code>context.redirectModulePath</code> implementation to return absolute path in all cases. (<a href="acbfe63d83</a>)</li>
<li><strong>[Feature]</strong>: Add <code>mainFields</code>, <code>getPackage</code>, and <code>getPackageForModule</code> to custom resolver context. (<a href="adfb59329f</a>)</li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/facebook/metro/compare/v0.74.1...v0.75.0">https://github.com/facebook/metro/compare/v0.74.1...v0.75.0</a></p>
<h2>Release v0.74.1</h2>
<ul>
<li><strong>[Feature]</strong>: Add <code>babel/plugin-proposal-numeric-separator</code> to <code>metro-react-native-babel-preset</code> (<a href="https://github-redirect.dependabot.com/facebook/metro/pull/681">facebook/metro#681</a> by <a href="https://github.com/SConaway"><code>@SConaway</code></a>)</li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/facebook/metro/compare/v0.74.0...v0.74.1">https://github.com/facebook/metro/compare/v0.74.0...v0.74.1</a></p>
<h2>Release v0.74.0</h2>
<ul>
<li><strong>[Breaking]</strong> Remove <code>@babel/plugin-transform-template-literals</code> from metro-react-native-babel-preset (<a href="322dea8dc7</a>)</li>
<li><strong>[Breaking]</strong> Remove <code>postProcessBundleSourcemap</code> from config (<a href="339794e434</a>)</li>
<li><strong>[Fix]</strong> Don't log ENOENT errors to console for expected URL stack frames (<a href="1031ae6713</a>)</li>
<li><strong>[Fix]</strong> Don't attempt to use the <code>find</code> crawler on Windows (<a href="735aa9f523</a>)</li>
<li><strong>[Performance]</strong> Improve AST processing during transformation (<a href="https://github-redirect.dependabot.com/facebook/metro/pull/854">facebook/metro#854</a> by <a href="https://github.com/EvanBacon"><code>@EvanBacon</code></a>)</li>
<li><strong>[Performance]</strong> Improve Fast Refresh responsiveness when watching a large number of files (<a href="b942eca551</a>)</li>
</ul>
<p><strong>Full Changelog:</strong> <a href="https://github.com/facebook/metro/compare/v0.73.6...v0.74.0">https://github.com/facebook/metro/compare/v0.73.6...v0.74.0</a></p>
<h2>Release v0.73.7</h2>
<p><em>This is a hotfix on the <code>0.73.x</code> branch.</em></p>
<ul>
<li><strong>[Fix]</strong> Don't attempt to use the <code>find</code> crawler on Windows (<a href="370301981b</a>)</li>
</ul>
<h2>Release v0.73.6</h2>
<ul>
<li><strong>[Fix]</strong> Fix duplicate 'add' events, reduce dropped events on new subtrees in <code>NodeWatcher</code> (non-Watchman, non-macOS).(<a href="51fb7e349c</a>)</li>
</ul>
<blockquote>
<p>NOTE: Experimental features are not covered by semver and can change at any time.</p>
</blockquote>
<ul>
<li><strong>[Experimental]</strong> <code>experimentalImportBundleSupport</code>: Move bundle path hints into serialised dependency map(<a href="https://github-redirect.dependabot.com/facebook/metro/pull/901">facebook/metro#901</a>)</li>
</ul>
<p><strong>Full Changelog:</strong> <a href="https://github.com/facebook/metro/compare/v0.73.5...v0.73.6">https://github.com/facebook/metro/compare/v0.73.5...v0.73.6</a></p>
<h2>Release v0.73.5</h2>
<ul>
<li><strong>[Fix]</strong>: Make all <code>getTransformOptions</code> result properties optional. (<a href="a07c8235a3</a>)</li>
<li><strong>[Fix]</strong>: Bug that can lead to "unknown module" errors at runtime after an incremental build. (<a href="b1be263f7d</a>)</li>
<li><strong>[Fix]</strong>: <code>metro-runtime</code>: Re-throw cached module errors without wrapping. (<a href="032c4a1e03</a>)</li>
<li><strong>[Fix]</strong> Bump <code>babel/types</code> dependency to <code>^7.20.0</code> for more consistent exposed AST Bump <code>babel/types</code> dependency to <code>^7.20.0</code> for more consistent exposed AST</li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/facebook/metro/compare/v0.73.4...v0.73.5">https://github.com/facebook/metro/compare/v0.73.4...v0.73.5</a></p>
<h2>Release v0.73.4</h2>
<ul>
<li><strong>[Feature]:</strong> Expose <code>watch</code> option in <code>RunServerOptions</code> (<a href="https://github-redirect.dependabot.com/facebook/metro/pull/889">facebook/metro#889</a> by <a href="https://github.com/EvanBacon"><code>@EvanBacon</code></a>)</li>
<li><strong>[Feature]:</strong> <code>metro-runtime</code>: Emit additional context on WebSocket <code>'close'</code> events (<a href="d54986c49c</a>)</li>
</ul>
<blockquote>
<p>NOTE: Experimental features are not covered by semver and can change at any time.</p>
</blockquote>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="a110931489"><code>a110931</code></a> Release 0.75.0</li>
<li><a href="28b38bb0af"><code>28b38bb</code></a> Remove duplicated engines entry from metro-symbolicate package.json</li>
<li><a href="acbfe63d83"><code>acbfe63</code></a> Refactor subpath matching logic in browser spec resolution</li>
<li><a href="c3e453ede5"><code>c3e453e</code></a> Add "engines" field to all packages to indicate minimum Node JS version</li>
<li><a href="e890c997d0"><code>e890c99</code></a> Back out "Process files before adding them to <code>FileSystem</code>"</li>
<li><a href="1a81060c6c"><code>1a81060</code></a> Process files before adding them to <code>FileSystem</code></li>
<li><a href="aa442cacdb"><code>aa442ca</code></a> Move default redirectModulePath implementation into metro-resolver</li>
<li><a href="adfb59329f"><code>adfb593</code></a> Add getPackageForModule function to resolution context</li>
<li><a href="11a468140c"><code>11a4681</code></a> Document unstable_perfLoggerFactory (<a href="https://github-redirect.dependabot.com/facebook/metro/issues/920">https://github.com/facebook/flipper/issues/920</a>)</li>
<li><a href="7acb686f28"><code>7acb686</code></a> allow passing config for unstable_perfLoggerFactory without warning</li>
<li>Additional commits viewable in <a href="https://github.com/facebook/metro/compare/v0.70.2...v0.75.0">compare view</a></li>
</ul>
</details>
<br />
[](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/4493
Reviewed By: ivanmisuno
Differential Revision: D43117867
Pulled By: mweststrate
fbshipit-source-id: b842b25da921f1ca0cee563365c58f6f1c881791
Summary: Combining a bunch of individual tasks for dep upgrades into one diff.
Reviewed By: ivanmisuno
Differential Revision: D42706074
fbshipit-source-id: 054b2545ad1295699f47f4c6eb5065b7b9a1d6a0
Summary:
In our organization, Flipper is distributed in a version controlled way. As a result, we do not want users to manually update or receive prompts to update when a new version is available. There is already a `--updater` flag in the command line arguments for flipper.exe, but it isn't piped through. This change pipes it through and disables all update related UI when `--no-updater` is passed in.
## Changelog
Support --updater and --no-updater options for flipper.exe
Pull Request resolved: https://github.com/facebook/flipper/pull/4277
Test Plan: Ran `yarn build --win` in flipper/desktop, and launched flipper.exe from flipper/dist/win-unpacked with the `--updater`, `--no-updater` and no flags and ensured the proper behavior was observed (update UI shows by default or when `--updater` is specified, and doesn't show when `--no-updater` is specified).
Reviewed By: passy
Differential Revision: D41298321
Pulled By: mweststrate
fbshipit-source-id: 5ddfede2700954f0fdd6a111b20d0836fab25565
Summary:
Flipper plugins fail when importing css from third-party dependencies. This diff tries to fix that.
Effectively, the plugin can import the css and export it when is bundled.
When we load the plugin, we check if there's a css file for it. If there's one, we return it and try to use it.
Reviewed By: aigoncharov
Differential Revision: D40758178
fbshipit-source-id: e53afffcc481504905d5eeb1aea1f9114ee2a86b