Skip to content

[FSSDK-11090] remove unused plugins directory #989

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 2 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 1 addition & 5 deletions lib/core/decision_service/index.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import Optimizely from '../../optimizely';
import OptimizelyUserContext from '../../optimizely_user_context';
import projectConfig, { createProjectConfig } from '../../project_config/project_config';
import AudienceEvaluator from '../audience_evaluator';
import errorHandler from '../../plugins/error_handler';
import eventDispatcher from '../../event_processor/event_dispatcher/default_dispatcher.browser';
import * as jsonSchemaValidator from '../../utils/json_schema_validator';
import { getMockProjectConfigManager } from '../../tests/mock/mock_project_config_manager';
Expand Down Expand Up @@ -1053,17 +1052,14 @@ describe('lib/core/decision_service', function() {
isValidInstance: true,
logger: createdLogger,
eventProcessor: getForwardingEventProcessor(eventDispatcher),
notificationCenter: createNotificationCenter(createdLogger, errorHandler),
errorHandler: errorHandler,
notificationCenter: createNotificationCenter(createdLogger),
});

sinon.stub(eventDispatcher, 'dispatchEvent');
sinon.stub(errorHandler, 'handleError');
});

afterEach(function() {
eventDispatcher.dispatchEvent.restore();
errorHandler.handleError.restore();
});

var testUserAttributes = {
Expand Down
3 changes: 0 additions & 3 deletions lib/index.browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/

import configValidator from './utils/config_validator';
import defaultErrorHandler from './plugins/error_handler';
import defaultEventDispatcher from './event_processor/event_dispatcher/default_dispatcher.browser';
import sendBeaconEventDispatcher from './event_processor/event_dispatcher/send_beacon_dispatcher.browser';
import * as enums from './utils/enums';
Expand Down Expand Up @@ -97,7 +96,6 @@ const __internalResetRetryState = function(): void {
};

export {
defaultErrorHandler as errorHandler,
defaultEventDispatcher as eventDispatcher,
sendBeaconEventDispatcher,
enums,
Expand All @@ -119,7 +117,6 @@ export * from './common_exports';

export default {
...commonExports,
errorHandler: defaultErrorHandler,
eventDispatcher: defaultEventDispatcher,
sendBeaconEventDispatcher,
enums,
Expand Down
3 changes: 0 additions & 3 deletions lib/index.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import Optimizely from './optimizely';
import * as enums from './utils/enums';
import configValidator from './utils/config_validator';
import defaultErrorHandler from './plugins/error_handler';
import defaultEventDispatcher from './event_processor/event_dispatcher/default_dispatcher.node';
import { createNotificationCenter } from './notification_center';
import { OptimizelyDecideOption, Client, Config } from './shared_types';
Expand Down Expand Up @@ -73,7 +72,6 @@ const createInstance = function(config: Config): Client | null {
* Entry point into the Optimizely Node testing SDK
*/
export {
defaultErrorHandler as errorHandler,
defaultEventDispatcher as eventDispatcher,
enums,
createInstance,
Expand All @@ -91,7 +89,6 @@ export * from './common_exports';

export default {
...commonExports,
errorHandler: defaultErrorHandler,
eventDispatcher: defaultEventDispatcher,
enums,
createInstance,
Expand Down
1 change: 0 additions & 1 deletion lib/index.react_native.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ describe('javascript-sdk/react-native', () => {

describe('APIs', () => {
it('should expose logger, errorHandler, eventDispatcher and enums', () => {
expect(optimizelyFactory.errorHandler).toBeDefined();
expect(optimizelyFactory.eventDispatcher).toBeDefined();
expect(optimizelyFactory.enums).toBeDefined();
});
Expand Down
3 changes: 0 additions & 3 deletions lib/index.react_native.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import * as enums from './utils/enums';
import Optimizely from './optimizely';
import configValidator from './utils/config_validator';
import defaultErrorHandler from './plugins/error_handler';
import defaultEventDispatcher from './event_processor/event_dispatcher/default_dispatcher.browser';
import { createNotificationCenter } from './notification_center';
import { OptimizelyDecideOption, Client, Config } from './shared_types';
Expand Down Expand Up @@ -80,7 +79,6 @@ const createInstance = function(config: Config): Client | null {
* Entry point into the Optimizely Javascript SDK for React Native
*/
export {
defaultErrorHandler as errorHandler,
defaultEventDispatcher as eventDispatcher,
enums,
createInstance,
Expand All @@ -98,7 +96,6 @@ export * from './common_exports';

export default {
...commonExports,
errorHandler: defaultErrorHandler,
eventDispatcher: defaultEventDispatcher,
enums,
createInstance,
Expand Down
7 changes: 1 addition & 6 deletions lib/notification_center/index.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ import { assert } from 'chai';

import { createNotificationCenter } from './';
import * as enums from '../utils/enums';
import errorHandler from '../plugins/error_handler';
import { NOTIFICATION_TYPES } from './type';
import { create } from 'lodash';

var LOG_LEVEL = enums.LOG_LEVEL;

Expand All @@ -35,20 +33,17 @@ var createLogger = () => ({
describe('lib/core/notification_center', function() {
describe('APIs', function() {
var mockLogger = createLogger({ logLevel: LOG_LEVEL.INFO });
var mockErrorHandler = errorHandler.handleError;
var mockLoggerStub;
var mockErrorHandlerStub;

var notificationCenterInstance;
var sandbox;

beforeEach(function() {
sandbox = sinon.sandbox.create();
mockLoggerStub = sandbox.stub(mockLogger, 'log');
mockErrorHandlerStub = sandbox.stub(mockErrorHandler, 'handleError');

notificationCenterInstance = createNotificationCenter({
logger: mockLoggerStub,
errorHandler: mockErrorHandlerStub,
});
});

Expand Down
Loading
Loading