Fix search by passing query to search request (#2377)
Summary: When publishing a new flipper plugin, I realized my plugin wasn't showing up in the Plugin Installer search. This was due to a bug where we are only grabbing 50 plugins from NPM and filtering through them locally, instead of passing the search term to the search query. There are 59 plugins that match the keyword filter on npm so 9 plugins never get surfaced. ## Changelog Fix missing plugins in plugin manager's NPM search Pull Request resolved: https://github.com/facebook/flipper/pull/2377 Test Plan: Test the search feature in Plugin Manager Search for the previously missing package:  Previously working searches continue to work:  Reviewed By: nikoant Differential Revision: D28831054 Pulled By: passy fbshipit-source-id: 84442459cd760c3f593b3df5bb3d89d51852e1c4
This commit is contained in:
committed by
Facebook GitHub Bot
parent
b0b49e1098
commit
80feff1615
@@ -35,7 +35,7 @@ export async function getUpdatablePlugins(
|
||||
): Promise<UpdatablePluginDetails[]> {
|
||||
const installedPlugins = await getInstalledPlugins();
|
||||
const npmHostedPlugins = new Map<string, NpmPackageDescriptor>(
|
||||
(await getNpmHostedPlugins()).map((p) => [p.name, p]),
|
||||
(await getNpmHostedPlugins({query})).map((p) => [p.name, p]),
|
||||
);
|
||||
const annotatedInstalledPlugins = await pmap(
|
||||
installedPlugins,
|
||||
|
||||
Reference in New Issue
Block a user