supabase icon indicating copy to clipboard operation
supabase copied to clipboard

Rename `serverSupabaseServiceRole` to `getSupabaseClient`

Open pi0 opened this issue 3 years ago • 3 comments

Hi! Since new h3 and nitro utils are using get*(event, ...) pattern, we were talking with @Atinux and I would suggest to deprecate serverSupabaseServiceRole server util to replace with getSupabaseClient.

pi0 avatar Aug 27 '22 14:08 pi0

Indeed, what is the best way to keep the old naming and show a deprecation message to avoid a breaking change?

atinux avatar Aug 29 '22 08:08 atinux

I think I'll keep both serverSupabaseClient and getSupabaseClient here: https://github.com/nuxt-modules/supabase/blob/main/src/module.ts#L146 for the moment.

But what is the way to display a breaking change message ?

larbish avatar Aug 29 '22 08:08 larbish

I would suggest to simply add a /** @deprecated use new method */ for soft deprecation and drop in next major version of module whenever it came. See https://github.com/unjs/h3/pull/156

pi0 avatar Aug 29 '22 08:08 pi0