[READ-ONLY] a fast, modern browser for the npm registry
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: show correct install size for native packages (#1357)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

authored by

Roman
autofix-ci[bot]
and committed by
GitHub
bb234a14 06dc9df4

+6 -6
+6 -6
app/pages/package/[[org]]/[name].vue
··· 495 495 } 496 496 } 497 497 498 + const dependencyCount = computed(() => getDependencyCount(displayVersion.value)) 499 + 498 500 const numberFormatter = useNumberFormatter() 499 501 const compactNumberFormatter = useCompactNumberFormatter() 500 502 const bytesFormatter = useBytesFormatter() ··· 855 857 <dd class="font-mono text-sm text-fg flex items-center justify-start gap-2"> 856 858 <span class="flex items-center gap-1"> 857 859 <!-- 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> 861 861 862 862 <!-- Separator and total transitive deps --> 863 - <template v-if="getDependencyCount(displayVersion) !== totalDepsCount"> 863 + <template v-if="dependencyCount > 0 && dependencyCount !== totalDepsCount"> 864 864 <span class="text-fg-subtle">/</span> 865 865 866 866 <ClientOnly> ··· 886 886 </ClientOnly> 887 887 </template> 888 888 </span> 889 - <ButtonGroup v-if="getDependencyCount(displayVersion) > 0"> 889 + <ButtonGroup v-if="dependencyCount > 0"> 890 890 <LinkBase 891 891 variant="button-secondary" 892 892 size="small" ··· 932 932 </span> 933 933 934 934 <!-- Separator and install size --> 935 - <template v-if="getDependencyCount(displayVersion) > 0"> 935 + <template v-if="displayVersion?.dist?.unpackedSize !== installSize?.totalSize"> 936 936 <span class="text-fg-subtle mx-1">/</span> 937 937 938 938 <span