react-native-onyx 3.0.155 → 3.0.157
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/Logger.js +0 -1
- package/dist/OnyxCache.js +3 -3
- package/dist/OnyxUtils.js +0 -1
- package/dist/utils.js +3 -3
- package/package.json +9 -6
package/dist/Logger.js
CHANGED
package/dist/OnyxCache.js
CHANGED
|
@@ -164,7 +164,7 @@ class OnyxCache {
|
|
|
164
164
|
}
|
|
165
165
|
const affectedCollections = new Set();
|
|
166
166
|
// Use for-in loop to avoid an unnecessary array allocation from Object.keys()
|
|
167
|
-
//
|
|
167
|
+
// oxlint-disable-next-line core/no-restricted-syntax, guard-for-in
|
|
168
168
|
for (const key in data) {
|
|
169
169
|
const value = data[key];
|
|
170
170
|
this.addKey(key);
|
|
@@ -225,7 +225,7 @@ class OnyxCache {
|
|
|
225
225
|
}
|
|
226
226
|
const affectedCollections = new Set();
|
|
227
227
|
// Use for-in loop to avoid an unnecessary array allocation from Object.entries()
|
|
228
|
-
//
|
|
228
|
+
// oxlint-disable-next-line core/no-restricted-syntax, guard-for-in
|
|
229
229
|
for (const key in data) {
|
|
230
230
|
const value = data[key];
|
|
231
231
|
this.addKey(key);
|
|
@@ -419,7 +419,7 @@ class OnyxCache {
|
|
|
419
419
|
// We can't rely on count comparison alone — if one key is removed and another added,
|
|
420
420
|
// the counts match but the snapshot content is different.
|
|
421
421
|
if (!hasMemberChanges && previousSnapshot) {
|
|
422
|
-
//
|
|
422
|
+
// oxlint-disable-next-line core/no-restricted-syntax
|
|
423
423
|
for (const key in previousSnapshot) {
|
|
424
424
|
if (!(key in members)) {
|
|
425
425
|
hasMemberChanges = true;
|
package/dist/OnyxUtils.js
CHANGED
|
@@ -88,7 +88,6 @@ let deferredInitTask = (0, createDeferredTask_1.default)();
|
|
|
88
88
|
* to be distinct from real values, not unique per subscription, so one module-level instance
|
|
89
89
|
* is reused by every connection.
|
|
90
90
|
*/
|
|
91
|
-
// eslint-disable-next-line rulesdir/no-negated-variables
|
|
92
91
|
const NOT_DELIVERED = Symbol('NOT_DELIVERED');
|
|
93
92
|
// Collection member IDs that Onyx should silently ignore across all operations — reads, writes, cache, and subscriber
|
|
94
93
|
// notifications. This is used to filter out keys formed from invalid/default IDs (e.g. "-1", "0",
|
package/dist/utils.js
CHANGED
|
@@ -173,7 +173,7 @@ function isEmptyObject(obj) {
|
|
|
173
173
|
return false;
|
|
174
174
|
}
|
|
175
175
|
// Use for-in loop to avoid an unnecessary array allocation from Object.keys()
|
|
176
|
-
//
|
|
176
|
+
// oxlint-disable-next-line core/no-restricted-syntax
|
|
177
177
|
for (const key in obj) {
|
|
178
178
|
if (Object.hasOwn(obj, key)) {
|
|
179
179
|
return false;
|
|
@@ -202,7 +202,7 @@ function needsNormalization(value) {
|
|
|
202
202
|
return false;
|
|
203
203
|
}
|
|
204
204
|
// Use for-in loop to avoid an unnecessary array allocation from Object.keys()
|
|
205
|
-
//
|
|
205
|
+
// oxlint-disable-next-line core/no-restricted-syntax, guard-for-in
|
|
206
206
|
for (const key in value) {
|
|
207
207
|
if (key === ONYX_INTERNALS__REPLACE_OBJECT_MARK) {
|
|
208
208
|
return true;
|
|
@@ -236,7 +236,7 @@ function removeNestedNullValues(value, nullFreeReference) {
|
|
|
236
236
|
const reference = nullFreeReference !== null && typeof nullFreeReference === 'object' && !Array.isArray(nullFreeReference) ? nullFreeReference : undefined;
|
|
237
237
|
let hasChanged = false;
|
|
238
238
|
const result = {};
|
|
239
|
-
//
|
|
239
|
+
// oxlint-disable-next-line core/no-restricted-syntax, guard-for-in
|
|
240
240
|
for (const key in value) {
|
|
241
241
|
const propertyValue = value[key];
|
|
242
242
|
if (propertyValue === null || propertyValue === undefined) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-onyx",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.157",
|
|
4
4
|
"author": "Expensify, Inc.",
|
|
5
5
|
"homepage": "https://expensify.com",
|
|
6
6
|
"description": "State management for React Native",
|
|
@@ -29,16 +29,17 @@
|
|
|
29
29
|
"types": "dist/index.d.ts",
|
|
30
30
|
"scripts": {
|
|
31
31
|
"prepare": "npm run build && lefthook install",
|
|
32
|
-
"lint": "
|
|
32
|
+
"lint": "node config/oxlint/lint.mjs",
|
|
33
33
|
"typecheck": "tsc --noEmit",
|
|
34
34
|
"test": "jest",
|
|
35
|
+
"test:lint": "node --test config/oxlint/seatbelt.test.mjs",
|
|
35
36
|
"test:types": "npm run build && tsc --noEmit --project tsconfig.test.json",
|
|
36
37
|
"perf-test": "npx reassure",
|
|
37
38
|
"build": "tsc -p tsconfig.build.json",
|
|
38
39
|
"build:watch": "nodemon --watch lib --ext js,json,ts,tsx --exec \"npm run build && npm pack\"",
|
|
39
40
|
"prebuild:docs": "npm run build",
|
|
40
41
|
"build:docs": "ts-node buildDocs.ts",
|
|
41
|
-
"lint-tests": "
|
|
42
|
+
"lint-tests": "node config/oxlint/lint.mjs tests",
|
|
42
43
|
"fmt": "oxfmt --write .",
|
|
43
44
|
"gh-actions-build": "./.github/scripts/buildActions.sh"
|
|
44
45
|
},
|
|
@@ -57,6 +58,7 @@
|
|
|
57
58
|
"@jest/globals": "^29.7.0",
|
|
58
59
|
"@lwc/eslint-plugin-lwc": "^3.5.0",
|
|
59
60
|
"@ngneat/falso": "^7.3.0",
|
|
61
|
+
"@oxlint/migrate": "1.92.0",
|
|
60
62
|
"@react-native-community/eslint-config": "^3.2.0",
|
|
61
63
|
"@react-native/babel-preset": "0.76.3",
|
|
62
64
|
"@react-native/polyfills": "^2.0.0",
|
|
@@ -77,8 +79,7 @@
|
|
|
77
79
|
"better-sqlite3": "^12.11.1",
|
|
78
80
|
"date-fns": "^4.1.0",
|
|
79
81
|
"eslint": "^9.39.2",
|
|
80
|
-
"eslint-config-expensify": "
|
|
81
|
-
"eslint-config-prettier": "^9.1.0",
|
|
82
|
+
"eslint-config-expensify": "4.0.21",
|
|
82
83
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
83
84
|
"eslint-plugin-import": "^2.31.0",
|
|
84
85
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
@@ -91,7 +92,9 @@
|
|
|
91
92
|
"jsdoc-to-markdown": "^7.1.0",
|
|
92
93
|
"lefthook": "2.1.9",
|
|
93
94
|
"nodemon": "^3.0.3",
|
|
94
|
-
"oxfmt": "^0.
|
|
95
|
+
"oxfmt": "^0.67.0",
|
|
96
|
+
"oxlint": "1.92.0",
|
|
97
|
+
"oxlint-tsgolint": "7.0.2005",
|
|
95
98
|
"prop-types": "^15.7.2",
|
|
96
99
|
"react": "18.2.0",
|
|
97
100
|
"react-native": "0.76.3",
|