We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 03c706f commit 2fcea56Copy full SHA for 2fcea56
1 file changed
app/composables/useNpmRegistry.ts
@@ -31,20 +31,6 @@ export function encodePackageName(name: string): string {
31
return encodeURIComponent(name)
32
}
33
34
-/**
35
- * Fetch a package's packument with caching (returns null on error).
36
- * This is useful for batch operations where some packages might not exist.
37
- */
38
-export async function fetchCachedPackument(name: string): Promise<Packument | null> {
39
- const cached = packumentCache.get(name)
40
- if (cached) return cached
41
-
42
- const encodedName = encodePackageName(name)
43
- const promise = $fetch<Packument>(`${NPM_REGISTRY}/${encodedName}`).catch(() => null)
44
- packumentCache.set(name, promise)
45
- return promise
46
-}
47
48
/** Number of recent versions to include in initial payload */
49
const RECENT_VERSIONS_COUNT = 5
50
0 commit comments