@common.js/p-retry 6.2.0 → 6.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/index.js +10 -7
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -2,4 +2,4 @@
2
2
 
3
3
  The [p-retry](https://www.npmjs.com/package/p-retry) package exported as CommonJS modules.
4
4
 
5
- Exported from [p-retry@6.2.0](https://www.npmjs.com/package/p-retry/v/6.2.0) using https://github.com/etienne-martin/common.js.
5
+ Exported from [p-retry@6.2.1](https://www.npmjs.com/package/p-retry/v/6.2.1) using https://github.com/etienne-martin/common.js.
package/index.js CHANGED
@@ -310,6 +310,7 @@ var __generator = (void 0) && (void 0).__generator || function(thisArg, body) {
310
310
  };
311
311
  }
312
312
  };
313
+ var _options, _options1, _options2;
313
314
  var AbortError = /*#__PURE__*/ function(Error1) {
314
315
  "use strict";
315
316
  _inherits(AbortError, Error1);
@@ -347,13 +348,15 @@ function _pRetry() {
347
348
  return [
348
349
  2,
349
350
  new Promise(function(resolve, reject) {
350
- options = _objectSpread({
351
- onFailedAttempt: function onFailedAttempt() {},
352
- retries: 10,
353
- shouldRetry: function() {
354
- return true;
355
- }
356
- }, options);
351
+ options = _objectSpread({}, options);
352
+ var _onFailedAttempt;
353
+ (_onFailedAttempt = (_options = options).onFailedAttempt) !== null && _onFailedAttempt !== void 0 ? _onFailedAttempt : _options.onFailedAttempt = function() {};
354
+ var _shouldRetry;
355
+ (_shouldRetry = (_options1 = options).shouldRetry) !== null && _shouldRetry !== void 0 ? _shouldRetry : _options1.shouldRetry = function() {
356
+ return true;
357
+ };
358
+ var _retries;
359
+ (_retries = (_options2 = options).retries) !== null && _retries !== void 0 ? _retries : _options2.retries = 10;
357
360
  var operation = _retry.default.operation(options);
358
361
  var abortHandler = function() {
359
362
  var ref;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@common.js/p-retry",
3
- "version": "6.2.0",
3
+ "version": "6.2.1",
4
4
  "description": "p-retry package exported as CommonJS modules",
5
5
  "license": "MIT",
6
6
  "repository": "etienne-martin/common.js",