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 @@ -27,7 +27,7 @@ body:
- postgrest
- realtime_client
- storage_client
- functions_client
- supabase_functions
- yet_another_json_isolate
- unsure/all/other
validations:
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|realtime_client|functions_client"`
`dart pub deps | grep -E "supabase|postgrest|storage_client|realtime_client"`

On Windows:
`dart pub deps | findstr "supabase postgrest storage_client realtime_client functions_client"`
`dart pub deps | findstr "supabase postgrest storage_client realtime_client"`
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 @@ -30,6 +30,7 @@ jobs:
"postgrest": "postgrest",
"functions": "functions",
"functions_client": "functions",
"supabase_functions": "functions",
"auth_ui": "auth-ui",
"supabase": "supabase",
"supabase_flutter": "supabase_flutter"
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 @@ -25,14 +25,14 @@ jobs:
fail-fast: false
matrix:
package:
- functions_client
- postgrest
- realtime_client
- storage_client
- supabase
- supabase_auth
- supabase_common
- supabase_flutter
- supabase_functions
- supabase_typegen
- yet_another_json_isolate
steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
echo "Affected packages:"
echo "$CHANGED"

DART_PACKAGES="functions_client postgrest realtime_client storage_client supabase supabase_auth supabase_common supabase_typegen yet_another_json_isolate"
DART_PACKAGES="postgrest realtime_client storage_client supabase supabase_auth supabase_common supabase_functions supabase_typegen yet_another_json_isolate"

entries=()
for package in $DART_PACKAGES; do
Expand Down Expand Up @@ -344,7 +344,7 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
carryforward: 'functions_client,postgrest,realtime_client,storage_client,supabase,supabase_auth,supabase_common,supabase_typegen,yet_another_json_isolate,supabase_flutter'
carryforward: 'postgrest,realtime_client,storage_client,supabase,supabase_auth,supabase_common,supabase_functions,supabase_typegen,yet_another_json_isolate,supabase_flutter'
fail-on-error: false

test-result:
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The repository follows a layered dependency structure:
- **postgrest**: Database query client with ORM-style API
- **realtime_client**: WebSocket client for real-time subscriptions
- **storage_client**: File storage client with retry logic
- **functions_client**: Edge functions invocation client
- **supabase_functions**: Edge functions invocation client
- **yet_another_json_isolate**: JSON parsing in separate isolate for performance

Key architectural patterns:
Expand Down
37 changes: 35 additions & 2 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`, `realtime_client`, `storage_client`
and `functions_client`. Every symbol mentioned here is re-exported from `supabase_flutter`, so the
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.

## Migrating from v2 to v3
Expand Down Expand Up @@ -114,6 +114,39 @@ themselves can drop the `Uri.parse()`.

The URL the server receives is unchanged, only the Dart type differs.

### The `functions_client` package is now `supabase_functions`

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

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

```yaml
# Before
dependencies:
functions_client: ^2.7.1

# After
dependencies:
supabase_functions: ^3.0.0
```

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

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

No types are renamed, `FunctionsClient` and everything around it keep their names. Nothing about
the wire format changes either: the `X-Client-Info` header still identifies this client as
`functions-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 @@ -528,7 +561,7 @@ you can also branch on the response of `exchangeCodeForSession()` directly.

### `HttpMethod` is one shared enum

`functions_client` and `postgrest` each declared their own `HttpMethod`. There is now one, shaped
`supabase_functions` and `postgrest` each declared their own `HttpMethod`. There is now one, shaped
like postgrest's and re-exported from both, so imports are unchanged and postgrest callers are
unaffected. For `functions.invoke`, two things changed:

Expand Down
1 change: 0 additions & 1 deletion packages/functions_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 @@ -3,7 +3,7 @@
/// to build secure and scalable products.
library;

export 'package:functions_client/functions_client.dart';
export 'package:supabase_functions/supabase_functions.dart';
export 'package:supabase_auth/supabase_auth.dart';
export 'package:postgrest/postgrest.dart';
export 'package:realtime_client/realtime_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 @@ -18,14 +18,14 @@ environment:
resolution: workspace

