Skip to content

Commit 38718a6

Browse files
committed
fix: show correct install size for native packages
1 parent efcdbac commit 38718a6

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

app/pages/package/[[org]]/[name].vue

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,8 @@ const likeAction = async () => {
495495
}
496496
}
497497
498+
const dependencyCount = getDependencyCount(displayVersion.value)
499+
498500
const numberFormatter = useNumberFormatter()
499501
const compactNumberFormatter = useCompactNumberFormatter()
500502
const bytesFormatter = useBytesFormatter()
@@ -842,11 +844,11 @@ onKeyStroke(
842844
<span class="flex items-center gap-1">
843845
<!-- Direct deps (muted) -->
844846
<span class="text-fg-muted">{{
845-
numberFormatter.format(getDependencyCount(displayVersion))
847+
numberFormatter.format(dependencyCount)
846848
}}</span>
847849

848850
<!-- Separator and total transitive deps -->
849-
<template v-if="getDependencyCount(displayVersion) !== totalDepsCount">
851+
<template v-if="dependencyCount > 0 && dependencyCount !== totalDepsCount">
850852
<span class="text-fg-subtle">/</span>
851853

852854
<ClientOnly>
@@ -872,7 +874,7 @@ onKeyStroke(
872874
</ClientOnly>
873875
</template>
874876
</span>
875-
<ButtonGroup v-if="getDependencyCount(displayVersion) > 0">
877+
<ButtonGroup v-if="dependencyCount > 0">
876878
<LinkBase
877879
variant="button-secondary"
878880
size="small"
@@ -918,7 +920,7 @@ onKeyStroke(
918920
</span>
919921

920922
<!-- Separator and install size -->
921-
<template v-if="getDependencyCount(displayVersion) > 0">
923+
<template v-if="displayVersion?.dist.unpackedSize !== installSize?.totalSize">
922924
<span class="text-fg-subtle mx-1">/</span>
923925

924926
<span

0 commit comments

Comments
 (0)