Skip to content

Commit 8a7dfce

Browse files
committed
Merge branch 'develop'
2 parents 6814aa9 + 6c91759 commit 8a7dfce

File tree

421 files changed

+18288
-16180
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

421 files changed

+18288
-16180
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ Dockerfile
2424

2525
settings.json
2626
src/node_modules
27+
admin/node_modules

.env.default

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Please copy and rename this file.
2+
#
3+
# !Attention!
4+
# Always ensure to load the env variables in every terminal session.
5+
# Otherwise the env variables will not be available
6+
7+
DOCKER_COMPOSE_APP_DEV_PORT_PUBLISHED=9001
8+
DOCKER_COMPOSE_APP_DEV_PORT_TARGET=9001
9+
10+
# IMPORTANT: When the env var DEFAULT_PAD_TEXT is unset or empty, then the pad is not established (not the landing page).
11+
# The env var DEFAULT_PAD_TEXT seems to be mandatory in the latest version of etherpad.
12+
DOCKER_COMPOSE_APP_DEV_ENV_DEFAULT_PAD_TEXT="Welcome to etherpad"
13+
14+
DOCKER_COMPOSE_APP_DEV_ADMIN_PASSWORD=
15+
16+
DOCKER_COMPOSE_POSTGRES_DEV_ENV_POSTGRES_DATABASE=db
17+
DOCKER_COMPOSE_POSTGRES_DEV_ENV_POSTGRES_PASSWORD=etherpad-lite-password
18+
DOCKER_COMPOSE_POSTGRES_DEV_ENV_POSTGRES_USER=etherpad-lite-user

.github/dependabot.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,3 @@ updates:
1414
schedule:
1515
interval: "daily"
1616
versioning-strategy: "increase"
17-
- package-ecosystem: "npm"
18-
directory: "/src/bin/doc"
19-
schedule:
20-
interval: "daily"
21-
versioning-strategy: "increase"

.github/workflows/backend-tests.yml

Lines changed: 117 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,42 @@ jobs:
2727
uses: actions/setup-node@v4
2828
with:
2929
node-version: ${{ matrix.node }}
30-
cache: 'npm'
31-
cache-dependency-path: |
32-
src/package-lock.json
33-
src/bin/doc/package-lock.json
30+
- uses: pnpm/action-setup@v3
31+
name: Install pnpm
32+
with:
33+
version: 8
34+
run_install: false
35+
- name: Get pnpm store directory
36+
shell: bash
37+
run: |
38+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
39+
- uses: actions/cache@v4
40+
name: Setup pnpm cache
41+
with:
42+
path: ${{ env.STORE_PATH }}
43+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
44+
restore-keys: |
45+
${{ runner.os }}-pnpm-store-
46+
- name: Only install direct dependencies
47+
run: pnpm config set auto-install-peers false
3448
-
3549
name: Install libreoffice
36-
run: |
37-
sudo add-apt-repository -y ppa:libreoffice/ppa
38-
sudo apt update
39-
sudo apt install -y --no-install-recommends libreoffice libreoffice-pdfimport
50+
uses: awalsh128/[email protected]
51+
with:
52+
packages: libreoffice libreoffice-pdfimport
53+
version: 1.0
4054
-
4155
name: Install all dependencies and symlink for ep_etherpad-lite
42-
run: src/bin/installDeps.sh
56+
run: bin/installDeps.sh
57+
- name: Install admin ui
58+
working-directory: admin
59+
run: pnpm install
60+
- name: Build admin ui
61+
working-directory: admin
62+
run: pnpm build
4363
-
4464
name: Run the backend tests
45-
run: cd src && npm test
65+
run: pnpm test
4666

