From fcab1ba992999393ee5f37df915dd2fb65f5134a Mon Sep 17 00:00:00 2001 From: Cedric van Putten Date: Wed, 27 Mar 2024 15:37:35 +0100 Subject: [PATCH] refactor: use url-safe ids for `MetroGraphSource` (#17) --- src/data/MetroGraphSource.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/MetroGraphSource.ts b/src/data/MetroGraphSource.ts index 1fa2908..544a902 100644 --- a/src/data/MetroGraphSource.ts +++ b/src/data/MetroGraphSource.ts @@ -62,7 +62,7 @@ export function convertGraph(options: ConvertGraphToStatsOptions): StatsEntry { : transformOptions?.platform ?? 'unknown'; return { - id: `${options.entryPoint}+${platform}`, + id: Buffer.from(`${options.entryPoint}+${platform}`).toString('base64'), // FIX: only use URL allowed characters platform, projectRoot: options.projectRoot, entryPoint: options.entryPoint,