Skip to content

Commit cf6d5a7

Browse files
committed
feat: adopt to @vuex-orm/[email protected]
1 parent 1077f4d commit cf6d5a7

File tree

5 files changed

+11
-19
lines changed

5 files changed

+11
-19
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"url": "https://github.com/vuex-orm/plugin-axios/issues"
4848
},
4949
"peerDependencies": {
50-
"@vuex-orm/core": "1.0.0-draft.3",
50+
"@vuex-orm/core": "1.0.0-draft.4",
5151
"vuex": ">=3.1.0"
5252
},
5353
"dependencies": {
@@ -60,7 +60,7 @@
6060
"@rollup/plugin-node-resolve": "^7.1.1",
6161
"@rollup/plugin-replace": "^2.3.1",
6262
"@types/jest": "^25.1.4",
63-
"@vuex-orm/core": "1.0.0-draft.3",
63+
"@vuex-orm/core": "1.0.0-draft.4",
6464
"axios-mock-adapter": "^1.18.1",
6565
"brotli": "^1.3.2",
6666
"chalk": "^3.0.0",

src/VuexORMAxios.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export interface Options {
88
}
99

1010
export const VuexORMAxios: VuexORMPlugin = {
11-
install(store, _database, components, options: Options = {}) {
11+
install(store, components, options: Options = {}) {
1212
storeMixin(store, options.axios)
1313
repositoryMixin(components.Repository)
1414
}

test/unit/VuexORMAxios.spec.ts

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import axios from 'axios'
22
import Vue from 'vue'
33
import Vuex, { Store } from 'vuex'
4-
import VuexORM, { Database, Model } from '@vuex-orm/core'
4+
import VuexORM, { Model } from '@vuex-orm/core'
55
import VuexORMAxios from '@/index'
66

77
Vue.use(Vuex)
@@ -13,12 +13,8 @@ describe('unit/VuexORMAxios', () => {
1313
}
1414

1515
it('can install the plugin', () => {
16-
const database = new Database()
17-
18-
database.register(User)
19-
2016
const store = new Store({
21-
plugins: [VuexORM.install(database)],
17+
plugins: [VuexORM.install()],
2218
strict: true
2319
})
2420

test/unit/VuexORMAxios_Without_Axios.spec.ts

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Vue from 'vue'
22
import Vuex, { Store } from 'vuex'
3-
import VuexORM, { Database, Model } from '@vuex-orm/core'
3+
import VuexORM, { Model } from '@vuex-orm/core'
44
import VuexORMAxios from '@/index'
55

66
Vue.use(Vuex)
@@ -12,12 +12,8 @@ describe('unit/VuexORMAxios', () => {
1212
}
1313

1414
it('can install the plugin without axios option', () => {
15-
const database = new Database()
16-
17-
database.register(User)
18-
1915
const store = new Store({
20-
plugins: [VuexORM.install(database)],
16+
plugins: [VuexORM.install()],
2117
strict: true
2218
})
2319

yarn.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -1534,10 +1534,10 @@
15341534
vuepress-plugin-container "^2.0.2"
15351535
vuepress-plugin-smooth-scroll "^0.0.3"
15361536

1537-
"@vuex-orm/[email protected].3":
1538-
version "1.0.0-draft.3"
1539-
resolved "https://registry.yarnpkg.com/@vuex-orm/core/-/core-1.0.0-draft.3.tgz#8fc270c96b2f524de7a0da5af3b5bce7e169d596"
1540-
integrity sha512-0BAUC5vCIfJIuJYHnbFv45t9MlsmppXRhmSTJtK6IaoMxkduIVaGtB445BRf2miqjsrAdSK9g3GkN4edl517/Q==
1537+
"@vuex-orm/[email protected].4":
1538+
version "1.0.0-draft.4"
1539+
resolved "https://registry.yarnpkg.com/@vuex-orm/core/-/core-1.0.0-draft.4.tgz#1ab5a6366c4d72fdd27a816a8fb6b5451efd7174"
1540+
integrity sha512-O6y1u5oFTz7mia5rpB/NkuvrxRuFP7gr0Ah73htEkz9dh90Vv+GJxPE16HhHktxXLzrw4c7dMXPbS9Xegms1mQ==
15411541
dependencies:
15421542
normalizr "^3.6.0"
15431543

0 commit comments

Comments
 (0)