From 4721d206ea719ba869b908bcf60e871e20de9dd5 Mon Sep 17 00:00:00 2001 From: gentlementlegen Date: Mon, 18 Nov 2024 01:46:01 +0900 Subject: [PATCH] chore: update packages and add exclude directory Replaced @octokit/core with @octokit/rest and excluded ./src/web in tsconfig. --- src/web/main.tsx | 6 +++--- tests/action.test.ts | 2 +- tests/get-activity.test.ts | 2 +- tests/parser/permit-generation-module.test.ts | 2 +- tests/pre-check.test.ts | 2 +- tests/price-label.test.ts | 2 +- tests/process.issue.test.ts | 2 +- tests/purging.test.ts | 2 +- tsconfig.json | 3 ++- 9 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/web/main.tsx b/src/web/main.tsx index 83608f7d..dbd23f45 100644 --- a/src/web/main.tsx +++ b/src/web/main.tsx @@ -10,9 +10,9 @@ function Form() { async function handleSubmit(event: InputEvent) { event.preventDefault(); setIsLoading(true); - const ownerRepo = `${event.target.owner.value}/${event.target.repo.value}`; - const issueId = event.target.issue_id.value; - const useOpenAi = event.target.openai.checked; + const ownerRepo = `${event.target?.owner.value}/${event.target?.repo.value}`; + const issueId = event.target?.issue_id.value; + const useOpenAi = event.target?.openai.checked; const payload = { ownerRepo, issueId, diff --git a/tests/action.test.ts b/tests/action.test.ts index 067a9653..f755fc9c 100644 --- a/tests/action.test.ts +++ b/tests/action.test.ts @@ -4,7 +4,7 @@ import { ContextPlugin } from "../src/types/plugin-input"; import { server } from "./__mocks__/node"; import cfg from "./__mocks__/results/valid-configuration.json"; import { Logs } from "@ubiquity-os/ubiquity-os-logger"; -import { Octokit } from "@octokit/core"; +import { Octokit } from "@octokit/rest"; import { paginateGraphQL } from "@octokit/plugin-paginate-graphql"; beforeAll(() => server.listen()); diff --git a/tests/get-activity.test.ts b/tests/get-activity.test.ts index f08699aa..97c218d5 100644 --- a/tests/get-activity.test.ts +++ b/tests/get-activity.test.ts @@ -1,6 +1,6 @@ import { beforeAll, describe, expect, it, jest } from "@jest/globals"; import { paginateGraphQL } from "@octokit/plugin-paginate-graphql"; -import { Octokit } from "@octokit/core"; +import { Octokit } from "@octokit/rest"; import { Logs } from "@ubiquity-os/ubiquity-os-logger"; import { IssueActivity } from "../src/issue-activity"; import { parseGitHubUrl } from "../src/start"; diff --git a/tests/parser/permit-generation-module.test.ts b/tests/parser/permit-generation-module.test.ts index d7976121..2a07bb4c 100644 --- a/tests/parser/permit-generation-module.test.ts +++ b/tests/parser/permit-generation-module.test.ts @@ -1,7 +1,7 @@ import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, it, jest } from "@jest/globals"; import { drop } from "@mswjs/data"; import { paginateGraphQL } from "@octokit/plugin-paginate-graphql"; -import { Octokit } from "@octokit/core"; +import { Octokit } from "@octokit/rest"; import { Logs } from "@ubiquity-os/ubiquity-os-logger"; import { CommentKind } from "../../src/configuration/comment-types"; import { EnvConfig } from "../../src/types/env-type"; diff --git a/tests/pre-check.test.ts b/tests/pre-check.test.ts index bc302fda..79e3b11b 100644 --- a/tests/pre-check.test.ts +++ b/tests/pre-check.test.ts @@ -1,7 +1,7 @@ import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, it, jest } from "@jest/globals"; import { drop } from "@mswjs/data"; import { paginateGraphQL } from "@octokit/plugin-paginate-graphql"; -import { Octokit } from "@octokit/core"; +import { Octokit } from "@octokit/rest"; import { Logs } from "@ubiquity-os/ubiquity-os-logger"; import { http, HttpResponse } from "msw"; import { ContextPlugin } from "../src/types/plugin-input"; diff --git a/tests/price-label.test.ts b/tests/price-label.test.ts index 9f752895..e68562a9 100644 --- a/tests/price-label.test.ts +++ b/tests/price-label.test.ts @@ -3,7 +3,7 @@ import { afterAll, afterEach, beforeAll, expect, it, jest } from "@jest/globals" import cfg from "./__mocks__/results/valid-configuration.json"; import { ContextPlugin } from "../src/types/plugin-input"; import { Logs } from "@ubiquity-os/ubiquity-os-logger"; -import { Octokit } from "@octokit/core"; +import { Octokit } from "@octokit/rest"; beforeAll(() => server.listen()); afterEach(() => server.resetHandlers()); diff --git a/tests/process.issue.test.ts b/tests/process.issue.test.ts index bd90511f..c048a698 100644 --- a/tests/process.issue.test.ts +++ b/tests/process.issue.test.ts @@ -2,7 +2,7 @@ import { afterEach, beforeEach, describe, expect, it, jest } from "@jest/globals"; import { paginateGraphQL } from "@octokit/plugin-paginate-graphql"; -import { Octokit } from "@octokit/core"; +import { Octokit } from "@octokit/rest"; import { Logs } from "@ubiquity-os/ubiquity-os-logger"; import fs from "fs"; import { http, passthrough } from "msw"; diff --git a/tests/purging.test.ts b/tests/purging.test.ts index c1cc11a5..71dbb7b1 100644 --- a/tests/purging.test.ts +++ b/tests/purging.test.ts @@ -1,7 +1,7 @@ import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, it, jest } from "@jest/globals"; import { drop } from "@mswjs/data"; import { paginateGraphQL } from "@octokit/plugin-paginate-graphql"; -import { Octokit } from "@octokit/core"; +import { Octokit } from "@octokit/rest"; import { Logs } from "@ubiquity-os/ubiquity-os-logger"; import { GitHubIssueComment } from "../src/github-types"; import { ContentEvaluatorModule } from "../src/parser/content-evaluator-module"; diff --git a/tsconfig.json b/tsconfig.json index 0ecbffce..b4add807 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -105,5 +105,6 @@ /* Completeness */ // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ "skipLibCheck": true /* Skip type checking all .d.ts files. */ - } + }, + "exclude": ["./src/web"] }