etherpad-lite/.github/workflows
John McLear fd975323e0
Fix ESM/CJS interop for Settings module breaking plugin compatibility (#7421)
* Pin plugins to last-known-good versions in backend tests

Pin ep_font_size@0.4.65, ep_headings2@0.2.76, ep_markdown@10.0.1
to the versions that passed on March 31. The newer versions cause
a template crash: Cannot read properties of undefined (reading
'indexOf') at pad.html:67 in toolbar.menu().

This will help narrow down which plugin update is the culprit.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Unpin ep_markdown, 1.0.8 is latest and code-identical to 10.0.1

Only ep_font_size@0.4.65 and ep_headings2@0.2.76 remain pinned to
narrow down which plugin update causes the toolbar template crash.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Use pnpm instead of gnpm for plugin install in backend tests

gnpm ignores version pins — it reports installing the pinned version
but the plugin loader picks up the latest from its store. Switching
to pnpm for the plugin install step so version pins actually work.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Use gnpm exec pnpm for plugin install to bypass gnpm caching

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Remove ep_hash_auth from backend test plugin list

ep_hash_auth blocks unauthenticated requests, causing 28 backend tests
to get 500 Internal Server Error when accessing pads. The tests don't
provide credentials, so any auth plugin will break them.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Fix ESM/CJS interop for Settings module and harden toolbar

Plugins use require('ep_etherpad-lite/node/utils/Settings') (CJS) but
Settings.ts uses export default (ESM). With tsx, CJS require puts the
default export under .default, so settings.toolbar is undefined and
ep_font_size crashes with "Cannot read properties of undefined
(reading 'indexOf')" when rendering pad.html.

Two fixes:
- Settings.ts: add property getters on module.exports so CJS consumers
  can access settings properties directly
- toolbar.ts: guard against undefined buttons array to prevent crashes
  if Settings interop doesn't propagate through gnpm's plugin_packages

Tested locally: 735 passing, 0 failing with all plugins.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 11:39:40 +01:00
..
backend-tests.yml Fix ESM/CJS interop for Settings module breaking plugin compatibility (#7421) 2026-04-01 11:39:40 +01:00
build-and-deploy-docs.yml build(deps): bump actions/deploy-pages from 4 to 5 (#7391) 2026-03-30 21:27:35 +02:00
codeql-analysis.yml build(deps): bump actions/checkout from 5 to 6 (#7233) 2025-11-30 20:31:22 +01:00
dependency-review.yml build(deps): bump actions/checkout from 5 to 6 (#7233) 2025-11-30 20:31:22 +01:00
docker.yml build(deps): bump docker/setup-qemu-action from 3 to 4 (#7351) 2026-03-08 22:35:34 +01:00
frontend-admin-tests.yml Fix frontend test failures across all browsers (#7416) 2026-04-01 09:07:45 +01:00
frontend-tests.yml Fix frontend test failures across all browsers (#7416) 2026-04-01 09:07:45 +01:00
handleRelease.yml build(deps): bump actions/cache from 4 to 5 (#7264) 2025-12-19 21:24:15 +01:00
load-test.yml Fix frontend test failures across all browsers (#7416) 2026-04-01 09:07:45 +01:00
perform-type-check.yml build(deps): bump actions/cache from 4 to 5 (#7264) 2025-12-19 21:24:15 +01:00
rate-limit.yml build(deps): bump actions/cache from 4 to 5 (#7264) 2025-12-19 21:24:15 +01:00
release.yml build(deps): bump reitzig/actions-asciidoctor from 2.0.3 to 2.0.4 (#7370) 2026-03-16 16:34:06 +00:00
releaseEtherpad.yml build(deps): bump actions/cache from 4 to 5 (#7264) 2025-12-19 21:24:15 +01:00
stale.yml build(deps): bump actions/stale from 9 to 10 (#7115) 2025-09-08 19:25:33 +02:00
update-plugins.yml Improve update-plugins workflow resilience and add summary (#7407) 2026-03-31 11:15:41 +01:00
upgrade-from-latest-release.yml build(deps): bump actions/cache from 4 to 5 (#7264) 2025-12-19 21:24:15 +01:00