Skip to content

Commit

Permalink
Node 18 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
oklemenz2 committed Jan 29, 2024
1 parent b7a15b9 commit ac3d6bd
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 20 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ Default protocol path is `/ws` and can be overwritten via `cds.env.protocols.web

The CDS websocket server supports the following two websocket implementations:

- [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)**
- [Socket.IO](https://socket.io): `cds.websocket: "socket.io"`
- [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)**
- [Socket.IO](https://socket.io): `cds.websocket.kind: "socket.io"`

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

Expand Down
34 changes: 17 additions & 17 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion test/_env/util/ws.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ async function emitEvent(socket, event, data) {
event,
data,
}),
resolve,
(result) => {
resolve(result || null);
},
);
});
}
Expand Down

0 comments on commit ac3d6bd

Please sign in to comment.