From 58491e54a63bb90e6529a71710852197b2ad857d Mon Sep 17 00:00:00 2001 From: MinjiK Date: Fri, 9 Feb 2024 15:52:21 +0100 Subject: [PATCH] remove bluebird --- package.json | 1 - src/amadeus.js | 8 ++++---- src/amadeus/client.js | 5 ++--- src/amadeus/client/access_token.js | 6 +++--- src/amadeus/client/pagination.js | 4 ++-- 5 files changed, 11 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 5ab8c71..4fc743e 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,6 @@ "watch": "^1.0.2" }, "dependencies": { - "bluebird": "^3.7.2", "qs": "^6.11.0" } } diff --git a/src/amadeus.js b/src/amadeus.js index 4065c47..71d2f29 100644 --- a/src/amadeus.js +++ b/src/amadeus.js @@ -100,7 +100,7 @@ class Amadeus { * ``` * * @param response the previous response for an API call - * @return {Promise.} a Bluebird Promise + * @return {Promise.} a Promise */ previous(response) { return this.pagination.page('previous', response); } @@ -121,7 +121,7 @@ class Amadeus { * ``` * * @param response the previous response for an API call - * @return {Promise.} a Bluebird Promise + * @return {Promise.} a Promise */ next(response) { return this.pagination.page('next', response); } @@ -143,7 +143,7 @@ class Amadeus { * ``` * * @param response the previous response for an API call - * @return {Promise.} a Bluebird Promise + * @return {Promise.} a Promise */ first(response) { return this.pagination.page('first', response); } @@ -164,7 +164,7 @@ class Amadeus { * ``` * * @param response the previous response for an API call - * @return {Promise.} a Bluebird Promise + * @return {Promise.} a Promise */ last(response) { return this.pagination.page('last', response); } } diff --git a/src/amadeus/client.js b/src/amadeus/client.js index d83c381..9d06277 100644 --- a/src/amadeus/client.js +++ b/src/amadeus/client.js @@ -1,5 +1,4 @@ import EventEmitter from 'events'; -import Promise from 'bluebird'; import util from 'util'; import AccessToken from './client/access_token'; @@ -183,10 +182,10 @@ class Client { } /** - * Builds a Bluebird Promise to be returned to the API user + * Builds a Promise to be returned to the API user * * @param {type} emitter the event emitter to notify of changes - * @return {Promise} a Bluebird promise + * @return {Promise} a promise * @private */ buildPromise(emitter) { diff --git a/src/amadeus/client/access_token.js b/src/amadeus/client/access_token.js index f0e3a04..d966dfd 100644 --- a/src/amadeus/client/access_token.js +++ b/src/amadeus/client/access_token.js @@ -26,7 +26,7 @@ class AccessToken { * token before making an API call. * * @param {Client} client the Amadeus Client to make an API call with - * @return {Promise.} a Bluebird Promise + * @return {Promise.} a Promise * @protected */ bearerToken(client) { @@ -39,10 +39,10 @@ class AccessToken { // PRIVATE /** - * Builds a Bluebird promise to be returned to the API user + * Builds a promise to be returned to the API user * * @param {type} emitter the EventEmitter used to notify the Promise of - * @return {Promise} a Bluebird promise + * @return {Promise} a promise * @private */ promise(emitter) { diff --git a/src/amadeus/client/pagination.js b/src/amadeus/client/pagination.js index 780011b..7da0fb9 100644 --- a/src/amadeus/client/pagination.js +++ b/src/amadeus/client/pagination.js @@ -17,7 +17,7 @@ class Pagination { * as a link in the meta links in the response * @param {type} response the response containing the links to the next pages, * and the request used to make the previous call - * @return {Promise.} a Bluebird Promise + * @return {Promise.} a Promise * @protected */ page(pageName, response) { @@ -38,7 +38,7 @@ class Pagination { * * @param {type} request the request used to make the previous call * @param {type} pageNumber the page number to fetch - * @return {Promise.} a Bluebird Promise + * @return {Promise.} a Promise * @private */ call(request, pageNumber) {