Skip to content

Conversation

@NuroDev
Copy link

@NuroDev NuroDev commented Mar 11, 2021

What kind of change does this PR introduce?

Ground up re-write of the source from index.js to index.ts such that it now works / is aligned with the Vue 3.x useSomeFunctionName standard.

What is the new behavior?

Behaviour is identical as before. Except now there is included types for the creation function options.

Additional context

While this re-write may not be entirely "necessary", it may be of some benefit to eventually re-write this module to follow the new standard. Following from this, re-writing it in TypeScript offers a few benefits, including the plugin option types being included.

I have currently marked the package as a 2.x.x release as I feel that this re-write is primarily targeted towards Vue 3.x users, it may be best to keep it as a new major release? Though this can be changed back and instead changed to 1.0.5

If any other changes I have made are not to your liking, let me know and I will change them 🙂

@scottrobertson
Copy link
Contributor

scottrobertson commented Mar 11, 2021

Hey @NuroDev

Thanks for this. Just a couple of initial things:

  • Can you switch this back to spaces, instead of tabs?
  • Should we increase the vue peerDependencies to >=3?
  • How can we maintain support for Vue 2.0? Or do you think we just leave that for the 1.x release, and backport any fixes if we need to? Mainly to keep https://github.com/supabase/nuxt-supabase working, as Nuxt is Vue 2.0 for now.

@scottrobertson scottrobertson added the enhancement New feature or request label Mar 11, 2021
@NuroDev
Copy link
Author

NuroDev commented Mar 11, 2021

Hey @scottrobertson

No problem, I'll get that changed over to spaces instead of tabs.

I think if we are going to have a separate major release for this it would be better to upgrade the vue peer dependency to >=3, yes.

As for maintenance I believe the best course of action would be the following:

  • Leave the 1.x / Vue 2.x release where it stands right now (Still readily available & ready to be patched if need be)
  • Release this new 2.x / Vue 3.x version under the 2.x or next version (Similar to Vue releases)
  • At a later date, when Vue 3.x is the default / primary Vue version, keep a 1.x branch ready for any maintenance / patches that need to be made to the 1.x release & then make the 2.x release the default / latest release.

This maintains the supabase/nuxt-supabase 2.x support but offers Vue 3.x support to those who want it.

@scottrobertson
Copy link
Contributor

Thanks @NuroDev.

Still some tabs in tsconfig, and the README, if you wouldn't mind sorting them?

@NuroDev
Copy link
Author

NuroDev commented Mar 11, 2021

Fixed. Let me know if there are any other issues that need resolving 🙂

@scottrobertson
Copy link
Contributor

Closing in favour of #2. Not really sure what is going on here, but whatever was done to the files in this PR was messing with diffs entirely. For example, it was saying the whole of package.json had changed, but it had no. I suspect it's some encoding issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants