Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(vue): upgrade swrv for vue 2.7 #304

Merged
merged 1 commit into from
Aug 29, 2022
Merged

feat(vue): upgrade swrv for vue 2.7 #304

merged 1 commit into from
Aug 29, 2022

Conversation

adamdehaven
Copy link
Collaborator

@adamdehaven adamdehaven commented Aug 6, 2022

Upgrade for Vue 2.7

Instead of making updates to the master branch, I back-ported the changes from from the next branch and updated for [email protected]. This strategy allows for an easier transition to Vue 3 as the master branch in a future release thanks to the work already done by @darrenjennings. This PR will resolve #303.

Breaking Changes

  • Upgrade Vue devDependency to ^2.7.x and the Vue peerDependencies to ^2.7.0
    • This internalizes the Vue Composition API and allows us to remove the @vue/composition-api peer dependency
  • This PR breaks SSR/Nuxt support. SSR significantly changed in Vue 3, and since this Vue 2.7 PR backports the changes already made for Vue 3, it loses SSR support. We're open to contributions if anyone would like to open a PR to add this feature back. (The SSR code and test(s) are commented out and remain in place).
  • See the Release strategy details below on why we are not bumping the major version.

Other Changes

  • Upgrades all @vue/cli-* dependencies to 5.x
    • Note: We're planning to swap out Vue CLI for Vite and Jest for Vitest in a future PR
  • Update tests for Vue 2.7, including the supported versions of Vue in test-compat-all.sh
  • Swaps out VitePress for VuePress for the documentation site since VitePress requires a conflicting Vue v3.x dependency

Todo

  • Update the included /examples/* projects for Vue 2.7
    • axios-typescript-nuxt (Won't update; SSR support dropped)
    • basic
    • pwa
    • ssr-nuxt (Won't update; SSR support dropped)
    • vite
  • Update README.md
  • Port the docs over from the master branch and update accordingly
    • Update the documentation to explain the versioning and release strategy for the 2.7 and prior releases, and which version to install depending on your project's dependencies

Release strategy

After adding to and completing the items in the Todo section above and leaving this PR open for feedback for a period, the plan is to replace the current master branch with the code from this PR.

As for the versioning/release of this PR, here's what we're thinking:

  • This PR release for Vue 2.7 will bump the minor version to 0.10.x. We realize that this PR breaks SSR support and the major should actually be bumped; however, with the widespread usage of the beta branch we don't want to potentially break downstream projects that are already pointing to the 1.x major version.
  • We will tag the current 0.9.6 release on npm with legacy so anyone that cannot upgrade to Vue 2.7 can install with yarn add swrv@legacy (this matches the vue@legacy tag for the [email protected] version)
  • Update the documentation to explain the version tags and which version to install depending on your project's dependencies
  • When we make the Vue 3 next branch the main branch in a future release, it will again bump the major version to 1.x

@adamdehaven adamdehaven added documentation Improvements or additions to documentation enhancement New feature or request dependencies Pull requests that update a dependency file labels Aug 6, 2022
@adamdehaven adamdehaven self-assigned this Aug 6, 2022
@CLAassistant
Copy link

CLAassistant commented Aug 6, 2022

CLA assistant check
All committers have signed the CLA.

@adamdehaven adamdehaven changed the title feat(*): upgrade swrv for vue 2.7 feat(vue): upgrade swrv for vue 2.7 Aug 6, 2022
@adamdehaven adamdehaven marked this pull request as ready for review August 25, 2022 21:29
@adamdehaven adamdehaven added the help wanted Extra attention is needed label Aug 26, 2022
Update swrv for Vue 2.7 and updates the peerDependencies to Vue >= 2.7 < 3. Removes the peer
dependency for the @vue/composition-api plugin.

BREAKING CHANGE: SSR/Nuxt support is broken with this release. We are open to contributions to add
this feature back (the SSR code and tests remain in place and are commented out).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incompatibility with Vue 2.7
2 participants