redux-toolbelt-saga
Advanced tools
Comparing version 2.1.5 to 3.0.0-alpha.0
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
@@ -6,10 +6,11 @@ Object.defineProperty(exports, "__esModule", { | ||
}); | ||
exports.makeAsyncSaga = undefined; | ||
Object.defineProperty(exports, "makeAsyncSaga", { | ||
enumerable: true, | ||
get: function get() { | ||
return _makeAsyncSaga2["default"]; | ||
} | ||
}); | ||
var _makeAsyncSaga2 = require('./makeAsyncSaga'); | ||
var _makeAsyncSaga2 = _interopRequireDefault(require("./makeAsyncSaga")); | ||
var _makeAsyncSaga3 = _interopRequireDefault(_makeAsyncSaga2); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
exports.makeAsyncSaga = _makeAsyncSaga3.default; | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
@@ -6,19 +6,16 @@ Object.defineProperty(exports, "__esModule", { | ||
}); | ||
exports["default"] = makeAsyncSaga; | ||
var _regenerator = require('babel-runtime/regenerator'); | ||
var _effects = require("redux-saga/effects"); | ||
var _regenerator2 = _interopRequireDefault(_regenerator); | ||
var _marked3 = /*#__PURE__*/regeneratorRuntime.mark(getArgs); | ||
var _toConsumableArray2 = require('babel-runtime/helpers/toConsumableArray'); | ||
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } | ||
var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); | ||
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } | ||
exports.default = makeAsyncSaga; | ||
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } | ||
var _effects = require('redux-saga/effects'); | ||
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var _marked3 = /*#__PURE__*/_regenerator2.default.mark(getArgs); | ||
/** | ||
@@ -32,4 +29,4 @@ * @param {AsyncActionCreator} asyncActionCreator | ||
function makeAsyncSaga(asyncActionCreator, fn) { | ||
var _marked = /*#__PURE__*/_regenerator2.default.mark(exec), | ||
_marked2 = /*#__PURE__*/_regenerator2.default.mark(waitFor); | ||
var _marked = /*#__PURE__*/regeneratorRuntime.mark(exec), | ||
_marked2 = /*#__PURE__*/regeneratorRuntime.mark(waitFor); | ||
@@ -40,3 +37,3 @@ var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; | ||
var args, result; | ||
return _regenerator2.default.wrap(function exec$(_context) { | ||
return regeneratorRuntime.wrap(function exec$(_context) { | ||
while (1) { | ||
@@ -56,3 +53,3 @@ switch (_context.prev = _context.next) { | ||
throw new Error('makeAsyncSaga expected an array of args, instead got: ' + args); | ||
throw new Error("makeAsyncSaga expected an array of args, instead got: ".concat(args)); | ||
@@ -62,3 +59,3 @@ case 5: | ||
_context.next = 8; | ||
return _effects.call.apply(undefined, [fn].concat((0, _toConsumableArray3.default)(args))); | ||
return _effects.call.apply(void 0, [fn].concat(_toConsumableArray(args))); | ||
@@ -76,3 +73,3 @@ case 8: | ||
_context.prev = 13; | ||
_context.t0 = _context['catch'](5); | ||
_context.t0 = _context["catch"](5); | ||
_context.next = 17; | ||
@@ -82,11 +79,11 @@ return (0, _effects.put)(asyncActionCreator.failure(_context.t0)); | ||
case 17: | ||
case 'end': | ||
case "end": | ||
return _context.stop(); | ||
} | ||
} | ||
}, _marked, this, [[5, 13]]); | ||
}, _marked, null, [[5, 13]]); | ||
} | ||
function waitFor() { | ||
return _regenerator2.default.wrap(function waitFor$(_context2) { | ||
return regeneratorRuntime.wrap(function waitFor$(_context2) { | ||
while (1) { | ||
@@ -99,7 +96,7 @@ switch (_context2.prev = _context2.next) { | ||
case 2: | ||
case 'end': | ||
case "end": | ||
return _context2.stop(); | ||
} | ||
} | ||
}, _marked2, this); | ||
}, _marked2); | ||
} | ||
@@ -111,3 +108,3 @@ | ||
function getArgs(action, options) { | ||
return _regenerator2.default.wrap(function getArgs$(_context3) { | ||
return regeneratorRuntime.wrap(function getArgs$(_context3) { | ||
while (1) { | ||
@@ -125,3 +122,3 @@ switch (_context3.prev = _context3.next) { | ||
case 3: | ||
return _context3.abrupt('return', _context3.sent); | ||
return _context3.abrupt("return", _context3.sent); | ||
@@ -134,3 +131,3 @@ case 4: | ||
return _context3.abrupt('return', options.args); | ||
return _context3.abrupt("return", options.args); | ||
@@ -143,13 +140,13 @@ case 6: | ||
return _context3.abrupt('return', [action.payload]); | ||
return _context3.abrupt("return", [action.payload]); | ||
case 8: | ||
return _context3.abrupt('return', []); | ||
return _context3.abrupt("return", []); | ||
case 9: | ||
case 'end': | ||
case "end": | ||
return _context3.stop(); | ||
} | ||
} | ||
}, _marked3, this); | ||
}, _marked3); | ||
} |
{ | ||
"name": "redux-toolbelt-saga", | ||
"version": "2.1.5", | ||
"version": "3.0.0-alpha.0", | ||
"description": "Saga helpers for redux-toolbelt", | ||
"main": "lib/index.js", | ||
"module": "src/index.js", | ||
"scripts": { | ||
"build": "cross-env BABEL_ENV=build babel src --out-dir lib && copyfiles -f \"src/*.d.ts\" lib" | ||
"build": "cross-env babel src --root-mode=upward --out-dir lib && copyfiles -f \"src/*.d.ts\" lib" | ||
}, | ||
@@ -20,9 +21,6 @@ "repository": "git+https://github.com/welldone-software/redux-toolbelt.git", | ||
"peerDependencies": { | ||
"redux-saga": "^0.15.6", | ||
"redux-toolbelt": ">= 2.2.2" | ||
"redux-saga": "^1.1.3", | ||
"redux-toolbelt": ">=2.2.6" | ||
}, | ||
"devDependencies": { | ||
"babel-plugin-transform-runtime": "^6.23.0" | ||
}, | ||
"gitHead": "1891eb08a967afe844e2dd317067b748e9675d93" | ||
"gitHead": "01a2ee50fccc90bf5fdba1bf3a1656e5908f3264" | ||
} |
@@ -1,2 +0,2 @@ | ||
import { makeAsyncActionCreator } from '../../redux-toolbelt/src' | ||
import { makeAsyncActionCreator } from 'redux-toolbelt' | ||
import { makeAsyncSaga } from '../src' | ||
@@ -3,0 +3,0 @@ |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
16071
0
354
1