4767
withpluginsLinux:
4868
# run on pushes to any branch
@@ -64,22 +84,43 @@ jobs:
6484
uses: actions/setup-node@v4
6585
with:
6686
node-version: ${{ matrix.node }}
67-
cache: 'npm'
68-
cache-dependency-path: |
69-
src/package-lock.json
70-
src/bin/doc/package-lock.json
87+
- uses: pnpm/action-setup@v3
88+
name: Install pnpm
89+
with:
90+
version: 8
91+
run_install: false
92+
- name: Get pnpm store directory
93+
shell: bash
94+
run: |
95+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
96+
- uses: actions/cache@v4
97+
name: Setup pnpm cache
98+
with:
99+
path: ${{ env.STORE_PATH }}
100+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
101+
restore-keys: |
102+
${{ runner.os }}-pnpm-store-
103+
- name: Only install direct dependencies
104+
run: pnpm config set auto-install-peers false
71105
-
72106
name: Install libreoffice
73-
run: |
74-
sudo add-apt-repository -y ppa:libreoffice/ppa
75-
sudo apt update
76-
sudo apt install -y --no-install-recommends libreoffice libreoffice-pdfimport
107+
uses: awalsh128/[email protected]
108+
with:
109+
packages: libreoffice libreoffice-pdfimport
110+
version: 1.0
111+
-
112+
name: Install all dependencies and symlink for ep_etherpad-lite
113+
run: bin/installDeps.sh
114+
- name: Install admin ui
115+
working-directory: admin
116+
run: pnpm install
117+
- name: Build admin ui
118+
working-directory: admin
119+
run: pnpm build
77120
-
78121
name: Install Etherpad plugins
79-
# The --legacy-peer-deps flag is required to work around a bug in npm v7:
80-
# https://github.com/npm/cli/issues/2199
81122
run: >
82-
npm install --no-save --legacy-peer-deps
123+
pnpm install --workspace-root
83124
ep_align
84125
ep_author_hover
85126
ep_cursortrace
@@ -93,21 +134,9 @@ jobs:
93134
ep_spellcheck
94135
ep_subscript_and_superscript
95136
ep_table_of_contents
96-
# Etherpad core dependencies must be installed after installing the
97-
# plugin's dependencies, otherwise npm will try to hoist common
98-
# dependencies by removing them from src/node_modules and installing them
99-
# in the top-level node_modules. As of v6.14.10, npm's hoist logic appears
100-
# to be buggy, because it sometimes removes dependencies from
101-
# src/node_modules but fails to add them to the top-level node_modules.
102-
# Even if npm correctly hoists the dependencies, the hoisting seems to
103-
# confuse tools such as `npm outdated`, `npm update`, and some ESLint
104-
# rules.
105-
-
106-
name: Install all dependencies and symlink for ep_etherpad-lite
107-
run: src/bin/installDeps.sh
108137
-
109138
name: Run the backend tests
110-
run: cd src && npm test
139+
run: pnpm test
111140

112141
withoutpluginsWindows:
113142
# run on pushes to any branch
@@ -125,21 +154,41 @@ jobs:
125154
uses: actions/setup-node@v4
126155
with:
127156
node-version: 20
128-
cache: 'npm'
129-
cache-dependency-path: |
130-
src/package-lock.json
131-
src/bin/doc/package-lock.json
157+
- uses: pnpm/action-setup@v3
158+
name: Install pnpm
159+
with:
160+
version: 8
161+
run_install: false
162+
- name: Get pnpm store directory
163+
shell: bash
164+
run: |
165+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
166+
- uses: actions/cache@v4
167+
name: Setup pnpm cache
168+
with:
169+
path: ${{ env.STORE_PATH }}
170+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
171+
restore-keys: |
172+
${{ runner.os }}-pnpm-store-
173+
- name: Only install direct dependencies
174+
run: pnpm config set auto-install-peers false
132175
-
133176
name: Install all dependencies and symlink for ep_etherpad-lite
134-
run: src/bin/installOnWindows.bat
177+
run: bin/installOnWindows.bat
178+
- name: Install admin ui
179+
working-directory: admin
180+
run: pnpm install
181+
- name: Build admin ui
182+
working-directory: admin
183+
run: pnpm build
135184
-
136185
name: Fix up the settings.json
137186
run: |
138187
powershell -Command "(gc settings.json.template) -replace '\"max\": 10', '\"max\": 10000' | Out-File -encoding ASCII settings.json.holder"
139188
powershell -Command "(gc settings.json.holder) -replace '\"points\": 10', '\"points\": 1000' | Out-File -encoding ASCII settings.json"
140189
-
141190
name: Run the backend tests
142-
run: cd src && npm test
191+
run: cd src && pnpm test
143192

