Skip to content

Commit

Permalink
(general): bump deps, cleanup, prettierrc (#694)
Browse files Browse the repository at this point in the history
* (general): bump deps, cleanup, prettierrc

* more
  • Loading branch information
rt2zz authored Feb 1, 2018
1 parent 0db73d3 commit 0cab4f0
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 15 deletions.
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
parser: flow
semi: false
trailingComma: es5
singleQuote: true
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"flow-copy": "flow-copy-source src es && flow-copy-source src lib",
"precommit": "lint-staged",
"prepublishOnly": "npm run clean && npm run build",
"test": "BABEL_ENV=commonjs ava"
"test": "flow && BABEL_ENV=commonjs ava"
},
"lint-staged": {
"src/**/*.js": [
Expand All @@ -40,7 +40,7 @@
"babel": "inherit"
},
"devDependencies": {
"ava": "^0.19.1",
"ava": "^0.25.0",
"babel-cli": "^6.26.0",
"babel-eslint": "^8.0.1",
"babel-plugin-transform-class-properties": "^6.24.1",
Expand All @@ -51,19 +51,19 @@
"babel-preset-flow": "^6.23.0",
"babel-register": "^6.24.1",
"cross-env": "^5.0.1",
"eslint": "^4.8.0",
"eslint-plugin-flowtype": "^2.30.4",
"eslint": "^4.16.0",
"eslint-plugin-flowtype": "^2.42.0",
"eslint-plugin-import": "^2.2.0",
"flow-bin": "^0.64.0",
"flow-copy-source": "^1.1.0",
"husky": "^0.13.3",
"lint-staged": "^3.4.0",
"flow-copy-source": "^1.2.2",
"husky": "^0.14.3",
"lint-staged": "^6.1.0",
"lodash": "^4.17.4",
"prettier": "^1.4.4",
"prettier": "^1.10.2",
"redux": "^3.6.0",
"redux-mock-store": "^1.2.3",
"redux-mock-store": "^1.5.1",
"rimraf": "^2.6.1",
"sinon": "^2.3.2",
"sinon": "^4.2.2",
"storage-memory": "0.0.2"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/integration/getStoredStateMigrateV4.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ function getStoredStateV4(v4Config: V4Config) {
try {
let data = serialized ? deserializer(serialized) : undefined
state = transforms.reduceRight((subState, transformer) => {
return transformer.out(subState, key)
return transformer.out(subState, key, {})
}, data)
} catch (err) {
if (process.env.NODE_ENV !== 'production')
Expand Down
5 changes: 4 additions & 1 deletion src/persistCombineReducers.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ export default function persistCombineReducers(
config: PersistConfig,
reducers: Reducers
): Reducer {
config.stateReconciler = config.stateReconciler === undefined ? autoMergeLevel2 : config.stateReconciler
config.stateReconciler =
config.stateReconciler === undefined
? autoMergeLevel2
: config.stateReconciler
return persistReducer(config, combineReducers(reducers))
}
6 changes: 3 additions & 3 deletions src/purgeStoredState.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import { KEY_PREFIX } from './constants'

export default function purgeStoredState(config: PersistConfig) {
const storage = config.storage
const storageKey = `${config.keyPrefix !== undefined
? config.keyPrefix
: KEY_PREFIX}${config.key}`
const storageKey = `${
config.keyPrefix !== undefined ? config.keyPrefix : KEY_PREFIX
}${config.key}`
return storage.removeItem(storageKey, warnIfRemoveError)
}

Expand Down

0 comments on commit 0cab4f0

Please sign in to comment.