Skip to content

Commit

Permalink
Export a no-op function in place of wrapExpressCreateRequestHandler.
Browse files Browse the repository at this point in the history
  • Loading branch information
onurtemizkan committed May 21, 2024
1 parent 80b8cc6 commit fb620b8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions packages/remix/src/index.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,20 @@ export function getDefaultIntegrations(options: RemixOptions): Integration[] {
];
}

/**
* Returns the given Express createRequestHandler function.
* This function is no-op and only returns the given function.
*
* @deprecated No need to wrap the Express request handler.
* @param createRequestHandlerFn The Remix Express `createRequestHandler`.
* @returns `createRequestHandler` function.
*/
export function wrapExpressCreateRequestHandler(createRequestHandlerFn: unknown): unknown {
DEBUG_BUILD && logger.warn('wrapExpressCreateRequestHandler is deprecated and no longer needed.');

return createRequestHandlerFn;
}

/** Initializes Sentry Remix SDK on Node. */
export function init(options: RemixOptions): void {
applySdkMetadata(options, 'remix', ['remix', 'node']);
Expand Down

0 comments on commit fb620b8

Please sign in to comment.