FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: backward-compat for ESM etherpad by SamTV12345 · Pull Request #88 · ether/ep_text_statistics · GitHub

fix: backward-compat for ESM etherpad - #88

Merged
SamTV12345 merged 1 commit into
mainfrom
fix/esm-compat
May 25, 2026
Merged

fix: backward-compat for ESM etherpad#88
SamTV12345 merged 1 commit into
mainfrom
fix/esm-compat

Conversation

Copy link
Copy Markdown
Member

This PR makes the plugin backward-compatible with the upcoming ESM etherpad branch (ether/etherpad#7605).

Change: Remove trailing slash from require("ep_etherpad-lite/node/eejs/") → require("ep_etherpad-lite/node/eejs")

The trailing-slash form breaks under Node's strict ESM exports map resolution. This change is backward-compatible with the current CJS etherpad release.

- Drop trailing slash on ep_etherpad-lite/node/eejs/ require

Backward-compatible with current CJS etherpad release; also
compatible with the upcoming ESM etherpad branch which has stricter
exports map resolution.

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

Copy link
Copy Markdown

Review Summary by Qodo

Remove trailing slash for ESM etherpad compatibility

🐞 Bug fix

Walkthroughs

Description
• Remove trailing slash from eejs require path
• Ensures compatibility with upcoming ESM etherpad
• Maintains backward compatibility with current CJS
• Bump version to 0.0.61
Diagram
flowchart LR
  A["require with trailing slash"] -- "breaks ESM exports" --> B["ESM etherpad incompatible"]
  C["require without trailing slash"] -- "works with both" --> D["CJS and ESM compatible"]
  A -- "fix applied" --> C

Loading

File Changes

1. eejs.js 🐞 Bug fix +1/-1

Remove trailing slash from eejs require

• Remove trailing slash from require('ep_etherpad-lite/node/eejs/') path
• Change to require('ep_etherpad-lite/node/eejs') for strict ESM exports resolution
• Maintains backward compatibility with current CJS etherpad

eejs.js


2. package.json ⚙️ Configuration changes +1/-1

Bump version for ESM compatibility fix

• Increment version from 0.0.60 to 0.0.61

package.json


qodo-free-for-open-source-projects Bot commented May 25, 2026
edited
Loading

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (1)


1. eejs require change untested 📘 Rule violation ☼ Reliability
Description
This PR changes the module resolution path in eejs.js as a bug fix for ESM compatibility, but no
regression test was added or updated to cover the behavior. Without an automated test, the
trailing-slash import can be reintroduced unnoticed and break under strict ESM exports resolution.
Code

eejs.js[3]

Evidence
PR Compliance ID 1 requires a regression test for each bug fix. The PR modifies the require() path
in eejs.js, but the existing automated test only checks that a pad loads and does not exercise or
guard the require('ep_etherpad-lite/node/eejs') import string against regression.

AGENTS.md: Every Bug Fix Must Include a Regression Test
eejs.js[3-3]
static/tests/frontend-new/specs/smoke.spec.ts[8-13]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
A bug fix was made to remove the trailing slash from `require('ep_etherpad-lite/node/eejs/')`, but there is no regression test to prevent reintroducing the trailing-slash form.

## Issue Context
The change in `eejs.js` is intended to maintain backward compatibility while working with Node's strict ESM exports map resolution.

## Fix Focus Areas
- eejs.js[3-3]
- static/tests/backend/specs/esm-eejs-require.spec.js[1-120]

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


Comment thread eejs.js
'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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

1. eejs require change untested 📘 Rule violation ☼ Reliability

This PR changes the module resolution path in eejs.js as a bug fix for ESM compatibility, but no
regression test was added or updated to cover the behavior. Without an automated test, the
trailing-slash import can be reintroduced unnoticed and break under strict ESM exports resolution.
Agent Prompt
## Issue description
A bug fix was made to remove the trailing slash from `require('ep_etherpad-lite/node/eejs/')`, but there is no regression test to prevent reintroducing the trailing-slash form.

## Issue Context
The change in `eejs.js` is intended to maintain backward compatibility while working with Node's strict ESM exports map resolution.

## Fix Focus Areas
- eejs.js[3-3]
- static/tests/backend/specs/esm-eejs-require.spec.js[1-120]

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

SamTV12345 merged commit d86752b into main May 25, 2026
3 checks passed
SamTV12345 deleted the fix/esm-compat branch May 25, 2026 16:02
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL