redux-zero
Advanced tools
Comparing version 4.13.0 to 4.13.1
# Changelog | ||
### 4.13.1 | ||
- Adding protection to `window` for SSR on devtools | ||
### 4.13.0 | ||
@@ -4,0 +8,0 @@ |
@@ -69,3 +69,3 @@ 'use strict'; | ||
}; }; }; | ||
if (window !== undefined && window.__REDUX_DEVTOOLS_EXTENSION__) { | ||
if (typeof window === "object" && window.__REDUX_DEVTOOLS_EXTENSION__) { | ||
exports.connect = function (initialState) { | ||
@@ -72,0 +72,0 @@ devTools.instance = window.__REDUX_DEVTOOLS_EXTENSION__.connect(); |
@@ -1,1 +0,1 @@ | ||
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(t["redux-zero"]={})}(this,function(t){"use strict";function n(t,n){var e=r.find(function(n){return t.name===n.key});return e||(e={key:t.name,fn:n},r.push(e)),e}function e(t,n){var e=JSON.parse(n.state),i=function(n){if("initialState"===n.type)t.setState(e.computedStates[0].state);else{var i=r.find(function(t){return n.type===t.key});i&&i.fn()}},a=Object.keys(e.actionsById).filter(function(t){return parseInt(t,10)<=n.payload.id}),o=0;setTimeout(function t(){i(e.actionsById[a[o]].action),++o>=a.length||setTimeout(t,u)},0)}function i(t){"DISPATCH"===t.type&&("JUMP_TO_ACTION"===t.payload.type||"JUMP_TO_STATE"===t.payload.type?this.setState(JSON.parse(t.state)):"TOGGLE_ACTION"===t.payload.type&&e(this,t))}function a(t,n){if(!n.initialized){var e=i.bind(t);o.instance.subscribe(e),n.initialized=!0}}var o={instance:null},r=[],u=10,c=function(t){return function(e,i){return function(r){var u=e(r);a(t,c),n(r,function(){return e(r)});var s={type:r.name,args:i};return u&&u.then?u.then(function(){return o.instance.send(s,t.getState())}):(o.instance.send(s,t.getState()),u)}}};void 0!==window&&window.__REDUX_DEVTOOLS_EXTENSION__&&(t.connect=function(t){return o.instance=window.__REDUX_DEVTOOLS_EXTENSION__.connect(),o.instance.send("initialState",t),c}),Object.defineProperty(t,"__esModule",{value:!0})}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t["redux-zero"]={})}(this,function(t){"use strict";function e(t,e){var n=r.find(function(e){return t.name===e.key});return n||(n={key:t.name,fn:e},r.push(n)),n}function n(t,e){var n=JSON.parse(e.state),i=function(e){if("initialState"===e.type)t.setState(n.computedStates[0].state);else{var i=r.find(function(t){return e.type===t.key});i&&i.fn()}},a=Object.keys(n.actionsById).filter(function(t){return parseInt(t,10)<=e.payload.id}),o=0;setTimeout(function t(){i(n.actionsById[a[o]].action),++o>=a.length||setTimeout(t,u)},0)}function i(t){"DISPATCH"===t.type&&("JUMP_TO_ACTION"===t.payload.type||"JUMP_TO_STATE"===t.payload.type?this.setState(JSON.parse(t.state)):"TOGGLE_ACTION"===t.payload.type&&n(this,t))}function a(t,e){if(!e.initialized){var n=i.bind(t);o.instance.subscribe(n),e.initialized=!0}}var o={instance:null},r=[],u=10,c=function(t){return function(n,i){return function(r){var u=n(r);a(t,c),e(r,function(){return n(r)});var s={type:r.name,args:i};return u&&u.then?u.then(function(){return o.instance.send(s,t.getState())}):(o.instance.send(s,t.getState()),u)}}};"object"==typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&(t.connect=function(t){return o.instance=window.__REDUX_DEVTOOLS_EXTENSION__.connect(),o.instance.send("initialState",t),c}),Object.defineProperty(t,"__esModule",{value:!0})}); |
{ | ||
"name": "redux-zero", | ||
"version": "4.13.0", | ||
"version": "4.13.1", | ||
"description": "", | ||
@@ -13,4 +13,6 @@ "main": "dist/redux-zero.js", | ||
"test:watch": "jest --watch", | ||
"format": "prettier --write rollup.config.js \"config/**/*.js\" \"src/**/*.ts\" \"src/**/*.tsx\"", | ||
"check": "npm run compile && npm run format && npm run lint && npm run test", | ||
"format": | ||
"prettier --write rollup.config.js \"config/**/*.js\" \"src/**/*.ts\" \"src/**/*.tsx\"", | ||
"check": | ||
"npm run compile && npm run format && npm run lint && npm run test", | ||
"clean": "rimraf dist coverage", | ||
@@ -44,16 +46,8 @@ "prebuild": "npm run check && npm run clean", | ||
"jest": { | ||
"moduleFileExtensions": [ | ||
"ts", | ||
"tsx", | ||
"js" | ||
], | ||
"setupFiles": [ | ||
"<rootDir>/config/testSetup.js" | ||
], | ||
"moduleFileExtensions": ["ts", "tsx", "js"], | ||
"setupFiles": ["<rootDir>/config/testSetup.js"], | ||
"transform": { | ||
"^.+\\.(ts|tsx)$": "<rootDir>/config/preprocessor.js" | ||
}, | ||
"testMatch": [ | ||
"<rootDir>/src/**/*.spec.(ts|tsx)" | ||
] | ||
"testMatch": ["<rootDir>/src/**/*.spec.(ts|tsx)"] | ||
}, | ||
@@ -60,0 +54,0 @@ "devDependencies": { |
@@ -344,2 +344,5 @@ <h1 align="center"> | ||
- [Redux-Zero Tools](https://github.com/nyteshade/rzero-tools) | ||
- [redux-zero persist middleware](https://github.com/axetroy/redux-zero-persist) | ||
- [redux-zero logger middleware](https://github.com/axetroy/redux-zero-logger) | ||
- [redux loading middleware](https://github.com/andre-araujo/redux-loading-middleware) | ||
@@ -346,0 +349,0 @@ ## Inspiration |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
63331
363