Skip to content
This repository was archived by the owner on May 15, 2026. It is now read-only.

Commit 1ee2ac9

Browse files
committed
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.
1 parent b19ab45 commit 1ee2ac9

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

src/utils/__tests__/task-storage-size.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { calculateTaskStorageSize, formatBytes } from "../task-storage-size"
1+
import { calculateTaskStorageSize } from "../task-storage-size"
2+
import { formatBytes } from "../formatBytes"
23

34
// Mock storage to avoid VS Code config access during tests
45
vi.mock("../storage", () => ({
@@ -12,7 +13,6 @@ vi.mock("fs/promises", () => ({
1213
readdir: (...args: unknown[]) => mockReaddir(...args),
1314
}))
1415

15-
// formatBytes is still exported for backwards compatibility but not used by calculateTaskStorageSize
1616
describe("formatBytes", () => {
1717
it("should format 0 bytes", () => {
1818
expect(formatBytes(0)).toBe("0 B")

src/utils/task-storage-size.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import * as path from "path"
22
import * as fs from "fs/promises"
33

44
import { getStorageBasePath } from "./storage"
5-
import { formatBytes } from "./formatBytes"
65

76
/**
87
* Result of counting task history items.
@@ -14,9 +13,6 @@ export interface TaskStorageSizeResult {
1413
taskCount: number
1514
}
1615

17-
// Re-export for backwards compatibility with existing imports/tests.
18-
export { formatBytes }
19-
2016
/**
2117
* Counts the number of task directories in task history storage.
2218
*

0 commit comments

Comments
 (0)