diff --git a/lib/org/members.js b/lib/org/members.js index a6efa3a..2789500 100644 --- a/lib/org/members.js +++ b/lib/org/members.js @@ -36,8 +36,8 @@ export async function members(ctx) { owners.includes(human.github) || human.npm === npmTokenOwner ? 'owner' : admins.includes(human.github) - ? 'admin' - : 'member' + ? 'admin' + : 'member' })) const response = await fetch( diff --git a/lib/util/find.js b/lib/util/find.js index 72f96f7..ad8d96e 100644 --- a/lib/util/find.js +++ b/lib/util/find.js @@ -26,18 +26,29 @@ export function find(ctx, expression) { function expand(role) { switch (role) { - case 'contributor': + case 'contributor': { return [role, 'member'] - case 'merger': + } + + case 'merger': { return [role, 'maintainer', 'member'] - case 'releaser': + } + + case 'releaser': { return [role, 'maintainer', 'member'] - case 'maintainer': + } + + case 'maintainer': { return ['merger', 'releaser', role, 'member'] - case 'member': + } + + case 'member': { return ['contributor', 'merger', 'releaser', 'maintainer', role] - default: + } + + default: { throw new Error('Unknown role `' + role + '`') + } } } diff --git a/package.json b/package.json index d8cad6d..d523c57 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "index.js" ], "dependencies": { - "@octokit/graphql": "^4.0.0", + "@octokit/graphql": "^7.0.0", "chalk": "^5.0.0", "dlv": "^1.0.0", "js-yaml": "^4.0.0", @@ -28,15 +28,15 @@ "trough": "^2.0.0" }, "devDependencies": { - "prettier": "^2.0.0", + "prettier": "^3.0.0", "remark-cli": "^10.0.0", "remark-preset-wooorm": "^9.0.0", - "xo": "^0.50.0" + "xo": "^0.56.0" }, "scripts": { "start": "node .", "crawl": "node script/crawl", - "format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix", + "format": "remark . -qfo && prettier . -w --log-level warn && xo --fix", "test": "npm run crawl && npm run format" }, "prettier": { @@ -52,9 +52,11 @@ "rules": { "no-await-in-loop": "off", "unicorn/no-reduce": "off", + "unicorn/prefer-at": "off", "unicorn/prefer-number-properties": "off", "unicorn/prefer-optional-catch-binding": "off", "unicorn/prefer-set-has": "off", + "unicorn/prefer-string-replace-all": "off", "unicorn/string-content": "off" } },