Skip to content

Commit b8a0358

Browse files
committed
feat: publish SSR under deprecated auth-helpers package names
1 parent bd368ca commit b8a0358

File tree

5 files changed

+95
-11
lines changed

5 files changed

+95
-11
lines changed

.github/workflows/release.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,33 @@ jobs:
120120
121121
npm publish --provenance --tag "$DIST_TAG"
122122
123+
# Also publish under deprecated auth-helpers names for backward compatibility
124+
# This helps users still using the old packages (especially due to LLM recommendations)
125+
echo "Publishing under legacy auth-helpers names..."
126+
127+
# Publish as @supabase/auth-helpers-nextjs
128+
echo "Publishing as @supabase/auth-helpers-nextjs..."
129+
sed -i 's|"name": "@supabase/ssr"|"name": "@supabase/auth-helpers-nextjs"|g' package.json
130+
npm publish --provenance --tag "$DIST_TAG"
131+
132+
# Publish as @supabase/auth-helpers-react
133+
echo "Publishing as @supabase/auth-helpers-react..."
134+
sed -i 's|"name": "@supabase/auth-helpers-nextjs"|"name": "@supabase/auth-helpers-react"|g' package.json
135+
npm publish --provenance --tag "$DIST_TAG"
136+
137+
# Publish as @supabase/auth-helpers-remix
138+
echo "Publishing as @supabase/auth-helpers-remix..."
139+
sed -i 's|"name": "@supabase/auth-helpers-react"|"name": "@supabase/auth-helpers-remix"|g' package.json
140+
npm publish --provenance --tag "$DIST_TAG"
141+
142+
# Publish as @supabase/auth-helpers-sveltekit
143+
echo "Publishing as @supabase/auth-helpers-sveltekit..."
144+
sed -i 's|"name": "@supabase/auth-helpers-remix"|"name": "@supabase/auth-helpers-sveltekit"|g' package.json
145+
npm publish --provenance --tag "$DIST_TAG"
146+
147+
# Restore original package name for consistency
148+
sed -i 's|"name": "@supabase/auth-helpers-sveltekit"|"name": "@supabase/ssr"|g' package.json
149+
123150
- name: Create GitHub release and branches
124151
if: ${{ steps.release.outputs.release_created == 'true' || steps.release.outputs.prs_created == 'true' }}
125152
run: |

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
22

3-
This package is useful for using the [Supabase JavaScript library](https://supabase.com/docs/reference/javascript/introduction) in
4-
server-side rendering frameworks.
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.
54
6-
It provides a framework-agnostic way of creating a Supabase client.
5+
## Overview
6+
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 i @supabase/ssr
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)