From ce0778d5354e5cfec05c33927807fa2a735f124e Mon Sep 17 00:00:00 2001 From: vivek Date: Wed, 20 May 2026 10:20:21 +0530 Subject: [PATCH 1/2] feat: sort snapshot tags alphabetically in listSnapshots(). Closes #6 --- src/storage/snapshotStore.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/storage/snapshotStore.js b/src/storage/snapshotStore.js index 0af020d..1a45178 100644 --- a/src/storage/snapshotStore.js +++ b/src/storage/snapshotStore.js @@ -26,5 +26,6 @@ export function listSnapshots() { return fs .readdirSync(SNAP_DIR) .filter((f) => f.endsWith(".json")) - .map((f) => f.replace(".json", "")); + .map((f) => f.replace(".json", "")) + .sort(); } From 9472fc14ed792be76cf40c32de7b51e9f1ee80f0 Mon Sep 17 00:00:00 2001 From: vivek Date: Fri, 22 May 2026 10:27:43 +0530 Subject: [PATCH 2/2] fix: sanitize listSnapshots tag extraction regex --- src/storage/snapshotStore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/storage/snapshotStore.js b/src/storage/snapshotStore.js index 1a45178..b04c95f 100644 --- a/src/storage/snapshotStore.js +++ b/src/storage/snapshotStore.js @@ -26,6 +26,6 @@ export function listSnapshots() { return fs .readdirSync(SNAP_DIR) .filter((f) => f.endsWith(".json")) - .map((f) => f.replace(".json", "")) + .map((f) => f.replace(/\.json$/, "")) .sort(); }