@@ -128,28 +128,37 @@ jobs:
128128 # This helps users still using the old packages (especially due to LLM recommendations)
129129 echo "Publishing under legacy auth-helpers names..."
130130
131+ # Calculate legacy auth-helpers version with +6 minor offset
132+ # SSR 0.8.0 -> legacy 0.14.0, SSR 0.9.1 -> legacy 0.15.1
133+ SSR_MINOR=$(echo "$RELEASE_VERSION" | cut -d. -f2)
134+ SSR_PATCH=$(echo "$RELEASE_VERSION" | cut -d. -f3)
135+ LEGACY_VERSION="0.$((SSR_MINOR + 6)).$SSR_PATCH"
136+ echo "Legacy auth-helpers version: $LEGACY_VERSION (from SSR $RELEASE_VERSION)"
137+
131138 # Publish as @supabase/auth-helpers-nextjs
132- echo "Publishing as @supabase/auth-helpers-nextjs..."
139+ echo "Publishing as @supabase/auth-helpers-nextjs@$LEGACY_VERSION ..."
133140 sed -i 's|"name": "@supabase/ssr"|"name": "@supabase/auth-helpers-nextjs"|g' package.json
141+ sed -i 's|"version": "[^"]*"|"version": "'"$LEGACY_VERSION"'"|g' package.json
134142 npm publish --provenance --tag "$DIST_TAG"
135143
136144 # Publish as @supabase/auth-helpers-react
137- echo "Publishing as @supabase/auth-helpers-react..."
145+ echo "Publishing as @supabase/auth-helpers-react@$LEGACY_VERSION ..."
138146 sed -i 's|"name": "@supabase/auth-helpers-nextjs"|"name": "@supabase/auth-helpers-react"|g' package.json
139147 npm publish --provenance --tag "$DIST_TAG"
140148
141149 # Publish as @supabase/auth-helpers-remix
142- echo "Publishing as @supabase/auth-helpers-remix..."
150+ echo "Publishing as @supabase/auth-helpers-remix@$LEGACY_VERSION ..."
143151 sed -i 's|"name": "@supabase/auth-helpers-react"|"name": "@supabase/auth-helpers-remix"|g' package.json
144152 npm publish --provenance --tag "$DIST_TAG"
145153
146154 # Publish as @supabase/auth-helpers-sveltekit
147- echo "Publishing as @supabase/auth-helpers-sveltekit..."
155+ echo "Publishing as @supabase/auth-helpers-sveltekit@$LEGACY_VERSION ..."
148156 sed -i 's|"name": "@supabase/auth-helpers-remix"|"name": "@supabase/auth-helpers-sveltekit"|g' package.json
149157 npm publish --provenance --tag "$DIST_TAG"
150158
151- # Restore original package name for consistency
159+ # Restore original package name and version for consistency
152160 sed -i 's|"name": "@supabase/auth-helpers-sveltekit"|"name": "@supabase/ssr"|g' package.json
161+ sed -i 's|"version": "[^"]*"|"version": "'"$RELEASE_VERSION"'"|g' package.json
153162
154163 - name : Create GitHub release and branches
155164 if : ${{ steps.release.outputs.release_created == 'true' || steps.release.outputs.prs_created == 'true' }}
0 commit comments