From 22ea442df81f640a02fcf63e59fc6aeef58c4a9e Mon Sep 17 00:00:00 2001 From: dshukertjr Date: Fri, 26 Jul 2024 16:02:35 +0900 Subject: [PATCH 1/6] Add test to build flutter web --- .github/workflows/supabase_flutter.yml | 5 +++++ packages/supabase_flutter/example/pubspec.yaml | 18 ++++++++++++++++++ .../lib/src/_isolates_web.dart | 2 +- 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/workflows/supabase_flutter.yml b/.github/workflows/supabase_flutter.yml index 7988c947..d64b4bfc 100644 --- a/.github/workflows/supabase_flutter.yml +++ b/.github/workflows/supabase_flutter.yml @@ -76,3 +76,8 @@ jobs: run: | flutter pub downgrade app_links flutter test --concurrency=1 + + - name: Verify if Flutter web build is successful + run: | + cd packages/supabase_flutter/example + flutter build web diff --git a/packages/supabase_flutter/example/pubspec.yaml b/packages/supabase_flutter/example/pubspec.yaml index e90707df..67f6d0b5 100644 --- a/packages/supabase_flutter/example/pubspec.yaml +++ b/packages/supabase_flutter/example/pubspec.yaml @@ -21,3 +21,21 @@ dev_dependencies: flutter: uses-material-design: true +melos_managed_dependency_overrides: functions_client,gotrue,postgrest,realtime_client,storage_client,yet_another_json_isolate +dependency_overrides: + functions_client: + path: ../../functions_client + gotrue: + path: ../../gotrue + postgrest: + path: ../../postgrest + realtime_client: + path: ../../realtime_client + storage_client: + path: ../../storage_client + supabase: + path: ../../supabase + yet_another_json_isolate: + path: ../../yet_another_json_isolate + supabase_flutter: + path: ../ diff --git a/packages/yet_another_json_isolate/lib/src/_isolates_web.dart b/packages/yet_another_json_isolate/lib/src/_isolates_web.dart index 30ffa949..c88ad6c7 100644 --- a/packages/yet_another_json_isolate/lib/src/_isolates_web.dart +++ b/packages/yet_another_json_isolate/lib/src/_isolates_web.dart @@ -10,7 +10,7 @@ class YAJsonIsolate { return jsonDecode(json); } - Future encode(Map json) async { + Future encode(Object? json) async { await null; return jsonEncode(json); } From 0675dc0df42e7003efa462b02e24628a0d8d055f Mon Sep 17 00:00:00 2001 From: dshukertjr Date: Fri, 26 Jul 2024 16:07:58 +0900 Subject: [PATCH 2/6] Adjust the path of the ci pipeline --- .github/workflows/supabase_flutter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/supabase_flutter.yml b/.github/workflows/supabase_flutter.yml index d64b4bfc..1aff30ea 100644 --- a/.github/workflows/supabase_flutter.yml +++ b/.github/workflows/supabase_flutter.yml @@ -79,5 +79,5 @@ jobs: - name: Verify if Flutter web build is successful run: | - cd packages/supabase_flutter/example + cd example flutter build web From 189fd65433a26bae8ead5e09f4304b43abb4548a Mon Sep 17 00:00:00 2001 From: dshukertjr Date: Fri, 26 Jul 2024 17:20:27 +0900 Subject: [PATCH 3/6] update melos config to include supabase_flutter example and use the local packages --- melos.yaml | 20 ++++++++++++++++--- .../supabase_flutter/example/pubspec.yaml | 18 ----------------- 2 files changed, 17 insertions(+), 21 deletions(-) diff --git a/melos.yaml b/melos.yaml index 8377f45d..f5a15acf 100644 --- a/melos.yaml +++ b/melos.yaml @@ -3,6 +3,7 @@ repository: https://github.com/supabase/supabase-flutter packages: - packages/* + - packages/supabase_flutter/example command: version: @@ -14,9 +15,22 @@ command: preCommit: melos run update-version bootstrap: - # It seems so that running "pub get" in parallel has some issues (like - # https://github.com/dart-lang/pub/issues/3404). Disabling this feature - # makes the CI much more stable. + functions_client: + path: packages/functions_client + gotrue: + path: packages/gotrue + postgrest: + path: packages/postgrest + realtime_client: + path: packages/realtime_client + storage_client: + path: packages/storage_client + supabase: + path: packages/supabase + supabase_flutter: + path: packages/supabase_flutter + yes_another_json_isolate: + path: packages/yes_another_json_isolate runPubGetInParallel: false usePubspecOverrides: true diff --git a/packages/supabase_flutter/example/pubspec.yaml b/packages/supabase_flutter/example/pubspec.yaml index 67f6d0b5..e90707df 100644 --- a/packages/supabase_flutter/example/pubspec.yaml +++ b/packages/supabase_flutter/example/pubspec.yaml @@ -21,21 +21,3 @@ dev_dependencies: flutter: uses-material-design: true -melos_managed_dependency_overrides: functions_client,gotrue,postgrest,realtime_client,storage_client,yet_another_json_isolate -dependency_overrides: - functions_client: - path: ../../functions_client - gotrue: - path: ../../gotrue - postgrest: - path: ../../postgrest - realtime_client: - path: ../../realtime_client - storage_client: - path: ../../storage_client - supabase: - path: ../../supabase - yet_another_json_isolate: - path: ../../yet_another_json_isolate - supabase_flutter: - path: ../ From df6ea5cd804ce06a981a8de8b072a49265b1f9b6 Mon Sep 17 00:00:00 2001 From: Vinzent Date: Fri, 26 Jul 2024 10:34:05 +0200 Subject: [PATCH 4/6] chore: remove packgaes from bootstrap seection --- melos.yaml | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/melos.yaml b/melos.yaml index f5a15acf..798b8843 100644 --- a/melos.yaml +++ b/melos.yaml @@ -15,22 +15,9 @@ command: preCommit: melos run update-version bootstrap: - functions_client: - path: packages/functions_client - gotrue: - path: packages/gotrue - postgrest: - path: packages/postgrest - realtime_client: - path: packages/realtime_client - storage_client: - path: packages/storage_client - supabase: - path: packages/supabase - supabase_flutter: - path: packages/supabase_flutter - yes_another_json_isolate: - path: packages/yes_another_json_isolate + # It seems so that running "pub get" in parallel has some issues (like + # https://github.com/dart-lang/pub/issues/3404). Disabling this feature + # makes the CI much more stable. runPubGetInParallel: false usePubspecOverrides: true From 6385aee18a89602237a96f22fadccc22f61d44c3 Mon Sep 17 00:00:00 2001 From: Vinzent Date: Fri, 26 Jul 2024 10:45:17 +0200 Subject: [PATCH 5/6] ci: run bootstrap in non flutter packages --- .github/workflows/functions_client.yml | 2 +- .github/workflows/gotrue.yml | 2 +- .github/workflows/postgrest.yml | 2 +- .github/workflows/realtime_client.yml | 2 +- .github/workflows/storage_client.yml | 2 +- .github/workflows/supabase.yml | 2 +- .github/workflows/yet_another_json_isolate.yml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/functions_client.yml b/.github/workflows/functions_client.yml index a199d9e9..faf1aadb 100644 --- a/.github/workflows/functions_client.yml +++ b/.github/workflows/functions_client.yml @@ -44,7 +44,7 @@ jobs: run: | cd ../../ dart pub global activate melos - melos bootstrap --ignore="supabase_flutter" + melos bootstrap --no-flutter - name: dartfmt if: ${{ matrix.sdk == 'stable'}} diff --git a/.github/workflows/gotrue.yml b/.github/workflows/gotrue.yml index 2bb30ab4..c0a1e946 100644 --- a/.github/workflows/gotrue.yml +++ b/.github/workflows/gotrue.yml @@ -41,7 +41,7 @@ jobs: run: | cd ../../ dart pub global activate melos - melos bootstrap --ignore="supabase_flutter" + melos bootstrap --no-flutter - name: dartfmt if: ${{ matrix.sdk == 'stable'}} diff --git a/.github/workflows/postgrest.yml b/.github/workflows/postgrest.yml index a1f243b3..5aecc4f4 100644 --- a/.github/workflows/postgrest.yml +++ b/.github/workflows/postgrest.yml @@ -43,7 +43,7 @@ jobs: run: | cd ../../ dart pub global activate melos - melos bootstrap --ignore="supabase_flutter" + melos bootstrap --no-flutter - name: dartfmt if: ${{ matrix.sdk == 'stable'}} diff --git a/.github/workflows/realtime_client.yml b/.github/workflows/realtime_client.yml index 696196b6..29814540 100644 --- a/.github/workflows/realtime_client.yml +++ b/.github/workflows/realtime_client.yml @@ -41,7 +41,7 @@ jobs: run: | cd ../../ dart pub global activate melos - melos bootstrap --ignore="supabase_flutter" + melos bootstrap --no-flutter - name: dartfmt if: ${{ matrix.sdk == 'stable'}} diff --git a/.github/workflows/storage_client.yml b/.github/workflows/storage_client.yml index cbe98c4f..eb07d1c7 100644 --- a/.github/workflows/storage_client.yml +++ b/.github/workflows/storage_client.yml @@ -40,7 +40,7 @@ jobs: run: | cd ../../ dart pub global activate melos - melos bootstrap --ignore="supabase_flutter" + melos bootstrap --no-flutter - name: dartfmt if: ${{ matrix.sdk == 'stable'}} diff --git a/.github/workflows/supabase.yml b/.github/workflows/supabase.yml index 2a50c4c8..4667ae71 100644 --- a/.github/workflows/supabase.yml +++ b/.github/workflows/supabase.yml @@ -51,7 +51,7 @@ jobs: run: | cd ../../ dart pub global activate melos - melos bootstrap --ignore="supabase_flutter" + melos bootstrap --no-flutter - name: dartfmt if: ${{ matrix.sdk == 'stable'}} diff --git a/.github/workflows/yet_another_json_isolate.yml b/.github/workflows/yet_another_json_isolate.yml index a6ad7239..6dd7fe80 100644 --- a/.github/workflows/yet_another_json_isolate.yml +++ b/.github/workflows/yet_another_json_isolate.yml @@ -41,7 +41,7 @@ jobs: run: | cd ../../ dart pub global activate melos - melos bootstrap --ignore="supabase_flutter" + melos bootstrap --no-flutter - name: dartfmt if: ${{ matrix.sdk == 'stable'}} From 06d4eb5cf5a1b9fe22fac8bf3cff879452f6b5ca Mon Sep 17 00:00:00 2001 From: Vinzent Date: Fri, 26 Jul 2024 10:51:43 +0200 Subject: [PATCH 6/6] ci: run supabase_flutter ci on isolate package changes --- .github/workflows/supabase_flutter.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/supabase_flutter.yml b/.github/workflows/supabase_flutter.yml index 1aff30ea..f0cf1023 100644 --- a/.github/workflows/supabase_flutter.yml +++ b/.github/workflows/supabase_flutter.yml @@ -13,6 +13,7 @@ on: - 'packages/realtime_client/**' - 'packages/storage_client/**' - 'packages/supabase/**' + - 'packages/yet_another_json_isolate/**' pull_request: paths: @@ -24,6 +25,7 @@ on: - 'packages/realtime_client/**' - 'packages/storage_client/**' - 'packages/supabase/**' + - 'packages/yet_another_json_isolate/**' jobs: test: