@supabase/ssr
Advanced tools
Comparing version 0.4.0-rc.5 to 0.4.0-rc.6
@@ -107,3 +107,10 @@ "use strict"; | ||
else { | ||
throw new Error("@supabase/ssr: createBrowserClient in non-browser runtimes must be initialized with cookie options that specify getAll and setAll functions (deprecated: alternatively use get, set and remove)"); | ||
// getting cookies when there's no window but we're in browser mode can be OK, because the developer probably is not using auth functions | ||
getAll = () => { | ||
return []; | ||
}; | ||
// this is NOT OK because the developer is using auth functions that require setting some state, so that must error out | ||
setAll = () => { | ||
throw new Error("@supabase/ssr: createBrowserClient in non-browser runtimes (including Next.js pre-rendering mode) was not initialized cookie options that specify getAll and setAll functions (deprecated: alternatively use get, set and remove), but they were needed"); | ||
}; | ||
} | ||
@@ -110,0 +117,0 @@ if (!isServerClient) { |
@@ -1,1 +0,1 @@ | ||
export declare const VERSION = "0.4.0-rc.5"; | ||
export declare const VERSION = "0.4.0-rc.6"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.VERSION = void 0; | ||
exports.VERSION = '0.4.0-rc.5'; | ||
exports.VERSION = '0.4.0-rc.6'; | ||
//# sourceMappingURL=version.js.map |
@@ -104,3 +104,10 @@ import { parse, serialize } from "cookie"; | ||
else { | ||
throw new Error("@supabase/ssr: createBrowserClient in non-browser runtimes must be initialized with cookie options that specify getAll and setAll functions (deprecated: alternatively use get, set and remove)"); | ||
// getting cookies when there's no window but we're in browser mode can be OK, because the developer probably is not using auth functions | ||
getAll = () => { | ||
return []; | ||
}; | ||
// this is NOT OK because the developer is using auth functions that require setting some state, so that must error out | ||
setAll = () => { | ||
throw new Error("@supabase/ssr: createBrowserClient in non-browser runtimes (including Next.js pre-rendering mode) was not initialized cookie options that specify getAll and setAll functions (deprecated: alternatively use get, set and remove), but they were needed"); | ||
}; | ||
} | ||
@@ -107,0 +114,0 @@ if (!isServerClient) { |
@@ -1,1 +0,1 @@ | ||
export declare const VERSION = "0.4.0-rc.5"; | ||
export declare const VERSION = "0.4.0-rc.6"; |
@@ -1,2 +0,2 @@ | ||
export const VERSION = '0.4.0-rc.5'; | ||
export const VERSION = '0.4.0-rc.6'; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@supabase/ssr", | ||
"version": "0.4.0-rc.5", | ||
"version": "0.4.0-rc.6", | ||
"description": "Use the Supabase JavaScript library in popular server-side rendering (SSR) frameworks.", | ||
@@ -5,0 +5,0 @@ "main": "dist/main/index.js", |
@@ -158,5 +158,13 @@ import { parse, serialize } from "cookie"; | ||
} else { | ||
throw new Error( | ||
"@supabase/ssr: createBrowserClient in non-browser runtimes must be initialized with cookie options that specify getAll and setAll functions (deprecated: alternatively use get, set and remove)", | ||
); | ||
// getting cookies when there's no window but we're in browser mode can be OK, because the developer probably is not using auth functions | ||
getAll = () => { | ||
return []; | ||
}; | ||
// this is NOT OK because the developer is using auth functions that require setting some state, so that must error out | ||
setAll = () => { | ||
throw new Error( | ||
"@supabase/ssr: createBrowserClient in non-browser runtimes (including Next.js pre-rendering mode) was not initialized cookie options that specify getAll and setAll functions (deprecated: alternatively use get, set and remove), but they were needed", | ||
); | ||
}; | ||
} | ||
@@ -163,0 +171,0 @@ |
@@ -1,1 +0,1 @@ | ||
export const VERSION = '0.4.0-rc.5'; | ||
export const VERSION = '0.4.0-rc.6'; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
219240
3676