From faad9a81502eb1437a667a8af2b5fba557ec0e89 Mon Sep 17 00:00:00 2001 From: John McLear Date: Mon, 6 Apr 2026 15:39:18 +0100 Subject: [PATCH] fix: add setters to CJS compatibility layer in Settings The CJS compatibility block added in fd97532 only defined getters, making settings properties read-only for plugins using require(). Plugins like ep_webrtc need to mutate settings (e.g. requireAuthentication) in tests. Add setters so CJS consumers can write properties too. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/node/utils/Settings.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/node/utils/Settings.ts b/src/node/utils/Settings.ts index efefff9e6cc..659b62d7580 100644 --- a/src/node/utils/Settings.ts +++ b/src/node/utils/Settings.ts @@ -670,6 +670,7 @@ if (typeof module !== 'undefined' && module.exports) { if (!(key in currentExports)) { Object.defineProperty(currentExports, key, { get: () => (settings as any)[key], + set: (v: any) => { (settings as any)[key] = v; }, enumerable: true, configurable: true, });