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

redux-api-middleware

Package Overview
Dependencies
Maintainers
2
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redux-api-middleware - npm Package Compare versions

Comparing version 3.0.0-beta.2 to 3.0.0-beta.3

es/errors.test.js

10

es/middleware.js

@@ -73,3 +73,3 @@ 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; };

} catch (e) {
return next((await actionWith(_extends({}, requestType, {
return next((await actionWith(_extends({}, failureType, {
payload: new RequestError('[RSAA].bailout function failed'),

@@ -85,3 +85,3 @@ error: true

} catch (e) {
return next((await actionWith(_extends({}, requestType, {
return next((await actionWith(_extends({}, failureType, {
payload: new RequestError('[RSAA].endpoint function failed'),

@@ -98,3 +98,3 @@ error: true

} catch (e) {
return next((await actionWith(_extends({}, requestType, {
return next((await actionWith(_extends({}, failureType, {
payload: new RequestError('[RSAA].body function failed'),

@@ -111,3 +111,3 @@ error: true

} catch (e) {
return next((await actionWith(_extends({}, requestType, {
return next((await actionWith(_extends({}, failureType, {
payload: new RequestError('[RSAA].headers function failed'),

@@ -124,3 +124,3 @@ error: true

} catch (e) {
return next((await actionWith(_extends({}, requestType, {
return next((await actionWith(_extends({}, failureType, {
payload: new RequestError('[RSAA].options function failed'),

@@ -127,0 +127,0 @@ error: true

@@ -66,3 +66,3 @@ 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; };

*/
async function actionWith(descriptor, args) {
async function actionWith(descriptor, args = []) {
try {

@@ -69,0 +69,0 @@ descriptor.payload = typeof descriptor.payload === 'function' ? await descriptor.payload(...args) : descriptor.payload;

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

function actionWith(descriptor, args) {
if ( args === void 0 ) args = [];
return new Promise(function ($return, $error) {

@@ -344,3 +346,3 @@ var $Try_1_Post = function () {

try {
return actionWith(Object.assign({}, requestType,
return actionWith(Object.assign({}, failureType,
{payload: new RequestError('[RSAA].endpoint function failed'),

@@ -376,3 +378,3 @@ error: true}), [action,getState()]).then(function ($await_14) {

try {
return actionWith(Object.assign({}, requestType,
return actionWith(Object.assign({}, failureType,
{payload: new RequestError('[RSAA].body function failed'),

@@ -408,3 +410,3 @@ error: true}), [action,getState()]).then(function ($await_15) {

try {
return actionWith(Object.assign({}, requestType,
return actionWith(Object.assign({}, failureType,
{payload: new RequestError('[RSAA].headers function failed'),

@@ -440,3 +442,3 @@ error: true}), [action,getState()]).then(function ($await_16) {

try {
return actionWith(Object.assign({}, requestType,
return actionWith(Object.assign({}, failureType,
{payload: new RequestError('[RSAA].options function failed'),

@@ -581,3 +583,3 @@ error: true}), [action,getState()]).then(function ($await_17) {

try {
return actionWith(Object.assign({}, requestType,
return actionWith(Object.assign({}, failureType,
{payload: new RequestError('[RSAA].bailout function failed'),

@@ -584,0 +586,0 @@ error: true}), [action,getState()]).then(function ($await_24) {

{
"name": "redux-api-middleware",
"version": "3.0.0-beta.2",
"version": "3.0.0-beta.3",
"description": "Redux middleware for calling an API.",

@@ -13,6 +13,6 @@ "source": "src/index.js",

"postbuild": "npm run size",
"clean": "rimraf es lib coverage .nyc_output",
"test": "cross-env BABEL_ENV=test babel-node test/index.js | tap-spec",
"cover": "nyc npm test",
"lint": "eslint src test",
"clean": "rimraf es lib coverage",
"test": "cross-env BABEL_ENV=test jest",
"cover": "npm test -- --verbose --coverage --collectCoverageFrom \"src/**/*.js\"",
"lint": "eslint src",
"prepublishOnly": "npm run lint && npm test && npm run clean && npm run build",

@@ -38,3 +38,2 @@ "size": "size-limit"

"babel-cli": "^6.26.0",
"babel-plugin-istanbul": "^4.1.6",
"babel-plugin-transform-object-rest-spread": "^6.26.0",

@@ -45,12 +44,10 @@ "babel-preset-env": "^1.7.0",

"eslint": "^4.19.1",
"eslint-plugin-jest": "^21.17.0",
"eslint-plugin-prettier": "^2.6.0",
"isomorphic-fetch": "^2.2.1",
"jest": "^23.4.1",
"jest-fetch-mock": "^1.6.5",
"microbundle": "^0.5.1",
"nock": "^9.3.3",
"nyc": "^12.0.2",
"prettier": "^1.13.5",
"rimraf": "^2.6.2",
"size-limit": "^0.18.2",
"tap-spec": "^5.0.0 ",
"tape": "^4.9.1"
"size-limit": "^0.18.2"
},

@@ -62,3 +59,12 @@ "files": [

"lib"
]
],
"jest": {
"automock": false,
"resetMocks": true,
"restoreMocks": true,
"resetModules": true,
"setupFiles": [
"./test/setupJest.js"
]
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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