AustinGil / vuetensils

🍴 A tasty toolset for Vue.js 🛠 - Lightweight, functional components to boost your next project.
https://vuetensils.austingil.com/
MIT License
660 stars 38 forks source link

[Feature Request] Support Vue 2.7 by upgrading vue-demi to ^0.13 #149

Closed davatron5000 closed 1 year ago

davatron5000 commented 1 year ago

👋 🤠 Howdy, I was looking at using VTabs but I hit a circular dependency problem. My Nuxt app is on Vue 2.7 (which has the Composition API) and when I install Vuetensils, I get errors about not having @vue/composition-api. Adding @vue/composition-api reverts the Nuxt app back to 2.6 and then everyything is upset.

I assume it's a simple fix of updating "vue-demi": "^0.13.0" but I couldn't get the Vuetensils testing environment working locally to verify the fix was mundane. Happy to provide more info if needed tho. Thanks.

AustinGil commented 1 year ago

Hey Dave, I'm looking into this now. NPM is throwing a fit about dependencies on my end now too, so it's not quite so simple, but I'll get it sorted :)

AustinGil commented 1 year ago

@davatron5000 can you give the latest version a go and see?

WebMechanic commented 1 year ago

FYI all of Vueuse and Pinia have a "vue-demi": "*" dependency. For vue-demi just being a "wrapper", it's probably a good idea to loose the version in Vuetensil's dependecy. They even recommend using "vue-demi": "latest"

AustinGil commented 1 year ago

That's a great tip. Will add it for the next release. Thanks @WebMechanic

AustinGil commented 1 year ago

Havent heard back on this one, so I'm going to close this issue. Feel free to reopen if you have more issues.

WebMechanic commented 1 year ago

FYI: I just installed 0.13 into a test project.

Yarn apparently dislikes their recommendation of using latest 🙄

warning Pattern ["vue-demi@latest"] is trying to unpack in the same destination "path-to-yarn-cache/v6/n
pm-vue-demi-0.13.11-7d90369bdae8974d87b1973564ad390182410d99-integrity/node_modules/vue-demi" 
as pattern ["vue-demi@*","vue-demi@*","vue-demi@*","vue-demi@*","vue-demi@*","vue-demi@*","vue-demi@*","vue-demi@*"]. 
This could result in non-deterministic behavior, skipping.

There's no such notice from Yarn 3. I might check with latest pnpm later.

However, despite the last log message end with skipping, it's indeed updated

yarn why vuetensils
=> Found "vuetensils@0.13.0"

The long list of vue-demi@* patterns is probably coming from all the various @vueuse packs and Pinia. The project's basically setup to toy with these. As mentiioned earlier they use vue-demi@* in their package.json.