feat: initial localStorage provider#1518
Open
MattIPv4 wants to merge 5 commits intoopen-feature:mainfrom
Open
Conversation
a7454e4 to
e015976
Compare
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a new LocalStorageProvider for the OpenFeature Web SDK, enabling feature flag overrides via the browser's local storage. The implementation includes comprehensive unit tests, documentation, and the necessary configuration for building and releasing the package. Feedback focuses on correcting a path mapping in tsconfig.base.json, fixing a mismatched method call in the unit tests, and improving SSR safety by checking for the existence of localStorage before access.
740e9ef to
2cc5877
Compare
Signed-off-by: MattIPv4 <me@mattcowley.co.uk>
Signed-off-by: MattIPv4 <me@mattcowley.co.uk>
Signed-off-by: MattIPv4 <me@mattcowley.co.uk>
2cc5877 to
ca9546a
Compare
Signed-off-by: MattIPv4 <me@mattcowley.co.uk>
Signed-off-by: MattIPv4 <me@mattcowley.co.uk>
ca9546a to
13c2085
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR
localStorageNotes
This is heavily based on the existing env var provider.
Follow-up Tasks
I think I'd like to ideally find a way for the provider to "reconcile" when changes are observed in
localStorage(scoped to theprefixprovided), so that flag values can update aslocalStorageupdates rather than needing a page refresh. Can be a follow-up, though, not part of the initial implementation.