For contributors: Repository Structure Changed
This repository has been restructured as a monorepo. All libraries, including
supabase-js
itself, have moved topackages/core/
:
What You're Looking For Where It Is Now Main supabase-js code packages/core/supabase-js/
Other libraries packages/core/*/
Read the Migration Guide to learn more.
This monorepo contains the complete suite of Supabase JavaScript SDK:
Library | Description |
---|---|
@supabase/supabase-js | Main isomorphic sdk for Supabase |
@supabase/auth-js | Authentication sdk |
@supabase/postgrest-js | PostgREST sdk for database operations |
@supabase/realtime-js | Real-time subscriptions sdk |
@supabase/storage-js | File storage sdk |
@supabase/functions-js | Edge Functions sdk |
๐ก Note for Package Users: If you install and use these packages, nothing has changed. Continue installing packages normally:
npm install @supabase/supabase-js npm install @supabase/auth-js
The monorepo structure only affects contributors. This is how we develop and maintain the code, not how you use it.
# Clone the repository
git clone https://github.com/supabase/supabase-js.git
cd supabase-js
# Install dependencies
npm install
# Build all packages
npx nx run-many --target=build --all
# Build a specific library
npx nx build auth-js
# Test a specific library
npx nx test postgrest-js
# Build affected projects (only build what changed)
npx nx affected --target=build
# Generate dependency graph
npx nx graph
# Format all code
npx nx format
# Check code formatting
npx nx format:check
Each library can be developed independently:
# Start development with watch mode
npx nx build auth-js --watch
npx nx test auth-js --watch
We welcome contributions! Please see our Contributing Guide for details.
git checkout -b feature/amazing-feature
)npx nx affected --target=test
)npm run commit
)git push origin feature/amazing-feature
)npx nx format
before committingnpx nx affected --target=test
Testing varies per package. See the top-level TESTING.md for an overview and links to package-specific guides.
Quick examples:
# Run tests for a specific package
npx nx test <package-name>
# Run tests with coverage
npx nx test <package-name> --coverage
You can verify registry signatures and provenance attestations for installed packages using the npm CLI:
npm audit signatures
Quick example for a single package install:
npm install @supabase/auth-js
npm audit signatures
Example output:
audited 1 package in 0s
1 package has a verified registry signature
Because provenance attestations are a new capability, security features may evolve over time. Ensure you are using the latest npm CLI to verify attestation signatures reliably. This may require updating npm beyond the version bundled with Node.js.
supabase-js/
โโโ packages/
โ โโโ core/ # Published libraries
โ โโโ auth-js/ # Authentication sdk
โ โโโ functions-js/ # Edge Functions sdk
โ โโโ postgrest-js/ # PostgREST database sdk
โ โโโ realtime-js/ # Real-time subscriptions sdk
โ โโโ storage-js/ # File storage sdk
โ โโโ supabase-js/ # Main isomorphic sdk
โโโ nx.json # npx nx workspace configuration
โโโ package.json # Root package.json and workspaces setup
โโโ ...
This project is licensed under the MIT License - see the LICENSE file for details.
Website โข Documentation โข Community โข Twitter