Skip to content

Commit af085d9

Browse files
committed
feat: deprecation notice in readme and index.ts
1 parent ea7be18 commit af085d9

File tree

4 files changed

+68
-11
lines changed

4 files changed

+68
-11
lines changed

README.md

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,28 @@
11
# Supabase clients for use in SSR frameworks
2+
>
3+
> **Package Consolidation Notice**: This package replaces the deprecated `@supabase/auth-helpers-*` packages. All framework-specific auth-helpers packages have been consolidated into `@supabase/ssr` for better maintenance and consistency.
24
3-
This package is useful for using the [Supabase JavaScript library](https://supabase.com/docs/reference/javascript/introduction) in
4-
server-side rendering frameworks.
5+
## Overview
56

6-
It provides a framework-agnostic way of creating a Supabase client.
7+
This package provides a framework-agnostic way to use the [Supabase JavaScript library](https://supabase.com/docs/reference/javascript/introduction) in server-side rendering (SSR) frameworks.
8+
9+
## Installation
10+
11+
```bash
12+
npm install @supabase/ssr @supabase/supabase-js
13+
```
14+
15+
## Deprecated Packages
16+
17+
The following packages have been deprecated and consolidated into `@supabase/ssr`:
18+
19+
- `@supabase/auth-helpers-nextjs` → Use `@supabase/ssr`
20+
- `@supabase/auth-helpers-react` → Use `@supabase/ssr`
21+
- `@supabase/auth-helpers-remix` → Use `@supabase/ssr`
22+
- `@supabase/auth-helpers-sveltekit` → Use `@supabase/ssr`
23+
24+
If you're currently using any of these packages, please update your dependencies to use `@supabase/ssr` directly.
25+
26+
## Documentation
727

828
Please refer to the [official server-side rendering guides](https://supabase.com/docs/guides/auth/server-side) for the latest best practices on using this package in your SSR framework of choice.

package-lock.json

Lines changed: 11 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"devDependencies": {
3535
"@eslint/js": "^9.3.0",
3636
"@supabase/supabase-js": "^2.43.4",
37+
"@types/node": "^24.3.0",
3738
"@vitest/coverage-v8": "^1.6.0",
3839
"eslint": "^8.57.0",
3940
"prettier": "^3.2.5",

src/index.ts

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,36 @@
1+
// Check if this package is being used as one of the deprecated auth-helpers packages
2+
if (typeof process !== 'undefined' && process.env?.npm_package_name) {
3+
const packageName = process.env.npm_package_name;
4+
const deprecatedPackages = [
5+
'@supabase/auth-helpers-nextjs',
6+
'@supabase/auth-helpers-react',
7+
'@supabase/auth-helpers-remix',
8+
'@supabase/auth-helpers-sveltekit'
9+
];
10+
11+
if (deprecatedPackages.includes(packageName)) {
12+
console.warn(`
13+
╔════════════════════════════════════════════════════════════════════════════╗
14+
║ ⚠️ IMPORTANT: Package Consolidation Notice ║
15+
║ ║
16+
║ The ${packageName.padEnd(35)} package name is deprecated. ║
17+
║ ║
18+
║ You are now using @supabase/ssr - a unified solution for all frameworks. ║
19+
║ ║
20+
║ The auth-helpers packages have been consolidated into @supabase/ssr ║
21+
║ to provide better maintenance and consistent APIs across frameworks. ║
22+
║ ║
23+
║ Please update your package.json to use @supabase/ssr directly: ║
24+
║ npm uninstall ${packageName.padEnd(42)}
25+
║ npm install @supabase/ssr ║
26+
║ ║
27+
║ For more information, visit: ║
28+
║ https://supabase.com/docs/guides/auth/server-side ║
29+
╚════════════════════════════════════════════════════════════════════════════╝
30+
`);
31+
}
32+
}
33+
134
export * from "./createBrowserClient";
235
export * from "./createServerClient";
336
export * from "./types";

0 commit comments

Comments
 (0)