Skip to content

Commit 9c8ddc9

Browse files
committed
fix(owner): bypass cache when fetching packument
1 parent f66290e commit 9c8ddc9

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

lib/commands/owner.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class Owner extends BaseCommand {
7878
const spec = npa(pkg)
7979

8080
try {
81-
const packumentOpts = { ...this.npm.flatOptions, fullMetadata: true }
81+
const packumentOpts = { ...this.npm.flatOptions, fullMetadata: true, preferOnline: true }
8282
const { maintainers } = await pacote.packument(spec, packumentOpts)
8383
if (!maintainers || !maintainers.length) {
8484
this.npm.output('no admin found')
@@ -137,7 +137,11 @@ class Owner extends BaseCommand {
137137
// normalize user data
138138
u = { name: u.name, email: u.email }
139139

140-
const data = await pacote.packument(spec, { ...this.npm.flatOptions, fullMetadata: true })
140+
const data = await pacote.packument(spec, {
141+
...this.npm.flatOptions,
142+
fullMetadata: true,
143+
preferOnline: true
144+
})
141145

142146
const owners = data.maintainers || []
143147
let maintainers

0 commit comments

Comments
 (0)