Skip to content

Commit bb234a1

Browse files
fix: show correct install size for native packages (#1357)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent 06dc9df commit bb234a1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,8 @@ const likeAction = async () => {
495495
}
496496
}
497497
498+
const dependencyCount = computed(() => getDependencyCount(displayVersion.value))
499+
498500
const numberFormatter = useNumberFormatter()
499501
const compactNumberFormatter = useCompactNumberFormatter()
500502
const bytesFormatter = useBytesFormatter()
@@ -855,12 +857,10 @@ const showSkeleton = shallowRef(false)
855857
<dd class="font-mono text-sm text-fg flex items-center justify-start gap-2">
856858
<span class="flex items-center gap-1">
857859
<!-- Direct deps (muted) -->
858-
<span class="text-fg-muted">{{
859-
numberFormatter.format(getDependencyCount(displayVersion))
860-
}}</span>
860+
<span class="text-fg-muted">{{ numberFormatter.format(dependencyCount) }}</span>
861861

862862
<!-- Separator and total transitive deps -->
863-
<template v-if="getDependencyCount(displayVersion) !== totalDepsCount">
863+
<template v-if="dependencyCount > 0 && dependencyCount !== totalDepsCount">
864864
<span class="text-fg-subtle">/</span>
865865

866866
<ClientOnly>
@@ -886,7 +886,7 @@ const showSkeleton = shallowRef(false)
886886
</ClientOnly>
887887
</template>
888888
</span>
889-
<ButtonGroup v-if="getDependencyCount(displayVersion) > 0">
889+
<ButtonGroup v-if="dependencyCount > 0">
890890
<LinkBase
891891
variant="button-secondary"
892892
size="small"
@@ -932,7 +932,7 @@ const showSkeleton = shallowRef(false)
932932
</span>
933933

934934
<!-- Separator and install size -->
935-
<template v-if="getDependencyCount(displayVersion) > 0">
935+
<template v-if="displayVersion?.dist?.unpackedSize !== installSize?.totalSize">
936936
<span class="text-fg-subtle mx-1">/</span>
937937

938938
<span

0 commit comments

Comments
 (0)