Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: npm/cli
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: c60ce69c73f6b915e540e46d0c68cf45f221d3f3
Choose a base ref
..
head repository: npm/cli
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: bf91855bbe5c35b833fdb87127c7256e69dab5b7
Choose a head ref
Showing with 8 additions and 5 deletions.
  1. +8 −5 lib/commands/owner.js
13 changes: 8 additions & 5 deletions lib/commands/owner.js
Original file line number Diff line number Diff line change
@@ -95,16 +95,20 @@ class Owner extends BaseCommand {
}
return this.exec([action, ...args])
}

for (const [name] of this.workspaces) {
switch (action) {
case 'ls':
case 'list':
return this.ls(name)
await this.ls(name)
break
case 'add':
return this.changeOwners(args[0], name, 'add')
await this.changeOwners(args[0], name, 'add')
break
case 'rm':
case 'remove':
return this.changeOwners(args[0], name, 'rm')
await this.changeOwners(args[0], name, 'rm')
break
default:
throw this.usageError()
}
@@ -117,8 +121,7 @@ class Owner extends BaseCommand {

try {
const packumentOpts = { ...this.npm.flatOptions, fullMetadata: true, preferOnline: true }
const packument = await pacote.packument(spec, packumentOpts)
const { maintainers } = packument
const { maintainers } = await pacote.packument(spec, packumentOpts)
if (!maintainers || !maintainers.length) {
this.npm.output('no admin found')
} else {