11import type { SerializeOptions } from "cookie" ;
2- import { parse as cookieParse , serialize as cookieSerialize } from "cookie" ;
2+ import * as cookie from "cookie" ;
33
44/**
55 * @deprecated Since v0.4.0: Please use {@link parseCookieHeader}. `parse` will
66 * not be available for import starting v1.0.0 of `@supabase/ssr`.
77 */
8- export const parse = cookieParse ;
8+ export const parse = cookie . parse ;
99
1010/**
1111 * @deprecated Since v0.4.0: Please use {@link serializeCookieHeader}.
1212 * `serialize` will not be available for import starting v1.0.0 of
1313 * `@supabase/ssr`.
1414 */
15- export const serialize = cookieSerialize ;
15+ export const serialize = cookie . serialize ;
1616
1717/**
1818 * Parses the `Cookie` HTTP header into an array of cookie name-value objects.
@@ -23,7 +23,7 @@ export const serialize = cookieSerialize;
2323export function parseCookieHeader (
2424 header : string ,
2525) : { name : string ; value ?: string } [ ] {
26- const parsed = cookieParse ( header ) ;
26+ const parsed = cookie . parse ( header ) ;
2727
2828 return Object . keys ( parsed ?? { } ) . map ( ( name ) => ( {
2929 name,
@@ -43,7 +43,7 @@ export function serializeCookieHeader(
4343 value : string ,
4444 options : SerializeOptions ,
4545) : string {
46- return cookieSerialize ( name , value , options ) ;
46+ return cookie . serialize ( name , value , options ) ;
4747}
4848
4949export function isBrowser ( ) {
0 commit comments