Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions app/pages/package/[[org]]/[name].vue
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,8 @@ const likeAction = async () => {
}
}

const dependencyCount = computed(() => getDependencyCount(displayVersion.value))

const numberFormatter = useNumberFormatter()
const compactNumberFormatter = useCompactNumberFormatter()
const bytesFormatter = useBytesFormatter()
Expand Down Expand Up @@ -841,12 +843,10 @@ onKeyStroke(
<dd class="font-mono text-sm text-fg flex items-center justify-start gap-2">
<span class="flex items-center gap-1">
<!-- Direct deps (muted) -->
<span class="text-fg-muted">{{
numberFormatter.format(getDependencyCount(displayVersion))
}}</span>
<span class="text-fg-muted">{{ numberFormatter.format(dependencyCount) }}</span>

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

<ClientOnly>
Expand All @@ -872,7 +872,7 @@ onKeyStroke(
</ClientOnly>
</template>
</span>
<ButtonGroup v-if="getDependencyCount(displayVersion) > 0">
<ButtonGroup v-if="dependencyCount > 0">
<LinkBase
variant="button-secondary"
size="small"
Expand Down Expand Up @@ -918,7 +918,7 @@ onKeyStroke(
</span>

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

<span
Expand Down
Loading