Releases: socketio/engine.io-client
6.3.0
Bug Fixes
- properly parse relative URL with a "@" character (12b7d78)
- use explicit context for setTimeout function (#699) (047f420)
Features
The trailing slash which was added by default can now be disabled:
import { Socket } from "engine.io-client";
const socket = new Socket("https://example.com", {
addTrailingSlash: false
});In the example above, the request URL will be https://example.com/engine.io instead of https://example.com/engine.io/.
Links
- Diff: 6.2.3...6.3.0
- Server release: 6.3.0
- ws version:
~8.11.0(diff)
6.2.3
Bug Fixes
- properly clear "beforeunload" event listener (99925a4)
Links
- Diff: 6.2.2...6.2.3
- Server release: -
- ws version:
~8.2.3
3.5.3
Bug Fixes
- fix usage with vite (280de36)
Links
- Diff: 3.5.2...3.5.3
- Server release: -
- ws version: ~7.4.2
6.2.2
Bug Fixes
- simplify the check for WebSocket availability (f158c8e)
This check was added for the flashsocket transport, which has been deprecated for a while now ([1]). But it fails with latest webpack versions, as the expression "__initialize" in WebSocket gets evaluated to true.
Default export of globalThis seems to have a problem in the "browser" field when the library is loaded asynchronously with webpack.
Links
- Diff: 6.2.1...6.2.2
- Server release: -
- ws version:
~8.2.3
6.2.1
Links
- Diff: 6.2.0...6.2.1
- Server release: -
- ws version:
~8.2.3
6.2.0
Features
- add details to the "close" event (b9252e2)
The close event will now include additional details to help debugging if anything has gone wrong.
Example when a payload is over the maxHttpBufferSize value in HTTP long-polling mode:
socket.on("close", (reason, details) => {
console.log(reason); // "transport error"
// in that case, details is an error object
console.log(details.message); "xhr post error"
console.log(details.description); // 413 (the HTTP status of the response)
// details.context refers to the XMLHttpRequest object
console.log(details.context.status); // 413
console.log(details.context.responseText); // ""
});Note: the error object was already included before this commit and is kept for backward compatibility.
- slice write buffer according to the maxPayload value (46fdc2f)
The server will now include a "maxPayload" field in the handshake details, allowing the clients to decide how many
packets they have to send to stay under the maxHttpBufferSize value.
Links
- Diff: 6.1.1...6.2.0
- Server release: 6.2.0
- ws version:
~8.2.3
6.1.1
6.0.3
Some bug fixes were backported from master, to be included by the latest socket.io-client version.
Bug Fixes
Links
- Diff: 6.0.2...6.0.3
- Server release: -
- ws version:
~8.2.3
6.1.0
6.0.2
Bug Fixes
- bundle: fix vite build (faa9f31)
Links
- Diff: 6.0.1...6.0.2
- Server release: -
- ws version:
~8.2.3