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

remote-redux-devtools

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remote-redux-devtools - npm Package Compare versions

Comparing version 0.1.6 to 0.1.7

12

lib/configureStore.js

@@ -6,14 +6,10 @@ 'use strict';

var _instrument = require('redux-devtools/lib/instrument');
var _reduxDevtoolsInstrument = require('redux-devtools-instrument');
var _instrument2 = _interopRequireDefault(_instrument);
var _reduxDevtoolsInstrument2 = _interopRequireDefault(_reduxDevtoolsInstrument);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function configureStore(next) {
var subscriber = arguments.length <= 1 || arguments[1] === undefined ? function () {
return {};
} : arguments[1];
return (0, _instrument2.default)(subscriber)(next);
function configureStore(next, subscriber, options) {
return (0, _reduxDevtoolsInstrument2.default)(subscriber, options)(next);
}

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

function relay(type, state, action, nextActionId) {
function relay(type, state, action, nextActionId, isExcess) {
if (filters && isFiltered(action)) return;

@@ -47,2 +47,3 @@ setTimeout(function () {

name: instanceName,
isExcess: isExcess,
init: shouldInit

@@ -125,3 +126,3 @@ };

function handleChange(state, liftedState) {
function handleChange(state, liftedState, maxAge) {
var nextActionId = liftedState.nextActionId;

@@ -134,3 +135,4 @@ var liftedAction = liftedState.actionsById[nextActionId - 1];

if (lastAction === 'JUMP_TO_STATE') return;
relay('ACTION', state, liftedAction, nextActionId);
var isExcess = maxAge && liftedState.stagedActionIds.length === maxAge;
relay('ACTION', state, liftedAction, nextActionId, isExcess);
} else {

@@ -142,8 +144,9 @@ relay('STATE', filterStagedActions(liftedState));

function devTools(options) {
var maxAge = options.maxAge || 30;
return function (next) {
return function (reducer, initialState) {
store = (0, _configureStore2.default)(next, monitorReducer)(reducer, initialState);
store = (0, _configureStore2.default)(next, monitorReducer, { maxAge: maxAge })(reducer, initialState);
init(options);
store.subscribe(function () {
handleChange(store.getState(), store.liftedStore.getState());
handleChange(store.getState(), store.liftedStore.getState(), maxAge);
});

@@ -150,0 +153,0 @@ return store;

{
"name": "remote-redux-devtools",
"version": "0.1.6",
"version": "0.1.7",
"description": "Relay Redux actions to remote Redux DevTools.",

@@ -56,5 +56,5 @@ "main": "lib/index.js",

"querystring": "^0.2.0",
"redux-devtools": "^3.1.1",
"redux-devtools-instrument": "^1.0.0",
"socketcluster-client": "^4.3.7"
}
}

@@ -65,2 +65,3 @@ Remote Redux DevTools

`filters` | Map of arrays named `whitelist` or `blacklist` to filter action types.
`maxAge` | Number of maximum allowed actions to be stored on the history tree, the oldest actions are removed once maxAge is reached. Default is `30`.

@@ -77,3 +78,3 @@

initialState,
devTools({ hostname: 'localhost', port: 8000, name: 'Android app', filters: { blacklist: ['EFFECT_RESOLVED'] }})
devTools({ name: 'Android app', hostname: 'localhost', port: 8000, maxAge: 30, filters: { blacklist: ['EFFECT_RESOLVED'] }})
);

@@ -80,0 +81,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