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
2 changes: 1 addition & 1 deletion eejs.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

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 for eejs require 📘 Rule violation ☼ Reliability

This PR changes the require() path in eejs.js as a bug fix, but it does not add or update any
automated test to prevent regression. Without a regression test, the ESM compatibility fix is not
verifiable and may break again unnoticed.
Agent Prompt
## Issue description
A bug fix was made (changing `require('ep_etherpad-lite/node/eejs/')` to `require('ep_etherpad-lite/node/eejs')`) but no regression test was added/updated in the same PR.

## Issue Context
The project already has CI workflows that execute plugin-provided backend tests from `static/tests/backend/specs/**` (via Etherpad core's Mocha runner). Add a small backend regression test that would fail with the old trailing-slash form and pass with the new form (for example, by asserting the plugin's `eejs.js` source does not contain the trailing-slash require path, or by requiring the module in a way that triggers resolution).

## Fix Focus Areas
- eejs.js[1-8]
- static/tests/backend/specs/eejs-esm-compat.spec.ts[1-200]

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


exports.eejsBlock_editbarMenuRight = (hookName, args, cb) => {
args.content = eejs.require('ep_define/templates/define.ejs', {settings: false}) + args.content;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ep_define",
"description": "Define and Research Words",
"version": "0.0.57",
"version": "0.0.58",
"author": "johnyma22 (John McLear) <john@mclear.co.uk>",
"dependencies": {
"wordnet": "^2.0.0"
Expand Down
Loading