From bcb6677e737af74481a28e4447273de28c83fdfc Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 13 Feb 2025 14:47:11 +0000 Subject: [PATCH 1/4] Update dependency prettier to v3 --- package-lock.json | 18 +++++++++--------- package.json | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 90ac04f..3df4a18 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,7 +27,7 @@ "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-unicorn": "^56.0.0", "jest": "^29.5.0", - "prettier": "2.8.8" + "prettier": "3.5.1" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -4968,15 +4968,15 @@ } }, "node_modules/prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.1.tgz", + "integrity": "sha512-hPpFQvHwL3Qv5AdRvBFMhnKo4tYxp0ReXiPn2bxkiohEX6mBeBwEpBSQTkD458RaaDKQMYSp4hX4UtfUTA5wDw==", "dev": true, "bin": { - "prettier": "bin-prettier.js" + "prettier": "bin/prettier.cjs" }, "engines": { - "node": ">=10.13.0" + "node": ">=14" }, "funding": { "url": "https://github.com/prettier/prettier?sponsor=1" @@ -9692,9 +9692,9 @@ "dev": true }, "prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.1.tgz", + "integrity": "sha512-hPpFQvHwL3Qv5AdRvBFMhnKo4tYxp0ReXiPn2bxkiohEX6mBeBwEpBSQTkD458RaaDKQMYSp4hX4UtfUTA5wDw==", "dev": true }, "prettier-linter-helpers": { diff --git a/package.json b/package.json index 1a11e6b..c402f8a 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-unicorn": "^56.0.0", "jest": "^29.5.0", - "prettier": "2.8.8" + "prettier": "3.5.1" }, "transform": {} } From cebb0dbb1a947d4e6a21712e4e0232c207363ac5 Mon Sep 17 00:00:00 2001 From: Tim Jacomb Date: Sat, 15 Feb 2025 22:22:10 +0000 Subject: [PATCH 2/4] Upgrade prettier --- app/command-enabled.js | 4 +- app/command-enabled.test.js | 24 +++---- app/commands/close-command.js | 6 +- app/commands/label-command.js | 6 +- app/commands/remove-label-command.js | 8 +-- app/commands/reopen-command.js | 4 +- app/commands/reviewer-command.js | 10 +-- app/commands/transfer-command.js | 6 +- app/comment-extractor.test.js | 12 ++-- app/converters.test.js | 12 ++-- app/github.js | 54 ++++++++-------- app/logger.js | 2 +- app/matchers.js | 2 +- app/matchers.test.js | 10 +-- app/router.js | 2 +- index.js | 2 +- package-lock.json | 94 ++++++++++++++++++++++++---- package.json | 2 +- 18 files changed, 165 insertions(+), 95 deletions(-) diff --git a/app/command-enabled.js b/app/command-enabled.js index 0e628ae..b1a7835 100644 --- a/app/command-enabled.js +++ b/app/command-enabled.js @@ -32,7 +32,7 @@ export function labelEnabled(config, labels) { return { enabled: false, error: `${labels} doesn't match the allowed labels \`${labelConfig.allowedLabels.join( - "," + ",", )}\``, }; } @@ -70,7 +70,7 @@ export function removeLabelEnabled(config, labels) { return { enabled: false, error: `${labels} doesn't match the allowed labels \`${labelConfig.allowedLabels.join( - "," + ",", )}\``, }; } diff --git a/app/command-enabled.test.js b/app/command-enabled.test.js index 93bdcad..22ef594 100644 --- a/app/command-enabled.test.js +++ b/app/command-enabled.test.js @@ -44,7 +44,7 @@ describe("command-enabled", () => { }, }, }, - ["label1"] + ["label1"], ); expect(sut.enabled).toEqual(true); @@ -59,7 +59,7 @@ describe("command-enabled", () => { }, }, }, - ["label1"] + ["label1"], ); expect(sut.enabled).toEqual(false); @@ -75,7 +75,7 @@ describe("command-enabled", () => { }, }, }, - ["label1"] + ["label1"], ); expect(sut.enabled).toEqual(true); @@ -90,7 +90,7 @@ describe("command-enabled", () => { }, }, }, - ["label4"] + ["label4"], ); expect(sut.enabled).toEqual(false); @@ -105,7 +105,7 @@ describe("command-enabled", () => { }, }, }, - ["label3", "label1", "label2"] + ["label3", "label1", "label2"], ); expect(sut.enabled).toEqual(true); @@ -120,7 +120,7 @@ describe("command-enabled", () => { }, }, }, - ["label2", "label1", "label5"] + ["label2", "label1", "label5"], ); expect(sut.enabled).toEqual(false); @@ -187,7 +187,7 @@ describe("command-enabled", () => { }, }, }, - ["label1"] + ["label1"], ); expect(sut.enabled).toEqual(true); @@ -202,7 +202,7 @@ describe("command-enabled", () => { }, }, }, - ["label1"] + ["label1"], ); expect(sut.enabled).toEqual(false); @@ -218,7 +218,7 @@ describe("command-enabled", () => { }, }, }, - ["label1"] + ["label1"], ); expect(sut.enabled).toEqual(true); @@ -233,7 +233,7 @@ describe("command-enabled", () => { }, }, }, - ["label4"] + ["label4"], ); expect(sut.enabled).toEqual(false); @@ -248,7 +248,7 @@ describe("command-enabled", () => { }, }, }, - ["label3", "label1", "label2"] + ["label3", "label1", "label2"], ); expect(sut.enabled).toEqual(true); @@ -263,7 +263,7 @@ describe("command-enabled", () => { }, }, }, - ["label2", "label1", "label5"] + ["label2", "label1", "label5"], ); expect(sut.enabled).toEqual(false); diff --git a/app/commands/close-command.js b/app/commands/close-command.js index d71c92c..d9d0c4a 100644 --- a/app/commands/close-command.js +++ b/app/commands/close-command.js @@ -43,21 +43,21 @@ export class CloseCommand extends Command { } logger.info( - `Closing issue ${extractHtmlUrl(this.payload)}, reason: ${reason}` + `Closing issue ${extractHtmlUrl(this.payload)}, reason: ${reason}`, ); try { await closeIssue( authToken, sourceRepo, extractLabelableId(this.payload), - reason + reason, ); } catch (error) { logger.error( `Failed to close issue ${ error.errors ? JSON.stringify(error.errors) : "" }`, - error + error, ); } } diff --git a/app/commands/label-command.js b/app/commands/label-command.js index 0cd8de5..3737eb5 100644 --- a/app/commands/label-command.js +++ b/app/commands/label-command.js @@ -37,7 +37,7 @@ export class LabelCommand extends Command { }); logger.info( - `Labeling issue ${extractHtmlUrl(this.payload)} with labels ${labels}` + `Labeling issue ${extractHtmlUrl(this.payload)} with labels ${labels}`, ); try { await addLabel( @@ -45,14 +45,14 @@ export class LabelCommand extends Command { this.payload.repository.owner.login, sourceRepo, extractLabelableId(this.payload), - labels + labels, ); } catch (error) { logger.error( `Failed to add label ${ error.errors ? JSON.stringify(error.errors) : "" }`, - error + error, ); } } diff --git a/app/commands/remove-label-command.js b/app/commands/remove-label-command.js index b9a155a..9b09517 100644 --- a/app/commands/remove-label-command.js +++ b/app/commands/remove-label-command.js @@ -37,8 +37,8 @@ export class RemoveLabelCommand extends Command { logger.info( `Removing label(s) from issue ${extractHtmlUrl( - this.payload - )}, labels ${labels}` + this.payload, + )}, labels ${labels}`, ); try { await removeLabel( @@ -46,14 +46,14 @@ export class RemoveLabelCommand extends Command { this.payload.repository.owner.login, sourceRepo, extractLabelableId(this.payload), - labels + labels, ); } catch (error) { logger.error( `Failed to remove label ${ error.errors ? JSON.stringify(error.errors) : "" }`, - error + error, ); } } diff --git a/app/commands/reopen-command.js b/app/commands/reopen-command.js index 1825f44..728a19e 100644 --- a/app/commands/reopen-command.js +++ b/app/commands/reopen-command.js @@ -43,14 +43,14 @@ export class ReopenCommand extends Command { await reopenIssue( authToken, sourceRepo, - extractLabelableId(this.payload) + extractLabelableId(this.payload), ); } catch (error) { logger.error( `Failed to reopen issue ${ error.errors ? JSON.stringify(error.errors) : "" }`, - error + error, ); } } diff --git a/app/commands/reviewer-command.js b/app/commands/reviewer-command.js index 6c4bbf7..952a119 100644 --- a/app/commands/reviewer-command.js +++ b/app/commands/reviewer-command.js @@ -36,12 +36,12 @@ export class ReviewerCommand extends Command { logger.info( `Requesting review for ${reviewerMatches} at ${extractHtmlUrl( - this.payload - )}` + this.payload, + )}`, ); const reviewers = extractUsersAndTeams( this.payload.repository.owner.login, - reviewerMatches + reviewerMatches, ); try { await requestReviewers( @@ -50,14 +50,14 @@ export class ReviewerCommand extends Command { sourceRepo, extractLabelableId(this.payload), reviewers.users, - reviewers.teams + reviewers.teams, ); } catch (error) { logger.error( `Failed to request reviewer ${ error.errors ? JSON.stringify(error.errors) : "" }`, - error + error, ); } } diff --git a/app/commands/transfer-command.js b/app/commands/transfer-command.js index f084688..18cd95f 100644 --- a/app/commands/transfer-command.js +++ b/app/commands/transfer-command.js @@ -34,7 +34,7 @@ export class TransferCommand extends Command { }); logger.info( - `Transferring issue ${extractHtmlUrl(this.payload)} to repo ${targetRepo}` + `Transferring issue ${extractHtmlUrl(this.payload)} to repo ${targetRepo}`, ); try { await transferIssue( @@ -42,14 +42,14 @@ export class TransferCommand extends Command { this.payload.repository.owner.login, sourceRepo, targetRepo, - extractLabelableId(this.payload) + extractLabelableId(this.payload), ); } catch (error) { logger.error( `Failed to transfer issue ${ error.errors ? JSON.stringify(error.errors) : "" }`, - error + error, ); } } diff --git a/app/comment-extractor.test.js b/app/comment-extractor.test.js index ff81c71..6e8610c 100644 --- a/app/comment-extractor.test.js +++ b/app/comment-extractor.test.js @@ -12,7 +12,7 @@ describe("extractors", () => { review: { body: "review body", }, - }) + }), ).toEqual("review body"); }); @@ -22,7 +22,7 @@ describe("extractors", () => { comment: { body: "comment body", }, - }) + }), ).toEqual("comment body"); }); }); @@ -37,7 +37,7 @@ describe("extractors", () => { pull_request: { html_url: "https://github.com/some-org/some-repo/pull/1", }, - }) + }), ).toEqual("https://github.com/some-org/some-repo/pull/1"); }); @@ -47,7 +47,7 @@ describe("extractors", () => { issue: { html_url: "https://github.com/some-org/some-repo/issue/1", }, - }) + }), ).toEqual("https://github.com/some-org/some-repo/issue/1"); }); }); @@ -62,7 +62,7 @@ describe("extractors", () => { pull_request: { node_id: "PR_aaaaaa", }, - }) + }), ).toEqual("PR_aaaaaa"); }); @@ -72,7 +72,7 @@ describe("extractors", () => { issue: { node_id: "PR_abcdefgh", }, - }) + }), ).toEqual("PR_abcdefgh"); }); }); diff --git a/app/converters.test.js b/app/converters.test.js index a152f40..adf284d 100644 --- a/app/converters.test.js +++ b/app/converters.test.js @@ -13,7 +13,7 @@ describe("converters", () => { test("user and team", () => { const converted = extractUsersAndTeams( "test-org", - "@reviewer1,@test-org/team-1" + "@reviewer1,@test-org/team-1", ); expect(converted).toEqual({ @@ -24,7 +24,7 @@ describe("converters", () => { test("multiple users and teams", () => { const converted = extractUsersAndTeams( "test-org", - "@reviewer1,@test-org/team-1,@reviewer2,@test-org/team-2" + "@reviewer1,@test-org/team-1,@reviewer2,@test-org/team-2", ); expect(converted).toEqual({ @@ -35,7 +35,7 @@ describe("converters", () => { test("space separated users and teams", () => { const converted = extractUsersAndTeams( "test-org", - "@reviewer1 @test-org/team-1 @reviewer2 @test-org/team-2" + "@reviewer1 @test-org/team-1 @reviewer2 @test-org/team-2", ); expect(converted).toEqual({ @@ -46,7 +46,7 @@ describe("converters", () => { test("space and comma separated users and teams", () => { const converted = extractUsersAndTeams( "test-org", - "@reviewer1 @test-org/team-1,@reviewer2 @test-org/team-2" + "@reviewer1 @test-org/team-1,@reviewer2 @test-org/team-2", ); expect(converted).toEqual({ @@ -57,7 +57,7 @@ describe("converters", () => { test("remove empty entry in comma separated users and teams", () => { const converted = extractUsersAndTeams( "test-org", - "@reviewer1,@test-org/team-1,,@reviewer2,@test-org/team-2" + "@reviewer1,@test-org/team-1,,@reviewer2,@test-org/team-2", ); expect(converted).toEqual({ @@ -68,7 +68,7 @@ describe("converters", () => { test("remove empty string entry in comma separated users and teams", () => { const converted = extractUsersAndTeams( "test-org", - "@reviewer1,@test-org/team-1, ,@reviewer2,@test-org/team-2" + "@reviewer1,@test-org/team-1, ,@reviewer2,@test-org/team-2", ); expect(converted).toEqual({ diff --git a/app/github.js b/app/github.js index 42e28df..7e25477 100644 --- a/app/github.js +++ b/app/github.js @@ -3,8 +3,8 @@ import { graphql } from "@octokit/graphql"; async function convertLabelsToIds(labels, token, login, repository) { const convertedLabels = await Promise.all( labels.map( - async (label) => await labelNameToId(token, login, repository, label) - ) + async (label) => await labelNameToId(token, login, repository, label), + ), ); const invalidLabels = convertedLabels @@ -22,7 +22,7 @@ export async function addLabel(token, login, repository, labelableId, labels) { labels, token, login, - repository + repository, ); await graphql( @@ -41,12 +41,12 @@ export async function addLabel(token, login, repository, labelableId, labels) { headers: { authorization: `token ${token}`, }, - } + }, ); if (invalidLabels.length > 0) { const comment = `I wasn't able to add the following labels: ${invalidLabels.join( - "," + ",", )} Check that [the label exists](https://github.com/${login}/${repository}/labels) and is spelt right then try again. @@ -76,7 +76,7 @@ async function labelNameToId(token, login, repository, labelName) { headers: { authorization: `token ${token}`, }, - } + }, ); if (!result.repositoryOwner.repository.label) { @@ -96,13 +96,13 @@ export async function removeLabel( login, repository, labelableId, - labels + labels, ) { const { invalidLabels, labelIds } = await convertLabelsToIds( labels, token, login, - repository + repository, ); await graphql( @@ -121,12 +121,12 @@ export async function removeLabel( headers: { authorization: `token ${token}`, }, - } + }, ); if (invalidLabels.length > 0) { const comment = `I wasn't able to remove the following labels: ${invalidLabels.join( - "," + ",", )} Check that [the label exists](https://github.com/${login}/${repository}/labels) and is spelt right then try again. @@ -152,7 +152,7 @@ async function lookupUser(token, username, originalUser) { headers: { authorization: `token ${token}`, }, - } + }, ); if (!result.repositoryOwner) { @@ -184,7 +184,7 @@ async function lookupTeam(token, organization, teamName, originalTeamName) { headers: { authorization: `token ${token}`, }, - } + }, ); if (!result.organization.team) { @@ -219,7 +219,7 @@ export async function addReaction(token, subjectId, content) { headers: { authorization: `token ${token}`, }, - } + }, ); } @@ -242,7 +242,7 @@ export async function reportError(token, subjectId, comment) { headers: { authorization: `token ${token}`, }, - } + }, ); } @@ -262,7 +262,7 @@ export async function reopenIssue(token, sourceRepo, issueId) { headers: { authorization: `token ${token}`, }, - } + }, ); } @@ -272,7 +272,7 @@ export async function requestReviewers( sourceRepo, issueId, users, - teams + teams, ) { const convertedUsers = await Promise.all( users @@ -284,8 +284,8 @@ export async function requestReviewers( }) .map( async (result) => - await lookupUser(token, result.user, result.original_user) - ) + await lookupUser(token, result.user, result.original_user), + ), ); const invalidUsers = convertedUsers @@ -310,9 +310,9 @@ export async function requestReviewers( token, organization, result.team, - result.original_team - ) - ) + result.original_team, + ), + ), ); const invalidTeams = convertedTeams @@ -347,14 +347,14 @@ export async function requestReviewers( headers: { authorization: `token ${token}`, }, - } + }, ); if (invalidUsers.length > 0 || invalidTeams.length > 0) { const invalidReviewers = [...invalidUsers, ...invalidTeams]; const comment = `I wasn't able to request review for the following reviewer(s): ${invalidReviewers.join( - "," + ",", )} Check that the reviewer is spelt right and try again. @@ -381,7 +381,7 @@ export async function closeIssue(token, sourceRepo, issueId, reason) { headers: { authorization: `token ${token}`, }, - } + }, ); } @@ -390,7 +390,7 @@ export async function transferIssue( owner, sourceRepo, targetRepo, - issueId + issueId, ) { const { target } = await graphql( ` @@ -406,7 +406,7 @@ export async function transferIssue( headers: { authorization: `token ${token}`, }, - } + }, ); await graphql( @@ -425,6 +425,6 @@ export async function transferIssue( headers: { authorization: `token ${token}`, }, - } + }, ); } diff --git a/app/logger.js b/app/logger.js index a33285d..4c5ad78 100644 --- a/app/logger.js +++ b/app/logger.js @@ -16,7 +16,7 @@ export function getLogger(name) { response = response += ` - ${stack}`; } return response; - } + }, ); const useJson = process.env.JSON_PRINT === "true"; const fmt = useJson ? format.json() : print; diff --git a/app/matchers.js b/app/matchers.js index 0158d6a..2c9fab7 100644 --- a/app/matchers.js +++ b/app/matchers.js @@ -4,7 +4,7 @@ export function transferMatcher(text) { export function closeMatcher(text) { return text.match( - /(?:^| | \r\n|\n)\/close (not-planned)|(?:^| | \r\n|\n)\/close/ + /(?:^| | \r\n|\n)\/close (not-planned)|(?:^| | \r\n|\n)\/close/, ); } diff --git a/app/matchers.test.js b/app/matchers.test.js index 1bcb41a..d0a9031 100644 --- a/app/matchers.test.js +++ b/app/matchers.test.js @@ -33,7 +33,7 @@ describe("matchers", () => { }); test("does not match in the middle of a string", () => { const result = transferMatcher( - "hello world/transfer github-comment-ops\nasda" + "hello world/transfer github-comment-ops\nasda", ); expect(result).toBeFalsy(); @@ -160,7 +160,7 @@ describe("matchers", () => { }); test("matches /remove-label label1,label2 with spaces,label3", () => { const result = removeLabelMatcher( - "/remove-label label1,label 2 with spaces,label3" + "/remove-label label1,label 2 with spaces,label3", ); expect(result).toBeTruthy(); @@ -174,7 +174,7 @@ describe("matchers", () => { }); test("does not match in the middle of a string", () => { const result = removeLabelMatcher( - "something cool/remove-label label1\nasda" + "something cool/remove-label label1\nasda", ); expect(result).toBeFalsy(); @@ -213,7 +213,7 @@ describe("matchers", () => { }); test("matches /reviewer reviewer1,@reviewer2,@org/team", () => { const result = reviewerMatcher( - "/reviewer reviewer1,@reviewer2,@org/team" + "/reviewer reviewer1,@reviewer2,@org/team", ); expect(result).toBeTruthy(); @@ -221,7 +221,7 @@ describe("matchers", () => { }); test("matches with space separator /reviewer reviewer1 @reviewer2 @org/team", () => { const result = reviewerMatcher( - "/reviewer reviewer1 @reviewer2 @org/team" + "/reviewer reviewer1 @reviewer2 @org/team", ); expect(result).toBeTruthy(); diff --git a/app/router.js b/app/router.js index 118417e..1a7c22b 100644 --- a/app/router.js +++ b/app/router.js @@ -39,7 +39,7 @@ export async function router(auth, id, payload, verbose) { `Failed to add reaction ${ error.errors ? JSON.stringify(error.errors) : "" }`, - error + error, ); } diff --git a/index.js b/index.js index 837d9cd..84655a4 100755 --- a/index.js +++ b/index.js @@ -59,7 +59,7 @@ createServer( response.write("For webhooks POST to path /api/github/webhooks\n"); response.end(); }, - }) + }), ).listen(port, () => { logger.info(`Listening for events on port ${port}`); }); diff --git a/package-lock.json b/package-lock.json index 3df4a18..48f157f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,7 +24,7 @@ "eslint": "^8.36.0", "eslint-config-prettier": "^9.0.0", "eslint-plugin-jest": "^28.0.0", - "eslint-plugin-prettier": "^4.2.1", + "eslint-plugin-prettier": "^5.2.3", "eslint-plugin-unicorn": "^56.0.0", "jest": "^29.5.0", "prettier": "3.5.1" @@ -1705,6 +1705,19 @@ "@octokit/openapi-types": "^18.0.0" } }, + "node_modules/@pkgr/core": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", + "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, "node_modules/@probot/octokit-plugin-config": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/@probot/octokit-plugin-config/-/octokit-plugin-config-1.1.6.tgz", @@ -2870,21 +2883,31 @@ } }, "node_modules/eslint-plugin-prettier": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", - "integrity": "sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==", + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.3.tgz", + "integrity": "sha512-qJ+y0FfCp/mQYQ/vWQ3s7eUlFEL4PyKfAJxsnYTJ4YT73nsJBWqmEpFryxV9OeUiqmsTsYJ5Y+KDNaeP31wrRw==", "dev": true, + "license": "MIT", "dependencies": { - "prettier-linter-helpers": "^1.0.0" + "prettier-linter-helpers": "^1.0.0", + "synckit": "^0.9.1" }, "engines": { - "node": ">=12.0.0" + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint-plugin-prettier" }, "peerDependencies": { - "eslint": ">=7.28.0", - "prettier": ">=2.0.0" + "@types/eslint": ">=8.0.0", + "eslint": ">=8.0.0", + "eslint-config-prettier": "*", + "prettier": ">=3.0.0" }, "peerDependenciesMeta": { + "@types/eslint": { + "optional": true + }, "eslint-config-prettier": { "optional": true } @@ -5562,6 +5585,23 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/synckit": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.9.2.tgz", + "integrity": "sha512-vrozgXDQwYO72vHjUb/HnFbQx1exDjoKzqx23aXEg2a9VIg2TSFZ8FmeZpTjUCFMYw7mpX4BE2SFu8wI7asYsw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@pkgr/core": "^0.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, "node_modules/test-exclude": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", @@ -5637,6 +5677,13 @@ "typescript": ">=4.2.0" } }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, + "license": "0BSD" + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -7253,6 +7300,12 @@ "resolved": "https://registry.npmjs.org/@octokit/webhooks-types/-/webhooks-types-6.11.0.tgz", "integrity": "sha512-AanzbulOHljrku1NGfafxdpTCfw2ENaWzH01N2vqQM+cUFbk868Cgh0xylz0JIM9BoKbfI++bdD6EYX0Q/UTEw==" }, + "@pkgr/core": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", + "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==", + "dev": true + }, "@probot/octokit-plugin-config": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/@probot/octokit-plugin-config/-/octokit-plugin-config-1.1.6.tgz", @@ -8211,12 +8264,13 @@ } }, "eslint-plugin-prettier": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", - "integrity": "sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==", + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.3.tgz", + "integrity": "sha512-qJ+y0FfCp/mQYQ/vWQ3s7eUlFEL4PyKfAJxsnYTJ4YT73nsJBWqmEpFryxV9OeUiqmsTsYJ5Y+KDNaeP31wrRw==", "dev": true, "requires": { - "prettier-linter-helpers": "^1.0.0" + "prettier-linter-helpers": "^1.0.0", + "synckit": "^0.9.1" } }, "eslint-plugin-unicorn": { @@ -10105,6 +10159,16 @@ "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "dev": true }, + "synckit": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.9.2.tgz", + "integrity": "sha512-vrozgXDQwYO72vHjUb/HnFbQx1exDjoKzqx23aXEg2a9VIg2TSFZ8FmeZpTjUCFMYw7mpX4BE2SFu8wI7asYsw==", + "dev": true, + "requires": { + "@pkgr/core": "^0.1.0", + "tslib": "^2.6.2" + } + }, "test-exclude": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", @@ -10165,6 +10229,12 @@ "dev": true, "requires": {} }, + "tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true + }, "type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", diff --git a/package.json b/package.json index c402f8a..bf0ff12 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "eslint": "^8.36.0", "eslint-config-prettier": "^9.0.0", "eslint-plugin-jest": "^28.0.0", - "eslint-plugin-prettier": "^4.2.1", + "eslint-plugin-prettier": "^5.2.3", "eslint-plugin-unicorn": "^56.0.0", "jest": "^29.5.0", "prettier": "3.5.1" From 04df6350025108e477e3800ae43bf0b1e0486b18 Mon Sep 17 00:00:00 2001 From: Tim Jacomb Date: Sat, 15 Feb 2025 22:25:14 +0000 Subject: [PATCH 3/4] Upgrade prettier --- app/router.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/router.js b/app/router.js index 1a7c22b..f70673b 100644 --- a/app/router.js +++ b/app/router.js @@ -23,7 +23,7 @@ export async function router(auth, id, payload, verbose) { if (commands.length === 0) { if (verbose) { logger.info( - `No match for "${payload?.pull_request?.body || payload.comment.body}"` + `No match for "${payload?.pull_request?.body || payload.comment.body}"`, ); } return; From 101769520553afa86e8aea883014bc6df50a7dbe Mon Sep 17 00:00:00 2001 From: Tim Jacomb Date: Sat, 15 Feb 2025 22:26:58 +0000 Subject: [PATCH 4/4] Update pre-commit --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 39a961b..d863942 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ repos: rev: v1.2.0 hooks: - id: helm-docs - - repo: https://github.com/pre-commit/mirrors-prettier - rev: "v2.7.1" # Use the sha or tag you want to point at + - repo: https://github.com/rbubley/mirrors-prettier + rev: "v3.5.1" # Use the sha or tag you want to point at hooks: - id: prettier