Files
flipper/desktop/flipper-plugin
Michel Weststrate 5df34a337c Unshare global types
Summary:
This diff adds `types` fields on the compiler config for every project. This way we can make sure that for example node types and packages are not available in flipper-ui-core. Without an explicit types field, all types would be shared between all packages, and implicitly included into the compilation of everything. For the same reason `types/index.d.ts` has been removed, we want to be intentional on which types are being used in which package.

This diff does most of the work, the next diff will fine tune the globals, and do some further cleanup.

As an alternative solution I first tried a `nohoist: **/node_modules/types/**` and make sure every package list explicitly the types used in package json, which works but is much more error prone, as for example two different react types versions in two packages will cause the most unreadable compiler error due to the types not being shared and not literally the same.

Reviewed By: lawrencelomax

Differential Revision: D33124441

fbshipit-source-id: c2b9d768f845ac28005d8331ef5fa1066c7e4cd7
2021-12-17 07:36:07 -08:00
..
2021-12-17 07:36:07 -08:00
2021-12-16 14:54:59 -08:00
2020-07-01 09:12:35 -07:00
2021-12-17 07:36:07 -08:00

flipper-plugin

flipper-plugin is the dependency used by all modern Flipper plugins (project "Tommy").

For background: https://fb.quip.com/YHOGAnaPqAVJ

flipper-plugin is to be used as dev and peer dependency of all Flipper plugins. It provides:

  1. (TODO) Standard API's to interact with Flipper, such as the client connection.
  2. (TODO) Standard components to organize the UI
  3. (TODO) Testing utilities

API's provided by flipper-plugin are documented at fbflipper.com (TODO).

There should normally be no need to install flipper-plugin as dependency. Rather, plugins should be scaffolded using npx flipper-pkg init (TODO) as documented here