Skip to content

[FSSDK-11512] remove eventManager and segmentManager from odp public api #1048

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
May 13, 2025

Conversation

raju-opti
Copy link
Contributor

Summary

Issues

  • FSSDK-11512

@coveralls
Copy link

coveralls commented May 13, 2025

Coverage Status

coverage: 80.773% (+0.02%) from 80.749%
when pulling 20cdba1 on raju/odp_factory
into 7a75f13 on master.

@raju-opti raju-opti requested a review from Copilot May 13, 2025 14:10
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes the external exposure of eventManager and segmentManager from the ODP public API to simplify and consolidate the manager creation process.

  • Removed optional segmentManager and eventManager properties from the OdpManagerOptions type
  • Updated factory functions and tests to always use default implementations for these managers
  • Adjusted exports to use the universal odp manager factory

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
lib/vuid/vuid_manager_factory.browser.ts Minor cleanup by removing an extraneous blank line
lib/odp/odp_manager_factory.universal.ts Updated to reflect the new API using only requestHandler
lib/odp/odp_manager_factory.ts Removed eventManager/segmentManager options and always uses defaults
lib/odp/odp_manager_factory.spec.ts Removed tests validating custom manager injection
lib/odp/odp_manager_factory.react_native.spec.ts Removed custom manager usage tests
lib/odp/odp_manager_factory.node.ts Removed unused import resulting from removed parameters
lib/odp/odp_manager_factory.node.spec.ts Updated tests to remove custom manager injections
lib/odp/odp_manager_factory.browser.spec.ts Updated tests to remove custom manager injections
lib/index.universal.ts Updated export to use the universal odp manager factory
lib/export_types.ts Added updated type definitions for related odp manager types
lib/entrypoint.universal.test-d.ts Updated type imports to reflect the new odp manager API
Comments suppressed due to low confidence (2)

lib/odp/odp_manager_factory.ts:47

  • Update the type documentation/comments to clearly indicate that segmentManager and eventManager are no longer accepted in OdpManagerOptions.
segmentManager?: OdpSegmentManager;

lib/odp/odp_manager_factory.spec.ts:90

  • Remove or update tests related to providing a custom segment manager to ensure that the default manager behavior is fully covered by alternate tests in alignment with the new API design.
it('should use provided segment manager', () => {

Copy link
Contributor

@junaed-optimizely junaed-optimizely left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@raju-opti raju-opti merged commit ecb9dc5 into master May 13, 2025
17 checks passed
@raju-opti raju-opti deleted the raju/odp_factory branch May 13, 2025 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants