Summary: Bumps [metro-config](https://github.com/facebook/metro) from 0.67.0 to 0.72.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/facebook/metro/releases">metro-config's releases</a>.</em></p> <blockquote> <h2>Release v0.72.0</h2> <ul> <li><strong>[Breaking]</strong> Enable React 17 new JSX transform (<a href="https://github-redirect.dependabot.com/facebook/metro/pull/848">facebook/metro#848</a> by <a href="https://github.com/danilobuerger"><code>@danilobuerger</code></a>)</li> <li><strong>[Breaking]</strong> Add <code>watcher.additionalExts</code> option, enable inclusion of <code>.cjs</code> and <code>.mjs</code> files by default (c1c6d9c09fa92aa2ba71d803fdfa480e4dbb6a51)</li> <li><strong>[Breaking]</strong> <code>.json</code> files will no longer be implicitly resolved if removed from <code>resolver.sourceExts</code> (a3dc30aa0d54d65d6dbd426662f59b0ec398a612)</li> <li><strong>[Breaking]</strong> With a default config, any <code>.jsx</code> files will now be resolved before <code>.json</code>, <code>.ts</code>, <code>.tsx</code> (1b479314dc08f2a2e2f76438971f32fcf431ee89)</li> <li><strong>[Breaking]</strong> Enable strict CLI validation when <code>metro</code> is passed an invalid subcommand or argument (19c4f7edb85f5b61b056580515348ca9715dd361)</li> <li><strong>[Feature]</strong> Add <code>start</code> alias for <code>serve</code> CLI command (19c4f7edb85f5b61b056580515348ca9715dd361)</li> </ul> <p><strong>Full Changelog:</strong> <a href="https://github.com/facebook/metro/compare/v0.71.3%E2%80%A6v0.72.0"><code>v0.71.3...v0.72.0</code></a></p> <h2>Release v0.71.3</h2> <ul> <li><strong>[Fix]</strong> End watchman client on calling MetroFileMap end. (fc042d06bb6db98dd819bb0d22b7d536ee396c24)</li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/facebook/metro/compare/v0.71.2...v0.71.3">https://github.com/facebook/metro/compare/v0.71.2...v0.71.3</a></p> <h2>Release v0.71.2</h2> <ul> <li><strong>[Feature]</strong> Add <a href="https://facebook.github.io/metro/docs/configuration/#requirecycleignorepatterns"><code>requireCycleIgnorePatterns</code></a> option to suppress warnings for require cycles, suppress <code>node_modules</code> by default (<a href="https://github-redirect.dependabot.com/facebook/metro/pull/707">facebook/metro#707</a> by <a href="https://github.com/hsource"><code>@hsource</code></a>)</li> <li><strong>[Feature]</strong> Add <a href="https://facebook.github.io/metro/docs/configuration/#watchmandeferstates"><code>deferStates</code></a> option for Watchman (570c38039abc32b758f8d241896b21e28ca4ba83)</li> <li><strong>[Fix]</strong> Incremental build bug with parallel edges to the same module (fc29a1177f883144674cf85a813b58567f69d545)</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>unstable_allowRequireContext</code> config option, implement transformer support for <a href="https://webpack.js.org/guides/dependency-management/#requirecontext"><code>require.context</code></a> (<a href="https://github-redirect.dependabot.com/facebook/metro/pull/821">facebook/metro#821</a> by <a href="https://github.com/EvanBacon"><code>@EvanBacon</code></a>)</li> </ul> <p><strong>Full Changelog:</strong> <a href="https://github.com/facebook/metro/compare/v0.71.1%E2%80%A6v0.71.2"><code>v0.71.1...v0.71.2</code></a></p> <h2>Release v0.71.1</h2> <ul> <li><strong>[Fix]</strong> Add missing <code>.npmignore</code> files (e8bb8fb4035699c83fce4b35aabcaec208513f3c)</li> <li><strong>[Fix]</strong> Rewrite DeltaBundler garbage collection (<a href="https://github-redirect.dependabot.com/facebook/metro/pull/820">facebook/metro#820</a>)</li> <li><strong>[Fix]</strong> Remove deprecated Prop Types from lazy imports (<a href="https://github-redirect.dependabot.com/facebook/metro/pull/824">facebook/metro#824</a> by <a href="https://github.com/ecreeth"><code>@ecreeth</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> Expose <code>unstable_fileMapCacheManagerFactory</code> config option (e7419900d2e063f2d531313f810d18c487f807f8)</li> <li><strong>[Experimental]</strong> Add <code>unstable_perfLogger</code> config option (eec0d7bf00aa707ae210b25218501b3e17dc4bf2)</li> <li><strong>[Experimental]</strong> Remove <code>unstable_hasteMapModulePath</code> from Metro config (1cae8d8007d04ba62a739a6c4dff991c69af26e4)</li> </ul> <p><strong>Full Changelog:</strong> <a href="https://github.com/facebook/metro/compare/v0.70.2%E2%80%A6v0.71.0"><code>v0.71.0...v0.71.1</code></a></p> <h2>Release v0.71.0</h2> <ul> <li><strong>[Breaking]</strong> Reject runServer promise if the HTTP server can't start listening (f39af2cba2c3f39f674ad40ddf97ca7c3daa91f5)</li> <li><strong>[Feature]</strong> Add <code>fileMapCacheDirectory</code> config option, deprecate <code>hasteMapCacheDirectory</code> (93966c0065e24dfaed15e409eeedf4b9bc209a41)</li> <li><strong>[Fix]</strong> Fail <code>runServer</code> quickly if the port is not available (6d9623eec0250f8b0e78d1843c18a531444713ff)</li> <li><strong>[Fix]</strong> Add explicit dependency on <code>babel/runtime</code> to <code>metro-runtime</code> (<a href="https://github-redirect.dependabot.com/facebook/metro/issues/816">https://github.com/facebook/flipper/issues/816</a>)</li> <li><strong>[Fix]</strong> Fix missing dependency on <code>metro-transform-worker</code> (<a href="https://github-redirect.dependabot.com/facebook/metro/issues/817">https://github.com/facebook/flipper/issues/817</a>)</li> <li><strong>[Fix]</strong> Fix batching bugs causing modules to be incorrectly omitted from delta updates(<a href="https://github-redirect.dependabot.com/facebook/metro/issues/819">https://github.com/facebook/flipper/issues/819</a>)</li> <li><strong>[Fix]</strong> <code>InspectorProxy</code>: Don't pass an <code>Error</code> object to <code>socket.close()</code> (fdc4ef17230ee093cfd302ddc8c59a88019b1f02)</li> </ul> <blockquote> <p>NOTE: Experimental features are not covered by semver and can change at any time.</p> </blockquote> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="d699f9d141"><code>d699f9d</code></a> Release 0.72.0</li> <li><a href="c1c6d9c09f"><code>c1c6d9c</code></a> Add watcher.additionalExts option, enable inclusion of .cjs and .mjs files by...</li> <li><a href="a3dc30aa0d"><code>a3dc30a</code></a> Replace hard default of 'json' in sourceExts with package.json WatcherImpl glob</li> <li><a href="1b479314dc"><code>1b47931</code></a> Add 'jsx' to resolver.sourceExts defaults</li> <li><a href="75ac509182"><code>75ac509</code></a> update staticdocs</li> <li><a href="d0ea806173"><code>d0ea806</code></a> Fixed typo causing option to not be applied (<a href="https://github-redirect.dependabot.com/facebook/metro/issues/849">https://github.com/facebook/flipper/issues/849</a>)</li> <li><a href="1b6dd6f05a"><code>1b6dd6f</code></a> Enable react 17 new jsx transform (<a href="https://github-redirect.dependabot.com/facebook/metro/issues/848">https://github.com/facebook/flipper/issues/848</a>)</li> <li><a href="b8252d866a"><code>b8252d8</code></a> Added isTurboModule helper function</li> <li><a href="b6ebccf9e6"><code>b6ebccf</code></a> Remove MaskedViewIOS from react-native-github</li> <li><a href="419caf7565"><code>419caf7</code></a> Release resolved-env</li> <li>Additional commits viewable in <a href="https://github.com/facebook/metro/compare/v0.67.0...v0.72.0">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `dependabot rebase` will rebase this PR - `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `dependabot merge` will merge this PR after your CI passes on it - `dependabot squash and merge` will squash and merge this PR after your CI passes on it - `dependabot cancel merge` will cancel a previously requested merge and block automerging - `dependabot reopen` will reopen this PR if it is closed - `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Pull Request resolved: https://github.com/facebook/flipper/pull/3956 Reviewed By: lblasa Differential Revision: D38315210 Pulled By: LukeDefeo fbshipit-source-id: 71fc8336118f0fa67b5e19a8e78da323420eed89
react-native-flipper
This package exposes JavaScript bindings to talk from React Native JavaScript directly to flipper.
This package might also be required by other Flipper plugins for React Native.
Installation
Run the following command in the root of your React Native project
yarn add react-native-flipper
Note that this package requires React Native 0.62 or higher.
Usage
How to build Flipper plugins is explained in the flipper documentation: Creating a Flipper plugin. Building a Flipper plugin involves building a plugin for the Desktop app, and a plugin that runs on a Device (Native Android, Native IOS or React Native). This package is only needed for the plugin that runs on the mobile device, in React Native, and wants to use the JavaScript bridge.
This package exposes one method: addPlugin.
The addPlugin accepts a plugin parameter, that registers a client plugin and will fire the relevant callbacks if the corresponding desktop plugin is selected in the Flipper Desktop. The full plugin API is documented here.
Example
An example plugin can be found in FlipperTicTacToe.js.
The corresponding Desktop plugin ships by default in Flipper, so importing the above file and dropping the <FlipperTicTacToe /> component somewhere in your application should work out of the box.
The sources of the corresponding Desktop plugin can be found here.