Skip to content

Commit efcfb46

Browse files
committed
chore: check package hook
1 parent d67ac0c commit efcfb46

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

app/composables/npm/usePackage.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ export function usePackage(
156156
const asyncData = useLazyAsyncData(
157157
() => `package:${toValue(name)}:${toValue(requestedVersion) ?? ''}`,
158158
async ({ $npmRegistry }, { signal }) => {
159+
console.log('fetching package')
159160
const encodedName = encodePackageName(toValue(name))
160161
const { data: r, isStale } = await $npmRegistry<Packument>(`/${encodedName}`, {
161162
signal,
@@ -168,6 +169,7 @@ export function usePackage(
168169

169170
if (import.meta.client && asyncData.data.value?.isStale) {
170171
onMounted(() => {
172+
console.log('refreshing package on mount')
171173
asyncData.refresh()
172174
})
173175
}

0 commit comments

Comments
 (0)