react-native-onyx 2.0.60 → 2.0.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/OnyxUtils.js CHANGED
@@ -653,6 +653,7 @@ function keyChanged(key, value, previousValue, canUpdateSubscriber = () => true,
653
653
  return;
654
654
  }
655
655
  }
656
+ const cachedCollections = {};
656
657
  for (let i = 0; i < stateMappingKeys.length; i++) {
657
658
  const subscriber = callbackToStateMapping[stateMappingKeys[i]];
658
659
  if (!subscriber || !isKeyMatch(subscriber.key, key) || !canUpdateSubscriber(subscriber)) {
@@ -667,7 +668,11 @@ function keyChanged(key, value, previousValue, canUpdateSubscriber = () => true,
667
668
  continue;
668
669
  }
669
670
  if (isCollectionKey(subscriber.key) && subscriber.waitForCollectionCallback) {
670
- const cachedCollection = getCachedCollection(subscriber.key);
671
+ let cachedCollection = cachedCollections[subscriber.key];
672
+ if (!cachedCollection) {
673
+ cachedCollection = getCachedCollection(subscriber.key);
674
+ cachedCollections[subscriber.key] = cachedCollection;
675
+ }
671
676
  cachedCollection[key] = value;
672
677
  subscriber.callback(cachedCollection);
673
678
  continue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-onyx",
3
- "version": "2.0.60",
3
+ "version": "2.0.62",
4
4
  "author": "Expensify, Inc.",
5
5
  "homepage": "https://expensify.com",
6
6
  "description": "State management for React Native",
@@ -111,7 +111,7 @@
111
111
  }
112
112
  },
113
113
  "engines": {
114
- "node": ">=20.14.0",
114
+ "node": ">=20.15.1",
115
115
  "npm": ">=10.7.0"
116
116
  },
117
117
  "sideEffects": false