Skip to content

Commit 2fcea56

Browse files
committed
fix: remove unused function
1 parent 03c706f commit 2fcea56

1 file changed

Lines changed: 0 additions & 14 deletions

File tree

app/composables/useNpmRegistry.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,6 @@ export function encodePackageName(name: string): string {
3131
return encodeURIComponent(name)
3232
}
3333

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-
4834
/** Number of recent versions to include in initial payload */
4935
const RECENT_VERSIONS_COUNT = 5
5036

0 commit comments

Comments
 (0)