Skip to content

refactor: migrate Supabase.Storage into the monorepo under packages/Storage - #305

Merged
Tr00d merged 1 commit into
masterfrom
refactor/migrate-storage-to-monorepo
Aug 7, 2026
Merged

Tr00d merged 1 commit into
masterfrom
refactor/migrate-storage-to-monorepo

Conversation

@Tr00d

@Tr00d Tr00d commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Monorepo migration — PR 4 (Supabase.Storage)

Moves Supabase.Storage into packages/Storage/, converts its Supabase.Core dependency to a ProjectReference, and folds Storage's E2E fixtures into the shared stack. No production API, namespace, or NuGet-id changes.

What changed

  • Code moved from storage-csharp into packages/Storage/ (Storage/ + Storage.Tests/).
  • Dependency converted: PackageReference Supabase.Core 1.2.0 → ProjectReference ..\..\Core\Core\Core.csproj.
  • Test project renamed StorageTests → Storage.Tests (folder, assembly name, root namespace, namespaces); [assembly: InternalsVisibleTo] in Helpers.cs updated to match.
  • Legacy infra dropped: StorageTests/db/ (duplicated schema SQL) and the prepare-infra.sh server-clone path are not carried over — the E2E tests target the local supabase start storage API (:54321/storage/v1), which is exactly what Storage CI already uses (its prepare-infra step is commented out).
  • E2E fixtures folded in: new supabase/migrations/1751173700_storage_dummy_data.sql seeds only the storage buckets, objects, and RLS policies, reusing the inian+*@supabase.io owners already seeded by 1751173629_dummy_data.sql (so no duplicate auth.users insert) and the storage schema the local stack provides. No config.toml change needed.
  • Per-package README.md + icon.png kept; root .editorconfig/LICENSE reused. Both projects registered in Supabase.sln.

Verification (local stack up, after supabase db reset)

  • dotnet build → 0 errors (116 pre-existing CS1591 doc-comment warnings from Storage's GenerateDocumentationFile, unchanged from source).
  • Storage.Tests (Unit + Contract + E2E) → 156/156 passing; 5 buckets seeded.
  • Regression: Gotrue 137/137, Functions 44/44, umbrella non-E2E 33/33.

Deferred (unchanged)

  • Root scaffolding, .gitmodules cleanup, CI/release plumbing. Umbrella still consumes Supabase.Storage/Supabase.Core via NuGet until the umbrella PR.

…torage

Move the Supabase.Storage package from the standalone storage-csharp repo into
packages/Storage, and convert its Supabase.Core dependency from a NuGet
PackageReference to a ProjectReference on the in-repo Core.

Rename the test project StorageTests -> Storage.Tests (folder, assembly name,
root namespace, namespaces) and update the InternalsVisibleTo in Helpers.cs to
match. Drop the legacy StorageTests/db and prepare-infra.sh path (the E2E tests
target the local `supabase start` storage API, which CI already uses). Keep the
per-package README and icon; rely on the single root .editorconfig and LICENSE.
Register both projects in Supabase.sln.

Fold Storage's E2E fixtures into a new supabase/ seed migration
(1751173700_storage_dummy_data.sql): the buckets, objects and RLS policies
only, reusing the inian+*@supabase.io owners already seeded by
1751173629_dummy_data.sql and the storage schema the local stack provides.
@Tr00d
Tr00d marked this pull request as ready for review August 7, 2026 08:38
@Tr00d
Tr00d merged commit f65c821 into master Aug 7, 2026
1 check passed
@Tr00d
Tr00d deleted the refactor/migrate-storage-to-monorepo branch August 7, 2026 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant