diff --git a/packages/node/src/assignment/assignment-filter.ts b/packages/node/src/assignment/assignment-filter.ts index ece6509..5b75e98 100644 --- a/packages/node/src/assignment/assignment-filter.ts +++ b/packages/node/src/assignment/assignment-filter.ts @@ -1,6 +1,7 @@ -import { Assignment, AssignmentFilter } from 'src/assignment/assignment'; -import { DAY_MILLIS } from 'src/assignment/assignment-service'; -import { Cache } from 'src/util/cache'; +import { Cache } from '../util/cache'; + +import { Assignment, AssignmentFilter } from './assignment'; +import { DAY_MILLIS } from './assignment-service'; export class InMemoryAssignmentFilter implements AssignmentFilter { private readonly cache: Cache; diff --git a/packages/node/src/assignment/assignment-service.ts b/packages/node/src/assignment/assignment-service.ts index 49de37c..4dba206 100644 --- a/packages/node/src/assignment/assignment-service.ts +++ b/packages/node/src/assignment/assignment-service.ts @@ -1,11 +1,9 @@ import { BaseEvent } from '@amplitude/analytics-types'; import { CoreClient } from '@amplitude/analytics-types'; -import { - Assignment, - AssignmentFilter, - AssignmentService, -} from 'src/assignment/assignment'; -import { hashCode } from 'src/util/hash'; + +import { hashCode } from '../util/hash'; + +import { Assignment, AssignmentFilter, AssignmentService } from './assignment'; export const DAY_MILLIS = 24 * 60 * 60 * 1000; export const FLAG_TYPE_MUTUAL_EXCLUSION_GROUP = 'mutual-exclusion-group'; diff --git a/packages/node/src/assignment/assignment.ts b/packages/node/src/assignment/assignment.ts index 3b197e6..10cca9a 100644 --- a/packages/node/src/assignment/assignment.ts +++ b/packages/node/src/assignment/assignment.ts @@ -1,5 +1,5 @@ -import { ExperimentUser } from 'src/types/user'; -import { Results } from 'src/types/variant'; +import { ExperimentUser } from '../types/user'; +import { Results } from '../types/variant'; export interface AssignmentService { track(assignment: Assignment): Promise; diff --git a/packages/node/src/local/client.ts b/packages/node/src/local/client.ts index c44586f..cb634cb 100644 --- a/packages/node/src/local/client.ts +++ b/packages/node/src/local/client.ts @@ -1,13 +1,13 @@ import * as amplitude from '@amplitude/analytics-node'; import evaluation from '@amplitude/evaluation-js'; -import { Assignment, AssignmentService } from 'src/assignment/assignment'; -import { InMemoryAssignmentFilter } from 'src/assignment/assignment-filter'; + +import { Assignment, AssignmentService } from '../assignment/assignment'; +import { InMemoryAssignmentFilter } from '../assignment/assignment-filter'; import { AmplitudeAssignmentService, FLAG_TYPE_HOLDOUT_GROUP, FLAG_TYPE_MUTUAL_EXCLUSION_GROUP, -} from 'src/assignment/assignment-service'; - +} from '../assignment/assignment-service'; import { FetchHttpClient } from '../transport/http'; import { AssignmentConfig, diff --git a/packages/node/test/local/assignment/assignment-filter.test.ts b/packages/node/test/local/assignment/assignment-filter.test.ts index 8555e17..06a67de 100644 --- a/packages/node/test/local/assignment/assignment-filter.test.ts +++ b/packages/node/test/local/assignment/assignment-filter.test.ts @@ -1,7 +1,7 @@ -import { Assignment } from 'src/assignment/assignment'; -import { InMemoryAssignmentFilter } from 'src/assignment/assignment-filter'; -import { ExperimentUser } from 'src/types/user'; -import { sleep } from 'src/util/time'; +import { Assignment } from '../../../../node/src/assignment/assignment'; +import { InMemoryAssignmentFilter } from '../../../../node/src/assignment/assignment-filter'; +import { ExperimentUser } from '../../../../node/src/types/user'; +import { sleep } from '../../../../node/src/util/time'; test('filter - single assignment', async () => { const user: ExperimentUser = { user_id: 'user' }; diff --git a/packages/node/test/local/assignment/assignment-service.test.ts b/packages/node/test/local/assignment/assignment-service.test.ts index dc0b13b..77ee526 100644 --- a/packages/node/test/local/assignment/assignment-service.test.ts +++ b/packages/node/test/local/assignment/assignment-service.test.ts @@ -1,11 +1,15 @@ import * as amplitude from '@amplitude/analytics-node'; -import { Assignment, AssignmentFilter } from 'src/assignment/assignment'; + +import { + Assignment, + AssignmentFilter, +} from '../../../../node/src/assignment/assignment'; import { AmplitudeAssignmentService, DAY_MILLIS, -} from 'src/assignment/assignment-service'; -import { ExperimentUser } from 'src/types/user'; -import { hashCode } from 'src/util/hash'; +} from '../../../../node/src/assignment/assignment-service'; +import { ExperimentUser } from '../../../../node/src/types/user'; +import { hashCode } from '../../../../node/src/util/hash'; const testFilter: AssignmentFilter = { // eslint-disable-next-line @typescript-eslint/no-unused-vars