feat: port Realtime V2 serializer from supabase-js PRs #1829, #1894 #1325
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Ports Realtime V2 serializer feature from supabase-js PRs #1829 and #1894.
Source
Changes
From PR #1829
Serializerclass with binary encoding/decoding supporttypes.pyto add VSN constants (VSN_1_0_0,VSN_2_0_0,DEFAULT_VSN)AsyncRealtimeClientto supportvsnparameter and serializer selectionFrom PR #1894
allowed_metadata_keysparameterCombined Changes
vsn="2.0.0"toAsyncRealtimeClientTesting
Breaking Changes
None - This PR contains no breaking changes. The default serializer version remains 1.0.0, and V2 is opt-in.
Notes
bytesandbytearraytypes_pickhelper method similar to the JS implementationvsnparameter inAsyncRealtimeClientallowed_metadata_keysparameterReferences