Skip to content

Commit 03cbca3

Browse files
authored
Merge pull request #1 from vue-electron/master
Update to v1.0.3
2 parents 6a4019b + da0a035 commit 03cbca3

File tree

6 files changed

+1046
-561
lines changed

6 files changed

+1046
-561
lines changed

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Changelog
2+
3+
### 1.0.3
4+
5+
- Move `electron`, `vue`, and `vuex` to `devDependencies`
6+
7+
### 1.0.2
8+
9+
- Increase code coverage
10+
11+
### 1.0.1
12+
13+
- Update documentation
14+
- Use `combineMerge` as the default `arrayMerge` option (@Stormtv)
15+
16+
### 1.0.0
17+
18+
- Initial version

README.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -99,18 +99,10 @@ createPersistedState({
9999
})
100100
```
101101

102-
## Development Roadmap
103-
104-
- [x] Configure ESLint and Prettier
105-
- [x] Configure Travis CI and CodeClimate
106-
- [x] Minify package
107-
- [x] Write tests
108-
- [x] Write docs
109-
110102
### Author
111103

112104
Andrew Emelianenko
113-
[@emelianenkooo](https://www.instagram.com/emelianenkooo/)
105+
IG: [@truemelianenko](https://www.instagram.com/truemelianenko)
114106

115107
### License
116108

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vuex-electron",
3-
"version": "1.0.0",
3+
"version": "1.0.3",
44
"description": "Vuex Electron",
55
"keywords": [
66
"vue",
@@ -44,18 +44,18 @@
4444
"babel-plugin-add-module-exports": "^0.2.1",
4545
"babel-preset-minify": "^0.4.3",
4646
"bundlesize": "^0.17.0",
47+
"electron": "^2.0.8",
4748
"eslint": "^5.5.0",
4849
"eslint-config-prettier": "^3.0.1",
4950
"eslint-plugin-jest": "^21.22.0",
5051
"eslint-plugin-prettier": "^2.6.2",
5152
"jest": "^23.6.0",
52-
"prettier": "^1.14.2"
53+
"prettier": "^1.14.2",
54+
"vue": "^2.5.17",
55+
"vuex": "^3.0.1"
5356
},
5457
"dependencies": {
5558
"deepmerge": "^2.1.1",
56-
"electron": "^2.0.8",
57-
"electron-store": "^2.0.0",
58-
"vue": "^2.5.17",
59-
"vuex": "^3.0.1"
59+
"electron-store": "^2.0.0"
6060
}
6161
}

src/persisted-state.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ class PersistedState {
6363
const emptyTarget = (value) => (Array.isArray(value) ? [] : {})
6464
const clone = (value, options) => merge(emptyTarget(value), value, options)
6565
const destination = target.slice()
66+
6667
source.forEach(function(e, i) {
6768
if (typeof destination[i] === "undefined") {
6869
const cloneRequested = options.clone !== false
@@ -74,6 +75,7 @@ class PersistedState {
7475
destination.push(e)
7576
}
7677
})
78+
7779
return destination
7880
}
7981

tests/persisted-state.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ describe("createPersistedState", () => {
4141
const storage = createStorage()
4242
const randomNumber = Math.floor(Math.random() * (10 - 3 + 1) + 3)
4343

44-
storage.set("state", { count: randomNumber })
44+
storage.set("state", { count: randomNumber, array: [1, 2, 3] })
4545

4646
const store = createStore({ persistedState: { storage } })
4747

0 commit comments

Comments
 (0)