Conversation
|
@launchdarkly/js-sdk-common size report |
|
@launchdarkly/browser size report |
|
@launchdarkly/js-client-sdk size report |
|
@launchdarkly/js-client-sdk-common size report |
|
@cursor review |
01d152b to
1ba2c69
Compare
1ba2c69 to
b327868
Compare
|
@cursor review |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
1 issue from previous review remains unresolved.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit f084d37. Configure here.

This PR will fix the localstorage indexing by removing the previous nested structure:
To:
The new structure is more consistent with other SDKs by calculating the storage index purely out of the context canonical keys.
This PR will also serialize the write to this cache so that multiple instances of this SDK could exist.
Note
Medium Risk
Changes how cached flag/context data is persisted (single shared
ldcachefile and new async flush behavior), which can affect multi-client behavior and durability on disk-write failures.Overview
Storage/indexing behavior changes.
ElectronStorageno longer namespaces cache files by credential; it now always uses a singleldcachefile under ElectronuserDataand is exposed via a singletongetElectronStorage()used byElectronPlatform/ElectronClient.Write/flush semantics updated.
set/clearnow update the in-memory cache immediately and enqueue an async flush to disk (loggingError flushing storage to diskon failure), rather than only mutating cache after a successful write.Tests/contract tests adjusted. Adds
maxCachedContextscoverage (eviction and disabled caching when0), updatesElectronStoragetests for new file path and flush behavior, and resets the storage singleton between contract-test clients via internalresetElectronStorage(also removing the contract-testsingletoncapability flag).Reviewed by Cursor Bugbot for commit f084d37. Bugbot is set up for automated code reviews on this repo. Configure here.