File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ function encodePackageName(name: string): string {
6969export function usePackage ( name : MaybeRefOrGetter < string > ) {
7070 const registry = useNpmRegistry ( )
7171
72- return useAsyncData (
72+ return useLazyAsyncData (
7373 ( ) => `package:${ toValue ( name ) } ` ,
7474 ( ) => registry . fetchPackage ( toValue ( name ) ) ,
7575 )
@@ -81,7 +81,7 @@ export function usePackageDownloads(
8181) {
8282 const registry = useNpmRegistry ( )
8383
84- return useAsyncData (
84+ return useLazyAsyncData (
8585 ( ) => `downloads:${ toValue ( name ) } :${ toValue ( period ) } ` ,
8686 ( ) => registry . fetchDownloads ( toValue ( name ) , toValue ( period ) ) ,
8787 )
@@ -99,7 +99,7 @@ export function useNpmSearch(
9999 const registry = useNpmRegistry ( )
100100 let lastSearch : NpmSearchResponse | undefined = undefined
101101
102- return useAsyncData (
102+ return useLazyAsyncData (
103103 ( ) => `search:${ toValue ( query ) } :${ JSON . stringify ( toValue ( options ) ) } ` ,
104104 async ( ) => {
105105 const q = toValue ( query )
You can’t perform that action at this time.
0 commit comments