Skip to content

Commit 428a7ff

Browse files
authored
chore(repo): update docs and refs to main (#1578)
## 🔍 Description * Update docs and guides for contributors * `main` was referenced as the default branch. Change to `master`.
1 parent 70a4e84 commit 428a7ff

File tree

23 files changed

+305
-141
lines changed

23 files changed

+305
-141
lines changed

.cursorrules

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,11 @@ This monorepo contains 6 JavaScript/TypeScript libraries previously maintained a
3030

3131
### Testing
3232
- Test all: `nx run-many --target=test --all`
33-
- Test specific: `nx test auth-js`
34-
- Test affected: `nx affected --target=test`
33+
- Test specific: `nx test auth-js` (some packages may have special targets like `nx test:auth auth-js` or `nx test:storage storage-js`)
34+
- Test affected: `nx affected --target=test` (recommended for efficiency)
3535
- Integration tests: `nx run-many --target=test:integration --all`
36+
- Watch mode: `nx test <package> --watch`
37+
- Coverage: `nx test <package> --coverage`
3638

3739
### Code Quality
3840
- Lint all: `nx run-many --target=lint --all`
@@ -109,10 +111,12 @@ packages/core/[library-name]/
109111

110112
## Important Notes
111113

112-
- **Different Default Branches**: Original repos used either `master` or `main` - be aware when referencing history
114+
- **Current Default Branch**: `master` (confirmed current default branch)
115+
- **Original Branch Differences**: Original repos used either `master` or `main` - be aware when referencing history
113116
- **Package Names**: All packages maintain original npm names (@supabase/[package-name])
114117
- **Shared Code**: Extract common patterns (HTTP client, error handling) to shared packages when identified
115-
- **Docker Required**: Integration tests for auth-js and storage-js require Docker to be running
118+
- **Docker Required**: Integration tests for auth-js, functions-js, postgrest-js, and storage-js require Docker to be running
119+
- **Special Test Commands**: Some packages may use special test targets (check individual package READMEs)
116120

117121
## Release Process
118122

@@ -156,7 +160,10 @@ The `*` is replaced with actual version during release.
156160

157161
1. Always consider the monorepo structure - changes might affect multiple packages
158162
2. Use Nx commands rather than npm/yarn directly for workspace operations
159-
3. Suggest running affected tests, not all tests, for better performance
160-
4. Remember that all packages version together in fixed mode
161-
5. Consider Docker requirements for integration tests
162-
6. Maintain backward compatibility at all costs
163+
3. Suggest running affected tests (`nx affected --target=test`), not all tests, for better performance
164+
4. Remember that all packages version together in fixed mode - no independent versioning
165+
5. Consider Docker requirements for integration tests (auth-js, functions-js, postgrest-js, storage-js)
166+
6. Maintain backward compatibility at all costs - breaking changes require special process
167+
7. Check for special test commands in package READMEs (some may use `test:auth`, `test:storage`, etc.)
168+
8. Always suggest conventional commit format with proper scope
169+
9. Prefer `nx affected` commands over `nx run-many` for efficiency

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ body:
9191
options:
9292
- label: Follow our [Code of Conduct](https://github.com/supabase/.github/blob/main/CODE_OF_CONDUCT.md)
9393
required: true
94-
- label: Read the [Contributing Guidelines](https://github.com/supabase/supabase-js/blob/main/CONTRIBUTING.md).
94+
- label: Read the [Contributing Guidelines](https://github.com/supabase/supabase-js/blob/master/CONTRIBUTING.md).
9595
required: true
9696
- label: Read the [docs](https://supabase.com/docs/reference/javascript/introduction).
9797
required: true

.github/ISSUE_TEMPLATE/feature_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ body:
4040
options:
4141
- label: Follow our [Code of Conduct](https://github.com/supabase/.github/blob/main/CODE_OF_CONDUCT.md)
4242
required: true
43-
- label: Read the [Contributing Guidelines](https://github.com/supabase/supabase-js/blob/main/CONTRIBUTING.md).
43+
- label: Read the [Contributing Guidelines](https://github.com/supabase/supabase-js/blob/master/CONTRIBUTING.md).
4444
required: true
4545
- label: Read the [docs](https://supabase.com/docs/reference/javascript/introduction).
4646
required: true

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Closes #(issue_number) <!-- If applicable -->
2929

3030
<!-- Ensure all items are checked before submitting -->
3131

32-
- [ ] I have read the [Contributing Guidelines](https://github.com/supabase/supabase-js/blob/main/CONTRIBUTING.md)
32+
- [ ] I have read the [Contributing Guidelines](https://github.com/supabase/supabase-js/blob/master/CONTRIBUTING.md)
3333
- [ ] My PR title follows the [conventional commit format](https://www.conventionalcommits.org/): `<type>(<scope>): <description>`
3434
- [ ] I have run `npx nx format` to ensure consistent code formatting
3535
- [ ] I have added tests for new functionality (if applicable)

.github/workflows/main-ci-release.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,17 @@ jobs:
3434
contents: read
3535

3636
# ==========================================
37-
# CANARY RELEASE (only on main, after all CI passes)
37+
# CANARY RELEASE (only on master, after all CI passes)
3838
# ==========================================
3939

4040
release-canary:
4141
name: Release Canary
4242
runs-on: ubuntu-latest
4343
needs: [ci-core, ci-supabase-js, ci-auth-js-node18]
44-
# Only run on main branch pushes, and only if all CI jobs succeeded
44+
# Only run on master branch pushes, and only if all CI jobs succeeded
4545
if: |
46-
github.ref == 'refs/heads/main' &&
47-
github.event_name == 'push'
48-
&&
46+
github.ref == 'refs/heads/master' &&
47+
github.event_name == 'push' &&
4948
needs.ci-core.result == 'success' &&
5049
needs.ci-supabase-js.result == 'success' &&
5150
needs.ci-auth-js-node18.result == 'success'

CLAUDE.md

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,14 @@ Every change must maintain full backward compatibility. The migration itself int
5757

5858
Uses automated canary releases with batched stable releases:
5959

60-
- **Canary**: Every commit to main → prerelease (e.g., `2.80.1-canary.0`) with `canary` dist-tag
60+
- **Canary**: Every commit to master → prerelease (e.g., `2.80.1-canary.0`) with `canary` dist-tag
6161
- **Stable**: Manual promotion of validated canary to `latest` dist-tag
6262
- **Fixed Versioning**: All packages share identical version numbers (e.g., all at 2.80.0)
6363
- **Version Line**: Continuing with v2.x.x to maintain ecosystem stability
6464

6565
**Three Release Workflows:**
6666

67-
1. **Canary** (`.github/workflows/main-ci-release.yml`) - Automated on every main commit
67+
1. **Canary** (`.github/workflows/main-ci-release.yml`) - Automated on every master commit
6868
2. **Stable** (`.github/workflows/release-stable.yml`) - Manual by repository owners
6969
3. **Preview** (`.github/workflows/preview-release.yml`) - PR-based testing via pkg.pr.new
7070

@@ -129,7 +129,7 @@ nx test auth-js # Test specific package
129129
nx test postgrest-js # Test specific package
130130
nx test functions-js # Test specific package
131131
nx test realtime-js # Test specific package
132-
nx test storage-js # Test specific package
132+
nx test storage-js # Test specific package (may use special test:storage target)
133133
nx test supabase-js # Test specific package
134134
nx affected --target=test # Test only affected (recommended)
135135
nx test auth-js --watch # Watch mode
@@ -138,14 +138,14 @@ nx test supabase-js --coverage # Test with coverage
138138

139139
**Docker Requirements:**
140140

141-
| Package | Docker Required | Infrastructure |
142-
| ------------ | --------------- | ------------------------------- |
143-
| auth-js | ✅ Yes | GoTrue + PostgreSQL |
144-
| functions-js | ✅ Yes | Deno relay (testcontainers) |
145-
| postgrest-js | ✅ Yes | PostgREST + PostgreSQL |
146-
| storage-js | ✅ Yes | Storage API + PostgreSQL + Kong |
147-
| realtime-js | ❌ No | Mock WebSockets |
148-
| supabase-js | ❌ No | Unit tests only |
141+
| Package | Docker Required | Infrastructure | Special Commands |
142+
| ------------ | --------------- | ------------------------------- | ---------------- |
143+
| auth-js | ✅ Yes | Auth Server + Postgres | May use `nx test:auth auth-js` |
144+
| functions-js | ✅ Yes | Deno relay (testcontainers) | Standard `nx test functions-js` |
145+
| postgrest-js | ✅ Yes | PostgREST + PostgreSQL | Standard `nx test postgrest-js` |
146+
| storage-js | ✅ Yes | Storage API + PostgreSQL + Kong | May use `nx test:storage storage-js` |
147+
| realtime-js | ❌ No | Mock WebSockets | Standard `nx test realtime-js` |
148+
| supabase-js | ❌ No | Unit tests only | Standard `nx test supabase-js` |
149149

150150
> **📖 See [TESTING.md](docs/TESTING.md) for complete testing guide and troubleshooting**
151151
@@ -262,36 +262,31 @@ Tests run against multiple environments:
262262
- Requires Docker for integration tests (GoTrue + PostgreSQL)
263263
- Complex session management logic
264264
- Security-critical - extra review care needed
265-
- Default branch: **master**
266265
- See [auth-js README](packages/core/auth-js/README.md) for details
267266

268267
### realtime-js
269268

270269
- WebSocket-based, timing-sensitive
271270
- Mock time in tests when possible
272271
- No Docker required (uses mock WebSockets)
273-
- Default branch: **master**
274272
- See [realtime-js README](packages/core/realtime-js/README.md) for details
275273

276274
### storage-js
277275

278276
- Requires Docker for integration tests (Storage API + PostgreSQL + Kong)
279277
- File handling varies by platform
280-
- Default branch: **main**
281278
- See [storage-js README](packages/core/storage-js/README.md) for details
282279

283280
### postgrest-js
284281

285282
- Pure HTTP client, easiest to test
286283
- Requires Docker for integration tests (PostgREST + PostgreSQL)
287-
- Default branch: **master**
288284
- See [postgrest-js README](packages/core/postgrest-js/README.md) for details
289285

290286
### functions-js
291287

292288
- Simplest library, minimal dependencies
293289
- Uses testcontainers for Deno relay
294-
- Default branch: **main**
295290
- See [functions-js README](packages/core/functions-js/README.md) for details
296291

297292
## Code Style Guidelines
@@ -316,10 +311,13 @@ Tests run against multiple environments:
316311

317312
## Important Context
318313

319-
### Branch Differences
314+
### Branch Information
320315

321-
Original repositories use different default branches:
316+
**Current Repository:**
317+
- **Default branch**: `master` (confirmed current default)
318+
- **Repository URL**: `github.com/supabase/supabase-js`
322319

320+
**Original Repository Branches** (for historical reference):
323321
- **master**: auth-js, postgrest-js, realtime-js, supabase-js
324322
- **main**: functions-js, storage-js
325323

@@ -487,10 +485,10 @@ cat docs/TESTING.md
487485
1. **Ensure branch is up to date:**
488486

489487
```bash
490-
git checkout main
491-
git pull upstream main
488+
git checkout master
489+
git pull upstream master
492490
git checkout your-feature-branch
493-
git rebase main
491+
git rebase master
494492
```
495493

496494
2. **Run all necessary checks:**
@@ -643,7 +641,7 @@ nx test auth-js --testFile=GoTrueClient.test.ts
643641
**Canary Releases (Automated)**:
644642

645643
```bash
646-
# Triggered automatically on every commit to main
644+
# Triggered automatically on every commit to master
647645
git commit -m "fix(auth): resolve token issue"
648646
# → Automatic CI: nx release --tag=canary --yes
649647
# → Published: 2.80.1-canary.0 to 'canary' dist-tag
@@ -741,14 +739,16 @@ _No user-facing changes in this release._
741739

742740
## When Providing Code Suggestions
743741

744-
1. **Consider Monorepo Impact**: Changes might affect multiple packages - always check
745-
2. **Use Nx Commands**: Prefer `nx` over direct `npm` for workspace operations
746-
3. **Suggest Affected Testing**: `nx affected --target=test` over full test suite
747-
4. **Respect Fixed Versioning**: All packages version together
748-
5. **Maintain Compatibility**: Never introduce breaking changes
749-
6. **Extract Shared Code**: Identify patterns that could be shared
750-
7. **Follow Conventions**: Use existing patterns and structures
751-
8. **Document Changes**: Update JSDoc and READMEs when changing APIs
742+
1. **Consider Monorepo Impact**: Changes might affect multiple packages - always check dependencies
743+
2. **Use Nx Commands**: Always prefer `nx` over direct `npm` for workspace operations
744+
3. **Suggest Affected Testing**: Use `nx affected --target=test` over full test suite for efficiency
745+
4. **Respect Fixed Versioning**: All packages version together - no independent versioning
746+
5. **Maintain Compatibility**: Never introduce breaking changes without proper process
747+
6. **Check Testing Requirements**: Be aware of Docker requirements for integration tests
748+
7. **Extract Shared Code**: Identify patterns that could be shared across packages
749+
8. **Follow Conventions**: Use existing patterns and structures within each library
750+
9. **Document Changes**: Update JSDoc and READMEs when changing public APIs
751+
10. **Use Conventional Commits**: Always suggest proper commit format with scope
752752

753753
## Quick Decision Tree
754754

CONTRIBUTING.md

Lines changed: 11 additions & 7 deletions
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

@@ -56,7 +60,7 @@ Thank you for your interest in contributing to the Supabase JavaScript client li
5660

5761
### Making Changes
5862

59-
1. **Create a new branch** from `main`:
63+
1. **Create a new branch** from `master`:
6064

6165
```bash
6266
git checkout -b feature/your-feature-name
@@ -186,13 +190,13 @@ ci(release): add preview package generation
186190

187191
### Before Submitting
188192

189-
1. **Ensure your branch is up to date** with `main`:
193+
1. **Ensure your branch is up to date** with `master`:
190194

191195
```bash
192-
git checkout main
193-
git pull upstream main
196+
git checkout master
197+
git pull upstream master
194198
git checkout your-branch
195-
git rebase main
199+
git rebase master
196200
```
197201

198202
2. **Run the full test suite**:
@@ -283,7 +287,7 @@ npx nx test <package> --coverage
283287
We automatically generate TypeScript API documentation that is used by the main [Supabase documentation site](https://supabase.com/docs). The process works as follows:
284288

285289
1. **TypeDoc generates JSON specifications** from TypeScript source code
286-
2. **GitHub Actions publishes** these specs to GitHub Pages on every push to `main`
290+
2. **GitHub Actions publishes** these specs to GitHub Pages on every push to `master`
287291
3. **Main Supabase repository** uses these JSON files to generate the official API docs via `make` commands
288292

289293
#### Available Documentation Commands

README.md

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,38 @@
1-
# Supabase JS Client Libraries
1+
<br />
2+
<p align="center">
3+
<a href="https://supabase.io">
4+
<picture>
5+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/supabase/supabase/master/packages/common/assets/images/supabase-logo-wordmark--dark.svg">
6+
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/supabase/supabase/master/packages/common/assets/images/supabase-logo-wordmark--light.svg">
7+
<img alt="Supabase Logo" width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/packages/common/assets/images/logo-preview.jpg">
8+
</picture>
9+
</a>
10+
11+
<h1 align="center">Supabase JS Client Libraries</h1>
12+
13+
<p align="center">
14+
<a href="https://supabase.com/docs/guides/getting-started">Guides</a>
15+
·
16+
<a href="https://supabase.com/docs/reference/javascript/introduction">Reference Docs</a>
17+
</p>
18+
</p>
219

3-
_The Supabase JS monorepo containing all the Supabase JavaScript client libraries._
20+
<div align="center">
21+
22+
[![pkg.pr.new](https://pkg.pr.new/badge/supabase/supabase-js)](https://pkg.pr.new/~/supabase/supabase-js)
423

5-
> **📣 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.
24+
</div>
25+
26+
> **For contributors: Repository Structure Changed**
27+
>
28+
> This repository has been restructured as a monorepo. All libraries, including `supabase-js` itself, have moved to `packages/core/`:
29+
>
30+
> | What You're Looking For | Where It Is Now |
31+
> | ----------------------- | ---------------------------- |
32+
> | Main supabase-js code | `packages/core/supabase-js/` |
33+
> | Other libraries | `packages/core/*/` |
34+
>
35+
> Read the **[Migration Guide](./docs/MIGRATION.md)** to learn more.
636
737
## 📦 Libraries
838

@@ -17,6 +47,15 @@ This monorepo contains the complete suite of Supabase JavaScript client librarie
1747
| **[@supabase/storage-js](./packages/core/storage-js)** | File storage client |
1848
| **[@supabase/functions-js](./packages/core/functions-js)** | Edge Functions client |
1949

50+
> **💡 Note for Package Users:** If you install and use these packages, **nothing has changed**. Continue installing packages normally:
51+
>
52+
> ```bash
53+
> npm install @supabase/supabase-js
54+
> npm install @supabase/auth-js
55+
> ```
56+
>
57+
> The monorepo structure **only affects contributors**. This is how we develop and maintain the code, not how you use it.
58+
2059
## 🚀 Quick Start
2160
2261
### Installation

0 commit comments

Comments
 (0)