Skip to content

Commit 3f8477d

Browse files
LekoArtspieh
authored andcommitted
chore: Update get-unowned-packages script to use npm 9 syntax
1 parent dcf88ed commit 3f8477d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/get-unowned-packages/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ const { exec, execSync } = require(`child_process`)
88
const execP = util.promisify(exec)
99

1010
const getPackagesWithReadWriteAccess = async user => {
11-
const cmd = `npm access ls-packages ${user}`
11+
// Requires npm 9.0.0 or higher
12+
const cmd = `npm access list packages ${user} --json`
1213
const { stdout } = await execP(cmd)
1314
const permissions = JSON.parse(stdout)
1415
return Object.entries(permissions).reduce((lookup, [pkgName, access]) => {

0 commit comments

Comments
 (0)