Skip to content

Commit

Permalink
setup: change way of accessing package version
Browse files Browse the repository at this point in the history
  • Loading branch information
hf committed May 27, 2024
1 parent e8cb6ed commit 7df98e1
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
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";

0 comments on commit 7df98e1

Please sign in to comment.