From e65c1d0e9eb86bd0dbe774a5658d582f1a2c3297 Mon Sep 17 00:00:00 2001 From: Mattias Nixell Date: Tue, 28 Jul 2020 12:01:09 +0300 Subject: [PATCH] Add es6-promisify to replace bluebird promisify --- package.json | 1 + src/management/ManagementTokenProvider.js | 4 ++-- yarn.lock | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index b1ab938f1..cde9c20e4 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "dependencies": { "axios": "^0.19.2", "bluebird": "^3.5.5", + "es6-promisify": "^6.1.1", "form-data": "^3.0.0", "jsonwebtoken": "^8.5.1", "jwks-rsa": "^1.8.0", diff --git a/src/management/ManagementTokenProvider.js b/src/management/ManagementTokenProvider.js index 274162dbf..741c869b0 100644 --- a/src/management/ManagementTokenProvider.js +++ b/src/management/ManagementTokenProvider.js @@ -2,7 +2,7 @@ var ArgumentError = require('rest-facade').ArgumentError; var assign = Object.assign || require('object.assign'); var AuthenticationClient = require('../auth'); var memoizer = require('lru-memoizer'); -var Promise = require('bluebird'); +var es6Promisify = require('es6-promisify'); var DEFAULT_OPTIONS = { enableCache: true }; @@ -73,7 +73,7 @@ var ManagementTokenProvider = function(options) { this.authenticationClient = new AuthenticationClient(authenticationClientOptions); var self = this; - this.getCachedAccessToken = Promise.promisify( + this.getCachedAccessToken = es6Promisify.promisify( memoizer({ load: function(options, callback) { self diff --git a/yarn.lock b/yarn.lock index 01a19177e..d19d65621 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1548,7 +1548,7 @@ es6-promisify@^5.0.0: dependencies: es6-promise "^4.0.3" -es6-promisify@^6.0.0: +es6-promisify@^6.0.0, es6-promisify@^6.1.1: version "6.1.1" resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-6.1.1.tgz#46837651b7b06bf6fff893d03f29393668d01621" integrity sha512-HBL8I3mIki5C1Cc9QjKUenHtnG0A5/xA8Q/AllRcfiwl2CZFXGK7ddBiCoRwAix4i2KxcQfjtIVcrVbB3vbmwg==