Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

redux-devtools

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redux-devtools - npm Package Compare versions

Comparing version 3.2.0 to 3.3.0

3

lib/createDevTools.js
'use strict';
exports.__esModule = true;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
exports.__esModule = true;
exports.default = createDevTools;

@@ -7,0 +8,0 @@

@@ -10,3 +10,3 @@ 'use strict';

get: function get() {
return _instrument.default;
return _interopRequireDefault(_instrument).default;
}

@@ -32,3 +32,3 @@ });

get: function get() {
return _persistState.default;
return _interopRequireDefault(_persistState).default;
}

@@ -42,4 +42,6 @@ });

get: function get() {
return _createDevTools.default;
return _interopRequireDefault(_createDevTools).default;
}
});
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
'use strict';
exports.__esModule = true;
exports.ActionCreators = exports.ActionTypes = undefined;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

@@ -7,4 +10,2 @@

exports.__esModule = true;
exports.ActionCreators = exports.ActionTypes = undefined;
exports.default = instrument;

@@ -20,2 +21,6 @@

var _symbolObservable = require('symbol-observable');
var _symbolObservable2 = _interopRequireDefault(_symbolObservable);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -87,3 +92,3 @@

var nextState = state;
var nextError = undefined;
var nextError = void 0;
try {

@@ -174,2 +179,3 @@ nextState = reducer(state, action);

function commitExcessActions(n) {

@@ -313,7 +319,7 @@ // Auto-commits n-number of excess actions.

}
var actionId = nextActionId++;
var _actionId = nextActionId++;
// Mutation! This is the hottest path, and we optimize on purpose.
// It is safe because we set a new key in a cache dictionary.
actionsById[actionId] = liftedAction;
stagedActionIds = [].concat(stagedActionIds, [actionId]);
actionsById[_actionId] = liftedAction;
stagedActionIds = [].concat(stagedActionIds, [_actionId]);
// Optimization: we know that only the new action needs computing.

@@ -395,6 +401,16 @@ minInvalidatedStateIndex = stagedActionIds.length - 1;

function unliftStore(liftedStore, liftReducer) {
var lastDefinedState = undefined;
var _extends2;
return _extends({}, liftedStore, {
var lastDefinedState = void 0;
function getState() {
var state = unliftState(liftedStore.getState());
if (state !== undefined) {
lastDefinedState = state;
}
return lastDefinedState;
}
return _extends({}, liftedStore, (_extends2 = {
liftedStore: liftedStore,

@@ -406,13 +422,28 @@

},
getState: function getState() {
var state = unliftState(liftedStore.getState());
if (state !== undefined) {
lastDefinedState = state;
}
return lastDefinedState;
},
getState: getState,
replaceReducer: function replaceReducer(nextReducer) {
liftedStore.replaceReducer(liftReducer(nextReducer));
}
});
}, _extends2[_symbolObservable2.default] = function () {
return _extends({}, liftedStore[_symbolObservable2.default](), {
subscribe: function subscribe(observer) {
if ((typeof observer === 'undefined' ? 'undefined' : _typeof(observer)) !== 'object') {
throw new TypeError('Expected the observer to be an object.');
}
function observeState() {
if (observer.next) {
observer.next(getState());
}
}
observeState();
var unsubscribe = liftedStore.subscribe(observeState);
return { unsubscribe: unsubscribe };
}
});
}, _extends2));
}

@@ -429,2 +460,8 @@

/* eslint-disable no-eq-null */
if (options.maxAge != null && options.maxAge < 2) {
/* eslint-enable */
throw new Error('DevTools.instrument({ maxAge }) option, if specified, ' + 'may not be less than 2.');
}
return function (createStore) {

@@ -431,0 +468,0 @@ return function (reducer, initialState, enhancer) {

'use strict';
exports.__esModule = true;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
exports.__esModule = true;
exports.default = persistState;

@@ -50,3 +51,3 @@

var finalInitialState = undefined;
var finalInitialState = void 0;
try {

@@ -53,0 +54,0 @@ var json = localStorage.getItem(key);

{
"name": "redux-devtools",
"version": "3.2.0",
"version": "3.3.0",
"description": "Redux DevTools with hot reloading and time travel",

@@ -57,6 +57,7 @@ "main": "lib/index.js",

"rimraf": "^2.3.4",
"rxjs": "^5.0.0-beta.6",
"webpack": "^1.11.0"
},
"peerDependencies": {
"redux": "^3.0.0",
"redux": "^3.5.0",
"react": "^0.14.0 || ^15.0.0-rc.1"

@@ -67,4 +68,5 @@ },

"react-redux": "^4.0.0",
"redux": "^3.2.1"
"redux": "^3.5.2",
"symbol-observable": "^0.2.4"
}
}
import difference from 'lodash/difference';
import union from 'lodash/union';
import $$observable from 'symbol-observable';

@@ -386,2 +387,10 @@ export const ActionTypes = {

function getState() {
const state = unliftState(liftedStore.getState());
if (state !== undefined) {
lastDefinedState = state;
}
return lastDefinedState;
}
return {

@@ -397,12 +406,27 @@ ...liftedStore,

getState() {
const state = unliftState(liftedStore.getState());
if (state !== undefined) {
lastDefinedState = state;
}
return lastDefinedState;
},
getState,
replaceReducer(nextReducer) {
liftedStore.replaceReducer(liftReducer(nextReducer));
},
[$$observable]() {
return {
...liftedStore[$$observable](),
subscribe(observer) {
if (typeof observer !== 'object') {
throw new TypeError('Expected the observer to be an object.');
}
function observeState() {
if (observer.next) {
observer.next(getState());
}
}
observeState();
const unsubscribe = liftedStore.subscribe(observeState);
return { unsubscribe };
}
};
}

@@ -416,2 +440,11 @@ };

export default function instrument(monitorReducer = () => null, options = {}) {
/* eslint-disable no-eq-null */
if (options.maxAge != null && options.maxAge < 2) {
/* eslint-enable */
throw new Error(
'DevTools.instrument({ maxAge }) option, if specified, ' +
'may not be less than 2.'
);
}
return createStore => (reducer, initialState, enhancer) => {

@@ -418,0 +451,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc