Skip to content

[FSSDK-9611] fix relative import paths that goes out of lib #856

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/core/odp/odp_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import { checkArrayEquality } from '../../../lib/utils/fns';
import { checkArrayEquality } from '../../utils/fns';

export class OdpConfig {
/**
Expand Down
4 changes: 2 additions & 2 deletions lib/modules/datafile-manager/httpPollingDatafileManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import { getLogger } from '../logging';
import { sprintf } from '../../../lib/utils/fns';
import { sprintf } from '../../utils/fns';
import { DatafileManager, DatafileManagerConfig, DatafileUpdate } from './datafileManager';
import EventEmitter, { Disposer } from './eventEmitter';
import { AbortableRequest, Response, Headers } from './http';
Expand All @@ -24,7 +24,7 @@ import BackoffController from './backoffController';
import PersistentKeyValueCache from './persistentKeyValueCache';

import { NotificationRegistry } from './../../core/notification_center/notification_registry';
import { NOTIFICATION_TYPES } from '../../../lib/utils/enums';
import { NOTIFICATION_TYPES } from '../../utils/enums';

const logger = getLogger('DatafileManager');

Expand Down
2 changes: 0 additions & 2 deletions lib/optimizely/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ import {
ODP_USER_KEY,
} from '../utils/enums';

import { BrowserOdpManager } from '../../lib/plugins/odp_manager/index.browser';

const MODULE_NAME = 'OPTIMIZELY';

const DEFAULT_ONREADY_TIMEOUT = 30000;
Expand Down
4 changes: 2 additions & 2 deletions lib/optimizely_user_context/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and *
* limitations under the License. *
***************************************************************************/
import Optimizely from '../../lib/optimizely';
import Optimizely from '../optimizely';
import {
EventTags,
OptimizelyDecideOption,
OptimizelyDecision,
OptimizelyDecisionContext,
OptimizelyForcedDecision,
UserAttributes,
} from '../../lib/shared_types';
} from '../shared_types';
import { CONTROL_ATTRIBUTES } from '../utils/enums';
import { OptimizelySegmentOption } from '../core/odp/optimizely_segment_option';

Expand Down
4 changes: 2 additions & 2 deletions lib/plugins/event_processor/forwarding_event_processor.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2021-2022, Optimizely
* Copyright 2021-2023, Optimizely
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,7 +17,7 @@
import {
EventProcessor,
ProcessableEvent,
} from '../../../lib/modules/event_processor';
} from '../../modules/event_processor';
import { NotificationSender } from '../../core/notification_center';

import { EventDispatcher } from '../../shared_types';
Expand Down
4 changes: 2 additions & 2 deletions lib/plugins/event_processor/index.react_native.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2022, Optimizely
* Copyright 2022-2023, Optimizely
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -14,7 +14,7 @@
* limitations under the License.
*/

import { LogTierV1EventProcessor, LocalStoragePendingEventsDispatcher } from '../../../lib/modules/event_processor/index.react_native';
import { LogTierV1EventProcessor, LocalStoragePendingEventsDispatcher } from '../../modules/event_processor/index.react_native';

export function createEventProcessor(
...args: ConstructorParameters<typeof LogTierV1EventProcessor>
Expand Down
4 changes: 2 additions & 2 deletions lib/plugins/event_processor/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2020, 2022, Optimizely
* Copyright 2020, 2022-2023 Optimizely
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -14,7 +14,7 @@
* limitations under the License.
*/

import { LogTierV1EventProcessor, LocalStoragePendingEventsDispatcher } from '../../../lib/modules/event_processor';
import { LogTierV1EventProcessor, LocalStoragePendingEventsDispatcher } from '../../modules/event_processor';

export function createEventProcessor(
...args: ConstructorParameters<typeof LogTierV1EventProcessor>
Expand Down
18 changes: 17 additions & 1 deletion lib/plugins/odp/event_manager/index.browser.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
import { IOdpEventManager, OdpEventManager } from '../../../../lib/core/odp/odp_event_manager';
/**
* Copyright 2023, Optimizely
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import { IOdpEventManager, OdpEventManager } from '../../../core/odp/odp_event_manager';
import { LogLevel } from '../../../modules/logging';
import { OdpEvent } from "../../../core/odp/odp_event";

Expand Down
22 changes: 19 additions & 3 deletions lib/plugins/odp/event_manager/index.node.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
import { OdpEvent } from '../../../../lib/core/odp/odp_event';
import { IOdpEventManager, OdpEventManager } from '../../../../lib/core/odp/odp_event_manager';
import { LogLevel } from '../../../../lib/modules/logging';
/**
* Copyright 2023, Optimizely
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import { OdpEvent } from '../../../core/odp/odp_event';
import { IOdpEventManager, OdpEventManager } from '../../../core/odp/odp_event_manager';
import { LogLevel } from '../../../modules/logging';

const DEFAULT_BATCH_SIZE = 10;
const DEFAULT_FLUSH_INTERVAL_MSECS = 1000;
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/odp_manager/index.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import {
} from '../../utils/enums';

import { OdpManager } from '../../core/odp/odp_manager';
import { OdpOptions } from '../../../lib/shared_types';
import { OdpOptions } from '../../shared_types';
import { NodeOdpEventApiManager } from '../odp/event_api_manager/index.node';
import { NodeOdpEventManager } from '../odp/event_manager/index.node';
import { OdpSegmentManager } from '../../core/odp/odp_segment_manager';
Expand Down
6 changes: 3 additions & 3 deletions lib/shared_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@
* These shared type definitions include ones that will be referenced by external consumers via export_types.ts.
*/

import { ErrorHandler, LogHandler, LogLevel, LoggerFacade } from '../lib/modules/logging';
import { EventProcessor } from '../lib/modules/event_processor';
import { ErrorHandler, LogHandler, LogLevel, LoggerFacade } from './modules/logging';
import { EventProcessor } from './modules/event_processor';

import { NotificationCenter as NotificationCenterImpl } from './core/notification_center';
import { NOTIFICATION_TYPES } from './utils/enums';

import { IOptimizelyUserContext as OptimizelyUserContext } from './optimizely_user_context';

import { ICache } from './utils/lru_cache';
import { RequestHandler } from '../lib/utils/http_request_handler/http';
import { RequestHandler } from './utils/http_request_handler/http';
import { OptimizelySegmentOption } from './core/odp/optimizely_segment_option';
import { IOdpSegmentApiManager } from './core/odp/odp_segment_api_manager';
import { IOdpSegmentManager } from './core/odp/odp_segment_manager';
Expand Down
4 changes: 2 additions & 2 deletions lib/utils/event_tag_utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2017, 2019-2020, 2022, Optimizely
* Copyright 2017, 2019-2020, 2022-2023, Optimizely
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { EventTags } from '../../../lib/modules/event_processor';
import { EventTags } from '../../modules/event_processor';
import { LoggerFacade } from '../../modules/logging';

import {
Expand Down