Summary: This one snuck in while rebasing my new rules onto master.
Reviewed By: bnelo12
Differential Revision: D16180472
fbshipit-source-id: b715c218ff1886c1901c7730a6b8dac67beb3968
Summary:
Non-final identifiers make code harder to understand.
This is particularly true for JavaScript where even the *type*
can change as a value gets reassigned later.
This enforces to use `const` whereever possible, but doesn't
"outlaw" `let`. Mixed destructuring is also still allowed.
Used `eslint --fix` to change all existing cases.
Reviewed By: jknoxville
Differential Revision: D16131329
fbshipit-source-id: 2eceaca7c603b71b36e005be5d135e1849f2518d
Summary:
On Windows fs.watch fires multiple times after a single edit causing multiple instances of plugin compilation threads to start bogging down system resources.
This diff delays compilation by 1 second, soaking additional watch events fired for that plugin in that time window.
Reviewed By: danielbuechele
Differential Revision: D16109076
fbshipit-source-id: bc4f89d83f04487a3d32ee5cc2105fe0a8b7366c
Summary:
Builds in flipper-public are failing, because duplicate imports: https://our.intern.facebook.com/intern/sandcastle/job/22517998213713260
That's most likely because the `flipper-public` is not blacklisted in metro, so let's add it!
Reviewed By: passy
Differential Revision: D14134423
fbshipit-source-id: 52f87196957c8578b8ac7f578efa74e3c13fe1bb
Summary: Plugin files in subfolders were not watched. Adding recursive flag to reload plugins, even when there are changes in any of the plugin's subdirectories.
Reviewed By: jknoxville
Differential Revision: D14100394
fbshipit-source-id: 2a0b5e35df4bbbfe6cf8a0fafd5271222d99a46c
Summary:
- create a zip-file when building the headless version of Flipper
- restore pkg cache in Sandcastle from pantri
- run build script in sandcastle.
Changes need to go together with D13942919
Reviewed By: passy
Differential Revision: D13942701
fbshipit-source-id: caac7d6cda99fec2a6836c652957ff609a0bf8bb
Summary:
Instead of replacing the tilde with home-dirs on an incomplete, ad-hoc
basis, let's use a package for this. It also supports `~USER` resolution
which someone might reasonbly expect to work if `~/DIR` is working.
Reviewed By: jknoxville
Differential Revision: D13940956
fbshipit-source-id: 5bfa9b8b2540fed8c05c856ff736e48e925f985d
Summary:
First add a Flow Strict config, then enable Flow Strict Local for 13 files in xplat/sonar.
each change can land seperately:
drop-conflicts
Reviewed By: passy
Differential Revision: D13368791
fbshipit-source-id: 5bc1f9d3a179f4b9a554cc8cc629db0fda468a36
Summary:
This adds an option to the compilePlugin function that
allows specifying whether or not to throw an exception
if compiling a plugin fails.
While this seems like a sensible default while development,
it seems like a pretty bad idea when building releases.
Reviewed By: jknoxville
Differential Revision: D12904570
fbshipit-source-id: aee365074af129296a9d493804b959cb9513f9cc
Summary:
Metro's new version using `jest-haste-map` wants to access files inside our ASAR bundle, not using electron's require function. This fails, because it can not read from inside the ASAR bundle. For this reason we are disabeling ASAR for now.
Additionally, we are disabling reloads when a hidden file changes. This is because watchman creates a `.watchman-cookie` which shoudln't triggers a reload. But in general I think it's safe to not reload when hidden files are changed, as they are unlikely to have actual code in them.
Reviewed By: passy
Differential Revision: D10426715
fbshipit-source-id: 6ad9dcf88c62d5b65a9736eff28aadaf89c6af7a
Summary: The minifier removed `debugger` statements from the plugins. We don't need to minify the plugins, because we don't care about bundle size, so we can just disable minification for plugins.
Reviewed By: alangenfeld
Differential Revision: D10334694
fbshipit-source-id: 0b3e23db107f960a3dbeb6a79aa24bacca41c230
Summary: Inline sourcemaps were broken in Metro until 0.47.1, so now we can debug flipper plugins again!
Reviewed By: passy
Differential Revision: D10200221
fbshipit-source-id: 919c1bc4f7aee720f25f2375ffbd8a786ebd0017
Summary: Use inline source maps for plugins and main bundle, both in production and development.
Reviewed By: passy
Differential Revision: D9967235
fbshipit-source-id: 245e65c6fea94b93dc34a65ae572b7fc98ad56e1
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:
Disabling `atime` on Linux is quite common. (I don't have data to back this up,
but with my sample size of n=1, 100% fall into this bucket.) In that case,
the plugins will be cached indefinitely.
Using `ctime` on the directory doesn't really mean anything because it is
only affected by changes *to* the directory, not the files inside.
So, let's do this right and use the most recent change to any of the files
*inside* the directory instead.
Reviewed By: danielbuechele
Differential Revision: D9479491
fbshipit-source-id: 6945d7bf87defa67679cacdaf0a978d8ff1770c3
Summary:
There are 3 sources where plugins can be loaded from:
* `src/plugins`
* `src/fb/plugins`
* any path specified in `~/.sonar/config.json`
Plugins found in the first two directories are bundled with the app when building.
Reviewed By: jknoxville
Differential Revision: D8636061
fbshipit-source-id: 2064090d43d11695ffd99df195e5b594559fe087