Conversation
…pabase phonix git dep (#3) * feat(realtime): add submodule for phoenix, change deps * fix(realtime): add temporary types since types/phoenix was removed * feat(realtime): use phoenix consts * fix(realtime): rename vitest extension * fix(realtime): cannot import form path * feat(realtime): add phoenixAdapter with basic stuff * fix(realtime): add path to compile project * feat(realtime): make presence use phoenixAdapter * feat(realtime): use github path instead of git submodules * fix(realtime): update phoenix github dependency * fix(realtime): properly export constatns with types form phoenix * fix(realtime): use proper types in phoenixAdapter, fix package-lock file * fix(realtime): small changes * fix(realtime): add and remove comments * fix(realtime): use proper url string * fix(realtime): better imports, fix constatns * fix(realtime): point to branch, fix commnet place * fix(realtime): change config file extension * feat(realtime): update phoenix dep, remove ts-ignore * fix(realtime): fix config extension * fix(realtime): generic helper function in phoenixAdapter * feat(realtime): update dep to supabase/phoenix * fix(realtime): remove unuse function * feat(realtime): better presence translation code, split into files * fix(realtime): fix cloneDeep function * fix(realtime): change privarte to internal in docs
Removed tests check behavior that is also checked in phoenix codebase.
* feat(realtime): add phoenixAdapter, refactor RealtimePresence, use supabase phonix git dep (#3) * feat(realtime): add submodule for phoenix, change deps * fix(realtime): add temporary types since types/phoenix was removed * feat(realtime): use phoenix consts * fix(realtime): rename vitest extension * fix(realtime): cannot import form path * feat(realtime): add phoenixAdapter with basic stuff * fix(realtime): add path to compile project * feat(realtime): make presence use phoenixAdapter * feat(realtime): use github path instead of git submodules * fix(realtime): update phoenix github dependency * fix(realtime): properly export constatns with types form phoenix * fix(realtime): use proper types in phoenixAdapter, fix package-lock file * fix(realtime): small changes * fix(realtime): add and remove comments * fix(realtime): use proper url string * fix(realtime): better imports, fix constatns * fix(realtime): point to branch, fix commnet place * fix(realtime): change config file extension * feat(realtime): update phoenix dep, remove ts-ignore * fix(realtime): fix config extension * fix(realtime): generic helper function in phoenixAdapter * feat(realtime): update dep to supabase/phoenix * fix(realtime): remove unuse function * feat(realtime): better presence translation code, split into files * fix(realtime): fix cloneDeep function * fix(realtime): change privarte to internal in docs * feat(realtime): move PoC for RealtimeClient and RealtimeChannel * fix(realtime): fix phoenixAdapter, make realtime work * fix(realtime): clear code, add types, make consistent * fix(realtime): cleaning, making supabase tests work * fix(realtime): more cleaning and checking * fix(realtime): import directly from pheonix, use type instead of interface * fix(realtime): use functions directly from channelAdapter * fix(realtime): use websocket factory * fix(realtime): remove infered types, make trigger more private, small fixes * fix(realtime): add ts-ignore for connectionState
* fix(realtime): fix joinedOnce * fix(realtime): fix conn
* fix(realtime): update types from phoenix * fix(realtime): fix type import/export * fix(realtime): cleaner types
* fix(realtime): better error message on connect * fix(realtime): remove unused method * feat(realtime): make disconnect and async function to wait for the end of phoenix disconnect * fix(realtime): remove not necessary testing stuff * fix(realtime): fix conn in test * fix(realtime): test websocket factory in different way * fix(realtime): disconnect is async * fix(realtime): better websocket server mocking * wip * fix(realtime): update types from phoenix * fix(realtime): fix type import/export * Revert "wip" This reverts commit d2e4342. * fix(realtime): fix lifecycle tests * fix(realtime): remove unnecessary lines in test * fix(realtime): cleanup after tests with testClient * fix(realtime): post merge fix
* fix(realtime): update types from phoenix * fix(realtime): fix type import/export * fix(realtime): first test fixed * fix(realtime): fix second test * fix(realtime): add dataSpy to auth tests, better auth helpers * fix(realtime): fix token setting and updates tests * fix(realtime): fix som auth tests by using helpers * fix(realtime): auth test more fixes * fix(realtime): add reconnect test for auth * feat(realtime): add shuffle for tests * fix(realtime): fix sendHeartbeat * fix(realtime): override heartbeatCallback with auth, use phoenix heartbeatCallback * fix(realtime): small changes * fix(realtime): heartbeat changes * fix(realtime): better test helpers. fix auth tests * fix(realtime): cr changes
* feat(realtime): add return values in adapters * fix(realtime): fix bindings filter, remove return type in realtime
* fix(realtime): better setup * fix(realtime): fix lifecycle test * fix(realtime): fix resilience tests * fix(realtime): cleaning in error tests * fix(realtime): remove tests which are in phoenix
…ore/merge-master chore(realtime): merge master
* fix(realtime): fix setup helper with passing apikey and params * fix(realtime): fix config tests * feat(realtime): add test for choosing correct encoder * fix(realtime): undo removing test
* fix(realtime): fix first auth test * fix(realtime): cleanup and add default phx join payload * fix(realtime): fix auth resubscribe tests * fix(realtime): refactor test to look ok
chore(realtime): merge master
* feat: fix `RealtimeChannel.errors.test.ts` * feat(realtime): better setup functionalities * fix(realtime): fix lifecycle test, remove printing * fix(realtime): fix realtimechannel.error tests * fix(realtime): delete unused function, add max push buffer * fix(realtime): discard messages without ref * fix(realtime): formatting * fix(realtime): delete teardown tests * fix(realtime): use waitForChannelSubscribed * fix(realtime): use TestSetup waiters for connected and closed socket * cr changes --------- Co-authored-by: Dominik Pilipczuk <63516830+snickerdoodle2@users.noreply.github.com>
* fix(realtime): fix postgres subscription validation tests * fix(realtime): postgres binding matching behaviour tests * fix(realtime): filterTransform fixed, postgres changes trigger tests * fix(realtime): postgres tests * fix(realtime): remove legacy test
* wip * fix(realtime): push tests * fix(realtime): fix rest of tests
* fix(realtime): fix tests * fix(realtime): code changes * wip * fix(realtime): reconnectTimer fixed, tests adjusted * fix(realtime): remove coments * fix(realtime): review fixes * fix(realtime): use clearInterval only for worker heartbeat timer * fix(realtime): fix test, remove unused import
#40) * fix(realtime): add comment, fix presenceAdapter.test, add socketAdapter.test * fix(realtime): better test name
* fix(realtime): fix updateJoinPayload * fix(realtime): add test
* fix(realtime): remove test which has no sense now * fix(realtime): fix auth tests
phoenix js lib in realtime implementation
Pull Request Test Coverage Report for Build 22135175025Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
fix(realtime): add dosctring or mark internal fix(realtime): helper spread order changed fix(realtime): better error check in test fix(realtime): add missing await fix(realtime): combine test helpers fix(realtime): remove unused statement in test fix(realtime): add missing await fix(realtime): better test for leaveOpenTopic fix(realtime): add missing cleanup fix(realtime): add missing await fix(realtime): avoid async describe fix(realtime): correct constatnt used fix(realtime): restore if test errors fix(realtime): await disconnect fix(realtime): mark adapters as internal or private
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
🔍 Description
Make
realtime-jsusephoenixjs library to handle most of the logic.What changed?
Most of the code now uses adapters to use phoenix API
Why was this change needed?
It shifts the responsibility for creating, handling, and cleaning connections and channels to
phoenixjs library. Only Supabase related logic for auth, and bindings filtering/formatting along exposing proper API is contained in therealtime-jsCloses #(issue_number)
🔄 Breaking changes
there is no way to
subscribeafterunsusbcirbe- it wasn't working properly in the original implementationWebSocketimplementation errors will be thrown inconstructor(instead ofconnect) -sincegetWebsocketConstructoris used inRealtimeClient.constructorcalling
onwithpresenceafter subscribe will result in error - due to no resubscribe funcitonalityno
teardownonRealtimeClient.disconnect- now channels are maintaining it's information and when socket is reconnected they keep working (this is the wayphoenixdoes it)callbacks (used in
onmethod) can takejoinRefas a 3rd parameterThis PR contains no breaking changes
📋 Checklist
<type>(<scope>): <description>npx nx formatto ensure consistent code formatting📝 Additional notes
In this PR some tests are removed because they are moved to https://github.com/supabase/phoenix