From 61d33db259d0c9a319942c1f7a36e61f51a083b7 Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 21 Aug 2026 17:45:43 -0700 Subject: [PATCH 1/2] fix: import lodash.bindall instead of lodash/* Stop relying on a transitive lodash package for bindAll and noop in published lib code. --- lib/OnyxCache.ts | 2 +- lib/OnyxConnectionManager.ts | 2 +- lib/storage/InstanceSync/index.ts | 2 +- package-lock.json | 11 +++++++++++ package.json | 1 + 5 files changed, 15 insertions(+), 3 deletions(-) diff --git a/lib/OnyxCache.ts b/lib/OnyxCache.ts index 1e83edeac..baeabde9c 100644 --- a/lib/OnyxCache.ts +++ b/lib/OnyxCache.ts @@ -1,5 +1,5 @@ import {deepEqual} from 'fast-equals'; -import bindAll from 'lodash/bindAll'; +import bindAll from 'lodash.bindall'; import type {ValueOf} from 'type-fest'; import utils from './utils'; import type {FastMergeOptions} from './utils'; diff --git a/lib/OnyxConnectionManager.ts b/lib/OnyxConnectionManager.ts index 1cc245e32..1eae1cdc5 100644 --- a/lib/OnyxConnectionManager.ts +++ b/lib/OnyxConnectionManager.ts @@ -1,4 +1,4 @@ -import bindAll from 'lodash/bindAll'; +import bindAll from 'lodash.bindall'; import * as Logger from './Logger'; import type {ConnectOptions} from './Onyx'; import OnyxUtils from './OnyxUtils'; diff --git a/lib/storage/InstanceSync/index.ts b/lib/storage/InstanceSync/index.ts index af7424f6c..46511894a 100644 --- a/lib/storage/InstanceSync/index.ts +++ b/lib/storage/InstanceSync/index.ts @@ -1,4 +1,4 @@ -import NOOP from 'lodash/noop'; +const NOOP = (() => {}) as (...args: unknown[]) => void; /** * This is used to keep multiple browser tabs in sync, therefore only needed on web diff --git a/package-lock.json b/package-lock.json index f536050bc..fbb86fd03 100644 --- a/package-lock.json +++ b/package-lock.json @@ -31,6 +31,7 @@ "@types/jest": "^29.5.14", "@types/jsdoc-to-markdown": "^7.0.6", "@types/lodash": "^4.14.202", + "@types/lodash.bindall": "^4.4.9", "@types/node": "^20.11.5", "@types/react": "^18.2.14", "@types/react-native": "^0.70.0", @@ -4441,6 +4442,16 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/lodash.bindall": { + "version": "4.4.9", + "resolved": "https://registry.npmjs.org/@types/lodash.bindall/-/lodash.bindall-4.4.9.tgz", + "integrity": "sha512-sG6V5+T3JcB39nXfORM+kHRH6DiCB+95DfGrH2YpPMXRpt6q3rn7VrW3dItiOLasJYeHq1jxc+tOW1ijT+d1wg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/lodash": "*" + } + }, "node_modules/@types/markdown-it": { "version": "14.1.2", "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-14.1.2.tgz", diff --git a/package.json b/package.json index 47489b5a7..d5e7eb469 100644 --- a/package.json +++ b/package.json @@ -65,6 +65,7 @@ "@types/jest": "^29.5.14", "@types/jsdoc-to-markdown": "^7.0.6", "@types/lodash": "^4.14.202", + "@types/lodash.bindall": "^4.4.9", "@types/node": "^20.11.5", "@types/react": "^18.2.14", "@types/react-native": "^0.70.0", From f4c1adb0e9642ff881bef7aa4258262ab0968584 Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 21 Aug 2026 22:01:17 -0700 Subject: [PATCH 2/2] fix: use a named noop instead of an empty arrow Satisfies @typescript-eslint/no-empty-function on the native InstanceSync stub. --- lib/storage/InstanceSync/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/storage/InstanceSync/index.ts b/lib/storage/InstanceSync/index.ts index 46511894a..d9d7d7fe2 100644 --- a/lib/storage/InstanceSync/index.ts +++ b/lib/storage/InstanceSync/index.ts @@ -1,4 +1,6 @@ -const NOOP = (() => {}) as (...args: unknown[]) => void; +function NOOP(..._args: unknown[]): void { + // Native InstanceSync is a no-op; web implements real cross-tab sync. +} /** * This is used to keep multiple browser tabs in sync, therefore only needed on web