* Fetch packument with caching (returns null on error for tree traversal). * Delegates to fetchNpmPackage() to share a single cache for all packument fetches.
(name: string)
| 19 | * Delegates to fetchNpmPackage() to share a single cache for all packument fetches. |
| 20 | */ |
| 21 | async function fetchPackument(name: string): Promise<Packument | null> { |
| 22 | try { |
| 23 | return await fetchNpmPackage(name) |
| 24 | } catch (error) { |
| 25 | if (import.meta.dev) { |
| 26 | // oxlint-disable-next-line no-console -- log npm registry failures for debugging |
| 27 | console.warn(`[dep-resolver] Failed to fetch packument for ${name}:`, error) |
| 28 | } |
| 29 | return null |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | /** |
| 34 | * Check if a package version matches the target platform. |
no outgoing calls
no test coverage detected