diff --git a/gulpfile.babel.js b/gulpfile.babel.js index c3d669f5..0228f223 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -48,7 +48,7 @@ const externalConfig = { external: [ 'axios', 'js-base64', - 'es6-promise', + 'babel-runtime', 'debug', 'utf8' ], diff --git a/lib/Repository.js b/lib/Repository.js index 301e1230..7204805f 100644 --- a/lib/Repository.js +++ b/lib/Repository.js @@ -504,7 +504,8 @@ class Repository extends Requestable { * @return {Promise} - the promise for the http request */ updatePullRequst(number, options, cb) { - log('Deprecated: This method contains a typo and it has been deprecated. It will be removed in next major version. Use updatePullRequest() instead.'); + log('Deprecated: This method contains a typo and it has been deprecated. It will be removed in next major ' + + 'version. Use updatePullRequest() instead.'); return this.updatePullRequest(number, options, cb); } diff --git a/lib/Requestable.js b/lib/Requestable.js index 95c23bbd..d1c99003 100644 --- a/lib/Requestable.js +++ b/lib/Requestable.js @@ -8,14 +8,9 @@ import axios from 'axios'; import debug from 'debug'; import {Base64} from 'js-base64'; -import {polyfill} from 'es6-promise'; const log = debug('github:request'); -if (typeof Promise === 'undefined') { - polyfill(); -} - /** * The error structure returned when a network call fails */ diff --git a/package.json b/package.json index c942525d..5a162020 100644 --- a/package.json +++ b/package.json @@ -25,14 +25,9 @@ "es2015" ], "plugins": [ - [ - "transform-es2015-modules-umd", - { - "globals": { - "es6-promise": "Promise" - } - } - ] + "add-module-exports", + "transform-runtime", + "transform-es2015-modules-umd" ], "env": { "development": { @@ -46,14 +41,16 @@ ], "dependencies": { "axios": "^0.10.0", + "babel-runtime": "^6.9.2", "debug": "^2.2.0", - "es6-promise": "^3.0.2", "js-base64": "^2.1.9", "utf8": "^2.1.1" }, "devDependencies": { "babel-core": "^6.7.7", + "babel-plugin-add-module-exports": "^0.2.1", "babel-plugin-transform-es2015-modules-umd": "^6.5.0", + "babel-plugin-transform-runtime": "^6.9.0", "babel-preset-es2015": "^6.5.0", "babel-register": "^6.7.2", "babelify": "^7.3.0",