Move Static Fields to package.json: kaios-allocations
Summary: Flipper reads metadata to show on the sidebar from `package.json` and static fields (`id`, `title`, and `icon`) from `FlipperPlugin` class. If there are fields declared in both file, `FlipperPlugin` class takes precedences. With Sandy (new Flipper plugin API), there is no static field available. In order to prevent unexpected scenario happening when migrating to Sandy, this codemod-ish is applied to plugins that contain static field. The static fields are merged into `package.json` to get the same result. In addition, the static fields are also removed. Reviewed By: eleweek Differential Revision: D22411839 fbshipit-source-id: efce530bb25def9a10ba8d85c48b31ee8657daa7
This commit is contained in:
committed by
Facebook GitHub Bot
parent
f7e7131a7b
commit
288feafb25
@@ -184,8 +184,6 @@ export default class AllocationsPlugin extends FlipperDevicePlugin<
|
||||
minAllocationSizeInTable: getMinAllocationSizeFromLocalStorage(),
|
||||
};
|
||||
|
||||
static id = 'kaios-big-allocations';
|
||||
|
||||
static supportsDevice(device: Device) {
|
||||
return device instanceof KaiOSDevice;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://fbflipper.com/schemas/plugin-package/v2.json",
|
||||
"name": "flipper-plugin-kaios-big-allocations",
|
||||
"id": "flipper-plugin-kaios-big-allocations",
|
||||
"id": "kaios-big-allocations",
|
||||
"version": "0.49.0",
|
||||
"main": "dist/bundle.js",
|
||||
"flipperBundlerEntry": "index.tsx",
|
||||
|
||||
Reference in New Issue
Block a user