Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ body:
- supabase_auth
- postgrest
- supabase_realtime
- storage_client
- supabase_storage
- supabase_functions
- yet_another_json_isolate
- unsure/all/other
Expand Down Expand Up @@ -58,10 +58,10 @@ body:
Output of `flutter doctor -v`, plus the versions of the affected packages.

On Linux/macOS:
`dart pub deps | grep -E "supabase|postgrest|storage_client"`
`dart pub deps | grep -E "supabase|postgrest"`

On Windows:
`dart pub deps | findstr "supabase postgrest storage_client"`
`dart pub deps | findstr "supabase postgrest"`
render: shell
placeholder: Flutter, Dart and package versions
validations:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/label-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
"auth": "auth",
"storage": "storage",
"storage_client": "storage",
"supabase_storage": "storage",
"realtime": "realtime",
"realtime_client": "realtime",
"supabase_realtime": "realtime",
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-pana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ jobs:
matrix:
package:
- postgrest
- storage_client
- supabase
- supabase_auth
- supabase_common
- supabase_flutter
- supabase_functions
- supabase_realtime
- supabase_storage
- supabase_typegen
- yet_another_json_isolate
steps:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,19 @@ jobs:
echo "Affected packages:"
echo "$CHANGED"

DART_PACKAGES="postgrest storage_client supabase supabase_auth supabase_common supabase_functions supabase_realtime supabase_typegen yet_another_json_isolate"
DART_PACKAGES="postgrest supabase supabase_auth supabase_common supabase_functions supabase_realtime supabase_storage supabase_typegen yet_another_json_isolate"

entries=()
for package in $DART_PACKAGES; do
if ! echo "$CHANGED" | grep -qx "$package"; then
continue
fi
case "$package" in
postgrest|storage_client|supabase|supabase_auth|supabase_realtime) backend=true ;;
postgrest|supabase|supabase_auth|supabase_realtime|supabase_storage) backend=true ;;
*) backend=false ;;
esac
case "$package" in
postgrest|storage_client|supabase|supabase_auth|supabase_realtime) concurrency="1" ;;
postgrest|supabase|supabase_auth|supabase_realtime|supabase_storage) concurrency="1" ;;
*) concurrency="0" ;;
esac
entries+=("{\"name\":\"$package\",\"backend\":$backend,\"concurrency\":\"$concurrency\"}")
Expand Down Expand Up @@ -344,7 +344,7 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
carryforward: 'postgrest,storage_client,supabase,supabase_auth,supabase_common,supabase_functions,supabase_realtime,supabase_typegen,yet_another_json_isolate,supabase_flutter'
carryforward: 'postgrest,supabase,supabase_auth,supabase_common,supabase_functions,supabase_realtime,supabase_storage,supabase_typegen,yet_another_json_isolate,supabase_flutter'
fail-on-error: false

test-result:
Expand Down
6 changes: 3 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The repository follows a layered dependency structure:
- **supabase_auth**: Authentication client (sessions, JWT, OAuth)
- **postgrest**: Database query client with ORM-style API
- **supabase_realtime**: WebSocket client for real-time subscriptions
- **storage_client**: File storage client with retry logic
- **supabase_storage**: File storage client with retry logic
- **supabase_functions**: Edge functions invocation client
- **yet_another_json_isolate**: JSON parsing in separate isolate for performance

Expand Down Expand Up @@ -52,9 +52,9 @@ melos format

### Testing

