Skip to content

Commit e6c5ce1

Browse files
committed
Use babel-runtime instead of babel-polyfill
1 parent 6510f92 commit e6c5ce1

File tree

6 files changed

+9
-10
lines changed

6 files changed

+9
-10
lines changed

.babelrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"presets": ["es2015", "stage-3"]
2+
"presets": ["es2015", "stage-3"],
3+
"plugins": ["transform-runtime"]
34
}

gulpfile.babel.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
* See the License for the specific language governing permissions and
1717
* limitations under the License.
1818
*/
19-
require("babel-polyfill");
2019

2120
var browserify = require('browserify');
2221
var source = require('vinyl-source-stream');
@@ -100,7 +99,7 @@ gulp.task('build-browser-test', function(){
10099
cache: {},
101100
debug: true
102101
}).transform(babelify.configure({
103-
presets: ['es2015', 'stage-3'], ignore: /external/
102+
presets: ['es2015', 'stage-3'], plugins: ['transform-runtime'], ignore: /external/
104103
}))
105104
.bundle(function(err, res){
106105
cb();
@@ -117,7 +116,7 @@ gulp.task('build-browser-test', function(){
117116

118117
var buildNode = function(options) {
119118
return gulp.src(options.src)
120-
.pipe(babel({presets: ['es2015', 'stage-3'], ignore: ['src/external/**/*.js']}))
119+
.pipe(babel({presets: ['es2015', 'stage-3'], plugins: ['transform-runtime'], ignore: ['src/external/**/*.js']}))
121120
.pipe(gulp.dest(options.dest))
122121
};
123122

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@
2020
"main": "lib/index.js",
2121
"devDependencies": {
2222
"babel-core": "^6.17.0",
23-
"babel-polyfill": "^6.16.0",
23+
"babel-plugin-transform-runtime": "^6.15.0",
2424
"babel-preset-es2015": "^6.16.0",
2525
"babel-preset-stage-3": "^6.17.0",
26+
"babel-register": "^6.18.0",
2627
"babelify": "^7.3.0",
2728
"browserify": "^13.1.0",
2829
"esdoc": "^0.4.0",
@@ -51,5 +52,8 @@
5152
"through2": "~2.0.0",
5253
"vinyl-buffer": "^1.0.0",
5354
"vinyl-source-stream": "^1.1.0"
55+
},
56+
"dependencies": {
57+
"babel-runtime": "^6.18.0"
5458
}
5559
}

src/v1/driver.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import Integer from './integer';
2323
import {connect} from "./internal/connector";
2424
import StreamObserver from './internal/stream-observer';
2525
import {newError, SERVICE_UNAVAILABLE} from "./error";
26-
import "babel-polyfill";
2726

2827
let READ = 'READ', WRITE = 'WRITE';
2928
/**

src/v1/result.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919

2020
import ResultSummary from './result-summary';
2121

22-
// Ensure Promise is available
23-
import "babel-polyfill";
24-
2522
/**
2623
* A stream of {@link Record} representing the result of a statement.
2724
* @access public

src/v1/routing-driver.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import {newError, SERVICE_UNAVAILABLE, SESSION_EXPIRED} from "./error";
2323
import RoundRobinArray from './internal/round-robin-array';
2424
import {int} from './integer'
2525
import Integer from './integer'
26-
import "babel-polyfill";
2726

2827
/**
2928
* A driver that supports routing in a core-edge cluster.

0 commit comments

Comments
 (0)