@logux/vuex
Advanced tools
Comparing version 0.1.1 to 0.1.2
# Change Log | ||
This project adheres to [Semantic Versioning](http://semver.org/). | ||
## 0.1.2 | ||
* Fixed possible bugs | ||
## 0.1.1 | ||
* Fixed peerDependencies | ||
* Move to yarn from npm | ||
* More familiar API for Vue developers | ||
* `createLoguxStore` renamed to `createLogux` | ||
* `createLogux` return `{ Store }` | ||
## 0.1.0 | ||
* Initial release. | ||
@@ -109,5 +109,6 @@ let { createNanoEvents } = require('nanoevents') | ||
function replaceState (state, actions, pushHistory) { | ||
let last = actions[actions.length - 1][1] | ||
let newState = actions.reduceRight((prev, [action, id]) => { | ||
let changed = deepCopy(prev) | ||
let last = actions[actions.length - 1][1] | ||
if (vuexConfig.mutations[action.type]) { | ||
@@ -121,2 +122,3 @@ vuexConfig.mutations[action.type](changed, action) | ||
} | ||
return changed | ||
@@ -181,5 +183,3 @@ }, state) | ||
if (!replayed) { | ||
replaceState(deepCopy(vuexConfig.state), actions.concat([ | ||
[{ type: '@@redux/INIT' }] | ||
])) | ||
replaceState(deepCopy(vuexConfig.state), actions) | ||
} | ||
@@ -186,0 +186,0 @@ } |
{ | ||
"name": "@logux/vuex", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Vuex compatible API for Logux", | ||
@@ -28,9 +28,9 @@ "keywords": [ | ||
"@logux/core": "logux/core", | ||
"nanoevents": "^5.1.2", | ||
"nanoevents": "^5.1.5", | ||
"vuex": "^3.1.3" | ||
}, | ||
"devDependencies": { | ||
"@logux/eslint-config": "^36.1.1", | ||
"@logux/eslint-config": "^36.1.2", | ||
"@logux/sharec-config": "^0.6.2", | ||
"@size-limit/preset-small-lib": "^4.4.0", | ||
"@size-limit/preset-small-lib": "^4.4.2", | ||
"docdash": "^1.2.0", | ||
@@ -46,9 +46,9 @@ "eslint": "^6.8.0", | ||
"eslint-plugin-standard": "^4.0.1", | ||
"eslint-plugin-unicorn": "^17.2.0", | ||
"eslint-plugin-unicorn": "^18.0.1", | ||
"husky": "^4.2.3", | ||
"jest": "^25.1.0", | ||
"lint-staged": "^10.0.8", | ||
"jest": "^25.2.3", | ||
"lint-staged": "^10.0.9", | ||
"nanodelay": "^1.0.1", | ||
"rimraf": "^3.0.2", | ||
"size-limit": "^4.4.0", | ||
"size-limit": "^4.4.2", | ||
"vue": "^2.6.11" | ||
@@ -55,0 +55,0 @@ }, |
@@ -1,2 +0,2 @@ | ||
# Vuex Logux | ||
# Logux Vuex | ||
@@ -12,4 +12,5 @@ <img align="right" width="95" height="148" title="Logux logotype" | ||
This repository contains Vuex compatible API on top of [Logux Client]. | ||
This repository contains [Vuex] compatible API on top of [Logux Client]. | ||
[Vuex]: https://vuex.vuejs.org | ||
[Logux Client]: https://github.com/logux/client | ||
@@ -35,10 +36,12 @@ [logux.io]: https://logux.io/ | ||
const Logux = createLoguxStore({ | ||
credentials: userToken, | ||
const Logux = createLogux({ | ||
subprotocol: '1.0.0', | ||
server: 'wss://example.com:1337', | ||
userId: userToken | ||
server: process.env.NODE_ENV === 'development' | ||
? 'ws://localhost:31337' | ||
: 'wss://logux.example.com', | ||
userId: false, | ||
credentials: '' | ||
}) | ||
export default new Logux.Store({ | ||
const store = new Logux.Store({ | ||
state: {}, | ||
@@ -49,4 +52,10 @@ mutations: {}, | ||
}) | ||
log(store.client) | ||
store.client.start() | ||
export default store | ||
``` | ||
[documentation]: https://github.com/logux/docs |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
14292
59
2
319
Updatednanoevents@^5.1.5