Skip to content

Commit ac3d6bd

Browse files
committed
Node 18 compatibility
1 parent b7a15b9 commit ac3d6bd

File tree

3 files changed

+22
-20
lines changed

3 files changed

+22
-20
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ Default protocol path is `/ws` and can be overwritten via `cds.env.protocols.web
126126

127127
The CDS websocket server supports the following two websocket implementations:
128128

129-
- [WebSocket Standard](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API) (via Node.js [ws](https://www.npmjs.com/package/ws) package): `cds.websocket: "ws"` **(default)**
130-
- [Socket.IO](https://socket.io): `cds.websocket: "socket.io"`
129+
- [WebSocket Standard](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API) (via Node.js [ws](https://www.npmjs.com/package/ws) package): `cds.websocket.kind: "ws"` **(default)**
130+
- [Socket.IO](https://socket.io): `cds.websocket.kind: "socket.io"`
131131

132132
The server implementation abstracts from the concrete websocket implementation. The websocket client still needs to be implemented websocket implementation specific.
133133

package-lock.json

Lines changed: 17 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/_env/util/ws.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ async function emitEvent(socket, event, data) {
3535
event,
3636
data,
3737
}),
38-
resolve,
38+
(result) => {
39+
resolve(result || null);
40+
},
3941
);
4042
});
4143
}

0 commit comments

Comments
 (0)