Skip to content

Commit

Permalink
chore(deps): update dependency @octokit/tsconfig to v2 (#426)
Browse files Browse the repository at this point in the history
* chore(deps): update dependency @octokit/tsconfig to v2

* Add test tsconfig

* Import types to fix build

* npm run lint:fix

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Keegan Campbell <[email protected]>
  • Loading branch information
renovate[bot] and kfcampbell committed Jun 16, 2023
1 parent ddccc1a commit 315c188
Show file tree
Hide file tree
Showing 11 changed files with 50 additions and 25 deletions.
26 changes: 19 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@octokit/webhooks": "^10.0.0"
},
"devDependencies": {
"@octokit/tsconfig": "^1.0.2",
"@octokit/tsconfig": "^2.0.0",
"@types/jest": "^29.0.0",
"@types/node": "^18.0.0",
"@types/node-fetch": "^2.5.8",
Expand All @@ -47,7 +47,14 @@
"node": ">= 14"
},
"jest": {
"preset": "ts-jest",
"transform": {
"^.+\\.(ts|tsx)$": [
"ts-jest",
{
"tsconfig": "test/tsconfig.test.json"
}
]
},
"testEnvironment": "node",
"coverageThreshold": {
"global": {
Expand Down
5 changes: 4 additions & 1 deletion src/each-installation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import { composePaginateRest } from "@octokit/plugin-paginate-rest";
import { Octokit } from "@octokit/core";

import { App } from "./index";
import { EachInstallationFunction, EachInstallationInterface } from "./types";
import type {
EachInstallationFunction,
EachInstallationInterface,
} from "./types";
import { getInstallationOctokit } from "./get-installation-octokit";

export function eachInstallationFactory(app: App) {
Expand Down
2 changes: 1 addition & 1 deletion src/each-repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { composePaginateRest } from "@octokit/plugin-paginate-rest";
import { Octokit } from "@octokit/core";

import { App } from "./index";
import {
import type {
EachRepositoryFunction,
EachRepositoryInterface,
EachRepositoryQuery,
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { createAppAuth } from "@octokit/auth-app";
import { OAuthApp } from "@octokit/oauth-app";
import { Webhooks } from "@octokit/webhooks";

import {
import type {
Options,
ConstructorOptions,
EachInstallationInterface,
Expand Down
2 changes: 1 addition & 1 deletion src/middleware/node/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { createNodeMiddleware as webhooksNodeMiddleware } from "@octokit/webhook

import { App } from "../../index";
import { onUnhandledRequestDefault } from "./on-unhandled-request-default";
import { Options } from "../../types";
import type { Options } from "../../types";

export type MiddlewareOptions = {
pathPrefix?: string;
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Octokit } from "@octokit/core";
import { Endpoints } from "@octokit/types";
import type { Endpoints } from "@octokit/types";

export type Options = {
appId?: number | string;
Expand Down
4 changes: 2 additions & 2 deletions src/webhooks.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Octokit } from "@octokit/core";
import { createAppAuth } from "@octokit/auth-app";
import { createUnauthenticatedAuth } from "@octokit/auth-unauthenticated";
import { Webhooks, EmitterWebhookEvent } from "@octokit/webhooks";
import { Webhooks, type EmitterWebhookEvent } from "@octokit/webhooks";

import { Options } from "./types";
import type { Options } from "./types";

export function webhooks(
appOctokit: Octokit,
Expand Down
8 changes: 0 additions & 8 deletions test/tsconfig.json

This file was deleted.

9 changes: 9 additions & 0 deletions test/tsconfig.test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"emitDeclarationOnly": false,
"noEmit": true,
"verbatimModuleSyntax": false
},
"include": ["src/**/*"]
}
4 changes: 3 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@
"emitDeclarationOnly": true,
"sourceMap": true
},
"include": ["src/**/*"]
"include": [
"src/**/*"
]
}

0 comments on commit 315c188

Please sign in to comment.