Repository navigation
Conversation
AsyncStorageCache now extends AsyncStoreWithBatchedGet so getBatchedAsync routes failed-event retries through a single multiGet/getMany call instead of one getItem per key. Widen netinfo to <13 and get-random-values to <3 (verified on RN 0.87), and pin fast-text-encoding/ua-parser-js below 2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
raju-opti
requested review from
junaed-optimizely
and
a balanced review from Copilot
and removed request for
Copilot
October 8, 2026 17:59
This branch has not been deployed
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.
Summary
multiGetin favour ofgetMany, and no longer exports theAsyncStorageStatictype. The React Native AsyncStorage import shim now adds amultiGetbuilt ongetManywhen the storage doesn't have one. It keeps the requested key order and returnsnullfor missing keys. The removed type import is replaced with a localAsyncStorageCompatinterface. v1/v2 storage is returned unchanged.AsyncStorageCachenow extendsAsyncStoreWithBatchedGet. It previously only implementedAsyncStore, sogetBatchedAsyncfailed itsinstanceofcheck and read stored events with onegetItemper key. ItsgetBatched, and thereforemultiGet, was never called. Failed-event retries now read all stored events in one batched call.<4.0.0(was<3.0.0)<13.0.0(was<12.0.0)react-native-get-random-values>=1.11.0 <3.0.0(was^1.11.0)fast-text-encodingandua-parser-jsare now written as explicit<2.0.0ranges, allowing the same versions as before.ua-parser-js2.x is licensed AGPL-3.0, so it stays excluded.mockImplementationOnceinevent_processor_factory.react_native.spec.tswas making a later test construct a realAsyncStorageCache.The peer range was what blocked adopting AsyncStorage v3 (#1177). The
multiGetcrash described in the issue couldn't actually happen at runtime, becauseAsyncStorageCache.getBatchedwas never reached. The second change fixes that, so the v3 shim is now actually used.Test plan
ensureMultiGet: v1/v2 storage is passed through unchanged; on v3,multiGetis built fromgetManyand keeps the requested key order even whengetManyreturns its record in a different order.AsyncStorageCacheis anAsyncStoreWithBatchedGet, and itsgetBatchedmakes a singlemultiGetcall.getBatchedSync/getBatchedAsync: subclasses of the batched base classes usegetBatched; other stores fall back to callinggetper key.npm packtarball, a custom event dispatcher that always fails, two tracked conversion events, and results checked from device logs only.multiGet. Retries at about 20s and 40s read both stored events throughmultiGet→getManyin one call, in the requested key order, and re-dispatch the same event UUIDs.multiGetuntouched, and retries use it.fast-text-encoding1.0.6,react-native-get-random-values2.0.0,ua-parser-js1.0.41):npm install(no--legacy-peer-deps) succeeds with no peer warnings.crypto.getRandomValuesis provided byreact-native-get-random-values2.0.0.ua_parserexport runs without errors.Issues
🤖 Generated with Claude Code