Skip to content

Commit e8f1ad2

Browse files
committed
import types from wrappers rather than withSentry specifically
1 parent 9533755 commit e8f1ad2

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

packages/nextjs/src/config/templates/apiProxyLoaderTemplate.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ import * as origModule from '__RESOURCE_PATH__';
1212
import * as Sentry from '@sentry/nextjs';
1313
import type { PageConfig } from 'next';
1414

15-
// We import this from `withSentry` rather than directly from `next` because our version can work simultaneously with
16-
// multiple versions of next. See note in `withSentry` for more.
17-
import type { NextApiHandler } from '../wrappers/withSentry';
15+
// We import this from `wrappers` rather than directly from `next` because our version can work simultaneously with
16+
// multiple versions of next. See note in `wrappers/withSentry` for more.
17+
import type { NextApiHandler } from '../wrappers';
1818

1919
type NextApiModule = {
2020
default: NextApiHandler;

packages/nextjs/src/config/wrappers/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
export type { AugmentedNextApiResponse, NextApiHandler, WrappedNextApiHandler } from './withSentry';
2+
13
export { withSentryGetStaticProps } from './withSentryGetStaticProps';
24
export { withSentryServerSideGetInitialProps } from './withSentryServerSideGetInitialProps';
35
export { withSentryServerSideAppGetInitialProps } from './withSentryServerSideAppGetInitialProps';

packages/nextjs/test/config/withSentry.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Client, ClientOptions } from '@sentry/types';
44
import * as utils from '@sentry/utils';
55
import { NextApiHandler, NextApiRequest, NextApiResponse } from 'next';
66

7-
import { AugmentedNextApiResponse, withSentry, WrappedNextApiHandler } from '../../src/config/wrappers/withSentry';
7+
import { AugmentedNextApiResponse, withSentry, WrappedNextApiHandler } from '../../src/config/wrappers';
88

99
const FLUSH_DURATION = 200;
1010

0 commit comments

Comments
 (0)