fix: remove misleading maxAge argument to pMemoize (#10620)

This commit is contained in:
Brandon Cheng
2026-02-15 16:07:29 -05:00
committed by GitHub
parent 7d5ada0701
commit 0e9c559068
2 changed files with 5 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
---
"@pnpm/npm-resolver": patch
---
An internal refactor was performed to remove a misleading usage of `pMemoize`. Previously the `maxAge` argument was passed, but this field is ignored by the `p-memoize` NPM package.

View File

@@ -173,7 +173,6 @@ export function createNpmResolver (
}
const fetch = pMemoize(fetchMetadataFromFromRegistry.bind(null, fetchOpts), {
cacheKey: (...args) => JSON.stringify(args),
maxAge: 1000 * 20, // 20 seconds
})
const metaCache = new LRUCache<string, PackageMeta>({
max: 10000,