Commit Graph

63 Commits

Author SHA1 Message Date
Michel Weststrate
c1ce2fad90 Fix ReactNativeFlipperExample build
Summary: The React Native example project was broken for iOS. Fixed this by upgrading cocoapods locally, and bumping the Flipper version.

Reviewed By: passy, priteshrnandgaonkar

Differential Revision: D26777641

fbshipit-source-id: 889ff4f9de7c44240fe0a1b5d7d3c7c0b688d8ad
2021-03-03 05:05:05 -08:00
dependabot[bot]
bf5de98bcb Bump @babel/core from 7.12.10 to 7.13.8 in /react-native/ReactNativeFlipperExample (#1981)
Summary:
Bumps [babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.12.10 to 7.13.8.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/babel/babel/releases"><code>@​babel/core's releases</code></a>.</em></p>
<blockquote>
<h2>v7.13.8 (2021-02-26)</h2>
<p>Thanks <a href="https://github.com/luxp"><code>@​luxp</code></a> and <a href="https://github.com/pigcan"><code>@​pigcan</code></a> for your first PRs!</p>
<h4>🐛 Bug Fix</h4>
<ul>
<li>Other
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/12909">#12909</a> chore: do not provide polyfills on bundling babel/standalone (<a href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/12891">#12891</a> fix(eslint-parser): merge input <code>estree</code> options (<a href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
</ul>
</li>
<li><code>babel-compat-data</code>, <code>babel-preset-env</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/12901">#12901</a> Fix Module not found: Error: Can't resolve 'core-js/modules/es6.array.concat.js' with <a href="mailto:compat-data@7.13.x">compat-data@7.13.x</a> (<a href="https://github.com/luxp"><code>@​luxp</code></a>)</li>
</ul>
</li>
<li><code>babel-plugin-transform-runtime</code>, <code>babel-runtime-corejs2</code>, <code>babel-runtime-corejs3</code>, <code>babel-runtime</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/12893">#12893</a> Allow <code>require()</code> of runtime helpers in Node.js 13.2-13.6 (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
</ul>
<h4>💅 Polish</h4>
<ul>
<li><code>babel-helper-create-class-features-plugin</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/12898">#12898</a> Do not warn for <code>loose</code> of class features in <code>preset-env</code> (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
</ul>
<h4>🏠 Internal</h4>
<ul>
<li><code>babel-core</code>, <code>babel-helper-transform-fixture-test-runner</code>, <code>babel-register</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/12820">#12820</a> [internal] Keep the <code>.cjs</code> extension when compiling source files (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
<li><code>babel-plugin-transform-runtime</code>, <code>babel-runtime-corejs2</code>, <code>babel-runtime</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/12883">#12883</a> Improve <code>babel/runtime</code> esm stability (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
</ul>
<h4>🔬 Output optimization</h4>
<ul>
<li><code>babel-plugin-proposal-object-rest-spread</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/12899">#12899</a> Skip <code>_extends</code> helper for <code>{…x}</code> with modern targets (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
</ul>
<h4>Committers: 6</h4>
<ul>
<li>Alan Lu - 川古 (<a href="https://github.com/luxp"><code>@​luxp</code></a>)</li>
<li>Babel Bot (<a href="https://github.com/babel-bot"><code>@​babel-bot</code></a>)</li>
<li>Bogdan Savluk (<a href="https://github.com/zxbodya"><code>@​zxbodya</code></a>)</li>
<li>Huáng Jùnliàng (<a href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
<li>Nicolò Ribaudo (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
<li>pigcan (<a href="https://github.com/pigcan"><code>@​pigcan</code></a>)</li>
</ul>
<h2>v7.13.7 (2021-02-24)</h2>
<h4>🐛 Bug Fix</h4>
<ul>
<li><code>babel-plugin-transform-runtime</code>, <code>babel-runtime-corejs2</code>, <code>babel-runtime-corejs3</code>, <code>babel-runtime</code>
<ul>
<li><a href="cfdbdc0d1c"><code>cfdbdc0</code></a> Add back export maps for the <code>helpers/esm</code> folder (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
</ul>
<h4>Committers: 1</h4>
<ul>
<li>Nicolò Ribaudo (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
<h2>v7.13.6 (2021-02-23)</h2>
<h4>🐛 Bug Fix</h4>
<ul>
<li><code>babel-plugin-transform-runtime</code>, <code>babel-runtime-corejs2</code>, <code>babel-runtime-corejs3</code>, <code>babel-runtime</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/12877">#12877</a> Define fallback <code>exports</code> for <code>babel/runtime</code> on old Node (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
</ul>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/babel/babel/blob/main/CHANGELOG.md"><code>@​babel/core's changelog</code></a>.</em></p>
<blockquote>
<h2>v7.13.8 (2021-02-26)</h2>
<h4>🐛 Bug Fix</h4>
<ul>
<li>Other
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/12909">#12909</a> chore: do not provide polyfills on bundling babel/standalone (<a href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/12891">#12891</a> fix(eslint-parser): merge input <code>estree</code> options (<a href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
</ul>
</li>
<li><code>babel-compat-data</code>, <code>babel-preset-env</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/12901">#12901</a> Fix Module not found: Error: Can't resolve 'core-js/modules/es6.array.concat.js' with <a href="mailto:compat-data@7.13.x">compat-data@7.13.x</a> (<a href="https://github.com/luxp"><code>@​luxp</code></a>)</li>
</ul>
</li>
<li><code>babel-plugin-transform-runtime</code>, <code>babel-runtime-corejs2</code>, <code>babel-runtime-corejs3</code>, <code>babel-runtime</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/12893">#12893</a> Allow <code>require()</code> of runtime helpers in Node.js 13.2-13.6 (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
</ul>
<h4>💅 Polish</h4>
<ul>
<li><code>babel-helper-create-class-features-plugin</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/12898">#12898</a> Do not warn for <code>loose</code> of class features in <code>preset-env</code> (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
</ul>
<h4>🏠 Internal</h4>
<ul>
<li><code>babel-core</code>, <code>babel-helper-transform-fixture-test-runner</code>, <code>babel-register</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/12820">#12820</a> [internal] Keep the <code>.cjs</code> extension when compiling source files (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
<li><code>babel-plugin-transform-runtime</code>, <code>babel-runtime-corejs2</code>, <code>babel-runtime</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/12883">#12883</a> Improve <code>babel/runtime</code> esm stability (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
</ul>
<h4>🔬 Output optimization</h4>
<ul>
<li><code>babel-plugin-proposal-object-rest-spread</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/12899">#12899</a> Skip <code>_extends</code> helper for <code>{…x}</code> with modern targets (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
</ul>
<h2>v7.13.6 (2021-02-23)</h2>
<h4>🐛 Bug Fix</h4>
<ul>
<li><code>babel-plugin-transform-runtime</code>, <code>babel-runtime-corejs2</code>, <code>babel-runtime-corejs3</code>, <code>babel-runtime</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/12877">#12877</a> Define fallback <code>exports</code> for <code>babel/runtime</code> on old Node (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
</ul>
<h4>🏠 Internal</h4>
<ul>
<li><code>babel-compat-data</code>, <code>babel-preset-env</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/12850">#12850</a> Update compat table (<a href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
</ul>
</li>
</ul>
<h2>v7.13.5 (2021-02-23)</h2>
<h4>🐛 Bug Fix</h4>
<ul>
<li><code>babel-compat-data</code>, <code>babel-plugin-transform-runtime</code>, <code>babel-preset-env</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/12870">#12870</a> Add <code>es6.array.slice</code> in corejs2 builtins (<a href="https://github.com/eligao"><code>@​eligao</code></a>)</li>
</ul>
</li>
<li><code>babel-plugin-proposal-async-generator-functions</code>, <code>babel-plugin-proposal-decorators</code>, <code>babel-plugin-transform-runtime</code>, <code>babel-preset-env</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/12869">#12869</a> Ensure that <code>babel/runtime-corejs3</code> imports are injected (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
</ul>
<h2>v7.13.4 (2021-02-23)</h2>
<h4>🐛 Bug Fix</h4>
<ul>
<li><code>babel-parser</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/12867">#12867</a> Don't enable class features by default in <code>estree</code> (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
<li><code>babel-plugin-transform-runtime</code>, <code>babel-runtime-corejs2</code>, <code>babel-runtime-corejs3</code>, <code>babel-runtime</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/12865">#12865</a> Always load the CJS helpers when using <code>require</code> (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
</ul>
<h2>v7.13.2 (2021-02-23)</h2>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="e2abc19c4c"><code>e2abc19</code></a> v7.13.8</li>
<li><a href="ea6a438315"><code>ea6a438</code></a> Enable <code>external-helpers</code> by default in tests (<a href="https://github.com/babel/babel/tree/HEAD/packages/babel-core/issues/12911">#12911</a>)</li>
<li><a href="b17231e1af"><code>b17231e</code></a> [internal] Keep the <code>.cjs</code> extension when compiling source files (<a href="https://github.com/babel/babel/tree/HEAD/packages/babel-core/issues/12820">#12820</a>)</li>
<li><a href="c9da9650eb"><code>c9da965</code></a> chore: downgrade <code>semver</code> to <code>^6.3.2</code> (<a href="https://github.com/babel/babel/tree/HEAD/packages/babel-core/issues/12890">#12890</a>)</li>
<li><a href="103b187e6f"><code>103b187</code></a> v7.13.1</li>
<li><a href="5861704361"><code>5861704</code></a> Export function versions of <code>createConfigItem</code> (<a href="https://github.com/babel/babel/tree/HEAD/packages/babel-core/issues/12852">#12852</a>)</li>
<li><a href="c827193d9c"><code>c827193</code></a> v7.13.0</li>
<li><a href="ba4ac7d587"><code>ba4ac7d</code></a> chore: bump semver to 7.0.0 (<a href="https://github.com/babel/babel/tree/HEAD/packages/babel-core/issues/12015">#12015</a>)</li>
<li><a href="d1d6ee6dc2"><code>d1d6ee6</code></a> Add cjs as a default extension (<a href="https://github.com/babel/babel/tree/HEAD/packages/babel-core/issues/11498">#11498</a>)</li>
<li><a href="6ef7b51a11"><code>6ef7b51</code></a> Implement assumptions defined in the <a href="https://github-redirect.dependabot.com/babel/rfcs/issues/5">babel/rfcs#5</a> RFC</li>
<li>Additional commits viewable in <a href="https://github.com/babel/babel/commits/v7.13.8/packages/babel-core">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@babel/core&package-manager=npm_and_yarn&previous-version=7.12.10&new-version=7.13.8)](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/1981

Reviewed By: priteshrnandgaonkar

Differential Revision: D26723634

Pulled By: mweststrate

fbshipit-source-id: db5e2d287359e6dc22b46461d390148ca639a653
2021-03-01 08:03:06 -08:00
Michel Weststrate
d836b80273 Fix network plugin not working in example
Summary: Two diffs ago network plugin didn't seem to work correctly, fixed it by explicitly bumping / verifying that the latest SDK is used

Reviewed By: passy

Differential Revision: D25755993

fbshipit-source-id: 7cc0def113a84b0a66c728b479247f5c18ce79b8
2021-01-04 12:17:56 -08:00
Michel Weststrate
5471b844bc Apply react-native migration 0.62.2 -> 0.63.4
Summary:
In D25244631 (92bd68a371) we bumped the react-native dep of Flipper but we didn't apply the migration guide (sorry for missing that in the review), so the ReactNativeExample fell apart when trying to build for iOS. This diff applies the migration guide which nicely fixes that:

https://react-native-community.github.io/upgrade-helper/?from=0.62.2&to=0.63.4

Recreating the Podfile.lock and running `./gradlew clean` fixed all build problems after that.

Verified that `yarn ios` and `yarn android`, and building from XCode all work.

Found (probably unrelated / existing) issues:
* custom plugins only show up after initial app start after refreshing the plugin list by navigating to another diffs first, so this seems to be a UI staleness bug
* Network plugin doesn't seem to work ion iOS (either not showing traffic or not showing data at all)

Reviewed By: passy

Differential Revision: D25755490

fbshipit-source-id: baea8b152fb252deda04291ec197ab87c2fbe3eb
2021-01-04 12:17:56 -08:00
Chaiwat Ekkaewnumchai
b81724b7b0 Update Podfile for ReactNativeFlipperExample
Summary:
Encountered while trying to install the sample React Native app. Try the suggestion and the files changed.

This files are modified from `pod deintegrate` and `pod install` commands

Reviewed By: passy

Differential Revision: D21905958

fbshipit-source-id: 8b391acf5001c764bcfc0dd08b7ac5294ec9f5df
2020-06-08 09:00:03 -07:00
Michel Weststrate
dd111076c9 Only use Flipper in DEBUG builds
Summary:
as discussed in https://github.com/facebook/flipper/issues/976#issuecomment-634917766,

this solves the issue that FlipperKit is accidentally included in production builds ones react-native-flipper is installed, due to it's dependency on Flipper kit

This change is safe because the bindings did already have a check to verify that the Flipper bindings are available at all, and silenty skips their absence in production builds: https://www.internalfb.com/intern/diffusion/FBS/browse/master/xplat/sonar/react-native/react-native-flipper/index.js?commit=b7dd7e05b177&lines=128

Reviewed By: passy

Differential Revision: D21749213

fbshipit-source-id: 2c4435c7a375fbc24f89159855d3e0297f3aa9a4
2020-05-28 09:59:53 -07:00
Michel Weststrate
febb3deed9 Some dep bumps
Summary: Some dependency updates, mostly to prepare for next diff and update the podfile with the newest RN template

Reviewed By: passy

Differential Revision: D21749214

fbshipit-source-id: 0af10e404901a7522253136dc8c03020e7c813f8
2020-05-28 09:59:53 -07:00
Pascal Hartig
b56e89f7ca Update podfile
Summary: I think that's a good thing to keep up-to-date?

Reviewed By: mweststrate

Differential Revision: D20890360

fbshipit-source-id: a9c95d4afb2f6b6f0b32f595c53f3799b9ffaa73
2020-04-07 05:54:41 -07:00
Michel Weststrate
8a7e0578ff Update to rc.5
Summary:
* Followed plan of D20221558
* Manually bumped Flipper version on iOS to 0.33.1, which contains https://github.com/facebook/flipper/pull/874/files (make Flipper compatible with iOS 9).
* Will submit a PR on RN to bump the iOS template

Reviewed By: passy

Differential Revision: D20361824

fbshipit-source-id: 4f013b731b40e2d4f941742f9201bf2bb4382ec3
2020-03-10 09:02:30 -07:00
Michel Weststrate
f3fd8646e3 Upgrade example app to 0.62.0-rc.3
Summary:
^

1. Remove entire `react-native/ReactNativeExampleFlipper` folder
2. Run `npx react-native init --version 0.62.0-rc.3 ReactNativeExampleFlipper`
4. restore the `package.json` and `TicTacToe` file and import
5. removed `.eslintrc`, `_BUCK` and `build_defz.bzl`, `.watchmenconfig`

Added comments below to highlight the non-generated changes

Reviewed By: passy

Differential Revision: D20221558

fbshipit-source-id: da1c895a2b0e7ce48092e64cdb5ffdb9e4a1a10b
2020-03-04 19:00:20 -08:00
Pritesh Nandgaonkar
bd388f73e4 CLANGFORMAT the remaining files of xplat/sonar
Summary:
As per title.
Ran `arc lint -a --take CLANGFORMAT --paths-cmd 'hg files ./'` from xplat/sonar

Reviewed By: zertosh

Differential Revision: D19943131

fbshipit-source-id: c1dc10b27389fd6f54f055803519dac6bf0e7997
2020-02-18 05:27:56 -08:00
Janic Duplessis
44f5e35675 Implement react-native-flipper on iOS (#795)
Summary:
Implement the react-native-flipper native module on iOS. Uses very similar abstractions as on Android.

## Changelog

[react-native-flipper] Support iOS
Pull Request resolved: https://github.com/facebook/flipper/pull/795

Test Plan:
Tested using the RN TicTacToe example app

{F228406333}

Reviewed By: mweststrate

Differential Revision: D19853017

Pulled By: priteshrnandgaonkar

fbshipit-source-id: d93d35ff984b9ba75f812c4c8e3c82e4d550f0c0
2020-02-14 21:17:11 -08:00
Michel Weststrate
0fa0899299 Create React Native example project
Summary:
This diff creates a sample React Native project (based on the 0.62-rc.0 template).

This example is created like:
(Documenting this here as in the future this might be easier than upgrading the project itself)

1. Run `npx react-native init ReactNativeFlipperExample --version 0.62.0-rc.0`
2. Follow the installation steps to enable Flipper, that is, call `initializeFlipper(this, getReactNativeHost().getReactInstanceManager());` at the end of the `onCreate` method in `MainApplication.java`
3. Put `FlipperTicTacToe` in the root of the project, and call it from `App.js` as a component
4. install `react-native-flipper` as dependency
5. install `relative-deps` as dev dependency, and set it up as shown in `package.json`. This tool make sure that we build and test this project against the version of react-native-flipper in this repository, rather than against the one on NPM.
6. removed some stuff, like tests and linting, which is just in the way in this repo

This PR does not support iOS, as Flipper + RN iOS is still broken in 0.62.0-rc.0, and the current version of react-native-flipper doesn't support iOS yet either.

Documentation on how to set up Flipper in general is not part of this Diff

_N.B. since this is a **public** project, to be visible and runnable by our OSS community, the build setup is kept plain, vanilla, react-native, and **not** wired up to our normal / internal build processes. This is also the reason that lint suggestions beyond the license headers have been ignored. If any others should be applied, it is probably the official react native template that requires updating_

Reviewed By: passy

Differential Revision: D19449295

fbshipit-source-id: 2aeb6044f8dd01f09a95350c84fff2419d685a65
2020-01-23 04:47:52 -08:00