144193
withpluginsWindows:
145194
# run on pushes to any branch
@@ -157,17 +206,37 @@ jobs:
157206
-
158207
uses: actions/setup-node@v4
159208
with:
160-
node-version: 20
161-
cache: 'npm'
162-
cache-dependency-path: |
163-
src/package-lock.json
164-
src/bin/doc/package-lock.json
209+
node-version: 21
210+
- uses: pnpm/action-setup@v3
211+
name: Install pnpm
212+
with:
213+
version: 8
214+
run_install: false
215+
- name: Get pnpm store directory
216+
shell: bash
217+
run: |
218+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
219+
- uses: actions/cache@v4
220+
name: Setup pnpm cache
221+
with:
222+
path: ${{ env.STORE_PATH }}
223+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
224+
restore-keys: |
225+
${{ runner.os }}-pnpm-store-
226+
- name: Only install direct dependencies
227+
run: pnpm config set auto-install-peers false
228+
- name: Install admin ui
229+
working-directory: admin
230+
run: pnpm install
231+
- name: Build admin ui
232+
working-directory: admin
233+
run: pnpm build
165234
-
166235
name: Install Etherpad plugins
167236
# The --legacy-peer-deps flag is required to work around a bug in npm
168237
# v7: https://github.com/npm/cli/issues/2199
169238
run: >
170-
npm install --no-save --legacy-peer-deps
239+
pnpm install --workspace-root
171240
ep_align
172241
ep_author_hover
173242
ep_cursortrace
@@ -192,12 +261,12 @@ jobs:
192261
# rules.
193262
-
194263
name: Install all dependencies and symlink for ep_etherpad-lite
195-
run: src/bin/installOnWindows.bat
264+
run: bin/installOnWindows.bat
196265
-
197266
name: Fix up the settings.json
198267
run: |
199268
powershell -Command "(gc settings.json.template) -replace '\"max\": 10', '\"max\": 10000' | Out-File -encoding ASCII settings.json.holder"
200269
powershell -Command "(gc settings.json.holder) -replace '\"points\": 10', '\"points\": 1000' | Out-File -encoding ASCII settings.json"
201270
-
202271
name: Run the backend tests
203-
run: cd src && npm test
272+
run: cd src && pnpm test

.github/workflows/docker.yml

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
uses: docker/build-push-action@v5
3131
with:
3232
context: .
33+
target: production
3334
load: true
3435
tags: ${{ env.TEST_TAG }}
3536
cache-from: type=gha
@@ -39,16 +40,28 @@ jobs:
3940
uses: actions/setup-node@v4
4041
with:
4142
node-version: 'lts/*'
42-
cache: 'npm'
43-
cache-dependency-path: |
44-
src/package-lock.json
45-
src/bin/doc/package-lock.json
43+
- uses: pnpm/action-setup@v3
44+
name: Install pnpm
45+
with:
46+
version: 8
47+
run_install: false
48+
- name: Get pnpm store directory
49+
shell: bash
50+
run: |
51+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
52+
- uses: actions/cache@v4
53+
name: Setup pnpm cache
54+
with:
55+
path: ${{ env.STORE_PATH }}
56+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
57+
restore-keys: |
58+
${{ runner.os }}-pnpm-store-
4659
-
4760
name: Test
4861
run: |
4962
docker run --rm -d -p 9001:9001 --name test ${{ env.TEST_TAG }}
63+
./bin/installDeps.sh
5064
docker logs -f test &
51-
./src/bin/installDeps.sh
5265
while true; do
5366
echo "Waiting for Docker container to start..."
5467
status=$(docker container inspect -f '{{.State.Health.Status}}' test) || exit 1
@@ -58,7 +71,7 @@ jobs:
5871
*) printf %s\\n "unexpected status: ${status}" >&2; exit 1;;
5972
esac
6073
done
61-
(cd src && npm run test-container)
74+
(cd src && pnpm run test-container)
6275
git clean -dxf .
6376
-
6477
name: Docker meta
@@ -85,6 +98,7 @@ jobs:
8598
uses: docker/build-push-action@v5
8699
with:
87100
context: .
101+
target: production
88102
platforms: linux/amd64,linux/arm64
89103
push: true
90104
tags: ${{ steps.meta.outputs.tags }}
@@ -96,4 +110,4 @@ jobs:
96110
username: ${{ secrets.DOCKERHUB_USERNAME }}
97111
password: ${{ secrets.DOCKERHUB_TOKEN }}
98112
repository: etherpad/etherpad
99-
enable-url-completion: true
113+
enable-url-completion: true

0 commit comments

Comments
 (0)