Make sure that limited top-level exports are exposed from flipper-plugin
Summary: This prefixes APIs of `flipper-plugin`, that are used by Flipper, but should not be used by plugins directly, with `_`. Also added tests to make sure we are always intentional when extending the exposed APIs Reviewed By: passy Differential Revision: D24991700 fbshipit-source-id: ed3700efa188fca7f5a14d5c68250598cf011e42
This commit is contained in:
committed by
Facebook GitHub Bot
parent
cc438e60ad
commit
45db64f0d0
@@ -12,7 +12,7 @@ import produce from 'immer';
|
||||
import {FlipperPlugin} from '../plugin';
|
||||
import {renderMockFlipperWithPlugin} from '../test-utils/createMockFlipperWithPlugin';
|
||||
import {
|
||||
SandyPluginDefinition,
|
||||
_SandyPluginDefinition,
|
||||
PluginClient,
|
||||
TestUtils,
|
||||
usePlugin,
|
||||
@@ -141,7 +141,7 @@ test('PluginContainer can render Sandy plugins', async () => {
|
||||
};
|
||||
};
|
||||
|
||||
const definition = new SandyPluginDefinition(
|
||||
const definition = new _SandyPluginDefinition(
|
||||
TestUtils.createMockPluginDetails(),
|
||||
{
|
||||
plugin,
|
||||
@@ -339,7 +339,7 @@ test('PluginContainer triggers correct lifecycles for background plugin', async
|
||||
return {connectedStub, disconnectedStub, activatedStub, deactivatedStub};
|
||||
};
|
||||
|
||||
const definition = new SandyPluginDefinition(
|
||||
const definition = new _SandyPluginDefinition(
|
||||
TestUtils.createMockPluginDetails(),
|
||||
{
|
||||
plugin,
|
||||
@@ -480,7 +480,7 @@ test('PluginContainer + Sandy plugin supports deeplink', async () => {
|
||||
};
|
||||
};
|
||||
|
||||
const definition = new SandyPluginDefinition(
|
||||
const definition = new _SandyPluginDefinition(
|
||||
TestUtils.createMockPluginDetails(),
|
||||
{
|
||||
plugin,
|
||||
@@ -636,7 +636,7 @@ test('PluginContainer can render Sandy device plugins', async () => {
|
||||
return {activatedStub, deactivatedStub, lastLogMessage};
|
||||
};
|
||||
|
||||
const definition = new SandyPluginDefinition(
|
||||
const definition = new _SandyPluginDefinition(
|
||||
TestUtils.createMockPluginDetails(),
|
||||
{
|
||||
supportsDevice: () => true,
|
||||
@@ -750,7 +750,7 @@ test('PluginContainer + Sandy device plugin supports deeplink', async () => {
|
||||
};
|
||||
};
|
||||
|
||||
const definition = new SandyPluginDefinition(
|
||||
const definition = new _SandyPluginDefinition(
|
||||
TestUtils.createMockPluginDetails(),
|
||||
{
|
||||
devicePlugin,
|
||||
|
||||
Reference in New Issue
Block a user