Repository navigation
Migration guide and changelog for v0.14.0 #345
Pinned
Totodore
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Migration guide
With v0.14.0, multiple breaking changes have been introduced. Here is a little migration guide to help migrating from v0.13 to v0.14.
The end of storing
SocketIohandle as a static to access it from inside a handlerStarting from v0.14 you can use the
SocketIotype as an extractor. For example to emit data on another namespace.The global state feature
In v0.13 it was not required for the state types to be cloneable. Because this is now the case if you want to share common behavior with your state you should store it in an
Arc:react-rooms-chatexample:The extension feature
In v0.13 it was not required for any set extensions to be cloneable. Because it is now the case you should either make your extension type
Cloneif it is cheaply cloneable or wrap it with anArcif it a heavy clone or that you want to share the underlying memory.chatexample:Changelog
socketioxide
Cloneand will be cloned for each handler where the state is used.Send+Syncrequirements on extensions (issue #295). They are now extracted byCloning. Therefore all the type must implementClone. AnExtensionextractor is available to get an extension directly without callingsocket.extensions.get().HttpExtensiontypes to extract extensions from the http request.SocketIocan now be used as an extractor. So you can now easily access the entire socket.io context from your handlers.dyn_nsfunction. You can specify patterns with the{name}syntax thanks to the matchit crate. The dynamic namespace will create a child namespace for any path that matches the given pattern with the given handler.What's Changed
Extensiondecorator and anHttpExtensiondecorator by @Totodore in feat(socketio/extensions): rework extensions and add anExtensiondecorator and anHttpExtensiondecorator #309Strtype for ns path storage by @Totodore in feat(socketio/packet): switch toStrtype for ns path storage #334.into()everywhere in packet by @Totodore in fix: add generic ns path to avoid.into()everywhere in packet #340Strby @Totodore in feat: Namespace key in map asStr#342Strby @Totodore in feat: Namespace key in map asStr#343Full Changelog: v0.13.1...v0.14.0
All reactions