small review fixes for plugin info

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2025-05-15 17:31:53 +02:00
parent 363e515d59
commit 350011ce97
3 changed files with 3 additions and 5 deletions
@@ -121,7 +121,7 @@ describe('createPluginInfoAttacher', () => {
},
{
title: 'Repository',
url: 'https://github.com/test/project/tree/master/packages/test',
url: 'https://github.com/test/project/tree/-/packages/test',
},
],
});
@@ -210,7 +210,7 @@ function resolvePackageInfo(packageJson?: JsonObject) {
url.hostname === 'github.com' &&
typeof packageJson.repository.directory === 'string'
) {
const path = `${url.pathname}/tree/master/${packageJson.repository.directory}`;
const path = `${url.pathname}/tree/-/${packageJson.repository.directory}`;
url.pathname = path.replaceAll('//', '/');
}
@@ -109,9 +109,7 @@ export interface FrontendPlugin<
extensions: Array<ExtensionDefinition>;
/**
* Overrides to merge with the original plugin info. The merging is done for
* each top-level field. Setting a field explicitly to `undefined` will
* remove it.
* Overrides the original info loaders of the plugin one by one.
*/
info?: FrontendPluginInfoOptions;
}): FrontendPlugin<TRoutes, TExternalRoutes, TExtensionMap>;