From fef6ee8c898229f30af2120dcae0ecbd82f85e87 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Fri, 12 Jul 2024 13:57:20 -0700 Subject: [PATCH] Query board fields instead of cards for columns (#1034) --- .prettierignore | 2 + packages/mergebot/README.md | 2 +- packages/mergebot/package.json | 1 + .../mergebot/src/_tests/cachedQueries.d.ts | 8 + packages/mergebot/src/_tests/cachedQueries.js | 248 +++++++++++++ .../mergebot/src/_tests/cachedQueries.json | 322 ---------------- .../src/_tests/fixturedActions.test.ts | 10 +- .../src/_tests/fixtures/70024/_downloads.json | 3 + .../src/_tests/fixtures/70024/_files.json | 4 + .../src/_tests/fixtures/70024/_response.json | 347 ++++++++++++++++++ .../src/_tests/fixtures/70024/derived.json | 62 ++++ .../src/_tests/fixtures/70024/mutations.json | 42 +++ .../src/_tests/fixtures/70024/result.json | 26 ++ .../mergebot/src/commands/update-test-data.ts | 15 +- packages/mergebot/src/execute-pr-actions.ts | 5 +- .../src/queries/label-columns-queries.ts | 9 +- .../mergebot/src/queries/schema/CardIdToPr.ts | 248 +------------ .../src/queries/schema/GetFileContent.ts | 4 +- .../queries/schema/GetProjectBoardCards.ts | 16 +- .../src/queries/schema/GetProjectColumns.ts | 58 ++- packages/mergebot/src/queries/schema/PR.ts | 93 +---- packages/mergebot/src/util/cachedQueries.ts | 19 +- pnpm-lock.yaml | 39 +- 23 files changed, 841 insertions(+), 742 deletions(-) create mode 100644 packages/mergebot/src/_tests/cachedQueries.d.ts create mode 100644 packages/mergebot/src/_tests/cachedQueries.js delete mode 100644 packages/mergebot/src/_tests/cachedQueries.json create mode 100644 packages/mergebot/src/_tests/fixtures/70024/_downloads.json create mode 100644 packages/mergebot/src/_tests/fixtures/70024/_files.json create mode 100644 packages/mergebot/src/_tests/fixtures/70024/_response.json create mode 100644 packages/mergebot/src/_tests/fixtures/70024/derived.json create mode 100644 packages/mergebot/src/_tests/fixtures/70024/mutations.json create mode 100644 packages/mergebot/src/_tests/fixtures/70024/result.json diff --git a/.prettierignore b/.prettierignore index 4af1850062..9c250e87f4 100644 --- a/.prettierignore +++ b/.prettierignore @@ -9,3 +9,5 @@ packages/dts-critic/testsource *.yml *.yaml *.md + +packages/mergebot/src/queries/schema diff --git a/packages/mergebot/README.md b/packages/mergebot/README.md index 3a6a1ef8a1..503c784349 100644 --- a/packages/mergebot/README.md +++ b/packages/mergebot/README.md @@ -82,7 +82,7 @@ pnpm run graphql-schema Run this to update the cached values: ```sh -# Regenerate src/_tests/cachedQueries.json +# Regenerate src/_tests/cachedQueries.js pnpm run update-test-data ``` diff --git a/packages/mergebot/package.json b/packages/mergebot/package.json index 1d952778f4..7d6682a967 100644 --- a/packages/mergebot/package.json +++ b/packages/mergebot/package.json @@ -44,6 +44,7 @@ "jest-file-snapshot": "^0.5.0", "knip": "^5.15.1", "rimraf": "^5.0.7", + "seroval": "^1.0.7", "ts-jest": "^29.1.2", "typescript": "^5.4.5" }, diff --git a/packages/mergebot/src/_tests/cachedQueries.d.ts b/packages/mergebot/src/_tests/cachedQueries.d.ts new file mode 100644 index 0000000000..e830047b56 --- /dev/null +++ b/packages/mergebot/src/_tests/cachedQueries.d.ts @@ -0,0 +1,8 @@ +import * as cachedQueries from "../util/cachedQueries"; + +type CachedQueries = { + [key in keyof typeof cachedQueries]: Awaited>; +}; + +declare const _default: CachedQueries; +export = cachedQueries; diff --git a/packages/mergebot/src/_tests/cachedQueries.js b/packages/mergebot/src/_tests/cachedQueries.js new file mode 100644 index 0000000000..0521ee3e84 --- /dev/null +++ b/packages/mergebot/src/_tests/cachedQueries.js @@ -0,0 +1,248 @@ +module.exports = ((h) => ({ + getProjectBoardColumns: + ((h = []), + new Map([ + ["Needs Maintainer Action", "f75ad846"], + ["Needs Maintainer Review", "47fc9ee4"], + ["Waiting for Code Reviews", "98236657"], + ["Needs Author Action", "d389394c"], + ["Waiting for Author to Merge", "7da042bf"], + ["Recently Merged", "fee515dc"], + ["Other", "4ab7a682"], + ])), + getLabels: [ + { id: "MDU6TGFiZWw0MDUzNDEwNjk=", name: "@types", __typename: "Label" }, + { id: "MDU6TGFiZWw2NDQxMTYxNzA=", name: "Abandoned", __typename: "Label" }, + { + id: "MDU6TGFiZWw3OTg3Mzc0Nzg=", + name: "Author is Owner", + __typename: "Label", + }, + { + id: "LA_kwDOAFz6BM7QXorW", + name: "Blocked upstream", + __typename: "Label", + }, + { + id: "MDU6TGFiZWwyMTU0ODE2NTQ5", + name: "Check Config", + __typename: "Label", + }, + { + id: "MDU6TGFiZWwxNjA4NjM0NDg0", + name: "Critical package", + __typename: "Label", + }, + { + id: "MDU6TGFiZWwxNTY4Nzg5MA==", + name: "Definition:Bug", + __typename: "Label", + }, + { + id: "MDU6TGFiZWw4ODk3OTYxOA==", + name: "Definition:Creating", + __typename: "Label", + }, + { + id: "MDU6TGFiZWwxNTY4Nzg5Mg==", + name: "Definition:Enhancement", + __typename: "Label", + }, + { + id: "MDU6TGFiZWwyOTM4NjAwOA==", + name: "Definition:Missing", + __typename: "Label", + }, + { + id: "MDU6TGFiZWwyMzcwODQxMw==", + name: "Definition:Request", + __typename: "Label", + }, + { + id: "MDU6TGFiZWwyMTg2MTM4MjI0", + name: "dependencies", + __typename: "Label", + }, + { id: "MDU6TGFiZWw1NjcxNzAyMQ==", name: "Discussion", __typename: "Label" }, + { id: "MDU6TGFiZWw3NTcxMTk0Ng==", name: "Documents", __typename: "Label" }, + { id: "MDU6TGFiZWwzMDI2OTUyNQ==", name: "Duplicate", __typename: "Label" }, + { + id: "MDU6TGFiZWwxNjA4MjA4ODM1", + name: "Edits Infrastructure", + __typename: "Label", + }, + { + id: "MDU6TGFiZWwxNjA4MjEwODMz", + name: "Edits multiple packages", + __typename: "Label", + }, + { + id: "MDU6TGFiZWwyNDk1OTc2ODI5", + name: "Edits Owners", + __typename: "Label", + }, + { id: "LA_kwDOAFz6BM71Jg4R", name: "github_actions", __typename: "Label" }, + { + id: "MDU6TGFiZWw1ODMyOTQ0NzQ=", + name: "Has Merge Conflict", + __typename: "Label", + }, + { + id: "MDU6TGFiZWwzMzUzMTYyNTAy", + name: "Huge Change", + __typename: "Label", + }, + { + id: "MDU6TGFiZWwzMDI2OTc0NQ==", + name: "Infrastructure", + __typename: "Label", + }, + { id: "MDU6TGFiZWwzMDI2OTUzOA==", name: "invalid", __typename: "Label" }, + { + id: "LA_kwDOAFz6BM8AAAABXw1nPg", + name: "javascript", + __typename: "Label", + }, + { + id: "MDU6TGFiZWw1NjcxNDU5MQ==", + name: "Level:Advanced", + __typename: "Label", + }, + { + id: "MDU6TGFiZWw1NjcxNDU3Mg==", + name: "Level:Intermediate", + __typename: "Label", + }, + { + id: "MDU6TGFiZWw1NjcxNDU3MQ==", + name: "Level:Starter", + __typename: "Label", + }, + { + id: "MDU6TGFiZWwxNjA4NTUyNDEw", + name: "Maintainer Approved", + __typename: "Label", + }, + { + id: "MDU6TGFiZWwyMTk3MzU2OTA1", + name: "Mergebot Error", + __typename: "Label", + }, + { + id: "MDU6TGFiZWwyNTI5Mjc2Njc2", + name: "Multiple Languages", + __typename: "Label", + }, + { + id: "MDU6TGFiZWw2NDY3ODg4ODg=", + name: "New Definition", + __typename: "Label", + }, + { + id: "MDU6TGFiZWwyMTU0ODU3ODAw", + name: "No Other Owners", + __typename: "Label", + }, + { + id: "MDU6TGFiZWw1ODYxNzcwNjM=", + name: "Other Approved", + __typename: "Label", + }, + { + id: "MDU6TGFiZWw5MDUzMzQwOTU=", + name: "Owner Approved", + __typename: "Label", + }, + { + id: "MDU6TGFiZWwxNTk2MTk1ODI0", + name: "Perf: Better", + __typename: "Label", + }, + { + id: "MDU6TGFiZWwxNTk2MTk4NTgw", + name: "Perf: Mixed", + __typename: "Label", + }, + { id: "MDU6TGFiZWwxNTk2MTk0NzQ0", name: "Perf: Same", __typename: "Label" }, + { + id: "MDU6TGFiZWwxNTk2MTk5Mjg2", + name: "Perf: Worse", + __typename: "Label", + }, + { + id: "LA_kwDOAFz6BM8AAAABj4hH1Q", + name: "pkg: react@19.0.x", + __typename: "Label", + }, + { + id: "MDU6TGFiZWw2ODQzMjE1NzY=", + name: "Popular package", + __typename: "Label", + }, + { + id: "MDU6TGFiZWwyOTUzOTk4NzE4", + name: "Possibly Edits Infrastructure", + __typename: "Label", + }, + { id: "MDU6TGFiZWwxNTY4Nzg5NA==", name: "Question", __typename: "Label" }, + { + id: "MDU6TGFiZWwzOTU2NzkwNTk=", + name: "Revision needed", + __typename: "Label", + }, + { id: "MDU6TGFiZWw2OTcwMTg5NzI=", name: "Self Merge", __typename: "Label" }, + { + id: "MDU6TGFiZWw1NjcxNDI1Mg==", + name: "Target:Browser", + __typename: "Label", + }, + { + id: "MDU6TGFiZWw1NjcxNDI0NQ==", + name: "Target:NodeJS", + __typename: "Label", + }, + { + id: "MDU6TGFiZWwyMDk2NzQzNjAw", + name: "The CI failed", + __typename: "Label", + }, + { + id: "MDU6TGFiZWwyOTUzOTk2NDAx", + name: "The CI is blocked", + __typename: "Label", + }, + { + id: "LA_kwDOAFz6BM8AAAABEGgY4Q", + name: "Too Many Files", + __typename: "Label", + }, + { + id: "MDU6TGFiZWwyMTU2MzIyMzcx", + name: "Too Many Owners", + __typename: "Label", + }, + { + id: "MDU6TGFiZWwzMjAzMjg3Mg==", + name: "TypeScript-Core", + __typename: "Label", + }, + { + id: "MDU6TGFiZWw2NDQwOTUzNDI=", + name: "Unmergeable", + __typename: "Label", + }, + { id: "MDU6TGFiZWw2NDQwOTU4ODI=", name: "Unmerged", __typename: "Label" }, + { id: "MDU6TGFiZWw2NDY3ODkyMDU=", name: "Unowned", __typename: "Label" }, + { id: "MDU6TGFiZWwyNDYyODA0MzE1", name: "Unreviewed", __typename: "Label" }, + { + id: "MDU6TGFiZWwyMTU0NzUwNDcz", + name: "Untested Change", + __typename: "Label", + }, + { + id: "MDU6TGFiZWwyMDk2NzQ1NzQx", + name: "Where is GH Actions?", + __typename: "Label", + }, + ], +}))(); diff --git a/packages/mergebot/src/_tests/cachedQueries.json b/packages/mergebot/src/_tests/cachedQueries.json deleted file mode 100644 index 42eca112ec..0000000000 --- a/packages/mergebot/src/_tests/cachedQueries.json +++ /dev/null @@ -1,322 +0,0 @@ -{ - "comment": "Generate & update with `pnpm run update-test-data`", - "getProjectBoardColumns": [ - { - "__typename": "ProjectV2ItemFieldSingleSelectValue", - "optionId": "d389394c", - "name": "Needs Author Action" - }, - { - "__typename": "ProjectV2ItemFieldSingleSelectValue", - "optionId": "f75ad846", - "name": "Needs Maintainer Action" - }, - { - "__typename": "ProjectV2ItemFieldSingleSelectValue", - "optionId": "47fc9ee4", - "name": "Needs Maintainer Review" - }, - { - "__typename": "ProjectV2ItemFieldSingleSelectValue", - "optionId": "4ab7a682", - "name": "Other" - }, - { - "__typename": "ProjectV2ItemFieldSingleSelectValue", - "optionId": "fee515dc", - "name": "Recently Merged" - }, - { - "__typename": "ProjectV2ItemFieldSingleSelectValue", - "optionId": "7da042bf", - "name": "Waiting for Author to Merge" - }, - { - "__typename": "ProjectV2ItemFieldSingleSelectValue", - "optionId": "98236657", - "name": "Waiting for Code Reviews" - } - ], - "getLabels": [ - { - "id": "MDU6TGFiZWw0MDUzNDEwNjk=", - "name": "@types", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWw2NDQxMTYxNzA=", - "name": "Abandoned", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWw3OTg3Mzc0Nzg=", - "name": "Author is Owner", - "__typename": "Label" - }, - { - "id": "LA_kwDOAFz6BM7QXorW", - "name": "Blocked upstream", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWwyMTU0ODE2NTQ5", - "name": "Check Config", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWwxNjA4NjM0NDg0", - "name": "Critical package", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWwxNTY4Nzg5MA==", - "name": "Definition:Bug", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWw4ODk3OTYxOA==", - "name": "Definition:Creating", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWwxNTY4Nzg5Mg==", - "name": "Definition:Enhancement", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWwyOTM4NjAwOA==", - "name": "Definition:Missing", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWwyMzcwODQxMw==", - "name": "Definition:Request", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWwyMTg2MTM4MjI0", - "name": "dependencies", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWw1NjcxNzAyMQ==", - "name": "Discussion", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWw3NTcxMTk0Ng==", - "name": "Documents", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWwzMDI2OTUyNQ==", - "name": "Duplicate", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWwxNjA4MjA4ODM1", - "name": "Edits Infrastructure", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWwxNjA4MjEwODMz", - "name": "Edits multiple packages", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWwyNDk1OTc2ODI5", - "name": "Edits Owners", - "__typename": "Label" - }, - { - "id": "LA_kwDOAFz6BM71Jg4R", - "name": "github_actions", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWw1ODMyOTQ0NzQ=", - "name": "Has Merge Conflict", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWwzMzUzMTYyNTAy", - "name": "Huge Change", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWwzMDI2OTc0NQ==", - "name": "Infrastructure", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWwzMDI2OTUzOA==", - "name": "invalid", - "__typename": "Label" - }, - { - "id": "LA_kwDOAFz6BM8AAAABXw1nPg", - "name": "javascript", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWw1NjcxNDU5MQ==", - "name": "Level:Advanced", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWw1NjcxNDU3Mg==", - "name": "Level:Intermediate", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWw1NjcxNDU3MQ==", - "name": "Level:Starter", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWwxNjA4NTUyNDEw", - "name": "Maintainer Approved", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWwyMTk3MzU2OTA1", - "name": "Mergebot Error", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWwyNTI5Mjc2Njc2", - "name": "Multiple Languages", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWw2NDY3ODg4ODg=", - "name": "New Definition", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWwyMTU0ODU3ODAw", - "name": "No Other Owners", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWw1ODYxNzcwNjM=", - "name": "Other Approved", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWw5MDUzMzQwOTU=", - "name": "Owner Approved", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWwxNTk2MTk1ODI0", - "name": "Perf: Better", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWwxNTk2MTk4NTgw", - "name": "Perf: Mixed", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWwxNTk2MTk0NzQ0", - "name": "Perf: Same", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWwxNTk2MTk5Mjg2", - "name": "Perf: Worse", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWw2ODQzMjE1NzY=", - "name": "Popular package", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWwyOTUzOTk4NzE4", - "name": "Possibly Edits Infrastructure", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWwxNTY4Nzg5NA==", - "name": "Question", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWwzOTU2NzkwNTk=", - "name": "Revision needed", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWw2OTcwMTg5NzI=", - "name": "Self Merge", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWw1NjcxNDI1Mg==", - "name": "Target:Browser", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWw1NjcxNDI0NQ==", - "name": "Target:NodeJS", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWwyMDk2NzQzNjAw", - "name": "The CI failed", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWwyOTUzOTk2NDAx", - "name": "The CI is blocked", - "__typename": "Label" - }, - { - "id": "LA_kwDOAFz6BM8AAAABEGgY4Q", - "name": "Too Many Files", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWwyMTU2MzIyMzcx", - "name": "Too Many Owners", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWwzMjAzMjg3Mg==", - "name": "TypeScript-Core", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWw2NDQwOTUzNDI=", - "name": "Unmergeable", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWw2NDQwOTU4ODI=", - "name": "Unmerged", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWw2NDY3ODkyMDU=", - "name": "Unowned", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWwyNDYyODA0MzE1", - "name": "Unreviewed", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWwyMTU0NzUwNDcz", - "name": "Untested Change", - "__typename": "Label" - }, - { - "id": "MDU6TGFiZWwyMDk2NzQ1NzQx", - "name": "Where is GH Actions?", - "__typename": "Label" - } - ] -} diff --git a/packages/mergebot/src/_tests/fixturedActions.test.ts b/packages/mergebot/src/_tests/fixturedActions.test.ts index eaa9bf71a0..d2b9cfbe9c 100644 --- a/packages/mergebot/src/_tests/fixturedActions.test.ts +++ b/packages/mergebot/src/_tests/fixturedActions.test.ts @@ -6,11 +6,11 @@ import { process } from "../compute-pr-actions"; import { deriveStateForPR } from "../pr-info"; import { PR } from "../queries/schema/PR"; import { readJsonSync, scrubDiagnosticDetails } from "../util/util"; -import * as cachedQueries from "./cachedQueries.json"; -jest.mock("../util/cachedQueries", () => ({ - getProjectBoardColumns: jest.fn(() => new Map(cachedQueries.getProjectBoardColumns.map((o) => [o.name, o.optionId]))), - getLabels: jest.fn(() => cachedQueries.getLabels), -})); +import * as cachedQueries from "./cachedQueries"; +jest.mock( + "../util/cachedQueries", + () => Object.fromEntries(Object.entries(cachedQueries).map(([k, v]) => [k, jest.fn(() => Promise.resolve(v))])), +); import { executePrActions } from "../execute-pr-actions"; expect.extend({ toMatchFile }); diff --git a/packages/mergebot/src/_tests/fixtures/70024/_downloads.json b/packages/mergebot/src/_tests/fixtures/70024/_downloads.json new file mode 100644 index 0000000000..d05b7c9853 --- /dev/null +++ b/packages/mergebot/src/_tests/fixtures/70024/_downloads.json @@ -0,0 +1,3 @@ +{ + "ws": 69842889 +} diff --git a/packages/mergebot/src/_tests/fixtures/70024/_files.json b/packages/mergebot/src/_tests/fixtures/70024/_files.json new file mode 100644 index 0000000000..6c6aacc749 --- /dev/null +++ b/packages/mergebot/src/_tests/fixtures/70024/_files.json @@ -0,0 +1,4 @@ +{ + "8f212658bddb0788b463565a0f58b09e5a1d1171:types/ws/package.json": "{\n \"private\": true,\n \"name\": \"@types/ws\",\n \"version\": \"8.5.9999\",\n \"projects\": [\n \"https://github.com/websockets/ws\"\n ],\n \"exports\": {\n \".\": {\n \"types\": {\n \"import\": \"./index.d.mts\",\n \"default\": \"./index.d.ts\"\n }\n }\n },\n \"dependencies\": {\n \"@types/node\": \"*\"\n },\n \"devDependencies\": {\n \"@types/ws\": \"workspace:.\"\n },\n \"owners\": [\n {\n \"name\": \"Paul Loyd\",\n \"githubUsername\": \"loyd\"\n },\n {\n \"name\": \"Margus Lamp\",\n \"githubUsername\": \"mlamp\"\n },\n {\n \"name\": \"Philippe D'Alva\",\n \"githubUsername\": \"TitaneBoy\"\n },\n {\n \"name\": \"reduckted\",\n \"githubUsername\": \"reduckted\"\n },\n {\n \"name\": \"teidesu\",\n \"githubUsername\": \"teidesu\"\n },\n {\n \"name\": \"Bartosz Wojtkowiak\",\n \"githubUsername\": \"wojtkowiak\"\n },\n {\n \"name\": \"Kyle Hensel\",\n \"githubUsername\": \"k-yle\"\n },\n {\n \"name\": \"Samuel Skeen\",\n \"githubUsername\": \"cwadrupldijjit\"\n }\n ]\n}\n", + "524bf6f79d0c9e32a76f73f699a2ea59dfba7eb6:types/ws/package.json": "{\n \"private\": true,\n \"name\": \"@types/ws\",\n \"version\": \"8.5.9999\",\n \"projects\": [\n \"https://github.com/websockets/ws\"\n ],\n \"exports\": {\n \".\": {\n \"types\": {\n \"import\": \"./index.d.mts\",\n \"default\": \"./index.d.ts\"\n }\n }\n },\n \"dependencies\": {\n \"@types/node\": \"*\"\n },\n \"devDependencies\": {\n \"@types/ws\": \"workspace:.\"\n },\n \"owners\": [\n {\n \"name\": \"Paul Loyd\",\n \"githubUsername\": \"loyd\"\n },\n {\n \"name\": \"Margus Lamp\",\n \"githubUsername\": \"mlamp\"\n },\n {\n \"name\": \"Philippe D'Alva\",\n \"githubUsername\": \"TitaneBoy\"\n },\n {\n \"name\": \"reduckted\",\n \"githubUsername\": \"reduckted\"\n },\n {\n \"name\": \"teidesu\",\n \"githubUsername\": \"teidesu\"\n },\n {\n \"name\": \"Bartosz Wojtkowiak\",\n \"githubUsername\": \"wojtkowiak\"\n },\n {\n \"name\": \"Kyle Hensel\",\n \"githubUsername\": \"k-yle\"\n },\n {\n \"name\": \"Samuel Skeen\",\n \"githubUsername\": \"cwadrupldijjit\"\n }\n ]\n}\n" +} diff --git a/packages/mergebot/src/_tests/fixtures/70024/_response.json b/packages/mergebot/src/_tests/fixtures/70024/_response.json new file mode 100644 index 0000000000..8eb53f9d59 --- /dev/null +++ b/packages/mergebot/src/_tests/fixtures/70024/_response.json @@ -0,0 +1,347 @@ +{ + "data": { + "repository": { + "id": "MDEwOlJlcG9zaXRvcnk2MDkzMzE2", + "pullRequest": { + "id": "PR_kwDOAFz6BM50_-9R", + "title": "feat(ws): Enable `addEventListener`/`removeEventListener` to Work with Unions of Event Types", + "createdAt": "2024-07-10T17:50:38Z", + "author": { + "login": "ITenthusiasm", + "__typename": "User" + }, + "authorAssociation": "CONTRIBUTOR", + "baseRef": { + "name": "master", + "__typename": "Ref" + }, + "labels": { + "nodes": [ + { + "name": "Self Merge", + "__typename": "Label" + }, + { + "name": "Owner Approved", + "__typename": "Label" + }, + { + "name": "Maintainer Approved", + "__typename": "Label" + }, + { + "name": "Critical package", + "__typename": "Label" + } + ], + "__typename": "LabelConnection" + }, + "isDraft": false, + "mergeable": "MERGEABLE", + "number": 70024, + "state": "OPEN", + "headRefOid": "524bf6f79d0c9e32a76f73f699a2ea59dfba7eb6", + "changedFiles": 2, + "additions": 21, + "deletions": 29, + "commitIds": { + "nodes": [ + { + "commit": { + "oid": "524bf6f79d0c9e32a76f73f699a2ea59dfba7eb6", + "parents": { + "nodes": [ + { + "oid": "8f212658bddb0788b463565a0f58b09e5a1d1171", + "__typename": "Commit" + } + ], + "__typename": "CommitConnection" + }, + "__typename": "Commit" + }, + "__typename": "PullRequestCommit" + } + ], + "__typename": "PullRequestCommitConnection" + }, + "timelineItems": { + "nodes": [ + { + "actor": { + "login": "typescript-bot", + "__typename": "User" + }, + "createdAt": "2024-07-10T18:01:02Z", + "projectColumnName": "Needs Maintainer Review", + "__typename": "MovedColumnsInProjectEvent" + } + ], + "__typename": "PullRequestTimelineItemsConnection" + }, + "reviews": { + "nodes": [ + { + "author": { + "login": "k-yle", + "__typename": "User" + }, + "commit": { + "oid": "524bf6f79d0c9e32a76f73f699a2ea59dfba7eb6", + "__typename": "Commit" + }, + "comments": { + "nodes": [], + "__typename": "PullRequestReviewCommentConnection" + }, + "authorAssociation": "CONTRIBUTOR", + "state": "APPROVED", + "submittedAt": "2024-07-11T09:05:08Z", + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/pull/70024#pullrequestreview-2171336629", + "__typename": "PullRequestReview" + }, + { + "author": { + "login": "rbuckton", + "__typename": "User" + }, + "commit": { + "oid": "524bf6f79d0c9e32a76f73f699a2ea59dfba7eb6", + "__typename": "Commit" + }, + "comments": { + "nodes": [], + "__typename": "PullRequestReviewCommentConnection" + }, + "authorAssociation": "MEMBER", + "state": "APPROVED", + "submittedAt": "2024-07-11T21:53:41Z", + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/pull/70024#pullrequestreview-2173135611", + "__typename": "PullRequestReview" + } + ], + "__typename": "PullRequestReviewConnection" + }, + "commits": { + "totalCount": 1, + "nodes": [ + { + "commit": { + "checkSuites": { + "nodes": [ + { + "databaseId": 25858317844, + "app": { + "name": "GitHub Actions", + "__typename": "App" + }, + "conclusion": "SUCCESS", + "resourcePath": "/DefinitelyTyped/DefinitelyTyped/commit/524bf6f79d0c9e32a76f73f699a2ea59dfba7eb6/checks?check_suite_id=25858317844", + "status": "COMPLETED", + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/commit/524bf6f79d0c9e32a76f73f699a2ea59dfba7eb6/checks?check_suite_id=25858317844", + "checkRuns": { + "nodes": [ + { + "title": null, + "__typename": "CheckRun" + } + ], + "__typename": "CheckRunConnection" + }, + "createdAt": "2024-07-10T17:53:40Z", + "workflowRun": { + "file": { + "path": ".github/workflows/CI.yml", + "__typename": "WorkflowRunFile" + }, + "__typename": "WorkflowRun" + }, + "__typename": "CheckSuite" + } + ], + "__typename": "CheckSuiteConnection" + }, + "status": null, + "authoredDate": "2024-07-10T17:17:36Z", + "committedDate": "2024-07-10T17:53:24Z", + "pushedDate": null, + "oid": "524bf6f79d0c9e32a76f73f699a2ea59dfba7eb6", + "__typename": "Commit" + }, + "__typename": "PullRequestCommit" + } + ], + "__typename": "PullRequestCommitConnection" + }, + "comments": { + "totalCount": 7, + "nodes": [ + { + "id": "IC_kwDOAFz6BM6EY4ad", + "author": { + "login": "typescript-bot", + "__typename": "User" + }, + "databaseId": 2221115037, + "body": "@ITenthusiasm Thank you for submitting this PR!\n\n***This is a live comment that I will keep updated.***\n\n## 1 package in this PR\n\n* `ws` — [on npm](https://www.npmjs.com/package/ws), [on unpkg](https://unpkg.com/browse/ws@latest/)\n - owner-approval: @k-yle\n\n## Code Reviews\n\nBecause this is a widely-used package, a DT maintainer will need to review it before it can be merged.\n\nYou can test the changes of this PR [in the Playground](https://www.typescriptlang.org/play/?dtPR=70024&install-plugin=playground-dt-review).\n\n## Status\n\n * ✅ No merge conflicts\n * ✅ Continuous integration tests have passed\n * ✅ Most recent commit is approved by a DT maintainer\n\nAll of the items on the list are green. **To merge, you need to post a comment including the string \"Ready to merge\"** to bring in your changes.\n\n----------------------\n... diagnostics scrubbed ...\n", + "createdAt": "2024-07-10T17:51:14Z", + "reactions": { + "nodes": [], + "__typename": "ReactionConnection" + }, + "__typename": "IssueComment" + }, + { + "id": "IC_kwDOAFz6BM6EY4bp", + "author": { + "login": "typescript-bot", + "__typename": "User" + }, + "databaseId": 2221115113, + "body": "🔔 @loyd @mlamp @TitaneBoy @reduckted @teidesu @wojtkowiak @k-yle @cwadrupldijjit — please [review this PR](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/70024/files) in the next few days. Be sure to explicitly select **`Approve`** or **`Request Changes`** in the GitHub UI so I know what's going on.\n", + "createdAt": "2024-07-10T17:51:16Z", + "reactions": { + "nodes": [], + "__typename": "ReactionConnection" + }, + "__typename": "IssueComment" + }, + { + "id": "IC_kwDOAFz6BM6Ej8pr", + "author": { + "login": "ITenthusiasm", + "__typename": "User" + }, + "databaseId": 2224015979, + "body": "Ready to merge", + "createdAt": "2024-07-11T22:01:19Z", + "reactions": { + "nodes": [], + "__typename": "ReactionConnection" + }, + "__typename": "IssueComment" + }, + { + "id": "IC_kwDOAFz6BM6EkAgr", + "author": { + "login": "ITenthusiasm", + "__typename": "User" + }, + "databaseId": 2224031787, + "body": "Hmm. Does someone else need to say the magic words? :thinking:", + "createdAt": "2024-07-11T22:12:07Z", + "reactions": { + "nodes": [], + "__typename": "ReactionConnection" + }, + "__typename": "IssueComment" + }, + { + "id": "IC_kwDOAFz6BM6EkIRW", + "author": { + "login": "k-yle", + "__typename": "User" + }, + "databaseId": 2224063574, + "body": "Ready to merge", + "createdAt": "2024-07-11T22:31:59Z", + "reactions": { + "nodes": [], + "__typename": "ReactionConnection" + }, + "__typename": "IssueComment" + }, + { + "id": "IC_kwDOAFz6BM6Ekat9", + "author": { + "login": "ITenthusiasm", + "__typename": "User" + }, + "databaseId": 2224139133, + "body": "@rbuckton Is the bot stuck, by chance? :sweat_smile:", + "createdAt": "2024-07-12T00:01:46Z", + "reactions": { + "nodes": [], + "__typename": "ReactionConnection" + }, + "__typename": "IssueComment" + }, + { + "id": "IC_kwDOAFz6BM6Ek00r", + "author": { + "login": "rbuckton", + "__typename": "User" + }, + "databaseId": 2224246059, + "body": "I'll check, we've been doing some merge bot infrastructure changes this week. ", + "createdAt": "2024-07-12T01:16:01Z", + "reactions": { + "nodes": [ + { + "user": { + "login": "ITenthusiasm", + "__typename": "User" + }, + "__typename": "Reaction" + } + ], + "__typename": "ReactionConnection" + }, + "__typename": "IssueComment" + } + ], + "__typename": "IssueCommentConnection" + }, + "files": { + "totalCount": 2, + "nodes": [ + { + "path": "types/ws/index.d.ts", + "additions": 13, + "deletions": 22, + "__typename": "PullRequestChangedFile" + }, + { + "path": "types/ws/ws-tests.ts", + "additions": 8, + "deletions": 7, + "__typename": "PullRequestChangedFile" + } + ], + "pageInfo": { + "hasNextPage": false, + "endCursor": "Mg", + "__typename": "PageInfo" + }, + "__typename": "PullRequestChangedFileConnection" + }, + "projectItems": { + "nodes": [ + { + "id": "PVTI_lADOADeBNM4AkH1qzgQ0ON0", + "project": { + "id": "PVT_kwDOADeBNM4AkH1q", + "number": 1, + "__typename": "ProjectV2" + }, + "fieldValueByName": { + "name": "Needs Maintainer Review", + "field": { + "id": "PVTSSF_lADOADeBNM4AkH1qzgcYOEM", + "__typename": "ProjectV2SingleSelectField" + }, + "__typename": "ProjectV2ItemFieldSingleSelectValue" + }, + "__typename": "ProjectV2Item" + } + ], + "__typename": "ProjectV2ItemConnection" + }, + "__typename": "PullRequest" + }, + "__typename": "Repository" + } + }, + "loading": false, + "networkStatus": 7 +} diff --git a/packages/mergebot/src/_tests/fixtures/70024/derived.json b/packages/mergebot/src/_tests/fixtures/70024/derived.json new file mode 100644 index 0000000000..bd1ee7ad67 --- /dev/null +++ b/packages/mergebot/src/_tests/fixtures/70024/derived.json @@ -0,0 +1,62 @@ +{ + "type": "info", + "now": "2024-07-12T19:13:34.330Z", + "pr_number": 70024, + "author": "ITenthusiasm", + "headCommitOid": "524bf6f79d0c9e32a76f73f699a2ea59dfba7eb6", + "mergeBaseOid": "8f212658bddb0788b463565a0f58b09e5a1d1171", + "lastPushDate": "2024-07-10T17:50:38.000Z", + "lastActivityDate": "2024-07-12T01:16:01.000Z", + "mergeRequestDate": "2024-07-11T22:31:59.000Z", + "mergeRequestUser": "k-yle", + "hasMergeConflict": false, + "isFirstContribution": false, + "tooManyFiles": false, + "hugeChange": false, + "popularityLevel": "Critical", + "pkgInfo": [ + { + "name": "ws", + "kind": "edit", + "files": [ + { + "path": "types/ws/index.d.ts", + "kind": "definition" + }, + { + "path": "types/ws/ws-tests.ts", + "kind": "test" + } + ], + "owners": [ + "loyd", + "mlamp", + "TitaneBoy", + "reduckted", + "teidesu", + "wojtkowiak", + "k-yle", + "cwadrupldijjit" + ], + "addedOwners": [], + "deletedOwners": [], + "popularityLevel": "Critical" + } + ], + "reviews": [ + { + "type": "approved", + "reviewer": "rbuckton", + "date": "2024-07-11T21:53:41.000Z", + "isMaintainer": true + }, + { + "type": "approved", + "reviewer": "k-yle", + "date": "2024-07-11T09:05:08.000Z", + "isMaintainer": false + } + ], + "mainBotCommentID": 2221115037, + "ciResult": "pass" +} diff --git a/packages/mergebot/src/_tests/fixtures/70024/mutations.json b/packages/mergebot/src/_tests/fixtures/70024/mutations.json new file mode 100644 index 0000000000..e411697ecb --- /dev/null +++ b/packages/mergebot/src/_tests/fixtures/70024/mutations.json @@ -0,0 +1,42 @@ +[ + { + "mutation": "mutation ($input: UpdateIssueCommentInput!) {\n updateIssueComment(input: $input) {\n __typename\n }\n}\n", + "variables": { + "input": { + "id": "IC_kwDOAFz6BM6EY4ad", + "body": "@ITenthusiasm Thank you for submitting this PR!\n\n***This is a live comment that I will keep updated.***\n\n## 1 package in this PR\n\n* `ws` — [on npm](https://www.npmjs.com/package/ws), [on unpkg](https://unpkg.com/browse/ws@latest/)\n - owner-approval: @k-yle\n\n## Code Reviews\n\nBecause this is a widely-used package, a DT maintainer will need to review it before it can be merged.\n\nYou can test the changes of this PR [in the Playground](https://www.typescriptlang.org/play/?dtPR=70024&install-plugin=playground-dt-review).\n\n## Status\n\n * ✅ No merge conflicts\n * ✅ Continuous integration tests have passed\n * ✅ Most recent commit is approved by a DT maintainer\n\nAll of the items on the list are green. **To merge, you need to post a comment including the string \"Ready to merge\"** to bring in your changes.\n\n----------------------\n... diagnostics scrubbed ...\n" + } + } + }, + { + "mutation": "mutation ($input: UpdateProjectV2ItemFieldValueInput!) {\n updateProjectV2ItemFieldValue(input: $input) {\n __typename\n }\n}\n", + "variables": { + "input": { + "itemId": "PVTI_lADOADeBNM4AkH1qzgQ0ON0", + "projectId": "PVT_kwDOADeBNM4AkH1q", + "fieldId": "PVTSSF_lADOADeBNM4AkH1qzgcYOEM", + "value": { + "singleSelectOptionId": "7da042bf" + } + } + } + }, + { + "mutation": "mutation ($input: AddCommentInput!) {\n addComment(input: $input) {\n __typename\n }\n}\n", + "variables": { + "input": { + "subjectId": "PR_kwDOAFz6BM50_-9R", + "body": "@ITenthusiasm: Everything looks good here. I am ready to merge this PR (at 524bf6f) on your behalf whenever you think it's ready.\n\nIf you'd like that to happen, please post a comment saying:\n\n> Ready to merge\n\nand I'll merge this PR almost instantly. Thanks for helping out! :heart:\n\n(@loyd, @mlamp, @TitaneBoy, @reduckted, @teidesu, @wojtkowiak, @k-yle, @cwadrupldijjit: you can do this too.)\n" + } + } + }, + { + "mutation": "mutation ($input: AddCommentInput!) {\n addComment(input: $input) {\n __typename\n }\n}\n", + "variables": { + "input": { + "subjectId": "PR_kwDOAFz6BM50_-9R", + "body": ":passport_control: Hi @k-yle,\n\nI can't [accept a pull request](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-make-a-pull-request) until all of the checks in the \"Status\" section of [this comment](#issuecomment-2221115037) are green. I will let you know once that happens.\n\nThanks, and happy typing!\n" + } + } + } +] diff --git a/packages/mergebot/src/_tests/fixtures/70024/result.json b/packages/mergebot/src/_tests/fixtures/70024/result.json new file mode 100644 index 0000000000..ad93c978c4 --- /dev/null +++ b/packages/mergebot/src/_tests/fixtures/70024/result.json @@ -0,0 +1,26 @@ +{ + "projectColumn": "Waiting for Author to Merge", + "labels": [ + "Critical package", + "Owner Approved", + "Maintainer Approved", + "Self Merge" + ], + "responseComments": [ + { + "tag": "welcome", + "status": "@ITenthusiasm Thank you for submitting this PR!\n\n***This is a live comment that I will keep updated.***\n\n## 1 package in this PR\n\n* `ws` — [on npm](https://www.npmjs.com/package/ws), [on unpkg](https://unpkg.com/browse/ws@latest/)\n - owner-approval: @k-yle\n\n## Code Reviews\n\nBecause this is a widely-used package, a DT maintainer will need to review it before it can be merged.\n\nYou can test the changes of this PR [in the Playground](https://www.typescriptlang.org/play/?dtPR=70024&install-plugin=playground-dt-review).\n\n## Status\n\n * ✅ No merge conflicts\n * ✅ Continuous integration tests have passed\n * ✅ Most recent commit is approved by a DT maintainer\n\nAll of the items on the list are green. **To merge, you need to post a comment including the string \"Ready to merge\"** to bring in your changes.\n\n----------------------\n... diagnostics scrubbed ..." + }, + { + "tag": "merge-offer", + "status": "@ITenthusiasm: Everything looks good here. I am ready to merge this PR (at 524bf6f) on your behalf whenever you think it's ready.\n\nIf you'd like that to happen, please post a comment saying:\n\n> Ready to merge\n\nand I'll merge this PR almost instantly. Thanks for helping out! :heart:\n\n(@loyd, @mlamp, @TitaneBoy, @reduckted, @teidesu, @wojtkowiak, @k-yle, @cwadrupldijjit: you can do this too.)" + }, + { + "tag": "wait-for-merge-offer-524bf6f", + "status": ":passport_control: Hi @k-yle,\n\nI can't [accept a pull request](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-make-a-pull-request) until all of the checks in the \"Status\" section of [this comment](#issuecomment-2221115037) are green. I will let you know once that happens.\n\nThanks, and happy typing!" + } + ], + "shouldClose": false, + "shouldMerge": false, + "shouldUpdateLabels": true +} diff --git a/packages/mergebot/src/commands/update-test-data.ts b/packages/mergebot/src/commands/update-test-data.ts index ad6ab37683..f7f2691353 100644 --- a/packages/mergebot/src/commands/update-test-data.ts +++ b/packages/mergebot/src/commands/update-test-data.ts @@ -1,13 +1,16 @@ import * as fs from "fs"; import * as path from "path"; import * as cachedQueries from "../util/cachedQueries"; +import { serialize } from "seroval"; +// eslint-disable-next-line import/no-extraneous-dependencies +import { format } from "prettier"; async function main() { let base = __dirname, dataPath = ""; - while (!fs.existsSync((dataPath = path.join(base, "src", "_tests", "cachedQueries.json")))) { + while (!fs.existsSync((dataPath = path.join(base, "src", "_tests", "cachedQueries.js")))) { const up = path.dirname(base); - if (up === base) throw new Error("Couldn't find cachedQueries.json"); + if (up === base) throw new Error("Couldn't find cachedQueries.js"); base = up; } @@ -17,11 +20,9 @@ async function main() { data[query] = await cachedQueries[query as keyof typeof cachedQueries](); } - await fs.promises.writeFile( - dataPath, - JSON.stringify({ comment: "Generate & update with `pnpm run update-test-data`", ...data }, undefined, 2) + "\n", - "utf8", - ); + const serialized = await format("module.exports = " + serialize(data), { filepath: dataPath }); + + await fs.promises.writeFile(dataPath, serialized, "utf8"); } main().then( diff --git a/packages/mergebot/src/execute-pr-actions.ts b/packages/mergebot/src/execute-pr-actions.ts index d3ba9d9061..0a3238e351 100644 --- a/packages/mergebot/src/execute-pr-actions.ts +++ b/packages/mergebot/src/execute-pr-actions.ts @@ -9,6 +9,7 @@ import { noNullish, flatten } from "./util/util"; import { tagsToDeleteIfNotPosted } from "./comments"; import * as comment from "./util/comment"; import { request } from "https"; +import { assertDefined } from "@definitelytyped/utils"; // https://github.com/orgs/DefinitelyTyped/projects/1 const projectBoardNumber = 1; @@ -138,7 +139,7 @@ async function getMutationsForProjectChanges(actions: Actions, pr: PR_repository itemId: prev.addProjectV2ItemById?.item?.id!, projectId, fieldId, - value: { singleSelectOptionId: columns.get(actions.projectColumn!) }, + value: { singleSelectOptionId: assertDefined(columns.get(actions.projectColumn!)) }, }), ]; } else { @@ -147,7 +148,7 @@ async function getMutationsForProjectChanges(actions: Actions, pr: PR_repository itemId: card.id, projectId, fieldId, - value: { singleSelectOptionId: columns.get(actions.projectColumn!) }, + value: { singleSelectOptionId: assertDefined(columns.get(actions.projectColumn!)) }, }), ]; } diff --git a/packages/mergebot/src/queries/label-columns-queries.ts b/packages/mergebot/src/queries/label-columns-queries.ts index ac58bd7a65..a14b713919 100644 --- a/packages/mergebot/src/queries/label-columns-queries.ts +++ b/packages/mergebot/src/queries/label-columns-queries.ts @@ -46,17 +46,18 @@ const getProjectColumns: TypedDocumentNode> { do { const results: GetProjectColumns = (await client.query({ query: getProjectColumns, variables: { cursor } })).data; const project = results.repository?.projectV2; - for (const card of noNullish(project?.items?.nodes)) { - if ( - card.fieldValueByName?.__typename === "ProjectV2ItemFieldSingleSelectValue" && - card.fieldValueByName.name && - card.fieldValueByName.optionId - ) { - columns.set(card.fieldValueByName.name, card.fieldValueByName.optionId); + for (const field of noNullish(project?.fields?.nodes)) { + if (field.__typename === "ProjectV2SingleSelectField" && field.name === "Status") { + for (const option of field.options) { + if ( + option.name && + option.id + ) { + columns.set(option.name, option.id); + } + } } } - cursor = project?.items.pageInfo.hasNextPage ? project.items.pageInfo.endCursor : null; + cursor = project?.fields.pageInfo.hasNextPage ? project.fields.pageInfo.endCursor : null; } while (cursor); return columns; } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 624e622b59..c964d7ba17 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -364,6 +364,9 @@ importers: rimraf: specifier: ^5.0.7 version: 5.0.7 + seroval: + specifier: ^1.0.7 + version: 1.0.7 ts-jest: specifier: ^29.1.2 version: 29.1.5(@babel/core@7.23.3)(esbuild@0.21.5)(jest@29.7.0)(typescript@5.5.2) @@ -710,7 +713,7 @@ packages: '@babel/traverse': 7.23.3 '@babel/types': 7.23.3 convert-source-map: 2.0.0 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4 gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -1008,7 +1011,7 @@ packages: '@babel/helper-split-export-declaration': 7.22.6 '@babel/parser': 7.23.3 '@babel/types': 7.23.3 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4 globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -1554,7 +1557,7 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4 espree: 9.6.1 globals: 13.23.0 ignore: 5.2.4 @@ -1588,7 +1591,7 @@ packages: deprecated: Use @eslint/config-array instead dependencies: '@humanwhocodes/object-schema': 2.0.3 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4 minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -2917,7 +2920,7 @@ packages: '@typescript-eslint/types': 7.14.1 '@typescript-eslint/typescript-estree': 7.14.1(typescript@5.5.2) '@typescript-eslint/visitor-keys': 7.14.1 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4 eslint: 8.57.0 typescript: 5.5.2 transitivePeerDependencies: @@ -2942,7 +2945,7 @@ packages: dependencies: '@typescript-eslint/typescript-estree': 7.14.1(typescript@5.5.2) '@typescript-eslint/utils': 7.14.1(eslint@8.57.0)(typescript@5.5.2) - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4 eslint: 8.57.0 ts-api-utils: 1.3.0(typescript@5.5.2) typescript: 5.5.2 @@ -2964,7 +2967,7 @@ packages: dependencies: '@typescript-eslint/types': 7.14.1 '@typescript-eslint/visitor-keys': 7.14.1 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.4 @@ -4461,6 +4464,17 @@ packages: dependencies: ms: 2.1.3 + /debug@4.3.4: + resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + dependencies: + ms: 2.1.2 + /debug@4.3.4(supports-color@8.1.1): resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} @@ -5031,7 +5045,7 @@ packages: '@es-joy/jsdoccomment': 0.41.0 are-docs-informative: 0.0.2 comment-parser: 1.4.1 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4 escape-string-regexp: 4.0.0 eslint: 8.57.0 esquery: 1.5.0 @@ -5069,7 +5083,7 @@ packages: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4 doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.2.2 @@ -6394,7 +6408,7 @@ packages: resolution: {integrity: sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==} engines: {node: '>=10'} dependencies: - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4 istanbul-lib-coverage: 3.2.2 source-map: 0.6.1 transitivePeerDependencies: @@ -8900,6 +8914,11 @@ packages: type-fest: 0.13.1 dev: true + /seroval@1.0.7: + resolution: {integrity: sha512-n6ZMQX5q0Vn19Zq7CIKNIo7E75gPkGCFUEqDpa8jgwpYr/vScjqnQ6H09t1uIiZ0ZSK0ypEGvrYK2bhBGWsGdw==} + engines: {node: '>=10'} + dev: true + /set-blocking@2.0.0: resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==}