react-native-onyx 2.0.38 → 2.0.40

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.
@@ -39,3 +39,4 @@ declare class DevTools {
39
39
  }
40
40
  declare const _default: DevTools;
41
41
  export default _default;
42
+ export type { DevtoolsConnection };
package/dist/withOnyx.js CHANGED
@@ -93,7 +93,7 @@ function default_1(mapOnyxToState, shouldDelayUpdates = false) {
93
93
  * In reality, Onyx.merge() will only update the subscriber after all merges have been batched and the previous value is retrieved via a get() (returns a promise).
94
94
  * So, we won't use the cache optimization here as it will lead us to arbitrarily defer various actions in the application code.
95
95
  */
96
- if ((value !== undefined && !OnyxUtils_1.default.hasPendingMergeForKey(key)) || mapping.allowStaleData) {
96
+ if (mapping.initWithStoredValues !== false && ((value !== undefined && !OnyxUtils_1.default.hasPendingMergeForKey(key)) || mapping.allowStaleData)) {
97
97
  // eslint-disable-next-line no-param-reassign
98
98
  resultObj[propertyName] = value;
99
99
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-onyx",
3
- "version": "2.0.38",
3
+ "version": "2.0.40",
4
4
  "author": "Expensify, Inc.",
5
5
  "homepage": "https://expensify.com",
6
6
  "description": "State management for React Native",
@@ -45,6 +45,7 @@
45
45
  },
46
46
  "devDependencies": {
47
47
  "@actions/core": "^1.10.1",
48
+ "@jest/globals": "^29.7.0",
48
49
  "@lwc/eslint-plugin-lwc": "^1.7.2",
49
50
  "@ngneat/falso": "^7.2.0",
50
51
  "@react-native-community/eslint-config": "^3.2.0",