dependencies:
functions_client: 2.7.1
http: ^1.6.0
meta: ^1.7.0
postgrest: 2.9.1
realtime_client: 2.13.0
storage_client: 2.8.0
supabase_auth: 3.0.0-dev.1
supabase_common: 0.1.2
supabase_functions: 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 @@ -8,7 +8,7 @@

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

This package holds code that would otherwise be duplicated across those
packages: the `SupabaseException` base class the auth, postgrest, storage and
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 @@ -593,7 +593,7 @@ supabaseLogger.onRecord.listen((record) {
- `supabase_auth`: `Logger('supabase.auth')`
- `realtime_client`: `Logger('supabase.realtime')`
- `storage_client`: `Logger('supabase.storage')`
- `functions_client`: `Logger('supabase.functions')`
- `supabase_functions`: `Logger('supabase.functions')`

---

Expand Down
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">functions_client</h1>
<h1 align="center">supabase_functions</h1>

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

<div align="center">

[![pub package](https://img.shields.io/pub/v/functions_client.svg)](https://pub.dev/packages/functions_client)
[![pub package](https://img.shields.io/pub/v/supabase_functions.svg)](https://pub.dev/packages/supabase_functions)
[![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 `functions_client` up to and including v2. That package is discontinued in favour of `supabase_functions`.

## Docs

The docs can be found on the official Supabase website.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ignore_for_file: avoid_print

import 'package:functions_client/functions_client.dart';
import 'package:supabase_functions/supabase_functions.dart';

/// Example to use with Supabase Edge Functions https://supabase.com/
Future<void> main() async {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:functions_client/src/version.dart';
import 'package:supabase_functions/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
@@ -1,9 +1,9 @@
import 'dart:convert';
import 'dart:typed_data';

import 'package:functions_client/src/constants.dart';
import 'package:functions_client/src/types.dart';
import 'package:functions_client/src/version.dart';
import 'package:supabase_functions/src/constants.dart';
import 'package:supabase_functions/src/types.dart';
import 'package:supabase_functions/src/version.dart';
import 'package:http/http.dart' as http;
import 'package:http/http.dart' show MultipartRequest;
import 'package:logging/logging.dart';
Expand Down
1 change: 1 addition & 0 deletions packages/supabase_functions/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: functions_client
name: supabase_functions
description: A dart client library for the Supabase functions.
version: 2.7.1
version: 3.0.0-dev.1
homepage: 'https://supabase.com'
repository: 'https://github.com/supabase/supabase-flutter/tree/main/packages/functions_client'
repository: 'https://github.com/supabase/supabase-flutter/tree/main/packages/supabase_functions'
issue_tracker: 'https://github.com/supabase/supabase-flutter/issues'
documentation: 'https://supabase.com/docs/reference/dart/functions-invoke'
topics:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import 'dart:async';
import 'dart:convert';
import 'dart:typed_data';

import 'package:functions_client/src/functions_client.dart';
import 'package:functions_client/src/types.dart';
import 'package:supabase_functions/src/functions_client.dart';
import 'package:supabase_functions/src/types.dart';
import 'package:http/http.dart';
import 'package:logging/logging.dart';
import 'package:supabase_common/supabase_common.dart';
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ environment:
sdk: '>=3.9.0 <4.0.0'

workspace:
- packages/functions_client
- packages/supabase_functions
- packages/supabase_auth
- packages/postgrest
- packages/realtime_client
Expand Down
2 changes: 1 addition & 1 deletion sdk-compliance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# explains why.
#
# Verified against the source in this repository (packages/supabase_auth, postgrest,
# storage_client, realtime_client, functions_client, supabase, supabase_flutter).
# storage_client, realtime_client, supabase_functions, supabase, supabase_flutter).
# Unlisted features default to not_implemented.

sdk: flutter
Expand Down