From 365c6093091bc8b734fb1b22198a70bc42bad992 Mon Sep 17 00:00:00 2001 From: Gar Date: Tue, 15 Mar 2022 07:41:35 -0700 Subject: [PATCH] fix(owner): bypass cache when fetching packument --- lib/commands/owner.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/commands/owner.js b/lib/commands/owner.js index ceff5513afe64..e74efac1baf6a 100644 --- a/lib/commands/owner.js +++ b/lib/commands/owner.js @@ -78,7 +78,7 @@ class Owner extends BaseCommand { const spec = npa(pkg) try { - const packumentOpts = { ...this.npm.flatOptions, fullMetadata: true } + const packumentOpts = { ...this.npm.flatOptions, fullMetadata: true, preferOnline: true } const { maintainers } = await pacote.packument(spec, packumentOpts) if (!maintainers || !maintainers.length) { this.npm.output('no admin found') @@ -137,7 +137,11 @@ class Owner extends BaseCommand { // normalize user data u = { name: u.name, email: u.email } - const data = await pacote.packument(spec, { ...this.npm.flatOptions, fullMetadata: true }) + const data = await pacote.packument(spec, { + ...this.npm.flatOptions, + fullMetadata: true, + preferOnline: true, + }) const owners = data.maintainers || [] let maintainers