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 index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
// permissions and limitations under the License.

const authorManager = require('ep_etherpad-lite/node/db/AuthorManager');
const log4js = require('ep_etherpad-lite/node_modules/log4js');
const {createLogger} = require('ep_plugin_helpers/logger');

const logger = log4js.getLogger('ep_headerauth');
const logger = createLogger('ep_headerauth');
Comment on lines +18 to +20
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 for logger change 📘 Rule violation ☼ Reliability

This PR changes runtime behavior by switching logging from log4js to ep_plugin_helpers/logger,
but it does not add or update any automated regression test to verify the compatibility fix. Without
a test, the backward-compat behavior can silently break in future refactors or dependency updates.
Agent Prompt
## Issue description
The PR introduces a bug fix/compatibility change (logger import + logger creation) but does not include a regression test that would fail before the change and pass after it.

## Issue Context
`index.js` now uses `ep_plugin_helpers/logger` instead of requiring Etherpad's bundled `log4js`. Add a backend test that loads the plugin and exercises at least one exported hook to ensure the module loads and runs successfully with the new logger dependency.

## Fix Focus Areas
- index.js[18-20]
- static/tests/backend/specs/[add new spec file to cover plugin load + basic hook execution]

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

let settings;

exports.authenticate = (hookName, {req}, cb) => {
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ep_headerauth",
"version": "1.1.58",
"version": "1.1.59",
"description": "Etherpad plugin to use a reverse proxy's HTTP headers for authentication.",
"keywords": [
"auth",
Expand Down Expand Up @@ -34,5 +34,8 @@
},
"engines": {
"node": ">=18.0.0"
},
"dependencies": {
"ep_plugin_helpers": "^0.6.7"
}
Comment on lines +38 to 40
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. Stale pnpm lockfile 🐞 Bug ☼ Reliability

package.json adds ep_plugin_helpers but pnpm-lock.yaml is not updated, so `pnpm i
--frozen-lockfile` will fail and block CI/release installs. This can prevent publishing and/or
running workflows that enforce lockfile consistency.
Agent Prompt
## Issue description
A new dependency (`ep_plugin_helpers`) was added to `package.json`, but `pnpm-lock.yaml` was not regenerated. Workflows that run `pnpm i --frozen-lockfile` will fail because the lockfile no longer matches `package.json`.

## Issue Context
This repo uses pnpm and has a committed `pnpm-lock.yaml`. The release workflow explicitly enforces lockfile consistency.

## Fix
- Run `pnpm install` (or `pnpm i`) in the repo root to regenerate `pnpm-lock.yaml`.
- Commit the updated `pnpm-lock.yaml` alongside `package.json`.

## Fix Focus Areas
- package.json[35-40]
- pnpm-lock.yaml[1-40]
- .github/workflows/npmpublish.yml[61-73]

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

}
Loading