Skip to content

Commit 32a35c1

Browse files
committed
Include getInitialProps in some comments
1 parent 521d21a commit 32a35c1

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

packages/nextjs/src/config/loaders/dataFetchersLoader.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ function wrapFunctions(userCode: string, templateCode: string, filepath: string)
100100
}
101101

102102
/**
103-
* Wrap `getStaticProps` and `getServerSideProps` (if they exist) in the given page code
103+
* Wrap `getInitialProps`, `getStaticProps` and `getServerSideProps` (if they exist) in the given page code
104104
*/
105105
export default function wrapDataFetchersLoader(this: LoaderThis<LoaderOptions>, userCode: string): string {
106106
// For now this loader only works for ESM code

packages/nextjs/src/config/types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export type UserSentryOptions = {
5151
widenClientFileUpload?: boolean;
5252

5353
experiments?: {
54-
// Automatically wrap `getServerSideProps` and `getStaticProps` in order to instrument them for tracing.
54+
// Automatically wrap `getInitialProps`, `getServerSideProps` and `getStaticProps` in order to instrument them for tracing.
5555
autoWrapDataFetchers?: boolean;
5656
};
5757
};

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { DataFetchingFunction } from './types';
44
* Pass-through wrapper for the original function, used as a first step in eventually wrapping the data-fetching
55
* functions with code for tracing.
66
*
7-
* @template T Types for `getStaticProps` and `getServerSideProps`
8-
* @param origFunction The user's exported `getStaticProps` or `getServerSideProps` function
7+
* @template T Types for `getStaticProps`, `getInitialProps` and `getServerSideProps`
8+
* @param origFunction The user's exported `getStaticProps`, `getInitialProps` or `getServerSideProps` function
99
* @param context The context object passed by nextjs to the function
1010
* @returns The result of calling the user's function
1111
*/

0 commit comments

Comments
 (0)