Skip to content

Commit

Permalink
Merge upstream 2.2.2 dev (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
JannikStreek authored Sep 1, 2024
1 parent 409cbd8 commit 21f115f
Show file tree
Hide file tree
Showing 307 changed files with 28,875 additions and 42,590 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ docker-compose*.yml
settings.json
src/node_modules
admin/node_modules
ui/node_modules
node_modules
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
root = true

[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf
# editorconfig-tools is unable to ignore longs strings or urls
max_line_length = off

[CHANGELOG.md]
indent_size = 4

[*.bat]
end_of_line = crlf
12 changes: 6 additions & 6 deletions .env.default
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
# Always ensure to load the env variables in every terminal session.
# Otherwise the env variables will not be available

DOCKER_COMPOSE_APP_DEV_PORT_PUBLISHED=9001
DOCKER_COMPOSE_APP_DEV_PORT_TARGET=9001
DOCKER_COMPOSE_APP_PORT_PUBLISHED=9001
DOCKER_COMPOSE_APP_PORT_TARGET=9001

# IMPORTANT: When the env var DEFAULT_PAD_TEXT is unset or empty, then the pad is not established (not the landing page).
# The env var DEFAULT_PAD_TEXT seems to be mandatory in the latest version of etherpad.
DOCKER_COMPOSE_APP_DEV_ENV_DEFAULT_PAD_TEXT="Welcome to etherpad"

DOCKER_COMPOSE_APP_DEV_ENV_ADMIN_PASSWORD=
DOCKER_COMPOSE_APP_ADMIN_PASSWORD=

DOCKER_COMPOSE_POSTGRES_DEV_ENV_POSTGRES_DATABASE=db
DOCKER_COMPOSE_POSTGRES_DEV_ENV_POSTGRES_PASSWORD=etherpad-lite-password
DOCKER_COMPOSE_POSTGRES_DEV_ENV_POSTGRES_USER=etherpad-lite-user
DOCKER_COMPOSE_POSTGRES_DATABASE=db
DOCKER_COMPOSE_POSTGRES_PASSWORD=etherpad-lite-password
DOCKER_COMPOSE_POSTGRES_USER=etherpad-lite-user
18 changes: 18 additions & 0 deletions .env.dev.default
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Please copy and rename this file.
#
# !Attention!
# Always ensure to load the env variables in every terminal session.
# Otherwise the env variables will not be available

DOCKER_COMPOSE_APP_DEV_PORT_PUBLISHED=9001
DOCKER_COMPOSE_APP_DEV_PORT_TARGET=9001

# IMPORTANT: When the env var DEFAULT_PAD_TEXT is unset or empty, then the pad is not established (not the landing page).
# The env var DEFAULT_PAD_TEXT seems to be mandatory in the latest version of etherpad.
DOCKER_COMPOSE_APP_DEV_ENV_DEFAULT_PAD_TEXT="Welcome to etherpad"

DOCKER_COMPOSE_APP_DEV_ADMIN_PASSWORD=

DOCKER_COMPOSE_POSTGRES_DEV_ENV_POSTGRES_DATABASE=db
DOCKER_COMPOSE_POSTGRES_DEV_ENV_POSTGRES_PASSWORD=etherpad-lite-password
DOCKER_COMPOSE_POSTGRES_DEV_ENV_POSTGRES_USER=etherpad-lite-user
70 changes: 70 additions & 0 deletions .github/workflows/build-and-deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Workflow for deploying static content to GitHub Pages
name: Deploy Docs to GitHub Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["develop"]
paths:
- doc/** # Only run workflow when changes are made to the doc directory
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
packages: read

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v5
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9.0.4
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Only install direct dependencies
run: pnpm config set auto-install-peers false
- name: Install dependencies
run: pnpm install
- name: Build app
working-directory: doc
run: pnpm run docs:build
env:
COMMIT_REF: ${{ github.sha }}
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: './doc/.vitepress/dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
52 changes: 52 additions & 0 deletions .github/workflows/perform-type-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: "Perform type checks"

# any branch is useful for testing before a PR is submitted
on:
push:
paths-ignore:
- "doc/**"
pull_request:
paths-ignore:
- "doc/**"

permissions:
contents: read


jobs:
performTypeCheck:
if: |
(github.event_name != 'pull_request')
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
name: perform type check
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9.0.4
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Only install direct dependencies
run: pnpm config set auto-install-peers false
-
name: Install all dependencies and symlink for ep_etherpad-lite
run: ./bin/installDeps.sh
- name: Perform type check
working-directory: ./src
run: npm run ts-check
6 changes: 5 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ name: Create and publish a Docker image
on:
release:
types: [published]
push:
branches:
- 'merge-upstream-2.2.2-dev'

env:
REGISTRY: ghcr.io
Expand Down Expand Up @@ -50,7 +53,8 @@ jobs:
with:
platforms: linux/amd64,linux/arm64/v8
build-args: |
ETHERPAD_PLUGINS=kitsteam/ep_comments_page kitsteam/ep_push2delete ep_image_upload ep_embedded_hyperlinks2 ep_headings2 kitsteam/ep_delete_after_delay kitsteam/ep_delete_empty_pads ep_align ep_font_color ep_helmet ep_font_size ep_disable_imports
ETHERPAD_PLUGINS=ep_image_upload ep_embedded_hyperlinks2 ep_headings2 ep_align ep_font_color ep_helmet ep_font_size ep_disable_imports
ETHERPAD_GITHUB_PLUGINS=kitsteam/ep_comments_page#merge-upstream-1.0.36 kitsteam/ep_push2delete kitsteam/ep_delete_after_delay kitsteam/ep_delete_empty_pads
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ plugin_packages
/src/test-results
playwright-report
state.json
/src/static/oidc
83 changes: 69 additions & 14 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,58 @@
# 2.2.2

### Notable enhancements and fixes

- Removal of Etherpad require kernel: We finally managed to include esbuild to bundle our frontend code together. So no matter how many plugins your server has it is always one JavaScript file. This boosts performance dramatically.
- Added log layoutType: This lets you print the log in either colored or basic (black and white text)
- Introduced esbuild for bundling CSS files
- Cache all files to be bundled in memory for faster load speed


# 2.1.1


### Notable enhancements and fixes

- Fixed failing Docker build when checked out as git submodule. Thanks to @neurolabs
- Fixed: Fallback to websocket and polling when unknown(old) config is present for socket io
- Fixed: Next page disabled if zero page by @samyakj023
- On CTRL+CLICK bring the window back to focus by Helder Sepulveda

# 2.1.0

### Notable enhancements and fixes

- Added PWA support. You can now add your Etherpad instance to your home screen on your mobile device or desktop.
- Fixed live plugin manager versions clashing. Thanks to @yacchin1205
- Fixed a bug in the pad panel where pagination was not working correctly when sorting by pad name

### Compatibility changes

- Reintroduced APIKey.txt support. You can now switch between APIKey and OAuth2.0 authentication. This can be toggled with the setting authenticationMethod. The default is OAuth2. If you want to use the APIKey method you can set that to `apikey`.


# 2.0.3

### Notable enhancements and fixes

- Added documentation for replacing apikeys with oauth2
- Bumped live plugin manager to 0.20.0. Thanks to @fgreinacher
- Added better documentation for using docker-compose with Etherpad



# 2.0.2

### Notable enhancements and fixes

- Fixed the locale loading in the admin panel
- Added OAuth2.0 support for the Etherpad API. You can now log in into the Etherpad API with your admin user using OAuth2

### Compatibility changes

- The tests now require generating a token from the OAuth secret. You can find the `generateJWTToken` in the common.ts script for plugin endpoint updates.


# 2.0.1

### Notable enhancements and fixes
Expand All @@ -13,7 +68,7 @@
- Socket io has been updated to 4.7.5. This means that the json.send function won't work anymore and needs to be changed to .emit('message', myObj)
- Deprecating npm version 6 in favor of pnpm: We have made the decision to switch to the well established pnpm (https://pnpm.io/). It works by symlinking dependencies into a global directory allowing you to have a cleaner and more reliable environment.
- Introducing Typescript to the Etherpad core: Etherpad core logic has been rewritten in Typescript allowing for compiler checking of errors.
- Rewritten Admin Panel: The Admin panel has been rewritten in React and now features a more pleasant user experience. It now also features an integrated pad searching with sorting functionality.
- Rewritten Admin Panel: The Admin panel has been rewritten in React and now features a more pleasant user experience. It now also features an integrated pad searching with sorting functionality.

### Notable enhancements and fixes

Expand All @@ -23,17 +78,17 @@
* Enhancements
- pnpm Workspaces: In addition to pnpm we introduced workspaces. A clean way to manage multiple bounded contexts like the admin panel or the bin folder.
- Bin folder: The bin folder has been moved from the src folder to the root folder. This change was necessary as the contained scripts do not represent core functionality of the user.
- Starting Etherpad: Etherpad can now be started with a single command: `pnpm run prod` in the root directory.
- Starting Etherpad: Etherpad can now be started with a single command: `pnpm run prod` in the root directory.
- Installing Etherpad: Etherpad no longer symlinks itself in the root directory. This is now also taken care by pnpm, and it just creates a node_modules folder with the src directory`s ep_etherpad-lite folder
- Plugins can now be installed simply via the command: `pnpm run install-plugins first-plugin second-plugin` or if you want to install from path you can do:
`pnpm run install-plugins --path ../path-to-plugin`
- Plugins can now be installed simply via the command: `pnpm run plugins i first-plugin second-plugin` or if you want to install from path you can do:
`pnpm run plugins i --path ../path-to-plugin`


# 1.9.7

### Notable enhancements and fixes

* Added Live Plugin Manager: Plugins are now installed into a separate folder on the host system. This folder is called `plugin_packages`.
* Added Live Plugin Manager: Plugins are now installed into a separate folder on the host system. This folder is called `plugin_packages`.
That way the plugins are separated from the normal etherpad installation.
* Make repairPad.js more verbose
* Fixed favicon not being loaded correctly
Expand All @@ -56,27 +111,27 @@ That way the plugins are separated from the normal etherpad installation.

### Notable enhancements and fixes

* The support for the tidy program to tidy up HTML files has been removed. This decision was made because it hasn't been updated for years and also caused an incompability when exporting a pad with Abiword.
* The support for the tidy program to tidy up HTML files has been removed. This decision was made because it hasn't been updated for years and also caused an incompability when exporting a pad with Abiword.


# 1.9.4

### Compatibility changes

* Log4js has been updated to the latest version. As it involved a bump of 6 major version.
* Log4js has been updated to the latest version. As it involved a bump of 6 major version.
A lot has changed since then. Most notably the console appender has been deprecated. You can find out more about it [here](https://github.com/log4js-node/log4js-node)

### Notable enhancements and fixes

* Fix for MySQL: The logger calls were incorrectly configured leading to a crash when e.g. somebody uses a different encoding than standard MySQL encoding.
* Fix for MySQL: The logger calls were incorrectly configured leading to a crash when e.g. somebody uses a different encoding than standard MySQL encoding.

# 1.9.3

### Compability changes

* express-rate-limit has been bumped to 7.0.0: This involves the breaking change that "max: 0"
in the importExportRateLimiting is set to always trigger. So set it to your desired value.
If you haven't changed that value in the settings.json you are all set.
If you haven't changed that value in the settings.json you are all set.

### Notable enhancements and fixes

Expand All @@ -95,7 +150,7 @@ If you haven't changed that value in the settings.json you are all set.
* Enable session key rotation: This setting can be enabled in the settings.json. It changes the signing key for the cookie authentication in a fixed interval.

* Bugfixes
* Fix appendRevision when creating a new pad via the API without a text.
* Fix appendRevision when creating a new pad via the API without a text.


* Enhancements
Expand All @@ -104,19 +159,19 @@ If you haven't changed that value in the settings.json you are all set.

### Compatibility changes

* No compability changes as JQuery maintains excellent backwards compatibility.
* No compability changes as JQuery maintains excellent backwards compatibility.

#### For plugin authors

* Please update to JQuery 3.7. There is an excellent deprecation guide over [here](https://api.jquery.com/category/deprecated/). Version 3.1 to 3.7 are relevant for the upgrade.
* Please update to JQuery 3.7. There is an excellent deprecation guide over [here](https://api.jquery.com/category/deprecated/). Version 3.1 to 3.7 are relevant for the upgrade.

# 1.9.1

### Notable enhancements and fixes

* Security
* Limit requested revisions in timeslider and export to head revision. (affects v1.9.0)

* Bugfixes
* revisions in `CHANGESET_REQ` (timeslider) and export (txt, html, custom)
are now checked to be numbers.
Expand All @@ -130,7 +185,7 @@ If you haven't changed that value in the settings.json you are all set.
* tests: drop windows 7 test coverage & use chrome latest for admin tests
* Require Node 16 for Etherpad and target Node 20 for testing


# 1.9.0

### Notable enhancements and fixes
Expand Down
Loading

0 comments on commit 21f115f

Please sign in to comment.