Commit Graph

65 Commits

Author SHA1 Message Date
Anton Kastritskiy
c4a1c90a1e ESM plugin bundles
Summary:
This change will allow us to display correct stack traces in flipper UI as well as send them to scuba.

Currently correct stack traces are only displayed in the console and we do not have access to them.

Reviewed By: ivanmisuno

Differential Revision: D50015827

fbshipit-source-id: 2a60315dd5c06b2635ce0414f612ff1fdca0e489
2023-10-10 03:37:21 -07:00
Lorenzo Blasa
f11052cffd Log if token is obtained from manifest
Summary: ^

Reviewed By: antonk52

Differential Revision: D50004785

fbshipit-source-id: c8809c1ff5b6b32722e9df2d7e4002be533f615d
2023-10-06 03:26:14 -07:00
Lorenzo Blasa
541570c8ab Add client logs for different stages
Summary: ^

Reviewed By: antonk52

Differential Revision: D49973541

fbshipit-source-id: 3bac97fb22586cc49e74dd5deceeb5310a1385bc
2023-10-05 22:42:37 -07:00
Lorenzo Blasa
d9ad2a8932 Remove troubleshoot from here
Summary:
Simplify how messages (state updates) are shown in Flipper UI.

This main change was introduced as a way to show the 'Start' server button whenever we were in a disconnected state. This is not as simple as the server may be restarting or the client may be even have reset the WS connection. Hence you the experience where this UI is shown and immediately dismissed.

This UI is only ever shown if at one point the server was alive, period. So, in this case, either the server becomes available again OR the user quits the PWA/tab/browser and launches again.

IMHO, this is a better experience that totally assuming the server is dead.

In a next iteration, we can be more clever and have a timeout such that if after a set period of time the server doesn't become online, then we show a button to start (or force kill) the server.

Reviewed By: aigoncharov

Differential Revision: D49915698

fbshipit-source-id: 03fcc150ed1f1303d1d727c82a71eb32616208e8
2023-10-05 04:37:16 -07:00
Lorenzo Blasa
f1c88a464b Do not use window reload
Summary: Let's keep it simple, do not reload. Just show/hide the right content.

Reviewed By: antonk52

Differential Revision: D49377316

fbshipit-source-id: 9b2a47374da3e72f17e2d55c9290960b703fd43e
2023-09-18 12:03:09 -07:00
Lorenzo Blasa
342ef42114 Break connection loop
Summary:
Whenever there was a connectivity error, we would show an error message and setup a retry mechanism as to refresh the page as to make it transparent for engineers to have a working workspace again.

The problem is that there are two different channels:
- HTTP server
- WS server

If the HTTP server is healthy but there is a WS error, it is not entirely correct to try to reload the page. If the error conditions for the WS remain, then we end up in a loop.

Reviewed By: passy, antonk52

Differential Revision: D49373335

fbshipit-source-id: 4e0a08fe2384860db0bf92a22edc87402d41651c
2023-09-18 08:57:15 -07:00
Lorenzo Blasa
0128ea00ec Restart/shutdown when settings are applied
Summary: Shutdown flipper server whenever a restart is required.

Reviewed By: antonk52

Differential Revision: D49369884

fbshipit-source-id: 62d8aa9dd58408dc351617bb09df4509a819ab2f
2023-09-18 07:42:36 -07:00
Lorenzo Blasa
25e187bf41 Restart message improvement
Summary:
There's no notion of restarting Flipper when running as a PWA.

In the meantime, update the advise message we give to engineers as to wait 30 seconds before attempting to relaunch (Flipper server keeps running in the background for 30 seconds after quitting)

Reviewed By: antonk52

Differential Revision: D49369707

fbshipit-source-id: 9451265f8941e457e734d1cb0ea74a0dea492b88
2023-09-18 06:17:50 -07:00
Lorenzo Blasa
9e219b07d8 Fix Loading page
Summary:
The existing loading page was not behaving the way it was intended. The previous implementation triggered a page reload which made the whole retry mechanism useless.

