Skip to content
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

feat: implement overrides store functionality #131

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open

Conversation

yfrancis
Copy link

@yfrancis yfrancis commented Dec 16, 2024

Add a new config parameter enableOverrides, which when set will create an overrides store and supply it to the eppo client on init. The overrides store leverages a hybrid store with memory and window localStorage for persistence.

Depends on Eppo-exp/js-sdk-common#184

@yfrancis yfrancis changed the title Implement overrides store functionality feat: implement overrides store functionality Dec 18, 2024
Copy link
Contributor

@aarsilv aarsilv left a comment

Choose a reason for hiding this comment

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

This is a great start! I think we'll want a test in index.spec that spins up an instance, applies an override, and retrieves a value (among other things) to be sure the integration between this SDK and the common one works as expected.

@@ -79,6 +81,33 @@ export function configurationStorageFactory(
return new MemoryOnlyConfigurationStore();
}

export function overridesStorageFactory(
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if we should take advantage of configurationStorageFactory either by templetizing it or using the template pattern. Then we'd have chrome storage support as well.

src/index.ts Outdated Show resolved Hide resolved
src/storage-key-constants.ts Outdated Show resolved Hide resolved
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