Tweak lowecasing, export Optios type

Signed-off-by: Jussi Hallila <jussi@hallila.com>
This commit is contained in:
Jussi Hallila
2021-09-15 15:31:03 +02:00
parent 65a2d67735
commit 9fb0503c15
4 changed files with 17 additions and 5 deletions
+12 -2
View File
@@ -25,8 +25,6 @@ export function createRouter(options: RouterOptions): Promise<express.Router>;
//
// @public (undocumented)
export class DefaultTechDocsCollator implements DocumentCollator {
// Warning: (ae-forgotten-export) The symbol "TechDocsCollatorOptions" needs to be exported by the entry point index.d.ts
//
// @deprecated
constructor({
discovery,
@@ -56,6 +54,18 @@ export class DefaultTechDocsCollator implements DocumentCollator {
readonly type: string;
}
// Warning: (ae-missing-release-tag) "TechDocsCollatorOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type TechDocsCollatorOptions = {
discovery: PluginEndpointDiscovery;
logger: Logger_2;
locationTemplate?: string;
catalogClient?: CatalogApi;
parallelismLimit?: number;
legacyPathCasing?: boolean;
};
export { TechDocsDocument };
export * from '@backstage/techdocs-common';
@@ -31,7 +31,7 @@ interface MkSearchIndexDoc {
location: string;
}
type TechDocsCollatorOptions = {
export type TechDocsCollatorOptions = {
discovery: PluginEndpointDiscovery;
logger: Logger;
locationTemplate?: string;
@@ -173,7 +173,7 @@ export class DefaultTechDocsCollator implements DocumentCollator {
return legacyPaths
? entityInfo
: Object.entries(entityInfo).reduce((acc, [key, value]) => {
return { ...acc, [key]: value.toLowerCase() };
return { ...acc, [key]: value.toLocaleLowerCase('en-US') };
}, {} as EntityInfo);
}
}
@@ -15,6 +15,8 @@
*/
export { DefaultTechDocsCollator } from './DefaultTechDocsCollator';
export type { TechDocsCollatorOptions } from './DefaultTechDocsCollator';
/**
* @deprecated Use directly from @backstage/techdocs-common
*/
@@ -61,7 +61,7 @@ export const buildInitialFilters = (
return legacyPaths
? entityId
: Object.entries(entityId).reduce((acc, [key, value]) => {
return { ...acc, [key]: value.toLowerCase() };
return { ...acc, [key]: value.toLocaleLowerCase('en-US') };
}, {});
};