Remove plugin bundling

Summary: Remove the notion of bundled plugins

Reviewed By: lblasa

Differential Revision: D39308888

fbshipit-source-id: aa88ddbf2801ad1da95f89e4c761259b697b0d66
This commit is contained in:
Andrey Goncharov
2022-09-15 10:02:19 -07:00
committed by Facebook GitHub Bot
parent f835e07c46
commit 650ff4bcfb
35 changed files with 39 additions and 284 deletions

View File

@@ -12,12 +12,7 @@ import {loadServerAddOn} from '../loadServerAddOn';
import {PluginManager} from '../PluginManager';
import {ServerAddOnManager} from '../ServerAddManager';
import {ServerAddOnModuleToDesktopConnection} from '../ServerAddOnModuleToDesktopConnection';
import {
detailsBundled,
detailsInstalled,
initialOwner,
pluginName,
} from './utils';
import {detailsInstalled, initialOwner, pluginName} from './utils';
jest.mock('../loadServerAddOn');
const loadServerAddOnMock = loadServerAddOn as jest.Mock;
@@ -70,10 +65,7 @@ describe('PluginManager', () => {
};
};
describe.each([
['bundled', detailsBundled],
['installed', detailsInstalled],
])('%s', (_name, details) => {
describe.each([['installed', detailsInstalled]])('%s', (_name, details) => {
test('stops the add-on when the initial owner is removed', async () => {
const {pluginManager, addOnCleanupMock} = await startServerAddOn(
details,

View File

@@ -11,12 +11,7 @@ import {ServerAddOnStartDetails, createControlledPromise} from 'flipper-common';
import {loadServerAddOn} from '../loadServerAddOn';
import {ServerAddOn} from '../ServerAddOn';
import {ServerAddOnModuleToDesktopConnection} from '../ServerAddOnModuleToDesktopConnection';
import {
detailsBundled,
detailsInstalled,
initialOwner,
pluginName,
} from './utils';
import {detailsInstalled, initialOwner, pluginName} from './utils';
jest.mock('../loadServerAddOn');
const loadServerAddOnMock = loadServerAddOn as jest.Mock;
@@ -67,10 +62,7 @@ describe('ServerAddOn', () => {
};
};
describe.each([
['bundled', detailsBundled],
['installed', detailsInstalled],
])('%s', (_name, details) => {
describe.each([['installed', detailsInstalled]])('%s', (_name, details) => {
test('stops the add-on when the initial owner is removed', async () => {
const {serverAddOn, addOnCleanupMock} = await startServerAddOn(details);

View File

@@ -11,9 +11,6 @@ import {ServerAddOnStartDetails} from 'flipper-common';
export const pluginName = 'lightSaber';
export const initialOwner = 'yoda';
export const detailsBundled: ServerAddOnStartDetails = {
isBundled: true,
};
export const detailsInstalled: ServerAddOnStartDetails = {
path: '/dagobar/',
};

View File

@@ -26,13 +26,6 @@ export function isPluginVersionMoreRecent(
if (semver.gt(versionDetails.version, otherVersionDetails.version)) {
return true;
}
if (
semver.eq(versionDetails.version, otherVersionDetails.version) &&
versionDetails.isBundled
) {
// prefer bundled versions
return true;
}
if (
semver.eq(versionDetails.version, otherVersionDetails.version) &&
versionDetails.isActivatable &&