Skip to content

Commit 2eb2ad7

Browse files
committed
chore(repo): update docs for contributors
1 parent 3a619c0 commit 2eb2ad7

File tree

3 files changed

+112
-11
lines changed

3 files changed

+112
-11
lines changed

CONTRIBUTING.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22

33
Thank you for your interest in contributing to the Supabase JavaScript client libraries! This guide will help you get started with contributing to the Supabase JS monorepo.
44

5-
> **📣 Coming from a separate repository?** The `supabase-js` repository has been converted into a monorepo and all other Supabase JS libraries have been absorbed into it. If you previously contributed to `auth-js`, `postgrest-js`, `realtime-js`, `storage-js`, or `functions-js`, please read our **[Migration Guide](docs/MIGRATION.md)** to understand the new structure, workflow changes, and command mappings.
5+
> **Repository Structure Changed:** This repository has been restructured as a monorepo. **All libraries, including `supabase-js`, are now under `packages/core/`**. If you previously contributed to `supabase-js`, `auth-js`, `postgrest-js`, `realtime-js`, `storage-js`, or `functions-js`, please read our **[Migration Guide](docs/MIGRATION.md)** to understand:
6+
>
7+
> - Where your code moved (everything is now in `packages/core/<library-name>/`)
8+
> - How commands changed (`npm test``npx nx test <library-name>`)
9+
> - New workflow with Nx
610
711
## 📋 Table of Contents
812

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,22 @@
66

77
_The Supabase JS monorepo containing all the Supabase JavaScript client libraries._
88

9-
> **📣 Coming from our old repositories?** The `supabase-js` repository has been converted into a monorepo and all other client libraries have been absorbed into it. If you previously contributed to individual repositories like `auth-js`, `postgrest-js`, `realtime-js`, `storage-js`, or `functions-js`, please see our **[Migration Guide](./docs/MIGRATION.md)** to learn about the new structure and workflows.
9+
> **IMPORTANT: Repository Structure Changed**
10+
>
11+
> This repository has been restructured as a monorepo. **All libraries, including `supabase-js` itself, have moved to `packages/core/`**:
12+
>
13+
> | What You're Looking For | Where It Is Now |
14+
> |------------------------|-----------------|
15+
> | Main supabase-js code | `packages/core/supabase-js/` |
16+
> | Auth library code | `packages/core/auth-js/` |
17+
> | Database library code | `packages/core/postgrest-js/` |
18+
> | Other libraries | `packages/core/*/` |
19+
>
20+
> **If you contributed to ANY of these repositories before**, please read our **[Migration Guide](./docs/MIGRATION.md)** to understand:
21+
>
22+
> - Where your code moved
23+
> - How commands changed (e.g., `npm test``npx nx test supabase-js`)
24+
> - How to update your development workflow
1025
1126
## 📦 Libraries
1227

docs/MIGRATION.md

Lines changed: 91 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,61 @@
1-
# Migration Guide: From Separate Repos to the Supabase JS Monorepo
1+
# Migration Guide: Transitioning to the Supabase JS Monorepo
22

