hookstore-logger
Advanced tools
Comparing version 0.1.1 to 0.1.2
import _regeneratorRuntime from "@babel/runtime/regenerator"; | ||
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator"; | ||
// import { detailedDiff } from 'deep-object-diff'; | ||
import { diff } from 'deep-diff'; | ||
import clonedeep from 'lodash.clonedeep'; | ||
var dictionary = { | ||
@@ -61,3 +61,3 @@ E: { | ||
_regeneratorRuntime.mark(function _callee(ctx, next) { | ||
var namespace, action, state, clone, prevState, time, result, changes; | ||
var namespace, action, state, prevState, time, result, changes; | ||
return _regeneratorRuntime.wrap(function _callee$(_context) { | ||
@@ -67,4 +67,4 @@ while (1) { | ||
case 0: | ||
namespace = ctx.namespace, action = ctx.action, state = ctx.state, clone = ctx.clone; | ||
prevState = clone(state); | ||
namespace = ctx.namespace, action = ctx.action, state = ctx.state; | ||
prevState = clonedeep(state); | ||
time = new Date(); | ||
@@ -71,0 +71,0 @@ _context.next = 5; |
@@ -16,3 +16,4 @@ "use strict"; | ||
// import { detailedDiff } from 'deep-object-diff'; | ||
var _lodash = _interopRequireDefault(require("lodash.clonedeep")); | ||
var dictionary = { | ||
@@ -74,3 +75,3 @@ E: { | ||
_regenerator.default.mark(function _callee(ctx, next) { | ||
var namespace, action, state, clone, prevState, time, result, changes; | ||
var namespace, action, state, prevState, time, result, changes; | ||
return _regenerator.default.wrap(function _callee$(_context) { | ||
@@ -80,4 +81,4 @@ while (1) { | ||
case 0: | ||
namespace = ctx.namespace, action = ctx.action, state = ctx.state, clone = ctx.clone; | ||
prevState = clone(state); | ||
namespace = ctx.namespace, action = ctx.action, state = ctx.state; | ||
prevState = (0, _lodash.default)(state); | ||
time = new Date(); | ||
@@ -84,0 +85,0 @@ _context.next = 5; |
{ | ||
"name": "hookstore-logger", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "simple logger middleware for hookstore", | ||
@@ -12,8 +12,7 @@ "main": "lib/index.js", | ||
"@types/deep-diff": "^1.0.0", | ||
"@types/lodash.clonedeep": "^4.5.6", | ||
"deep-diff": "^1.0.2", | ||
"hookstore": "0.1.1" | ||
"hookstore": "^0.1.0", | ||
"lodash.clonedeep": "^4.5.0" | ||
}, | ||
"peerDependencies": { | ||
"hookstore": "^0.1.0" | ||
}, | ||
"files": [ | ||
@@ -41,4 +40,3 @@ "lib", | ||
], | ||
"license": "MIT", | ||
"gitHead": "e7125a269872a942d215bf55493bac4ccf21ec4c" | ||
"license": "MIT" | ||
} |
@@ -1,3 +0,3 @@ | ||
// import { detailedDiff } from 'deep-object-diff'; | ||
import { diff } from 'deep-diff'; | ||
import clonedeep from 'lodash.clonedeep'; | ||
import { Context, Next } from 'hookstore'; | ||
@@ -47,4 +47,4 @@ | ||
export default async (ctx: Context, next: Next) => { | ||
const { namespace, action, state, clone } = ctx; | ||
const prevState = clone(state); | ||
const { namespace, action, state } = ctx; | ||
const prevState = clonedeep(state); | ||
const time = new Date(); | ||
@@ -51,0 +51,0 @@ |
9045
6
7
+ Addedlodash.clonedeep@^4.5.0
+ Added@types/lodash@4.17.14(transitive)
+ Added@types/lodash.clonedeep@4.5.9(transitive)
+ Addedhookstore@0.1.6(transitive)
+ Addedlodash.isequal@4.5.0(transitive)
- Removedhookstore@0.1.1(transitive)
Updatedhookstore@^0.1.0