Skip to content

Commit 7d537f3

Browse files
JohnMcLearclaude
andauthored
Require Node.js >= 25 (engines, installers, Dockerfile, snap, CI, docs) (#7749)
* docs: bump documented Node.js minimum to 25 Etherpad is moving its supported Node.js floor to >= 25 (CI matrix is already pinned to 25 across all workflows on the node25-corepack-pnpm11 work). Sync the user-facing documentation so the install instructions, requirements section, and plugin metadata example all reflect the new minimum instead of Node 22 / 12.17. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * chore: require Node.js >= 25 (engines, installers, Dockerfile, snap, CI) #7747 added Node 25 *support* but left the floor at Node 22. This commit completes the cutover so the runtime requirement matches the documentation bumped in the previous commit. - package.json: engines.node ">=22.13.0" → ">=25.0.0" - bin/functions.sh, bin/installer.sh, bin/installer.ps1: REQUIRED_NODE bumped to 25 (controls the error message users see when they invoke the installer or pnpm scripts on an older Node) - Dockerfile: base image node:22-alpine → node:25-alpine (×2). Corepack comment updated: Node 25 no longer ships corepack at all, so we install it from npm rather than refreshing a stale signing-key list - snap/snapcraft.yaml: pinned NODE_VERSION 22.22.2 → 25.9.0 and the surrounding design notes rewritten to reflect Node 25 instead of 22 - .github/workflows/*.yml: matrix dropped from [22, 24, 25] to just [25] (anything older now fails engines anyway). Stale comments in build-and-deploy-docs.yml referencing vite 8's 22.12 floor cleaned up - bin/plugins/lib/npmpublish.yml: setup-node 22 → 25 so the plugin template propagated to every ether/* plugin matches the new minimum Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(docker): install pnpm directly on Node 25 (no corepack) node:25-alpine doesn't ship corepack but does pre-install yarn at /usr/local/bin/yarn, so `npm install -g corepack@latest` fails with EEXIST trying to register its yarn shim. Per #7747, end-users install pnpm via plain `npm install -g pnpm` on Node 25 — use the same flow in the Dockerfile (and remove the unused yarn binary so it doesn't sit on PATH inside the image). Drops COREPACK_HOME and the related issue-7687 cache-sharing tweak since there's no corepack shim to share. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 99f8258 commit 7d537f3

15 files changed

Lines changed: 47 additions & 55 deletions

.github/workflows/backend-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ jobs:
2727
strategy:
2828
fail-fast: false
2929
matrix:
30-
# PRs: test on latest Node only. Push to develop: full matrix.
31-
node: ${{ github.event_name == 'pull_request' && fromJSON('[25]') || fromJSON('[22, 24, 25]') }}
30+
# Etherpad requires Node >= 25 (see package.json engines.node).
31+
node: ${{ fromJSON('[25]') }}
3232
steps:
3333
-
3434
name: Checkout repository
@@ -101,7 +101,7 @@ jobs:
101101
strategy:
102102
fail-fast: false
103103
matrix:
104-
node: ${{ github.event_name == 'pull_request' && fromJSON('[25]') || fromJSON('[22, 24, 25]') }}
104+
node: ${{ fromJSON('[25]') }}
105105
steps:
106106
-
107107
name: Checkout repository

.github/workflows/build-and-deploy-docs.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ jobs:
5656
with:
5757
run_install: false
5858
# Pin Node so the build does not silently fall back to whatever the
59-
# runner image ships with. vite 8 requires Node ^20.19.0 || >=22.12.0;
60-
# the repo declares engines.node >=22.12.0 to match.
59+
# runner image ships with. The repo declares engines.node >=25.0.0.
6160
- name: Use Node.js
6261
uses: actions/setup-node@v6
6362
with:

.github/workflows/frontend-admin-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ jobs:
2121
strategy:
2222
fail-fast: false
2323
matrix:
24-
# PRs: single Node version. Push: full matrix.
25-
node: ${{ github.event_name == 'pull_request' && fromJSON('[25]') || fromJSON('[22, 24, 25]') }}
24+
# Etherpad requires Node >= 25 (see package.json engines.node).
25+
node: ${{ fromJSON('[25]') }}
2626

2727
steps:
2828
-

.github/workflows/upgrade-from-latest-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ jobs:
2727
strategy:
2828
fail-fast: false
2929
matrix:
30-
# PRs: single Node version. Push: full matrix.
31-
node: ${{ github.event_name == 'pull_request' && fromJSON('[25]') || fromJSON('[22, 24, 25]') }}
30+
# Etherpad requires Node >= 25 (see package.json engines.node).
31+
node: ${{ fromJSON('[25]') }}
3232
steps:
3333
-
3434
name: Check out latest release

Dockerfile

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,22 @@ ARG BUILD_ENV=git
99

1010
ARG PnpmVersion=11.0.6
1111

12-
FROM node:22-alpine AS adminbuild
13-
# Use corepack to provision pnpm and drop the bundled npm — its older
14-
# transitives (picomatch, brace-expansion) carry CVEs we don't otherwise
15-
# need. Refresh corepack first: the version bundled with Node 22 ships a
16-
# stale signing-key list and rejects newer pnpm releases
17-
# (nodejs/corepack#612). Mirrors the workaround in snap/snapcraft.yaml.
18-
RUN npm install -g corepack@latest && \
19-
corepack enable && corepack prepare pnpm@${PnpmVersion} --activate && \
12+
FROM node:25-alpine AS adminbuild
13+
# Node 25 no longer ships corepack at all, so install pnpm directly via
14+
# npm. The node:25-alpine image also bundles yarn; remove it first to
15+
# avoid leaving an unused binary on PATH. Drop bundled npm afterwards
16+
# — its older transitives (picomatch, brace-expansion) carry CVEs we
17+
# don't otherwise need.
18+
RUN rm -f /usr/local/bin/yarn /usr/local/bin/yarnpkg && \
19+
npm install -g pnpm@${PnpmVersion} && \
2020
rm -rf /usr/local/lib/node_modules/npm /usr/local/bin/npm /usr/local/bin/npx
2121
WORKDIR /opt/etherpad-lite
2222
COPY . .
2323
RUN pnpm install
2424
RUN pnpm run build:ui
2525

2626

27-
FROM node:22-alpine AS build
27+
FROM node:25-alpine AS build
2828
LABEL maintainer="Etherpad team, https://github.com/ether/etherpad"
2929

3030
# Set these arguments when building the image from behind a proxy
@@ -99,21 +99,16 @@ RUN groupadd --system ${EP_GID:+--gid "${EP_GID}" --non-unique} etherpad && \
9999
ARG EP_DIR=/opt/etherpad-lite
100100
RUN mkdir -p "${EP_DIR}" && chown etherpad:etherpad "${EP_DIR}"
101101

102-
# Share corepack's cache between root (which activates pnpm here) and
103-
# the `etherpad` user (which invokes pnpm later via the corepack shim).
104-
# $COREPACK_HOME defaults to ~/.cache/node/corepack and is per-user;
105-
# without this pin the etherpad user finds an empty cache, re-resolves
106-
# pnpm, and corepack can fall back to "latest" from the registry. See
107-
# https://github.com/ether/etherpad/issues/7687.
108-
ENV COREPACK_HOME=/opt/corepack
109-
102+
# Node 25 dropped corepack; install pnpm directly via npm, then drop
103+
# both npm and the pre-bundled yarn binary to keep the runtime image
104+
# free of unused tooling and known-CVE transitives.
105+
#
110106
# the mkdir is needed for configuration of openjdk-11-jre-headless, see
111107
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=863199
112108
RUN \
113-
mkdir -p /usr/share/man/man1 "${COREPACK_HOME}" && \
114-
npm install -g corepack@latest && \
115-
corepack enable && corepack prepare pnpm@${PnpmVersion} --activate && \
116-
chown -R etherpad:etherpad "${COREPACK_HOME}" && \
109+
mkdir -p /usr/share/man/man1 && \
110+
rm -f /usr/local/bin/yarn /usr/local/bin/yarnpkg && \
111+
npm install -g pnpm@${PnpmVersion} && \
117112
rm -rf /usr/local/lib/node_modules/npm /usr/local/bin/npm /usr/local/bin/npx && \
118113
apk update && apk upgrade && \
119114
apk add --no-cache \

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ For more than a decade, Etherpad has quietly underpinned the documents that matt
6464

6565
### Quick install (one-liner)
6666

67-
The fastest way to get Etherpad running. Requires `git` and Node.js >= 22.
67+
The fastest way to get Etherpad running. Requires `git` and Node.js >= 25.
6868

6969
**macOS / Linux / WSL:**
7070

@@ -158,7 +158,7 @@ volumes:
158158
159159
### Requirements
160160
161-
[Node.js](https://nodejs.org/) >= 22.12.
161+
[Node.js](https://nodejs.org/) >= 25.
162162
163163
### Windows, macOS, Linux
164164

bin/functions.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# minimum required node version
2-
REQUIRED_NODE_MAJOR=22
2+
REQUIRED_NODE_MAJOR=25
33
REQUIRED_NODE_MINOR=0
44

55
# minimum required npm version

bin/installer.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function Test-Cmd([string]$name) {
3838
$EtherpadDir = if ($env:ETHERPAD_DIR) { $env:ETHERPAD_DIR } else { 'etherpad-lite' }
3939
$EtherpadBranch = if ($env:ETHERPAD_BRANCH) { $env:ETHERPAD_BRANCH } else { 'master' }
4040
$EtherpadRepo = if ($env:ETHERPAD_REPO) { $env:ETHERPAD_REPO } else { 'https://github.com/ether/etherpad.git' }
41-
$RequiredNodeMajor = 22
41+
$RequiredNodeMajor = 25
4242

4343
Write-Step 'Etherpad installer'
4444

bin/installer.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ is_cmd() { command -v "$1" >/dev/null 2>&1; }
3434
ETHERPAD_DIR="${ETHERPAD_DIR:-etherpad-lite}"
3535
ETHERPAD_BRANCH="${ETHERPAD_BRANCH:-master}"
3636
ETHERPAD_REPO="${ETHERPAD_REPO:-https://github.com/ether/etherpad.git}"
37-
REQUIRED_NODE_MAJOR=22
37+
REQUIRED_NODE_MAJOR=25
3838

3939
step "Etherpad installer"
4040

bin/plugins/lib/npmpublish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ jobs:
2121
- uses: actions/setup-node@v6
2222
with:
2323
# OIDC trusted publishing needs npm >= 11.5.1, which requires
24-
# Node >= 22.9.0. setup-node's `22` resolves to the latest
25-
# 22.x, which satisfies that.
26-
node-version: 22
24+
# Node >= 22.9.0. Use Node 25 to match the rest of CI and the
25+
# Etherpad core minimum.
26+
node-version: 25
2727
registry-url: https://registry.npmjs.org/
2828
- name: Upgrade npm to >=11.5.1 (required for trusted publishing)
2929
run: npm install -g npm@latest

0 commit comments

Comments
 (0)