diff --git a/packages/core/src/rum/DdRum.ts b/packages/core/src/rum/DdRum.ts index 059abcd26..48ea71d77 100644 --- a/packages/core/src/rum/DdRum.ts +++ b/packages/core/src/rum/DdRum.ts @@ -8,10 +8,10 @@ import type { GestureResponderEvent } from 'react-native'; import { InternalLog } from '../InternalLog'; import { SdkVerbosity } from '../SdkVerbosity'; -import { TimeProvider } from '../TimeProvider'; import type { DdNativeRumType } from '../nativeModulesTypes'; import { bufferVoidNativeCall } from '../sdk/DatadogProvider/Buffer/bufferNativeCall'; import { DdSdk } from '../sdk/DdSdk'; +import { TimeProvider } from '../utils/TimeProvider'; import type { ActionEventMapper } from './eventMappers/actionEventMapper'; import { generateActionEventMapper } from './eventMappers/actionEventMapper'; diff --git a/packages/core/src/rum/__tests__/DdRum.test.ts b/packages/core/src/rum/__tests__/DdRum.test.ts index 9f1e0cd34..4f946e25c 100644 --- a/packages/core/src/rum/__tests__/DdRum.test.ts +++ b/packages/core/src/rum/__tests__/DdRum.test.ts @@ -15,7 +15,7 @@ import type { ErrorEventMapper } from '../eventMappers/errorEventMapper'; import type { ResourceEventMapper } from '../eventMappers/resourceEventMapper'; import { ErrorSource, PropagatorType, RumActionType } from '../types'; -jest.mock('../../TimeProvider', () => { +jest.mock('../../utils/TimeProvider', () => { return { TimeProvider: jest.fn().mockImplementation(() => { return { now: jest.fn().mockReturnValue(456) }; diff --git a/packages/core/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.ts b/packages/core/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.ts index ff776509e..e68229af0 100644 --- a/packages/core/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.ts +++ b/packages/core/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.ts @@ -4,7 +4,7 @@ * Copyright 2016-Present Datadog, Inc. */ -import Timer from '../../../../../Timer'; +import Timer from '../../../../../utils/Timer'; import { getTracingHeaders } from '../../distributedTracing/distributedTracingHeaders'; import type { DdRumResourceTracingAttributes } from '../../distributedTracing/distributedTracing'; import { getTracingAttributes } from '../../distributedTracing/distributedTracing'; diff --git a/packages/core/src/sdk/DatadogProvider/__tests__/initialization.test.tsx b/packages/core/src/sdk/DatadogProvider/__tests__/initialization.test.tsx index 8c4c1ae5a..c176287d4 100644 --- a/packages/core/src/sdk/DatadogProvider/__tests__/initialization.test.tsx +++ b/packages/core/src/sdk/DatadogProvider/__tests__/initialization.test.tsx @@ -8,10 +8,10 @@ import { NativeModules } from 'react-native'; import { InitializationMode } from '../../../DdSdkReactNativeConfiguration'; import { DdSdkReactNative } from '../../../DdSdkReactNative'; -import { TimeProvider } from '../../../TimeProvider'; import { DdRum } from '../../../rum/DdRum'; import { RumActionType } from '../../../rum/types'; import { DdTrace } from '../../../trace/DdTrace'; +import { TimeProvider } from '../../../utils/TimeProvider'; import { BufferSingleton } from '../Buffer/BufferSingleton'; import { DatadogProvider, @@ -24,7 +24,7 @@ import { renderWithProvider } from './__utils__/renderWithProvider'; -jest.mock('../../../TimeProvider', () => { +jest.mock('../../../utils/TimeProvider', () => { const now = jest.fn(); return { TimeProvider: jest.fn().mockImplementation(() => { diff --git a/packages/core/src/sdk/DatadogProvider/__tests__/initializationModes.test.tsx b/packages/core/src/sdk/DatadogProvider/__tests__/initializationModes.test.tsx index c30027f0a..7d5eef4ab 100644 --- a/packages/core/src/sdk/DatadogProvider/__tests__/initializationModes.test.tsx +++ b/packages/core/src/sdk/DatadogProvider/__tests__/initializationModes.test.tsx @@ -9,9 +9,9 @@ import { NativeModules } from 'react-native'; import { InitializationMode } from '../../../DdSdkReactNativeConfiguration'; import { DdSdkReactNative } from '../../../DdSdkReactNative'; -import { TimeProvider } from '../../../TimeProvider'; import { DdRumUserInteractionTracking } from '../../../rum/instrumentation/interactionTracking/DdRumUserInteractionTracking'; import { XMLHttpRequestMock } from '../../../rum/instrumentation/resourceTracking/__tests__/__utils__/XMLHttpRequestMock'; +import { TimeProvider } from '../../../utils/TimeProvider'; import { BufferSingleton } from '../Buffer/BufferSingleton'; import { DatadogProvider, @@ -25,7 +25,7 @@ import { renderWithProviderAndAnimation } from './__utils__/renderWithProvider'; -jest.mock('../../../TimeProvider', () => { +jest.mock('../../../utils/TimeProvider', () => { const now = jest.fn(); return { TimeProvider: jest.fn().mockImplementation(() => { diff --git a/packages/core/src/trace/DdTrace.ts b/packages/core/src/trace/DdTrace.ts index 7e83a088f..36b631753 100644 --- a/packages/core/src/trace/DdTrace.ts +++ b/packages/core/src/trace/DdTrace.ts @@ -6,13 +6,13 @@ import { InternalLog } from '../InternalLog'; import { SdkVerbosity } from '../SdkVerbosity'; -import { TimeProvider } from '../TimeProvider'; import type { DdNativeTraceType } from '../nativeModulesTypes'; import { bufferNativeCallReturningId, bufferNativeCallWithId } from '../sdk/DatadogProvider/Buffer/bufferNativeCall'; import type { DdTraceType } from '../types'; +import { TimeProvider } from '../utils/TimeProvider'; const timeProvider = new TimeProvider(); diff --git a/packages/core/src/TimeProvider.tsx b/packages/core/src/utils/TimeProvider.tsx similarity index 100% rename from packages/core/src/TimeProvider.tsx rename to packages/core/src/utils/TimeProvider.tsx diff --git a/packages/core/src/Timer.ts b/packages/core/src/utils/Timer.ts similarity index 100% rename from packages/core/src/Timer.ts rename to packages/core/src/utils/Timer.ts diff --git a/packages/core/src/__tests__/TimeProvider.test.tsx b/packages/core/src/utils/__tests__/TimeProvider.test.tsx similarity index 100% rename from packages/core/src/__tests__/TimeProvider.test.tsx rename to packages/core/src/utils/__tests__/TimeProvider.test.tsx diff --git a/packages/core/src/__tests__/Timer.test.ts b/packages/core/src/utils/__tests__/Timer.test.ts similarity index 100% rename from packages/core/src/__tests__/Timer.test.ts rename to packages/core/src/utils/__tests__/Timer.test.ts