Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 0 additions & 53 deletions .github/workflows/ci-auth-js-node18.yml

This file was deleted.

13 changes: 2 additions & 11 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,22 +220,14 @@ jobs:
actions: read
contents: read

ci-auth-js-node18:
if: ${{ github.event_name == 'push' }}
name: Auth-JS Node.js 18 Compatibility
uses: ./.github/workflows/ci-auth-js-node18.yml
permissions:
actions: read
contents: read

# ==========================================
# CANARY RELEASE (only on master, after all CI passes)
# ==========================================

release-canary:
name: Release Canary
runs-on: ubuntu-latest
needs: [ci-core, ci-supabase-js, ci-auth-js-node18]
needs: [ci-core, ci-supabase-js]
permissions:
contents: read
id-token: write
Expand All @@ -244,8 +236,7 @@ jobs:
github.ref == 'refs/heads/master' &&
github.event_name == 'push' &&
needs.ci-core.result == 'success' &&
needs.ci-supabase-js.result == 'success' &&
needs.ci-auth-js-node18.result == 'success'
needs.ci-supabase-js.result == 'success'
steps:
- name: Generate token
id: app-token
Expand Down
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,26 @@

This monorepo contains the complete suite of Supabase JavaScript SDK:

| Library | Description |
| ---------------------------------------------------------- | ---------------------------------------- |
| Library | Description |
| ---------------------------------------------------------- | ------------------------------------- |
| **[@supabase/supabase-js](./packages/core/supabase-js)** | Main isomorphic SDK for Supabase |
| **[@supabase/auth-js](./packages/core/auth-js)** | Authentication SDK |
| **[@supabase/postgrest-js](./packages/core/postgrest-js)** | PostgREST SDK for database operations |
| **[@supabase/realtime-js](./packages/core/realtime-js)** | Real-time subscriptions SDK |
| **[@supabase/storage-js](./packages/core/storage-js)** | File storage SDK |
| **[@supabase/functions-js](./packages/core/functions-js)** | Edge Functions SDK |

## Requirements

- **Node.js 20 or later** (Node.js 18 support was dropped as of October 31, 2025)
- For browser support, all modern browsers are supported

> ⚠️ **Node.js 18 Deprecation Notice**
>
> Node.js 18 reached end-of-life on April 30, 2025. As announced in [our deprecation notice](https://github.com/orgs/supabase/discussions/37217), support for Node.js 18 was dropped on October 31, 2025.
>
> If you must use Node.js 18, please use version `2.x.x` of these libraries where `x` is the last version that supported Node.js 18.

> **💡 Note for Package Users:** If you install and use these packages, **nothing has changed**. Continue installing packages normally:
>
> ```bash
Expand Down
8 changes: 0 additions & 8 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

85 changes: 85 additions & 0 deletions docs/MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,91 @@

> **📦 Note for Package Users:** If you install and use these packages via npm, **nothing changed**. This guide is for contributors who develop and maintain these libraries.

---

## 🔴 Node.js 18 Support Dropped

**Effective Date:** October 31, 2025

### What Changed

Starting with version `2.XX.0` (where XX is the version where this change is released), all Supabase JavaScript libraries require **Node.js 20 or later**. The `@supabase/node-fetch` polyfill has been removed, and native fetch support is now required.

### Why?

Node.js 18 reached end-of-life on April 30, 2025, and no longer receives security updates or critical fixes. Node.js 20+ includes native fetch support, eliminating the need for polyfills and reducing bundle size.

### Affected Libraries

- `@supabase/supabase-js`
- `@supabase/auth-js`
- `@supabase/postgrest-js`
- `@supabase/realtime-js`
- `@supabase/storage-js`
- `@supabase/functions-js`

### Migration Guide

**1. Upgrade Node.js** to version 20 or later:

```bash
# Check your current version
node --version

# If < 20.0.0, upgrade Node.js
# Via nvm (recommended):
nvm install 20
nvm use 20

# Or download from https://nodejs.org/
```

**2. Update your package.json** to use the latest version:

```bash
npm install @supabase/supabase-js@latest
# Or for individual packages:
npm install @supabase/auth-js@latest
```

**3. No code changes required** - The APIs remain unchanged. Your existing code will work as-is once you upgrade Node.js.

### Supported Environments

✅ **Node.js 20+** - Native fetch support
✅ **Modern browsers** - Chrome 42+, Firefox 39+, Safari 10.1+, Edge 14+
✅ **Deno 1.0+** - Native fetch built-in
✅ **Bun 0.1+** - Native fetch built-in
✅ **React Native** - With fetch polyfill provided by the framework
✅ **Expo** - With fetch polyfill provided by the framework

### Troubleshooting

**Error: `fetch is not defined`**

This means you're running Node.js < 20. Solutions:

1. Upgrade to Node.js 20+ (recommended)
2. If you absolutely cannot upgrade, use an older version of the libraries (see below)

**Using Node.js 18 (Not Recommended)**

If you must use Node.js 18, install the last version that supported it:

```bash
# Find the last version that supported Node.js 18
# (This will be version 2.XX.X where XX is one less than the version with this change)
npm install @supabase/supabase-js@2.XX.X
```

⚠️ **Warning:** Using Node.js 18 is not recommended as it no longer receives security updates.

### Discussion

For more details, see the [deprecation announcement](https://github.com/orgs/supabase/discussions/37217).

---

## 🎯 Who This Guide Is For

**This guide is for contributors**, including:
Expand Down
1 change: 1 addition & 0 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
},
"test:unit": {
"inputs": ["testing", "^production"],
"dependsOn": ["build"],
"cache": true,
"outputs": ["{projectRoot}/coverage"]
},
Expand Down
Loading