Skip to content

Commit

Permalink
Add support for Node 20, and drop support for Node 16 (#466)
Browse files Browse the repository at this point in the history
* Add support for Node 12, drop support for Node 16

* changelog

* Use @tsconfig/node18

* fix type

* Update deps

* Switch to @vector-im/matrix-bot-sdk

* Update typedoc to fix peer dependency

Update to version that supports Typescript 5.0

* Update dependencies of examples

* Update "engines"

* Update eslint

* Fix glibc compatibility

---------

Co-authored-by: Andrew Ferrazzutti <andrewf@element.io>
  • Loading branch information
Half-Shot and AndrewFerr committed Apr 26, 2023
1 parent 8de1c2e commit d5ab312
Show file tree
Hide file tree
Showing 15 changed files with 1,225 additions and 1,190 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
docs:
runs-on: ubuntu-20.04
container: node:16
container: node:18
steps:
- uses: actions/checkout@v3

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:

jobs:
publish-to-npm:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Use Node.js
Expand Down
12 changes: 2 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,16 @@ on:
jobs:
lint:
runs-on: ubuntu-20.04
container: node:16
container: node:18
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- run: yarn --strict-semver --frozen-lockfile
- run: yarn lint

test:
strategy:
matrix:
node-version: [16, 18]
node-version: [18, 20]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -50,10 +46,6 @@ jobs:
--health-retries 5
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- run: yarn --frozen-lockfile
- run: yarn test
env:
Expand Down
1 change: 1 addition & 0 deletions changelog.d/466.removal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add support for Node 20, and drop support for Node 16.
2 changes: 1 addition & 1 deletion docs/platforms.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Node.JS version falls from Active to Maintenance, we will migrate projects to th
For users who are on distributions packaging only Maintenance versions of Node.JS, we'd suggest either using Docker
or an alternative Node.JS source.

At time of writing (July 2022) we support 16.X and 18.X as they are the Active and Current releases of Node.JS.
At time of writing (April 2023) we support 18.X and 20.X as they are the Active and Current releases of Node.JS.

Bridge projects do not support odd-versioned Node.JS releases, as these are short lived non-LTS versions and are
difficult to support since they have a 6 month shelf life.
Expand Down
6 changes: 3 additions & 3 deletions examples/encryption/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
"author": "Matrix.org",
"license": "Apache-2.0",
"dependencies": {
"@types/express": "^4.17.13",
"@types/node": "^14",
"matrix-appservice-bridge": "file:../.."
},
"devDependencies": {
"typescript": "^4.4.4"
"@types/express": "^4.17.13",
"@types/node": "^18",
"typescript": "^5.0.4"
}
}
4 changes: 2 additions & 2 deletions examples/encryption/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ limitations under the License.
// Usage:
// node index.js -r -u "http://localhost:9000" # remember to add the registration!
// node index.js -p 9000
import { Cli, Bridge, AppServiceRegistration, ClientEncryptionSession, ClientEncryptionStore, Logging} from 'matrix-appservice-bridge';
import { Cli, Bridge, AppServiceRegistration, ClientEncryptionSession, ClientEncryptionStore, Logger} from 'matrix-appservice-bridge';

const log = Logging.get("index");
const log = new Logger("index");

const encMap = new Map<string, ClientEncryptionSession>();
const encryptionStore: ClientEncryptionStore = {
Expand Down

0 comments on commit d5ab312

Please sign in to comment.