Skip to content

Commit

Permalink
UPGRADE: support for Vue3 and Vuex4git add -A
Browse files Browse the repository at this point in the history
Signed-off-by: Arnav Gupta <[email protected]>
  • Loading branch information
championswimmer committed Nov 22, 2021
1 parent d667cc2 commit afa358a
Show file tree
Hide file tree
Showing 37 changed files with 587 additions and 560 deletions.
363 changes: 126 additions & 237 deletions dist/cjs/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/cjs/index.js.map

Large diffs are not rendered by default.

363 changes: 126 additions & 237 deletions dist/esm/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/esm/index.js.map

Large diffs are not rendered by default.

235 changes: 227 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
"url": "https://github.com/championswimmer/vuex-module-decorators/issues"
},
"peerDependencies": {
"vue": ">=2",
"vuex": ">=3"
"vue": ">=3",
"vuex": ">=4"
},
"homepage": "https://github.com/championswimmer/vuex-module-decorators#readme",
"devDependencies": {
Expand All @@ -64,9 +64,9 @@
"tslint-eslint-rules": "^5.4.0",
"tslint-plugin-prettier": "^2.3.0",
"typescript": "^4.5.2",
"vue": "^2.6.10",
"vue": "^3.2.22",
"vuepress": "^1.0.3",
"vuex": "^3.1.1",
"vuex": "^4.0.2",
"vuex-persist": "^2.2.0"
},
"dependencies": {},
Expand Down
8 changes: 5 additions & 3 deletions test/action_access_module_dynamic.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import Vuex, { Module as Mod, Store } from 'vuex'
import Vue from 'vue'
Vue.use(Vuex)
import { createApp } from 'vue'
import { Action, Module, Mutation, VuexModule } from '..'
import { expect } from 'chai'
import { getModule } from '../src/vuexmodule'
Expand Down Expand Up @@ -30,9 +29,12 @@ class MyModule extends VuexModule {
}
}
}
const app = createApp({})
app.use(store)


describe('@Action with dynamic module', () => {
it('should concat foo & bar', async function() {
it('should concat foo & bar', async function () {
const mm = getModule(MyModule)
await store.dispatch('concatFooOrBar', 't1')
expect(mm.fieldBar).to.equal('bart1')
Expand Down
6 changes: 4 additions & 2 deletions test/action_access_state.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import Vuex, { Module as Mod, Store } from 'vuex'
import Vue from 'vue'
Vue.use(Vuex)
import { createApp } from 'vue'
import { Action, Module, Mutation, MutationAction, VuexModule } from '..'
import { expect } from 'chai'

Expand Down Expand Up @@ -60,6 +59,9 @@ const store = new Vuex.Store({
mm: MyModule
}
})
const app = createApp({})
app.use(store)


describe('@Action with non-dynamic module', () => {
it('should concat foo & bar', async function() {
Expand Down
6 changes: 4 additions & 2 deletions test/action_with_inner_promise.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Vuex from 'vuex'
import Vue from 'vue'
Vue.use(Vuex)
import { createApp } from 'vue'

import { Action, Module, MutationAction, VuexModule } from '..'
import { expect } from 'chai'

Expand Down Expand Up @@ -29,6 +29,8 @@ const store = new Vuex.Store({
mm: MyModule
}
})
const app = createApp({})
app.use(store)

describe('actions return inner promises', () => {
it('should return resolved value', async function() {
Expand Down
Loading

0 comments on commit afa358a

Please sign in to comment.