Skip to content

Commit ebb2ed1

Browse files
authored
Merge branch 'main' into fix-gcf
2 parents aac11fd + d2fb4a6 commit ebb2ed1

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

src/middleware/node/get-missing-headers.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// remove type imports from http for Deno compatibility
22
// see https://github.com/octokit/octokit.js/issues/24#issuecomment-817361886
3-
// import { IncomingMessage } from "http";
3+
// import type { IncomingMessage } from "node:http";
44
type IncomingMessage = any;
55

66
const WEBHOOK_HEADERS = [

src/middleware/node/get-payload.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
import AggregateError from "aggregate-error";
33

44
// remove type imports from http for Deno compatibility
5-
// see https://github.com/octokit/octokit.js/issues/24#issuecomment-817361886
6-
// import { IncomingMessage } from "http";
7-
// declare module "http" {
8-
// interface IncomingMessage {
9-
// body?: WebhookEvent | unknown;
10-
// }
5+
// see https://github.com/octokit/octokit.js/issues/2075#issuecomment-817361886
6+
// import type { IncomingMessage } from "node:http";
7+
// declare module "node:http" {
8+
// interface IncomingMessage {
9+
// body?: string;
10+
// }
1111
// }
1212
type IncomingMessage = any;
1313

src/middleware/node/middleware.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// remove type imports from http for Deno compatibility
22
// see https://github.com/octokit/octokit.js/issues/2075#issuecomment-817361886
3-
// import { IncomingMessage, ServerResponse } from "http";
3+
// import type { IncomingMessage, ServerResponse } from "node:http";
44
type IncomingMessage = any;
55
type ServerResponse = any;
66

src/middleware/node/on-unhandled-request-default.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// remove type imports from http for Deno compatibility
22
// see https://github.com/octokit/octokit.js/issues/24#issuecomment-817361886
3-
// import { IncomingMessage, ServerResponse } from "http";
3+
// import type { IncomingMessage, ServerResponse } from "node:http";
44
type IncomingMessage = any;
55
type ServerResponse = any;
66

test/typescript-validate.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
WebhookError,
66
createNodeMiddleware,
77
} from "../src/index.ts";
8-
import { createServer } from "http";
8+
import { createServer } from "node:http";
99
import type {
1010
HandlerFunction,
1111
RemoveHandlerFunction,

0 commit comments

Comments
 (0)