Most packages have unit tests. The `postgrest`, `supabase_auth`, `supabase_realtime`, and `storage_client` packages run against a local Supabase stack started with the Supabase CLI. This requires Docker and the [Supabase CLI](https://supabase.com/docs/guides/local-development/cli/getting-started) installed.
Most packages have unit tests. The `postgrest`, `supabase_auth`, `supabase_realtime`, and `supabase_storage` packages run against a local Supabase stack started with the Supabase CLI. This requires Docker and the [Supabase CLI](https://supabase.com/docs/guides/local-development/cli/getting-started) installed.

**For packages requiring a backend (postgrest, supabase_auth, supabase_realtime, storage_client):**
**For packages requiring a backend (postgrest, supabase_auth, supabase_realtime, supabase_storage):**

```bash
# 1. Start the local Supabase stack from the repository root
Expand Down
38 changes: 35 additions & 3 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ versions of the Supabase Flutter SDK, together with the steps required to migrat

All packages in this repository are released together for a major version, so a single section
covers `supabase_flutter`, `supabase`, `supabase_auth`, `postgrest`, `supabase_realtime`,
`storage_client` and `supabase_functions`. Every symbol mentioned here is re-exported from
`supabase_storage` and `supabase_functions`. 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.

Expand Down Expand Up @@ -180,6 +180,38 @@ import 'package:supabase_realtime/supabase_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`.

### The `storage_client` package is now `supabase_storage`

`storage_client` says nothing about Supabase and does not match how the rest of the packages are
named. The package is published as `supabase_storage` from v3 onwards, and the `storage_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_storage` for you and re-export it.

If you depend on the storage client directly, rename the dependency and the import:

```yaml
# Before
dependencies:
storage_client: ^2.8.0

# After
dependencies:
supabase_storage: ^3.0.0
```

```dart
// Before
import 'package:storage_client/storage_client.dart';

// After
import 'package:supabase_storage/supabase_storage.dart';
```

The rename does not touch any type names. `SupabaseStorageClient`, `StorageFileApi` and the rest
keep their names, and the `X-Client-Info` header still identifies this client as `storage-dart`.

### `RealtimeClient.connectionState` is now typed

`RealtimeClient` used to expose the socket state twice: a typed `connState` field and a stringly
Expand Down Expand Up @@ -288,7 +320,7 @@ ones below are the renames you can actually hit.
| `SocketStates` | `SocketState` | `supabase_realtime` |
| `PostgresTypes` | `PostgresType` | `supabase_realtime` |
| `AuthenticatorAssuranceLevels` | `AuthenticatorAssuranceLevel` | `supabase_auth` |
| `LoadTableSnapshots` | `TableSnapshotScope` | `storage_client` |
| `LoadTableSnapshots` | `TableSnapshotScope` | `supabase_storage` |

No enum values changed, so the only work is renaming the type where you name it explicitly.

Expand Down Expand Up @@ -474,7 +506,7 @@ already inert: unused types, options the client ignored, or values the server ne
| `PostgrestClient.auth()` | `PostgrestClient.setAuth()` | `postgrest` |
| `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` |
| `FileObject.lastAccessedAt`, `FileObjectV2.lastAccessedAt` | none, the server does not populate it | `supabase_storage` |
| `AuthUser` | `User` | `supabase` |
| `RealtimeClientOptions.eventsPerSecond` | none, it was already ignored | `supabase` |
| `RemoveSubscriptionResult` | none | `supabase` |
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ To install on a locally developed app:

## Testing

The tests for the packages `postgrest`, `supabase_auth`, `supabase_realtime` and `storage_client` run against a
The tests for the packages `postgrest`, `supabase_auth`, `supabase_realtime` and `supabase_storage` run against a
local Supabase stack. To run these tests locally you need `docker` and the
[Supabase CLI](https://supabase.com/docs/guides/local-development/cli/getting-started) installed.

Expand Down
1 change: 0 additions & 1 deletion packages/storage_client/lib/src/version.dart

This file was deleted.

2 changes: 1 addition & 1 deletion packages/supabase/lib/supabase.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export 'package:supabase_functions/supabase_functions.dart';
export 'package:supabase_auth/supabase_auth.dart';
export 'package:postgrest/postgrest.dart';
export 'package:supabase_realtime/supabase_realtime.dart';
export 'package:storage_client/storage_client.dart';
export 'package:supabase_storage/supabase_storage.dart';

export 'src/realtime_client_options.dart';
export 'src/supabase_client.dart';
Expand Down
2 changes: 1 addition & 1 deletion packages/supabase/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ dependencies:
http: ^1.6.0
meta: ^1.7.0
postgrest: 2.9.1
storage_client: 2.8.0
supabase_auth: 3.0.0-dev.1
supabase_common: 0.1.2
supabase_functions: 3.0.0-dev.1
supabase_realtime: 3.0.0-dev.1
supabase_storage: 3.0.0-dev.1
yet_another_json_isolate: 2.1.1
logging: ^1.3.0

Expand Down
2 changes: 1 addition & 1 deletion packages/supabase_common/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
> do not depend on it directly.

Shared internal utilities used across the Supabase Dart and Flutter client
packages (`supabase_auth`, `postgrest`, `supabase_realtime`, `storage_client`,
packages (`supabase_auth`, `postgrest`, `supabase_realtime`, `supabase_storage`,
`supabase_functions`, `supabase`, `supabase_flutter`).

This package holds code that would otherwise be duplicated across those
Expand Down
2 changes: 1 addition & 1 deletion packages/supabase_flutter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ supabaseLogger.onRecord.listen((record) {
- `postgrest`: `Logger('supabase.postgrest')`
- `supabase_auth`: `Logger('supabase.auth')`
- `supabase_realtime`: `Logger('supabase.realtime')`
- `storage_client`: `Logger('supabase.storage')`
- `supabase_storage`: `Logger('supabase.storage')`
- `supabase_functions`: `Logger('supabase.functions')`

---
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<img alt="Supabase Logo" width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/packages/common/assets/images/logo-preview.jpg">
</a>

<h1 align="center">storage_client</h1>
<h1 align="center">supabase_storage</h1>

<p align="center">
Dart client library to interact with <a href="https://supabase.com/docs/guides/storage">Supabase Storage</a>.
Expand All @@ -19,11 +19,15 @@

<div align="center">

[![pub package](https://img.shields.io/pub/v/storage_client.svg)](https://pub.dev/packages/storage_client)
[![pub package](https://img.shields.io/pub/v/supabase_storage.svg)](https://pub.dev/packages/supabase_storage)
[![pub test](https://github.com/supabase/supabase-flutter/workflows/Test/badge.svg)](https://github.com/supabase/supabase-flutter/actions?query=workflow%3ATest)

</div>

> **Note**
>
> This package was published as `storage_client` up to and including v2. That package is discontinued in favour of `supabase_storage`.
Comment thread
spydon marked this conversation as resolved.

## Docs

The docs can be found on the official Supabase website.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import 'dart:io';
import 'dart:typed_data';

import 'package:storage_client/storage_client.dart';
import 'package:supabase_storage/supabase_storage.dart';

Future<void> main() async {
const supabaseUrl = '';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:storage_client/src/version.dart';
import 'package:supabase_storage/src/version.dart';
import 'package:supabase_common/supabase_common.dart';
import 'package:meta/meta.dart';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import 'package:http/http.dart';
import 'package:logging/logging.dart';
import 'package:meta/meta.dart';
import 'package:mime/mime.dart';
import 'package:storage_client/src/types.dart';
import 'package:supabase_storage/src/types.dart';
import 'package:supabase_common/supabase_common.dart';

import 'file_stub.dart' if (dart.library.io) './file_io.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import 'dart:math';

import 'package:http/http.dart' as http;
import 'package:logging/logging.dart';
import 'package:storage_client/src/iceberg/iceberg_error.dart';
import 'package:storage_client/src/iceberg/iceberg_types.dart';
import 'package:storage_client/src/iceberg/table_requirement.dart';
import 'package:storage_client/src/iceberg/table_update.dart';
import 'package:supabase_storage/src/iceberg/iceberg_error.dart';
import 'package:supabase_storage/src/iceberg/iceberg_types.dart';
import 'package:supabase_storage/src/iceberg/table_requirement.dart';
import 'package:supabase_storage/src/iceberg/table_update.dart';
import 'package:supabase_common/supabase_common.dart';

class _IcebergResponse {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:storage_client/src/iceberg/iceberg_types.dart';
import 'package:supabase_storage/src/iceberg/iceberg_types.dart';

/// A single change applied to a table as part of a commit. The common data
/// definition updates are modelled as dedicated subclasses. Updates that are
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:http/http.dart';
import 'package:meta/meta.dart';
import 'package:storage_client/src/fetch.dart';
import 'package:storage_client/src/types.dart';
import 'package:supabase_storage/src/fetch.dart';
import 'package:supabase_storage/src/types.dart';
import 'package:supabase_common/supabase_common.dart';

class StorageBucketApi {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import 'package:logging/logging.dart';
import 'package:meta/meta.dart';
import 'package:storage_client/src/constants.dart';
import 'package:storage_client/src/iceberg/iceberg_rest_catalog.dart';
import 'package:storage_client/src/iceberg/iceberg_types.dart';
import 'package:storage_client/src/storage_bucket_api.dart';
import 'package:storage_client/src/storage_file_api.dart';
import 'package:storage_client/src/vector_client.dart';
import 'package:storage_client/src/version.dart';
import 'package:supabase_storage/src/constants.dart';
import 'package:supabase_storage/src/iceberg/iceberg_rest_catalog.dart';
import 'package:supabase_storage/src/iceberg/iceberg_types.dart';
import 'package:supabase_storage/src/storage_bucket_api.dart';
import 'package:supabase_storage/src/storage_file_api.dart';
import 'package:supabase_storage/src/vector_client.dart';
import 'package:supabase_storage/src/version.dart';
import 'package:supabase_common/supabase_common.dart';

class SupabaseStorageClient extends StorageBucketApi {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'dart:typed_data';

import 'package:storage_client/src/fetch.dart';
import 'package:storage_client/src/types.dart';
import 'package:supabase_storage/src/fetch.dart';
import 'package:supabase_storage/src/types.dart';
import 'package:supabase_common/supabase_common.dart';

import 'file_stub.dart' if (dart.library.io) './file_io.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:meta/meta.dart';
import 'package:storage_client/src/fetch.dart';
import 'package:storage_client/src/vector_types.dart';
import 'package:supabase_storage/src/fetch.dart';
import 'package:supabase_storage/src/vector_types.dart';
import 'package:supabase_common/supabase_common.dart';

/// Client for the Storage Vectors API, reachable through
Expand Down
1 change: 1 addition & 0 deletions packages/supabase_storage/lib/src/version.dart
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: storage_client
name: supabase_storage
description: Dart client library to interact with Supabase Storage. Supabase Storage provides an interface for managing Files stored in S3, using Postgres to manage permissions.
version: 2.8.0
version: 3.0.0-dev.1
homepage: 'https://supabase.com'
repository: 'https://github.com/supabase/supabase-flutter/tree/main/packages/storage_client'
repository: 'https://github.com/supabase/supabase-flutter/tree/main/packages/supabase_storage'
issue_tracker: 'https://github.com/supabase/supabase-flutter/issues'
documentation: 'https://supabase.com/docs/reference/dart/file-buckets-createbucket'
topics:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'dart:io';
import 'dart:typed_data';

import 'package:http/http.dart';
import 'package:storage_client/storage_client.dart';
import 'package:supabase_storage/supabase_storage.dart';
import 'package:test/test.dart';

import 'custom_http_client.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'dart:io';
import 'package:http/http.dart' as http;
import 'package:mime/mime.dart';
import "package:path/path.dart" show join;
import 'package:storage_client/storage_client.dart';
import 'package:supabase_storage/supabase_storage.dart';
import 'package:supabase_common/testing.dart';
import 'package:test/test.dart';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'dart:convert';
import 'dart:typed_data';

import 'package:http/http.dart';
import 'package:storage_client/storage_client.dart';
import 'package:supabase_storage/supabase_storage.dart';
import 'package:test/test.dart';

import 'custom_http_client.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'dart:convert';
import 'dart:io';

import 'package:http/http.dart';
import 'package:storage_client/storage_client.dart';
import 'package:supabase_storage/supabase_storage.dart';
import 'package:test/test.dart';

const String supabaseUrl = 'SUPABASE_TEST_URL';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'dart:typed_data';

import 'package:storage_client/storage_client.dart';
import 'package:supabase_storage/supabase_storage.dart';
import 'package:test/test.dart';

import 'custom_http_client.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:storage_client/src/types.dart';
import 'package:supabase_storage/src/types.dart';
import 'package:supabase_common/supabase_common.dart';
import 'package:test/test.dart';

Expand Down
Loading