Skip to content

Commit

Permalink
chore: migrate latest Vuex 3 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kiaking committed May 11, 2020
1 parent af6971e commit f8833a9
Show file tree
Hide file tree
Showing 13 changed files with 2,681 additions and 1,227 deletions.
1 change: 0 additions & 1 deletion examples/classic/chat/app.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'babel-polyfill'
import { createApp } from 'vue'
import App from './components/App.vue'
import store from './store'
Expand Down
1 change: 0 additions & 1 deletion examples/classic/counter/app.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'babel-polyfill'
import { createApp } from 'vue'
import Counter from './Counter.vue'
import store from './store'
Expand Down
1 change: 0 additions & 1 deletion examples/composition/chat/app.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'babel-polyfill'
import { createApp } from 'vue'
import App from './components/App.vue'
import store from './store'
Expand Down
1 change: 0 additions & 1 deletion examples/composition/counter/app.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'babel-polyfill'
import { createApp } from 'vue'
import Counter from './Counter.vue'
import store from './store'
Expand Down
3 changes: 0 additions & 3 deletions examples/composition/shopping-cart/app.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import 'babel-polyfill'
import { createApp } from 'vue'
import App from './components/App.vue'
import store from './store'
import { currency } from './currency'

// Vue.filter('currency', currency)

const app = createApp(App)

app.use(store)
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
},
"homepage": "https://github.com/vuejs/vuex#readme",
"peerDependencies": {
"vue": "3.0.0-beta.4"
"vue": "^3.0.0-beta.10"
},
"devDependencies": {
"@babel/core": "^7.9.6",
Expand All @@ -53,6 +53,7 @@
"@rollup/plugin-node-resolve": "^7.1.3",
"@rollup/plugin-replace": "^2.3.2",
"@types/node": "^13.13.5",
"@vue/compiler-sfc": "^3.0.0-beta.10",
"babel-jest": "^26.0.1",
"babel-loader": "^8.1.0",
"brotli": "^1.3.2",
Expand All @@ -76,8 +77,8 @@
"semver": "^7.3.2",
"todomvc-app-css": "^2.1.0",
"typescript": "^3.8.3",
"vue": "^2.5.22",
"vue-loader": "^15.2.1",
"vue": "^3.0.0-beta.10",
"vue-loader": "^16.0.0-beta.1",
"vue-template-compiler": "^2.5.22",
"vuepress": "^0.14.1",
"vuepress-theme-vue": "^1.1.0",
Expand Down
File renamed without changes.
4 changes: 0 additions & 4 deletions test/setup.js
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
import 'regenerator-runtime/runtime'
import Vue from 'vue'
import Vuex from '@/index'

Vue.use(Vuex)
4 changes: 2 additions & 2 deletions test/unit/helpers.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { mount } from './support/helpers'
import Vuex, { mapState, mapMutations, mapGetters, mapActions, createNamespacedHelpers } from '../../src/index'
import { mount } from 'test/helpers'
import Vuex, { mapState, mapMutations, mapGetters, mapActions, createNamespacedHelpers } from '@/index'

describe('Helpers', () => {
it('mapState (array)', () => {
Expand Down
4 changes: 2 additions & 2 deletions test/unit/hot-reload.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { nextTick } from 'vue'
import { mount } from './support/helpers'
import Vuex from '../../src/index'
import { mount } from 'test/helpers'
import Vuex from '@/index'

const TEST = 'TEST'
const isSSR = process.env.VUE_ENV === 'server'
Expand Down
4 changes: 2 additions & 2 deletions test/unit/modules.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { nextTick } from 'vue'
import Vuex from '../../src/index'
import Vuex from '@/index'

const TEST = 'TEST'

Expand Down Expand Up @@ -758,7 +758,7 @@ describe('Modules', () => {
store.state
)
expect(afterSpy).not.toHaveBeenCalled()
Vue.nextTick(() => {
nextTick(() => {
expect(afterSpy).not.toHaveBeenCalledWith(
{ type: TEST, payload: 2 },
store.state
Expand Down
4 changes: 2 additions & 2 deletions test/unit/store.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { nextTick } from 'vue'
import { mount } from './support/helpers'
import Vuex from '@/src/index'
import { mount } from 'test/helpers'
import Vuex from '@/index'

const TEST = 'TEST'
const isSSR = process.env.VUE_ENV === 'server'
Expand Down
Loading

0 comments on commit f8833a9

Please sign in to comment.