greenpress / vuex-composition-helpers

A util package to use Vuex with Composition API easily.
https://www.npmjs.com/package/vuex-composition-helpers
MIT License
288 stars 32 forks source link

Add support of Vue 2.7 #72

Closed LeSuisse closed 1 year ago

LeSuisse commented 1 year ago

This uses vue-demi to determine if the imports needs to be done from vue or the @vue/composition-api plugin.

Closes #71.

Another solution would to bump the minimal supported version to Vue 2.7 and directly importing from vue but it will complicate upgrades because it means vue and vuex-composition-helpers needs to be bumped simultaneously.

LeSuisse commented 1 year ago

I'm going to take a look at the CI failure, TypeScript seems to be unhappy

LeSuisse commented 1 year ago

I'm going to take a look at the CI failure, TypeScript seems to be unhappy

Resolved. "Recent" versions of @vue/composition-api requires a more recent version of TypeScript than the one currently pinned. I updated it and ended up being forced to update ts-jest and jest as well.

davidmeirlevy commented 1 year ago

Hi!

Thanks for this update. Unfortunately, I cannot merge it because of "vue-demi" usage.

This library is known to have zero dependencies, and users who uses it expect it to keep that mind.

This package has a version 2.x with completely different imports for Vue 3, and so maybe we should have a new minor version for 1.x, to match the new 2.7 version of Vue.

LeSuisse commented 1 year ago

If you consider it is fine to have a version that drop support for Vue < 2.7 it's fine by me too. I will update the PR to do that.

LeSuisse commented 1 year ago

PR updated: vue-demi is no more a dependency. The minimal version of Vue now needs to be Vue 2.7.

hugo-vrijswijk commented 1 year ago

@davidmeirlevy Gentle bump :). Could this be merged? It's currently blocking us from moving to Vue 2.7

vate commented 1 year ago

@davidmeirlevy Gentle bump :). Could this be merged? It's currently blocking us from moving to Vue 2.7

Same case here, thanks!

davidmeirlevy commented 1 year ago

@hugo-vrijswijk @vate sorry for the delay guys. published now on version 1.2.0

davidmeirlevy commented 1 year ago

1.1.x - will support vue up to 2.6.x

marr commented 1 year ago

@hugo-vrijswijk @vate sorry for the delay guys. published now on version 1.2.0

This took awhile to figure out! Installing from npm installs 1.1, which depends on @vue/composition-api and vue 2.6. I had to specify 1.2 to get things working with vue 2.7.