-
Notifications
You must be signed in to change notification settings - Fork 3k
Comparing changes
Open a pull request
base repository: socketio/socket.io-client
base: de2ccff492b37b0fb83124f83c7614d413588037
head repository: socketio/socket.io-client
compare: b7e07ba633ceb9c1dc94cc894c10b9bfca536c7a
Commits on Oct 5, 2020
-
docs: remove reference to JSON3
The `json3` dependency, previously used for compatibility with IE6/7, was removed in [1] and included in `socket.io-parser@3.0.0` and `socket.io-client@2.0.0` ([2]). The slim build now only removes the debug dependency (~3KB min+gzip). [1] socketio/socket.io-parser@e39f5a8#diff-b9cfc7f2cdf78a7f4b91a753d10865a2 [2] ff4cb3e#diff-b9cfc7f2cdf78a7f4b91a753d10865a2R28
Configuration menu - View commit details
-
Copy full SHA for f08b933 - Browse repository at this point
Copy the full SHA f08b933View commit details -
refactor: remove gulp from the build
Plain npm scripts should be sufficient for our use case.
Configuration menu - View commit details
-
Copy full SHA for 3c11eb9 - Browse repository at this point
Copy the full SHA 3c11eb9View commit details -
test: add Node.js 12 and 14 in the build matrix
Node.js 8 is removed, as it is now EOL.
Configuration menu - View commit details
-
Copy full SHA for 003cb38 - Browse repository at this point
Copy the full SHA 003cb38View commit details -
Configuration menu - View commit details
-
Copy full SHA for 697bea2 - Browse repository at this point
Copy the full SHA 697bea2View commit details -
Configuration menu - View commit details
-
Copy full SHA for cab895f - Browse repository at this point
Copy the full SHA cab895fView commit details -
Breaking change: - the encode() method is now synchronous Please note that the exchange [protocol][1] is left untouched and thus stays in version 4. Diff: socketio/socket.io-parser@3.4.1...4.0.0 [1] https://github.com/socketio/socket.io-protocol
Configuration menu - View commit details
-
Copy full SHA for 429846b - Browse repository at this point
Copy the full SHA 429846bView commit details
Commits on Oct 6, 2020
-
chore: point towards the develop branch of the server
The package-lock.json file is temporarily removed in order to include the latest commits to the server and make the tests pass.
Configuration menu - View commit details
-
Copy full SHA for f2f4a4c - Browse repository at this point
Copy the full SHA f2f4a4cView commit details -
chore: include Engine.IO client v4
The ping-pong mechanism has been reverted (server now sends a ping and expects a pong from the client), so we cannot compute the latency like we did in previous versions. Release notes: https://github.com/socketio/engine.io-client/releases/tag/4.0.0
Configuration menu - View commit details
-
Copy full SHA for be8c314 - Browse repository at this point
Copy the full SHA be8c314View commit details
Commits on Oct 8, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 249e0be - Browse repository at this point
Copy the full SHA 249e0beView commit details -
Configuration menu - View commit details
-
Copy full SHA for bbe94ad - Browse repository at this point
Copy the full SHA bbe94adView commit details
Commits on Oct 12, 2020
-
Configuration menu - View commit details
-
Copy full SHA for c07b91d - Browse repository at this point
Copy the full SHA c07b91dView commit details -
refactor: remove the packetBuffer array
The parser#encode() method is now synchronous, so the packetBuffer array is useless.
Configuration menu - View commit details
-
Copy full SHA for 6cd2e4e - Browse repository at this point
Copy the full SHA 6cd2e4eView commit details -
feat: split the events of the Manager and Socket
Previously, most of the events emitted by the Manager were also emitted by the Socket instances, but it was somehow misleading for the end users because they don't have the same meaning: - Manager: the state of the low-level connection (with connection and reconnection events) - Socket: the state of the connection to the Namespace (only 'connect', 'disconnect' and 'error') For example, the `reconnect` event: ```js socket.on("reconnect", () => { console.log(socket.connected); // might be false, which is a bit surprising }); ``` Breaking change: the Socket instance will no longer forward the events of its Manager Those events can still be accessed on the Manager instance though: ```js socket.io.on("reconnect", () => { // ... }); ```
Configuration menu - View commit details
-
Copy full SHA for 132f8ec - Browse repository at this point
Copy the full SHA 132f8ecView commit details -
feat: throw upon reserved event names
These events cannot be used by the end users, because they are part of the Socket.IO public API, so using them will now throw an error explicitly. Related: socketio/socket.io@f7ed81e
Configuration menu - View commit details
-
Copy full SHA for 6494f61 - Browse repository at this point
Copy the full SHA 6494f61View commit details -
refactor: remove the 'connecting' event
This event was added in 4195680 But it does not convey the information that the Socket is actually sending a CONNECT packet to the server. It should maybe be moved to the Socket#onopen() method, but let's remove it for now as it is not documented anywhere.
Configuration menu - View commit details
-
Copy full SHA for b60e909 - Browse repository at this point
Copy the full SHA b60e909View commit details -
refactor: remove the 'connect_timeout' event
The 'connect_timeout' event is now merged with the 'connect_error' event, and will now emit an Error object instead of a plain string.
Configuration menu - View commit details
-
Copy full SHA for e826992 - Browse repository at this point
Copy the full SHA e826992View commit details
Commits on Oct 13, 2020
-
- with `{ "type": "commonjs" }` in the package.json file ```js const io = require("socket.io-client"); const socket = io("/"); ``` - with `{ "type": "module" }` ```js import io from "socket.io-client"; const socket = io("/"); // or import { Manager } from "socket.io-client"; const manager = new Manager(); const socket = manager.socket("/"); ``` Related: https://nodejs.org/api/packages.html#packages_dual_commonjs_es_module_packages
Configuration menu - View commit details
-
Copy full SHA for cbabb03 - Browse repository at this point
Copy the full SHA cbabb03View commit details -
Configuration menu - View commit details
-
Copy full SHA for b68f816 - Browse repository at this point
Copy the full SHA b68f816View commit details -
Configuration menu - View commit details
-
Copy full SHA for a838ff1 - Browse repository at this point
Copy the full SHA a838ff1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 946a9f0 - Browse repository at this point
Copy the full SHA 946a9f0View commit details -
Configuration menu - View commit details
-
Copy full SHA for a66473f - Browse repository at this point
Copy the full SHA a66473fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2c7c230 - Browse repository at this point
Copy the full SHA 2c7c230View commit details
Commits on Oct 14, 2020
-
Configuration menu - View commit details
-
Copy full SHA for c7998d5 - Browse repository at this point
Copy the full SHA c7998d5View commit details
Commits on Oct 15, 2020
-
feat: move binary detection back to the parser
See socketio/socket.io-parser@285e7cd Breaking change: the Socket#binary() method is removed, as this use case is now covered by the ability to provide your own parser.
Configuration menu - View commit details
-
Copy full SHA for 1789094 - Browse repository at this point
Copy the full SHA 1789094View commit details -
Configuration menu - View commit details
-
Copy full SHA for b600e78 - Browse repository at this point
Copy the full SHA b600e78View commit details
Commits on Oct 17, 2020
-
A volatile packet will be dropped if: - the socket is not connected - the low-level transport is not ready (for example, a HTTP POST request is already pending) Syntax: ```js socket.volatile.emit("volatile event", "might or might not be sent"); ```
Configuration menu - View commit details
-
Copy full SHA for 7ddad2c - Browse repository at this point
Copy the full SHA 7ddad2cView commit details -
Configuration menu - View commit details
-
Copy full SHA for f3cbe98 - Browse repository at this point
Copy the full SHA f3cbe98View commit details
Commits on Oct 25, 2020
-
feat: add bundle with msgpack parser
Pros: - events with binary content are sent as 1 WebSocket frame (instead of 2 with the default parser) - payloads with lots of numbers should be smaller Cons: - no IE9 support (https://caniuse.com/mdn-javascript_builtins_arraybuffer) - a slightly bigger bundle size (61.1 vs 59.9 KB) Source: https://github.com/darrachequesne/socket.io-msgpack-parser
Configuration menu - View commit details
-
Copy full SHA for 71d6048 - Browse repository at this point
Copy the full SHA 71d6048View commit details
Commits on Oct 26, 2020
-
feat: add support for catch-all listeners
Inspired from EventEmitter2 [1] The API is similar to the one on the server-side: ```js socket.onAny((event, ...args) => {}); socket.prependAny((event, ...args) => {}); socket.offAny(); // remove all listeners socket.offAny(listener); const listeners = socket.listenersAny(); ``` [1]: https://github.com/EventEmitter2/EventEmitter2
Configuration menu - View commit details
-
Copy full SHA for 55f464f - Browse repository at this point
Copy the full SHA 55f464fView commit details -
refactor: rename ERROR to CONNECT_ERROR
The meaning is not modified: this packet type is still used by the server when the connection to a namespace is refused. Breaking change: the Socket instance will now emit a "connect_error" event instead of "error" (which is not a reserved event anymore) ```js // before socket.on("error", () => {}); // after socket.on("connect_error", () => {}); ```
Configuration menu - View commit details
-
Copy full SHA for 13e1db7 - Browse repository at this point
Copy the full SHA 13e1db7View commit details -
Configuration menu - View commit details
-
Copy full SHA for a9127ce - Browse repository at this point
Copy the full SHA a9127ceView commit details
Commits on Oct 27, 2020
-
refactor: rework of the Manager events
- rename "connect_error" to "error" - remove "reconnecting" (duplicate of "reconnect_attempt") The updated list of events emitted by the Manager: - open: successful (re)connection - error: (re)connection failure (previously: "connect_error") or error after a successful connection - close: disconnection - ping: ping packet - packet: data packet - reconnect_attempt: reconnection attempt (previously: "reconnect_attempt" & "reconnecting") - reconnect: successful reconnection - reconnect_error: reconnection failure - reconnect_failed: reconnection failure after all attempts For reference, the Socket instance emits the following events: - connect: successful connection to a Namespace - connect_error: connection failure - disconnect: disconnection
Configuration menu - View commit details
-
Copy full SHA for 969debe - Browse repository at this point
Copy the full SHA 969debeView commit details
Commits on Oct 30, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 0939395 - Browse repository at this point
Copy the full SHA 0939395View commit details -
Configuration menu - View commit details
-
Copy full SHA for ffa2804 - Browse repository at this point
Copy the full SHA ffa2804View commit details
Commits on Nov 5, 2020
-
Configuration menu - View commit details
-
Copy full SHA for b7e07ba - Browse repository at this point
Copy the full SHA b7e07baView commit details
There are no files selected for viewing
This file was deleted.