mirror of
https://github.com/ether/etherpad-lite.git
synced 2026-07-17 16:47:05 +00:00
* Roll Node.js floor back to >= 24 (Active LTS) Closes #7779. #7779 originally proposed bumping past the Node 25 stop-gap to Node 26. After re-checking the release schedule, the cleaner LTS target is actually Node 24: - Node 24 (Krypton) is currently in Active LTS, supported until ~May 2028. - Node 25 hit end-of-life on April 10 2026 — the floor merged in #7752 / #7749 / #7754 a day ago ships an already-EOL major. - Node 26 was released May 5 2026 and does not enter Active LTS until October 2026. So this PR reverts the Node 25 ratchet from those three PRs and lands on Node 24 — Etherpad's runtime floor stays on a supported LTS for the next ~2 years. Runtime / infra - `package.json` + `src/package.json`: `engines.node` `>=25.0.0` -> `>=24.0.0` - `bin/functions.sh`, `bin/installer.sh`, `bin/installer.ps1`: `REQUIRED_NODE_MAJOR` 25 -> 24 - `Dockerfile`: `node:25-alpine` -> `node:24-alpine` (both stages). Corepack-via-npm workaround is intentionally kept: it works on Node 24 (which still ships corepack) and on Node 25+ (which doesn't), so the same recipe survives the next LTS bump without churn. Comments reworded accordingly. - `snap/snapcraft.yaml`: pinned `NODE_VERSION` 25.9.0 -> 24.15.0; design notes + corepack comment adjusted - `packaging/nfpm.yaml`: `nodejs (>= 25)` -> `nodejs (>= 24)` in top-level depends + deb/rpm overrides - `packaging/bin/etherpad`: comment matches the new pin - `packaging/README.md`: build prereqs + apt install snippet point at `node_24.x`; the long-stale "engines.node floor is 20" line is fixed while we're here - `.github/workflows/*.yml`: setup-node `node-version` 25 -> 24 across every workflow; backend / frontend-admin / upgrade matrices `[25]` -> `[24]` - `.github/workflows/deb-package.yml`: `NODE_MAJOR=25` + `node_25.x` smoke-test installer -> 24 - `bin/plugins/lib/npmpublish.yml`: 25 -> 24 (template propagates to the ~80 ether/* plugins via update-plugins workflow) Docs - `README.md`: install one-liner + Requirements -> Node.js >= 24 - `doc/npm-trusted-publishing.md`: runner requirement -> Node 24 - `doc/plugins.md` / `doc/plugins.adoc`: plugin metadata example `engines.node` -> `">=24.0.0"` @types/node is left at ^25.8.0 — newer type definitions cover Node 24 runtime fine and avoid an unnecessary lockfile churn. Companion homepage one-liner change to follow on ether/ether.github.com. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(plugins): example engines.node = ">=22.0.0", not core's floor Plugin code is overwhelmingly ace-hook glue and rarely uses Node-version- specific APIs, so plugin engines.node should reflect the plugin's own requirements, not track core. Showing core's 24-floor in the example encouraged plugin authors to blindly copy a tighter pin than necessary and locked plugins out of being installable on older Etherpad/Node deployments. Use the most-recent Node LTS that has actually reached EOL (20 -> EOL April 2026) as the example floor, i.e. >=22. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
165 lines
6.1 KiB
YAML
165 lines
6.1 KiB
YAML
name: "Installer test"
|
|
|
|
# Exercises bin/installer.sh and bin/installer.ps1 end-to-end so the
|
|
# one-line install paths in the README stay working.
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- "bin/installer.sh"
|
|
- "bin/installer.ps1"
|
|
- ".github/workflows/installer-test.yml"
|
|
pull_request:
|
|
paths:
|
|
- "bin/installer.sh"
|
|
- "bin/installer.ps1"
|
|
- ".github/workflows/installer-test.yml"
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
shellcheck:
|
|
name: shellcheck
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: Run shellcheck on installer.sh
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y shellcheck
|
|
shellcheck bin/installer.sh
|
|
|
|
installer-posix:
|
|
name: end-to-end install (${{ matrix.os }})
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest]
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version: 24
|
|
|
|
- name: Pre-install pnpm (avoid sudo prompt in the installer)
|
|
run: npm install -g pnpm
|
|
|
|
- name: Run bin/installer.sh against this commit
|
|
env:
|
|
ETHERPAD_DIR: ${{ runner.temp }}/etherpad-installer-test
|
|
ETHERPAD_REPO: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.clone_url || format('{0}/{1}.git', github.server_url, github.repository) }}
|
|
ETHERPAD_BRANCH: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || github.ref_name }}
|
|
NO_COLOR: "1"
|
|
run: sh ./bin/installer.sh
|
|
|
|
- name: Verify clone + dependencies + build artifacts
|
|
shell: bash
|
|
env:
|
|
ETHERPAD_DIR: ${{ runner.temp }}/etherpad-installer-test
|
|
run: |
|
|
set -eux
|
|
test -d "$ETHERPAD_DIR/.git"
|
|
test -f "$ETHERPAD_DIR/package.json"
|
|
test -d "$ETHERPAD_DIR/node_modules"
|
|
test -d "$ETHERPAD_DIR/src/node_modules"
|
|
# build:etherpad copies the admin SPA into src/templates/admin
|
|
test -f "$ETHERPAD_DIR/src/templates/admin/index.html"
|
|
|
|
- name: Smoke test - start Etherpad and curl /api
|
|
shell: bash
|
|
env:
|
|
ETHERPAD_DIR: ${{ runner.temp }}/etherpad-installer-test
|
|
run: |
|
|
set -eu
|
|
cd "$ETHERPAD_DIR"
|
|
pnpm run prod >/tmp/etherpad.log 2>&1 &
|
|
PID=$!
|
|
# Wait up to 60s for the API to come up.
|
|
ok=0
|
|
for i in $(seq 1 60); do
|
|
if curl -fsS http://localhost:9001/api >/dev/null 2>&1; then
|
|
echo "Etherpad answered on /api after ${i}s"
|
|
ok=1
|
|
break
|
|
fi
|
|
sleep 1
|
|
done
|
|
if [ "$ok" != "1" ]; then
|
|
echo "Etherpad did not start within 60s. Last 200 lines of log:" >&2
|
|
tail -200 /tmp/etherpad.log >&2 || true
|
|
kill "$PID" 2>/dev/null || true
|
|
exit 1
|
|
fi
|
|
kill "$PID" 2>/dev/null || true
|
|
wait "$PID" 2>/dev/null || true
|
|
|
|
installer-windows:
|
|
name: end-to-end install (windows-latest)
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version: 24
|
|
|
|
- name: Pre-install pnpm
|
|
run: npm install -g pnpm
|
|
|
|
- name: Run bin/installer.ps1 against this commit
|
|
shell: pwsh
|
|
env:
|
|
ETHERPAD_DIR: ${{ runner.temp }}\etherpad-installer-test
|
|
ETHERPAD_REPO: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.clone_url || format('{0}/{1}.git', github.server_url, github.repository) }}
|
|
ETHERPAD_BRANCH: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || github.ref_name }}
|
|
NO_COLOR: "1"
|
|
run: ./bin/installer.ps1
|
|
|
|
- name: Verify clone + dependencies + build artifacts
|
|
shell: pwsh
|
|
env:
|
|
ETHERPAD_DIR: ${{ runner.temp }}\etherpad-installer-test
|
|
run: |
|
|
if (-not (Test-Path "$env:ETHERPAD_DIR\.git")) { throw '.git missing' }
|
|
if (-not (Test-Path "$env:ETHERPAD_DIR\package.json")) { throw 'package.json missing' }
|
|
if (-not (Test-Path "$env:ETHERPAD_DIR\node_modules")) { throw 'node_modules missing' }
|
|
if (-not (Test-Path "$env:ETHERPAD_DIR\src\node_modules")) { throw 'src/node_modules missing' }
|
|
if (-not (Test-Path "$env:ETHERPAD_DIR\src\templates\admin\index.html")) { throw 'admin SPA missing' }
|
|
|
|
- name: Smoke test - start Etherpad and curl /api
|
|
shell: pwsh
|
|
env:
|
|
ETHERPAD_DIR: ${{ runner.temp }}\etherpad-installer-test
|
|
run: |
|
|
Push-Location $env:ETHERPAD_DIR
|
|
$logPath = Join-Path $env:RUNNER_TEMP 'etherpad.log'
|
|
# pnpm on Windows is a .cmd shim, which Start-Process can't run
|
|
# directly — wrap it in cmd.exe.
|
|
$proc = Start-Process -FilePath cmd.exe `
|
|
-ArgumentList '/c','pnpm','run','prod' `
|
|
-RedirectStandardOutput $logPath `
|
|
-RedirectStandardError "$logPath.err" `
|
|
-PassThru -NoNewWindow
|
|
$ok = $false
|
|
for ($i = 1; $i -le 90; $i++) {
|
|
try {
|
|
Invoke-WebRequest -UseBasicParsing -Uri http://localhost:9001/api -TimeoutSec 2 | Out-Null
|
|
Write-Host "Etherpad answered on /api after ${i}s"
|
|
$ok = $true
|
|
break
|
|
} catch { Start-Sleep -Seconds 1 }
|
|
}
|
|
if (-not $ok) {
|
|
Write-Host 'Etherpad did not start within 90s. Last 200 lines of log (stdout):'
|
|
if (Test-Path $logPath) { Get-Content $logPath -Tail 200 }
|
|
Write-Host 'Last 200 lines of stderr:'
|
|
if (Test-Path "$logPath.err") { Get-Content "$logPath.err" -Tail 200 }
|
|
Stop-Process -Id $proc.Id -Force -ErrorAction SilentlyContinue
|
|
Pop-Location
|
|
exit 1
|
|
}
|
|
Stop-Process -Id $proc.Id -Force -ErrorAction SilentlyContinue
|
|
Pop-Location
|