Skip to content

Commit ceb003c

Browse files
authored
ref(core): Remove utils-hoist folder (#16639)
This was a leftover from migrating of the `@sentry/utils` package to core. This PR merges the former utils together into the `core/src/utils` directory, which should make this a bit easier to follow/find.
1 parent a34ad66 commit ceb003c

File tree

151 files changed

+320
-334
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

151 files changed

+320
-334
lines changed

packages/core/.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
module.exports = {
22
extends: ['../../.eslintrc.js'],
3-
ignorePatterns: ['rollup.npm.config.mjs', 'test/utils-hoist/buildPolyfills/originals.js'],
3+
ignorePatterns: ['rollup.npm.config.mjs'],
44
};

packages/core/src/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { ReportDialogOptions } from './report-dialog';
22
import type { DsnComponents, DsnLike } from './types-hoist/dsn';
33
import type { SdkInfo } from './types-hoist/sdkinfo';
4-
import { dsnToString, makeDsn } from './utils-hoist/dsn';
4+
import { dsnToString, makeDsn } from './utils/dsn';
55

66
const SENTRY_API_VERSION = '7';
77

packages/core/src/asyncContext/stackStrategy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { Client } from '../client';
22
import { getDefaultCurrentScope, getDefaultIsolationScope } from '../defaultScopes';
33
import { Scope } from '../scope';
4-
import { isThenable } from '../utils-hoist/is';
4+
import { isThenable } from '../utils/is';
55
import { getMainCarrier, getSentryCarrier } from './../carrier';
66
import type { AsyncContextStrategy } from './types';
77

packages/core/src/breadcrumbs.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { getClient, getIsolationScope } from './currentScopes';
22
import type { Breadcrumb, BreadcrumbHint } from './types-hoist/breadcrumb';
3-
import { consoleSandbox } from './utils-hoist/logger';
4-
import { dateTimestampInSeconds } from './utils-hoist/time';
3+
import { consoleSandbox } from './utils/logger';
4+
import { dateTimestampInSeconds } from './utils/time';
55

66
/**
77
* Default maximum number of breadcrumbs added to an event. Can be overwritten

packages/core/src/carrier.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import type { AsyncContextStack } from './asyncContext/stackStrategy';
22
import type { AsyncContextStrategy } from './asyncContext/types';
33
import type { Scope } from './scope';
4-
import type { Logger } from './utils-hoist/logger';
5-
import { SDK_VERSION } from './utils-hoist/version';
6-
import { GLOBAL_OBJ } from './utils-hoist/worldwide';
4+
import type { Logger } from './utils/logger';
5+
import { SDK_VERSION } from './utils/version';
6+
import { GLOBAL_OBJ } from './utils/worldwide';
77

88
/**
99
* An object that contains globally accessible properties and maintains a scope stack.

packages/core/src/checkin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import type { SerializedCheckIn } from './types-hoist/checkin';
22
import type { DsnComponents } from './types-hoist/dsn';
33
import type { CheckInEnvelope, CheckInItem, DynamicSamplingContext } from './types-hoist/envelope';
44
import type { SdkMetadata } from './types-hoist/sdkmetadata';
5-
import { dsnToString } from './utils-hoist/dsn';
6-
import { createEnvelope } from './utils-hoist/envelope';
5+
import { dsnToString } from './utils/dsn';
6+
import { createEnvelope } from './utils/envelope';
77

88
/**
99
* Create envelope from check in item.

packages/core/src/client.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,19 @@ import type { SeverityLevel } from './types-hoist/severity';
3232
import type { Span, SpanAttributes, SpanContextData, SpanJSON } from './types-hoist/span';
3333
import type { StartSpanOptions } from './types-hoist/startSpanOptions';
3434
import type { Transport, TransportMakeRequestResponse } from './types-hoist/transport';
35+
import { createClientReportEnvelope } from './utils/clientreport';
36+
import { dsnToString, makeDsn } from './utils/dsn';
37+
import { addItemToEnvelope, createAttachmentEnvelopeItem } from './utils/envelope';
3538
import { getPossibleEventMessages } from './utils/eventUtils';
39+
import { isParameterizedString, isPlainObject, isPrimitive, isThenable } from './utils/is';
40+
import { logger } from './utils/logger';
3641
import { merge } from './utils/merge';
42+
import { checkOrSetAlreadyCaught, uuid4 } from './utils/misc';
3743
import { parseSampleRate } from './utils/parseSampleRate';
3844
import { prepareEvent } from './utils/prepareEvent';
3945
import { getActiveSpan, showSpanDropWarning, spanToTraceContext } from './utils/spanUtils';
46+
import { rejectedSyncPromise, resolvedSyncPromise, SyncPromise } from './utils/syncpromise';
4047
import { convertSpanJsonToTransactionEvent, convertTransactionEventToSpanJson } from './utils/transactionEvent';
41-
import { createClientReportEnvelope } from './utils-hoist/clientreport';
42-
import { dsnToString, makeDsn } from './utils-hoist/dsn';
43-
import { addItemToEnvelope, createAttachmentEnvelopeItem } from './utils-hoist/envelope';
44-
import { isParameterizedString, isPlainObject, isPrimitive, isThenable } from './utils-hoist/is';
45-
import { logger } from './utils-hoist/logger';
46-
import { checkOrSetAlreadyCaught, uuid4 } from './utils-hoist/misc';
47-
import { rejectedSyncPromise, resolvedSyncPromise, SyncPromise } from './utils-hoist/syncpromise';
4848

4949
const ALREADY_SEEN_ERROR = "Not capturing exception because it's already been captured.";
5050
const MISSING_RELEASE_FOR_SESSION_ERROR = 'Discarded session because of missing or non-string release';

packages/core/src/currentScopes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { getGlobalSingleton, getMainCarrier } from './carrier';
33
import type { Client } from './client';
44
import { Scope } from './scope';
55
import type { TraceContext } from './types-hoist/context';
6-
import { generateSpanId } from './utils-hoist/propagationContext';
6+
import { generateSpanId } from './utils/propagationContext';
77

88
/**
99
* Get the currently active scope.

packages/core/src/envelope.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ import type { Event } from './types-hoist/event';
1818
import type { SdkInfo } from './types-hoist/sdkinfo';
1919
import type { SdkMetadata } from './types-hoist/sdkmetadata';
2020
import type { Session, SessionAggregates } from './types-hoist/session';
21-
import { showSpanDropWarning, spanToJSON } from './utils/spanUtils';
22-
import { dsnToString } from './utils-hoist/dsn';
21+
import { dsnToString } from './utils/dsn';
2322
import {
2423
createEnvelope,
2524
createEventEnvelopeHeaders,
2625
createSpanEnvelopeItem,
2726
getSdkMetadataForEnvelopeHeader,
28-
} from './utils-hoist/envelope';
29-
import { uuid4 } from './utils-hoist/misc';
27+
} from './utils/envelope';
28+
import { uuid4 } from './utils/misc';
29+
import { showSpanDropWarning, spanToJSON } from './utils/spanUtils';
3030

3131
/**
3232
* Apply SdkInfo (name, version, packages, integrations) to the corresponding event key.

packages/core/src/eventProcessors.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { DEBUG_BUILD } from './debug-build';
22
import type { Event, EventHint } from './types-hoist/event';
33
import type { EventProcessor } from './types-hoist/eventprocessor';
4-
import { isThenable } from './utils-hoist/is';
5-
import { logger } from './utils-hoist/logger';
6-
import { SyncPromise } from './utils-hoist/syncpromise';
4+
import { isThenable } from './utils/is';
5+
import { logger } from './utils/logger';
6+
import { SyncPromise } from './utils/syncpromise';
77

88
/**
99
* Process an array of event processors, returning the processed event (or `null` if the event was dropped).

packages/core/src/exports.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ import type { Primitive } from './types-hoist/misc';
1010
import type { Session, SessionContext } from './types-hoist/session';
1111
import type { SeverityLevel } from './types-hoist/severity';
1212
import type { User } from './types-hoist/user';
13+
import { isThenable } from './utils/is';
14+
import { logger } from './utils/logger';
15+
import { uuid4 } from './utils/misc';
1316
import type { ExclusiveEventHintOrCaptureContext } from './utils/prepareEvent';
1417
import { parseEventHintOrCaptureContext } from './utils/prepareEvent';
15-
import { isThenable } from './utils-hoist/is';
16-
import { logger } from './utils-hoist/logger';
17-
import { uuid4 } from './utils-hoist/misc';
18-
import { timestampInSeconds } from './utils-hoist/time';
19-
import { GLOBAL_OBJ } from './utils-hoist/worldwide';
18+
import { timestampInSeconds } from './utils/time';
19+
import { GLOBAL_OBJ } from './utils/worldwide';
2020

2121
/**
2222
* Captures an exception event and sends it to Sentry.

packages/core/src/fetch.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ import { SentryNonRecordingSpan } from './tracing/sentryNonRecordingSpan';
55
import type { FetchBreadcrumbHint } from './types-hoist/breadcrumb';
66
import type { HandlerDataFetch } from './types-hoist/instrument';
77
import type { Span, SpanAttributes, SpanOrigin } from './types-hoist/span';
8+
import { SENTRY_BAGGAGE_KEY_PREFIX } from './utils/baggage';
89
import { hasSpansEnabled } from './utils/hasSpansEnabled';
10+
import { isInstanceOf, isRequest } from './utils/is';
911
import { getActiveSpan } from './utils/spanUtils';
1012
import { getTraceData } from './utils/traceData';
11-
import { SENTRY_BAGGAGE_KEY_PREFIX } from './utils-hoist/baggage';
12-
import { isInstanceOf, isRequest } from './utils-hoist/is';
13-
import { getSanitizedUrlStringFromUrlObject, isURLObjectRelative, parseStringToURLObject } from './utils-hoist/url';
13+
import { getSanitizedUrlStringFromUrlObject, isURLObjectRelative, parseStringToURLObject } from './utils/url';
1414

1515
type PolymorphicRequestHeaders =
1616
| Record<string, string | undefined>

packages/core/src/index.ts

Lines changed: 47 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -133,24 +133,19 @@ export {
133133
_INTERNAL_MAX_FLAGS_PER_SPAN,
134134
} from './utils/featureFlags';
135135

136-
export { applyAggregateErrorsToEvent } from './utils-hoist/aggregate-errors';
137-
export { getBreadcrumbLogLevelFromHttpStatusCode } from './utils-hoist/breadcrumb-log-level';
138-
export { getComponentName, getLocationHref, htmlTreeAsString } from './utils-hoist/browser';
139-
export { dsnFromString, dsnToString, makeDsn } from './utils-hoist/dsn';
136+
export { applyAggregateErrorsToEvent } from './utils/aggregate-errors';
137+
export { getBreadcrumbLogLevelFromHttpStatusCode } from './utils/breadcrumb-log-level';
138+
export { getComponentName, getLocationHref, htmlTreeAsString } from './utils/browser';
139+
export { dsnFromString, dsnToString, makeDsn } from './utils/dsn';
140140
// eslint-disable-next-line deprecation/deprecation
141-
export { SentryError } from './utils-hoist/error';
142-
export { GLOBAL_OBJ } from './utils-hoist/worldwide';
143-
export type { InternalGlobal } from './utils-hoist/worldwide';
144-
export { addConsoleInstrumentationHandler } from './utils-hoist/instrument/console';
145-
export { addFetchEndInstrumentationHandler, addFetchInstrumentationHandler } from './utils-hoist/instrument/fetch';
146-
export { addGlobalErrorInstrumentationHandler } from './utils-hoist/instrument/globalError';
147-
export { addGlobalUnhandledRejectionInstrumentationHandler } from './utils-hoist/instrument/globalUnhandledRejection';
148-
export {
149-
addHandler,
150-
maybeInstrument,
151-
resetInstrumentationHandlers,
152-
triggerHandlers,
153-
} from './utils-hoist/instrument/handlers';
141+
export { SentryError } from './utils/error';
142+
export { GLOBAL_OBJ } from './utils/worldwide';
143+
export type { InternalGlobal } from './utils/worldwide';
144+
export { addConsoleInstrumentationHandler } from './instrument/console';
145+
export { addFetchEndInstrumentationHandler, addFetchInstrumentationHandler } from './instrument/fetch';
146+
export { addGlobalErrorInstrumentationHandler } from './instrument/globalError';
147+
export { addGlobalUnhandledRejectionInstrumentationHandler } from './instrument/globalUnhandledRejection';
148+
export { addHandler, maybeInstrument, resetInstrumentationHandlers, triggerHandlers } from './instrument/handlers';
154149
export {
155150
isDOMError,
156151
isDOMException,
@@ -167,10 +162,10 @@ export {
167162
isSyntheticEvent,
168163
isThenable,
169164
isVueViewModel,
170-
} from './utils-hoist/is';
171-
export { isBrowser } from './utils-hoist/isBrowser';
172-
export { CONSOLE_LEVELS, consoleSandbox, logger, originalConsoleMethods } from './utils-hoist/logger';
173-
export type { Logger } from './utils-hoist/logger';
165+
} from './utils/is';
166+
export { isBrowser } from './utils/isBrowser';
167+
export { CONSOLE_LEVELS, consoleSandbox, logger, originalConsoleMethods } from './utils/logger';
168+
export type { Logger } from './utils/logger';
174169
export {
175170
addContextToFrame,
176171
addExceptionMechanism,
@@ -179,9 +174,9 @@ export {
179174
getEventDescription,
180175
parseSemver,
181176
uuid4,
182-
} from './utils-hoist/misc';
183-
export { isNodeEnv, loadModule } from './utils-hoist/node';
184-
export { normalize, normalizeToSize, normalizeUrlToBase } from './utils-hoist/normalize';
177+
} from './utils/misc';
178+
export { isNodeEnv, loadModule } from './utils/node';
179+
export { normalize, normalizeToSize, normalizeUrlToBase } from './utils/normalize';
185180
export {
186181
addNonEnumerableProperty,
187182
convertToPlainObject,
@@ -192,21 +187,21 @@ export {
192187
getOriginalFunction,
193188
markFunctionWrapped,
194189
objectify,
195-
} from './utils-hoist/object';
196-
export { basename, dirname, isAbsolute, join, normalizePath, relative, resolve } from './utils-hoist/path';
197-
export { makePromiseBuffer, SENTRY_BUFFER_FULL_ERROR } from './utils-hoist/promisebuffer';
198-
export type { PromiseBuffer } from './utils-hoist/promisebuffer';
199-
export { severityLevelFromString } from './utils-hoist/severity';
190+
} from './utils/object';
191+
export { basename, dirname, isAbsolute, join, normalizePath, relative, resolve } from './utils/path';
192+
export { makePromiseBuffer, SENTRY_BUFFER_FULL_ERROR } from './utils/promisebuffer';
193+
export type { PromiseBuffer } from './utils/promisebuffer';
194+
export { severityLevelFromString } from './utils/severity';
200195
export {
201196
UNKNOWN_FUNCTION,
202197
createStackParser,
203198
getFramesFromEvent,
204199
getFunctionName,
205200
stackParserFromStackParserOptions,
206201
stripSentryFramesAndReverse,
207-
} from './utils-hoist/stacktrace';
208-
export { filenameIsInApp, node, nodeStackLineParser } from './utils-hoist/node-stack-trace';
209-
export { isMatchingPattern, safeJoin, snipLine, stringMatchesSomePattern, truncate } from './utils-hoist/string';
202+
} from './utils/stacktrace';
203+
export { filenameIsInApp, node, nodeStackLineParser } from './utils/node-stack-trace';
204+
export { isMatchingPattern, safeJoin, snipLine, stringMatchesSomePattern, truncate } from './utils/string';
210205
export {
211206
isNativeFunction,
212207
supportsDOMError,
@@ -219,17 +214,17 @@ export {
219214
// eslint-disable-next-line deprecation/deprecation
220215
supportsReferrerPolicy,
221216
supportsReportingObserver,
222-
} from './utils-hoist/supports';
223-
export { SyncPromise, rejectedSyncPromise, resolvedSyncPromise } from './utils-hoist/syncpromise';
224-
export { browserPerformanceTimeOrigin, dateTimestampInSeconds, timestampInSeconds } from './utils-hoist/time';
217+
} from './utils/supports';
218+
export { SyncPromise, rejectedSyncPromise, resolvedSyncPromise } from './utils/syncpromise';
219+
export { browserPerformanceTimeOrigin, dateTimestampInSeconds, timestampInSeconds } from './utils/time';
225220
export {
226221
TRACEPARENT_REGEXP,
227222
extractTraceparentData,
228223
generateSentryTraceHeader,
229224
propagationContextFromHeaders,
230-
} from './utils-hoist/tracing';
231-
export { getSDKSource, isBrowserBundle } from './utils-hoist/env';
232-
export type { SdkSource } from './utils-hoist/env';
225+
} from './utils/tracing';
226+
export { getSDKSource, isBrowserBundle } from './utils/env';
227+
export type { SdkSource } from './utils/env';
233228
export {
234229
addItemToEnvelope,
235230
createAttachmentEnvelopeItem,
@@ -242,16 +237,16 @@ export {
242237
getSdkMetadataForEnvelopeHeader,
243238
parseEnvelope,
244239
serializeEnvelope,
245-
} from './utils-hoist/envelope';
246-
export { createClientReportEnvelope } from './utils-hoist/clientreport';
240+
} from './utils/envelope';
241+
export { createClientReportEnvelope } from './utils/clientreport';
247242
export {
248243
DEFAULT_RETRY_AFTER,
249244
disabledUntil,
250245
isRateLimited,
251246
parseRetryAfterHeader,
252247
updateRateLimits,
253-
} from './utils-hoist/ratelimit';
254-
export type { RateLimits } from './utils-hoist/ratelimit';
248+
} from './utils/ratelimit';
249+
export type { RateLimits } from './utils/ratelimit';
255250
export {
256251
MAX_BAGGAGE_STRING_LENGTH,
257252
SENTRY_BAGGAGE_KEY_PREFIX,
@@ -260,7 +255,7 @@ export {
260255
dynamicSamplingContextToSentryBaggageHeader,
261256
parseBaggageHeader,
262257
objectToBaggageHeader,
263-
} from './utils-hoist/baggage';
258+
} from './utils/baggage';
264259
export {
265260
getSanitizedUrlString,
266261
parseUrl,
@@ -269,20 +264,15 @@ export {
269264
getHttpSpanDetailsFromUrlObject,
270265
isURLObjectRelative,
271266
getSanitizedUrlStringFromUrlObject,
272-
} from './utils-hoist/url';
273-
export {
274-
eventFromMessage,
275-
eventFromUnknownInput,
276-
exceptionFromError,
277-
parseStackFrames,
278-
} from './utils-hoist/eventbuilder';
279-
export { callFrameToStackFrame, watchdogTimer } from './utils-hoist/anr';
280-
export { LRUMap } from './utils-hoist/lru';
281-
export { generateTraceId, generateSpanId } from './utils-hoist/propagationContext';
282-
export { vercelWaitUntil } from './utils-hoist/vercelWaitUntil';
283-
export { SDK_VERSION } from './utils-hoist/version';
284-
export { getDebugImagesForResources, getFilenameToDebugIdMap } from './utils-hoist/debug-ids';
285-
export { escapeStringForRegex } from './utils-hoist/vendor/escapeStringForRegex';
267+
} from './utils/url';
268+
export { eventFromMessage, eventFromUnknownInput, exceptionFromError, parseStackFrames } from './utils/eventbuilder';
269+
export { callFrameToStackFrame, watchdogTimer } from './utils/anr';
270+
export { LRUMap } from './utils/lru';
271+
export { generateTraceId, generateSpanId } from './utils/propagationContext';
272+
export { vercelWaitUntil } from './utils/vercelWaitUntil';
273+
export { SDK_VERSION } from './utils/version';
274+
export { getDebugImagesForResources, getFilenameToDebugIdMap } from './utils/debug-ids';
275+
export { escapeStringForRegex } from './vendor/escapeStringForRegex';
286276

287277
export type { Attachment } from './types-hoist/attachment';
288278
export type {

packages/core/src/utils-hoist/instrument/console.ts renamed to packages/core/src/instrument/console.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/* eslint-disable @typescript-eslint/no-explicit-any */
22
/* eslint-disable @typescript-eslint/ban-types */
3-
import type { ConsoleLevel, HandlerDataConsole } from '../../types-hoist/instrument';
4-
import { CONSOLE_LEVELS, originalConsoleMethods } from '../logger';
5-
import { fill } from '../object';
6-
import { GLOBAL_OBJ } from '../worldwide';
3+
import type { ConsoleLevel, HandlerDataConsole } from '../types-hoist/instrument';
4+
import { CONSOLE_LEVELS, originalConsoleMethods } from '../utils/logger';
5+
import { fill } from '../utils/object';
6+
import { GLOBAL_OBJ } from '../utils/worldwide';
77
import { addHandler, maybeInstrument, triggerHandlers } from './handlers';
88

99
/**

packages/core/src/utils-hoist/instrument/fetch.ts renamed to packages/core/src/instrument/fetch.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/* eslint-disable @typescript-eslint/no-explicit-any */
2-
import type { HandlerDataFetch } from '../../types-hoist/instrument';
3-
import type { WebFetchHeaders } from '../../types-hoist/webfetchapi';
4-
import { isError, isRequest } from '../is';
5-
import { addNonEnumerableProperty, fill } from '../object';
6-
import { supportsNativeFetch } from '../supports';
7-
import { timestampInSeconds } from '../time';
8-
import { GLOBAL_OBJ } from '../worldwide';
2+
import type { HandlerDataFetch } from '../types-hoist/instrument';
3+
import type { WebFetchHeaders } from '../types-hoist/webfetchapi';
4+
import { isError, isRequest } from '../utils/is';
5+
import { addNonEnumerableProperty, fill } from '../utils/object';
6+
import { supportsNativeFetch } from '../utils/supports';
7+
import { timestampInSeconds } from '../utils/time';
8+
import { GLOBAL_OBJ } from '../utils/worldwide';
99
import { addHandler, maybeInstrument, triggerHandlers } from './handlers';
1010

1111
type FetchResource = string | { toString(): string } | { url: string };

packages/core/src/utils-hoist/instrument/globalError.ts renamed to packages/core/src/instrument/globalError.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { HandlerDataError } from '../../types-hoist/instrument';
2-
import { GLOBAL_OBJ } from '../worldwide';
1+
import type { HandlerDataError } from '../types-hoist/instrument';
2+
import { GLOBAL_OBJ } from '../utils/worldwide';
33
import { addHandler, maybeInstrument, triggerHandlers } from './handlers';
44

55
let _oldOnErrorHandler: (typeof GLOBAL_OBJ)['onerror'] | null = null;

packages/core/src/utils-hoist/instrument/globalUnhandledRejection.ts renamed to packages/core/src/instrument/globalUnhandledRejection.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { HandlerDataUnhandledRejection } from '../../types-hoist/instrument';
2-
import { GLOBAL_OBJ } from '../worldwide';
1+
import type { HandlerDataUnhandledRejection } from '../types-hoist/instrument';
2+
import { GLOBAL_OBJ } from '../utils/worldwide';
33
import { addHandler, maybeInstrument, triggerHandlers } from './handlers';
44

55
let _oldOnUnhandledRejectionHandler: (typeof GLOBAL_OBJ)['onunhandledrejection'] | null = null;

packages/core/src/utils-hoist/instrument/handlers.ts renamed to packages/core/src/instrument/handlers.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { DEBUG_BUILD } from '../../debug-build';
2-
import { logger } from '../logger';
3-
import { getFunctionName } from '../stacktrace';
1+
import { DEBUG_BUILD } from '../debug-build';
2+
import { logger } from '../utils/logger';
3+
import { getFunctionName } from '../utils/stacktrace';
44

55
export type InstrumentHandlerType =
66
| 'console'

0 commit comments

Comments
 (0)