Skip to content

Commit 77d1df1

Browse files
committed
chore(repo): update docs
1 parent 2eb2ad7 commit 77d1df1

File tree

5 files changed

+145
-110
lines changed

5 files changed

+145
-110
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

CLAUDE.md

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -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 | GoTrue + PostgreSQL | 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
@@ -311,10 +311,13 @@ Tests run against multiple environments:
311311

312312
## Important Context
313313

314-
### Branch Differences
314+
### Branch Information
315315

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

320+
**Original Repository Branches** (for historical reference):
318321
- **master**: auth-js, postgrest-js, realtime-js, supabase-js
319322
- **main**: functions-js, storage-js
320323

@@ -736,14 +739,16 @@ _No user-facing changes in this release._
736739

737740
## When Providing Code Suggestions
738741

739-
1. **Consider Monorepo Impact**: Changes might affect multiple packages - always check
740-
2. **Use Nx Commands**: Prefer `nx` over direct `npm` for workspace operations
741-
3. **Suggest Affected Testing**: `nx affected --target=test` over full test suite
742-
4. **Respect Fixed Versioning**: All packages version together
743-
5. **Maintain Compatibility**: Never introduce breaking changes
744-
6. **Extract Shared Code**: Identify patterns that could be shared
745-
7. **Follow Conventions**: Use existing patterns and structures
746-
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
747752

748753
## Quick Decision Tree
749754

README.md

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,17 @@
11
# Supabase JS Client Libraries
22

3-
<div align="center">
4-
[![pkg.pr.new](https://pkg.pr.new/badge/supabase/supabase-js)](https://pkg.pr.new/badge/supabase/supabase-js)
5-
</div>
6-
73
_The Supabase JS monorepo containing all the Supabase JavaScript client libraries._
84

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/`**:
5+
> **For contributors: Repository Structure Changed**
126
>
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/*/` |
7+
> This repository has been restructured as a monorepo. All libraries, including `supabase-js` itself, have moved to `packages/core/`:
198
>
20-
> **If you contributed to ANY of these repositories before**, please read our **[Migration Guide](./docs/MIGRATION.md)** to understand:
9+
> | What You're Looking For | Where It Is Now |
10+
> | ----------------------- | ---------------------------- |
11+
> | Main supabase-js code | `packages/core/supabase-js/` |
12+
> | Other libraries | `packages/core/*/` |
2113
>
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
14+
> Read the **[Migration Guide](./docs/MIGRATION.md)** to learn more.
2515
2616
## 📦 Libraries
2717

@@ -36,6 +26,15 @@ This monorepo contains the complete suite of Supabase JavaScript client librarie
3626
| **[@supabase/storage-js](./packages/core/storage-js)** | File storage client |
3727
| **[@supabase/functions-js](./packages/core/functions-js)** | Edge Functions client |
3828

29+
> **💡 Note for Package Users:** If you install and use these packages, **nothing has changed**. Continue installing packages normally:
30+
>
31+
> ```bash
32+
> npm install @supabase/supabase-js
33+
> npm install @supabase/auth-js
34+
> ```
35+
>
36+
> The monorepo structure **only affects contributors**. This is how we develop and maintain the code, not how you use it.
37+
3938
## 🚀 Quick Start
4039
4140
### Installation

WARP.md

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ This monorepo replaces the following individual repositories:
2727

2828
### Important Notes
2929

30-
- **Default Branches**: Original repos use different default branches (master vs main). Check each library's original repo for reference.
30+
- **Current Default Branch**: `master` (confirmed current default branch)
31+
- **Original Branch Differences**: Original repos used different default branches (master vs main). Check each library's original repo for reference.
3132
- **Package Names**: All packages maintain their original npm names (@supabase/[package-name])
3233
- **Zero Breaking Changes**: This migration maintains full backward compatibility for consumers
3334
- **Shared Code**: Common patterns (HTTP client, error handling) should be extracted to shared packages when identified
@@ -95,11 +96,11 @@ nx affected --target=build
9596
nx run-many --target=test --all
9697

9798
# Run tests for a specific library
98-
nx test auth-js
99+
nx test auth-js # May also use: nx test:auth auth-js
99100
nx test postgrest-js
100101
nx test functions-js
101102
nx test realtime-js
102-
nx test storage-js
103+
nx test storage-js # May also use: nx test:storage storage-js
103104
nx test supabase-js
104105

105106
# Run only affected tests (recommended during development)
@@ -114,14 +115,14 @@ nx test auth-js --coverage
114115

115116
**Docker Requirements for Integration Tests:**
116117

117-
| Package | Docker Required | Notes |
118-
| ------------ | --------------- | ------------------------------- |
119-
| auth-js | ✅ Yes | Requires GoTrue + PostgreSQL |
120-
| functions-js | ✅ Yes | Uses testcontainers for Deno |
121-
| postgrest-js | ✅ Yes | Requires PostgREST + PostgreSQL |
122-
| storage-js | ✅ Yes | Requires Storage API + Kong |
123-
| realtime-js | ❌ No | Uses mock WebSockets |
124-
| supabase-js | ❌ No | Unit tests only |
118+
| Package | Docker Required | Notes | Special Commands |
119+
| ------------ | --------------- | ------------------------------- | ---------------- |
120+
| auth-js | ✅ Yes | Requires GoTrue + PostgreSQL | May use `nx test:auth auth-js` |
121+
| functions-js | ✅ Yes | Uses testcontainers for Deno | Standard `nx test functions-js` |
122+
| postgrest-js | ✅ Yes | Requires PostgREST + PostgreSQL | Standard `nx test postgrest-js` |
123+
| storage-js | ✅ Yes | Requires Storage API + Kong | May use `nx test:storage storage-js` |
124+
| realtime-js | ❌ No | Uses mock WebSockets | Standard `nx test realtime-js` |
125+
| supabase-js | ❌ No | Unit tests only | Standard `nx test supabase-js` |
125126

126127
### Code Quality
127128

@@ -554,8 +555,10 @@ packages/core/[library]/
554555
- **Run affected commands** to save time (`nx affected --target=test`)
555556
- **Use interactive commit tool** (`npm run commit`)
556557
- **Format code** before committing (`nx format`)
557-
- **Read package READMEs** for library-specific details
558+
- **Read package READMEs** for library-specific details and special test commands
558559
- **Check documentation** in `docs/` for comprehensive guides
560+
- **Check for Docker requirements** before running integration tests
561+
- **Use conventional commit format** with proper scope
559562

560563
### Don'ts ❌
561564

@@ -564,6 +567,7 @@ packages/core/[library]/
564567
- **Don't hardcode internal versions** (use `*` protocol)
565568
- **Don't test everything** when only some packages changed (use `nx affected`)
566569
- **Don't make breaking changes** without discussion and proper commit format
570+
- **Don't assume all packages use standard test commands** (check for special targets)
567571

568572
## Troubleshooting
569573

0 commit comments

Comments
 (0)