promise-retry
Advanced tools
Comparing version 1.1.1 to 2.0.0
@@ -34,3 +34,3 @@ 'use strict'; | ||
throw errcode('Retrying', 'EPROMISERETRY', { retried: err }); | ||
throw errcode(new Error('Retrying'), 'EPROMISERETRY', { retried: err }); | ||
}, number); | ||
@@ -37,0 +37,0 @@ }) |
{ | ||
"name": "promise-retry", | ||
"version": "1.1.1", | ||
"version": "2.0.0", | ||
"description": "Retries a function that returns a promise, leveraging the power of the retry module.", | ||
@@ -27,8 +27,8 @@ "main": "index.js", | ||
"expect.js": "^0.3.1", | ||
"mocha": "^3.0.0", | ||
"sleep-promise": "^2.0.0" | ||
"mocha": "^8.0.1", | ||
"sleep-promise": "^8.0.1" | ||
}, | ||
"dependencies": { | ||
"err-code": "^1.0.0", | ||
"retry": "^0.10.0" | ||
"err-code": "^2.0.2", | ||
"retry": "^0.12.0" | ||
}, | ||
@@ -35,0 +35,0 @@ "engines": { |
# node-promise-retry | ||
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency status][david-dm-image]][david-dm-url] [![Dev Dependency status][david-dm-dev-image]][david-dm-dev-url] | ||
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency status][david-dm-image]][david-dm-url] [![Dev Dependency status][david-dm-dev-image]][david-dm-dev-url] [![Greenkeeper badge][greenkeeper-image]][greenkeeper-url] | ||
@@ -12,4 +12,6 @@ [npm-url]:https://npmjs.org/package/promise-retry | ||
[david-dm-image]:https://img.shields.io/david/IndigoUnited/node-promise-retry.svg | ||
[david-dm-dev-url]:https://david-dm.org/IndigoUnited/node-promise-retry#info=devDependencies | ||
[david-dm-dev-url]:https://david-dm.org/IndigoUnited/node-promise-retry?type=dev | ||
[david-dm-dev-image]:https://img.shields.io/david/dev/IndigoUnited/node-promise-retry.svg | ||
[greenkeeper-image]:https://badges.greenkeeper.io/IndigoUnited/node-promise-retry.svg | ||
[greenkeeper-url]:https://greenkeeper.io/ | ||
@@ -43,4 +45,4 @@ Retries a function that returns a promise, leveraging the power of the [retry](https://github.com/tim-kos/node-retry) module to the promises world. | ||
The `fn` function will receive a `retry` function as its first argument that should be called with an error whenever you want to retry `fn`. The `retry` function will always throw an error. | ||
If there's retries left, it will throw a special `retry` error that will be handled internally to call `fn` again. | ||
If there's no retries left, it will throw the actual error passed to it. | ||
If there are retries left, it will throw a special `retry` error that will be handled internally to call `fn` again. | ||
If there are no retries left, it will throw the actual error passed to it. | ||
@@ -47,0 +49,0 @@ If you prefer, you can pass the options first using the alternative function signature `promiseRetry([options], fn)`. |
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
15558
95
8
1
+ Addederr-code@2.0.3(transitive)
+ Addedretry@0.12.0(transitive)
- Removederr-code@1.1.2(transitive)
- Removedretry@0.10.1(transitive)
Updatederr-code@^2.0.2
Updatedretry@^0.12.0