Instead, a new endpoint was defined to expose whether the server is ready or not. Use this instead as a way of knowing whether we are good to reload the page.

Reviewed By: passy

Differential Revision: D49314749

fbshipit-source-id: eb67765d7deab8610fa5d31e710070da43a18c1c
2023-09-15 05:29:40 -07:00
Lorenzo Blasa
2b4c631652 Certificate and token generation fixes
Summary:
A few things need to be done which are on this change:

- Certificate generation should execute as an atomic operation, hence, it needs to be synchronised.
- Do not generate client token as part of certificate generation. This causes a deadlock now.
- Add more logs for troubleshooting

Reviewed By: aigoncharov

Differential Revision: D49269624

fbshipit-source-id: 071a8e5b895198730b7d914cc4622837e9094e2f
2023-09-14 04:15:18 -07:00
Pascal Hartig
554d2f9b83 Bump ES level to 2021
Summary: Updating the remaining tsconfigs to build for an ES2021 target.

Reviewed By: antonk52

Differential Revision: D48687661

fbshipit-source-id: 2761704d251f701594ca5d362a17731f287088ed
2023-08-29 05:06:18 -07:00
Lorenzo Blasa
c0347ec830 Deep-link hooked to our protocol handler
Summary: This hooks the PWA deep-link to our existing deep-link url handler.

Reviewed By: antonk52

Differential Revision: D48598886

fbshipit-source-id: 8da9b7bc89bebdafc2bd4c0dc0bd7608864e0254
2023-08-24 07:25:01 -07:00
Lorenzo Blasa
aa327b1a46 Deep-link scaffolding
Summary:
This change adds the necessary scaffolding to enable deep-link for PWA.

1. Registers the protocol/scheme in the manifest.json
2. Add a skeleton handler that parses the received arguments

Notes for reviewers:

PWA cannot reuse the 'flipper://' scheme as is not allowed. PWA schemes are limited. The only extension point is 'web+...' which is the one that is used.

Reviewed By: antonk52

Differential Revision: D48562301

fbshipit-source-id: e191fcb1a6604d20a55c1acdadf6a8eb0194895b
2023-08-24 07:25:01 -07:00
Lorenzo Blasa
4ff9279a0b Offline troubleshoot when server disconnects
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
2023-08-18 07:59:51 -07:00
Lorenzo Blasa
ce13ee426f Open file import
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
2023-08-17 13:46:08 -07:00
Lorenzo Blasa
b45eed0e9a 'Capture' cancel on file import
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
2023-08-17 08:57:55 -07:00
Lorenzo Blasa
ff6f98fc0d Import File implementation
Summary: Implementation was missing for the browser. This provides a default implementation.

Reviewed By: aigoncharov

Differential Revision: D48311198

fbshipit-source-id: fd067600f571234e0fbccfb90853b62f175ff8fb
2023-08-14 11:33:06 -07:00
Lorenzo Blasa
daa3a38ed3 Flipper export file implementation
Summary:
^

Changelog: add export file implementation for browsers

Reviewed By: antonk52

Differential Revision: D46840341

fbshipit-source-id: 8a011f2a7c0ce329286cb8813def8f9c0572d133
2023-06-19 08:33:54 -07:00
Lorenzo Blasa
2815ba0fb8 Copy/Paste implementation
Summary: ^

Reviewed By: aigoncharov

Differential Revision: D46515194

fbshipit-source-id: 0ee6931569d5248d5643b391683e230e0c095e41
2023-06-07 06:04:46 -07:00
Lorenzo Blasa
c6d5eb3334 Flipper as PWA
Summary:
^

Reference: https://docs.google.com/document/d/1flQJUzTe4AuQz3QCpvbloQycenHsu7ZxbKScov7K7ao

Reviewed By: passy

Differential Revision: D45693382

fbshipit-source-id: 5a2e6c213a7e7e2cf9cd5f3033cff3e5291a2a92
2023-05-16 04:32:47 -07:00
Lorenzo Blasa
238f40f55d Mandate auth token to connect over TCP
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
2023-05-05 07:52:13 -07:00
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