Skip to content

Commit 5112328

Browse files
authored
Merge upstream 2.2.4 (#25)
1 parent 19020bb commit 5112328

31 files changed

+2218
-1224
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on:
1616
types: [published]
1717
push:
1818
branches:
19-
- 'merge-upstream-2.2.2-dev'
19+
- 'merge-upstream-2.2.4'
2020

2121
env:
2222
REGISTRY: ghcr.io

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
# 2.2.4
2+
3+
### Notable enhancements and fixes
4+
5+
- Switched to new SQLite backend
6+
- Fixed rusty-store-kv module not found
7+
8+
9+
# 2.2.3
10+
11+
### Notable enhancements and fixes
12+
13+
- Introduced a new in process database `rustydb` that represents a fast key value store written in Rust.
14+
- Readded window._ as a shortcut for getting text
15+
- Added support for migrating any ueberdb database to another. You can now switch as you please. See here: https://docs.etherpad.org/cli.html
16+
- Further Typescript movements
17+
- A lot of security issues fixed and reviewed in this release. Please update.
18+
19+
120
# 2.2.2
221

322
### Notable enhancements and fixes

admin/package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "admin",
33
"private": true,
4-
"version": "2.2.2",
4+
"version": "2.2.4",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",
@@ -16,25 +16,25 @@
1616
"devDependencies": {
1717
"@radix-ui/react-dialog": "^1.1.1",
1818
"@radix-ui/react-toast": "^1.2.1",
19-
"@types/react": "^18.3.4",
19+
"@types/react": "^18.3.5",
2020
"@types/react-dom": "^18.2.25",
21-
"@typescript-eslint/eslint-plugin": "^8.2.0",
22-
"@typescript-eslint/parser": "^8.2.0",
21+
"@typescript-eslint/eslint-plugin": "^8.4.0",
22+
"@typescript-eslint/parser": "^8.4.0",
2323
"@vitejs/plugin-react-swc": "^3.5.0",
24-
"eslint": "^9.9.0",
24+
"eslint": "^9.9.1",
2525
"eslint-plugin-react-hooks": "^4.6.0",
26-
"eslint-plugin-react-refresh": "^0.4.10",
26+
"eslint-plugin-react-refresh": "^0.4.11",
2727
"i18next": "^23.14.0",
2828
"i18next-browser-languagedetector": "^8.0.0",
29-
"lucide-react": "^0.429.0",
29+
"lucide-react": "^0.439.0",
3030
"react": "^18.2.0",
3131
"react-dom": "^18.2.0",
32-
"react-hook-form": "^7.52.2",
32+
"react-hook-form": "^7.53.0",
3333
"react-i18next": "^15.0.1",
3434
"react-router-dom": "^6.26.1",
3535
"socket.io-client": "^4.7.5",
3636
"typescript": "^5.5.4",
37-
"vite": "^5.4.2",
37+
"vite": "^5.4.3",
3838
"vite-plugin-static-copy": "^1.0.6",
3939
"vite-plugin-svgr": "^4.2.0",
4040
"zustand": "^4.5.5"

bin/migrateDB.ts

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
// DB migration
2+
import {readFileSync} from 'node:fs'
3+
import {Database, DatabaseType} from "ueberdb2";
4+
import path from "node:path";
5+
const settings = require('ep_etherpad-lite/node/utils/Settings');
6+
7+
8+
// file1 = source, file2 = target
9+
// pnpm run migrateDB --file1 <db1.json> --file2 <db2.json>
10+
const arg = process.argv.slice(2);
11+
12+
if (arg.length != 4) {
13+
console.error('Wrong number of arguments!. Call with pnpm run migrateDB --file1 source.json target.json')
14+
process.exit(1)
15+
}
16+
17+
type SettingsConfig = {
18+
dbType: string,
19+
dbSettings: any
20+
}
21+
22+
/*
23+
{
24+
"dbType": "<your-db-type>",
25+
"dbSettings": {
26+
<your-db-settings>
27+
}
28+
}
29+
*/
30+
31+
let firstDBSettingsFile: string
32+
let secondDBSettingsFile: string
33+
34+
35+
if (arg[0] == "--file1") {
36+
firstDBSettingsFile = arg[1]
37+
} else if (arg[0] === "--file2") {
38+
secondDBSettingsFile = arg[1]
39+
}
40+
41+
if (arg[2] == "--file1") {
42+
firstDBSettingsFile = arg[3]
43+
} else if (arg[2] === "--file2") {
44+
secondDBSettingsFile = arg[3]
45+
}
46+
47+
48+
49+
const settingsfile = JSON.parse(readFileSync(path.join(settings.root,firstDBSettingsFile!)).toString()) as SettingsConfig
50+
const settingsfile2 = JSON.parse(readFileSync(path.join(settings.root,secondDBSettingsFile!)).toString()) as SettingsConfig
51+
52+
console.log(settingsfile2)
53+
if ("filename" in settingsfile.dbSettings) {
54+
settingsfile.dbSettings.filename = path.join(settings.root, settingsfile.dbSettings.filename)
55+
console.log(settingsfile.dbType + " location is "+ settingsfile.dbSettings.filename)
56+
}
57+
58+
if ("filename" in settingsfile2.dbSettings) {
59+
settingsfile2.dbSettings.filename = path.join(settings.root, settingsfile2.dbSettings.filename)
60+
console.log(settingsfile2.dbType + " location is "+ settingsfile2.dbSettings.filename)
61+
}
62+
63+
const ueberdb1 = new Database(settingsfile.dbType as DatabaseType, settingsfile.dbSettings)
64+
const ueberdb2 = new Database(settingsfile2.dbType as DatabaseType, settingsfile2.dbSettings)
65+
66+
const handleSync = async ()=>{
67+
await ueberdb1.init()
68+
await ueberdb2.init()
69+
70+
const allKeys = await ueberdb1.findKeys('*','')
71+
for (const key of allKeys) {
72+
const foundVal = await ueberdb1.get(key)!
73+
await ueberdb2.set(key, foundVal)
74+
}
75+
}
76+
77+
handleSync().then(()=>{
78+
console.log("Done syncing dbs")
79+
}).catch(e=>{
80+
console.log(`Error syncing db ${e}`)
81+
})
82+
83+

bin/package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
{
22
"name": "bin",
3-
"version": "2.2.2",
3+
"version": "2.2.4",
44
"description": "",
55
"main": "checkAllPads.js",
66
"directories": {
77
"doc": "doc"
88
},
99
"dependencies": {
10-
"axios": "^1.7.5",
10+
"axios": "^1.7.7",
1111
"ep_etherpad-lite": "workspace:../src",
1212
"log4js": "^6.9.1",
1313
"semver": "^7.6.3",
14-
"tsx": "^4.17.0",
15-
"ueberdb2": "^4.2.93"
14+
"tsx": "^4.19.0",
15+
"ueberdb2": "^4.2.103"
1616
},
1717
"devDependencies": {
18-
"@types/node": "^22.4.2",
18+
"@types/node": "^22.5.4",
1919
"@types/semver": "^7.5.8",
2020
"typescript": "^5.5.4"
2121
},
@@ -34,7 +34,8 @@
3434
"stalePlugins": "node --import tsx ./plugins/stalePlugins.ts",
3535
"checkPlugin": "node --import tsx ./plugins/checkPlugin.ts",
3636
"plugins": "node --import tsx ./plugins.ts",
37-
"generateChangelog": "node --import tsx generateReleaseNotes.ts"
37+
"generateChangelog": "node --import tsx generateReleaseNotes.ts",
38+
"migrateDB": "node --import tsx migrateDB.ts"
3839
},
3940
"author": "",
4041
"license": "ISC"

bin/push-after-release.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
#!/bin/bash
32

43
# Specify the path to your package.json file

doc/api/editbar.adoc

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,14 @@
1-
# Editbar
2-
3-
Located in `src/static/js/pad_editbar.js`
1+
== Editbar
2+
src/static/js/pad_editbar.js
43

54
=== isEnabled()
65

7-
If the editorbar contains the class `enabledtoolbar`, it is enabled.
8-
9-
10-
## disable()
11-
12-
Disables the editorbar. This is done by adding the class `disabledtoolbar` and removing the enabledtoolbar
13-
14-
## toggleDropDown(dropdown)
6+
=== disable()
157

8+
=== toggleDropDown(dropdown)
169
Shows the dropdown `div.popup` whose `id` equals `dropdown`.
1710

18-
## registerCommand(cmd, callback)
19-
11+
=== registerCommand(cmd, callback)
2012
Register a handler for a specific command. Commands are fired if the corresponding button is clicked or the corresponding select is changed.
2113

2214
=== registerAceCommand(cmd, callback)

doc/api/embed_parameters.adoc

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,65 +10,65 @@ Cut and paste the following code into any webpage to embed a pad. The parameters
1010
<iframe src='http://pad.test.de/p/PAD_NAME#L4?showChat=false&showLineNumbers=false' width=600 height=400></iframe>
1111
----
1212

13-
## showLineNumbers
14-
* Boolean
13+
=== showLineNumbers
14+
* Boolean
1515

1616
Default: true
1717

18-
## showControls
19-
* Boolean
18+
=== showControls
19+
* Boolean
2020

2121
Default: true
2222

23-
## showChat
24-
* Boolean
23+
=== showChat
24+
* Boolean
2525

2626
Default: true
2727

28-
## useMonospaceFont
29-
* Boolean
28+
=== useMonospaceFont
29+
* Boolean
3030

3131
Default: false
3232

33-
## userName
34-
* String
33+
=== userName
34+
* String
3535

3636
Default: "unnamed"
3737

3838
Example: `userName=Etherpad%20User`
3939

40-
## userColor
41-
* String (css hex color value)
40+
=== userColor
41+
* String (css hex color value)
4242

4343
Default: randomly chosen by pad server
4444

4545
Example: `userColor=%23ff9900`
4646

47-
## noColors
48-
* Boolean
47+
=== noColors
48+
* Boolean
4949

5050
Default: false
5151

52-
## alwaysShowChat
53-
* Boolean
52+
=== alwaysShowChat
53+
* Boolean
5454

5555
Default: false
5656

57-
## lang
58-
* String
57+
=== lang
58+
* String
5959

6060
Default: en
6161

6262
Example: `lang=ar` (translates the interface into Arabic)
6363

64-
## rtl
65-
* Boolean
64+
=== rtl
65+
* Boolean
6666

6767
Default: true
6868
Displays pad text from right to left.
6969

70-
## #L
71-
* Int
70+
=== #L
71+
* Int
7272

7373
Default: 0
7474
Focuses pad at specific line number and places caret at beginning of this line

0 commit comments

Comments
 (0)