Summary:
If there server disconnects, we used to show a red box message on the lower left section of the screen. It didn't say much other than the server had disconnected.
If you are aware of what the server is, then you may try to manually restart it.
Instead of doing that, a much better experience is to show the no connection troubleshoot with the button to start the server or with instructions on how to achieve this.
Reviewed By: antonk52
Differential Revision: D48467308
fbshipit-source-id: 0ffded95789c7548d9f1e1a9127409e02e72ab8c
Summary: This change only adds the PWA as capable of handling files with the ".flipper" extension.
Reviewed By: aigoncharov
Differential Revision: D48353437
fbshipit-source-id: fd78942ac4dffb7d26d5ca5be826290018465b93
Summary:
There's no explicit way of knowing if the file selection dialog was dismissed/canceled without a selection.
Instead, subscribe once to the windows focus event, as it will the event will be received when this happens.
Reviewed By: antonk52
Differential Revision: D48434187
fbshipit-source-id: dd20c55885bb3ef6bef423e17a2606d71ede288d
Summary: Implementation was missing for the browser. This provides a default implementation.
Reviewed By: aigoncharov
Differential Revision: D48311198
fbshipit-source-id: fd067600f571234e0fbccfb90853b62f175ff8fb
Summary:
Until now, launching flipper-server with TCP would accept any incoming connection as long as it comes from the same origin (localhost) using web socket host origin verification.
This is not entirely secure as origin can be spoofed with tools like curl.
Our team created a security review and a proposal was written:
https://docs.google.com/document/d/16iXypCQibPiner061SoaQUFUY9tLVAEpkKfV_hUXI7c/
Effectively, Flipper can generate a token which is then used by the client to authenticate.
This diff contains the changes required to generate, obtain, and validate authentication tokens from clients connecting to flipper over TCP connections.
The token itself is a JWT token. JWT was chosen because it is a simple industry standard which offers three features which can immediately benefit us:
- Expiration handling. No need for Flipper to store this information anywhere.
- Payload. Payload can be used to push any data we deem relevant i.e. unix username.
- Signing. Signed and verified using the same server key pair which is already in place for certificate exchange.
Additionally, the token is stored in the Flipper static folder. This ensures that the browser and PWA clients have access to it.
Reviewed By: mweststrate
Differential Revision: D45179654
fbshipit-source-id: 6761bcb24f4ba30b67d1511cde8fe875158d78af
Summary:
^
There's no references to this anywhere, so delete.
Reviewed By: antonk52
Differential Revision: D45309041
fbshipit-source-id: e62e94b089eee30b82b05f64c8e7b31dd03597b6
Summary:
Bumps [react-refresh](https://github.com/facebook/react/tree/HEAD/packages/react) from 0.11.0 to 0.14.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/facebook/react/releases">react-refresh's releases</a>.</em></p>
<blockquote>
<h2>v0.14.0</h2>
<p>See <a href="http://facebook.github.io/react/blog/2015/10/07/react-v0.14.html">http://facebook.github.io/react/blog/2015/10/07/react-v0.14.html</a>.</p>
<h2>v0.13.3</h2>
<h3>React Core</h3>
<h4>New Features</h4>
<ul>
<li>Added <code>clipPath</code> element and attribute for SVG</li>
<li>Improved warnings for deprecated methods in plain JS classes</li>
</ul>
<h4>Bug Fixes</h4>
<ul>
<li>Loosened <code>dangerouslySetInnerHTML</code> restrictions so <code>{__html: undefined}</code> will no longer throw</li>
<li>Fixed extraneous context warning with non-pure <code>getChildContext</code></li>
<li>Ensure <code>replaceState(obj)</code> retains prototype of <code>obj</code></li>
</ul>
<h3>React with Add-ons</h3>
<h3>Bug Fixes</h3>
<ul>
<li>Test Utils: Ensure that shallow rendering works when components define <code>contextTypes</code></li>
</ul>
<h2>v0.13.2</h2>
<h3>React Core</h3>
<h4>New Features</h4>
<ul>
<li>Added <code>strokeDashoffset</code>, <code>flexPositive</code>, <code>flexNegative</code> to the list of unitless CSS properties</li>
<li>Added support for more DOM properties:
<ul>
<li><code>scoped</code> - for <code><style></code> elements</li>
<li><code>high</code>, <code>low</code>, <code>optimum</code> - for <code><meter></code> elements</li>
<li><code>unselectable</code> - IE-specific property to prevent user selection</li>
</ul>
</li>
</ul>
<h4>Bug Fixes</h4>
<ul>
<li>Fixed a case where re-rendering after rendering null didn't properly pass context</li>
<li>Fixed a case where re-rendering after rendering with <code>style={null}</code> didn't properly update <code>style</code></li>
<li>Update <code>uglify</code> dependency to prevent a bug in IE8</li>
<li>Improved warnings</li>
</ul>
<h3>React with Add-Ons</h3>
<h4>Bug Fixes</h4>
<ul>
<li>Immutabilty Helpers: Ensure it supports <code>hasOwnProperty</code> as an object key</li>
</ul>
<h3>React Tools</h3>
<ul>
<li>Improve documentation for new options</li>
</ul>
<h2>v0.13.1</h2>
<h3>React Core</h3>
<h4>Bug Fixes</h4>
<ul>
<li>Don't throw when rendering empty <code><select></code> elements</li>
<li>Ensure updating <code>style</code> works when transitioning from <code>null</code></li>
</ul>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/facebook/react/blob/main/CHANGELOG.md">react-refresh's changelog</a>.</em></p>
<blockquote>
<h2>0.14.0 (October 7, 2015)</h2>
<h3>Major changes</h3>
<ul>
<li>Split the main <code>react</code> package into two: <code>react</code> and <code>react-dom</code>. This paves the way to writing components that can be shared between the web version of React and React Native. This means you will need to include both files and some functions have been moved from <code>React</code> to <code>ReactDOM</code>.</li>
<li>Addons have been moved to separate packages (<code>react-addons-clone-with-props</code>, <code>react-addons-create-fragment</code>, <code>react-addons-css-transition-group</code>, <code>react-addons-linked-state-mixin</code>, <code>react-addons-perf</code>, <code>react-addons-pure-render-mixin</code>, <code>react-addons-shallow-compare</code>, <code>react-addons-test-utils</code>, <code>react-addons-transition-group</code>, <code>react-addons-update</code>, <code>ReactDOM.unstable_batchedUpdates</code>).</li>
<li>Stateless functional components - React components were previously created using React.createClass or using ES6 classes. This release adds a <a href="https://reactjs.org/docs/reusable-components.html#stateless-functions">new syntax</a> where a user defines a single <a href="https://reactjs.org/docs/reusable-components.html#stateless-functions">stateless render function</a> (with one parameter: <code>props</code>) which returns a JSX element, and this function may be used as a component.</li>
<li>Refs to DOM components as the DOM node itself. Previously the only useful thing you can do with a DOM component is call <code>getDOMNode()</code> to get the underlying DOM node. Starting with this release, a ref to a DOM component <em>is</em> the actual DOM node. <strong>Note that refs to custom (user-defined) components work exactly as before; only the built-in DOM components are affected by this change.</strong></li>
</ul>
<h3>Breaking changes</h3>
<ul>
<li><code>React.initializeTouchEvents</code> is no longer necessary and has been removed completely. Touch events now work automatically.</li>
<li>Add-Ons: Due to the DOM node refs change mentioned above, <code>TestUtils.findAllInRenderedTree</code> and related helpers are no longer able to take a DOM component, only a custom component.</li>
<li>The <code>props</code> object is now frozen, so mutating props after creating a component element is no longer supported. In most cases, <a href="https://reactjs.org/docs/react-api.html#cloneelement"><code>React.cloneElement</code></a> should be used instead. This change makes your components easier to reason about and enables the compiler optimizations mentioned above.</li>
<li>Plain objects are no longer supported as React children; arrays should be used instead. You can use the <a href="https://reactjs.org/docs/create-fragment.html"><code>createFragment</code></a> helper to migrate, which now returns an array.</li>
<li>Add-Ons: <code>classSet</code> has been removed. Use <a href="https://github.com/JedWatson/classnames">classnames</a> instead.</li>
<li>Web components (custom elements) now use native property names. Eg: <code>class</code> instead of <code>className</code>.</li>
</ul>
<h3>Deprecations</h3>
<ul>
<li><code>this.getDOMNode()</code> is now deprecated and <code>ReactDOM.findDOMNode(this)</code> can be used instead. Note that in the common case, <code>findDOMNode</code> is now unnecessary since a ref to the DOM component is now the actual DOM node.</li>
<li><code>setProps</code> and <code>replaceProps</code> are now deprecated. Instead, call ReactDOM.render again at the top level with the new props.</li>
<li>ES6 component classes must now extend <code>React.Component</code> in order to enable stateless function components. The <a href="https://reactjs.org/blog/2015/01/27/react-v0.13.0-beta-1.html#other-languages">ES3 module pattern</a> will continue to work.</li>
<li>Reusing and mutating a <code>style</code> object between renders has been deprecated. This mirrors our change to freeze the <code>props</code> object.</li>
<li>Add-Ons: <code>cloneWithProps</code> is now deprecated. Use <a href="https://reactjs.org/docs/react-api.html#cloneelement"><code>React.cloneElement</code></a> instead (unlike <code>cloneWithProps</code>, <code>cloneElement</code> does not merge <code>className</code> or <code>style</code> automatically; you can merge them manually if needed).</li>
<li>Add-Ons: To improve reliability, <code>CSSTransitionGroup</code> will no longer listen to transition events. Instead, you should specify transition durations manually using props such as <code>transitionEnterTimeout={500}</code>.</li>
</ul>
<h3>Notable enhancements</h3>
<ul>
<li>Added <code>React.Children.toArray</code> which takes a nested children object and returns a flat array with keys assigned to each child. This helper makes it easier to manipulate collections of children in your <code>render</code> methods, especially if you want to reorder or slice <code>this.props.children</code> before passing it down. In addition, <code>React.Children.map</code> now returns plain arrays too.</li>
<li>React uses <code>console.error</code> instead of <code>console.warn</code> for warnings so that browsers show a full stack trace in the console. (Our warnings appear when you use patterns that will break in future releases and for code that is likely to behave unexpectedly, so we do consider our warnings to be “must-fix” errors.)</li>
<li>Previously, including untrusted objects as React children <a href="http://danlec.com/blog/xss-via-a-spoofed-react-element">could result in an XSS security vulnerability</a>. This problem should be avoided by properly validating input at the application layer and by never passing untrusted objects around your application code. As an additional layer of protection, <a href="https://github-redirect.dependabot.com/facebook/react/pull/4832">React now tags elements</a> with a specific <a href="http://www.2ality.com/2014/12/es6-symbols.html">ES2015 (ES6) <code>Symbol</code></a> in browsers that support it, in order to ensure that React never considers untrusted JSON to be a valid element. If this extra security protection is important to you, you should add a <code>Symbol</code> polyfill for older browsers, such as the one included by <a href="https://babeljs.io/docs/usage/polyfill/">Babel’s polyfill</a>.</li>
<li>When possible, React DOM now generates XHTML-compatible markup.</li>
<li>React DOM now supports these standard HTML attributes: <code>capture</code>, <code>challenge</code>, <code>inputMode</code>, <code>is</code>, <code>keyParams</code>, <code>keyType</code>, <code>minLength</code>, <code>summary</code>, <code>wrap</code>. It also now supports these non-standard attributes: <code>autoSave</code>, <code>results</code>, <code>security</code>.</li>
<li>React DOM now supports these SVG attributes, which render into namespaced attributes: <code>xlinkActuate</code>, <code>xlinkArcrole</code>, <code>xlinkHref</code>, <code>xlinkRole</code>, <code>xlinkShow</code>, <code>xlinkTitle</code>, <code>xlinkType</code>, <code>xmlBase</code>, <code>xmlLang</code>, <code>xmlSpace</code>.</li>
<li>The <code>image</code> SVG tag is now supported by React DOM.</li>
<li>In React DOM, arbitrary attributes are supported on custom elements (those with a hyphen in the tag name or an <code>is="..."</code> attribute).</li>
<li>React DOM now supports these media events on <code>audio</code> and <code>video</code> tags: <code>onAbort</code>, <code>onCanPlay</code>, <code>onCanPlayThrough</code>, <code>onDurationChange</code>, <code>onEmptied</code>, <code>onEncrypted</code>, <code>onEnded</code>, <code>onError</code>, <code>onLoadedData</code>, <code>onLoadedMetadata</code>, <code>onLoadStart</code>, <code>onPause</code>, <code>onPlay</code>, <code>onPlaying</code>, <code>onProgress</code>, <code>onRateChange</code>, <code>onSeeked</code>, <code>onSeeking</code>, <code>onStalled</code>, <code>onSuspend</code>, <code>onTimeUpdate</code>, <code>onVolumeChange</code>, <code>onWaiting</code>.</li>
<li>Many small performance improvements have been made.</li>
<li>Many warnings show more context than before.</li>
<li>Add-Ons: A <a href="https://github-redirect.dependabot.com/facebook/react/pull/3355"><code>shallowCompare</code></a> add-on has been added as a migration path for <code>PureRenderMixin</code> in ES6 classes.</li>
<li>Add-Ons: <code>CSSTransitionGroup</code> can now use <a href="https://github.com/facebook/react/blob/48942b85/docs/docs/10.1-animation.md#custom-classes">custom class names</a> instead of appending <code>-enter-active</code> or similar to the transition name.</li>
</ul>
<h3>New helpful warnings</h3>
<ul>
<li>React DOM now warns you when nesting HTML elements invalidly, which helps you avoid surprising errors during updates.</li>
<li>Passing <code>document.body</code> directly as the container to <code>ReactDOM.render</code> now gives a warning as doing so can cause problems with browser extensions that modify the DOM.</li>
<li>Using multiple instances of React together is not supported, so we now warn when we detect this case to help you avoid running into the resulting problems.</li>
</ul>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="3603d45157"><code>3603d45</code></a> v0.14.0</li>
<li><a href="693dd3567b"><code>693dd35</code></a> Update to fbjs@0.3</li>
<li><a href="4a4174b9e8"><code>4a4174b</code></a> 0.14.0-rc1</li>
<li><a href="c04d02e5e8"><code>c04d02e</code></a> Add warnings to React module</li>
<li><a href="52b4c9eabf"><code>52b4c9e</code></a> Upgrade to fbjs, fbjs-scripts @ 0.2</li>
<li><a href="b38509cade"><code>b38509c</code></a> Merge pull request <a href="https://github.com/facebook/react/tree/HEAD/packages/react/issues/4540">https://github.com/facebook/flipper/issues/4540</a> from scottburch/ie8-fix</li>
<li><a href="ecb34de574"><code>ecb34de</code></a> Upgrade ESLint, fix code</li>
<li><a href="3f6bca7b16"><code>3f6bca7</code></a> 0.14.0-beta3</li>
<li><a href="5f01a90954"><code>5f01a90</code></a> Update addons.js</li>
<li><a href="1da2b29897"><code>1da2b29</code></a> added suggested comment to get file to pass es-lint</li>
<li>Additional commits viewable in <a href="https://github.com/facebook/react/commits/v0.14.0/packages/react">compare view</a></li>
</ul>
</details>
<details>
<summary>Maintainer changes</summary>
<p>This version was pushed to npm by <a href="https://www.npmjs.com/~gnoff">gnoff</a>, a new releaser for react-refresh since your current version.</p>
</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/4540
Reviewed By: ivanmisuno
Differential Revision: D44215184
Pulled By: mweststrate
fbshipit-source-id: e8f33dfbfbe887d49c27f2dabbbc1548de3d10e9
Summary:
FlipperServerClient is a useful abstraction for any JS-based client of headless Flipper. No need to bundle it with flipper-frontend-core, as the rest is not useful for external clients.
Currently, I am planning to add it to jest-e2e to send commands to Flipper
Reviewed By: lblasa
Differential Revision: D40765668
fbshipit-source-id: af48710bb15444ac1ecd649fe9a2ab252f3088f3
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
Summary:
Start bundling source maps together with the source code itself in the dev mode. Therefore it is no longer required to add a link to the external source map file in dev mode.
In prod mode we still ship them separately.
Reviewed By: mweststrate
Differential Revision: D39775064
fbshipit-source-id: 6c56df7a3fce084c07a8618a63dbd8ae4741348c
Summary:
In D39311893 (094c5bdfdd) we started monkey-patching `require` to resolve global dependencies in the plugins. Apparently, patching `globalThis.require` did not work in the electron env. On my local machine it kept working because I had the experimental `flipper-server` feature enabled which embeds flipper-server into the electron build. In flipper-server we properly patch `require` via `Module.prototype.require` which affected the global require in electron.
With this fix we now properly patch require in electron via Module.prototype.require all the time
Changelog: Fix plugin loading with experimental flipper-server disabled
Reviewed By: nikoant
Differential Revision: D39633821
fbshipit-source-id: 9554f643c625620d116075ae87f573d8447850f6
Summary: As we stopped bundling plugins in D39276249, we no longer need the entry points for the bundled plugins (these entry points are always going to be empty)
Reviewed By: lblasa
Differential Revision: D39307565
fbshipit-source-id: 43751fe31c8bd962677c226b27cfe52093d3f2d4
Summary:
^
Before this change, the client assumed the host and port came from location.host which is fine on the browser.
In all other cases, that object/properties may be undefined.
As such, add host and port as function args and use that instead.
Reviewed By: passy
Differential Revision: D36440423
fbshipit-source-id: 5f931f1d610d583db6a2e549e1213585f0d03dee
Summary: Bunch of dependabot PRs showed that the signal is green, but still wanted to have all in one diff.
Reviewed By: aigoncharov
Differential Revision: D36102480
fbshipit-source-id: 88d472fdc2a910a7441a9e8164fe8af0f2d90f7b
Summary:
Before:
```
flipper-server/src/startBaseServer.tsx(222,30): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
Type 'undefined' is not assignable to type 'string'.
flipper-ui-browser/src/flipperServerConnection.tsx(25,9): error TS2322: Type 'Timeout' is not assignable to type 'number'.
```
Reviewed By: nikoant
Differential Revision: D36100188
fbshipit-source-id: 1913a43109a0e068394a188d362f6a9e473e7904
Summary:
New round of releases and PRs came up, so bumping again.
Very selective Metro update as some dependencies don't play well together. A bunch of other dependencies use ESM and fail at various stages of the build or runtime process.
Reviewed By: mweststrate
Differential Revision: D34688830
fbshipit-source-id: 2ff5c46c253b814140f634a986ba0d246e9b0945
Summary:
Bumps [metro-runtime](https://github.com/facebook/metro) from 0.66.2 to 0.68.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/facebook/metro/releases">metro-runtime's releases</a>.</em></p>
<blockquote>
<h2>Release v0.68.0</h2>
<ul>
<li><strong>[Breaking]</strong> <code>resolver.resolveRequest</code> moved to the front of the resolution algorithm and <a href="https://facebook.github.io/metro/docs/configuration/#resolverequest">has a new API</a> (d81d8877c05637eac2b4ea946a9fa1e8ae869b06)</li>
<li><strong>[Feature]</strong> <code>metro-react-native-babel-preset</code>: Support async iterators, "for await ... of" (<a href="https://github-redirect.dependabot.com/facebook/metro/issues/747">https://github.com/facebook/flipper/issues/747</a> by <a href="https://github.com/newyankeecodeshop"><code>@newyankeecodeshop</code></a>)</li>
</ul>
<p>Thanks to all of our contributors for helping improve Metro! 🚇</p>
<h2>Release v0.67.0</h2>
<ul>
<li><strong>[Breaking]</strong> Use custom resolvers (<code>resolver.resolveRequest</code>) before checking the Haste map. (96fb6e904e1660b37f4d1f5353ca1e5477c4afbf)</li>
<li><strong>[Feature]</strong> Update React Native lazy imports list with the removal of <code>StatusBarIOS</code>. (2a0f77925e3299e01c2bfe82d0356145a643adc0)</li>
<li><strong>[Feature]</strong> Allow configuring the path of the canonical empty module, which now lives in <code>metro-runtime</code> by default. (bd5f9323337b03a77bc219636937bb75cd8c18ca, 6e3e789b685b95ea59a58364a751e8010d536e8b, 7723be545795c936cb81cad214ee202f72e169b3)</li>
<li><strong>[Feature]</strong> Add <code>initialize_done</code>, <code>transformer_loading</code>, and <code>transformer_loaded</code> events to the <code>Reporter</code> interface. (d19cf5d7e88207a8d46c17b570f14a239dae8926)</li>
<li><strong>[Feature]</strong> Add <code>waitForBundler</code> option to the <code>runServer()</code> and <code>runMetro()</code> APIs. (57d8a92583185a97dffcdc1c95fef7780be9104d)</li>
<li><strong>[Feature]</strong> Add <code>resolver.disableHierarchicalLookup</code> option. (01416f1bc41a3d557b24e4b508fed5f158990108)</li>
<li><strong>[Feature]</strong> Remove confusing troubleshooting steps from missing module errors. (1fa45c21f7508cc3a852071b775f592873700ad0)</li>
<li><strong>[Feature]</strong> Infer names for anonymous functions in optional calls. (4ced2a1be8a42a9c7df71b566918a457bad207c1)</li>
<li><strong>[Feature]</strong> Infer names for anonymous functions memoized with useCallback. (2611f618b245fd2bd2c3558d2536011269bb5a68)</li>
<li><strong>[Feature]</strong> Update terser to v5 in <code>metro-minify-terser</code>. (<a href="https://github-redirect.dependabot.com/facebook/metro/pull/754">facebook/metro#754</a> by <a href="https://github.com/rockwotj"><code>@rockwotj</code></a>, <a href="https://github-redirect.dependabot.com/facebook/metro/pull/606">facebook/metro#606</a> by <a href="https://github.com/janicduplessis"><code>@janicduplessis</code></a>)</li>
<li><strong>[Fix]</strong> Fix a caching issue with custom resolvers. (793b1a03c1f0b5e63869b471adab3f1ad61b199b)</li>
<li><strong>[Fix]</strong> Specify UTF-8 encoding when serving bundles. (<a href="https://github-redirect.dependabot.com/facebook/metro/pull/695">facebook/metro#695</a> by <a href="https://github.com/zhiqingchen"><code>@zhiqingchen</code></a>)</li>
<li><strong>[Fix]</strong> Support <a href="https://github.com/defunctzombie/package-browser-field-spec#replace-specific-files---advanced">package.json module replacements</a> for requires with implicit extensions. (41522a25bec9325d1df5981b55d4672db7126895)</li>
<li><strong>[Fix]</strong> Resolve <a href="https://github.com/defunctzombie/package-browser-field-spec#replace-specific-files---advanced">package.json module replacements</a> when the replaced module isn't a physical file. (171393a6319e507935eeb3d40561e908c1a2abfe)</li>
<li><strong>[Fix]</strong> Fix stack trace symbolication when input files have non-Unix line endings. (<a href="https://github-redirect.dependabot.com/facebook/metro/pull/691">facebook/metro#691</a> by <a href="https://github.com/danielsmc"><code>@danielsmc</code></a>)</li>
<li><strong>[Fix]</strong> Decrease the precedence of <code>resolver.nodeModulesPaths</code> to respect transitive dependencies. (<a href="https://github-redirect.dependabot.com/facebook/metro/pull/738">facebook/metro#738</a> by <a href="https://github.com/sharmilajesupaul"><code>@sharmilajesupaul</code></a>)</li>
<li><strong>[Fix]</strong> Respect <code>mangle: false</code> & <code>sourceMap: false</code> in <code>minifierConfig</code>. (<a href="https://github-redirect.dependabot.com/facebook/metro/pull/749">facebook/metro#749</a> by <a href="https://github.com/mfbx9da4"><code>@mfbx9da4</code></a>)</li>
<li><strong>[Fix]</strong> Update hash function from MD4 to MD5 for Node 17 compatibility. (<a href="https://github-redirect.dependabot.com/facebook/metro/pull/752">facebook/metro#752</a> by <a href="https://github.com/tobua"><code>@tobua</code></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> Add <code>server.unstable_serverRoot</code> option to allow serving bundles from folders outside the project root. (026a66cf40df1bd05da2afc1660efa1d9605c55a, ca86682012eb836e2b6aeb001f2b3112129e38c3, e061cf342505f3d07fb21f85f22925e3d05557c9, 70e98882ad24d7c25c9b73eaf347e60f2a74c8ca, baacea28635dae7fea3bd30dd485252ae59a937e)</li>
<li><strong>[Experimental]</strong> Update <code>metro-hermes-compiler</code>. (e80434cf329619e1a0c6c56ae7be6c88cb350c99)</li>
<li><strong>[Experimental]</strong> Provide safe access to assets outside the project root using <code>/assets?unstable_path=...</code>. (f3d1157bacc341dff82efea2f70b634141105fc0)</li>
<li><strong>[Experimental]</strong> Add <code>resolver.unstable_hasteMapModulePath</code> option. (e8c0de0411148bd31e3decb6a5c4c1dc1d645666)</li>
</ul>
<p>Thanks to all the contributors mentioned above for helping improve Metro! 🚇</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="c84b533643"><code>c84b533</code></a> Publish 0.68.0</li>
<li><a href="fbe26fd929"><code>fbe26fd</code></a> fix(website): add Algolia search API key (<a href="https://github-redirect.dependabot.com/facebook/metro/issues/726">https://github.com/facebook/flipper/issues/726</a>)</li>
<li><a href="02baeb6dac"><code>02baeb6</code></a> Change github actions trigger to use <code>main</code> branch (<a href="https://github-redirect.dependabot.com/facebook/metro/issues/769">https://github.com/facebook/flipper/issues/769</a>)</li>
<li><a href="bf73ed3aa7"><code>bf73ed3</code></a> RN preset: support async iterators, for await of (<a href="https://github-redirect.dependabot.com/facebook/metro/issues/747">https://github.com/facebook/flipper/issues/747</a>)</li>
<li><a href="a40c474a67"><code>a40c474</code></a> Deploy 0.171.0 to xplat</li>
<li><a href="d81d8877c0"><code>d81d887</code></a> Move resolveRequest to the front of the resolution algorithm</li>
<li><a href="ccfec1e846"><code>ccfec1e</code></a> Release 0.67.0</li>
<li><a href="b31f5a462d"><code>b31f5a4</code></a> Deploy v0.170.0 to xplat</li>
<li><a href="36e3ffe4bd"><code>36e3ffe</code></a> Bump node-fetch from 2.6.1 to 2.6.7 (<a href="https://github-redirect.dependabot.com/facebook/metro/issues/762">https://github.com/facebook/flipper/issues/762</a>)</li>
<li><a href="3fb4da8fae"><code>3fb4da8</code></a> Bump trim-off-newlines from 1.0.1 to 1.0.3 (<a href="https://github-redirect.dependabot.com/facebook/metro/issues/757">https://github.com/facebook/flipper/issues/757</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/facebook/metro/compare/v0.66.2...v0.68.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/3451
Reviewed By: nikoant
Differential Revision: D34216543
Pulled By: passy
fbshipit-source-id: 3b212ed4822f34950450e51103aa90a45977322a
Summary:
Bumps [socket.io-client](https://github.com/socketio/socket.io-client) from 4.4.0 to 4.4.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/socketio/socket.io-client/releases">socket.io-client's releases</a>.</em></p>
<blockquote>
<h2>4.4.1</h2>
<p>This release only contains minor changes. Please see the diff for more details.</p>
<h4>Links:</h4>
<ul>
<li>Diff: <a href="https://github.com/socketio/socket.io-client/compare/4.4.0...4.4.1">https://github.com/socketio/socket.io-client/compare/4.4.0...4.4.1</a></li>
<li>Server release: <a href="https://github.com/socketio/socket.io/releases/tag/4.4.1">4.4.1</a></li>
<li>engine.io-client version: <code>~6.1.1</code></li>
<li>ws version: <code>~8.2.3</code></li>
</ul>
<p>Size of the bundles:</p>
<table>
<thead>
<tr>
<th></th>
<th>min</th>
<th>min+gzip</th>
</tr>
</thead>
<tbody>
<tr>
<td>socket.io.min.js</td>
<td>40.4 KB (-)</td>
<td>13.1 KB (-)</td>
</tr>
<tr>
<td>socket.io.msgpack.min.js</td>
<td>45.6 KB (-)</td>
<td>14.2 KB (-)</td>
</tr>
<tr>
<td>socket.io.esm.min.js</td>
<td>33.1 KB (-)</td>
<td>11.3 KB (-)</td>
</tr>
</tbody>
</table>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/socketio/socket.io-client/blob/master/CHANGELOG.md">socket.io-client's changelog</a>.</em></p>
<blockquote>
<h2><a href="https://github.com/socketio/socket.io-client/compare/4.4.0...4.4.1">4.4.1</a> (2022-01-06)</h2>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="359d1e25e7"><code>359d1e2</code></a> chore(release): 4.4.1</li>
<li><a href="f56fdd0f09"><code>f56fdd0</code></a> chore: remove duplicate package.json file</li>
<li><a href="19836d9abf"><code>19836d9</code></a> chore: add types to exports field to be compatible with nodenext module resol...</li>
<li>See full diff in <a href="https://github.com/socketio/socket.io-client/compare/4.4.0...4.4.1">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/3347
Reviewed By: mweststrate
Differential Revision: D33741779
Pulled By: lblasa
fbshipit-source-id: ab87f191dab7d1835005f07ea89ded7890f6f649
Summary: Make sure icons are prefetched for flipper-server prod builds, like we do for electron, so that the user doesn't need an internet connection to see icons
Reviewed By: nikoant
Differential Revision: D33296389
fbshipit-source-id: bfa92d78d8d77030238e5cca10d7aa6dcfb88e8b
Summary:
This diff fixes several issues around loading plugin, such as:
* make suresource maps work in the flipper-server production build
* make sure default plugins are no symlinked, which wouldn't work anywhere else but on the the system where it was build
* support release channel param for flipper-server
Bundled flipper-server is now 42MB (with icons (see later diffs) and plugins
```
ll flipper-server-v0.0.0.tgz
-rw-r--r-- 1 mweststrate staff 42M 23 Dec 15:29 flipper-server-v0.0.0.tgz
```
Reviewed By: nikoant
Differential Revision: D33294677
fbshipit-source-id: 63538dc8127f883fee6a3608673ad11ce239b350
Summary: This diff is some boyscouting on cleaning up our globals, and stop using them inconsistently icmw global or window
Reviewed By: aigoncharov
Differential Revision: D33171108
fbshipit-source-id: 400893e5f31523631a7ab6fda428524c751901f1
Summary:
This diff adds `types` fields on the compiler config for every project. This way we can make sure that for example node types and packages are not available in flipper-ui-core. Without an explicit types field, all types would be shared between all packages, and implicitly included into the compilation of everything. For the same reason `types/index.d.ts` has been removed, we want to be intentional on which types are being used in which package.
This diff does most of the work, the next diff will fine tune the globals, and do some further cleanup.
As an alternative solution I first tried a `nohoist: **/node_modules/types/**` and make sure every package list explicitly the types used in package json, which works but is much more error prone, as for example two different react types versions in two packages will cause the most unreadable compiler error due to the types not being shared and not literally the same.
Reviewed By: lawrencelomax
Differential Revision: D33124441
fbshipit-source-id: c2b9d768f845ac28005d8331ef5fa1066c7e4cd7
Summary:
This diff removes most deps from the root package.json, which now only contains electron and shared build / test infra structure: lint, prettier, jest, typescript.
This makes it possible to control much better which packages are used where, as all sub packages now have their deps explicitly in their package.json instead of incidentally shared. This allows for example to disable DOM types for all packages by default (flipper-plugin, ui(-core) and app still request it), and in the next diff I hope to add to this that nodeJS types are no longer shared either, so that UI oriented packages will generate compile errors when using Node built-ins
This diff removes most deps that were currently unused, and dedupes a bunch of other ones, so the build should probably be a bit smaller now as well:
{F686704253}
{F686704295}
Reviewed By: antonk52
Differential Revision: D33062859
fbshipit-source-id: 5afaa4f2103d055188382a3370c1fffa295a298a
Summary:
Changelog: Register shortcuts only for Flipper application instead of globally. Fixes https://github.com/facebook/flipper/issues/3090
As reported, during decapitation we accidentally started registering shortcuts globally, rather per app as it used to be in the menu's. This diff fixes that and also makes sure shortcuts are supported in the browser version of flipper
Reviewed By: lawrencelomax
Differential Revision: D33158445
fbshipit-source-id: 8371e5b96e772152eeb93ba990e1f5edb9e67085
Summary:
Bundled plugins so far didn't load because the defaultPlugins was not generated yet. Fixed follow up errors that resulted from node modules not being available in the browser, and made the process more robust so that one plugin that fails to initialise doesn't kill all bundled plugins from being loaded.
Cleaned up the server scripts, and reused the BUILTINS list that is already maintained in the babel transformer.
Report errors during the build process if modules are referred that are stubbed out (later on we could maybe error on that)
Reviewed By: aigoncharov
Differential Revision: D33020243
fbshipit-source-id: 3ce13b0049664b5fb19c1f45f0b33c1d7fdbea4c
Summary: Removed process, adbkit and electron usages that were still remaining. Verified changes by disabling the built-in module stubbing (will be cleaned up further later in this stack).
Reviewed By: aigoncharov
Differential Revision: D33019083
fbshipit-source-id: 8bfce31f4b5ed349cb4fd86d34c9b41b9b8b8360
Summary: Run doctor checks remained pending when the socket disonnected during a check. This
Reviewed By: aigoncharov
Differential Revision: D32984539
fbshipit-source-id: 277005e78803afaaa220cc5ca7fdc9cca6254453
Summary: This diffs adds debugging support to flipper server, by adding VSCode config for it
Reviewed By: timur-valiev, aigoncharov
Differential Revision: D32982874
fbshipit-source-id: 8e187ad05a05566a598db04b97e8b08e3de7e835
Summary:
The build process for the server was a simple ts-node that compiled all deps. However, that didn't do any source transformations we need, like replacing `fb-stubs` with `fb` in facebook builds.
This diff works out the dev build process to align more with how other parts of the code base is build, by starting metro to build and bundle the server (only the sources of flipper-server, flipper-server-core and other flipper packages are bundled, node-deps are left as is).
To achieve this, since metro doesn't have support for 'external' packages like any arbitrarily other bundler, we recycle the electronRequire work around that is used in the desktop app as well
Reviewed By: aigoncharov
Differential Revision: D32949677
fbshipit-source-id: 00d326bb17b68aece6fb43af98d0def13b335e74
Summary:
I was running flipper-server on a fresh machine without Flipper installed and discovered that reading / writing settings failed since `~/.flipper` wasn't existing, due to using `access` instead of `pathExists`.
Added a warning about needing to restart the server after making changes, since that is tricky to do from the UI.
Fixed an issue in the settings screen, which would fs.stat as part of rendering, causing the Settings UI not to load.
Reviewed By: timur-valiev, aigoncharov
Differential Revision: D32984538
fbshipit-source-id: 2b2011ad9d84c72ac824d92a8c96f636237b8771
Summary: This diff stubs all node modules when running in the browser, so that, albeit with a lot of errors and without plugins, the UI loads in a browser. To be continued in the rest of this diff
Reviewed By: antonk52
Differential Revision: D32665705
fbshipit-source-id: 4632e241f59c5b9712a41d01a26878afb01f69b5
Summary: Introduced an API that converts a filepath, relatively to the `desktop/static/` folder in a url that can be resolved by the render environment. This will generate `file://` urls in Electron, and root relative `/` urls in browser envs
Reviewed By: aigoncharov
Differential Revision: D32767427
fbshipit-source-id: 378da7709bcb19449873358a8703b9c5a5809c57
Summary: This diff makes most stuff that is read from the `os` package, and version info etc available from the `serverConfig` object, so that flipper-ui-core no longer needs the `os` package.
Reviewed By: passy
Differential Revision: D32694848
fbshipit-source-id: 93af1e95d898da9aaf351a6970b5a7652ee835c8
Summary: This diff makes plugin loading async, which we'd need in a browser env (either because we'd use `import()` or we need to fetch the source and than eval it), and deals with all the fallout of that
Reviewed By: timur-valiev
Differential Revision: D32669995
fbshipit-source-id: 73babf38a6757c451b8200c3b320409f127b8b5b
Summary:
This diff sets up the socket connection between flipper-browser and flipper-server, and verifies that the initial UI initialisation work (e.g. `get-config` command works). The initial RenderHost is initialised as well based on the config and browser APIs.
Note that flipper-ui-core itself isn't started yet, as that has still a plethora of node imports, so Metro will correctly refuse to bundle
Not in this diff
* remove Node usage from flipper-ui-core
* implement all RenderHost APIs
Reviewed By: aigoncharov
Differential Revision: D32644074
fbshipit-source-id: 2c8065caf0191771a3867b69a431ca50eeb7a5a3