You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fd652c3
Browse filesBrowse the repository at this point in the historyBrowse files
[FSSDK-13250] Support AsyncStorage v3 in React Native (#1178)
## Summary
- **AsyncStorage v3 support.** v3 removed `multiGet` in favour of `getMany`, and no longer exports the `AsyncStorageStatic` type. The React Native AsyncStorage import shim now adds a `multiGet` built on `getMany` when the storage doesn't have one. It keeps the requested key order and returns `null` for missing keys. The removed type import is replaced with a local `AsyncStorageCompat` interface. v1/v2 storage is returned unchanged.
- **`AsyncStorageCache` now extends `AsyncStoreWithBatchedGet`.** It previously only implemented `AsyncStore`, so `getBatchedAsync` failed its `instanceof` check and read stored events with one `getItem` per key. Its `getBatched`, and therefore `multiGet`, was never called. Failed-event retries now read all stored events in one batched call.
- **Wider React Native peer ranges:**
- AsyncStorage `<4.0.0` (was `<3.0.0`)
- NetInfo `<13.0.0` (was `<12.0.0`)
- `react-native-get-random-values` `>=1.11.0 <3.0.0` (was `^1.11.0`)
- `fast-text-encoding` and `ua-parser-js` are now written as explicit `<2.0.0` ranges, allowing the same versions as before. `ua-parser-js` 2.x is licensed AGPL-3.0, so it stays excluded.
- **Test fix:** a leaked `mockImplementationOnce` in `event_processor_factory.react_native.spec.ts` was making a later test construct a real `AsyncStorageCache`.
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
0 commit comments