-
Notifications
You must be signed in to change notification settings - Fork 10.1k
Comparing changes
Open a pull request
base repository: socketio/socket.io
base: 3.0.0-rc2
head repository: socketio/socket.io
compare: 3.0.0-rc3
- 8 commits
- 21 files changed
- 1 contributor
Commits on Oct 15, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 20ea6bd - Browse repository at this point
Copy the full SHA 20ea6bdView commit details -
docs(examples): add example with TypeScript
There are two issues with the typings: - on the client-side, the Emitter class is not properly imported (hence the @ts-ignore) - on the server-side, the Socket class is not exported (in order to cast it in the "connect" event)
Configuration menu - View commit details
-
Copy full SHA for a81b9f3 - Browse repository at this point
Copy the full SHA a81b9f3View commit details
Commits on Oct 17, 2020
-
feat: remove prod dependency to socket.io-client
The client bundles are included in the repository in order to remove socket.io-client from the list of production dependencies and thus to reduce the total number of dependencies when installing the server. This means the release of the client and the server must now be in sync (which is almost always the case actually). The minified build is now served: - /<path>/socket.io.js - /<path>/socket.io.js.map - /<path>/socket.io.min.js - /<path>/socket.io.min.js.map The content will now be compressed as well.
Configuration menu - View commit details
-
Copy full SHA for 7603da7 - Browse repository at this point
Copy the full SHA 7603da7View commit details -
refactor(typings): export Socket class
In order to be able to cast it on the argument of the "connect" event: ```js import { Socket } from "socket.io"; io.on("connect", (socket: Socket) => { // ... }); ```
Configuration menu - View commit details
-
Copy full SHA for 0d74f29 - Browse repository at this point
Copy the full SHA 0d74f29View commit details
Commits on Oct 21, 2020
-
feat: make Socket#join() and Socket#leave() synchronous
Depending on the adapter, Socket#join() may return: - nothing (in-memory and Redis adapters) - a promise (custom adapters) Breaking change: Socket#join() and Socket#leave() do not accept a callback argument anymore. Before: ```js socket.join("room1", () => { io.to("room1").emit("hello"); }); ``` After: ``` socket.join("room1"); io.to("room1").emit("hello"); // or await socket.join("room1"); for custom adapters ``` Note: the need for an asynchronous method came from the Redis adapter, which did override the Adapter#add() method in earlier versions, but this is not the case anymore. Reference: - https://github.com/socketio/socket.io/blob/2.3.0/lib/socket.js#L236-L258 - https://github.com/socketio/socket.io-adapter/blob/1.1.2/index.js#L56-L65 - socketio/socket.io-redis-adapter@05f926e Related: #3662
Configuration menu - View commit details
-
Copy full SHA for 129c641 - Browse repository at this point
Copy the full SHA 129c641View commit details
Commits on Oct 25, 2020
-
feat: add support for catch-all listeners
Inspired from EventEmitter2 [1] ```js io.on("connect", socket => { socket.onAny((event, ...args) => {}); socket.prependAny((event, ...args) => {}); socket.offAny(); // remove all listeners socket.offAny(listener); const listeners = socket.listenersAny(); }); ``` Breaking change: the socket.use() method is removed This method was introduced in [2] for the same feature (having a catch-all listener), but there were two issues: - the API is not very user-friendly, since the user has to know the structure of the packet argument - it uses an ERROR packet, which is reserved for Namespace authentication issues (see [3]) [1]: https://github.com/EventEmitter2/EventEmitter2 [2]: #434 [3]: https://github.com/socketio/socket.io-protocol
2Configuration menu - View commit details
-
Copy full SHA for 5c73733 - Browse repository at this point
Copy the full SHA 5c73733View 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.
Configuration menu - View commit details
-
Copy full SHA for d16c035 - Browse repository at this point
Copy the full SHA d16c035View commit details
Commits on Oct 26, 2020
-
Configuration menu - View commit details
-
Copy full SHA for cacad70 - Browse repository at this point
Copy the full SHA cacad70View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff 3.0.0-rc2...3.0.0-rc3