Skip to content

Commit bcf0185

Browse files
committed
fix(hono): Remove undefined from options type
1 parent 5d92988 commit bcf0185

4 files changed

Lines changed: 4 additions & 5 deletions

File tree

dev-packages/e2e-tests/test-applications/hono-4/src/entry.bun.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@ import { Hono } from 'hono';
22
import { sentry } from '@sentry/hono/bun';
33
import { addRoutes } from './routes';
44

5-
const app = new Hono<{ Bindings: { E2E_TEST_DSN: string } }>();
5+
const app = new Hono();
66

77
app.use(
8-
// @ts-expect-error - Env is not yet in type
98
sentry(app, {
109
dsn: process.env.E2E_TEST_DSN,
1110
environment: 'qa',

dev-packages/e2e-tests/test-applications/hono-4/src/routes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { Hono } from 'hono';
22
import { HTTPException } from 'hono/http-exception';
33

4-
export function addRoutes(app: Hono<{ Bindings: { E2E_TEST_DSN: string } }>): void {
4+
export function addRoutes(app: Hono<{ Bindings?: { E2E_TEST_DSN: string } }>): void {
55
app.get('/', c => {
66
return c.text('Hello Hono!');
77
});

packages/hono/src/bun/middleware.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export interface HonoBunOptions extends Options<BaseTransportOptions> {}
99
/**
1010
* Sentry middleware for Hono running in a Bun runtime environment.
1111
*/
12-
export const sentry = (app: Hono, options: HonoBunOptions | undefined = {}): MiddlewareHandler => {
12+
export const sentry = (app: Hono, options: HonoBunOptions): MiddlewareHandler => {
1313
const isDebug = options.debug;
1414

1515
isDebug && debug.log('Initialized Sentry Hono middleware (Bun)');

packages/hono/src/node/middleware.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export interface HonoNodeOptions extends Options<BaseTransportOptions> {}
99
/**
1010
* Sentry middleware for Hono running in a Node runtime environment.
1111
*/
12-
export const sentry = (app: Hono, options: HonoNodeOptions | undefined = {}): MiddlewareHandler => {
12+
export const sentry = (app: Hono, options: HonoNodeOptions): MiddlewareHandler => {
1313
const isDebug = options.debug;
1414

1515
isDebug && debug.log('Initialized Sentry Hono middleware (Node)');

0 commit comments

Comments
 (0)