Skip to content

Commit

Permalink
Upgrade dependencies, skip mbus tests under Windows, use Node 22 in CI (
Browse files Browse the repository at this point in the history
#1302)

* chore(deps): upgrade node-coap to version 1.4.0

* chore(deps): update @types/readable-stream in node-wot

Co-Authored-By: Jan Romann <[email protected]>

* chore(binding-mbus): upgrade node-mbus to version 2.2.4

* chore(binding-modbus): upgrade modbus-serial to version 8.0.17

* test(binding-modbus): use correct socketError event name

* refactor: recreate package-lock.json

Co-Authored-By: Jan Romann <[email protected]>

* ci: add Node 22 to the CI matrix

* test: skip mbus tests under windows

---------

Co-authored-by: danielpeintner <[email protected]>
  • Loading branch information
JKRhb and danielpeintner authored Jul 11, 2024
1 parent 5e2b362 commit fe9a15a
Show file tree
Hide file tree
Showing 9 changed files with 2,399 additions and 1,044 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
node-version: [18.x, 20.x]
node-version: [18.x, 20.x, 22.x]

timeout-minutes: 30

Expand Down
3,407 changes: 2,373 additions & 1,034 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"@types/chai-spies": "^1.0.4",
"@types/mocha": "^9.0.0",
"@types/node": "16.18.35",
"@types/readable-stream": "^2.3.13",
"@types/readable-stream": "^4.0.15",
"@types/sinon": "10.0.2",
"@typescript-eslint/eslint-plugin": "^6.7.3",
"@typescript-eslint/parser": "^6.7.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/binding-coap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@node-wot/core": "0.8.15",
"@node-wot/td-tools": "0.8.15",
"@types/node": "16.18.35",
"coap": "^1.3.0",
"coap": "^1.4.0",
"multicast-dns": "^7.2.5",
"node-coap-client": "1.0.8",
"rxjs": "5.5.11",
Expand Down
2 changes: 1 addition & 1 deletion packages/binding-mbus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"dependencies": {
"@node-wot/core": "0.8.15",
"@node-wot/td-tools": "0.8.15",
"node-mbus": "^2.1.0",
"node-mbus": "^2.2.4",
"wot-typescript-definitions": "0.8.0-SNAPSHOT.29"
},
"scripts": {
Expand Down
12 changes: 10 additions & 2 deletions packages/binding-mbus/test/mbus-client-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ describe("mbus client test", () => {
/* nothing */
});

it("should override form values with URL", () => {
it("should override form values with URL", function () {
if (process.platform === "win32") {
this.skip();
}

const form: MBusForm = {
href: "mbus+tcp://127.0.0.1:805/2?offset=2&timeout=5",
"mbus:offset": 0,
Expand All @@ -69,7 +73,11 @@ describe("mbus client test", () => {
});

describe("read resource", () => {
it("should throw exception for missing offset", () => {
it("should throw exception for missing offset", function () {
if (process.platform === "win32") {
this.skip();
}

const form: MBusForm = {
href: "mbus+tcp://127.0.0.1:805",
"mbus:unitID": 1,
Expand Down
12 changes: 10 additions & 2 deletions packages/binding-mbus/test/mbus-connection-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ describe("mbus connection test", () => {
/* nothing */
});

it("should throw for timeout", () => {
it("should throw for timeout", function () {
if (process.platform === "win32") {
this.skip();
}

const connection = new MBusConnection("127.0.0.1", 806, {
connectionTimeout: 200,
connectionRetryTime: 10,
Expand All @@ -41,7 +45,11 @@ describe("mbus connection test", () => {
}).timeout(10000);

describe("Operation", () => {
it("should throw with timeout", async () => {
it("should throw with timeout", async function () {
if (process.platform === "win32") {
this.skip();
}

const form: MBusForm = {
href: "mbus+tcp://127.0.0.1:806",
"mbus:offset": 0,
Expand Down
2 changes: 1 addition & 1 deletion packages/binding-modbus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"dependencies": {
"@node-wot/core": "0.8.15",
"@node-wot/td-tools": "0.8.15",
"modbus-serial": "8.0.3",
"modbus-serial": "^8.0.17",
"rxjs": "5.5.11",
"wot-typescript-definitions": "0.8.0-SNAPSHOT.29"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/binding-modbus/test/test-modbus-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export default class ModbusServer {

public start(): Promise<unknown> {
return new Promise((resolve) => {
this.serverTCP.on("SocketError", (err: Error | null) => {
this.serverTCP.on("socketError", (err: Error | null) => {
// Handle socket error if needed, can be ignored
error("SocketError:", err?.toString());
});
Expand Down

0 comments on commit fe9a15a

Please sign in to comment.