From 1ee2ac9733e4572597dea424ed764eced63dc70b Mon Sep 17 00:00:00 2001 From: Hannes Rudolph Date: Mon, 26 Jan 2026 14:13:50 -0700 Subject: [PATCH] chore: remove unnecessary backwards compat re-export This PR was never merged, so no need for backwards compatibility. Import formatBytes directly from its source file. --- src/utils/__tests__/task-storage-size.spec.ts | 4 ++-- src/utils/task-storage-size.ts | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/utils/__tests__/task-storage-size.spec.ts b/src/utils/__tests__/task-storage-size.spec.ts index 5d1a346347..f13922138a 100644 --- a/src/utils/__tests__/task-storage-size.spec.ts +++ b/src/utils/__tests__/task-storage-size.spec.ts @@ -1,4 +1,5 @@ -import { calculateTaskStorageSize, formatBytes } from "../task-storage-size" +import { calculateTaskStorageSize } from "../task-storage-size" +import { formatBytes } from "../formatBytes" // Mock storage to avoid VS Code config access during tests vi.mock("../storage", () => ({ @@ -12,7 +13,6 @@ vi.mock("fs/promises", () => ({ readdir: (...args: unknown[]) => mockReaddir(...args), })) -// formatBytes is still exported for backwards compatibility but not used by calculateTaskStorageSize describe("formatBytes", () => { it("should format 0 bytes", () => { expect(formatBytes(0)).toBe("0 B") diff --git a/src/utils/task-storage-size.ts b/src/utils/task-storage-size.ts index 91544b5533..46423c234f 100644 --- a/src/utils/task-storage-size.ts +++ b/src/utils/task-storage-size.ts @@ -2,7 +2,6 @@ import * as path from "path" import * as fs from "fs/promises" import { getStorageBasePath } from "./storage" -import { formatBytes } from "./formatBytes" /** * Result of counting task history items. @@ -14,9 +13,6 @@ export interface TaskStorageSizeResult { taskCount: number } -// Re-export for backwards compatibility with existing imports/tests. -export { formatBytes } - /** * Counts the number of task directories in task history storage. *