Skip to content

Commit 7c1e604

Browse files
committed
fix: Add pure and hide functions
1 parent 6687dd5 commit 7c1e604

File tree

7 files changed

+16
-9
lines changed

7 files changed

+16
-9
lines changed

packages/browser/src/eventbuilder.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { computeStackTrace } from './tracekit';
1616

1717
/**
1818
* Builds and Event from a Exception
19+
* @hidden
1920
*/
2021
export function eventFromException(options: Options, exception: any, hint?: EventHint): PromiseLike<Event> {
2122
const syntheticException = (hint && hint.syntheticException) || undefined;
@@ -35,6 +36,7 @@ export function eventFromException(options: Options, exception: any, hint?: Even
3536

3637
/**
3738
* Builds and Event from a Message
39+
* @hidden
3840
*/
3941
export function eventFromMessage(
4042
options: Options,
@@ -53,7 +55,9 @@ export function eventFromMessage(
5355
return SyncPromise.resolve(event);
5456
}
5557

56-
/** JSDoc */
58+
/**
59+
* @hidden
60+
*/
5761
export function eventFromUnknownInput(
5862
exception: unknown,
5963
syntheticException?: Error,
@@ -119,8 +123,9 @@ export function eventFromUnknownInput(
119123
return event;
120124
}
121125

122-
// this._options.attachStacktrace
123-
/** JSDoc */
126+
/**
127+
* @hidden
128+
*/
124129
export function eventFromString(
125130
input: string,
126131
syntheticException?: Error,

packages/browser/src/exports.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export {
3939

4040
export { BrowserOptions } from './backend';
4141
export { BrowserClient } from './client';
42-
export { ReportDialogOptions } from './helpers';
42+
export { injectReportDialog, ReportDialogOptions } from './helpers';
43+
export { eventFromException, eventFromMessage } from './eventbuilder';
4344
export { defaultIntegrations, forceLoad, init, lastEventId, onLoad, showReportDialog, flush, close, wrap } from './sdk';
4445
export { SDK_NAME, SDK_VERSION } from './version';

packages/browser/src/helpers.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ export interface ReportDialogOptions {
188188

189189
/**
190190
* Injects the Report Dialog script
191+
* @hidden
191192
*/
192193
export function injectReportDialog(options: ReportDialogOptions = {}): void {
193194
const script = document.createElement('script');

packages/browser/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ let windowIntegrations = {};
1010

1111
// This block is needed to add compatibility with the integrations packages when used with a CDN
1212
// tslint:disable: no-unsafe-any
13-
const _window = getGlobalObject<Window>();
13+
const _window = /*#__PURE__*/ getGlobalObject<Window>();
1414
if (_window.Sentry && _window.Sentry.Integrations) {
1515
windowIntegrations = _window.Sentry.Integrations;
1616
}

packages/browser/src/transports/fetch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { getGlobalObject, logger, parseRetryAfterHeader, supportsReferrerPolicy,
44

55
import { BaseTransport } from './base';
66

7-
const global = getGlobalObject<Window>();
7+
const global = /*#__PURE__*/ getGlobalObject<Window>();
88

99
/** `fetch` based transport */
1010
export class FetchTransport extends BaseTransport {

packages/node/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export {
3737
withScope,
3838
} from '@sentry/core';
3939

40-
export { NodeOptions } from './backend';
40+
export { NodeBackend, NodeOptions } from './backend';
4141
export { NodeClient } from './client';
4242
export { defaultIntegrations, init, lastEventId, flush, close } from './sdk';
4343
export { SDK_NAME, SDK_VERSION } from './version';
@@ -59,7 +59,7 @@ export { INTEGRATIONS as Integrations, Transports, Handlers };
5959

6060
// We need to patch domain on the global __SENTRY__ object to make it work for node
6161
// if we don't do this, browser bundlers will have troubles resolving require('domain')
62-
const carrier = getMainCarrier();
62+
const carrier = /*#__PURE__*/ getMainCarrier();
6363
if (carrier.__SENTRY__) {
6464
carrier.__SENTRY__.extensions = carrier.__SENTRY__.extensions || {};
6565
if (!carrier.__SENTRY__.extensions.domain) {

packages/node/src/integrations/http.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { fill, parseSemver } from '@sentry/utils';
44
import * as http from 'http';
55
import * as https from 'https';
66

7-
const NODE_VERSION = parseSemver(process.versions.node);
7+
const NODE_VERSION = /*#__PURE__*/ parseSemver(process.versions.node);
88

99
/** http module integration */
1010
export class Http implements Integration {

0 commit comments

Comments
 (0)