Skip to content

Commit ce91ea3

Browse files
committed
ref: Small type adjustment
We used to have `shutdownTimeout` in the core client options, but this option only applies in node, so we can move it there. Also fixing a small unnecessary check I noticed along the way.
1 parent 0963af0 commit ce91ea3

File tree

3 files changed

+9
-12
lines changed

3 files changed

+9
-12
lines changed

packages/browser/src/sdk.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@ export function applyDefaultOptions(optionsArg: BrowserOptions = {}): BrowserOpt
5353
release:
5454
typeof __SENTRY_RELEASE__ === 'string' // This allows build tooling to find-and-replace __SENTRY_RELEASE__ to inject a release value
5555
? __SENTRY_RELEASE__
56-
: WINDOW.SENTRY_RELEASE?.id // This supports the variable that sentry-webpack-plugin injects
57-
? WINDOW.SENTRY_RELEASE.id
58-
: undefined,
56+
: WINDOW.SENTRY_RELEASE?.id, // This supports the variable that sentry-webpack-plugin injects
5957
sendClientReports: true,
6058
};
6159

packages/core/src/types-hoist/options.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -138,15 +138,6 @@ export interface ClientOptions<TO extends BaseTransportOptions = BaseTransportOp
138138
*/
139139
normalizeMaxBreadth?: number;
140140

141-
/**
142-
* Controls how many milliseconds to wait before shutting down. The default is
143-
* SDK-specific but typically around 2 seconds. Setting this too low can cause
144-
* problems for sending events from command line applications. Setting it too
145-
* high can cause the application to block for users with network connectivity
146-
* problems.
147-
*/
148-
shutdownTimeout?: number;
149-
150141
/**
151142
* A pattern for error messages which should not be sent to Sentry.
152143
* By default, all errors will be sent.

packages/node/src/types.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,14 @@ export interface BaseNodeOptions {
120120
*/
121121
disableInstrumentationWarnings?: boolean;
122122

123+
/**
124+
* Controls how many milliseconds to wait before shutting down. The default is 2 seconds. Setting this too low can cause
125+
* problems for sending events from command line applications. Setting it too
126+
* high can cause the application to block for users with network connectivity
127+
* problems.
128+
*/
129+
shutdownTimeout?: number;
130+
123131
/** Callback that is executed when a fatal global error occurs. */
124132
onFatalError?(this: void, error: Error): void;
125133
}

0 commit comments

Comments
 (0)