Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@supabase/ssr

Package Overview
Dependencies
Maintainers
12
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@supabase/ssr - npm Package Compare versions

Comparing version 0.5.2 to 0.6.0-rc.1

10

dist/main/cookies.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.applyServerStorage = exports.createStorageFromOptions = void 0;
exports.createStorageFromOptions = createStorageFromOptions;
exports.applyServerStorage = applyServerStorage;
const cookie_1 = require("cookie");

@@ -94,3 +95,6 @@ const utils_1 = require("./utils");

const parsed = (0, cookie_1.parse)(document.cookie);
return Object.keys(parsed).map((name) => ({ name, value: parsed[name] }));
return Object.keys(parsed).map((name) => ({
name,
value: parsed[name] ?? "",
}));
};

@@ -288,3 +292,2 @@ getAll = () => noHintGetAll();

}
exports.createStorageFromOptions = createStorageFromOptions;
/**

@@ -346,3 +349,2 @@ * When createServerClient needs to apply the created storage to cookies, it

}
exports.applyServerStorage = applyServerStorage;
//# sourceMappingURL=cookies.js.map

3

dist/main/createBrowserClient.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createBrowserClient = void 0;
exports.createBrowserClient = createBrowserClient;
const supabase_js_1 = require("@supabase/supabase-js");

@@ -49,3 +49,2 @@ const version_1 = require("./version");

}
exports.createBrowserClient = createBrowserClient;
//# sourceMappingURL=createBrowserClient.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createServerClient = void 0;
exports.createServerClient = createServerClient;
const supabase_js_1 = require("@supabase/supabase-js");

@@ -57,3 +57,2 @@ const version_1 = require("./version");

}
exports.createServerClient = createServerClient;
//# sourceMappingURL=createServerClient.js.map

@@ -1,3 +0,3 @@

import type { CookieSerializeOptions } from "cookie";
export type CookieOptions = Partial<CookieSerializeOptions>;
import type { SerializeOptions } from "cookie";
export type CookieOptions = Partial<SerializeOptions>;
export type CookieOptionsWithName = {

@@ -4,0 +4,0 @@ name?: string;

@@ -8,3 +8,7 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.stringFromUTF8 = exports.stringToUTF8 = exports.codepointToUTF8 = exports.stringFromBase64URL = exports.stringToBase64URL = void 0;
exports.stringToBase64URL = stringToBase64URL;
exports.stringFromBase64URL = stringFromBase64URL;
exports.codepointToUTF8 = codepointToUTF8;
exports.stringToUTF8 = stringToUTF8;
exports.stringFromUTF8 = stringFromUTF8;
/**

@@ -69,3 +73,2 @@ * An array of characters that encode 6 bits into a Base64-URL alphabet

}
exports.stringToBase64URL = stringToBase64URL;
/**

@@ -110,3 +113,2 @@ * Converts a Base64-URL encoded string into a JavaScript string. It is assumed

}
exports.stringFromBase64URL = stringFromBase64URL;
/**

@@ -143,3 +145,2 @@ * Converts a Unicode codepoint to a multi-byte UTF-8 sequence.

}
exports.codepointToUTF8 = codepointToUTF8;
/**

@@ -166,3 +167,2 @@ * Converts a JavaScript string to a sequence of UTF-8 bytes.

}
exports.stringToUTF8 = stringToUTF8;
/**

@@ -214,3 +214,2 @@ * Converts a UTF-8 byte to a Unicode codepoint.

}
exports.stringFromUTF8 = stringFromUTF8;
//# sourceMappingURL=base64url.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.deleteChunks = exports.combineChunks = exports.createChunks = exports.isChunkLike = exports.MAX_CHUNK_SIZE = void 0;
exports.MAX_CHUNK_SIZE = void 0;
exports.isChunkLike = isChunkLike;
exports.createChunks = createChunks;
exports.combineChunks = combineChunks;
exports.deleteChunks = deleteChunks;
exports.MAX_CHUNK_SIZE = 3180;

@@ -16,3 +20,2 @@ const CHUNK_LIKE_REGEX = /^(.*)[.](0|[1-9][0-9]*)$/;

}
exports.isChunkLike = isChunkLike;
/**

@@ -63,3 +66,2 @@ * create chunks from a string and return an array of object

}
exports.createChunks = createChunks;
// Get fully constructed chunks

@@ -85,3 +87,2 @@ async function combineChunks(key, retrieveChunk) {

}
exports.combineChunks = combineChunks;
async function deleteChunks(key, retrieveChunk, removeChunk) {

@@ -101,3 +102,2 @@ const value = await retrieveChunk(key);

}
exports.deleteChunks = deleteChunks;
//# sourceMappingURL=chunker.js.map

@@ -1,2 +0,2 @@

import type { CookieSerializeOptions } from "cookie";
import type { SerializeOptions } from "cookie";
import { parse as cookieParse, serialize as cookieSerialize } from "cookie";

@@ -22,3 +22,3 @@ /**

name: string;
value: string;
value?: string;
}[];

@@ -32,3 +32,3 @@ /**

*/
export declare function serializeCookieHeader(name: string, value: string, options: CookieSerializeOptions): string;
export declare function serializeCookieHeader(name: string, value: string, options: SerializeOptions): string;
export declare function isBrowser(): boolean;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isBrowser = exports.serializeCookieHeader = exports.parseCookieHeader = exports.serialize = exports.parse = void 0;
exports.serialize = exports.parse = void 0;
exports.parseCookieHeader = parseCookieHeader;
exports.serializeCookieHeader = serializeCookieHeader;
exports.isBrowser = isBrowser;
const cookie_1 = require("cookie");

@@ -29,3 +32,2 @@ /**

}
exports.parseCookieHeader = parseCookieHeader;
/**

@@ -41,7 +43,5 @@ * Converts the arguments to a valid `Set-Cookie` header. Non US-ASCII chars

}
exports.serializeCookieHeader = serializeCookieHeader;
function isBrowser() {
return (typeof window !== "undefined" && typeof window.document !== "undefined");
}
exports.isBrowser = isBrowser;
//# sourceMappingURL=helpers.js.map

@@ -1,1 +0,1 @@

export declare const VERSION = "0.5.2";
export declare const VERSION = "0.6.0-rc.1";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.VERSION = void 0;
exports.VERSION = '0.5.2';
exports.VERSION = '0.6.0-rc.1';
//# sourceMappingURL=version.js.map

@@ -91,3 +91,6 @@ import { parse, serialize } from "cookie";

const parsed = parse(document.cookie);
return Object.keys(parsed).map((name) => ({ name, value: parsed[name] }));
return Object.keys(parsed).map((name) => ({
name,
value: parsed[name] ?? "",
}));
};

@@ -94,0 +97,0 @@ getAll = () => noHintGetAll();

import { createClient } from "@supabase/supabase-js";
import { VERSION } from "./version";
import { isBrowser, } from "./utils";
import { isBrowser } from "./utils";
import { createStorageFromOptions } from "./cookies";

@@ -5,0 +5,0 @@ let cachedBrowserClient;

@@ -1,3 +0,3 @@

import type { CookieSerializeOptions } from "cookie";
export type CookieOptions = Partial<CookieSerializeOptions>;
import type { SerializeOptions } from "cookie";
export type CookieOptions = Partial<SerializeOptions>;
export type CookieOptionsWithName = {

@@ -4,0 +4,0 @@ name?: string;

@@ -1,2 +0,2 @@

import type { CookieSerializeOptions } from "cookie";
import type { SerializeOptions } from "cookie";
import { parse as cookieParse, serialize as cookieSerialize } from "cookie";

@@ -22,3 +22,3 @@ /**

name: string;
value: string;
value?: string;
}[];

@@ -32,3 +32,3 @@ /**

*/
export declare function serializeCookieHeader(name: string, value: string, options: CookieSerializeOptions): string;
export declare function serializeCookieHeader(name: string, value: string, options: SerializeOptions): string;
export declare function isBrowser(): boolean;

@@ -1,1 +0,1 @@

export declare const VERSION = "0.5.2";
export declare const VERSION = "0.6.0-rc.1";

@@ -1,2 +0,2 @@

export const VERSION = '0.5.2';
export const VERSION = '0.6.0-rc.1';
//# sourceMappingURL=version.js.map
{
"name": "@supabase/ssr",
"version": "0.5.2",
"version": "0.6.0-rc.1",
"description": "Use the Supabase JavaScript library in popular server-side rendering (SSR) frameworks.",

@@ -48,5 +48,4 @@ "main": "dist/main/index.js",

"dependencies": {
"cookie": "^0.7.0",
"@types/cookie": "^0.6.0"
"cookie": "^1.0.1"
}
}

@@ -7,3 +7,2 @@ import { parse, serialize } from "cookie";

createChunks,
deleteChunks,
isBrowser,

@@ -144,3 +143,6 @@ isChunkLike,

return Object.keys(parsed).map((name) => ({ name, value: parsed[name] }));
return Object.keys(parsed).map((name) => ({
name,
value: parsed[name] ?? "",
}));
};

@@ -147,0 +149,0 @@

@@ -1,2 +0,1 @@

import { parse, serialize } from "cookie";
import { createClient, SupabaseClient } from "@supabase/supabase-js";

@@ -9,10 +8,3 @@ import type {

import { VERSION } from "./version";
import {
DEFAULT_COOKIE_OPTIONS,
combineChunks,
createChunks,
deleteChunks,
isBrowser,
isChunkLike,
} from "./utils";
import { isBrowser } from "./utils";

@@ -22,6 +14,3 @@ import type {

CookieMethodsBrowserDeprecated,
CookieOptions,
CookieOptionsWithName,
GetAllCookies,
SetAllCookies,
} from "./types";

@@ -28,0 +17,0 @@

@@ -1,4 +0,4 @@

import type { CookieSerializeOptions } from "cookie";
import type { SerializeOptions } from "cookie";
export type CookieOptions = Partial<CookieSerializeOptions>;
export type CookieOptions = Partial<SerializeOptions>;
export type CookieOptionsWithName = { name?: string } & CookieOptions;

@@ -5,0 +5,0 @@

@@ -1,2 +0,2 @@

import type { CookieSerializeOptions } from "cookie";
import type { SerializeOptions } from "cookie";
import { parse as cookieParse, serialize as cookieSerialize } from "cookie";

@@ -25,3 +25,3 @@

header: string,
): { name: string; value: string }[] {
): { name: string; value?: string }[] {
const parsed = cookieParse(header);

@@ -45,3 +45,3 @@

value: string,
options: CookieSerializeOptions,
options: SerializeOptions,
): string {

@@ -48,0 +48,0 @@ return cookieSerialize(name, value, options);

@@ -1,1 +0,1 @@

export const VERSION = '0.5.2';
export const VERSION = '0.6.0-rc.1';

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc