From c3a6e971a9f7476313e8195055a70067670efa3f Mon Sep 17 00:00:00 2001 From: SamTV12345 <40429738+samtv12345@users.noreply.github.com> Date: Mon, 25 May 2026 16:45:31 +0200 Subject: [PATCH] fix: backward-compat for ESM etherpad - Migrate log4js to ep_plugin_helpers/logger Backward-compatible with current CJS etherpad release; also compatible with the upcoming ESM etherpad branch which has stricter exports map resolution. --- index.js | 4 ++-- package.json | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 20359e1..f3934d9 100644 --- a/index.js +++ b/index.js @@ -13,10 +13,10 @@ const ChatMessage = (() => { } })(); const assert = require('assert').strict; -const log4js = require('ep_etherpad-lite/node_modules/log4js'); +const {createLogger} = require('ep_plugin_helpers/logger'); const padMessageHandler = require('ep_etherpad-lite/node/handler/PadMessageHandler'); -const logger = log4js.getLogger('ep_chat_log_join_leave'); +const logger = createLogger('ep_chat_log_join_leave'); if (ChatMessage == null) { logger.error('This version of Etherpad is unsupported. ' + diff --git a/package.json b/package.json index ae7bd97..bb7f2fd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ep_chat_log_join_leave", - "version": "1.0.53", + "version": "1.0.54", "description": "Etherpad plugin to log user joins and leaves in the chat history", "main": "index.js", "scripts": { @@ -33,5 +33,8 @@ "funding": { "type": "individual", "url": "https://etherpad.org/" + }, + "dependencies": { + "ep_plugin_helpers": "^0.6.7" } }