From 846e880878d6260e311d81d40c1c4d11ef8c92a9 Mon Sep 17 00:00:00 2001 From: Cedric van Putten Date: Wed, 27 Mar 2024 15:22:50 +0100 Subject: [PATCH] refactor: use url-safe ids for `MetroGraphSource` --- 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,