From 9c7088b91c581b3355cf9b04c39fe0ca63185a15 Mon Sep 17 00:00:00 2001 From: Sergei Egorov Date: Tue, 20 Sep 2016 14:26:15 +0300 Subject: [PATCH] Avoid usage of babel-polyfill, see https://babeljs.io/docs/usage/polyfill/ --- .babelrc | 1 + package.json | 2 +- src/core/Indentation.js | 2 +- src/sqlFormatter.js | 1 - 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.babelrc b/.babelrc index 2055e50e21..4376c02c20 100644 --- a/.babelrc +++ b/.babelrc @@ -4,6 +4,7 @@ ], "plugins": [ "add-module-exports", + "transform-runtime", "transform-class-properties", "transform-function-bind", "transform-object-rest-spread", diff --git a/package.json b/package.json index e9f3014a57..30f3c4e69c 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,6 @@ "url": "https://github.com/zeroturnaround/sql-formatter.git" }, "dependencies": { - "babel-polyfill": "^6.9.1", "lodash": "^4.14.0" }, "devDependencies": { @@ -51,6 +50,7 @@ "babel-plugin-transform-es3-property-literals": "^6.5.0", "babel-plugin-transform-function-bind": "^6.8.0", "babel-plugin-transform-object-rest-spread": "^6.8.0", + "babel-plugin-transform-runtime": "^6.8.0", "babel-preset-es2015": "^6.14.0", "check-es3-syntax-cli": "^0.1.1", "cross-env": "^1.0.7", diff --git a/src/core/Indentation.js b/src/core/Indentation.js index 5f6ec2ebbf..fbf47c1762 100644 --- a/src/core/Indentation.js +++ b/src/core/Indentation.js @@ -25,7 +25,7 @@ export default class Indentation { * @return {String} */ getIndent() { - return this.indent.repeat(this.indentTypes.length); + return _.repeat(this.indent, this.indentTypes.length); } /** diff --git a/src/sqlFormatter.js b/src/sqlFormatter.js index 630834e302..974f523337 100644 --- a/src/sqlFormatter.js +++ b/src/sqlFormatter.js @@ -1,4 +1,3 @@ -import "babel-polyfill"; import N1qlFormatter from "./languages/N1qlFormatter"; import StandardSqlFormatter from "./languages/StandardSqlFormatter";