Skip to content

Commit

Permalink
Merge pull request #135 from markandrus/remove-when
Browse files Browse the repository at this point in the history
fix: remove dependency on when in favor of native Promises
  • Loading branch information
FGRibreau authored Aug 24, 2021
2 parents a1189ef + 52d0603 commit 42cedad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
*
*/
var extend = require('extend');
var when = require('when');
var request = require('request');
var RetryStrategies = require('./strategies');
var _ = require('lodash');
Expand All @@ -22,7 +21,7 @@ var DEFAULTS = {

// Default promise factory which use bluebird
function defaultPromiseFactory(resolver) {
return when.promise(resolver);
return new Promise(resolver);
}

function _cloneOptions(options) {
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@
},
"dependencies": {
"extend": "^3.0.2",
"lodash": "^4.17.15",
"when": "^3.7.7"
"lodash": "^4.17.15"
},
"peerDependencies": {
"request": "2.*.*"
Expand Down

0 comments on commit 42cedad

Please sign in to comment.