Skip to content

Commit 8b03d64

Browse files
authored
Update matrix-appservice-bridge and use our own alias for matrix-bot-sdk (#609)
* Update matrix-appservice-bridge and use our own alias for matrix-bot-sdk * Bump node version to support matrix-appservice-bridge * Bump node version in CI * Fix comments * Add changelog entry
1 parent b13b615 commit 8b03d64

File tree

5 files changed

+314
-178
lines changed

5 files changed

+314
-178
lines changed

.github/workflows/mjolnir.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ jobs:
2121
steps:
2222
- uses: actions/checkout@v4
2323

24-
- name: Specifically use node 18 like in the readme.
24+
- name: Specifically use node 20 like in the readme.
2525
uses: actions/setup-node@v4
2626
with:
27-
node-version: "18"
27+
node-version: "20"
2828
- run: corepack enable
2929
- run: corepack yarn install
3030
- run: corepack yarn build
@@ -34,10 +34,10 @@ jobs:
3434
runs-on: ubuntu-latest
3535
steps:
3636
- uses: actions/checkout@v4
37-
- name: Specifically use node 18 like in the readme.
37+
- name: Specifically use node 20 like in the readme.
3838
uses: actions/setup-node@v4
3939
with:
40-
node-version: "18"
40+
node-version: "20"
4141
- run: corepack yarn install
4242
- run: corepack yarn test:unit
4343
integration:
@@ -48,7 +48,7 @@ jobs:
4848
- uses: actions/checkout@v4
4949
- uses: actions/setup-node@v4
5050
with:
51-
node-version: "18"
51+
node-version: "20"
5252
- name: Fetch and build mx-tester (cached across runs)
5353
uses: baptiste0928/cargo-install@v3
5454
with:
@@ -70,7 +70,7 @@ jobs:
7070
- uses: actions/checkout@v4
7171
- uses: actions/setup-node@v4
7272
with:
73-
node-version: "18"
73+
node-version: "20"
7474
- name: Fetch and build mx-tester (cached across runs)
7575
uses: baptiste0928/cargo-install@v3
7676
with:

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ and this project adheres to
1616

1717
### Changed
1818

19+
- The Node version required to run Draupnir has been updated to Node 20.
20+
1921
- `Dockerfile`: entry-point was renamed from `mjolnir-entrypoint.sh` to
2022
`draupnir-entrypoint.sh`. If you have built a Dockerfile based on ours, you
2123
may need to make some changes.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@
6868
"humanize-duration-ts": "^2.1.1",
6969
"js-yaml": "^4.1.0",
7070
"jsdom": "^24.0.0",
71-
"matrix-appservice-bridge": "^9.0.1",
71+
"matrix-appservice-bridge": "^10.3.1",
72+
"matrix-bot-sdk": "npm:@vector-im/matrix-bot-sdk",
7273
"matrix-protection-suite": "npm:@gnuxie/[email protected]",
7374
"matrix-protection-suite-for-matrix-bot-sdk": "npm:@gnuxie/[email protected]",
7475
"parse-duration": "^1.0.2",
@@ -82,7 +83,7 @@
8283
"@vector-im/matrix-bot-sdk": "npm:@vector-im/matrix-bot-sdk@^0.6.6-element.1"
8384
},
8485
"engines": {
85-
"node": ">=18.0.0"
86+
"node": ">=20.0.0"
8687
},
8788
"packageManager": "[email protected]+sha1.ac34549e6aa8e7ead463a7407e1c7390f61a6610"
8889
}

src/utils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,8 @@ function patchMatrixClientForConciseExceptions() {
416416
if (isMatrixError(path)) {
417417
const matrixError = new MatrixError(
418418
body as MatrixError["body"],
419-
err.statusCode as number
419+
err.statusCode as number,
420+
err.headers as Record<string, string>
420421
);
421422
if (error.stack !== undefined) {
422423
matrixError.stack = error.stack;

0 commit comments

Comments
 (0)