Repository navigation
refactor: extract shared code into supabase_common package - #1573
Merged
Merged
Conversation
spydon
force-pushed
the
refactor/extract-supabase-common
branch
from
July 9, 2026 12:45
5dbf1ef to
b6aa2d7
Compare
spydon
changed the base branch from
refactor/supabase-drop-rxdart
to
refactor/inline-retry
July 9, 2026 12:45
spydon
force-pushed
the
refactor/extract-supabase-common
branch
from
July 9, 2026 13:03
b6aa2d7 to
56b8147
Compare
Tr00d
approved these changes
Jul 9, 2026
spydon
force-pushed
the
refactor/inline-retry
branch
from
July 9, 2026 13:53
3b2af42 to
358f8e1
Compare
spydon
force-pushed
the
refactor/extract-supabase-common
branch
from
July 9, 2026 13:54
56b8147 to
0101b08
Compare
spydon
force-pushed
the
refactor/extract-supabase-common
branch
from
July 9, 2026 14:09
0101b08 to
4230c62
Compare
Introduces a new published supabase_common package and moves the non-breaking shared/duplicated code into it: - ToSnakeCase enum extension (was duplicated in gotrue and storage_client) - Platform detection (was duplicated in supabase and supabase_flutter, keeping the extra isRunningInFlutterTest flag) - buildClientInfoHeader for the X-Client-Info header (simple and platform-aware forms) used by all client packages - isSuccessStatusCode 2xx helper - FetchOptions (was duplicated internally in gotrue and storage_client) - Base64Url, PKCE and uuid helpers (moved out of gotrue, also fixing an intra-gotrue duplication in jwt.dart) - A unified ReplaySubject replacing gotrue's _ReplaySubject and supabase's _BehaviorSubject - The in-house retry helper (was duplicated in gotrue and storage_client by #1571) supabase_common is excluded from the SDK compliance public-API scan via .sdk-parse-ignore: its symbols are consumed across packages and so cannot be marked @internal without tripping invalid_use_of_internal_member. Refs #1572
spydon
force-pushed
the
refactor/extract-supabase-common
branch
from
July 9, 2026 14:17
4230c62 to
64c4258
Compare
11 tasks
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.
What
Introduces a new published
supabase_commonpackage and moves the non-breaking shared/duplicated code from #1572 into it.Stacked:
main← #1569 (drop rxdart) ← #1571 (drop retry, in-house helper) ← this PR.Note
Review/merge in stack order. Retarget this PR's base as each parent merges (→
refactor/inline-retry, thenrefactor/supabase-drop-rxdart, thenmain).Moved into
supabase_commonToSnakeCaseenum extensiongotrue+storage_clientplatform_io/platform_stub)supabase+supabase_flutter(kept the extraisRunningInFlutterTest)buildClientInfoHeader(X-Client-Info)isSuccessStatusCode(2xx)gotrue,storage_client,postgrest,functions_clientFetchOptionsgotrue+storage_clientBase64Url/ PKCE / uuid helpersgotrue-only; also fixes an intra-gotrueduplication injwt.dartReplaySubject_ReplaySubjectand supabase's_BehaviorSubjectretry/RetryOptionshelpergotrue+storage_client(identical);@internaldropped since it is now used across packagesNot included
RetryTimer) — breaking, tracked under v3 (☂️ v3 tracking issue #1278).Notes
supabase_commonis an internal, published package (client packages cannot depend on an unpublished local package). Its README flags it as internal with breaking changes expected.test.yml(DART_PACKAGES+ Coveralls carryforward), andrelease-pana.yml.Verification
dart analyzeclean across the whole workspace.supabase_commonunit tests pass (ToSnakeCase, client-info header, isSuccessStatusCode, Base64Url, PKCE, uuid, ReplaySubject sync/async/replay/hooks/addStream, retry).gotrue(constants/helper),functions_client(full suite), andsupabase(utilities) tests pass locally. Backend-dependent suites run in CI.Refs #1572