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!: draft vue 3 support #394

Closed
wants to merge 14 commits into from
Closed

feat!: draft vue 3 support #394

wants to merge 14 commits into from

Conversation

luqven
Copy link
Contributor

@luqven luqven commented Apr 20, 2021

Description

TTSIA

Notable changes

  • README examples updated to match Vue 3 API
  • Dependencies updated to latest Vue 3 compatible
  • Components that use vue-class-component refactored to use rc1 API
  • Vue TS shim updated
  • TSConfig updated to support new decorators for vue-class-component rc1

Discussion

This PR does not achieve 100% vue 3 compat. It does update most of the dependencies to a compatible version.

There's definitely too many commits in one PR. Working on breaking these up, but for the moment figured some visibility on the proposed changes would be best.

This PR has been broken up into several PRs.

Future work

  • Still investigating an issue where the advanced-attribute-config component does not render.
  • Travis deps for vue need some love. They're not happy at the moment.

Useful reading

Theres some information on the state of Vue 3 support in the community in this issue.

@luqven luqven self-assigned this Apr 20, 2021
@commit-lint
Copy link

commit-lint bot commented Apr 20, 2021

Build System

  • semanticrelease: set pre-release to next (f5d2b2f)
  • update dependencies (29b4fd9)

Chore

  • shims: make vue shim use defineComponent (461fdf5)
  • attemtp to remove Vue global calls (ebe0a5e)
  • attempt to remove vue-class-component (1710de7)
  • index: undo change from component to use (d352c98)
  • fix vbind var and add alt attr (c501488)
  • ix-img: re-introduce vue-class-comp usage (92b8e06)
  • ix-picture: re-introduce vue-class-comp use (244c540)
  • ix-source: re-introduce vue-class-comp use (14d0ea0)

Code Refactoring

  • use createApp & app.use vue 3 API (b583a39)
  • main: use createApp Vue 3 API (76ffcf8)

Tests

  • update domain path to one that resolves (8120c5c)

Documentation

  • README: update readme for vue 3 support (3784dc7)

Contributors

luqven

Commit-Lint commands

You can trigger Commit-Lint actions by commenting on this PR:

  • @Commit-Lint merge patch will merge dependabot PR on "patch" versions (X.X.Y - Y change)
  • @Commit-Lint merge minor will merge dependabot PR on "minor" versions (X.Y.Y - Y change)
  • @Commit-Lint merge major will merge dependabot PR on "major" versions (Y.Y.Y - Y change)
  • @Commit-Lint merge disable will desactivate merge dependabot PR
  • @Commit-Lint review will approve dependabot PR
  • @Commit-Lint stop review will stop approve dependabot PR

@luqven luqven added the @next Preview branch related issue label Apr 20, 2021
 Allows .vue single file components to be imported and used. Since
 the Global Vue API has been deprecated, this file needs to import
 the return type of defineComponent for TypeScript to be able to
 import and use the single file components.
@luqven luqven changed the base branch from main to @next April 20, 2021 16:23
Vue can no longer be imported from `vue`. Instead, we need to create
a vue app instance and "install" our components on the app.
@VUE cli-plugin-babel, cli-plugin-e2e-cypress, cli-plugin-eslint,
cli-plugin-typescrip, cli-plugin-unit-jest, cli-service, compiler-sfc
vue, vue-router, and vuex all need to be updated to support Vue 3.
vue-class-component dependency needed to be updated to 8.0 rc1.
This version introduced new decorators, a global Vue instance, and
a `prop` method which I tried to use with varying success.
The vue-class-component docs are confusing at this time. This was
an attempt to remove this dependency. It was not successful.
This commit reverts the use of `App.use`. The correct `App` instance
method to use here is `App.component`.
This commit addresses a typo in `buildSrcSet.vue` that resulted in an
error where `advancedSrc` was not defined in the scope of the component.
It also adds an `alt` attribute to the component, since the vue linter
was complaining about it missing.
Global Vue is not available in Vue 3. This commit imports the new
`createApp` method and uses it to initialize the vue app.
`testing.imgix` source has been disabled. This commit changes the urls
to be `assets.imgix` in the tests that used the old url.
This commit reverts a change where vue-class-component was removed.
Instead, it makes proper use of the `prop` and `Vue` exports from that
library.
@luqven
Copy link
Contributor Author

luqven commented Apr 20, 2021

This PR has been broken up into several PRs. Closing it. Feel free to pull this down to play with things but it will become stale soon.

@luqven luqven closed this Apr 20, 2021
@luqven luqven deleted the luis/next/vue3 branch January 12, 2022 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@next Preview branch related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant