Summary:
Plugins need to be self-contained. The can not require any dependency from Flipper's main app. This was a soft requirement before, but with the new version of metro, we now make this a hard requirement.
This speeds up plugin compile times, because only the files in the plugin's folder are watched and not all of Flipper's files. Moreover, this ensures "plugins" are real plugins and can be added and removed and are not mixed with the apps core.
Reviewed By: passy
Differential Revision: D9940735
fbshipit-source-id: 47e120429fc3c4c985731478ffa35c3359ff78f9
Summary: Adds support for optional chaining to the codebase, enables flow and eslint support for it.
Reviewed By: passy
Differential Revision: D9940732
fbshipit-source-id: 730aa76653bd22a8fa17a73e72b3a7329de0226c
Summary: upgrading to babel 7 and upgrading all presets and plugins as well
Reviewed By: passy
Differential Revision: D9940733
fbshipit-source-id: 24f45c78a9452899e6fb140a56028dd9fa0b5ea3
Summary: Upgrading to metro@0.45.3 and adapting to API changes made by metro.
Reviewed By: passy
Differential Revision: D9940734
fbshipit-source-id: 34b07cc70c9654d9e07755816aba703a826dcae9
Summary: This diff wraps the call to refresh plugins in `performAndReport`. All the important methods are already wrapped in this function. This diff also logs the error in the standard error if the connection is not established. With this diff the iOS app should not crash due exceptions thrown in iOS and cpp code. For android the app won't crash due to exception of cpp but can crash due to exceptions thrown in java code of the plugin
Reviewed By: jknoxville
Differential Revision: D9848112
fbshipit-source-id: 689ef9240e47400e8ce8c89b4c0ccec43d2180f9
Summary:
This leaves a BUCK skeleton in place that re-exports everything. Phew, that
was fun to create ... NOT. Are not-jokes still a thing? I'm on a plane,
and I claim that up here they still are.
Reviewed By: jknoxville
Differential Revision: D9922310
fbshipit-source-id: f48dcd98a7ad651a538c1c697bba24037e13db63
Summary:
This soft-breaks Android Studio support because folder names no longer map to package names, but this will be mitigated by future diffs.
Steps taken for rename:
```
cd xplat/sonar/android/;
ambr 'com.facebook.sonar' 'com.facebook.flipper'
```
Reviewed By: danielbuechele
Differential Revision: D9850009
fbshipit-source-id: d26d8ab783e7050e4e2fbdd0c35eae3f97879464
Summary:
`--info` was only useful while debugging the initial setup. This also
makes skipping non-snapshot builds no longer fatal.
Pull Request resolved: https://github.com/facebook/flipper/pull/274
Reviewed By: jknoxville
Differential Revision: D9934199
Pulled By: passy
fbshipit-source-id: 051cdacc63a2480f7670d714aaf8ef7d0df11df7
Summary:
global variable was renamed from `Sonar` to `Flipper`.
Fixes#267.
Reviewed By: passy
Differential Revision: D9934362
fbshipit-source-id: 0c03f3e12d9db26c5c7e9430fc98ba7fffd0bf54
Summary:
`yarn start` was failing due missing watchman configuration. Adding an empty .watchmanconfig prevents this from happening.
Full build failure:
```
➜ flipper git:(master) yarn start
Using globally installed version of Yarn
yarn run v1.5.1
(node:95759) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
$ cross-env NODE_ENV=development node scripts/start-dev-server.js
┌──────────────────────────────────────────────────────────────────────────────┐
│ │
│ Running Metro Bundler on port 3001. │
│ │
│ Keep Metro running while developing on any JS projects. Feel free to │
│ close this tab and run your own Metro instance if you prefer. │
│ │
│ https://github.com/facebook/react-native │
│ │
└──────────────────────────────────────────────────────────────────────────────┘
Looking for JS files in
/Users/eveliotc/dev/flipper
Loading dependency graph...✔ No known errors
jest-haste-map: Watchman crawl failed. Retrying once with node crawler.
Usually this happens when watchman isn't running. Create an empty `.watchmanconfig` file in your project's root folder or initialize a git or hg repository in your project.
Error: Watchman error: resolve_projpath: None of the files listed in global config root_files are present in path `/Users/eveliotc/dev/flipper` or any of its parent directories. root_files is defined by the `/etc/watchman.json` config file and includes `.watchmanconfig`. One or more of these files must be present in order to allow a watch. Try pulling and checking out a newer version of the project?. Make sure watchman is running for this project. See https://facebook.github.io/watchman/docs/troubleshooting.html.
🕵️ Watching for plugin changes
(electron) 'app.makeSingleInstance(cb)' is deprecated. Use 'app.requestSingleInstanceLock() and app.on('second-instance', cb)' instead.
DevTools listening on ws://127.0.0.1:9222/devtools/browser/f14faf94-45bb-42b9-a405-f7da2bdbcf28
⚙️ Compiling sonar-plugin-sandbox...
⚙️ Compiling sonar-plugin-layout...
⚙️ Compiling sonar-plugin-leakcanary...
⚙️ Compiling sonar-plugin-sharedpreferences...
⚙️ Compiling sonar-plugin-network...
Looking for JS files in
/Users/eveliotc/dev/flipper/src/plugins/sandbox
/Users/eveliotc/dev/flipper
Looking for JS files in
/Users/eveliotc/dev/flipper/src/plugins/layout
/Users/eveliotc/dev/flipper
Looking for JS files in
/Users/eveliotc/dev/flipper/src/plugins/leak_canary
/Users/eveliotc/dev/flipper
Loading dependency graph...jest-haste-map: Watchman crawl failed. Retrying once with node crawler.
Usually this happens when watchman isn't running. Create an empty `.watchmanconfig` file in your project's root folder or initialize a git or hg repository in your project.
Error: Watchman error: resolve_projpath: None of the files listed in global config root_files are present in path `/Users/eveliotc/dev/flipper/src/plugins/sandbox` or any of its parent directories. root_files is defined by the `/etc/watchman.json` config file and includes `.watchmanconfig`. One or more of these files must be present in order to allow a watch. Try pulling and checking out a newer version of the project?. Make sure watchman is running for this project. See https://facebook.github.io/watchman/docs/troubleshooting.html.
Looking for JS files in
/Users/eveliotc/dev/flipper/src/plugins/shared_preferences
/Users/eveliotc/dev/flipper
Looking for JS files in
/Users/eveliotc/dev/flipper/src/plugins/network
/Users/eveliotc/dev/flipper
Loading dependency graph...jest-haste-map: Watchman crawl failed. Retrying once with node crawler.
Usually this happens when watchman isn't running. Create an empty `.watchmanconfig` file in your project's root folder or initialize a git or hg repository in your project.
Error: Watchman error: resolve_projpath: None of the files listed in global config root_files are present in path `/Users/eveliotc/dev/flipper/src/plugins/leak_canary` or any of its parent directories. root_files is defined by the `/etc/watchman.json` config file and includes `.watchmanconfig`. One or more of these files must be present in order to allow a watch. Try pulling and checking out a newer version of the project?. Make sure watchman is running for this project. See https://facebook.github.io/watchman/docs/troubleshooting.html.
jest-haste-map: Watchman crawl failed. Retrying once with node crawler.
Usually this happens when watchman isn't running. Create an empty `.watchmanconfig` file in your project's root folder or initialize a git or hg repository in your project.
Error: Watchman error: resolve_projpath: None of the files listed in global config root_files are present in path `/Users/eveliotc/dev/flipper/src/plugins/layout` or any of its parent directories. root_files is defined by the `/etc/watchman.json` config file and includes `.watchmanconfig`. One or more of these files must be present in order to allow a watch. Try pulling and checking out a newer version of the project?. Make sure watchman is running for this project. See https://facebook.github.io/watchman/docs/troubleshooting.html.
jest-haste-map: Watchman crawl failed. Retrying once with node crawler.
Usually this happens when watchman isn't running. Create an empty `.watchmanconfig` file in your project's root folder or initialize a git or hg repository in your project.
Error: Watchman error: resolve_projpath: None of the files listed in global config root_files are present in path `/Users/eveliotc/dev/flipper/src/plugins/network` or any of its parent directories. root_files is defined by the `/etc/watchman.json` config file and includes `.watchmanconfig`. One or more of these files must be present in order to allow a watch. Try pulling and checking out a newer version of the project?. Make sure watchman is running for this project. See https://facebook.github.io/watchman/docs/troubleshooting.html.
events.js:167
throw er; // Unhandled 'error' event
^
Error: resolve_projpath: None of the files listed in global config root_files are present in path `/Users/eveliotc/dev/flipper` or any of its parent directories. root_files is defined by the `/etc/watchman.json` config file and includes `.watchmanconfig`. One or more of these files must be present in order to allow a watch. Try pulling and checking out a newer version of the project?
at BunserBuf.<anonymous> (/Users/eveliotc/dev/flipper/static/node_modules/fb-watchman/index.js:95:23)
at BunserBuf.emit (events.js:182:13)
at BunserBuf.process (/Users/eveliotc/dev/flipper/static/node_modules/bser/index.js:292:10)
at /Users/eveliotc/dev/flipper/static/node_modules/bser/index.js:247:12
at process._tickCallback (internal/process/next_tick.js:61:11)
Emitted 'error' event at:
at Client.client.on.error (/Users/eveliotc/dev/flipper/static/node_modules/jest-haste-map/build/lib/watchman_watcher.js:96:10)
at Client.emit (events.js:182:13)
at BunserBuf.<anonymous> (/Users/eveliotc/dev/flipper/static/node_modules/fb-watchman/index.js:107:12)
at BunserBuf.emit (events.js:182:13)
at /Users/eveliotc/dev/flipper/static/node_modules/bser/index.js:249:12
at process._tickCallback (internal/process/next_tick.js:61:11)
jest-haste-map: Watchman crawl failed. Retrying once with node crawler.
Usually this happens when watchman isn't running. Create an empty `.watchmanconfig` file in your project's root folder or initialize a git or hg repository in your project.
Error: Watchman error: resolve_projpath: None of the files listed in global config root_files are present in path `/Users/eveliotc/dev/flipper/src/plugins/shared_preferences` or any of its parent directories. root_files is defined by the `/etc/watchman.json` config file and includes `.watchmanconfig`. One or more of these files must be present in order to allow a watch. Try pulling and checking out a newer version of the project?. Make sure watchman is running for this project. See https://facebook.github.io/watchman/docs/troubleshooting.html.
error An unexpected error occurred: "Command failed.
Exit code: 1
Command: sh
Arguments: -c cross-env NODE_ENV=development node scripts/start-dev-server.js
Directory: /Users/eveliotc/dev/flipper
Output:
".
info If you think this is a bug, please open a bug report with the information provided in "/Users/eveliotc/dev/flipper/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
```
Pull Request resolved: https://github.com/facebook/flipper/pull/265
Reviewed By: jknoxville
Differential Revision: D9861602
Pulled By: eveliotc
fbshipit-source-id: 8e7f95c5dd3f3332c866e1b156499de97784e4f1
Summary:
Back out "Back out "[flipper] Export init function""
Original commit changeset: 93b916d472b7
The import side effect seems to cause some issues with shadowing,
so let's pull this all the way to the top and call this from HTML
as Sonar.init().
Reviewed By: danielbuechele
Differential Revision: D9849869
fbshipit-source-id: b62772ecddc59eab00251ebf19816f470d76ba82
Summary:
This seems to break initialization. I'm not quite sure why, but
inside the exported function, nothing else from the file appears
to be visible.
Original commit changeset: 55b2a61186e6
Reviewed By: danielbuechele
Differential Revision: D9849812
fbshipit-source-id: d88973721da82040e1f29669acade6c883619ce8
Summary:
On tags, build and publish artifacts to bintray. The encrypted accounted creds are for a `flipperfbbot` account on Bintray I created for this.
Pull Request resolved: https://github.com/facebook/flipper/pull/266
Reviewed By: priteshrnandgaonkar
Differential Revision: D9848181
Pulled By: passy
fbshipit-source-id: cf9150b2352a9ce972c48533ce15e8e75aa908fe
Summary: Adds a bunch of steps to take if you're having trouble.
Reviewed By: danielbuechele
Differential Revision: D9811295
fbshipit-source-id: 6802108e98850ab11764081491a528eb939d2224
Summary: This way we can mock it during tests.
Reviewed By: jknoxville
Differential Revision: D9788349
fbshipit-source-id: 55b2a61186e6294a8098db7add50fd8bbac7a680
Summary:
It's easier to find when they're in the repo. Exported them
from the AI template.
Reviewed By: priteshrnandgaonkar
Differential Revision: D9789825
fbshipit-source-id: ca717d130495842dcab4d06e02986d3df598dbe6
Summary: Fixes chmod and mac os script error and also tests if jq is installed
Reviewed By: passy
Differential Revision: D9789391
fbshipit-source-id: 11319539d4f511294f216860497bf0e67ee1af08
Summary:
Not sure if it's Metro or something else providing these globally,
but it makes Jest unhappy if they're missing.
Reviewed By: danielbuechele
Differential Revision: D9788350
fbshipit-source-id: 5fabad7af146bcb705471d2c7e66d79265c81c82
Summary:
Two fixes included in this one. The debug flag is obvious, the annotations
less so. I'll try and find the right place to document this, but the reason
we need this here is because we reflect on `Prop.class`, so these need to be
available at runtime.
Reviewed By: jknoxville
Differential Revision: D9766713
fbshipit-source-id: 269b5a60c0df644f4fda0ea289ef9dc392ee352b