mirror of
https://github.com/wu736139669/hapi.git
synced 2026-10-10 19:42:21 +00:00
fix(web): rename storageUsagePie helper to storageUsageSlices to avoid macOS case-collision with StorageUsagePie.tsx (#1483)
Since #1383 renamed the helper to storageUsagePie.ts, the same directory contained both StorageUsagePie.tsx and storageUsagePie.ts. On case-insensitive filesystems (macOS), extensionless imports of the component resolve to the helper because '.ts' is tried before '.tsx' and 'StorageUsagePie.ts' matches 'storageUsagePie.ts' case-insensitively, breaking typecheck and component tests on macOS. Linux CI is unaffected. Renames the helper (and its test) to storageUsageSlices.ts, which cannot collide, and updates the two importers. Fixes #1482.
This commit is contained in:
@@ -7,7 +7,7 @@ import {
|
||||
type StorageUsageBytes,
|
||||
type StorageUsageSlice,
|
||||
type StorageUsageSliceKey,
|
||||
} from '@/components/settings/storageUsagePie'
|
||||
} from '@/components/settings/storageUsageSlices'
|
||||
|
||||
const SLICE_FILL: Record<StorageUsageSliceKey, string> = {
|
||||
database: 'var(--app-link)',
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import {
|
||||
describeDonutArc,
|
||||
formatStoragePercent,
|
||||
polarToCartesian,
|
||||
} from './storageUsagePie'
|
||||
} from './storageUsageSlices'
|
||||
|
||||
describe('buildStorageUsageSlices', () => {
|
||||
it('drops zero-byte sidecars and returns empty when nothing has size', () => {
|
||||
Reference in New Issue
Block a user