-
-
Notifications
You must be signed in to change notification settings - Fork 245
[WIP] feat: upgrade to vue 2.6 #487
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #487 +/- ##
==========================================
+ Coverage 12.8% 13.42% +0.62%
==========================================
Files 47 45 -2
Lines 1289 1229 -60
Branches 306 306
==========================================
Hits 165 165
+ Misses 889 833 -56
+ Partials 235 231 -4
Continue to review full report at Codecov.
|
@tralves Please, when you get the chance, can you review my changes? I believe everything is OK - just want to make sure I haven't missed anything / messed something up in the process. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for taking so long. I was testing this version in a project with other issues that I wanted to make sure had nothing to with it.
The code seems ok and worked as expected.
The only problem I found is that the new 2.6 <v-slot>
syntax still doesn't work. I pointed out that issue in the original PR thread. I'd say it's still worth merging this PR as it brings other Vue 2.6 features and then I'll open an issue about the slots.
@tralves Have you rebuilt the project? I have tested the new slot syntax (samples/app/445.js) and it was working! |
I dug a little deeper and found out that it doesn't work when using .vue components. E.g: App.vue (doesn't work): <template>
<Frame>
<Page>
<ActionBar title="Vue 2.6 - v-slot #445" />
<CurrentUser>
<template v-slot="scope">
<Label :text="scope.counter" />
</template>
</CurrentUser>
</Page>
</Frame>
</template>
<script >
import CurrentUser from "~/components/CurrentUser";
export default {
components: { CurrentUser }
};
</script> Appjs.js (works!!) import Vue from 'nativescript-vue';
import CurrentUser from './CurrentUser';
export default Vue.component('Appjs', {
components: { CurrentUser },
template: `
<Page>
<ActionBar title="Vue 2.6 - v-slot #445" />
<CurrentUser>
<template v-slot="scope">
<Label :text="scope.counter" />
</template>
</CurrentUser>
</Page>
`
}); Template compiler? |
…and .vue files (#476) * feat (samples): Run the samples using a webpack bundle. Closer to real-world NS-vue apps. Allow any aditional parameters to the tns command like --hmr or whatever. * feat (samples): Add a sample with a Vue component to check the HMR feature. * Change NPM dev script to build to dist/index.js. Remove the dev:dist script as it is not useful now. Document new features * feat (samples): Fix live reload when changing the NS-vue code * feat (sample): Adapt all the import to nativescript-vue * feat (samples): Separate the details page into a new .vue component for better UX * fix (samples): Fix the 455.js sample which is now adapted to the new samples infrastructure * chore (v-slot): Add sample (currently failing) for testing v-slot in a .vue component
@tralves @msaelices Fixed it - the issue was that webpack was using a published version rather than the local version that has been updated to support the v-slot syntax. I've ran the |
@rigor789 @msaelices yup! it's working! |
In NativeScript CLI 6.0.0 release the bundle workflow will be the only one available. Currently, the nativescript-vue has some hooks that verify bundle is passed. There's no need of them for 6.0.0 release. Implement a check based on the CLI's version and skip the validation in case CLI is 6.x.x or newer.
the template compiler needs to be able to run in a node environment (webpack), so we need to make sure to not rely on tns modules directly, and only require them in runtime contexts
This PR brings nativescript-vue up to date with vue 2.6.10.
Updates all dependencies, and pins them to finer control of their versions in the future.
Based on changes in #445 and #486
Some things left to do: