Skip to content

Commit 266723a

Browse files
committed
Update to Node 22
Required by incoming matrix-appservice-bridge update
1 parent 008a578 commit 266723a

File tree

9 files changed

+24
-24
lines changed

9 files changed

+24
-24
lines changed

.github/workflows/tests.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,12 @@ jobs:
2626

2727
test:
2828
runs-on: ubuntu-latest
29-
strategy:
30-
matrix:
31-
node_version: [20, 21]
3229
steps:
3330
- uses: actions/checkout@v3
34-
- name: Use Node.js ${{ matrix.node_version }}
31+
- name: Use Node.js
3532
uses: actions/setup-node@v3
3633
with:
37-
node-version: ${{ matrix.node_version }}
34+
node-version-file: .node-version
3835
- uses: actions-rs/toolchain@v1
3936
with:
4037
toolchain: stable

.node-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20
1+
22

.nodeversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20
1+
22

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build node-purple. We need debian for python3.6, which is needed for node-purple
2-
FROM node:20-bookworm as builder
2+
FROM node:22-bookworm as builder
33
COPY ./package.json ./package.json
44
COPY ./yarn.lock ./yarn.lock
55
COPY ./src ./src
@@ -11,7 +11,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y libpurple0 libp
1111
RUN yarn install --frozen-lockfile --check-files
1212

1313
# App
14-
FROM node:20-bookworm-slim
14+
FROM node:22-bookworm-slim
1515

1616
RUN mkdir app
1717
WORKDIR /app

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "2.0.1",
44
"description": "Multi protocol bridging for Matrix.",
55
"engines": {
6-
"node": ">=20"
6+
"node": ">=22"
77
},
88
"main": "lib/Program.js",
99
"scripts": {
@@ -46,7 +46,7 @@
4646
},
4747
"devDependencies": {
4848
"@istanbuljs/nyc-config-typescript": "^1.0.2",
49-
"@tsconfig/node20": "20.1.2",
49+
"@tsconfig/node22": "^22.0.2",
5050
"@types/chai": "^4.3.11",
5151
"@types/mocha": "^9.0.0",
5252
"@types/node": "^20",
@@ -64,7 +64,7 @@
6464
"mock-require": "^3.0.3",
6565
"nyc": "^15.1.0",
6666
"ts-node": "^10.9.2",
67-
"typescript": "^5.3.3"
67+
"typescript": "^5.9.3"
6868
},
6969
"optionalDependencies": {
7070
"node-purple": "git+https://github.com/matrix-org/node-purple#1adfe21219863824a1fcb4c1de35b5b44cccca37"

test/mocks/intent.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ export class MockIntent {
33
public ensureRegisteredCalled: boolean = false;
44
public leftRoom: string = "";
55
public clientJoinRoomCalledWith: {roomString: string, opts: any}|null = null;
6-
constructor(public userId: string) {
6+
public userId: string;
77

8+
constructor(userId: string) {
9+
this.userId = userId;
810
}
911

1012
public async ensureRegistered() {

test/test_config.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { ConfigValidator } from "matrix-appservice-bridge";
22

3-
const SCHEMA_FILE = `${__dirname}/../config/config.schema.yaml`;
4-
const SAMPLE_FILE = `${__dirname}/../config.sample.yaml`;
3+
const SCHEMA_FILE = `config/config.schema.yaml`;
4+
const SAMPLE_FILE = `config.sample.yaml`;
5+
56
describe("configuration files", () =>{
67

78
it("should load the schema file successfully", () => {

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "@tsconfig/node20",
2+
"extends": "@tsconfig/node22",
33
"compilerOptions": {
44
"incremental": true,
55
"allowJs": false,

yarn.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -517,10 +517,10 @@
517517
resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9"
518518
integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==
519519

520-
"@tsconfig/node20@20.1.2":
521-
version "20.1.2"
522-
resolved "https://registry.yarnpkg.com/@tsconfig/node20/-/node20-20.1.2.tgz#b93128c411d38e9507035255195bc8a6718541e3"
523-
integrity sha512-madaWq2k+LYMEhmcp0fs+OGaLFk0OenpHa4gmI4VEmCKX4PJntQ6fnnGADVFrVkBj0wIdAlQnK/MrlYTHsa1gQ==
520+
"@tsconfig/node22@^22.0.2":
521+
version "22.0.2"
522+
resolved "https://registry.yarnpkg.com/@tsconfig/node22/-/node22-22.0.2.tgz#1e04e2c5cc946dac787d69bb502462a851ae51b6"
523+
integrity sha512-Kmwj4u8sDRDrMYRoN9FDEcXD8UpBSaPQQ24Gz+Gamqfm7xxn+GBR7ge/Z7pK8OXNGyUzbSwJj+TH6B+DS/epyA==
524524

525525
"@types/body-parser@*":
526526
version "1.19.0"
@@ -4946,10 +4946,10 @@ typedarray-to-buffer@^3.1.5:
49464946
dependencies:
49474947
is-typedarray "^1.0.0"
49484948

4949-
typescript@^5.3.3:
4950-
version "5.3.3"
4951-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37"
4952-
integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==
4949+
typescript@^5.9.3:
4950+
version "5.9.3"
4951+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.9.3.tgz#5b4f59e15310ab17a216f5d6cf53ee476ede670f"
4952+
integrity sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==
49534953

49544954
unbox-primitive@^1.0.2:
49554955
version "1.0.2"

0 commit comments

Comments
 (0)