react-native-onyx 1.0.68 → 1.0.70
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/web.development.js +8 -10
- package/dist/web.development.js.map +1 -1
- package/dist/web.min.js +1 -1
- package/dist/web.min.js.map +1 -1
- package/lib/Onyx.js +5 -10
- package/lib/storage/providers/IDBKeyVal.js +3 -0
- package/package.json +1 -1
package/dist/web.development.js
CHANGED
|
@@ -109,8 +109,8 @@ let lastConnectionID = 0;
|
|
|
109
109
|
// Holds a mapping of all the react components that want their state subscribed to a store key
|
|
110
110
|
const callbackToStateMapping = {};
|
|
111
111
|
|
|
112
|
-
//
|
|
113
|
-
let
|
|
112
|
+
// Stores all of the keys that Onyx can use. Must be defined in init().
|
|
113
|
+
let onyxKeys = {};
|
|
114
114
|
|
|
115
115
|
// Holds a list of keys that have been directly subscribed to or recently modified from least to most recent
|
|
116
116
|
let recentlyAccessedKeys = [];
|
|
@@ -223,7 +223,7 @@ function getAllKeys() {
|
|
|
223
223
|
* @returns {Boolean}
|
|
224
224
|
*/
|
|
225
225
|
function isCollectionKey(key) {
|
|
226
|
-
return
|
|
226
|
+
return underscore__WEBPACK_IMPORTED_MODULE_1___default().contains(underscore__WEBPACK_IMPORTED_MODULE_1___default().values(onyxKeys.COLLECTION), key);
|
|
227
227
|
}
|
|
228
228
|
|
|
229
229
|
/**
|
|
@@ -1474,13 +1474,8 @@ function init()
|
|
|
1474
1474
|
_OnyxCache__WEBPACK_IMPORTED_MODULE_3__["default"].setRecentKeysLimit(maxCachedKeysCount);
|
|
1475
1475
|
}
|
|
1476
1476
|
|
|
1477
|
-
//
|
|
1478
|
-
|
|
1479
|
-
const collectionValues = underscore__WEBPACK_IMPORTED_MODULE_1___default().values(keys.COLLECTION);
|
|
1480
|
-
onyxCollectionKeyMap = underscore__WEBPACK_IMPORTED_MODULE_1___default().reduce(collectionValues, (acc, val) => {
|
|
1481
|
-
acc.set(val, true);
|
|
1482
|
-
return acc;
|
|
1483
|
-
}, new Map());
|
|
1477
|
+
// Let Onyx know about all of our keys
|
|
1478
|
+
onyxKeys = keys;
|
|
1484
1479
|
|
|
1485
1480
|
// Set our default key states to use when initializing and clearing Onyx data
|
|
1486
1481
|
defaultKeyStates = initialKeyStates;
|
|
@@ -2268,6 +2263,9 @@ const provider = {
|
|
|
2268
2263
|
*/
|
|
2269
2264
|
clear: () => (0,idb_keyval__WEBPACK_IMPORTED_MODULE_0__.clear)(getCustomStore()),
|
|
2270
2265
|
|
|
2266
|
+
// This is a noop for now in order to keep clients from crashing see https://github.com/Expensify/Expensify/issues/312438
|
|
2267
|
+
setMemoryOnlyKeys: () => {},
|
|
2268
|
+
|
|
2271
2269
|
/**
|
|
2272
2270
|
* Returns all keys available in storage
|
|
2273
2271
|
* @returns {Promise<String[]>}
|