Skip to content

Commit

Permalink
fix(owner): bypass cache when fetching packument (#4565)
Browse files Browse the repository at this point in the history
  • Loading branch information
wraithgar authored Mar 15, 2022
1 parent 301e511 commit f66da2e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/commands/owner.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f66da2e

Please sign in to comment.