Skip to content

Commit

Permalink
* (bluefox) updated socket classes
Browse files Browse the repository at this point in the history
* (bluefox) minimum required node.js version is 18
  • Loading branch information
GermanBluefox committed Jul 19, 2024
1 parent 481f577 commit 09feccc
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Use Node.js 16.x
- name: Use Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 18.x
Expand All @@ -56,7 +56,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
node-version: [18.x, 20.x]
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ You can deactivate HTTPS and authentication on this web instance, but better is
-->

## Changelog
### **WORK IN PROGRESS**
* (bluefox) updated socket classes
* (bluefox) minimum required node.js version is 18

### 5.0.1 (2024-02-22)
* (bluefox) updated socket classes and fixed vis-2 error if connected via cloud
* (bluefox) minimum required node.js version is 16
Expand Down
2 changes: 1 addition & 1 deletion lib/socketCloud.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const EventEmitter = require('events');
const EventEmitter = require('node:events');
const WebSocket = require('ws'); // used for lovelace
const SocketAdmin = require('@iobroker/socket-classes').SocketAdmin;
// const SocketAdmin = require('./socketAdmin');
Expand Down
4 changes: 2 additions & 2 deletions lib/socketCommandsAdmin.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const SocketCommands = require('./socketCommands');
const axios = require('axios');
const path = require('path');
const fs = require('fs');
const path = require('node:path');
const fs = require('node:fs');

class SocketCommandsAdmin extends SocketCommands {
static ALLOW_CACHE = [
Expand Down
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ function onCloudError(error) {
adapter.log.error(`Cloud says: ${error}`);
}

function onCloudStop(data) {
function onCloudStop() {
adapter.getForeignObject(`system.adapter.${adapter.namespace}`, (err, obj) => {
err && adapter.log.error(`[onCloudStop]: ${err}`);
if (obj) {
Expand Down
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,28 @@
"web"
],
"engines": {
"node": ">=16"
"node": ">=18"
},
"repository": {
"type": "git",
"url": "https://github.com/ioBroker/ioBroker.cloud"
},
"dependencies": {
"@iobroker/adapter-core": "^3.1.4",
"@iobroker/socket-classes": "1.5.0",
"@iobroker/adapter-core": "^3.1.6",
"@iobroker/socket-classes": "1.5.6",
"socket.io-client": "~1.7.4",
"cookie-parser": "^1.4.6",
"axios": "^1.6.7",
"ws": "^8.16.0"
"axios": "^1.7.2",
"ws": "^8.18.0"
},
"devDependencies": {
"@alcalzone/release-script": "^3.7.0",
"@alcalzone/release-script-plugin-iobroker": "^3.7.0",
"@alcalzone/release-script": "^3.7.3",
"@alcalzone/release-script-plugin-iobroker": "^3.7.2",
"@alcalzone/release-script-plugin-license": "^3.7.0",
"@iobroker/adapter-dev": "^1.3.0",
"@iobroker/testing": "^4.1.0",
"@types/node": "^20.12.7",
"mocha": "^10.4.0",
"@iobroker/testing": "^4.1.3",
"@types/node": "^20.14.11",
"mocha": "^10.6.0",
"chai": "^4.4.1"
},
"bugs": {
Expand Down

0 comments on commit 09feccc

Please sign in to comment.