Skip to content

Commit

Permalink
fix: remove type imports from "http" for Deno compatibility (#235)
Browse files Browse the repository at this point in the history
  • Loading branch information
laughedelic authored Apr 17, 2021
1 parent 6741515 commit 256e722
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 13 deletions.
12 changes: 6 additions & 6 deletions package-lock.json

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

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
"dependencies": {
"@octokit/auth-app": "^3.3.0",
"@octokit/auth-unauthenticated": "^2.0.4",
"@octokit/core": "^3.2.0",
"@octokit/oauth-app": "^3.2.0",
"@octokit/plugin-paginate-rest": "^2.6.0",
"@octokit/types": "^6.0.3",
"@octokit/webhooks": "^9.0.0"
"@octokit/core": "^3.4.0",
"@octokit/oauth-app": "^3.3.2",
"@octokit/plugin-paginate-rest": "^2.13.3",
"@octokit/types": "^6.13.0",
"@octokit/webhooks": "^9.0.1"
},
"devDependencies": {
"@pika/pack": "^0.5.0",
Expand Down
6 changes: 5 additions & 1 deletion src/middleware/node/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { IncomingMessage, ServerResponse } from "http";
// remove type imports from http for Deno compatibility
// see https://github.com/octokit/octokit.js/issues/24#issuecomment-817361886
// import { IncomingMessage, ServerResponse } from "http";
type IncomingMessage = any;
type ServerResponse = any;

import { createNodeMiddleware as oauthNodeMiddleware } from "@octokit/oauth-app";
import { createNodeMiddleware as webhooksNodeMiddleware } from "@octokit/webhooks";
Expand Down
6 changes: 5 additions & 1 deletion src/middleware/node/on-unhandled-request-default.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { IncomingMessage, ServerResponse } from "http";
// remove type imports from http for Deno compatibility
// see https://github.com/octokit/octokit.js/issues/24#issuecomment-817361886
// import { IncomingMessage, ServerResponse } from "http";
type IncomingMessage = any;
type ServerResponse = any;

export function onUnhandledRequestDefault(
request: IncomingMessage,
Expand Down

0 comments on commit 256e722

Please sign in to comment.