Skip to content

Commit

Permalink
fix(ui): mergeData crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Chau committed Apr 9, 2018
1 parent 90e0901 commit 2ef6900
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 16 deletions.
2 changes: 1 addition & 1 deletion packages/@vue/cli-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"uglifyjs-webpack-plugin": "^1.2.2",
"url-loader": "^1.0.1",
"vue-loader": "^14.2.1",
"vue-template-compiler": "^2.5.13",
"vue-template-compiler": "^2.5.17-beta.0",
"webpack": "^3.10.0",
"webpack-chain": "^4.5.0",
"webpack-dev-server": "^2.11.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/@vue/cli-ui-addon-build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
"@vue/eslint-config-standard": "^3.0.0-beta.3",
"stylus": "^0.54.5",
"stylus-loader": "^3.0.1",
"vue-template-compiler": "^2.5.13"
"vue-template-compiler": "^2.5.17-beta.0"
},
"peerDependencies": {
"vue": "^2.5.13"
"vue": "^2.5.17-beta.0"
},
"browserslist": [
"> 1%",
Expand Down
4 changes: 2 additions & 2 deletions packages/@vue/cli-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"shortid": "^2.2.8",
"subscriptions-transport-ws": "^0.9.5",
"terminate": "^2.1.0",
"vue": "^2.5.13",
"vue": "^2.5.17-beta.0",
"vue-apollo": "^3.0.0-beta.5",
"vue-i18n": "^7.6.0",
"vue-instantsearch": "^1.5.1",
Expand All @@ -52,7 +52,7 @@
"stylus": "^0.54.5",
"stylus-loader": "^3.0.1",
"vue-cli-plugin-apollo": "^0.7.1",
"vue-template-compiler": "^2.5.13"
"vue-template-compiler": "^2.5.17-beta.0"
},
"browserslist": [
"> 1%",
Expand Down
10 changes: 5 additions & 5 deletions packages/@vue/cli-ui/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ import * as Filters from './filters'
import './register-components'
import ClientAddonApi from './util/ClientAddonApi'
import Responsive from './util/responsive'
import SharedData from './util/SharedData'
import PluginAction from './util/PluginAction'
import SharedData from './util/shared-data'
import PluginAction from './util/plugin-action'
import gql from 'graphql-tag'

window.gql = gql

Vue.use(VueUi)
Vue.use(SharedData)
Vue.use(PluginAction)
Vue.use(InstantSearch)
Vue.use(Responsive, {
computed: {
Expand All @@ -30,8 +31,7 @@ Vue.use(Responsive, {
}
}
})
Vue.use(SharedData)
Vue.use(PluginAction)
Vue.use(VueUi)

for (const key in Filters) {
Vue.filter(key, Filters[key])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default {
install (Vue) {
Vue.mixin({
methods: {
$callAction (id, params) {
$callPluginAction (id, params) {
return this.$apollo.mutate({
mutation: PLUGIN_ACTION_CALL,
variables: {
Expand All @@ -17,13 +17,13 @@ export default {
}
})
},
$onActionCalled (cb) {
$onPluginActionCalled (cb) {
return this.$apollo.addSmartSubscription(`plugin-action-called-${uid++}`, {
query: PLUGIN_ACTION_CALLED,
result: cb
})
},
$onActionResolved (cb) {
$onPluginActionResolved (cb) {
return this.$apollo.addSmartSubscription(`plugin-action-resolved-${uid++}`, {
query: PLUGIN_ACTION_RESOLVED,
result: cb
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export default {
})
return result.sharedData.value
},

$watchSharedData (id, cb) {
return this.$apollo.addSmartQuery(id, {
...genQuery(id),
Expand All @@ -71,6 +72,7 @@ export default {
}
})
},

$setSharedData (id, value) {
return this.$apollo.mutate({
mutation: SHARED_DATA_UPDATE,
Expand All @@ -80,6 +82,7 @@ export default {
}
})
},

$syncSharedData (options) {
const smartQueries = []
for (const key in options) {
Expand Down
10 changes: 7 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10813,9 +10813,9 @@ vue-style-loader@^4.0.1:
hash-sum "^1.0.2"
loader-utils "^1.0.2"

vue-template-compiler@^2.5.13:
version "2.5.13"
resolved "https://registry.yarnpkg.com/vue-template-compiler/-/vue-template-compiler-2.5.13.tgz#12a2aa0ecd6158ac5e5f14d294b0993f399c3d38"
vue-template-compiler@^2.5.17-beta.0:
version "2.5.17-beta.0"
resolved "https://registry.yarnpkg.com/vue-template-compiler/-/vue-template-compiler-2.5.17-beta.0.tgz#6653d4029bd6fc427de616ce626e7f1db63e615c"
dependencies:
de-indent "^1.0.2"
he "^1.1.0"
Expand All @@ -10828,6 +10828,10 @@ vue@^2.5.13:
version "2.5.13"
resolved "https://registry.yarnpkg.com/vue/-/vue-2.5.13.tgz#95bd31e20efcf7a7f39239c9aa6787ce8cf578e1"

vue@^2.5.17-beta.0:
version "2.5.17-beta.0"
resolved "https://registry.yarnpkg.com/vue/-/vue-2.5.17-beta.0.tgz#b9985447818827306beee146923a1bd64f1bb834"

vuex@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/vuex/-/vuex-3.0.1.tgz#e761352ebe0af537d4bb755a9b9dc4be3df7efd2"
Expand Down

0 comments on commit 2ef6900

Please sign in to comment.