Skip to content

Commit a173579

Browse files
fix(sdk): Updates preferred node to 22 (#408)
- this is the 'active' LTS branch of node - remove polyfills, possible both due to upgrade and due to removal of streamsaver, event emitter, and other compatibility libraries
1 parent 242150b commit a173579

File tree

10 files changed

+13
-56
lines changed

10 files changed

+13
-56
lines changed

.github/workflows/build.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
fetch-depth: ${{ !fromJSON(env.do_sonarscan) && 1 || 0 }}
2828
- uses: actions/setup-node@v4
2929
with:
30-
node-version: '20'
30+
node-version: '22'
3131
cache: 'npm'
3232
cache-dependency-path: './lib/package-lock.json'
3333
- run: npm ci
@@ -67,7 +67,7 @@ jobs:
6767
- uses: actions/checkout@v4
6868
- uses: actions/setup-node@v4
6969
with:
70-
node-version: '20'
70+
node-version: '22'
7171
cache: 'npm'
7272
cache-dependency-path: './cli/package-lock.json'
7373
- uses: actions/download-artifact@v4
@@ -100,7 +100,7 @@ jobs:
100100
- uses: actions/checkout@v4
101101
- uses: actions/setup-node@v4
102102
with:
103-
node-version: '20'
103+
node-version: '22'
104104
cache: 'npm'
105105
cache-dependency-path: './web-app/package-lock.json'
106106
- uses: actions/download-artifact@v4
@@ -145,7 +145,7 @@ jobs:
145145
- uses: actions/checkout@v4
146146
- uses: actions/setup-node@v4
147147
with:
148-
node-version: '20'
148+
node-version: '22'
149149
cache: 'npm'
150150
cache-dependency-path: './web-app/package-lock.json'
151151
- uses: actions/download-artifact@v4
@@ -200,7 +200,7 @@ jobs:
200200
- uses: actions/checkout@v4
201201
- uses: actions/setup-node@v4
202202
with:
203-
node-version: '20'
203+
node-version: '22'
204204
registry-url: https://npm.pkg.github.com
205205
- name: Check version number is same between tag, library, and/or release
206206
id: check-version
@@ -250,7 +250,7 @@ jobs:
250250
- uses: actions/checkout@v4
251251
- uses: actions/setup-node@v4
252252
with:
253-
node-version: '20'
253+
node-version: '22'
254254
registry-url: 'https://registry.npmjs.org'
255255
- run: make all
256256
- run: >-

.github/workflows/format.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
- uses: actions/checkout@v4
99
- uses: actions/setup-node@v4
1010
with:
11-
node-version: '20'
11+
node-version: '22'
1212
cache: 'npm'
1313
cache-dependency-path: './lib/package-lock.json'
1414
- run: make format

.github/workflows/large-tests.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- uses: actions/checkout@v4
1515
- uses: actions/setup-node@v4
1616
with:
17-
node-version: '20'
17+
node-version: '22'
1818
cache: 'npm'
1919
cache-dependency-path: './lib/package-lock.json'
2020
- run: npm ci
@@ -44,7 +44,7 @@ jobs:
4444
- uses: actions/checkout@v4
4545
- uses: actions/setup-node@v4
4646
with:
47-
node-version: '20'
47+
node-version: '22'
4848
cache: 'npm'
4949
cache-dependency-path: './cli/package-lock.json'
5050
- uses: actions/download-artifact@v4
@@ -74,7 +74,7 @@ jobs:
7474
- uses: actions/checkout@v4
7575
- uses: actions/setup-node@v4
7676
with:
77-
node-version: '20'
77+
node-version: '22'
7878
cache: 'npm'
7979
cache-dependency-path: './web-app/package-lock.json'
8080
- uses: actions/download-artifact@v4

.nvmrc

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

cli/src/cli.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import './polyfills.js';
21
import { createWriteStream, openAsBlob } from 'node:fs';
32
import { readFile, stat, writeFile } from 'node:fs/promises';
43
import { Writable } from 'node:stream';

cli/src/polyfills.ts

Lines changed: 0 additions & 4 deletions
This file was deleted.

lib/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"test": "npm run build && npm run test:with-server",
6363
"test:with-server": "node dist/web/tests/server.js & trap \"node dist/web/tests/stopServer.js\" EXIT; npm run test:mocha && npm run test:wtr && npm run test:browser && npm run coverage:merge",
6464
"test:browser": "npx webpack --config webpack.test.config.cjs && npx karma start karma.conf.cjs",
65-
"test:mocha": "c8 --exclude=\"dist/web/tests/**/*\" --report-dir=./coverage/mocha mocha 'dist/web/tests/mocha/**/*.spec.js' --file dist/web/tests/mocha/setup.js && npx c8 report --reporter=json --report-dir=./coverage/mocha",
65+
"test:mocha": "c8 --exclude=\"dist/web/tests/**/*\" --report-dir=./coverage/mocha mocha 'dist/web/tests/mocha/**/*.spec.js' && npx c8 report --reporter=json --report-dir=./coverage/mocha",
6666
"test:wtr": "web-test-runner",
6767
"watch": "(trap 'kill 0' SIGINT; npm run build && (npm run build:watch & npm run test -- --watch))"
6868
},

lib/tdf3/src/client/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ export class Client {
394394
}
395395
}
396396
if (
397-
avs.length != scope.attributes?.length ||
397+
avs.length != (scope.attributes?.length || 0) ||
398398
!avs.map(({ fqn }) => fqn).every((a) => fqns.indexOf(a) >= 0)
399399
) {
400400
throw new ConfigurationError(

lib/tests/mocha/setup.ts

Lines changed: 0 additions & 36 deletions
This file was deleted.

lib/tests/server.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import './mocha/setup.js';
2-
31
import * as jose from 'jose';
42
import { createServer, IncomingMessage, RequestListener } from 'node:http';
53

0 commit comments

Comments
 (0)