diff --git a/lib/datasource/npm.js b/lib/datasource/npm.js index 317d90f4cc89d2203cbdc48d9a8e0b5778e7d3f7..e18dcc74a201e89fe6c7d7203a75961f3b1a61bc 100644 --- a/lib/datasource/npm.js +++ b/lib/datasource/npm.js @@ -165,8 +165,11 @@ async function getDependency(name, retries = 5) { // Retrieve from API if not cached try { + // TODO: cache scoped packages once npmjs cache time is fixed for scoped packages + // Ref: https://npm.community/t/scoped-packages-have-latest-version-disappear-temporarily-soon-after-publish/633/7 + const useCache = !(process.env.RENOVATE_SKIP_CACHE || name.startsWith('@')); const raw = await got(pkgUrl, { - cache: process.env.RENOVATE_SKIP_CACHE ? undefined : map, + cache: useCache ? map : undefined, json: true, retries: 5, headers,