Skip to content

fix: use global fetch instead of @supabase/node-fetch #1232

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

m-shaka
Copy link

@m-shaka m-shaka commented Jun 27, 2024

What kind of change does this PR introduce?

Fix #914

Additional context

As I posted here, this won't work on Node.js <18
#914 (comment)

@m-shaka m-shaka marked this pull request as ready for review June 27, 2024 06:48
@@ -100,7 +100,7 @@ export default class SupabaseClient<
this.headers,
settings.global.fetch
)
this.fetch = fetchWithAuth(supabaseKey, this._getAccessToken.bind(this), settings.global.fetch)
Copy link
Contributor

@j4w8n j4w8n Jun 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing settings.global.fetch denies developers the ability to use a custom fetch, passed into the Supabase client's options.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted! Thank you.

@mandarini
Copy link
Contributor

mandarini commented Jul 24, 2025

HI @m-shaka ! Thank you so much for your contribution! I will not be merging this PR now. I will merge it once we officially drop support for Node 18, in October. I want to make sure we don't break any users early.

That being said, I will add a reminder to merge your PR on November 1st! :D

Again, thank you very much for your patience and for contributing to Supabase!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge javascript Pull requests that update javascript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
3 participants