Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup: change way of accessing package version #9

Merged
merged 1 commit into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions src/ambient.d.ts

This file was deleted.

18 changes: 10 additions & 8 deletions src/createBrowserClient.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
import { createClient } from "@supabase/supabase-js";
import { mergeDeepRight } from "ramda";
import {
DEFAULT_COOKIE_OPTIONS,
combineChunks,
createChunks,
deleteChunks,
isBrowser,
} from "./utils";
import { parse, serialize } from "cookie";

import type { SupabaseClient } from "@supabase/supabase-js";
import type {
GenericSchema,
SupabaseClientOptions,
} from "@supabase/supabase-js/dist/module/lib/types";

import { VERSION } from "./version";
import {
DEFAULT_COOKIE_OPTIONS,
combineChunks,
createChunks,
deleteChunks,
isBrowser,
} from "./utils";
import type { CookieMethods, CookieOptionsWithName } from "./types";

let cachedBrowserClient: SupabaseClient<any, string> | undefined;
Expand Down Expand Up @@ -98,7 +100,7 @@ export function createBrowserClient<
const cookieClientOptions = {
global: {
headers: {
"X-Client-Info": `${PACKAGE_NAME}/${PACKAGE_VERSION}`,
"X-Client-Info": `supabase-ssr/${VERSION}`,
},
},
auth: {
Expand Down
4 changes: 3 additions & 1 deletion src/createServerClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import type {
GenericSchema,
SupabaseClientOptions,
} from "@supabase/supabase-js/dist/module/lib/types";

import { VERSION } from "./version";
import type { CookieOptionsWithName, CookieMethods } from "./types";

export function createServerClient<
Expand Down Expand Up @@ -69,7 +71,7 @@ export function createServerClient<
const cookieClientOptions = {
global: {
headers: {
"X-Client-Info": `${PACKAGE_NAME}/${PACKAGE_VERSION}`,
"X-Client-Info": `supabase-ssr/${VERSION}`,
},
},
auth: {
Expand Down
1 change: 1 addition & 0 deletions src/version.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const VERSION = "0.3.0";