supabase-community / nuxt-supabase

A supa simple wrapper around Supabase.js to enable usage within Nuxt.
https://supabase.io
MIT License
167 stars 17 forks source link

Nuxt 3 support #14

Open pi0 opened 2 years ago

pi0 commented 2 years ago

Hi! Currently, we are listing nuxt-supabase as official Nuxt+Supabase integration. Thanks for your works @scottrobertson @sduduzog

Nuxt 3 beta is out for a while and @wobsoriano already started a nice Supabase module for Nuxt 3 (nuxt3-supabase)

I would like to see if possible, we collaborate together to make a new Major version of this module for Nuxt 3 and Nuxt 2 Bridge support in a single place (superbase-community) to ensure it keeps maintained in good hands 💚

@wobsoriano If you could make an initial PR, I and @Atinux can help to make it stable.

scottrobertson commented 2 years ago

I believe this already works perfectly on nuxt3 but @sduduzog will know for sure.

pi0 commented 2 years ago

I believe the current version should work with Nuxt 2 bridge (based on vue2) but not Nuxt 3:

Also, it would be nice by starting to support the bridge, Nuxt module exports composable other than basic injected $supabase. SSR authentication handling could be improved also.

scottrobertson commented 2 years ago

Ah yeah sorry, I was getting confused with the Vue3 support we added in https://github.com/supabase-community/vue-supabase which this library uses.

Shouldn't be too much work to get it working, since this Nuxt wrapper is super simple.

sduduzog commented 2 years ago

@scottrobertson @pi0 I"m seeing this now. Yes, the current version works with the nuxt-bridge (although no migration is yet done there), but is not yet ready for nuxt 3. I've taken some time to read through nuxt3-supabase and I love what he'd done with the project and I'll try as much as possible to also help where I can

scottrobertson commented 2 years ago

@sduduzog how do you want to handle this? Do you want to build it, or should @wobsoriano PR in some changes if they like?

I am guessing we need to either carry on supporting both 2 and 3, or have a new major release that is 3 only. The latter may be the easier but not as nice for bug fixes etc for us going forward.

pi0 commented 2 years ago

Thanks for your quick responses! We are working on a simplified example at the moment for nuxt3+supabase. Will ping you when ready and probably follow up with a PR to convert it back into the module.

I am guessing we need to either carry on supporting both 2 and 3, or have a new major release that is 3 only.

Agreed. Regarding versioning, same as other nuxt modules, it worth a major version to directly target Nuxt3. Nuxt2 users can be hopefully still use latest as long as using Nuxt bridge (that makes CompositionAPI and even small vue3 compatibility).

sduduzog commented 2 years ago

@pi0 @sduduzog I can focus on nuxt 2 and the nuxt bridge in the meantime

Strift commented 2 years ago

Hello everyone :wave:

I have opened two PRs to address this issue:

I would love to have your feedback on it, and know what are the next steps to hopefully get the PRs merged. :crossed_fingers:

I'm pretty new to OSS so there's probably a couple things that are still off—just let me know!

Cheers,