From b66057197e9e18492349ec898cb0ff382ab834df Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Mon, 8 Apr 2019 18:27:11 -0400 Subject: [PATCH] stop requring promise Since Node 0.12, Promise has been built-in and available as a global. For a while, we used a Promise library because `Promise.race` was not available. It is available now. --- clients/client/src/client.js | 1 - libraries/api/test/noncemanager_test.js | 1 - libraries/app/src/index.js | 1 - libraries/testing/test/fakeauth_test.js | 1 - libraries/validate/src/publish.js | 1 - package.json | 1 - services/hooks/src/data.js | 1 - services/hooks/src/scheduler.js | 1 - 8 files changed, 8 deletions(-) diff --git a/clients/client/src/client.js b/clients/client/src/client.js index 3d6fee2dfe5..52e21b61817 100644 --- a/clients/client/src/client.js +++ b/clients/client/src/client.js @@ -12,7 +12,6 @@ let crypto = require('crypto'); let slugid = require('slugid'); let http = require('http'); let https = require('https'); -let Promise = require('promise'); let querystring = require('querystring'); let tcUrl = require('taskcluster-lib-urls'); diff --git a/libraries/api/test/noncemanager_test.js b/libraries/api/test/noncemanager_test.js index 3dfd05756f4..72c3653c1b8 100644 --- a/libraries/api/test/noncemanager_test.js +++ b/libraries/api/test/noncemanager_test.js @@ -1,6 +1,5 @@ const API = require('../src/api'); const assert = require('assert'); -const Promise = require('promise'); const debug = require('debug')('base:test:nonceManager'); const testing = require('taskcluster-lib-testing'); diff --git a/libraries/app/src/index.js b/libraries/app/src/index.js index 193adf5d2de..70d556d0143 100644 --- a/libraries/app/src/index.js +++ b/libraries/app/src/index.js @@ -3,7 +3,6 @@ let _ = require('lodash'); let debug = require('debug')('base:app'); let assert = require('assert'); let morganDebug = require('morgan-debug'); -let Promise = require('promise'); let http = require('http'); let sslify = require('express-sslify'); let hsts = require('hsts'); diff --git a/libraries/testing/test/fakeauth_test.js b/libraries/testing/test/fakeauth_test.js index ba8f5a98dce..e3706c8c673 100644 --- a/libraries/testing/test/fakeauth_test.js +++ b/libraries/testing/test/fakeauth_test.js @@ -7,7 +7,6 @@ const MonitorManager = require('taskcluster-lib-monitor'); const App = require('taskcluster-lib-app'); const assert = require('assert'); const taskcluster = require('taskcluster-client'); -const Promise = require('promise'); const path = require('path'); const libUrls = require('taskcluster-lib-urls'); const testing = require('taskcluster-lib-testing'); diff --git a/libraries/validate/src/publish.js b/libraries/validate/src/publish.js index 9030beddb7d..51d8bc84ba3 100644 --- a/libraries/validate/src/publish.js +++ b/libraries/validate/src/publish.js @@ -1,7 +1,6 @@ const _ = require('lodash'); const assert = require('assert'); const debug = require('debug')('taskcluster-lib-validate'); -const Promise = require('promise'); const fs = require('fs'); const path = require('path'); const mkdirp = require('mkdirp'); diff --git a/package.json b/package.json index c975f772546..99d0ad93403 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,6 @@ "nodemailer": "^6.0.0", "passport": "^0.4.0", "passport-github": "^1.1.0", - "promise": "^8.0.1", "promisepipe": "^3.0.0", "quick-lru": "^4.0.0", "ramda": "^0.26.0", diff --git a/services/hooks/src/data.js b/services/hooks/src/data.js index b4dad1694ba..311bb888342 100644 --- a/services/hooks/src/data.js +++ b/services/hooks/src/data.js @@ -1,5 +1,4 @@ const Entity = require('azure-entities'); -const Promise = require('promise'); const _ = require('lodash'); /** Entity for tracking hooks and associated state **/ diff --git a/services/hooks/src/scheduler.js b/services/hooks/src/scheduler.js index 9695b12ee89..ec12647f26f 100644 --- a/services/hooks/src/scheduler.js +++ b/services/hooks/src/scheduler.js @@ -3,7 +3,6 @@ const events = require('events'); const Entity = require('azure-entities'); const data = require('./data'); const debug = require('debug')('hooks:scheduler'); -const Promise = require('promise'); const taskcluster = require('taskcluster-client'); const nextDate = require('./nextdate'); const taskcreator = require('./taskcreator');