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

electron-redux

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

electron-redux - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

dist/__mocks__/debug.js

2

dist/helpers/validateAction.js

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

if (!(0, _fluxStandardAction.isFSA)(action)) {
log('Action not FSA-compliant', action);
log('WARNING! Action not FSA-compliant', action);

@@ -23,0 +23,0 @@ return false;

@@ -9,2 +9,6 @@ 'use strict';

var _validateAction = require('../../helpers/validateAction');
var _validateAction2 = _interopRequireDefault(_validateAction);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -15,2 +19,18 @@

describe('forwardToMain', function () {
beforeEach(function () {
_validateAction2.default.mockReturnValue(true);
});
it('should pass an action through if it doesn\'t pass validation (FSA)', function () {
var next = jest.fn();
// thunk action
var action = function action() {};
_validateAction2.default.mockReturnValue(false);
(0, _forwardToMain2.default)()(next)(action);
expect(next).toHaveBeenCalledTimes(1);
expect(next).toHaveBeenCalledWith(action);
});
it('should pass an action through if it starts with @@', function () {

@@ -17,0 +37,0 @@ var next = jest.fn();

@@ -19,2 +19,4 @@ 'use strict';

// eslint-disable-line no-unused-vars
console.log('##### forwardToMain', action);
// return next(action);
if (!(0, _validateAction2.default)(action)) return next(action);

@@ -21,0 +23,0 @@

@@ -20,2 +20,3 @@ 'use strict';

return function (action) {
console.log('##### forwardToRenderer', action);
if (!(0, _validateAction2.default)(action)) return next(action);

@@ -22,0 +23,0 @@

{
"name": "electron-redux",
"version": "1.2.1",
"version": "1.2.2",
"description": "Use redux in the main and browser process in electron",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -87,5 +87,5 @@ # electron-redux

Actions fired *HAVE TO* be [FSA](https://github.com/acdlite/flux-standard-action#example)-compliant, i.e. have a `type` and `payload` property. Any actions not passing this test will be ignored and simply passed through to the next middleware.
Actions fired **HAVE TO** be [FSA](https://github.com/acdlite/flux-standard-action#example)-compliant, i.e. have a `type` and `payload` property. Any actions not passing this test will be ignored and simply passed through to the next middleware.
*NB: `redux-thunk` is not FSA-compliant out of the box, but can still produce compatible actions once the async action fires.*
> NB: `redux-thunk` is not FSA-compliant out of the box, but can still produce compatible actions once the async action fires.

@@ -92,0 +92,0 @@ ### Local actions (renderer process)

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