-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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.
src/configuration-factory.ts
Outdated
@@ -79,6 +81,33 @@ export function configurationStorageFactory( | |||
return new MemoryOnlyConfigurationStore(); | |||
} | |||
|
|||
export function overridesStorageFactory( |
There was a problem hiding this comment.
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.
bd737b6
to
2ca704d
Compare
6b2a10b
to
420fe2b
Compare
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