From 96daebaa457e4cca8e7a85d588576b23e01842d7 Mon Sep 17 00:00:00 2001 From: Matt Smith Date: Thu, 14 Jul 2016 06:54:55 -0600 Subject: [PATCH 1/3] refactor(build): Add babel-plugin-add-module-exports to allow ECMA2015 module support --- package.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package.json b/package.json index c942525d..382662af 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "es2015" ], "plugins": [ + "add-module-exports", [ "transform-es2015-modules-umd", { @@ -53,6 +54,7 @@ }, "devDependencies": { "babel-core": "^6.7.7", + "babel-plugin-add-module-exports": "^0.2.1", "babel-plugin-transform-es2015-modules-umd": "^6.5.0", "babel-preset-es2015": "^6.5.0", "babel-register": "^6.7.2", From 9bfc03e24d52da64827e9f109d20f9adefcc9482 Mon Sep 17 00:00:00 2001 From: Matt Smith Date: Thu, 14 Jul 2016 07:13:29 -0600 Subject: [PATCH 2/3] refactor(build): Use babel-runtime instead of es6-promise polyfill Fixes #358 --- gulpfile.babel.js | 2 +- lib/Requestable.js | 5 ----- package.json | 13 ++++--------- 3 files changed, 5 insertions(+), 15 deletions(-) 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/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 382662af..5a162020 100644 --- a/package.json +++ b/package.json @@ -26,14 +26,8 @@ ], "plugins": [ "add-module-exports", - [ - "transform-es2015-modules-umd", - { - "globals": { - "es6-promise": "Promise" - } - } - ] + "transform-runtime", + "transform-es2015-modules-umd" ], "env": { "development": { @@ -47,8 +41,8 @@ ], "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" }, @@ -56,6 +50,7 @@ "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", From eb865eee33b8f363ee33d58e15b487c49f68ea15 Mon Sep 17 00:00:00 2001 From: Matt Smith Date: Fri, 18 Nov 2016 08:20:58 -0700 Subject: [PATCH 3/3] chore: Fix linting error --- lib/Repository.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); }