3-
> 🚀 **Welcome to the Supabase JS monorepo!** This guide will help you transition from the old separate repository structure to our new Nx monorepo.
3+
> 🚀 **Welcome to the Supabase JS monorepo!** This repository has been completely restructured. Whether you contributed to `supabase-js`, `auth-js`, `postgrest-js`, or any other Supabase JS library, this guide will help you understand what changed and how to work with the new structure.
4+
5+
## 🎯 Who This Guide Is For
6+
7+
This guide is for:
8+
9+
- **Contributors to the old `supabase-js` repository** - Yes, even supabase-js moved!
10+
- **Contributors to separate libraries** (`auth-js`, `postgrest-js`, `realtime-js`, `storage-js`, `functions-js`)
11+
- **Anyone with open PRs** in any of the old repositories
12+
- **New contributors** who want to understand the architecture
13+
14+
## What Changed: The Big Picture
15+
16+
### The Repository URL Stayed the Same, But Everything Inside Changed
17+
18+
**Important:** The repository is still at `github.com/supabase/supabase-js`, but:
19+
20+
**OLD Structure** (what you remember):
21+
22+
```tree
23+
github.com/supabase/supabase-js/
24+
├── src/ ← supabase-js code was here
25+
├── test/
26+
├── package.json
27+
└── README.md
28+
29+
github.com/supabase/auth-js/ ← Separate repo
30+
github.com/supabase/postgrest-js/ ← Separate repo
31+
github.com/supabase/realtime-js/ ← Separate repo
32+
github.com/supabase/storage-js/ ← Separate repo
33+
github.com/supabase/functions-js/ ← Separate repo
34+
```
35+
36+
**NEW Structure** (what you'll see now):
37+
38+
```tree
39+
github.com/supabase/supabase-js/ ← Same URL, different structure!
40+
├── packages/
41+
│ └── core/
42+
│ ├── supabase-js/ ← YOUR supabase-js code is HERE now
43+
│ │ ├── src/
44+
│ │ ├── test/
45+
│ │ └── package.json
46+
│ ├── auth-js/ ← auth-js moved here
47+
│ ├── postgrest-js/ ← postgrest-js moved here
48+
│ ├── realtime-js/ ← realtime-js moved here
49+
│ ├── storage-js/ ← storage-js moved here
50+
│ └── functions-js/ ← functions-js moved here
51+
├── nx.json ← New: Nx workspace config
52+
├── package.json ← New: Root workspace config
53+
└── README.md
54+
```
55+
56+
### Key Point: EVERYTHING Moved
57+
58+
**All six libraries**, including `supabase-js` itself, now live under `packages/core/`. This is not a case where some libraries moved "into" supabase-js - rather, **all libraries were reorganized into a shared monorepo structure**.
459

560
## 📋 Table of Contents
661

@@ -285,6 +340,28 @@ npx nx run-many --target=docs --all
285340

286341
## FAQ
287342

343+
### Q: I contributed to the old supabase-js repo. Where did my code go?
344+
345+
**A:** The old `supabase-js` repository code is now in `packages/core/supabase-js/`. The repository URL (`github.com/supabase/supabase-js`) stayed the same, but the internal structure changed completely. What used to be in the root (`src/`, `test/`, etc.) is now nested under `packages/core/supabase-js/`.
346+
347+
Example mappings:
348+
349+
- **Old:** `src/SupabaseClient.ts`
350+
- **New:** `packages/core/supabase-js/src/SupabaseClient.ts`
351+
352+
This was necessary to accommodate all the other libraries in a unified structure.
353+
354+
### Q: Why does it say supabase-js "absorbed" other libraries if supabase-js also moved?
355+
356+
**A:** That's admittedly confusing wording! What actually happened:
357+
358+
- The `supabase-js` **repository URL** stayed the same (`github.com/supabase/supabase-js`)
359+
- But **all libraries** (including supabase-js itself) moved into a `packages/core/` structure
360+
- Other library repositories (`auth-js`, `postgrest-js`, etc.) were archived
361+
- So the repository "absorbed" them in the sense that it now contains all libraries, but supabase-js code itself also relocated
362+
363+
Think of it as: the **repository** absorbed other libraries, but the **supabase-js package code** also moved.
364+
288365
### Q: Why fixed versioning instead of independent versions?
289366

290367
**A:** Fixed versioning ensures all Supabase JS libraries are always compatible with each other. Users don't need to worry about compatibility matrices or which version of auth-js works with which version of supabase-js.
@@ -308,7 +385,12 @@ npx nx test auth-js --watch
308385

309386
### Q: How do I know which files to edit?
310387

311-
**A:** The structure within each package is the same as before. If you edited `src/GoTrueClient.ts` in the old auth-js repo, you'll now edit `packages/core/auth-js/src/GoTrueClient.ts`.
388+
**A:** The structure within each package is the same as before. Examples:
389+
390+
- **Old auth-js repo:** `src/GoTrueClient.ts`**New:** `packages/core/auth-js/src/GoTrueClient.ts`
391+
- **Old supabase-js repo:** `src/SupabaseClient.ts`**New:** `packages/core/supabase-js/src/SupabaseClient.ts`
392+
393+
The internal structure of each library is unchanged, just the top-level location changed.
312394

313395
### Q: Do I need to learn Nx?
314396

@@ -350,13 +432,13 @@ npm install @supabase/supabase-js
350432

351433
### Important Links
352434

353-
- **Supabase JS Monorepo**: https://github.com/supabase/supabase-js
435+
- **Supabase JS Monorepo**: <https://github.com/supabase/supabase-js>
354436
- **Old Repos** (archived/read-only):
355-
- https://github.com/supabase/auth-js
356-
- https://github.com/supabase/postgrest-js
357-
- https://github.com/supabase/realtime-js
358-
- https://github.com/supabase/storage-js
359-
- https://github.com/supabase/functions-js
437+
- <https://github.com/supabase/auth-js>
438+
- <https://github.com/supabase/postgrest-js>
439+
- <https://github.com/supabase/realtime-js>
440+
- <https://github.com/supabase/storage-js>
441+
- <https://github.com/supabase/functions-js>
360442

361443
---
362444

0 commit comments

Comments
 (0)