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

Incorrect import in utils.js of v1.0.25 #56

Closed stensi closed 2 years ago

stensi commented 2 years ago

v1.0.25 has an incorrect import where it is attempting to get computed and getCurrentInstance from vue instead of @vue/composition-api:

https://unpkg.com/vuex-composition-helpers@1.0.25/dist/util.js

import { computed, getCurrentInstance } from 'vue';

This results in a runtime error where it states getCurrentInstance is not a function.

By comparison, v1.0.24 works and is importing correctly:

https://unpkg.com/vuex-composition-helpers@1.0.24/dist/util.js

import { computed, getCurrentInstance } from '@vue/composition-api';

Master is importing correctly but v1.0.25 doesn't match that: https://github.com/greenpress/vuex-composition-helpers/blob/c442d62c17c70467d7561db23becc3d77773f589/src/util.ts#L1

Suspect v1.0.25 might've accidentally been released with some of your in progress work for Vue 3.x, where it would be correct to import from vue rather than @vue/composition-api.

davidmeirlevy commented 2 years ago

Thanks! Will be fixed in the next due hours.

davidmeirlevy commented 2 years ago

@stensi thanks for noticing! I've learned something truly important about my confidence in tsc.

fixed on 1.0.26: https://unpkg.com/vuex-composition-helpers@1.0.26/dist/util.js

stensi commented 2 years ago

No worries @davidmeirlevy and thanks for the quick turnaround. Can confirm it's working for me in v1.0.26 👍