File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -70,9 +70,8 @@ export function usePackage(name: MaybeRefOrGetter<string>) {
7070 const registry = useNpmRegistry ( )
7171
7272 return useAsyncData (
73- `package:${ toValue ( name ) } ` ,
73+ ( ) => `package:${ toValue ( name ) } ` ,
7474 ( ) => registry . fetchPackage ( toValue ( name ) ) ,
75- { watch : [ ( ) => toValue ( name ) ] } ,
7675 )
7776}
7877
@@ -83,9 +82,8 @@ export function usePackageDownloads(
8382 const registry = useNpmRegistry ( )
8483
8584 return useAsyncData (
86- `downloads:${ toValue ( name ) } :${ toValue ( period ) } ` ,
85+ ( ) => `downloads:${ toValue ( name ) } :${ toValue ( period ) } ` ,
8786 ( ) => registry . fetchDownloads ( toValue ( name ) , toValue ( period ) ) ,
88- { watch : [ ( ) => toValue ( name ) , ( ) => toValue ( period ) ] } ,
8987 )
9088}
9189
@@ -110,8 +108,6 @@ export function useNpmSearch(
110108 }
111109 return lastSearch = await registry . searchPackages ( q , toValue ( options ) )
112110 } ,
113- {
114- default : ( ) => lastSearch || emptySearchResponse ,
115- } ,
111+ { default : ( ) => lastSearch || emptySearchResponse } ,
116112 )
117113}
You can’t perform that action at this time.
0 commit comments