-
-
Notifications
You must be signed in to change notification settings - Fork 306
feat!: rename the realtime_client package to supabase_realtime #1714
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -4,7 +4,7 @@ This document describes the breaking changes you need to be aware of when upgrad | |||||||||
| versions of the Supabase Flutter SDK, together with the steps required to migrate your code. | ||||||||||
|
|
||||||||||
| All packages in this repository are released together for a major version, so a single section | ||||||||||
| covers `supabase_flutter`, `supabase`, `supabase_auth`, `postgrest`, `realtime_client`, `storage_client` | ||||||||||
| covers `supabase_flutter`, `supabase`, `supabase_auth`, `postgrest`, `supabase_realtime`, `storage_client` | ||||||||||
| and `functions_client`. Every symbol mentioned here is re-exported from `supabase_flutter`, so the | ||||||||||
| snippets apply whether you depend on the individual package or on the Flutter one. | ||||||||||
|
|
||||||||||
|
|
@@ -76,6 +76,38 @@ example to hide it in an import. | |||||||||
| Nothing about the wire format changes. The `X-Client-Info` header still identifies this client as | ||||||||||
| `gotrue-dart`, and the `gotrue_meta_security` field in captcha payloads is unchanged. | ||||||||||
|
|
||||||||||
| ### The `realtime_client` package is now `supabase_realtime` | ||||||||||
|
|
||||||||||
| `realtime_client` says nothing about Supabase and does not match how the rest of the packages are | ||||||||||
| named. The package is published as `supabase_realtime` from v3 onwards, and the `realtime_client` | ||||||||||
| package is discontinued on pub.dev when v3 ships. | ||||||||||
|
|
||||||||||
| If you depend on `supabase_flutter` or `supabase` you do not need to change anything, both pull in | ||||||||||
| `supabase_realtime` for you and re-export it. | ||||||||||
|
|
||||||||||
| If you depend on the realtime client directly, rename the dependency and the import: | ||||||||||
|
|
||||||||||
| ```yaml | ||||||||||
| # Before | ||||||||||
| dependencies: | ||||||||||
| realtime_client: ^2.13.0 | ||||||||||
|
|
||||||||||
| # After | ||||||||||
| dependencies: | ||||||||||
| supabase_realtime: ^3.0.0 | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| ```dart | ||||||||||
| // Before | ||||||||||
| import 'package:realtime_client/realtime_client.dart'; | ||||||||||
|
|
||||||||||
| // After | ||||||||||
| import 'package:supabase_realtime/supabase_realtime.dart'; | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| The rename does not touch any type names. `RealtimeClient`, `RealtimeChannel` and the rest keep | ||||||||||
| theirs, and the `X-Client-Info` header still identifies this client as `realtime-dart`. | ||||||||||
|
Comment on lines
+108
to
+109
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win Clarify the type-name sentence. Line 109 says that the types “keep theirs”. State the noun explicitly so users understand that the type names remain unchanged. Proposed wording-The rename does not touch any type names. `RealtimeClient`, `RealtimeChannel` and the rest keep
-theirs, and the `X-Client-Info` header still identifies this client as `realtime-dart`.
+The rename does not touch any type names. `RealtimeClient`, `RealtimeChannel` and the rest keep
+their names, and the `X-Client-Info` header still identifies this client as `realtime-dart`.📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
|
|
||||||||||
| ### `RealtimeClient.connectionState` is now typed | ||||||||||
|
|
||||||||||
| `RealtimeClient` used to expose the socket state twice: a typed `connState` field and a stringly | ||||||||||
|
|
@@ -181,8 +213,8 @@ ones below are the renames you can actually hit. | |||||||||
|
|
||||||||||
| | Before | After | Package | | ||||||||||
| | --- | --- | --- | | ||||||||||
| | `SocketStates` | `SocketState` | `realtime_client` | | ||||||||||
| | `PostgresTypes` | `PostgresType` | `realtime_client` | | ||||||||||
| | `SocketStates` | `SocketState` | `supabase_realtime` | | ||||||||||
| | `PostgresTypes` | `PostgresType` | `supabase_realtime` | | ||||||||||
| | `AuthenticatorAssuranceLevels` | `AuthenticatorAssuranceLevel` | `supabase_auth` | | ||||||||||
| | `LoadTableSnapshots` | `TableSnapshotScope` | `storage_client` | | ||||||||||
|
|
||||||||||
|
|
@@ -368,8 +400,8 @@ already inert: unused types, options the client ignored, or values the server ne | |||||||||
| | `User.confirmedAt` | `User.emailConfirmedAt` | `supabase_auth` | | ||||||||||
| | `ReturningOption` | none, it was unused | `postgrest` | | ||||||||||
| | `PostgrestClient.auth()` | `PostgrestClient.setAuth()` | `postgrest` | | ||||||||||
| | `RealtimeClient.longpollerTimeout` | none, there is no longpoll transport | `realtime_client` | | ||||||||||
| | `ChannelResponse.rateLimited` | none, it was never returned | `realtime_client` | | ||||||||||
| | `RealtimeClient.longpollerTimeout` | none, there is no longpoll transport | `supabase_realtime` | | ||||||||||
| | `ChannelResponse.rateLimited` | none, it was never returned | `supabase_realtime` | | ||||||||||
| | `FileObject.lastAccessedAt`, `FileObjectV2.lastAccessedAt` | none, the server does not populate it | `storage_client` | | ||||||||||
| | `AuthUser` | `User` | `supabase` | | ||||||||||
| | `RealtimeClientOptions.eventsPerSecond` | none, it was already ignored | `supabase` | | ||||||||||
|
|
||||||||||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| const version = '3.0.0-dev.1'; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| name: realtime_client | ||
| name: supabase_realtime | ||
| description: Listens to changes in a PostgreSQL Database and via websockets. This is for usage with Supabase Realtime server. | ||
| version: 2.13.0 | ||
| version: 3.0.0-dev.1 | ||
| homepage: 'https://supabase.com' | ||
| repository: 'https://github.com/supabase/supabase-flutter/tree/main/packages/realtime_client' | ||
| repository: 'https://github.com/supabase/supabase-flutter/tree/main/packages/supabase_realtime' | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- target file ---'
nl -ba packages/supabase_realtime/pubspec.yaml | sed -n '1,12p'
printf '%s\n' '--- line lengths ---'
python3 - <<'PY'
from pathlib import Path
path = Path("packages/supabase_realtime/pubspec.yaml")
for number, line in enumerate(path.read_text().splitlines(), 1):
if number <= 12:
print(f"{number}: {len(line)} characters: {line}")
PY
printf '%s\n' '--- repository URL and line-length guidance ---'
rg -n -C 3 "repository:|80 characters|80-character|line length|URL exception|melos (analyze|format)" \
. --glob '!**/.git/**' --glob '!**/build/**' --glob '!**/node_modules/**' || true
printf '%s\n' '--- relevant project files ---'
git ls-files '*pubspec.yaml' '*melos.yaml' '*analysis_options*' '*README*' | sed -n '1,120p'Repository: supabase/supabase-flutter Length of output: 1939 🌐 Web query:
💡 Result: The package often referred to as 'supabase_realtime' in the context of Dart and Flutter development is located within the supabase-flutter monorepo [1][2]. Specifically, the code for the client that handles Realtime functionality is found in the packages/realtime_client directory of the following GitHub repository: Repository: https://github.com/supabase/supabase-flutter [3][1] Path to package: packages/realtime_client [3][4] The pubspec.yaml file for this package is located at packages/realtime_client/pubspec.yaml within that repository [3][4]. This monorepo includes various Supabase-related packages, and it is the authoritative source for the Dart client libraries used to interact with Supabase Realtime [1][2]. Citations:
🌐 Web query:
💡 Result: While there is no universal YAML specification that mandates an 80-character line length, many projects and style guides adopt this limit for readability and consistency [1][2]. The supabase/supabase-flutter repository is an example of a project that strictly enforces an 80-character line length for its codebase [1][2]. In that repository, the 80-character limit is maintained through automated tooling. Developers are instructed to use formatting commands that enforce this constraint [1][2]. For instance, when using the Melos monorepo management tool, the formatting process is configured to respect the 80-character limit [1][3]: melos format Additionally, for Dart and Flutter-related code within such projects, the standard formatter can be invoked directly with a line-length flag [4]: dart format lib test -l 80 --set-exit-if-changed While YAML files themselves are often formatted manually, teams that enforce an 80-character rule typically do so to ensure that files remain readable across various environments, including command-line interfaces and code editors [5]. If you are working in a repository that enforces this, you should break long lines, comments, and argument lists into multiple lines while preserving the structure and semantics of the data [5]. Citations:
🏁 Script executed: #!/bin/bash
set -eu
base='https://raw.githubusercontent.com/supabase/supabase-flutter/main'
printf '%s\n' '--- target pubspec ---'
curl -fsSL "$base/packages/supabase_realtime/pubspec.yaml" | nl -ba | sed -n '1,12p'
printf '%s\n' '--- target line lengths ---'
curl -fsSL "$base/packages/supabase_realtime/pubspec.yaml" |
python3 -c '
import sys
for n, line in enumerate(sys.stdin.read().splitlines(), 1):
if n <= 12:
print(f"{n}: {len(line)} characters: {line}")
'
printf '%s\n' '--- repository guidance ---'
curl -fsSL "$base/AGENTS.md" | sed -n '1,240p'
printf '%s\n' '--- URL exception references ---'
curl -fsSL "$base/AGENTS.md" | rg -n -i -C 3 \
'80|line length|url|yaml|exception' || trueRepository: supabase/supabase-flutter Length of output: 1939 🌐 Web query:
💡 Result: In YAML, escaping a line break within a double-quoted scalar is used to continue a string across multiple lines without introducing undesired whitespace (such as a space or newline) into the resulting string value [1][2]. Under the YAML specification, line breaks in double-quoted scalars are typically subject to "flow line folding," where they are replaced by a space character [3][4][5]. However, when a line break is preceded by a backslash character ( Citations:
🌐 Web query:
💡 Result: In the Dart pubspec.yaml file, the repository field is an optional piece of metadata that specifies the URL of the package's source code repository [1][2]. The field expects a valid URL string that points to the location where the package's source code is hosted (e.g., https://github.com/user/package) [1][3][4]. When provided, this URL is displayed on the package's page on pub.dev, which helps users locate and contribute to the source code [1][2]. While the repository field is optional, it is recommended to provide either this field, the homepage field, or both, to improve discoverability and provide context for where the package originates [1][3]. Note that this field is distinct from configurations used for package hosting (such as publish_to or the hosted key for dependencies), which govern where packages are published or retrieved from, rather than pointing to the source code repository [5]. Citations:
Wrap the repository URL at line 5. The current line is 95 characters. Use a double-quoted YAML scalar with an escaped line break after 🤖 Prompt for AI AgentsSource: Coding guidelines |
||
| issue_tracker: 'https://github.com/supabase/supabase-flutter/issues' | ||
| documentation: 'https://supabase.com/docs/reference/dart/subscribe' | ||
| topics: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Keep changed YAML lines within 80 characters.
The changed YAML lines in both files exceed the repository line-length limit.
.github/ISSUE_TEMPLATE/bug_report.yml#L61-L64: Split the rendered dependency commands into shorter lines..github/workflows/test.yml#L67-L67: Split theDART_PACKAGESvalue..github/workflows/test.yml#L75-L75: Split the backend case branch..github/workflows/test.yml#L79-L79: Split the concurrency case branch..github/workflows/test.yml#L347-L347: Split the Coveralls carryforward value.As per coding guidelines, the line length limit is 80 characters.
📍 Affects 2 files
.github/ISSUE_TEMPLATE/bug_report.yml#L61-L64(this comment).github/workflows/test.yml#L67-L67.github/workflows/test.yml#L75-L75.github/workflows/test.yml#L79-L79.github/workflows/test.yml#L347-L347🤖 Prompt for AI Agents
Source: Coding guidelines