Read flipper-plugin from peer deps
Summary: To know whether plugins should be mounted with the old setup or new setup (with a Provided / context based api), we need to be able to recognize whether a plugin is written with the old or new setup. We do this by checking if the flipper-plugin dependency is declared as peer dependency. This we can to check for SDK compatibility as well. Reviewed By: jknoxville Differential Revision: D22043085 fbshipit-source-id: 21afabb6e58d86253a464470f4690c51cced87ab
This commit is contained in:
committed by
Facebook GitHub Bot
parent
2383dc85f8
commit
845c9b67f5
@@ -58,6 +58,7 @@ async function getPluginDetailsV1(
|
||||
description: packageJson.description,
|
||||
category: packageJson.category,
|
||||
bugs: packageJson.bugs,
|
||||
flipperSDKVersion: packageJson?.peerDependencies?.['flipper-plugin'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -83,6 +84,7 @@ async function getPluginDetailsV2(
|
||||
description: packageJson.description,
|
||||
category: packageJson.category,
|
||||
bugs: packageJson.bugs,
|
||||
flipperSDKVersion: packageJson?.peerDependencies?.['flipper-plugin'],
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user