swrv
swrv copied to clipboard
Incompatibility with Vue 2.7
Due to the direct requirements of @vue/composition-api, the package is not compatible with Vue 2. Instead, dependency tree building fails when attempting to install.
How to reproduce
- Init an empty npm project
npm i vue@^2.7npm i swrv- Result:
npm ERR! Found: [email protected]
npm ERR! node_modules/vue
npm ERR! vue@"^2.7.8" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer vue@">= 2.5 < 2.7" from @vue/[email protected]
npm ERR! node_modules/@vue/composition-api
npm ERR! peer @vue/composition-api@"^0.5.0 || ^1.0.0-beta.17 || ^1.0.0-rc.5" from [email protected]
npm ERR! node_modules/swrv
npm ERR! swrv@"^0.9.6" from the root project
super exciting release! but yes you're right that swrv does not currently support vue 2.7. Would be good to support it since it's the final minor release of vue 2
@darrenjennings-stripe Do you perhaps have a handle on making something compatible with both Vue 2.6 and 2.7? I wouldn't mind giving it a try. Otherwise I think it'll have to be a breaking change, and require a major release number.
I recommend vue-demi to support Vue 2.6 / 2.7 / 3.
@mascii Thanks, I'll take a look at it and see what I can do 😺
@ZeroThe2nd I'm planning on upgrading the master branch to Vue 2.7 and bumping the minor version (following the logic for other Vue libs) in the coming weeks.
I don't recommend adding vue-demi as a dependency as there is already a next branch that we plan on bringing up-to-date for Vue 3 support.
@ZeroThe2nd I have a draft PR in progress if you'd like to take a look: https://github.com/Kong/swrv/pull/304
@ZeroThe2nd our plan is to merge this in next week. More details can be found in the Release strategy section of the PR.
Note: This will break SSR support
@adamdehaven Thanks for the heads-up. The missing SSR support doesn't affect me, but I appreciate the warning. It makes sense as well to drop it for now and re-do it right for Vue 3 + Nuxt 3 once it releases past an RC.
I'll close the issue now it's on the near-future roadmap to merge. Thanks for the time and responses!
#304 has been merged - Vue 2.7 compatibility is now available as of version 0.10.0 🎉