Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions commentManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

const _ = require('underscore');
const db = require('ep_etherpad-lite/node/db/DB');
const log4js = require('ep_etherpad-lite/node_modules/log4js');
const {createLogger} = require('ep_plugin_helpers/logger');
const randomString = require('ep_etherpad-lite/static/js/pad_utils').randomString;
const shared = require('./static/js/shared');

const logger = log4js.getLogger('ep_comments_page');
const logger = createLogger('ep_comments_page');

exports.getComments = async (padId) => {
// Not sure if we will encouter race conditions here.. Be careful.
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const {template} = require('ep_plugin_helpers');

const AttributePool = require('ep_etherpad-lite/static/js/AttributePool').default || require('ep_etherpad-lite/static/js/AttributePool');
const Changeset = require('ep_etherpad-lite/static/js/Changeset').default || require('ep_etherpad-lite/static/js/Changeset');
const eejs = require('ep_etherpad-lite/node/eejs/');
const eejs = require('ep_etherpad-lite/node/eejs');
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. No regression test added 📘 Rule violation ☼ Reliability

This PR changes runtime behavior (logger import and eejs require path) but does not add or update
any regression test to ensure the bugfix remains covered. Without a test that fails pre-fix and
passes post-fix, future refactors could silently reintroduce the compatibility issue.
Agent Prompt
## Issue description
This PR introduces bugfix/compatibility changes but does not include a regression test added/updated in the same commit.

## Issue Context
The changes affect module resolution at runtime (switching `eejs` require path and migrating logging to `ep_plugin_helpers/logger`). A regression test should fail on the pre-fix code and pass with this PR applied.

## Fix Focus Areas
- index.js[7-7]
- commentManager.js[5-9]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

const settings = require('ep_etherpad-lite/node/utils/Settings');
const {Formidable} = require('formidable');
const commentManager = require('./commentManager');
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"description": "Adds comments on sidebar and link it to the text. For no-skin use ep_page_view.",
"name": "ep_comments_page",
"version": "11.1.14",
"version": "11.1.15",
"author": {
"name": "Nicolas Lescop",
"email": "limplementeur@gmail.com"
Expand All @@ -23,7 +23,7 @@
],
"dependencies": {
"cheerio": "^1.2.0",
"ep_plugin_helpers": "^0.6.0",
"ep_plugin_helpers": "^0.6.7",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

2. Outdated pnpm lockfile 🐞 Bug ☼ Reliability

package.json now depends on ep_plugin_helpers@^0.6.7 but pnpm-lock.yaml in this PR branch still
resolves ep_plugin_helpers to 0.6.2 (and the old specifier ^0.6.0). This can make pnpm installs fail
under frozen lockfile settings and can leave the code running with an older ep_plugin_helpers while
commentManager.js now requires ep_plugin_helpers/logger.
Agent Prompt
## Issue description
`package.json` was updated to require `ep_plugin_helpers: ^0.6.7`, and the code now imports `ep_plugin_helpers/logger`, but `pnpm-lock.yaml` is still pinned to `ep_plugin_helpers@0.6.2` (and shows the old specifier `^0.6.0`). This makes installs non-reproducible and commonly breaks CI when using `pnpm install --frozen-lockfile`.

## Issue Context
The updated code path is in `commentManager.js` which now does `require('ep_plugin_helpers/logger')`.

## Fix Focus Areas
- package.json[24-28]
- pnpm-lock.yaml[9-22]
- pnpm-lock.yaml[508-511]
- commentManager.js[5-9]

## Suggested fix
1. Run `pnpm install` (or `pnpm install --lockfile-only`) so the lockfile matches the updated dependency range.
2. Commit the updated `pnpm-lock.yaml` so `ep_plugin_helpers` resolves to a version compatible with the new `ep_plugin_helpers/logger` import.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

"formidable": "^3.5.4",
"underscore": "^1.13.8"
},
Expand Down
Loading