Commit Graph

44 Commits

Author SHA1 Message Date
Lorenzo Blasa
2583a076c0 Delete unused code
Summary:
^

There's no references to this anywhere, so delete.

Reviewed By: antonk52

Differential Revision: D45309041

fbshipit-source-id: e62e94b089eee30b82b05f64c8e7b31dd03597b6
2023-04-26 04:42:43 -07:00
dependabot[bot]
075de45076 Bump react-refresh from 0.11.0 to 0.14.0 in /desktop (#4540)
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>&lt;style&gt;</code> elements</li>
<li><code>high</code>, <code>low</code>, <code>optimum</code> - for <code>&lt;meter&gt;</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>&lt;select&gt;</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=&quot;...&quot;</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 />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=react-refresh&package-manager=npm_and_yarn&previous-version=0.11.0&new-version=0.14.0)](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
2023-03-24 04:04:16 -07:00
Andrey Goncharov
226ccf91f6 Create flipper-server-client package
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
2022-10-31 04:26:43 -07:00
Lorenzo Blasa
587f428cf8 Allow plugins to use css
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
2022-10-27 22:50:30 -07:00
Andrey Goncharov
982193df48 Fix plugin source maps in dev mode
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
2022-09-26 06:54:03 -07:00
Andrey Goncharov
3314c77ce9 Add exportFileBinary to FlipperLib
Reviewed By: antonk52

Differential Revision: D39692937

fbshipit-source-id: 7b3c78d004a9734cd8ae660d5782be1f02c00009
2022-09-21 09:26:19 -07:00
Andrey Goncharov
8716761cb3 Fix require monkey-patching in electron build
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
2022-09-20 01:36:56 -07:00
Andrey Goncharov
642a3ebf81 Remove default plugin entrypoints for hot-reloading
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
2022-09-15 10:02:19 -07:00
Andrey Goncharov
dcbc7c40bb Stream server logs to browser
Summary: Makes Flipper Logs tab functional for Flipper Browser

Reviewed By: lblasa

Differential Revision: D37459924

fbshipit-source-id: 4ebf3d47fbbf90bb367e01986b12dec782b03c34
2022-06-28 06:27:43 -07:00
Lorenzo Blasa
23b551c8bf Host and port as function args
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
2022-05-17 04:20:30 -07:00
Lorenzo Blasa
bfcdb82b43 Move flipper-server client to flipper-frontend-core
Summary: ^

Reviewed By: aigoncharov

Differential Revision: D36410944

fbshipit-source-id: 2adb5904cd0f5f15d08be22c611d6774e7533f94
2022-05-17 03:54:16 -07:00
Pascal Hartig
ef19d06239 Upgrade metro
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
2022-05-04 04:03:19 -07:00
Pascal Hartig
3032736294 Fix type errors for flipper-server and flipper-ui-browser
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
2022-05-03 09:55:04 -07:00
Andrey Goncharov
1f83b4b414 Migrate to React 18
Summary:
Sadly, we have to use the experimental version of React to decapitate React Devtools.
See https://fb.workplace.com/groups/react.devtools/posts/3135684459978453/?comment_id=3135711763309056&reply_comment_id=3135760513304181

On the bright side, Replay.io and Code Sandbox also use experimental React without any problem.

Reviewed By: lblasa

Differential Revision: D34926473

fbshipit-source-id: 5cd63cc065c2535f0583464c7b5e37891dadaf14
2022-03-31 04:01:33 -07:00
Andrey Goncharov
f85def32fb Migrate from socket.io
Reviewed By: passy

Differential Revision: D34787674

fbshipit-source-id: 63d7c166ea29d14c96f0646a045e3f6fa93472e2
2022-03-10 10:31:24 -08:00
Pascal Hartig
6d05e6c226 Bump /desktop again
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
2022-03-08 03:02:11 -08:00
dependabot[bot]
c18aabd8ac Bump metro-runtime from 0.66.2 to 0.68.0 in /desktop (#3451)
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, &quot;for await ... of&quot; (<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> &amp; <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 />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=metro-runtime&package-manager=npm_and_yarn&previous-version=0.66.2&new-version=0.68.0)](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
2022-02-15 09:39:49 -08:00
dependabot[bot]
2d2b214fb7 Bump pretty-format from 27.4.6 to 27.5.0 in /desktop (#3414)
Summary:
Bumps [pretty-format](https://github.com/facebook/jest/tree/HEAD/packages/pretty-format) from 27.4.6 to 27.5.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/facebook/jest/releases">pretty-format's releases</a>.</em></p>
<blockquote>
<h2>v27.5.0</h2>
<h2>Features</h2>
<ul>
<li><code>[expect]</code> Add asymmetric matcher <code>expect.closeTo</code> (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12243">#12243</a>)</li>
<li><code>[jest-mock]</code> Added <code>mockFn.mock.lastCall</code> to retrieve last argument (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12285">#12285</a>)</li>
</ul>
<h2>Fixes</h2>
<ul>
<li><code>[expect]</code> Add a fix for <code>.toHaveProperty('')</code> (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12251">#12251</a>)</li>
<li><code>[jest-each, jest/globals]</code> Allow passing <code>ReadonlyArray</code> type of a table to <code>describe.each</code> and <code>test.each</code> (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12297">#12297</a>)</li>
<li><code>[jest/globals]</code> Add missing <code>options</code> argument to <code>jest.doMock</code> typing (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12292">#12292</a>)</li>
<li><code>[jest-environment-node]</code> Add <code>atob</code> and <code>btoa</code> (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12269">#12269</a>)</li>
<li><code>[jest-matcher-utils]</code> Correct diff for expected asymmetric matchers (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12264">#12264</a>)</li>
<li><code>[jest-message-util]</code> Fix <code>.getTopFrame()</code> (and <code>toMatchInlineSnapshot()</code>) with <code>mjs</code> files (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12277">#12277</a>)</li>
</ul>
<h2>Chore &amp; Maintenance</h2>
<ul>
<li><code>[*]</code> Update <code>graceful-fs</code> to <code>^4.2.9</code> (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/11749">#11749</a>)</li>
</ul>
<h2>Performance</h2>
<ul>
<li><code>[jest-resolve]</code> perf: skip error creation on not found <code>stat</code> calls (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/11749">#11749</a>)</li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/markjm"><code>@​markjm</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/facebook/jest/pull/11749">facebook/jest#11749</a></li>
<li><a href="https://github.com/benjamingr"><code>@​benjamingr</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/facebook/jest/pull/12266">facebook/jest#12266</a></li>
<li><a href="https://github.com/aduh95"><code>@​aduh95</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/facebook/jest/pull/12269">facebook/jest#12269</a></li>
<li><a href="https://github.com/piranna"><code>@​piranna</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/facebook/jest/pull/12272">facebook/jest#12272</a></li>
<li><a href="https://github.com/od-c0d3r"><code>@​od-c0d3r</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/facebook/jest/pull/12234">facebook/jest#12234</a></li>
<li><a href="https://github.com/davidnormo"><code>@​davidnormo</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/facebook/jest/pull/12264">facebook/jest#12264</a></li>
<li><a href="https://github.com/mshima"><code>@​mshima</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/facebook/jest/pull/12277">facebook/jest#12277</a></li>
<li><a href="https://github.com/Cambuchi"><code>@​Cambuchi</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/facebook/jest/pull/12246">facebook/jest#12246</a></li>
<li><a href="https://github.com/vladsholokhov"><code>@​vladsholokhov</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/facebook/jest/pull/12185">facebook/jest#12185</a></li>
<li><a href="https://github.com/robdy"><code>@​robdy</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/facebook/jest/pull/12254">facebook/jest#12254</a></li>
<li><a href="https://github.com/Michael-M-Judd"><code>@​Michael-M-Judd</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/facebook/jest/pull/12212">facebook/jest#12212</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/facebook/jest/compare/v27.4.7...v27.5.0">https://github.com/facebook/jest/compare/v27.4.7...v27.5.0</a></p>
<h2>v27.4.7</h2>
<h2>Fixes</h2>
<ul>
<li><code>jest-config</code> Add missing <code>babel/core</code> dependency (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12216">#12216</a>)</li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/facebook/jest/compare/v27.4.6...v27.4.7">https://github.com/facebook/jest/compare/v27.4.6...v27.4.7</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/facebook/jest/blob/main/CHANGELOG.md">pretty-format's changelog</a>.</em></p>
<blockquote>
<h2>27.5.0</h2>
<h3>Features</h3>
<ul>
<li><code>[expect]</code> Add asymmetric matcher <code>expect.closeTo</code> (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12243">#12243</a>)</li>
<li><code>[jest-mock]</code> Added <code>mockFn.mock.lastCall</code> to retrieve last argument (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12285">#12285</a>)</li>
</ul>
<h3>Fixes</h3>
<ul>
<li><code>[expect]</code> Add a fix for <code>.toHaveProperty('')</code> (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12251">#12251</a>)</li>
<li><code>[jest-each, jest/globals]</code> Allow passing <code>ReadonlyArray</code> type of a table to <code>describe.each</code> and <code>test.each</code> (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12297">#12297</a>)</li>
<li><code>[jest/globals]</code> Add missing <code>options</code> argument to <code>jest.doMock</code> typing (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12292">#12292</a>)</li>
<li><code>[jest-environment-node]</code> Add <code>atob</code> and <code>btoa</code> (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12269">#12269</a>)</li>
<li><code>[jest-matcher-utils]</code> Correct diff for expected asymmetric matchers (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12264">#12264</a>)</li>
<li><code>[jest-message-util]</code> Fix <code>.getTopFrame()</code> (and <code>toMatchInlineSnapshot()</code>) with <code>mjs</code> files (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12277">#12277</a>)</li>
</ul>
<h3>Chore &amp; Maintenance</h3>
<ul>
<li><code>[*]</code> Update <code>graceful-fs</code> to <code>^4.2.9</code> (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/11749">#11749</a>)</li>
</ul>
<h3>Performance</h3>
<ul>
<li><code>[jest-resolve]</code> perf: skip error creation on not found <code>stat</code> calls (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/11749">#11749</a>)</li>
</ul>
<h2>27.4.7</h2>
<h3>Fixes</h3>
<ul>
<li><code>jest-config</code> Add missing <code>babel/core</code> dependency (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12216">#12216</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="247cbe6026"><code>247cbe6</code></a> v27.5.0</li>
<li><a href="8a62d988d6"><code>8a62d98</code></a> chore(type tests): bump <code>jest-runner-tsd</code> (<a href="https://github.com/facebook/jest/tree/HEAD/packages/pretty-format/issues/12299">#12299</a>)</li>
<li>See full diff in <a href="https://github.com/facebook/jest/commits/v27.5.0/packages/pretty-format">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pretty-format&package-manager=npm_and_yarn&previous-version=27.4.6&new-version=27.5.0)](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/3414

Reviewed By: passy

Differential Revision: D34050380

Pulled By: mweststrate

fbshipit-source-id: 8bec23a26e9a0b63c3ddb4fe28672ef42b973a57
2022-02-09 02:13:06 -08:00
Anton Kastritskiy
c5dd1fc350 rename files from ts to tsx in flipper-* packages
Summary: mass files rename

Reviewed By: nikoant

Differential Revision: D33890252

fbshipit-source-id: d5afaa60af7340313a97d8e4967fe37f00abd9db
2022-01-31 10:16:19 -08:00
dependabot[bot]
08c09e6c6e Bump socket.io-client from 4.4.0 to 4.4.1 in /desktop (#3347)
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 />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=socket.io-client&package-manager=npm_and_yarn&previous-version=4.4.0&new-version=4.4.1)](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
2022-01-27 07:22:35 -08:00
dependabot[bot]
96b99ac23e Bump pretty-format from 27.4.2 to 27.4.6 in /desktop (#3262)
Summary:
Bumps [pretty-format](https://github.com/facebook/jest/tree/HEAD/packages/pretty-format) from 27.4.2 to 27.4.6.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/facebook/jest/releases">pretty-format's releases</a>.</em></p>
<blockquote>
<h2>v27.4.6</h2>
<h3>Fixes</h3>
<ul>
<li><code>[jest-environment-node]</code> Add <code>AbortSignal</code> (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12157">#12157</a>)</li>
<li><code>[jest-environment-node]</code> Add Missing node global <code>performance</code> (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12002">#12002</a>)</li>
<li><code>[jest-runtime]</code> Handle missing <code>mocked</code> property (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12213">#12213</a>)</li>
<li><code>[jest/transform]</code> Update dependency package <code>pirates</code> to 4.0.4 (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12002">#12002</a>)</li>
</ul>
<h3>Performance</h3>
<ul>
<li><code>jest-config</code> perf: only register ts-node once when loading TS config files (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12160">#12160</a>)</li>
</ul>
<h3>New Contributors</h3>
<ul>
<li><a href="https://github.com/laozhu"><code>@​laozhu</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/facebook/jest/pull/12136">facebook/jest#12136</a></li>
<li><a href="https://github.com/sfiquet"><code>@​sfiquet</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/facebook/jest/pull/12161">facebook/jest#12161</a></li>
<li><a href="https://github.com/SimonSiefke"><code>@​SimonSiefke</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/facebook/jest/pull/12002">facebook/jest#12002</a></li>
<li><a href="https://github.com/Semigradsky"><code>@​Semigradsky</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/facebook/jest/pull/12190">facebook/jest#12190</a></li>
<li><a href="https://github.com/cmpadden"><code>@​cmpadden</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/facebook/jest/pull/12204">facebook/jest#12204</a></li>
<li><a href="https://github.com/LitoMore"><code>@​LitoMore</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/facebook/jest/pull/12211">facebook/jest#12211</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/facebook/jest/compare/v27.4.5...v27.4.6">https://github.com/facebook/jest/compare/v27.4.5...v27.4.6</a></p>
<h2>v27.4.5</h2>
<h2>Fixes</h2>
<ul>
<li><code>[jest-worker]</code> Stop explicitly passing <code>process.env</code> (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12141">#12141</a>)</li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/4geru"><code>@​4geru</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/facebook/jest/pull/12144">facebook/jest#12144</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/facebook/jest/compare/v27.4.4...v27.4.5">https://github.com/facebook/jest/compare/v27.4.4...v27.4.5</a></p>
<h2>v27.4.4</h2>
<h2>Fixes</h2>
<ul>
<li><code>[babel-jest]</code> Add <code>process.version</code> chunk to the cache key (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12122">#12122</a>)</li>
<li><code>[jest-environment]</code> Add <code>mocked</code> to <code>jest</code> object (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12133">#12133</a>)</li>
<li><code>[jest-worker]</code> Stop explicitly passing <code>execArgv</code> (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12128">#12128</a>)</li>
</ul>
<h2>Chore &amp; Maintenance</h2>
<ul>
<li><code>[website]</code> Fix the card front that looks overlapping part of the card back</li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/aghArdeshir"><code>@​aghArdeshir</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/facebook/jest/pull/12109">facebook/jest#12109</a></li>
<li><a href="https://github.com/ony3000"><code>@​ony3000</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/facebook/jest/pull/12127">facebook/jest#12127</a></li>
<li><a href="https://github.com/liesislukas"><code>@​liesislukas</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/facebook/jest/pull/12135">facebook/jest#12135</a></li>
<li><a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/facebook/jest/pull/12128">facebook/jest#12128</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/facebook/jest/compare/v27.4.3...v27.4.4">https://github.com/facebook/jest/compare/v27.4.3...v27.4.4</a></p>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/facebook/jest/blob/main/CHANGELOG.md">pretty-format's changelog</a>.</em></p>
<blockquote>
<h2>27.4.6</h2>
<h3>Fixes</h3>
<ul>
<li><code>[jest-environment-node]</code> Add <code>AbortSignal</code> (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12157">#12157</a>)</li>
<li><code>[jest-environment-node]</code> Add Missing node global <code>performance</code> (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12002">#12002</a>)</li>
<li><code>[jest-runtime]</code> Handle missing <code>mocked</code> property (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12213">#12213</a>)</li>
<li><code>[jest/transform]</code> Update dependency package <code>pirates</code> to 4.0.4 (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12002">#12002</a>)</li>
</ul>
<h3>Performance</h3>
<ul>
<li><code>jest-config</code> perf: only register ts-node once when loading TS config files (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12160">#12160</a>)</li>
</ul>
<h2>27.4.5</h2>
<h3>Fixes</h3>
<ul>
<li><code>[jest-worker]</code> Stop explicitly passing <code>process.env</code> (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12141">#12141</a>)</li>
</ul>
<h2>27.4.4</h2>
<h3>Fixes</h3>
<ul>
<li><code>[babel-jest]</code> Add <code>process.version</code> chunk to the cache key (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12122">#12122</a>)</li>
<li><code>[jest-environment]</code> Add <code>mocked</code> to <code>jest</code> object (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12133">#12133</a>)</li>
<li><code>[jest-worker]</code> Stop explicitly passing <code>execArgv</code> (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12128">#12128</a>)</li>
</ul>
<h3>Chore &amp; Maintenance</h3>
<ul>
<li><code>[website]</code> Fix the card front that looks overlapping part of the card back</li>
</ul>
<h2>27.4.3</h2>
<h3>Fixes</h3>
<ul>
<li><code>[jest-environment-jsdom]</code> Remove <code>types/jsdom</code> dependency (and make its <code>dom</code> property <code>private</code>) (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12107">#12107</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="644d2d3e53"><code>644d2d3</code></a> v27.4.6</li>
<li><a href="12a983b57f"><code>12a983b</code></a> chore: update immutable (<a href="https://github.com/facebook/jest/tree/HEAD/packages/pretty-format/issues/12203">#12203</a>)</li>
<li><a href="830f953fe9"><code>830f953</code></a> Rework dependencies (<a href="https://github.com/facebook/jest/tree/HEAD/packages/pretty-format/issues/12190">#12190</a>)</li>
<li>See full diff in <a href="https://github.com/facebook/jest/commits/v27.4.6/packages/pretty-format">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pretty-format&package-manager=npm_and_yarn&previous-version=27.4.2&new-version=27.4.6)](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/3262

Reviewed By: antonk52

Differential Revision: D33511689

Pulled By: passy

fbshipit-source-id: a4f3d10d7955db40130af1227cb4fe8cd22e875a
2022-01-12 05:49:14 -08:00
Andres Suarez
79023ee190 Update copyright headers from Facebook to Meta
Reviewed By: bhamodi

Differential Revision: D33331422

fbshipit-source-id: 016e8dcc0c0c7f1fc353a348b54fda0d5e2ddc01
2021-12-27 14:31:45 -08:00
Michel Weststrate
54dacb7e5d Make sure icons are bundled
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
2021-12-24 02:16:48 -08:00
Michel Weststrate
72fa481d27 Fix generation of bundled.json, make source maps work in prod builds
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
2021-12-24 02:16:48 -08:00
Michel Weststrate
b1d960e4c4 Make sure plugin loading works in NPX builds
Summary: Make sure non-bundled plugins load correctly . Note that sourcemaps don't load yet

Reviewed By: nikoant

Differential Revision: D33278639

fbshipit-source-id: 9951286ec6df65f33149e4687261a43e6c072c31
2021-12-24 02:16:48 -08:00
dependabot[bot]
bbff1d2fb7 Bump pretty-format from 27.3.1 to 27.4.2 in /desktop (#3165)
Summary:
Bumps [pretty-format](https://github.com/facebook/jest/tree/HEAD/packages/pretty-format) from 27.3.1 to 27.4.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/facebook/jest/releases">pretty-format's releases</a>.</em></p>
<blockquote>
<h2>v27.4.2</h2>
<h2>27.4.2</h2>
<h3>Fixes</h3>
<ul>
<li><code>[jest-worker]</code> Add additional <code>execArgv</code> to filter (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12103">#12103</a>)</li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/JonWallsten"><code>@​JonWallsten</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/facebook/jest/pull/12103">facebook/jest#12103</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/facebook/jest/compare/v27.4.1...v27.4.2">https://github.com/facebook/jest/compare/v27.4.1...v27.4.2</a></p>
<h2>v27.4.1</h2>
<h3>Fixes</h3>
<ul>
<li><code>[jest-worker]</code> Filter <code>execArgv</code> correctly (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12097">#12097</a>)</li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/SuperOleg39"><code>@​SuperOleg39</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/facebook/jest/pull/12097">facebook/jest#12097</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/facebook/jest/compare/v27.4.0...v27.4.1">https://github.com/facebook/jest/compare/v27.4.0...v27.4.1</a></p>
<h2>v27.4.0</h2>
<h3>Features</h3>
<ul>
<li><code>[expect]</code> Enhancing the <code>toHaveProperty</code> matcher to support array selection (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12092">#12092</a>)</li>
<li><code>[jest-core]</code> Add support for <code>testResultsProcessor</code> written in ESM (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12006">#12006</a>)</li>
<li><code>[jest-diff, pretty-format]</code> Add <code>compareKeys</code> option for custom sorting of object keys (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/11992">#11992</a>)</li>
<li><code>[jest-mock]</code> Add <code>ts-jest</code> mock util functions (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12089">#12089</a>)</li>
</ul>
<h3>Fixes</h3>
<ul>
<li><code>[expect]</code> Allow again <code>expect.Matchers</code> generic with single value (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/11986">#11986</a>)</li>
<li><code>[jest-circus, jest-jasmine2]</code> Avoid false concurrent test failures due to unhandled promise rejections (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/11987">#11987</a>)</li>
<li><code>[jest-config]</code> Add missing <code>slash</code> dependency to <code>package.json</code> (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12080">#12080</a>)</li>
<li><code>[jest-core]</code> Incorrect detection of open ZLIB handles (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12022">#12022</a>)</li>
<li><code>[jest-diff]</code> Break dependency cycle (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/10818">#10818</a>)</li>
<li><code>[jest-environment-jsdom]</code> Add <code>types/jsdom</code> dependency (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/11999">#11999</a>)</li>
<li><code>[jest-environment-jsdom]</code> Do not reset the global.document too early on teardown (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/11871">#11871</a>)</li>
<li><code>[jest-transform]</code> Improve error and warning messages (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/11998">#11998</a>)</li>
<li><code>[jest-worker]</code> Pass <code>execArgv</code> correctly to <code>worker_threads</code> worker (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12069">#12069</a>)</li>
</ul>
<h3>Chore &amp; Maintenance</h3>
<ul>
<li><code>[docs]</code> CLI options alphabetized (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/11586">#11586</a>)</li>
<li><code>[jest-runner]</code> Add info regarding timers to forcedExit message(<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12083">#12083</a>)</li>
<li><code>[*]</code> Replaced <code>substr</code> method with <code>substring</code> (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12066">#12066</a>)</li>
<li><code>[*]</code> Add <code>types</code> entry to all export maps (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12073">#12073</a>)</li>
</ul>
<h3>New Contributors</h3>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/facebook/jest/blob/main/CHANGELOG.md">pretty-format's changelog</a>.</em></p>
<blockquote>
<h2>27.4.2</h2>
<h3>Fixes</h3>
<ul>
<li><code>[jest-worker]</code> Add additional <code>execArgv</code> to filter (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12103">#12103</a>)</li>
</ul>
<h2>27.4.1</h2>
<h3>Fixes</h3>
<ul>
<li><code>[jest-worker]</code> Filter <code>execArgv</code> correctly (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12097">#12097</a>)</li>
</ul>
<h2>27.4.0</h2>
<h3>Features</h3>
<ul>
<li><code>[expect]</code> Enhancing the <code>toHaveProperty</code> matcher to support array selection (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12092">#12092</a>)</li>
<li><code>[jest-core]</code> Add support for <code>testResultsProcessor</code> written in ESM (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12006">#12006</a>)</li>
<li><code>[jest-diff, pretty-format]</code> Add <code>compareKeys</code> option for custom sorting of object keys (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/11992">#11992</a>)</li>
<li><code>[jest-mock]</code> Add <code>ts-jest</code> mock util functions (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12089">#12089</a>)</li>
</ul>
<h3>Fixes</h3>
<ul>
<li><code>[expect]</code> Allow again <code>expect.Matchers</code> generic with single value (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/11986">#11986</a>)</li>
<li><code>[jest-circus, jest-jasmine2]</code> Avoid false concurrent test failures due to unhandled promise rejections (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/11987">#11987</a>)</li>
<li><code>[jest-config]</code> Add missing <code>slash</code> dependency to <code>package.json</code> (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12080">#12080</a>)</li>
<li><code>[jest-core]</code> Incorrect detection of open ZLIB handles (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12022">#12022</a>)</li>
<li><code>[jest-diff]</code> Break dependency cycle (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/10818">#10818</a>)</li>
<li><code>[jest-environment-jsdom]</code> Add <code>types/jsdom</code> dependency (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/11999">#11999</a>)</li>
<li><code>[jest-environment-jsdom]</code> Do not reset the global.document too early on teardown (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/11871">#11871</a>)</li>
<li><code>[jest-transform]</code> Improve error and warning messages (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/11998">#11998</a>)</li>
<li><code>[jest-worker]</code> Pass <code>execArgv</code> correctly to <code>worker_threads</code> worker (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12069">#12069</a>)</li>
</ul>
<h3>Chore &amp; Maintenance</h3>
<ul>
<li><code>[docs]</code> CLI options alphabetized (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/11586">#11586</a>)</li>
<li><code>[jest-runner]</code> Add info regarding timers to forcedExit message(<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12083">#12083</a>)</li>
<li><code>[*]</code> Replaced <code>substr</code> method with <code>substring</code> (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12066">#12066</a>)</li>
<li><code>[*]</code> Add <code>types</code> entry to all export maps (<a href="https://github-redirect.dependabot.com/facebook/jest/pull/12073">#12073</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="7965591f78"><code>7965591</code></a> v27.4.2</li>
<li><a href="fa4a398276"><code>fa4a398</code></a> v27.4.1</li>
<li><a href="0dc6dde296"><code>0dc6dde</code></a> v27.4.0</li>
<li><a href="f8c6e7520c"><code>f8c6e75</code></a> Add <code>types</code> entry in export map (<a href="https://github.com/facebook/jest/tree/HEAD/packages/pretty-format/issues/12073">#12073</a>)</li>
<li><a href="27b89ecfed"><code>27b89ec</code></a> feat(jest-diff, pretty-format): Add compareKeys option for sorting object key...</li>
<li>See full diff in <a href="https://github.com/facebook/jest/commits/v27.4.2/packages/pretty-format">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pretty-format&package-manager=npm_and_yarn&previous-version=27.3.1&new-version=27.4.2)](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/3165

Reviewed By: passy

Differential Revision: D33234012

Pulled By: aigoncharov

fbshipit-source-id: ffaf3f82b8edbf41ef2be09695e4db0229188729
2021-12-20 13:52:51 -08:00
Michel Weststrate
cea7be7fde Clean up globals
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
2021-12-17 10:04:23 -08:00
Michel Weststrate
5df34a337c Unshare global types
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
2021-12-17 07:36:07 -08:00
Michel Weststrate
dcfeb4a4d5 Clean up packages and types
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
2021-12-16 14:54:59 -08:00
Michel Weststrate
78413c1ecf Register shortcuts on window instead of globally
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
2021-12-16 14:51:08 -08:00
Michel Weststrate
5ce5d897c8 Make loading of bundled plugins working and robust
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
2021-12-13 05:48:17 -08:00
Michel Weststrate
ac9080abac Remove 'process' usage
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
2021-12-13 05:48:17 -08:00
Michel Weststrate
0510786dec Fixed relilability issues in running health checks
Summary: Run doctor checks remained pending when the socket disonnected during a check. This

Reviewed By: aigoncharov

Differential Revision: D32984539

fbshipit-source-id: 277005e78803afaaa220cc5ca7fdc9cca6254453
2021-12-13 05:48:16 -08:00
Michel Weststrate
73c6e8ee05 Make flipper server debuggable
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
2021-12-13 05:48:16 -08:00
Michel Weststrate
ae56f2b62f change server build process to respect babel transforms
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
2021-12-13 05:48:16 -08:00
Michel Weststrate
bb23b36051 Fixed flipper settings not being loaded / saved on fresh install
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
2021-12-10 17:59:33 -08:00
Andrey Goncharov
e458ae76f9 Add exec Node API to FlipperLib
Summary: Changelog: Allow flipper plugins to run "exec" Node API on Flipper server.

Reviewed By: mweststrate

Differential Revision: D32881149

fbshipit-source-id: 46486a47ee9824ca68897c19fd86b4afc7f8bf1d
2021-12-10 06:36:12 -08:00
Michel Weststrate
ad4a55f263 move node types, stub node modules
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
2021-12-08 04:30:57 -08:00
Michel Weststrate
86995e0d11 Introduce static resource URLs
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
2021-12-08 04:30:57 -08:00
Michel Weststrate
2a4fe77404 Extract environment config initialisation to server-core
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
2021-12-08 04:30:56 -08:00
Michel Weststrate
de59bbedd2 Make plugin loading async
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
2021-12-08 04:30:56 -08:00
Michel Weststrate
5d45bd741b Initialise flipper-ui-browser with socket connection
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
2021-12-08 04:30:55 -08:00
Michel Weststrate
0dfc73da93 setup webserver for flipper-server
Summary:
This sets up the metro bundler for flipper-server, to be able to serve the front end.

Note that this is a setup that is only relevant for development purposes

Done in this diff:

* setup metro
* setup fast refresh
* setup nodemon to be able to refresh on server changes

Not done in this diff

* Setup FlipperServerImpl in the flipper-server
* Load flipper-ui-core in flipper-ui-browser
* Load plugins
* Support options, env vars etc etc
* Make flipper-server stand alone (it is largely self contained, but still requires some static resources like theming)

Reviewed By: passy, aigoncharov

Differential Revision: D32626137

fbshipit-source-id: 47f580356ddf0993392d3b583082b187661727e9
2021-12-08 04:30:55 -08:00
Michel Weststrate
c3ff0ff355 Set up Flipper decapitated packages
Summary:
This diff introduces the packages necessary for Flipper decapitated.

* flipper-common: utilities & types shared between client, server, flipper-plugin
* flipper-server-core: all device & client management goes in here. Basically flipper's backend
* flipper-ui-core: all UI goes in here, as far as it doesn't depend on Electron
* desktop: the Electron app, will load server-core and ui-core, and glue them together, providing implementations for some electron specific stuff like dialgos
* flipper-server: A node process hosting flipper-server-core, that can be connected to over websockets. And probably can serve a browser version of the UI as well.
* flipper-ui-browser: thin wrapper around flipper-ui-core, providing some browser specific behavior / stubs.
* flipper-dump: (might remove later), but want to hack a quick and dirt flipper dump in here, as alternative way to test flipper-server-core.

This diff just creates the packages, but doesn't move any code, so it can be summarized as:

restoftheowl

Reviewed By: nikoant

Differential Revision: D30218646

fbshipit-source-id: 735598a1261a98e584f52504b5eba01ec0afa162
2021-10-08 01:33:03 -07:00