From 70e44662fc5ad206bc1e7b2cbfdd52345f88f732 Mon Sep 17 00:00:00 2001 From: SamTV12345 <40429738+samtv12345@users.noreply.github.com> Date: Mon, 25 May 2026 16:45:26 +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 f282c12..39c4838 100644 --- a/index.js +++ b/index.js @@ -1,8 +1,8 @@ 'use strict'; -const log4js = require('ep_etherpad-lite/node_modules/log4js'); +const {createLogger} = require('ep_plugin_helpers/logger'); -const logger = log4js.getLogger('ep_button_link'); +const logger = createLogger('ep_button_link'); let settings = null; exports.clientVars = async (hookName, context) => ({ep_button_link: settings}); diff --git a/package.json b/package.json index e67e0db..9b48911 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ep_button_link", "description": "Adds a button to the toolbar that links out to a new window", - "version": "1.0.49", + "version": "1.0.50", "author": "johnyma22 (John McLear) ", "engines": { "node": ">=18.0.0" @@ -22,5 +22,8 @@ "scripts": { "lint": "eslint .", "lint:fix": "eslint --fix ." + }, + "dependencies": { + "ep_plugin_helpers": "^0.6.7" } }