Skip to content

Commit f66da2e

Browse files
authored
fix(owner): bypass cache when fetching packument (#4565)
1 parent 301e511 commit f66da2e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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)