small review fixes for plugin info
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -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>;
|
||||
|
||||
Reference in New Issue
Block a user