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

createBrowserClient is incorrectly marked as deprecated when no options object is passed in 0.4.0-rc.3 #15

Closed
2 tasks done
harrisrobin opened this issue Jun 13, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@harrisrobin
Copy link

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

When using createBrowserClient, typescript shows me a deprecation warning due to it not having the getAll and setAll methods as discussed in https://github.com/orgs/supabase/discussions/27037, however this is only required for server clients since the browser client works with the document.cookie API by default.

note that adding an empty object as the third argument also seems to remove this warning.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

In a typescript file, simply call createBrowserClient without the third options argument:

  createBrowserClient<MyDatabase>(
    process.env.NEXT_PUBLIC_SUPABASE_URL!,
    process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!
)

Expected behavior

It should not show me a deprecated warning if i don't pass it an options object.

Screenshots

image
@harrisrobin harrisrobin added the bug Something isn't working label Jun 13, 2024
@harrisrobin harrisrobin changed the title createBrowserClient is incorrectly marked as deprecated in 0.4.0-rc.3 createBrowserClient is incorrectly marked as deprecated when no options object is passed in 0.4.0-rc.3 Jun 13, 2024
@hf
Copy link
Collaborator

hf commented Jun 20, 2024

Fixed with #17

@hf hf closed this as completed Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants