From 7150b922e8755a22917d806aa8aa44202b61a281 Mon Sep 17 00:00:00 2001 From: belohlavek Date: Thu, 1 Aug 2019 16:32:01 -0300 Subject: [PATCH] fix: storage middleware types --- package-lock.json | 74 +++++++--------------------------- package.json | 2 +- src/modules/storage/actions.ts | 10 +++-- 3 files changed, 21 insertions(+), 65 deletions(-) diff --git a/package-lock.json b/package-lock.json index b9a05225..d049c0bd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -819,11 +819,6 @@ "@types/react": "*" } }, - "@types/redux-actions": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/@types/redux-actions/-/redux-actions-2.6.1.tgz", - "integrity": "sha512-zKgK+ATp3sswXs6sOYo1tk8xdXTy4CTaeeYrVQlClCjeOpag5vzPo0ASWiiBJ7vsiQRAdb3VkuFLnDoBimF67g==" - }, "@types/redux-storage": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/@types/redux-storage/-/redux-storage-4.1.0.tgz", @@ -2744,7 +2739,7 @@ "integrity": "sha1-jZWCAsftuq6Dlwf7pvCf8ydgYhA=", "dev": true, "requires": { - "ethereumjs-abi": "git+https://github.com/ethereumjs/ethereumjs-abi.git", + "ethereumjs-abi": "git+https://github.com/ethereumjs/ethereumjs-abi.git#8431eab7b3384e65e8126a4602520b78031666fb", "ethereumjs-util": "^5.1.1" } }, @@ -3787,7 +3782,7 @@ }, "is-obj": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "resolved": "http://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", "dev": true }, @@ -4054,11 +4049,6 @@ "verror": "1.10.0" } }, - "just-curry-it": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/just-curry-it/-/just-curry-it-3.1.0.tgz", - "integrity": "sha512-mjzgSOFzlrurlURaHVjnQodyPNvrHrf1TbQP2XU9NSqBtHQPuHZ+Eb6TAJP7ASeJN9h9K0KXoRTs8u6ouHBKvg==" - }, "keccak": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/keccak/-/keccak-1.4.0.tgz", @@ -8303,7 +8293,6 @@ "version": "0.1.4", "bundled": true, "dev": true, - "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -9246,8 +9235,7 @@ "longest": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "lru-cache": { "version": "4.1.3", @@ -10970,11 +10958,6 @@ "esprima": "~4.0.0" } }, - "reduce-reducers": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/reduce-reducers/-/reduce-reducers-0.4.3.tgz", - "integrity": "sha512-+CNMnI8QhgVMtAt54uQs3kUxC3Sybpa7Y63HR14uGLgI9/QR5ggHvpxwhGGe3wmx5V91YwqQIblN9k5lspAmGw==" - }, "redux": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/redux/-/redux-3.7.2.tgz", @@ -10987,31 +10970,18 @@ "symbol-observable": "^1.0.3" } }, - "redux-actions": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/redux-actions/-/redux-actions-2.6.5.tgz", - "integrity": "sha512-pFhEcWFTYNk7DhQgxMGnbsB1H2glqhQJRQrtPb96kD3hWiZRzXHwwmFPswg6V2MjraXRXWNmuP9P84tvdLAJmw==", - "requires": { - "invariant": "^2.2.4", - "just-curry-it": "^3.1.0", - "loose-envify": "^1.4.0", - "reduce-reducers": "^0.4.3", - "to-camel-case": "^1.0.0" - } - }, "redux-persistence": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/redux-persistence/-/redux-persistence-1.1.1.tgz", - "integrity": "sha512-ZFI8WUvJZ9m8Qp1Xnd0wnSQKvCH2wxCw6rf6tATG+dAdVZ1X33omeaiK00QQHbBgIPnlQ34urSdyv4IWAE8zmA==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/redux-persistence/-/redux-persistence-1.1.2.tgz", + "integrity": "sha512-AImvn9FMZGQKMyBcT5taLtNA4Dfuc2/iTdpoKtGd71CKAWpEn5/Bdzwxz6esSrrGz3BIWHZBHTyh872yLrkd2g==", "requires": { "@types/lodash": "^4.14.136", "@types/node": "^12.6.8", - "@types/redux-actions": "^2.6.1", "@types/sinon": "^7.0.13", "fp-future": "^1.0.1", "lodash": "^4.17.14", - "redux-actions": "^2.6.5", - "redux-storage-merger-simple": "^1.0.5" + "redux-storage-merger-simple": "^1.0.5", + "typesafe-actions": "^4.4.2" }, "dependencies": { "@types/node": { @@ -11023,6 +10993,11 @@ "version": "4.17.15", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + }, + "typesafe-actions": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/typesafe-actions/-/typesafe-actions-4.4.2.tgz", + "integrity": "sha512-QW61P4cOX8dCNmrfpcUMjvU/MF/sFTC8/PlG9215W1gKDzZUBjRGdyYSO6ZcEUNsn491S2VpryJOHSIVSDqJrg==" } } }, @@ -11833,25 +11808,12 @@ "integrity": "sha512-rru86D9CpQRLvsFG5XFdy0KdLAvjdQDyZCsRcuu60WtzFylDM3eAWSxEVz5kzL2Gp544XiUvPbVKtOA/txLi9Q==", "dev": true }, - "to-camel-case": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/to-camel-case/-/to-camel-case-1.0.0.tgz", - "integrity": "sha1-GlYFSy+daWKYzmamCJcyK29CPkY=", - "requires": { - "to-space-case": "^1.0.0" - } - }, "to-fast-properties": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", "dev": true }, - "to-no-case": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/to-no-case/-/to-no-case-1.0.2.tgz", - "integrity": "sha1-xyKQcWTvaxeBMsjmmTAhLRtKoWo=" - }, "to-px": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/to-px/-/to-px-1.1.0.tgz", @@ -11870,14 +11832,6 @@ "is-number": "^7.0.0" } }, - "to-space-case": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/to-space-case/-/to-space-case-1.0.0.tgz", - "integrity": "sha1-sFLar7Gysp3HcM6gFj5ewOvJ/Bc=", - "requires": { - "to-no-case": "^1.0.0" - } - }, "touch-pinch": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/touch-pinch/-/touch-pinch-1.0.1.tgz", @@ -12353,7 +12307,7 @@ "integrity": "sha512-VU6/DSUX93d1fCzBz7WP/SGCQizO1rKZi4Px9j/3yRyfssHyFcZamMw2/sj4E8TlfMXONvZLoforR8B4bRoyTQ==", "dev": true, "requires": { - "bignumber.js": "git+https://github.com/frozeman/bignumber.js-nolookahead.git", + "bignumber.js": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934", "crypto-js": "^3.1.4", "utf8": "^2.1.1", "xhr2-cookies": "^1.1.0", diff --git a/package.json b/package.json index eebd2714..48e7d9f3 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "date-fns": "^1.29.0", "flat": "^4.1.0", "react-intl": "^2.4.0", - "redux-persistence": "^1.1.1", + "redux-persistence": "^1.1.2", "redux-storage-decorator-filter": "^1.1.8", "redux-storage-engine-localstorage": "^1.1.4", "tslint": "^5.7.0", diff --git a/src/modules/storage/actions.ts b/src/modules/storage/actions.ts index f189566d..d5ddfca6 100644 --- a/src/modules/storage/actions.ts +++ b/src/modules/storage/actions.ts @@ -1,4 +1,6 @@ -import { LOAD, SAVE } from 'redux-persistence' - -export const STORAGE_LOAD = LOAD -export const STORAGE_SAVE = SAVE +export { + LoadAction, + SaveAction, + LOAD as STORAGE_LOAD, + SAVE as STORAGE_SAVE +} from 'redux-persistence'