Summary:
Sorry for long diff! I can try to split it if necessary, but many changes here are 1-1 replacements / renames.
**Preambule**
Currently we bundle default plugins into the Flipper main bundle. This helps us to reduce bundle size, because of plugin dependencies re-use. E.g. if multiple plugins use "lodash" when they are bundled together, only one copy of "lodash" added. When they are bundled separately, the same dependency might be added to each of them. However as we're not going to include most of plugins into Flipper distributive anymore and going to rely on Marketplace instead, this bundling doesn't provide significant size benefits anymore. In addition to that, bundling makes it impossible to differentiate whether thrown errors are originated from Flipper core or one of its plugins.
Why don't we remove plugin bundling at all? Because for "dev mode" it actually quite useful. It makes dev build start much faster and also enables using of Fast Refresh for plugin development (fast refresh won't work for plugins loaded from disk).
**Changes**
This diff introduces new option "no-bundled-plugins" for "yarn start" and "yarn build" commands. For now, by default, we will continue bundling default plugins into the Flipper main bundle, but if this option provided then we will build each default plugin separately and include their packages into the Flipper distributive as "pre-installed" to be able to load them from disk even without access to Marketplace.
For "yarn start", we're adding symlinks to plugin folders in "static/defaultPlugins" and then they are loaded by Flipper. For "yarn build" we are dereferencing these symlinks to include physical files of plugins into folder "defaultPlugins" of the produced distributive. Folder "defaultPlugins" is excluded from asar, because loading of plugins from asar archive might introduce some unexpected issues depending on their implementation.
Reviewed By: mweststrate
Differential Revision: D28431838
fbshipit-source-id: f7757e9f5ba9183ed918d70252de3ce0e823177d
Summary:
Here I'm changing plugin repository structure to allow re-using of shared packages between both public and fb-internal plugins, and to ensure that public plugins has their own yarn.lock as this will be required to implement reproducible jobs checking plugin compatibility with released flipper versions.
Please note that there are a lot of moved files in this diff, make sure to click "Expand all" to see all that actually changed (there are not much of them actually).
New proposed structure for plugin packages:
```
- root
- node_modules - modules included into Flipper: flipper, flipper-plugin, react, antd, emotion
-- plugins
--- node_modules - modules used by both public and fb-internal plugins (shared libs will be linked here, see D27034936)
--- public
---- node_modules - modules used by public plugins
---- pluginA
----- node_modules - modules used by plugin A exclusively
---- pluginB
----- node_modules - modules used by plugin B exclusively
--- fb
---- node_modules - modules used by fb-internal plugins
---- pluginC
----- node_modules - modules used by plugin C exclusively
---- pluginD
----- node_modules - modules used by plugin D exclusively
```
I've moved all public plugins under dir "plugins/public" and excluded them from root yarn workspaces. Instead, they will have their own yarn workspaces config and yarn.lock and they will use flipper modules as peer dependencies.
Reviewed By: mweststrate
Differential Revision: D27034108
fbshipit-source-id: c2310e3c5bfe7526033f51b46c0ae40199fd7586
Summary:
Changed "build-plugin" script to allow triggering release by plugin name (required to enable triggering releases by button in Marketplace):
1) Added new script to resolve plugin dir by name
2) Allow passing either plugin dir or name to "build-plugin" script
Reviewed By: passy
Differential Revision: D22354643
fbshipit-source-id: b7aca57acefc81ca0b6d9c7f359f63d8f0599e39
Summary: Script to list all plugins included into Flipper desktop workspaces.
Reviewed By: passy
Differential Revision: D22256917
fbshipit-source-id: a3d8a0f9faea6e462a2f22be155d99eb22eb59d8
Summary:
Updated "bump-versions" script to also bump version of all plugins when we're releasing Flipper.
Changelog: Versions of bundled plugins will be matching Flipper core version.
Reviewed By: mweststrate
Differential Revision: D22042960
fbshipit-source-id: b2d361ce9cbfc8022e12aecbbf7c6101029844e5
Summary: To make testing easier, I've implemented dry-run for version bumping and npm publishing scripts
Reviewed By: mweststrate
Differential Revision: D21721142
fbshipit-source-id: 72fc5a78bfc102a8fca9087decfbed6ebbda5e51
Summary: Fixed bumping of local peer dependencies and manually bumped the version which was not bumped automatically during the latest release.
Reviewed By: passy
Differential Revision: D21308701
fbshipit-source-id: 936a04b432ad3c9313644c1bf96966c52e022d7e
Summary:
Fixed npm packaging/publishing scripts for "flipper-doctor", "flipper-pkg" and "flipper-babel-transformer".
Also removed scripts for testing and linting, because these packages are tested and linted by root level package.json.
Reviewed By: jknoxville
Differential Revision: D20839959
fbshipit-source-id: 4d9d037d4921fc97356c849054c389dfece05652
Summary: Publish all the public packages (excluding those with "private=true") included as workspaces to "desktop" project.
Reviewed By: jknoxville
Differential Revision: D20765097
fbshipit-source-id: 444541e9a682a90eba02cb3da85ada9bd00d93d0