MartinMalinda / vue-concurrency

A library for encapsulating asynchronous operations and managing concurrency for Vue and Composition API.
https://vue-concurrency.netlify.app/
MIT License
350 stars 15 forks source link

useAsyncTask missing from distribution + installing own copy of Composition-Api #21

Closed Hawxy closed 4 years ago

Hawxy commented 4 years ago

useAsyncTask was never added to https://github.com/MartinMalinda/vue-concurrency/blob/master/src/index.ts and thus I can't seem to use it in my application.

I'm also running into https://github.com/vuejs/composition-api/issues/372, as vue-concurrency installs beta.10 for itself whilst I'm using beta.14

MartinMalinda commented 4 years ago

@Hawxy thanks! I'll add the useAsyncTask and release later today

Regarding https://github.com/vuejs/composition-api/issues/372 last time I checked it was hard to solve but there seems to be new approaches now, I'll investigate

MartinMalinda commented 4 years ago

useAsyncTask released in 1.2.1

MartinMalinda commented 4 years ago

I have opened a branch for Vue 3 support here: https://github.com/MartinMalinda/vue-concurrency/pull/22. I'll be doing some changes to bundling there so it might also fix the issue with different composition api versions.

MartinMalinda commented 4 years ago

I've just released 2.0.0 that should elimiate the @vue/composition-api version issue.

I tested via create-vite-app (vue3) and create-nuxt-app (vue2) and I didn't run into any errors.

Hawxy commented 4 years ago

Thanks, I'll test it out as soon as I can.

Looking at the changes, is there a reason you didn't use vue-demi for the dual-version compatibility? That's the go-to I see people using.

MartinMalinda commented 4 years ago

I ran into an issue with it: https://github.com/antfu/vue-demi/issues/5, but I used the postinstall trick from it. Basically the same path as vue-composable. I can run the test suite both for Vue2 and Vue3.

Hawxy commented 4 years ago

Everything appears to be working, thanks for your work!