Skip to content

Commit

Permalink
chore: Update get-unowned-packages script to use npm 9 syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
LekoArts authored and pieh committed Mar 29, 2023
1 parent dcf88ed commit 3f8477d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/get-unowned-packages/index.js
Expand Up @@ -8,7 +8,8 @@ const { exec, execSync } = require(`child_process`)
const execP = util.promisify(exec)

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

0 comments on commit 3f8477d

Please sign in to comment.