Summary: Bumps [metro-config](https://github.com/facebook/metro) from 0.76.0 to 0.76.4. <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>v0.76.4</h2> <ul> <li><strong>[Feature]</strong>: Support the <a href="https://developer.chrome.com/articles/x-google-ignore-list/"><code>x_google_ignoreList</code></a> source map extension. (<a href="https://redirect.github.com/facebook/metro/pull/973">facebook/metro#973</a>, 82bd64a9720174a9e2a02fb73bbef292153e20f1 by <a href="https://github.com/motiz88"><code>@motiz88</code></a>)</li> <li><strong>[Feature]</strong>: Support bundling KTX files as image assets. (<a href="https://redirect.github.com/facebook/metro/pull/975">facebook/metro#975</a> by <a href="https://github.com/rshest"><code>@rshest</code></a>)</li> <li><strong>[Fix]</strong>: Fix crash on a module added+modified+removed between updates. (5d7305e2f3a9f5f4aebc889a452afb03b1db12a7 by <a href="https://github.com/robhogan"><code>@robhogan</code></a>)</li> <li><strong>[Fix]</strong>: Fix missed modification on module removed+modified+added between updates. (5d7305e2f3a9f5f4aebc889a452afb03b1db12a7 by <a href="https://github.com/robhogan"><code>@robhogan</code></a>)</li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/facebook/metro/compare/v0.76.3...v0.76.4">https://github.com/facebook/metro/compare/v0.76.3...v0.76.4</a></p> <h2>v0.76.3</h2> <ul> <li><strong>[Feature]</strong>: Support custom <code>__loadBundleAsync</code> implementations in the default <code>asyncRequire</code> function. See the <a href="https://github.com/react-native-community/discussions-and-proposals/blob/main/proposals/0605-lazy-bundling.md">lazy bundling RFC</a> for more details. (<a href="ac3adced45</a>, <a href="f07ce5c455</a> by <a href="https://github.com/motiz88"><code>@motiz88</code></a>)</li> <li><strong>[Feature]</strong>: Support <code>lazy</code> parameter in bundle requests. See the <a href="https://github.com/react-native-community/discussions-and-proposals/blob/main/proposals/0605-lazy-bundling.md">lazy bundling RFC</a> for more details. (<a href="4ef14f9a2f</a> by <a href="https://github.com/motiz88"><code>@motiz88</code></a>)</li> <li><strong>[Feature]</strong>: Preserve comments in unminified builds, while continuing to strip all comments from minified builds. (<a href="https://redirect.github.com/facebook/metro/pull/967">facebook/metro#967</a> by <a href="https://github.com/tido64"><code>@tido64</code></a>)</li> <li><strong>[Deprecated]</strong>: The <code>transformer.asyncRequireModulePath</code> config option is deprecated. Use <a href="https://github.com/react-native-community/discussions-and-proposals/blob/main/proposals/0605-lazy-bundling.md#__loadbundleasync-in-metro"><code>__loadBundleAsync</code></a> instead.(<a href="c7b684f0ae</a> by <a href="https://github.com/motiz88"><code>@motiz88</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> Package Exports unstable_conditionNames now defaults to ['require', 'import'] (<a href="e70ceef126</a> by <a href="https://github.com/huntie"><code>@huntie</code></a>)</li> <li><strong>[Experimental]</strong> Removed <code>server.experimentalImportBundleSupport</code> config option. (<a href="4ef14f9a2f</a> by <a href="https://github.com/motiz88"><code>@motiz88</code></a>)</li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/facebook/metro/compare/v0.76.2...v0.76.3">https://github.com/facebook/metro/compare/v0.76.2...v0.76.3</a></p> <h2>v0.76.2</h2> <ul> <li><strong>[Feature]</strong>: Added customizeStack hook to Metro's <code>/symbolicate</code> endpoint to allow custom frame skipping logic on a stack level. (<a href="ce266ddafd</a> by <a href="https://github.com/GijsWeterings"><code>@GijsWeterings</code></a>)</li> <li><strong>[Feature]</strong>: Re-export <code>metro-core</code>'s <code>Terminal</code> from <code>metro</code>. (<a href="86e3f934d4</a> by <a href="https://github.com/robhogan"><code>@robhogan</code></a>)</li> <li><strong>[Feature]</strong>: Re-export <code>metro-config</code>'s <code>resolveConfig</code> from <code>metro</code>. (<a href="cc1666415f</a> by <a href="https://github.com/robhogan"><code>@robhogan</code></a>)</li> <li><strong>[Types]</strong>: Remove dependency on <code>types/babel__code-frame</code>. (<a href="41cdc034a9</a> by <a href="https://github.com/robhogan"><code>@robhogan</code></a>)</li> <li><strong>[Types]</strong>: Remove dependency on <code>types/ws</code>. (<a href="7deb525916</a> by <a href="https://github.com/robhogan"><code>@robhogan</code></a>)</li> <li><strong>[Types]</strong>: Fix TypeScript types entry point for metro-source-map. (<a href="3238bbc9f4</a> by <a href="https://github.com/huntie"><code>@huntie</code></a>)</li> <li><strong>[Deprecated]</strong>: Deprecate <code>ResolutionContext.getPackageForModule</code>. (<a href="2d0a01cd7e</a> by <a href="https://github.com/huntie"><code>@huntie</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>: Pass full path and query params to <code>asyncRequire</code> for lazy bundles. (<a href="61a30b7fc2</a> by <a href="https://github.com/motiz88"><code>@motiz88</code></a>)</li> <li><strong>[Experimental]</strong>: Fix bug where Package Exports warnings may have been logged for nested <code>node_modules</code> path candidates. (<a href="29c77bff31</a> by <a href="https://github.com/huntie"><code>@huntie</code></a>)</li> <li><strong>[Experimental]</strong>: Fix <code>package.json</code> discovery against root package specifiers for Package Exports. (<a href="b995303024</a> by <a href="https://github.com/huntie"><code>@huntie</code></a>, fixes <a href="https://redirect.github.com/facebook/metro/issues/965">facebook/metro#965</a> reported by <a href="https://github.com/shamilovtim"><code>@shamilovtim</code></a>)</li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/facebook/metro/compare/v0.76.1...v0.76.2">https://github.com/facebook/metro/compare/v0.76.1...v0.76.2</a></p> <h2>v0.76.1</h2> <ul> <li><strong>[Feature]</strong>: Support custom transformer/resolver options in <code>metro build</code> and <code>runBuild</code> API. (<a href="fcfecc9672</a> by <a href="https://github.com/motiz88"><code>@motiz88</code></a>)</li> <li><strong>[Feature]</strong>: <code>metro get-dependencies --entryFile <entryFile></code> can now be called as <code>metro get-dependencies <entryFile></code>. (<a href="6fdce04007</a> by <a href="https://github.com/huntie"><code>@huntie</code></a>)</li> <li><strong>[Feature]</strong>: Add <code>Content-Type</code> and <code>Content-Length</code> headers for assets to Metro server. (<a href="https://redirect.github.com/facebook/metro/pull/953">facebook/metro#953</a> by <a href="https://github.com/aleqsio"><code>@aleqsio</code></a>, <a href="https://redirect.github.com/facebook/metro/pull/961">facebook/metro#961</a> by <a href="https://github.com/byCedric"><code>@byCedric</code></a>)</li> <li><strong>[Feature]</strong>: Expose <code>mergeConfig</code> util from <code>metro</code> package. (<a href="aa8ec904ce</a> by <a href="https://github.com/huntie"><code>@huntie</code></a>)</li> <li><strong>[Fix]</strong>: <code>metro-file-map</code>: consistently abort crawl when <code>end()</code> is called. (<a href="51877a8c50</a> by <a href="https://github.com/motiz88"><code>@motiz88</code></a>)</li> <li><strong>[Fix]</strong>: <code>metro-config</code>: Don't mutate argument to <code>loadConfig</code>. (<a href="38ec62d1a0</a> by <a href="https://github.com/motiz88"><code>@motiz88</code></a>)</li> <li><strong>[Fix]</strong>: Babel transformers: Provide correct absolute source path to plugins when Metro is not run from the project root. (<a href="de19bbd33f</a> by <a href="https://github.com/robhogan"><code>@robhogan</code></a>)</li> <li><strong>[Fix]</strong>: <a href="https://facebook.github.io/metro/docs/configuration/#assetexts"><code>resolver.assetExts</code></a> will now match asset files for extension values that include a dot (<code>.</code>). (<a href="6d65a328e6</a> by <a href="https://github.com/huntie"><code>@huntie</code></a>)</li> <li><strong>[Fix]</strong>: Don't register an <a href="https://nodejs.org/api/process.html#event-unhandledrejection"><code>unhandledRejection</code></a> listener, fix spammy EventEmitter leak warning. (<a href="833f2ffc36</a> by <a href="https://github.com/motiz88"><code>@motiz88</code></a>)</li> <li><strong>[Types]</strong>: Add bundled TypeScript definitions (partial) for all packages previously on DefinitelyTyped. (<a href="c022c361d0</a>, <a href="07732e778b</a>, <a href="9ee5280bd4</a> by <a href="https://github.com/huntie"><code>@huntie</code></a>, with <a href="https://github.com/afoxman"><code>@afoxman</code></a> and <a href="https://github.com/tido64"><code>@tido64</code></a>)</li> </ul> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="5d7305e2f3"><code>5d7305e</code></a> Fix graph delta bugs when a dependency is added+modified+removed / removed+mo...</li> <li><a href="cc9a3463ae"><code>cc9a346</code></a> Release 0.76.4</li> <li><a href="d21cff8720"><code>d21cff8</code></a> Bump TypeScript in template from 4.8.4 to 5.0.4</li> <li><a href="024caf7349"><code>024caf7</code></a> Remove Promise libdef override in xplat</li> <li><a href="c11f75acfc"><code>c11f75a</code></a> Bump "image-size" dependency version 0.6.0->1.0.2 and enable KTX support (<a href="https://redirect.github.com/facebook/metro/issues/975">https://github.com/facebook/flipper/issues/975</a>)</li> <li><a href="4bcee6a108"><code>4bcee6a</code></a> upgrade to flow v0.205.1</li> <li><a href="e04c65d4a6"><code>e04c65d</code></a> Codemod <code>$Shape</code> to <code>Partial</code>, some final updates</li> <li><a href="97d5544f8d"><code>97d5544</code></a> Deploy 0.205.0 to xplat (<a href="https://redirect.github.com/facebook/metro/issues/37172">#37172</a>)</li> <li><a href="b2facd9e14"><code>b2facd9</code></a> Add package migration guide to Package Exports docs</li> <li><a href="453f3a677a"><code>453f3a6</code></a> Add Package Exports guide detailing breaking changes</li> <li>Additional commits viewable in <a href="https://github.com/facebook/metro/compare/v0.76.0...v0.76.4">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/4741 Reviewed By: passy Differential Revision: D46015927 Pulled By: ivanmisuno fbshipit-source-id: fe21a81b1d2943132e1e5a8d369b98df5af3f6b7
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.