diff --git a/packages/babel-core/test/.babelrc b/packages/babel-core/test/.babelrc index 3a8f8eb911..0967ef424b 100644 --- a/packages/babel-core/test/.babelrc +++ b/packages/babel-core/test/.babelrc @@ -1,3 +1 @@ -{ - "breakConfig": true -} +{} diff --git a/packages/babel-core/test/_transformation-helper.js b/packages/babel-core/test/_transformation-helper.js index 69a44a1384..547aea6a8d 100644 --- a/packages/babel-core/test/_transformation-helper.js +++ b/packages/babel-core/test/_transformation-helper.js @@ -16,6 +16,13 @@ exports.fixtures = getFixtures(__dirname + "/fixtures", function () { require("babel-polyfill"); +require("../register")({ + ignore: [ + path.resolve(__dirname + "/../.."), + "node_modules" + ] +}); + eval(buildExernalHelpers()); global.assertNoOwnProperties = function (obj) { @@ -56,11 +63,17 @@ var run = function (task, done) { var opts = task.options; var getOpts = function (self) { - return _.merge({ + var newOpts = _.merge({ suppressDeprecationMessages: true, filename: self.loc, sourceMap: !!(task.sourceMappings || task.sourceMap) }, opts); + + newOpts.plugins = (newOpts.plugins || []).map(function (str) { + return __dirname + "/../../babel-plugin-" + str; + }); + + return newOpts; }; var execCode = exec.code; diff --git a/packages/babel-core/test/api.js b/packages/babel-core/test/api.js index f554f12c2e..5823c97570 100644 --- a/packages/babel-core/test/api.js +++ b/packages/babel-core/test/api.js @@ -1,8 +1,6 @@ require("../lib/api/node"); var buildExternalHelpers = require("../lib/tools/build-external-helpers"); -var PluginManager = require("../lib/transformation/file/plugin-manager"); -var Transformer = require("../lib/transformation/transformer"); var transform = require("../lib/transformation"); var Pipeline = require("../lib/transformation/pipeline"); var assert = require("assert"); @@ -447,40 +445,4 @@ suite("api", function () { assert.ok(script.indexOf("inherits") === -1); }); }); - - suite("plugins", function () { - test("unknown plugin", function () { - assert.throws(function () { - new PluginManager().subnormaliseString("foo bar"); - }, /Unknown plugin/); - }); - - test("key collision", function () { - assert.throws(function () { - new PluginManager({ - transformers: { "es6.arrowFunctions": true } - }).validate("foobar", { key: "es6.arrowFunctions" }); - }, /collides with another/); - }); - - test("not transformer", function () { - assert.throws(function () { - new PluginManager().validate("foobar", {}); - }, /didn't export a Plugin instance/); - - assert.throws(function () { - new PluginManager().validate("foobar", ""); - }, /didn't export a Plugin instance/); - - assert.throws(function () { - new PluginManager().validate("foobar", []); - }, /didn't export a Plugin instance/); - }); - - test("object request"); - - test("string request"); - - test("transformer request"); - }); }); diff --git a/packages/babel-core/test/fixtures/esnext/es6-arrow-functions/options.json b/packages/babel-core/test/fixtures/esnext/es6-arrow-functions/options.json new file mode 100644 index 0000000000..fc3d742263 --- /dev/null +++ b/packages/babel-core/test/fixtures/esnext/es6-arrow-functions/options.json @@ -0,0 +1,3 @@ +{ + "plugins": ["transform-es2015-arrow-functions"] +} diff --git a/packages/babel-core/test/fixtures/esnext/es6-computed-properties/options.json b/packages/babel-core/test/fixtures/esnext/es6-computed-properties/options.json new file mode 100644 index 0000000000..ed96b856f3 --- /dev/null +++ b/packages/babel-core/test/fixtures/esnext/es6-computed-properties/options.json @@ -0,0 +1,3 @@ +{ + "plugins": ["transform-es2015-computed-properties"] +} diff --git a/packages/babel-core/test/fixtures/esnext/es6-templates/options.json b/packages/babel-core/test/fixtures/esnext/es6-templates/options.json new file mode 100644 index 0000000000..341222f184 --- /dev/null +++ b/packages/babel-core/test/fixtures/esnext/es6-templates/options.json @@ -0,0 +1,3 @@ +{ + "plugins": ["transform-es2015-template-literals"] +} diff --git a/packages/babel-core/test/fixtures/transformation/api/blacklist/expected.js b/packages/babel-core/test/fixtures/transformation/api/blacklist/expected.js index 54c0233ca3..33dda2b11a 100644 --- a/packages/babel-core/test/fixtures/transformation/api/blacklist/expected.js +++ b/packages/babel-core/test/fixtures/transformation/api/blacklist/expected.js @@ -1,9 +1,7 @@ -"use strict"; - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var Test = function Test() { _classCallCheck(this, Test); arr.map(x => x * x); -}; \ No newline at end of file +}; diff --git a/packages/babel-core/test/fixtures/transformation/api/blacklist/options.json b/packages/babel-core/test/fixtures/transformation/api/blacklist/options.json deleted file mode 100644 index a0670c8dfc..0000000000 --- a/packages/babel-core/test/fixtures/transformation/api/blacklist/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "blacklist": ["es6.arrowFunctions"] -} diff --git a/packages/babel-core/test/fixtures/transformation/api/unknown-transformer-in-list/options.json b/packages/babel-core/test/fixtures/transformation/api/unknown-transformer-in-list/options.json deleted file mode 100644 index 760c2f32c7..0000000000 --- a/packages/babel-core/test/fixtures/transformation/api/unknown-transformer-in-list/options.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "throws": "Unknown transformer arrowFunctions2 specified in whitelist", - "whitelist": ["arrowFunctions2"] -} diff --git a/packages/babel-core/test/fixtures/transformation/api/whitelist/options.json b/packages/babel-core/test/fixtures/transformation/api/whitelist/options.json deleted file mode 100644 index 50e8ead9b1..0000000000 --- a/packages/babel-core/test/fixtures/transformation/api/whitelist/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "whitelist": ["es6.arrowFunctions"] -} diff --git a/packages/babel-core/test/fixtures/transformation/async-to-generator/async/expected.js b/packages/babel-core/test/fixtures/transformation/async-to-generator/async/expected.js index a10142ea35..e76bebc705 100644 --- a/packages/babel-core/test/fixtures/transformation/async-to-generator/async/expected.js +++ b/packages/babel-core/test/fixtures/transformation/async-to-generator/async/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var Foo = (function () { function Foo() { babelHelpers.classCallCheck(this, Foo); diff --git a/packages/babel-core/test/fixtures/transformation/async-to-generator/expression/expected.js b/packages/babel-core/test/fixtures/transformation/async-to-generator/expression/expected.js index ee1218ec25..00c2951f21 100644 --- a/packages/babel-core/test/fixtures/transformation/async-to-generator/expression/expected.js +++ b/packages/babel-core/test/fixtures/transformation/async-to-generator/expression/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var foo = babelHelpers.asyncToGenerator(function* () { var wat = yield bar(); -}); \ No newline at end of file +}); diff --git a/packages/babel-core/test/fixtures/transformation/async-to-generator/named-expression/expected.js b/packages/babel-core/test/fixtures/transformation/async-to-generator/named-expression/expected.js index b0bbed170e..237252e167 100644 --- a/packages/babel-core/test/fixtures/transformation/async-to-generator/named-expression/expected.js +++ b/packages/babel-core/test/fixtures/transformation/async-to-generator/named-expression/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _bar; var foo = _bar = babelHelpers.asyncToGenerator(function* () { diff --git a/packages/babel-core/test/fixtures/transformation/async-to-generator/options.json b/packages/babel-core/test/fixtures/transformation/async-to-generator/options.json index 58a90a50f5..54b64ad0fb 100644 --- a/packages/babel-core/test/fixtures/transformation/async-to-generator/options.json +++ b/packages/babel-core/test/fixtures/transformation/async-to-generator/options.json @@ -1,4 +1,3 @@ { - "externalHelpers": true, - "optional": ["asyncToGenerator"] + "plugins": ["external-helpers", "transform-async-to-generator"] } diff --git a/packages/babel-core/test/fixtures/transformation/async-to-generator/statement/expected.js b/packages/babel-core/test/fixtures/transformation/async-to-generator/statement/expected.js index ee1218ec25..00c2951f21 100644 --- a/packages/babel-core/test/fixtures/transformation/async-to-generator/statement/expected.js +++ b/packages/babel-core/test/fixtures/transformation/async-to-generator/statement/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var foo = babelHelpers.asyncToGenerator(function* () { var wat = yield bar(); -}); \ No newline at end of file +}); diff --git a/packages/babel-core/test/fixtures/transformation/bluebird-coroutines/class/expected.js b/packages/babel-core/test/fixtures/transformation/bluebird-coroutines/class/expected.js index b08077911d..f5706d9c1b 100644 --- a/packages/babel-core/test/fixtures/transformation/bluebird-coroutines/class/expected.js +++ b/packages/babel-core/test/fixtures/transformation/bluebird-coroutines/class/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _bluebird = require("bluebird"); var Foo = (function () { diff --git a/packages/babel-core/test/fixtures/transformation/bluebird-coroutines/class/options.json b/packages/babel-core/test/fixtures/transformation/bluebird-coroutines/class/options.json index 7d6e6cda1c..019532b4f9 100644 --- a/packages/babel-core/test/fixtures/transformation/bluebird-coroutines/class/options.json +++ b/packages/babel-core/test/fixtures/transformation/bluebird-coroutines/class/options.json @@ -1,3 +1,3 @@ { - "externalHelpers": true + "plugins": ["external-helpers"] } diff --git a/packages/babel-core/test/fixtures/transformation/bluebird-coroutines/expression/expected.js b/packages/babel-core/test/fixtures/transformation/bluebird-coroutines/expression/expected.js index ed68858b19..9e50f8c487 100644 --- a/packages/babel-core/test/fixtures/transformation/bluebird-coroutines/expression/expected.js +++ b/packages/babel-core/test/fixtures/transformation/bluebird-coroutines/expression/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _bluebird = require("bluebird"); var foo = _bluebird.coroutine(function* () { diff --git a/packages/babel-core/test/fixtures/transformation/bluebird-coroutines/named-expression/expected.js b/packages/babel-core/test/fixtures/transformation/bluebird-coroutines/named-expression/expected.js index 777cbc71c6..23e5a21ae6 100644 --- a/packages/babel-core/test/fixtures/transformation/bluebird-coroutines/named-expression/expected.js +++ b/packages/babel-core/test/fixtures/transformation/bluebird-coroutines/named-expression/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _bluebird = require("bluebird"); var _bar; diff --git a/packages/babel-core/test/fixtures/transformation/bluebird-coroutines/options.json b/packages/babel-core/test/fixtures/transformation/bluebird-coroutines/options.json index 264ef8fbf1..a7d7654c3a 100644 --- a/packages/babel-core/test/fixtures/transformation/bluebird-coroutines/options.json +++ b/packages/babel-core/test/fixtures/transformation/bluebird-coroutines/options.json @@ -1,3 +1,3 @@ { - "optional": ["bluebirdCoroutines"] + "plugins": ["transform-bluebird-coroutines"] } diff --git a/packages/babel-core/test/fixtures/transformation/bluebird-coroutines/statement/expected.js b/packages/babel-core/test/fixtures/transformation/bluebird-coroutines/statement/expected.js index ed68858b19..9e50f8c487 100644 --- a/packages/babel-core/test/fixtures/transformation/bluebird-coroutines/statement/expected.js +++ b/packages/babel-core/test/fixtures/transformation/bluebird-coroutines/statement/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _bluebird = require("bluebird"); var foo = _bluebird.coroutine(function* () { diff --git a/packages/babel-core/test/fixtures/transformation/es3/member-expression-literals/expected.js b/packages/babel-core/test/fixtures/transformation/es3/member-expression-literals/expected.js index fdd217784a..2e7b269153 100644 --- a/packages/babel-core/test/fixtures/transformation/es3/member-expression-literals/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es3/member-expression-literals/expected.js @@ -1,5 +1,3 @@ -"use strict"; - test["catch"]; test["catch"].foo; test["catch"]; diff --git a/packages/babel-core/test/fixtures/transformation/es3/property-literals/expected.js b/packages/babel-core/test/fixtures/transformation/es3/property-literals/expected.js index 05c1218da3..c531023c19 100644 --- a/packages/babel-core/test/fixtures/transformation/es3/property-literals/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es3/property-literals/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var obj = { "test": "foob", "!@#$": "foob", diff --git a/packages/babel-core/test/fixtures/transformation/es5.properties.mutators/getter-and-setter/expected.js b/packages/babel-core/test/fixtures/transformation/es5.properties.mutators/getter-and-setter/expected.js index 9d6ca2feff..4d16443ad9 100644 --- a/packages/babel-core/test/fixtures/transformation/es5.properties.mutators/getter-and-setter/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es5.properties.mutators/getter-and-setter/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var obj = Object.defineProperties({}, { foo: { get: function get() { @@ -11,4 +9,4 @@ var obj = Object.defineProperties({}, { configurable: true, enumerable: true } -}); \ No newline at end of file +}); diff --git a/packages/babel-core/test/fixtures/transformation/es5.properties.mutators/getter/expected.js b/packages/babel-core/test/fixtures/transformation/es5.properties.mutators/getter/expected.js index b19b14caa6..f34ed12c64 100644 --- a/packages/babel-core/test/fixtures/transformation/es5.properties.mutators/getter/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es5.properties.mutators/getter/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var obj = Object.defineProperties({}, { foo: { get: function get() { @@ -8,4 +6,4 @@ var obj = Object.defineProperties({}, { configurable: true, enumerable: true } -}); \ No newline at end of file +}); diff --git a/packages/babel-core/test/fixtures/transformation/es5.properties.mutators/setter/expected.js b/packages/babel-core/test/fixtures/transformation/es5.properties.mutators/setter/expected.js index ec89ed653f..988cb966e9 100644 --- a/packages/babel-core/test/fixtures/transformation/es5.properties.mutators/setter/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es5.properties.mutators/setter/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var obj = Object.defineProperties({}, { foo: { set: function set(value) { @@ -8,4 +6,4 @@ var obj = Object.defineProperties({}, { configurable: true, enumerable: true } -}); \ No newline at end of file +}); diff --git a/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/arguments/expected.js b/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/arguments/expected.js index 3ddd69015f..a9b5c60879 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/arguments/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/arguments/expected.js @@ -1,9 +1,7 @@ -"use strict"; - function one() { var _arguments = arguments; - var inner = function inner() { + var inner = function () { return _arguments; }; return [].slice.call(inner()); @@ -13,14 +11,14 @@ one(1, 2); function two() { var _arguments2 = arguments; - var inner = function inner() { + var inner = function () { return _arguments2; }; - var another = function another() { + var another = function () { var _arguments3 = arguments; - var inner2 = function inner2() { + var inner2 = function () { return _arguments3; }; }; @@ -32,7 +30,7 @@ two(1, 2); function three() { var _arguments4 = arguments; - var fn = function fn() { + var fn = function () { return _arguments4[0] + "bar"; }; return fn(); @@ -42,7 +40,7 @@ three("foo"); function four() { var _arguments5 = arguments; - var fn = function fn() { + var fn = function () { return _arguments5[0].foo + "bar"; }; return fn(); @@ -50,7 +48,7 @@ function four() { four({ foo: "foo" }); function five(obj) { - var fn = function fn() { + var fn = function () { return obj.arguments[0].foo + "bar"; }; return fn(); @@ -58,8 +56,8 @@ function five(obj) { five({ arguments: ["foo"] }); function six(obj) { - var fn = function fn() { - var fn2 = function fn2() { + var fn = function () { + var fn2 = function () { return arguments[0]; }; return fn2("foobar"); diff --git a/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/default-parameters/expected.js b/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/default-parameters/expected.js index 05e18ad3b6..8a28c607b8 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/default-parameters/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/default-parameters/expected.js @@ -1,9 +1,7 @@ -"use strict"; - var some = function some() { var count = arguments.length <= 0 || arguments[0] === undefined ? "30" : arguments[0]; console.log("count", count); }; -some(); \ No newline at end of file +some(); diff --git a/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/destructuring-parameters/expected.js b/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/destructuring-parameters/expected.js index ae78c6970a..4fb396bb78 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/destructuring-parameters/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/destructuring-parameters/expected.js @@ -1,7 +1,5 @@ -"use strict"; - -var a = function a(_ref) { - var target = _ref.target; +var a = function (_ref) { + let target = _ref.target; return console.log(target); }; a({ target: "I am a target" }); diff --git a/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/destructuring-parameters/options.json b/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/destructuring-parameters/options.json new file mode 100644 index 0000000000..ad1a1598cb --- /dev/null +++ b/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/destructuring-parameters/options.json @@ -0,0 +1,3 @@ +{ + "plugins": ["transform-es2015-destructuring", "transform-es2015-arrow-functions"] +} diff --git a/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/empty-arguments/expected.js b/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/empty-arguments/expected.js index 354fc5f55d..4f6faf9601 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/empty-arguments/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/empty-arguments/expected.js @@ -1,5 +1,3 @@ -"use strict"; - -var t = function t() { +var t = function () { return 5 + 5; }; diff --git a/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/empty-block/expected.js b/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/empty-block/expected.js index 6dc77b8b34..e62660f7c1 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/empty-block/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/empty-block/expected.js @@ -1,3 +1 @@ -"use strict"; - -var t = function t() {}; +var t = function () {}; diff --git a/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/expression/expected.js b/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/expression/expected.js index e136af8d90..e2bcfeb4cd 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/expression/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/expression/expected.js @@ -1,5 +1,3 @@ -"use strict"; - arr.map(function (x) { return x * x; }); diff --git a/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/inside-call/expected.js b/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/inside-call/expected.js index d78fc3cb5e..61defa50d6 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/inside-call/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/inside-call/expected.js @@ -1,5 +1,3 @@ -"use strict"; - arr.map(function (i) { return i + 1; }); diff --git a/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/multiple-arguments/expected.js b/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/multiple-arguments/expected.js index 267a0c9bd5..8a79fc9fe8 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/multiple-arguments/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/multiple-arguments/expected.js @@ -1,5 +1,3 @@ -"use strict"; - -var t = function t(i, x) { +var t = function (i, x) { return i * x; }; diff --git a/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/nested/expected.js b/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/nested/expected.js index 81937d4cb6..6ee2486f4f 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/nested/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/nested/expected.js @@ -1,7 +1,5 @@ -"use strict"; - module.exports = { - init: function init() { + init: function () { var _this = this; return new Promise(function (resolve, reject) { diff --git a/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/options.json b/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/options.json index b8b90ecb11..fc3d742263 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/options.json +++ b/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/options.json @@ -1,3 +1,3 @@ -{ - "blacklist": ["es6.tailCall"] -} +{ + "plugins": ["transform-es2015-arrow-functions"] +} diff --git a/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/paran-insertion/expected.js b/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/paran-insertion/expected.js index 9ad28d8c8c..689ec63907 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/paran-insertion/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/paran-insertion/expected.js @@ -1,5 +1,3 @@ -"use strict"; - -var t = function t(i) { +var t = function (i) { return i * 5; }; diff --git a/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/single-argument/expected.js b/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/single-argument/expected.js index 9ad28d8c8c..689ec63907 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/single-argument/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/single-argument/expected.js @@ -1,5 +1,3 @@ -"use strict"; - -var t = function t(i) { +var t = function (i) { return i * 5; }; diff --git a/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/spec/expected.js b/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/spec/expected.js index d34e9d1ef3..52dd949dce 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/spec/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/spec/expected.js @@ -1,5 +1,3 @@ -"use strict"; - function foo() { var _this = this; diff --git a/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/spec/options.json b/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/spec/options.json index c555242772..97b5b05339 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/spec/options.json +++ b/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/spec/options.json @@ -1,4 +1,4 @@ { - "externalHelpers": true, + "plugins": ["external-helpers"], "optional": ["es6.spec.arrowFunctions"] } diff --git a/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/statement/expected.js b/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/statement/expected.js index 99ee5cc6ba..40ecaad572 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/statement/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/statement/expected.js @@ -1,5 +1,3 @@ -"use strict"; - nums.forEach(function (v) { if (v % 5 === 0) { fives.push(v); diff --git a/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/this/expected.js b/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/this/expected.js index 7480ec8fff..78d4cce09c 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/this/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.arrow-functions/this/expected.js @@ -1,9 +1,7 @@ -"use strict"; - function b() { var _this = this; - var t = function t(x) { + var t = function (x) { return _this.x + x; }; } diff --git a/packages/babel-core/test/fixtures/transformation/es6.block-scoping/assignment-patterns/expected.js b/packages/babel-core/test/fixtures/transformation/es6.block-scoping/assignment-patterns/expected.js index c40cc2f668..0d2a6c971b 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.block-scoping/assignment-patterns/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.block-scoping/assignment-patterns/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var foo = "foo"; function foobar() { diff --git a/packages/babel-core/test/fixtures/transformation/es6.block-scoping/exec-collision-array-comprehension/options.json b/packages/babel-core/test/fixtures/transformation/es6.block-scoping/exec-collision-array-comprehension/options.json deleted file mode 100644 index b0b9a96ef0..0000000000 --- a/packages/babel-core/test/fixtures/transformation/es6.block-scoping/exec-collision-array-comprehension/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "stage": 0 -} diff --git a/packages/babel-core/test/fixtures/transformation/es6.block-scoping/for-break-continue-return/expected.js b/packages/babel-core/test/fixtures/transformation/es6.block-scoping/for-break-continue-return/expected.js index b67076795a..3135af5869 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.block-scoping/for-break-continue-return/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.block-scoping/for-break-continue-return/expected.js @@ -1,5 +1,3 @@ -"use strict"; - (function () { var _loop = function (i) { fns.push(function () { @@ -30,4 +28,4 @@ if (typeof _ret === "object") return _ret.v; } } -})(); \ No newline at end of file +})(); diff --git a/packages/babel-core/test/fixtures/transformation/es6.block-scoping/for-break/expected.js b/packages/babel-core/test/fixtures/transformation/es6.block-scoping/for-break/expected.js index ce7abf91e8..4a739e21cb 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.block-scoping/for-break/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.block-scoping/for-break/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _loop = function (i) { fns.push(function () { return i; @@ -11,4 +9,4 @@ for (var i in nums) { var _ret = _loop(i); if (_ret === "break") break; -} \ No newline at end of file +} diff --git a/packages/babel-core/test/fixtures/transformation/es6.block-scoping/for-continuation/expected.js b/packages/babel-core/test/fixtures/transformation/es6.block-scoping/for-continuation/expected.js index b31617b1d9..d4481fece7 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.block-scoping/for-continuation/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.block-scoping/for-continuation/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _loop = function (_i) { (function () { _i; @@ -11,4 +9,4 @@ var _loop = function (_i) { for (var i = 0; i < 2; i++) { _loop(i); -} \ No newline at end of file +} diff --git a/packages/babel-core/test/fixtures/transformation/es6.block-scoping/for-continue/expected.js b/packages/babel-core/test/fixtures/transformation/es6.block-scoping/for-continue/expected.js index 131b3c7d5d..4f72461412 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.block-scoping/for-continue/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.block-scoping/for-continue/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _loop = function (i) { fns.push(function () { return i; @@ -11,4 +9,4 @@ for (var i in nums) { var _ret = _loop(i); if (_ret === "continue") continue; -} \ No newline at end of file +} diff --git a/packages/babel-core/test/fixtures/transformation/es6.block-scoping/for-return-undefined/expected.js b/packages/babel-core/test/fixtures/transformation/es6.block-scoping/for-return-undefined/expected.js index 9fe1b89dd8..724322adb8 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.block-scoping/for-return-undefined/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.block-scoping/for-return-undefined/expected.js @@ -1,5 +1,3 @@ -"use strict"; - (function () { var _loop = function (i) { fns.push(function () { @@ -15,4 +13,4 @@ if (typeof _ret === "object") return _ret.v; } -})(); \ No newline at end of file +})(); diff --git a/packages/babel-core/test/fixtures/transformation/es6.block-scoping/for-return/expected.js b/packages/babel-core/test/fixtures/transformation/es6.block-scoping/for-return/expected.js index 79783da014..7b1d6ee700 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.block-scoping/for-return/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.block-scoping/for-return/expected.js @@ -1,5 +1,3 @@ -"use strict"; - (function () { var _loop = function (i) { fns.push(function () { @@ -15,4 +13,4 @@ if (typeof _ret === "object") return _ret.v; } -})(); \ No newline at end of file +})(); diff --git a/packages/babel-core/test/fixtures/transformation/es6.block-scoping/function/expected.js b/packages/babel-core/test/fixtures/transformation/es6.block-scoping/function/expected.js index dfd0ab9301..bb4b09c9c5 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.block-scoping/function/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.block-scoping/function/expected.js @@ -1,5 +1,3 @@ -"use strict"; - function test() { var foo = "bar"; } diff --git a/packages/babel-core/test/fixtures/transformation/es6.block-scoping/hoisting/expected.js b/packages/babel-core/test/fixtures/transformation/es6.block-scoping/hoisting/expected.js index 087049941e..542c6eeaee 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.block-scoping/hoisting/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.block-scoping/hoisting/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _iteratorNormalCompletion = true; var _didIteratorError = false; var _iteratorError = undefined; diff --git a/packages/babel-core/test/fixtures/transformation/es6.block-scoping/issue-1051/expected.js b/packages/babel-core/test/fixtures/transformation/es6.block-scoping/issue-1051/expected.js index d86a0c2b96..1b059c02c0 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.block-scoping/issue-1051/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.block-scoping/issue-1051/expected.js @@ -1,5 +1,3 @@ -"use strict"; - foo.func1 = function () { if (cond1) { for (;;) { @@ -19,4 +17,4 @@ foo.func1 = function () { } } } -}; \ No newline at end of file +}; diff --git a/packages/babel-core/test/fixtures/transformation/es6.block-scoping/issue-2174/expected.js b/packages/babel-core/test/fixtures/transformation/es6.block-scoping/issue-2174/expected.js index 7bde20839d..8fce45b985 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.block-scoping/issue-2174/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.block-scoping/issue-2174/expected.js @@ -1,5 +1,3 @@ -"use strict"; - if (true) { var x; diff --git a/packages/babel-core/test/fixtures/transformation/es6.block-scoping/issue-973/expected.js b/packages/babel-core/test/fixtures/transformation/es6.block-scoping/issue-973/expected.js index 8b47783108..f5455d75ad 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.block-scoping/issue-973/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.block-scoping/issue-973/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var arr = []; for (var i = 0; i < 10; i++) { var _loop = function (_i) { @@ -11,4 +9,4 @@ for (var i = 0; i < 10; i++) { for (var _i = 0; _i < 10; _i++) { _loop(_i); } -} \ No newline at end of file +} diff --git a/packages/babel-core/test/fixtures/transformation/es6.block-scoping/jsx-identifier/expected.js b/packages/babel-core/test/fixtures/transformation/es6.block-scoping/jsx-identifier/expected.js index 77a929e4fd..f59893c792 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.block-scoping/jsx-identifier/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.block-scoping/jsx-identifier/expected.js @@ -1,7 +1,5 @@ // #1683 -"use strict"; - var arr = []; for (var i = 0; i < 4; ++i) { arr.push(React.createElement("i", null)); diff --git a/packages/babel-core/test/fixtures/transformation/es6.block-scoping/loop-initializer-default/expected.js b/packages/babel-core/test/fixtures/transformation/es6.block-scoping/loop-initializer-default/expected.js index 5397773365..76ee5c3826 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.block-scoping/loop-initializer-default/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.block-scoping/loop-initializer-default/expected.js @@ -1,5 +1,3 @@ -"use strict"; - while (value) { var foo = undefined; diff --git a/packages/babel-core/test/fixtures/transformation/es6.block-scoping/program/expected.js b/packages/babel-core/test/fixtures/transformation/es6.block-scoping/program/expected.js index c8ee0b911a..b9006b4d0d 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.block-scoping/program/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.block-scoping/program/expected.js @@ -1,3 +1 @@ -"use strict"; - var test = "foo"; diff --git a/packages/babel-core/test/fixtures/transformation/es6.block-scoping/switch/expected.js b/packages/babel-core/test/fixtures/transformation/es6.block-scoping/switch/expected.js index 083caec726..ec0210e749 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.block-scoping/switch/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.block-scoping/switch/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var a = true; var b = false; diff --git a/packages/babel-core/test/fixtures/transformation/es6.block-scoping/wrap-closure-shadow-variables/expected.js b/packages/babel-core/test/fixtures/transformation/es6.block-scoping/wrap-closure-shadow-variables/expected.js index 01d1e257c6..019f453259 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.block-scoping/wrap-closure-shadow-variables/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.block-scoping/wrap-closure-shadow-variables/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var a = 1; var _loop = function (_a) { @@ -11,4 +9,4 @@ var _loop = function (_a) { for (var _a = 1; _a < 100; _a++) { _loop(_a); } -console.log(a); \ No newline at end of file +console.log(a); diff --git a/packages/babel-core/test/fixtures/transformation/es6.classes-loose/accessing-super-class/expected.js b/packages/babel-core/test/fixtures/transformation/es6.classes-loose/accessing-super-class/expected.js index f46e74a4b1..54df06e7f4 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.classes-loose/accessing-super-class/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.classes-loose/accessing-super-class/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var Test = (function (_Foo) { babelHelpers.inherits(Test, _Foo); diff --git a/packages/babel-core/test/fixtures/transformation/es6.classes-loose/accessing-super-properties/expected.js b/packages/babel-core/test/fixtures/transformation/es6.classes-loose/accessing-super-properties/expected.js index d35e8b20ae..1339e897c0 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.classes-loose/accessing-super-properties/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.classes-loose/accessing-super-properties/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var Test = (function (_Foo) { babelHelpers.inherits(Test, _Foo); diff --git a/packages/babel-core/test/fixtures/transformation/es6.classes-loose/calling-super-properties/expected.js b/packages/babel-core/test/fixtures/transformation/es6.classes-loose/calling-super-properties/expected.js index 522bd45ff1..ad544c99f8 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.classes-loose/calling-super-properties/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.classes-loose/calling-super-properties/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var Test = (function (_Foo) { babelHelpers.inherits(Test, _Foo); diff --git a/packages/babel-core/test/fixtures/transformation/es6.classes-loose/constructor-order/expected.js b/packages/babel-core/test/fixtures/transformation/es6.classes-loose/constructor-order/expected.js index 1816c12f0a..1ef27229e6 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.classes-loose/constructor-order/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.classes-loose/constructor-order/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var x = (function () { x.prototype.f = function f() { 1; diff --git a/packages/babel-core/test/fixtures/transformation/es6.classes-loose/literal-key/expected.js b/packages/babel-core/test/fixtures/transformation/es6.classes-loose/literal-key/expected.js index 3fdc07034b..bb11e8c355 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.classes-loose/literal-key/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.classes-loose/literal-key/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var Foo = (function () { function Foo() { babelHelpers.classCallCheck(this, Foo); diff --git a/packages/babel-core/test/fixtures/transformation/es6.classes-loose/options.json b/packages/babel-core/test/fixtures/transformation/es6.classes-loose/options.json index d2a727fcb1..86099c4fdc 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.classes-loose/options.json +++ b/packages/babel-core/test/fixtures/transformation/es6.classes-loose/options.json @@ -1,5 +1,3 @@ { - "externalHelpers": true, - "loose": ["es6.classes"], - "blacklist": ["es6.tailCall"] + "plugins": ["external-helpers", ["transform-es2015-classes", { "loose": true }]] } diff --git a/packages/babel-core/test/fixtures/transformation/es6.classes-loose/super-class-id-member-expression/expected.js b/packages/babel-core/test/fixtures/transformation/es6.classes-loose/super-class-id-member-expression/expected.js index ab9eedf6df..a9d6dd859b 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.classes-loose/super-class-id-member-expression/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.classes-loose/super-class-id-member-expression/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var BaseController = (function (_Chaplin$Controller) { babelHelpers.inherits(BaseController, _Chaplin$Controller); diff --git a/packages/babel-core/test/fixtures/transformation/es6.classes-loose/super-class/expected.js b/packages/babel-core/test/fixtures/transformation/es6.classes-loose/super-class/expected.js index a1b0761440..66f9a7c963 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.classes-loose/super-class/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.classes-loose/super-class/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var Test = (function (_Foo) { babelHelpers.inherits(Test, _Foo); diff --git a/packages/babel-core/test/fixtures/transformation/es6.classes-loose/super-function-fallback/expected.js b/packages/babel-core/test/fixtures/transformation/es6.classes-loose/super-function-fallback/expected.js index 4366f3918d..1f23d494a8 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.classes-loose/super-function-fallback/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.classes-loose/super-function-fallback/expected.js @@ -1,7 +1,5 @@ -"use strict"; - var Test = function Test() { babelHelpers.classCallCheck(this, Test); Function.prototype.hasOwnProperty.call(this, "test"); -}; \ No newline at end of file +}; diff --git a/packages/babel-core/test/fixtures/transformation/es6.classes/accessing-super-class/expected.js b/packages/babel-core/test/fixtures/transformation/es6.classes/accessing-super-class/expected.js index 80e467ff26..1d619cb99c 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.classes/accessing-super-class/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.classes/accessing-super-class/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var Test = (function (_Foo) { babelHelpers.inherits(Test, _Foo); diff --git a/packages/babel-core/test/fixtures/transformation/es6.classes/accessing-super-properties/expected.js b/packages/babel-core/test/fixtures/transformation/es6.classes/accessing-super-properties/expected.js index 5eb06810f8..fe8a83393e 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.classes/accessing-super-properties/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.classes/accessing-super-properties/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var Test = (function (_Foo) { babelHelpers.inherits(Test, _Foo); diff --git a/packages/babel-core/test/fixtures/transformation/es6.classes/calling-super-properties/expected.js b/packages/babel-core/test/fixtures/transformation/es6.classes/calling-super-properties/expected.js index 2171f302f5..4e1254cc81 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.classes/calling-super-properties/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.classes/calling-super-properties/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var Test = (function (_Foo) { babelHelpers.inherits(Test, _Foo); diff --git a/packages/babel-core/test/fixtures/transformation/es6.classes/calling-super-properties/options.json b/packages/babel-core/test/fixtures/transformation/es6.classes/calling-super-properties/options.json deleted file mode 100644 index b8b90ecb11..0000000000 --- a/packages/babel-core/test/fixtures/transformation/es6.classes/calling-super-properties/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "blacklist": ["es6.tailCall"] -} diff --git a/packages/babel-core/test/fixtures/transformation/es6.classes/computed-methods/expected.js b/packages/babel-core/test/fixtures/transformation/es6.classes/computed-methods/expected.js index fa5f71abfe..ecc9ae3f21 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.classes/computed-methods/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.classes/computed-methods/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var Foo = (function () { function Foo() { babelHelpers.classCallCheck(this, Foo); @@ -19,4 +17,4 @@ var Foo = (function () { value: function value() {} }]); return Foo; -})(); \ No newline at end of file +})(); diff --git a/packages/babel-core/test/fixtures/transformation/es6.classes/constructor-binding-collision/expected.js b/packages/babel-core/test/fixtures/transformation/es6.classes/constructor-binding-collision/expected.js index 615341f634..5247dab668 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.classes/constructor-binding-collision/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.classes/constructor-binding-collision/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var Example = function Example() { babelHelpers.classCallCheck(this, Example); diff --git a/packages/babel-core/test/fixtures/transformation/es6.classes/constructor/expected.js b/packages/babel-core/test/fixtures/transformation/es6.classes/constructor/expected.js index 5fa33a7d94..63785beee3 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.classes/constructor/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.classes/constructor/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var Test = function Test() { babelHelpers.classCallCheck(this, Test); diff --git a/packages/babel-core/test/fixtures/transformation/es6.classes/delay-arrow-function-for-bare-super-derived/expected.js b/packages/babel-core/test/fixtures/transformation/es6.classes/delay-arrow-function-for-bare-super-derived/expected.js index 93be66feef..045d6d18cf 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.classes/delay-arrow-function-for-bare-super-derived/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.classes/delay-arrow-function-for-bare-super-derived/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var Foo = (function (_Bar) { babelHelpers.inherits(Foo, _Bar); diff --git a/packages/babel-core/test/fixtures/transformation/es6.classes/derived-constructor-must-call-super/expected.js b/packages/babel-core/test/fixtures/transformation/es6.classes/derived-constructor-must-call-super/expected.js index b62f83e720..25025db980 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.classes/derived-constructor-must-call-super/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.classes/derived-constructor-must-call-super/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var Foo = (function (_Bar) { babelHelpers.inherits(Foo, _Bar); diff --git a/packages/babel-core/test/fixtures/transformation/es6.classes/instance-getter-and-setter/expected.js b/packages/babel-core/test/fixtures/transformation/es6.classes/instance-getter-and-setter/expected.js index b6d24d0bdf..56420bf1f4 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.classes/instance-getter-and-setter/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.classes/instance-getter-and-setter/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var Test = (function () { function Test() { babelHelpers.classCallCheck(this, Test); @@ -15,4 +13,4 @@ var Test = (function () { } }]); return Test; -})(); \ No newline at end of file +})(); diff --git a/packages/babel-core/test/fixtures/transformation/es6.classes/instance-getter/expected.js b/packages/babel-core/test/fixtures/transformation/es6.classes/instance-getter/expected.js index b1e58e607e..419321e583 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.classes/instance-getter/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.classes/instance-getter/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var Test = (function () { function Test() { babelHelpers.classCallCheck(this, Test); @@ -12,4 +10,4 @@ var Test = (function () { } }]); return Test; -})(); \ No newline at end of file +})(); diff --git a/packages/babel-core/test/fixtures/transformation/es6.classes/instance-method/expected.js b/packages/babel-core/test/fixtures/transformation/es6.classes/instance-method/expected.js index 4b94d9ccc7..92ee97fde2 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.classes/instance-method/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.classes/instance-method/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var Test = (function () { function Test() { babelHelpers.classCallCheck(this, Test); diff --git a/packages/babel-core/test/fixtures/transformation/es6.classes/instance-setter/expected.js b/packages/babel-core/test/fixtures/transformation/es6.classes/instance-setter/expected.js index cebbfe6e73..da0ac43573 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.classes/instance-setter/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.classes/instance-setter/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var Test = (function () { function Test() { babelHelpers.classCallCheck(this, Test); @@ -12,4 +10,4 @@ var Test = (function () { } }]); return Test; -})(); \ No newline at end of file +})(); diff --git a/packages/babel-core/test/fixtures/transformation/es6.classes/name-method-collision/expected.js b/packages/babel-core/test/fixtures/transformation/es6.classes/name-method-collision/expected.js index 3bf2306582..60c74367a8 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.classes/name-method-collision/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.classes/name-method-collision/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _a2 = require("./a"); var Foo = (function () { diff --git a/packages/babel-core/test/fixtures/transformation/es6.classes/options.json b/packages/babel-core/test/fixtures/transformation/es6.classes/options.json index 7d6e6cda1c..2ba8b2dbd5 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.classes/options.json +++ b/packages/babel-core/test/fixtures/transformation/es6.classes/options.json @@ -1,3 +1,3 @@ { - "externalHelpers": true + "plugins": ["external-helpers", "transform-es2015-classes"] } diff --git a/packages/babel-core/test/fixtures/transformation/es6.classes/plain-class/expected.js b/packages/babel-core/test/fixtures/transformation/es6.classes/plain-class/expected.js index 73c98b9f71..c18eb5aa04 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.classes/plain-class/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.classes/plain-class/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var Test = function Test() { babelHelpers.classCallCheck(this, Test); -}; \ No newline at end of file +}; diff --git a/packages/babel-core/test/fixtures/transformation/es6.classes/preserves-directives/expected.js b/packages/babel-core/test/fixtures/transformation/es6.classes/preserves-directives/expected.js index a4bbe32dbf..8e3310d8f8 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.classes/preserves-directives/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.classes/preserves-directives/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var MyCtrl = function MyCtrl(a) { "any directive prologue"; babelHelpers.classCallCheck(this, MyCtrl); diff --git a/packages/babel-core/test/fixtures/transformation/es6.classes/relaxed-method-coercion/expected.js b/packages/babel-core/test/fixtures/transformation/es6.classes/relaxed-method-coercion/expected.js index 43cb3ef487..9ecfb9d445 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.classes/relaxed-method-coercion/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.classes/relaxed-method-coercion/expected.js @@ -1,7 +1,5 @@ // #1649 -"use strict"; - var Foo = (function () { function Foo() { babelHelpers.classCallCheck(this, Foo); @@ -15,4 +13,4 @@ var Foo = (function () { value: function value() {} }]); return Foo; -})(); \ No newline at end of file +})(); diff --git a/packages/babel-core/test/fixtures/transformation/es6.classes/statement/expected.js b/packages/babel-core/test/fixtures/transformation/es6.classes/statement/expected.js index 7319bedb7f..a320977e84 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.classes/statement/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.classes/statement/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var BaseView = function BaseView() { babelHelpers.classCallCheck(this, BaseView); @@ -24,4 +22,4 @@ var BaseView = (function () { } }]); return BaseView; -})(); \ No newline at end of file +})(); diff --git a/packages/babel-core/test/fixtures/transformation/es6.classes/static/expected.js b/packages/babel-core/test/fixtures/transformation/es6.classes/static/expected.js index dc1208b974..76e5b2195c 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.classes/static/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.classes/static/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var A = (function () { function A() { babelHelpers.classCallCheck(this, A); @@ -14,4 +12,4 @@ var A = (function () { set: function set(b) {} }]); return A; -})(); \ No newline at end of file +})(); diff --git a/packages/babel-core/test/fixtures/transformation/es6.classes/super-call-only-allowed-in-derived-constructor/expected.js b/packages/babel-core/test/fixtures/transformation/es6.classes/super-call-only-allowed-in-derived-constructor/expected.js index 9a42c21d98..6438026c22 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.classes/super-call-only-allowed-in-derived-constructor/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.classes/super-call-only-allowed-in-derived-constructor/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var Foo = (function () { function Foo() { babelHelpers.classCallCheck(this, Foo); @@ -8,4 +6,4 @@ var Foo = (function () { } return Foo; -})(); \ No newline at end of file +})(); diff --git a/packages/babel-core/test/fixtures/transformation/es6.classes/super-class-anonymous/expected.js b/packages/babel-core/test/fixtures/transformation/es6.classes/super-class-anonymous/expected.js index 7942481077..64a67675d5 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.classes/super-class-anonymous/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.classes/super-class-anonymous/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var TestEmpty = (function (_ref) { babelHelpers.inherits(TestEmpty, _ref); diff --git a/packages/babel-core/test/fixtures/transformation/es6.classes/super-class-id-member-expression/expected.js b/packages/babel-core/test/fixtures/transformation/es6.classes/super-class-id-member-expression/expected.js index 6394f2df5f..04c8921eba 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.classes/super-class-id-member-expression/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.classes/super-class-id-member-expression/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var BaseController = (function (_Chaplin$Controller) { babelHelpers.inherits(BaseController, _Chaplin$Controller); diff --git a/packages/babel-core/test/fixtures/transformation/es6.classes/super-class/expected.js b/packages/babel-core/test/fixtures/transformation/es6.classes/super-class/expected.js index 3ffa78e87c..67c217a0ea 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.classes/super-class/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.classes/super-class/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var Test = (function (_Foo) { babelHelpers.inherits(Test, _Foo); diff --git a/packages/babel-core/test/fixtures/transformation/es6.classes/super-function-fallback/expected.js b/packages/babel-core/test/fixtures/transformation/es6.classes/super-function-fallback/expected.js index 9d4d8335e0..26b0ffd3e1 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.classes/super-function-fallback/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.classes/super-function-fallback/expected.js @@ -1,7 +1,5 @@ -"use strict"; - var Test = function Test() { babelHelpers.classCallCheck(this, Test); babelHelpers.get(Object.getPrototypeOf(Test.prototype), "hasOwnProperty", this).call(this, "test"); -}; \ No newline at end of file +}; diff --git a/packages/babel-core/test/fixtures/transformation/es6.constants/block-statement/expected.js b/packages/babel-core/test/fixtures/transformation/es6.constants/block-statement/expected.js index ea8122a79c..8ff11044f9 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.constants/block-statement/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.constants/block-statement/expected.js @@ -1,5 +1,3 @@ -"use strict"; - for (var i in arr) { var MULTIPLIER = 5; console.log(arr[i] * MULTIPLIER); diff --git a/packages/babel-core/test/fixtures/transformation/es6.constants/destructuring/expected.js b/packages/babel-core/test/fixtures/transformation/es6.constants/destructuring/expected.js index 877eccc290..3ad6e248ea 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.constants/destructuring/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.constants/destructuring/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var a = 1; var b = 2; var c = 3; diff --git a/packages/babel-core/test/fixtures/transformation/es6.constants/ignore-member-expressions/expected.js b/packages/babel-core/test/fixtures/transformation/es6.constants/ignore-member-expressions/expected.js index f78bd701f4..ac77be1e13 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.constants/ignore-member-expressions/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.constants/ignore-member-expressions/expected.js @@ -1,4 +1,2 @@ -"use strict"; - var x = {}; x.key = "value"; diff --git a/packages/babel-core/test/fixtures/transformation/es6.constants/program/expected.js b/packages/babel-core/test/fixtures/transformation/es6.constants/program/expected.js index a01deae504..56dae9f66f 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.constants/program/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.constants/program/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var MULTIPLIER = 5; for (var i in arr) { diff --git a/packages/babel-core/test/fixtures/transformation/es6.constants/update-expression/expected.js b/packages/babel-core/test/fixtures/transformation/es6.constants/update-expression/expected.js new file mode 100644 index 0000000000..dce8a70d97 --- /dev/null +++ b/packages/babel-core/test/fixtures/transformation/es6.constants/update-expression/expected.js @@ -0,0 +1,4 @@ +var foo = 1; +(function () { + throw new TypeError("\"foo\" is read-only"); +})(); diff --git a/packages/babel-core/test/fixtures/transformation/es6.destructuring/array-unpack-optimisation/expected.js b/packages/babel-core/test/fixtures/transformation/es6.destructuring/array-unpack-optimisation/expected.js index c1b094bd2c..e6b45f91cb 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.destructuring/array-unpack-optimisation/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.destructuring/array-unpack-optimisation/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var a = 1; var b = 2; var a = 1; diff --git a/packages/babel-core/test/fixtures/transformation/es6.destructuring/array/expected.js b/packages/babel-core/test/fixtures/transformation/es6.destructuring/array/expected.js index e250f872c7..ca9b5413ef 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.destructuring/array/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.destructuring/array/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var a = "hello"; var _ref = [", ", "junk"]; var b = _ref[0]; diff --git a/packages/babel-core/test/fixtures/transformation/es6.destructuring/assignment-expression-completion-record/expected.js b/packages/babel-core/test/fixtures/transformation/es6.destructuring/assignment-expression-completion-record/expected.js index 0693a629b6..0836058dc7 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.destructuring/assignment-expression-completion-record/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.destructuring/assignment-expression-completion-record/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var x, y; var _ref = [1, 2]; x = _ref[0]; diff --git a/packages/babel-core/test/fixtures/transformation/es6.destructuring/assignment-expression-pattern/expected.js b/packages/babel-core/test/fixtures/transformation/es6.destructuring/assignment-expression-pattern/expected.js index 6a3de508c1..47004a5c9d 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.destructuring/assignment-expression-pattern/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.destructuring/assignment-expression-pattern/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var z = {}; var _z$x = z.x; _z$x = _z$x === undefined ? {} : _z$x; diff --git a/packages/babel-core/test/fixtures/transformation/es6.destructuring/assignment-expression/expected.js b/packages/babel-core/test/fixtures/transformation/es6.destructuring/assignment-expression/expected.js index 5be82d8a2e..0c1da0040f 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.destructuring/assignment-expression/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.destructuring/assignment-expression/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _ref; console.log((_ref = [123], x = _ref[0], _ref)); diff --git a/packages/babel-core/test/fixtures/transformation/es6.destructuring/assignment-statement/expected.js b/packages/babel-core/test/fixtures/transformation/es6.destructuring/assignment-statement/expected.js index be5074dd30..defe900595 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.destructuring/assignment-statement/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.destructuring/assignment-statement/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _f = f(); var _f2 = babelHelpers.slicedToArray(_f, 2); diff --git a/packages/babel-core/test/fixtures/transformation/es6.destructuring/default-precedence/exec.js b/packages/babel-core/test/fixtures/transformation/es6.destructuring/default-precedence/exec.js index 4cc3d913f3..505531d7f3 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.destructuring/default-precedence/exec.js +++ b/packages/babel-core/test/fixtures/transformation/es6.destructuring/default-precedence/exec.js @@ -1,8 +1,17 @@ -const f0 = (a, b = a, c = b) => [a, b, c]; +const f0 = function (a, b = a, c = b) { + return [a, b, c]; +} + assert.deepEqual(f0(1), [1, 1, 1]); -const f1 = ({a}, b = a, c = b) => [a, b, c]; +const f1 = function ({a}, b = a, c = b) { + return [a, b, c]; +} + assert.deepEqual(f1({a: 1}), [1, 1, 1]); -const f2 = ({a}, b = a, c = a) => [a, b, c]; +const f2 = function ({a}, b = a, c = a) { + return [a, b, c]; +} + assert.deepEqual(f2({a: 1}), [1, 1, 1]); diff --git a/packages/babel-core/test/fixtures/transformation/es6.destructuring/empty-object-pattern/expected.js b/packages/babel-core/test/fixtures/transformation/es6.destructuring/empty-object-pattern/expected.js index e0b04dfea8..61ae1a06dc 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.destructuring/empty-object-pattern/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.destructuring/empty-object-pattern/expected.js @@ -1,4 +1,2 @@ -"use strict"; - var _ref = null; babelHelpers.objectDestructuringEmpty(_ref); diff --git a/packages/babel-core/test/fixtures/transformation/es6.destructuring/empty/expected.js b/packages/babel-core/test/fixtures/transformation/es6.destructuring/empty/expected.js index c1f22824cf..a650dabc34 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.destructuring/empty/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.destructuring/empty/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _ref = ["foo", "hello", [", ", "junk"], ["world"]]; var a = _ref[1]; diff --git a/packages/babel-core/test/fixtures/transformation/es6.destructuring/es7-object-rest/expected.js b/packages/babel-core/test/fixtures/transformation/es6.destructuring/es7-object-rest/expected.js index a8aaeee8f7..935f76c0e0 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.destructuring/es7-object-rest/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.destructuring/es7-object-rest/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var z = {}; var x = babelHelpers.objectWithoutProperties(z, []); var x = z.x; diff --git a/packages/babel-core/test/fixtures/transformation/es6.destructuring/es7-object-rest/options.json b/packages/babel-core/test/fixtures/transformation/es6.destructuring/es7-object-rest/options.json deleted file mode 100644 index b0b9a96ef0..0000000000 --- a/packages/babel-core/test/fixtures/transformation/es6.destructuring/es7-object-rest/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "stage": 0 -} diff --git a/packages/babel-core/test/fixtures/transformation/es6.destructuring/for-in/expected.js b/packages/babel-core/test/fixtures/transformation/es6.destructuring/for-in/expected.js index 2874e65c28..87574b678d 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.destructuring/for-in/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.destructuring/for-in/expected.js @@ -1,5 +1,3 @@ -"use strict"; - for (var _ref in obj) { var _ref2 = babelHelpers.slicedToArray(_ref, 2); diff --git a/packages/babel-core/test/fixtures/transformation/es6.destructuring/for-of/expected.js b/packages/babel-core/test/fixtures/transformation/es6.destructuring/for-of/expected.js index f61fa64066..8b8d1b7bf2 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.destructuring/for-of/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.destructuring/for-of/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _iteratorNormalCompletion = true; var _didIteratorError = false; var _iteratorError = undefined; diff --git a/packages/babel-core/test/fixtures/transformation/es6.destructuring/known-array/actual.js b/packages/babel-core/test/fixtures/transformation/es6.destructuring/known-array/actual.js index f853dccade..cf5f7c01f3 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.destructuring/known-array/actual.js +++ b/packages/babel-core/test/fixtures/transformation/es6.destructuring/known-array/actual.js @@ -1,2 +1,2 @@ var z = []; -let [x, ...y] = z; +var [x, ...y] = z; diff --git a/packages/babel-core/test/fixtures/transformation/es6.destructuring/known-array/expected.js b/packages/babel-core/test/fixtures/transformation/es6.destructuring/known-array/expected.js index 978eb7ad85..34c0ca8df5 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.destructuring/known-array/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.destructuring/known-array/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var z = []; var x = z[0]; -var y = z.slice(1); \ No newline at end of file +var y = z.slice(1); diff --git a/packages/babel-core/test/fixtures/transformation/es6.destructuring/member-expression/expected.js b/packages/babel-core/test/fixtures/transformation/es6.destructuring/member-expression/expected.js index c371508b05..300da8c461 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.destructuring/member-expression/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.destructuring/member-expression/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _ref = [1, 2]; foo.foo = _ref[0]; foo.bar = _ref[1]; diff --git a/packages/babel-core/test/fixtures/transformation/es6.destructuring/mixed/expected.js b/packages/babel-core/test/fixtures/transformation/es6.destructuring/mixed/expected.js index 2265a6d4c3..dfb38be734 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.destructuring/mixed/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.destructuring/mixed/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var rect = {}; var _rect$topLeft = babelHelpers.slicedToArray(rect.topLeft, 2); diff --git a/packages/babel-core/test/fixtures/transformation/es6.destructuring/multiple/expected.js b/packages/babel-core/test/fixtures/transformation/es6.destructuring/multiple/expected.js index e7babadf88..b77339c9e8 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.destructuring/multiple/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.destructuring/multiple/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var coords = [1, 2]; var x = coords.x; var y = coords.y; diff --git a/packages/babel-core/test/fixtures/transformation/es6.destructuring/object-advanced/expected.js b/packages/babel-core/test/fixtures/transformation/es6.destructuring/object-advanced/expected.js index 34f7843a0a..8086ab92ee 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.destructuring/object-advanced/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.destructuring/object-advanced/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var rect = {}; var _rect$topLeft = rect.topLeft; var x1 = _rect$topLeft.x; diff --git a/packages/babel-core/test/fixtures/transformation/es6.destructuring/object-basic/expected.js b/packages/babel-core/test/fixtures/transformation/es6.destructuring/object-basic/expected.js index 9f119eee59..24833dda4c 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.destructuring/object-basic/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.destructuring/object-basic/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var coords = [1, 2]; var x = coords.x; var y = coords.y; diff --git a/packages/babel-core/test/fixtures/transformation/es6.destructuring/options.json b/packages/babel-core/test/fixtures/transformation/es6.destructuring/options.json index 7d6e6cda1c..835538ee2c 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.destructuring/options.json +++ b/packages/babel-core/test/fixtures/transformation/es6.destructuring/options.json @@ -1,3 +1,3 @@ { - "externalHelpers": true + "plugins": ["external-helpers", "transform-es2015-destructuring"] } diff --git a/packages/babel-core/test/fixtures/transformation/es6.destructuring/parameters/expected.js b/packages/babel-core/test/fixtures/transformation/es6.destructuring/parameters/expected.js index dc5d19e9ef..6f62d8a1fb 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.destructuring/parameters/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.destructuring/parameters/expected.js @@ -1,5 +1,3 @@ -"use strict"; - function somethingAdvanced(_ref, p2, p3) { var _ref$topLeft = _ref.topLeft; _ref$topLeft = _ref$topLeft === undefined ? {} : _ref$topLeft; @@ -20,7 +18,7 @@ function unpackObject(_ref2) { console.log(unpackObject({ title: "title", author: "author" })); -var unpackArray = function unpackArray(_ref3, _ref4) { +var unpackArray = function (_ref3, _ref4) { var _ref32 = babelHelpers.slicedToArray(_ref3, 3); var a = _ref32[0]; @@ -36,4 +34,4 @@ var unpackArray = function unpackArray(_ref3, _ref4) { return a + b + c; }; -console.log(unpackArray(["hello", ", ", "world"], [1, 2, 3])); \ No newline at end of file +console.log(unpackArray(["hello", ", ", "world"], [1, 2, 3])); diff --git a/packages/babel-core/test/fixtures/transformation/es6.destructuring/spread/expected.js b/packages/babel-core/test/fixtures/transformation/es6.destructuring/spread/expected.js index 2e86d3b1b2..798f3a407a 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.destructuring/spread/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.destructuring/spread/expected.js @@ -1,5 +1,3 @@ -"use strict"; - function isSorted(_ref) { var _ref2 = babelHelpers.toArray(_ref); diff --git a/packages/babel-core/test/fixtures/transformation/es6.destructuring/spread/options.json b/packages/babel-core/test/fixtures/transformation/es6.destructuring/spread/options.json deleted file mode 100644 index b8b90ecb11..0000000000 --- a/packages/babel-core/test/fixtures/transformation/es6.destructuring/spread/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "blacklist": ["es6.tailCall"] -} diff --git a/packages/babel-core/test/fixtures/transformation/es6.for-of-loose/identifier/expected.js b/packages/babel-core/test/fixtures/transformation/es6.for-of-loose/identifier/expected.js index cb83442b64..4ce44f50f5 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.for-of-loose/identifier/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.for-of-loose/identifier/expected.js @@ -1,5 +1,3 @@ -"use strict"; - for (var _iterator = arr, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { if (_isArray) { if (_i >= _iterator.length) break; diff --git a/packages/babel-core/test/fixtures/transformation/es6.for-of-loose/ignore-cases/expected.js b/packages/babel-core/test/fixtures/transformation/es6.for-of-loose/ignore-cases/expected.js index d7576bf4f7..9c64275021 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.for-of-loose/ignore-cases/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.for-of-loose/ignore-cases/expected.js @@ -1,5 +1,3 @@ -"use strict"; - for (var _iterator = foo, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { var _ref; diff --git a/packages/babel-core/test/fixtures/transformation/es6.for-of-loose/let/expected.js b/packages/babel-core/test/fixtures/transformation/es6.for-of-loose/let/expected.js index 24b278f864..7565d63def 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.for-of-loose/let/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.for-of-loose/let/expected.js @@ -1,5 +1,3 @@ -"use strict"; - for (var _iterator = arr, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { var _ref; diff --git a/packages/babel-core/test/fixtures/transformation/es6.for-of-loose/member-expression/expected.js b/packages/babel-core/test/fixtures/transformation/es6.for-of-loose/member-expression/expected.js index 10c85b30a2..4945bb7127 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.for-of-loose/member-expression/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.for-of-loose/member-expression/expected.js @@ -1,5 +1,3 @@ -"use strict"; - for (var _iterator = arr, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { if (_isArray) { if (_i >= _iterator.length) break; diff --git a/packages/babel-core/test/fixtures/transformation/es6.for-of-loose/multiple/expected.js b/packages/babel-core/test/fixtures/transformation/es6.for-of-loose/multiple/expected.js index f3a251f396..985c62fc85 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.for-of-loose/multiple/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.for-of-loose/multiple/expected.js @@ -1,5 +1,3 @@ -"use strict"; - for (var _iterator = arr, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { var _ref; diff --git a/packages/babel-core/test/fixtures/transformation/es6.for-of-loose/var/expected.js b/packages/babel-core/test/fixtures/transformation/es6.for-of-loose/var/expected.js index 24b278f864..7565d63def 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.for-of-loose/var/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.for-of-loose/var/expected.js @@ -1,5 +1,3 @@ -"use strict"; - for (var _iterator = arr, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { var _ref; diff --git a/packages/babel-core/test/fixtures/transformation/es6.for-of/identifier/expected.js b/packages/babel-core/test/fixtures/transformation/es6.for-of/identifier/expected.js index f1e75370dc..a9802edce0 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.for-of/identifier/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.for-of/identifier/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _iteratorNormalCompletion = true; var _didIteratorError = false; var _iteratorError = undefined; @@ -21,4 +19,4 @@ try { throw _iteratorError; } } -} \ No newline at end of file +} diff --git a/packages/babel-core/test/fixtures/transformation/es6.for-of/ignore-cases/expected.js b/packages/babel-core/test/fixtures/transformation/es6.for-of/ignore-cases/expected.js index c6a1ba302a..044583f69f 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.for-of/ignore-cases/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.for-of/ignore-cases/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _iteratorNormalCompletion = true; var _didIteratorError = false; var _iteratorError = undefined; diff --git a/packages/babel-core/test/fixtures/transformation/es6.for-of/let/expected.js b/packages/babel-core/test/fixtures/transformation/es6.for-of/let/expected.js index 0b2ee2c402..6c6b96ae93 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.for-of/let/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.for-of/let/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _iteratorNormalCompletion = true; var _didIteratorError = false; var _iteratorError = undefined; @@ -21,4 +19,4 @@ try { throw _iteratorError; } } -} \ No newline at end of file +} diff --git a/packages/babel-core/test/fixtures/transformation/es6.for-of/member-expression/expected.js b/packages/babel-core/test/fixtures/transformation/es6.for-of/member-expression/expected.js index cf7ac1eee2..ca88fbff1d 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.for-of/member-expression/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.for-of/member-expression/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _iteratorNormalCompletion = true; var _didIteratorError = false; var _iteratorError = undefined; @@ -21,4 +19,4 @@ try { throw _iteratorError; } } -} \ No newline at end of file +} diff --git a/packages/babel-core/test/fixtures/transformation/es6.for-of/multiple/expected.js b/packages/babel-core/test/fixtures/transformation/es6.for-of/multiple/expected.js index 9622e63af3..507af58ad0 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.for-of/multiple/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.for-of/multiple/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _iteratorNormalCompletion = true; var _didIteratorError = false; var _iteratorError = undefined; diff --git a/packages/babel-core/test/fixtures/transformation/es6.for-of/nested-label-for-of/expected.js b/packages/babel-core/test/fixtures/transformation/es6.for-of/nested-label-for-of/expected.js index fd63d9c8f5..544c05ec30 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.for-of/nested-label-for-of/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.for-of/nested-label-for-of/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _iteratorNormalCompletion = true; var _didIteratorError = false; var _iteratorError = undefined; diff --git a/packages/babel-core/test/fixtures/transformation/es6.for-of/var/expected.js b/packages/babel-core/test/fixtures/transformation/es6.for-of/var/expected.js index 0b2ee2c402..6c6b96ae93 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.for-of/var/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.for-of/var/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _iteratorNormalCompletion = true; var _didIteratorError = false; var _iteratorError = undefined; @@ -21,4 +19,4 @@ try { throw _iteratorError; } } -} \ No newline at end of file +} diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-amd/export-specifier-default/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-amd/export-specifier-default/expected.js index d1d2104a57..d9e2ab6562 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-amd/export-specifier-default/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-amd/export-specifier-default/expected.js @@ -1,6 +1,4 @@ define(["exports", "module"], function (exports, module) { - "use strict"; - - var a = 1; + var a = 1; module.exports = a; }); diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-amd/exports-default/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-amd/exports-default/expected.js index 40eac20efb..060d2664cb 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-amd/exports-default/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-amd/exports-default/expected.js @@ -1,7 +1,5 @@ define(["exports", "module"], function (exports, module) { - "use strict"; - - module.exports = foo; + module.exports = foo; module.exports = 42; module.exports = {}; module.exports = []; @@ -27,4 +25,4 @@ define(["exports", "module"], function (exports, module) { module.exports = (function () { return "foo"; })(); -}); \ No newline at end of file +}); diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-amd/exports-from/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-amd/exports-from/expected.js index c8c38d1ede..8ea356b867 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-amd/exports-from/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-amd/exports-from/expected.js @@ -1,7 +1,5 @@ define(["exports", "foo"], function (exports, _foo) { - "use strict"; - - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports, "__esModule", { value: true }); babelHelpers.defaults(exports, babelHelpers.interopExportWildcard(_foo, babelHelpers.defaults)); diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-amd/exports-named/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-amd/exports-named/expected.js index 8313d82781..e0884fd4db 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-amd/exports-named/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-amd/exports-named/expected.js @@ -1,7 +1,5 @@ define(["exports"], function (exports) { - "use strict"; - - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports, "__esModule", { value: true }); exports.foo = foo; @@ -11,4 +9,4 @@ define(["exports"], function (exports) { exports["default"] = foo; exports["default"] = foo; exports.bar = bar; -}); \ No newline at end of file +}); diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-amd/exports-variable/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-amd/exports-variable/expected.js index afcc4a9ae0..1a1009f9b1 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-amd/exports-variable/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-amd/exports-variable/expected.js @@ -1,7 +1,5 @@ define(["exports"], function (exports) { - "use strict"; - - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports, "__esModule", { value: true }); exports.foo7 = foo7; @@ -29,4 +27,4 @@ define(["exports"], function (exports) { }; exports.foo8 = foo8; -}); \ No newline at end of file +}); diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-amd/hoist-function-exports/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-amd/hoist-function-exports/expected.js index a91bad3d07..df2eab1f9b 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-amd/hoist-function-exports/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-amd/hoist-function-exports/expected.js @@ -1,7 +1,5 @@ define(["exports", "./evens"], function (exports, _evens) { - "use strict"; - - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports, "__esModule", { value: true }); exports.nextOdd = nextOdd; diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-amd/imports-default/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-amd/imports-default/expected.js index 924c875fe5..842bde29a3 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-amd/imports-default/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-amd/imports-default/expected.js @@ -1,10 +1,8 @@ define(["exports", "foo"], function (exports, _foo) { - "use strict"; - - var _foo2 = babelHelpers.interopRequireDefault(_foo); + var _foo2 = babelHelpers.interopRequireDefault(_foo); var _foo22 = babelHelpers.interopRequireDefault(_foo); _foo2["default"]; _foo22["default"]; -}); \ No newline at end of file +}); diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-amd/imports-glob/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-amd/imports-glob/expected.js index 1669f9ab26..6a485c6fd5 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-amd/imports-glob/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-amd/imports-glob/expected.js @@ -1,5 +1,3 @@ define(["exports", "foo"], function (exports, _foo) { - "use strict"; - - _foo; + _foo; }); diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-amd/imports-mixing/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-amd/imports-mixing/expected.js index a14c40ce71..0484a41dd4 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-amd/imports-mixing/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-amd/imports-mixing/expected.js @@ -1,8 +1,6 @@ define(["exports", "foo"], function (exports, _foo) { - "use strict"; - - var _foo2 = babelHelpers.interopRequireDefault(_foo); + var _foo2 = babelHelpers.interopRequireDefault(_foo); _foo2["default"]; _foo.baz; -}); \ No newline at end of file +}); diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-amd/imports-named/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-amd/imports-named/expected.js index 4511c06147..c1b2a71fea 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-amd/imports-named/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-amd/imports-named/expected.js @@ -1,7 +1,5 @@ define(["exports", "foo"], function (exports, _foo) { - "use strict"; - - _foo.bar; + _foo.bar; _foo.bar2; _foo.baz; _foo.bar; diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-amd/module-name/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-amd/module-name/expected.js index 66b6fe669a..b8575435cc 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-amd/module-name/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-amd/module-name/expected.js @@ -1,5 +1,3 @@ define("es6.modules-amd/module-name/expected", ["exports"], function (exports) { - "use strict"; - - foobar(); + foobar(); }); diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-amd/options.json b/packages/babel-core/test/fixtures/transformation/es6.modules-amd/options.json index 676273f30a..746fb0d131 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-amd/options.json +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-amd/options.json @@ -1,4 +1,4 @@ { - "externalHelpers": true, + "plugins": ["external-helpers"], "modules": "amd" } diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-amd/overview/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-amd/overview/expected.js index f1b02b2bc4..b517a494b8 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-amd/overview/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-amd/overview/expected.js @@ -1,7 +1,5 @@ define(["exports", "foo", "foo-bar", "./directory/foo-bar"], function (exports, _foo, _fooBar, _directoryFooBar) { - "use strict"; - - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports, "__esModule", { value: true }); @@ -17,4 +15,4 @@ define(["exports", "foo", "foo-bar", "./directory/foo-bar"], function (exports, _foo; _foo.bar; _foo.foo; -}); \ No newline at end of file +}); diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-amd/remap/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-amd/remap/expected.js index db82ca4b88..976a922eb4 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-amd/remap/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-amd/remap/expected.js @@ -1,7 +1,5 @@ define(["exports"], function (exports) { - "use strict"; - - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports, "__esModule", { value: true }); var test = 2; diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-common-strict/export-1/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-common-strict/export-1/expected.js index d4479d5ef3..9be9e2f8ba 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-common-strict/export-1/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-common-strict/export-1/expected.js @@ -1,3 +1 @@ -"use strict"; - exports["default"] = foo; diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-common-strict/export-2/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-common-strict/export-2/expected.js index d4479d5ef3..9be9e2f8ba 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-common-strict/export-2/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-common-strict/export-2/expected.js @@ -1,3 +1 @@ -"use strict"; - exports["default"] = foo; diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-common-strict/export/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-common-strict/export/expected.js index 6fce486d92..54c9f7d911 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-common-strict/export/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-common-strict/export/expected.js @@ -1,5 +1,3 @@ -"use strict"; - exports.foo = foo; -function foo() {} \ No newline at end of file +function foo() {} diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-common-strict/import/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-common-strict/import/expected.js index 0ebe870b8e..d7549206ee 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-common-strict/import/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-common-strict/import/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _foo = require("foo"); var foo4 = _foo; diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-common/exports-default-non-function/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-common/exports-default-non-function/expected.js index 3e4743167f..5684287aef 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-common/exports-default-non-function/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-common/exports-default-non-function/expected.js @@ -1,5 +1,3 @@ -"use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-common/exports-default/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-common/exports-default/expected.js index b4ee26ad84..883ce71df1 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-common/exports-default/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-common/exports-default/expected.js @@ -1,5 +1,3 @@ -"use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -30,4 +28,4 @@ exports["default"] = (function () { return "foo"; })(); -module.exports = exports["default"]; \ No newline at end of file +module.exports = exports["default"]; diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-common/exports-from/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-common/exports-from/expected.js index f7f8b7203a..6480c1867f 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-common/exports-from/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-common/exports-from/expected.js @@ -1,5 +1,3 @@ -"use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-common/exports-named/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-common/exports-named/expected.js index aaef8926ae..8ff5bb80a7 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-common/exports-named/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-common/exports-named/expected.js @@ -1,5 +1,3 @@ -"use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -9,4 +7,4 @@ exports.bar = bar; exports.bar = foo; exports["default"] = foo; exports["default"] = foo; -exports.bar = bar; \ No newline at end of file +exports.bar = bar; diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-common/exports-variable/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-common/exports-variable/expected.js index af78d8d252..4e80974346 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-common/exports-variable/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-common/exports-variable/expected.js @@ -1,5 +1,3 @@ -"use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -27,4 +25,4 @@ var foo8 = function foo8() { babelHelpers.classCallCheck(this, foo8); }; -exports.foo8 = foo8; \ No newline at end of file +exports.foo8 = foo8; diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-common/hoist-function-exports/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-common/hoist-function-exports/expected.js index a66f35bc32..3c0206f916 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-common/hoist-function-exports/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-common/hoist-function-exports/expected.js @@ -1,5 +1,3 @@ -"use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-common/imports-default/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-common/imports-default/expected.js index f4df24882d..081aefe73c 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-common/imports-default/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-common/imports-default/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _foo = require("foo"); var _foo2 = babelHelpers.interopRequireDefault(_foo); @@ -7,4 +5,4 @@ var _foo2 = babelHelpers.interopRequireDefault(_foo); var _foo3 = babelHelpers.interopRequireDefault(_foo); _foo2["default"]; -_foo3["default"]; \ No newline at end of file +_foo3["default"]; diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-common/imports-default/options.json b/packages/babel-core/test/fixtures/transformation/es6.modules-common/imports-default/options.json index 7d6e6cda1c..019532b4f9 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-common/imports-default/options.json +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-common/imports-default/options.json @@ -1,3 +1,3 @@ { - "externalHelpers": true + "plugins": ["external-helpers"] } diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-common/imports-glob/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-common/imports-glob/expected.js index 46d2a82d35..8483a8db49 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-common/imports-glob/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-common/imports-glob/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _foo = require("foo"); -var foo = babelHelpers.interopRequireWildcard(_foo); \ No newline at end of file +var foo = babelHelpers.interopRequireWildcard(_foo); diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-common/imports-mixing/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-common/imports-mixing/expected.js index 4c1ee7d06c..2000497f8a 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-common/imports-mixing/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-common/imports-mixing/expected.js @@ -1,8 +1,6 @@ -"use strict"; - var _foo = require("foo"); var _foo2 = babelHelpers.interopRequireDefault(_foo); _foo2["default"]; -_foo.baz; \ No newline at end of file +_foo.baz; diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-common/imports-mixing/options.json b/packages/babel-core/test/fixtures/transformation/es6.modules-common/imports-mixing/options.json index 7d6e6cda1c..019532b4f9 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-common/imports-mixing/options.json +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-common/imports-mixing/options.json @@ -1,3 +1,3 @@ { - "externalHelpers": true + "plugins": ["external-helpers"] } diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-common/imports-named/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-common/imports-named/expected.js index ccce2e64ad..0c5c96485c 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-common/imports-named/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-common/imports-named/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _foo = require("foo"); _foo.bar; @@ -7,4 +5,4 @@ _foo.bar2; _foo.baz; _foo.bar; _foo.bar; -_foo.xyz; \ No newline at end of file +_foo.xyz; diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-common/imports/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-common/imports/expected.js index f1a139f51a..e3de8abeb0 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-common/imports/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-common/imports/expected.js @@ -1,5 +1,3 @@ -"use strict"; - require("foo"); require("foo-bar"); diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-common/loose/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-common/loose/expected.js index cd9f50ef3d..806072db32 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-common/loose/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-common/loose/expected.js @@ -1,5 +1,3 @@ -"use strict"; - exports.__esModule = true; var foo = 5; diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-common/module-shadow/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-common/module-shadow/expected.js index f6a92cc04b..ec455bde13 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-common/module-shadow/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-common/module-shadow/expected.js @@ -1,5 +1,3 @@ -"use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-common/options.json b/packages/babel-core/test/fixtures/transformation/es6.modules-common/options.json index 119fea971c..d29eaa83df 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-common/options.json +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-common/options.json @@ -1,4 +1,4 @@ { - "externalHelpers": true, + "plugins": ["external-helpers"], "modules": "common" } diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-common/overview/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-common/overview/expected.js index 8972640fb9..142ad6b939 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-common/overview/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-common/overview/expected.js @@ -1,5 +1,3 @@ -"use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -28,4 +26,4 @@ var test = 5; exports.test = test; _foo4.bar; _foo5.foo; -_foo22["default"]; \ No newline at end of file +_foo22["default"]; diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-common/overview/options.json b/packages/babel-core/test/fixtures/transformation/es6.modules-common/overview/options.json index 7d6e6cda1c..019532b4f9 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-common/overview/options.json +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-common/overview/options.json @@ -1,3 +1,3 @@ { - "externalHelpers": true + "plugins": ["external-helpers"] } diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-common/remap/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-common/remap/expected.js index ca1e4a1d2d..569f369205 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-common/remap/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-common/remap/expected.js @@ -1,5 +1,3 @@ -"use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-ignore/exports-default/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-ignore/exports-default/expected.js index c624f28d92..ec6569b8f6 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-ignore/exports-default/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-ignore/exports-default/expected.js @@ -1,5 +1,3 @@ -"use strict"; - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var _default = function _default() { @@ -10,4 +8,4 @@ function foo() {} var Foo = function Foo() { _classCallCheck(this, Foo); -}; \ No newline at end of file +}; diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-ignore/exports-variable/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-ignore/exports-variable/expected.js index 8f6bdc258b..35f4b5a1dd 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-ignore/exports-variable/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-ignore/exports-variable/expected.js @@ -1,5 +1,3 @@ -"use strict"; - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var foo = 1; @@ -15,4 +13,4 @@ function foo7() {} var foo8 = function foo8() { _classCallCheck(this, foo8); -}; \ No newline at end of file +}; diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-ignore/hoist-function-exports/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-ignore/hoist-function-exports/expected.js index 19eac8d070..7240eb8bfb 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-ignore/hoist-function-exports/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-ignore/hoist-function-exports/expected.js @@ -1,5 +1,3 @@ -"use strict"; - function nextOdd(n) { return isEven(n) ? n + 1 : n + 2; } diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-ignore/overview/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-ignore/overview/expected.js index 5027345558..c9f1d0dc74 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-ignore/overview/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-ignore/overview/expected.js @@ -1,3 +1 @@ -"use strict"; - var test2 = 5; diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-ignore/remap/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-ignore/remap/expected.js index e6187004bb..0c4ba585d3 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-ignore/remap/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-ignore/remap/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var test = 2; test = 5; test++; diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-system/exports-default/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-system/exports-default/expected.js index 37dd3bbf33..5083193ab3 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-system/exports-default/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-system/exports-default/expected.js @@ -1,7 +1,5 @@ System.register([], function (_export) { - "use strict"; - - var _default, Foo; + var _default, Foo; _export("default", foo); @@ -39,4 +37,4 @@ System.register([], function (_export) { })()); } }; -}); \ No newline at end of file +}); diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-system/exports-from/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-system/exports-from/expected.js index bafa76e913..2248f76927 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-system/exports-from/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-system/exports-from/expected.js @@ -1,7 +1,5 @@ System.register(["foo"], function (_export) { - "use strict"; - - return { + return { setters: [function (_foo) { for (var _key in _foo) { if (_key !== "default") _export(_key, _foo[_key]); diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-system/exports-named/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-system/exports-named/expected.js index 86487ee2f5..f63db708e4 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-system/exports-named/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-system/exports-named/expected.js @@ -1,7 +1,5 @@ System.register([], function (_export) { - "use strict"; - - return { + return { setters: [], execute: function () { _export("foo", foo); diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-system/exports-variable/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-system/exports-variable/expected.js index bc93dd73b5..0ba18f899c 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-system/exports-variable/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-system/exports-variable/expected.js @@ -1,7 +1,5 @@ System.register([], function (_export) { - "use strict"; - - var foo, foo2, foo3, foo4, foo5, foo6, foo8; + var foo, foo2, foo3, foo4, foo5, foo6, foo8; _export("foo7", foo7); diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-system/get-module-name-option/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-system/get-module-name-option/expected.js index 0def1f9524..bfdb2cac03 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-system/get-module-name-option/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-system/get-module-name-option/expected.js @@ -1,7 +1,5 @@ System.register("my custom module name", [], function (_export) { - "use strict"; - - return { + return { setters: [], execute: function () {} }; diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-system/hoist-function-exports/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-system/hoist-function-exports/expected.js index 4412e7284a..bdcb01f7ed 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-system/hoist-function-exports/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-system/hoist-function-exports/expected.js @@ -1,7 +1,5 @@ System.register(["./evens"], function (_export) { - "use strict"; - - var isEven, p, a, i, j, isOdd; + var isEven, p, a, i, j, isOdd; _export("nextOdd", nextOdd); diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-system/hoist-function-exports/options.json b/packages/babel-core/test/fixtures/transformation/es6.modules-system/hoist-function-exports/options.json deleted file mode 100644 index b8b90ecb11..0000000000 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-system/hoist-function-exports/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "blacklist": ["es6.tailCall"] -} diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-system/imports-default/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-system/imports-default/expected.js index 16a71b2ed4..a8a7d62087 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-system/imports-default/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-system/imports-default/expected.js @@ -1,7 +1,5 @@ System.register(["foo"], function (_export) { - "use strict"; - - var foo, foo2; + var foo, foo2; return { setters: [function (_foo) { foo = _foo["default"]; diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-system/imports-glob/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-system/imports-glob/expected.js index 5df9008d7c..66701c9a26 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-system/imports-glob/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-system/imports-glob/expected.js @@ -1,7 +1,5 @@ System.register(["foo"], function (_export) { - "use strict"; - - var foo; + var foo; return { setters: [function (_foo) { foo = _foo; diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-system/imports-mixing/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-system/imports-mixing/expected.js index 786d2e6869..e60d5fb75f 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-system/imports-mixing/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-system/imports-mixing/expected.js @@ -1,7 +1,5 @@ System.register(["foo"], function (_export) { - "use strict"; - - var foo, xyz; + var foo, xyz; return { setters: [function (_foo) { foo = _foo["default"]; diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-system/imports-named/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-system/imports-named/expected.js index e6704667be..b74a9a19cf 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-system/imports-named/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-system/imports-named/expected.js @@ -1,7 +1,5 @@ System.register(["foo"], function (_export) { - "use strict"; - - var bar, bar2, baz, baz2, baz3, xyz; + var bar, bar2, baz, baz2, baz3, xyz; return { setters: [function (_foo) { bar = _foo.bar; diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-system/imports/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-system/imports/expected.js index 005c4b922f..d1dcb2a471 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-system/imports/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-system/imports/expected.js @@ -1,7 +1,5 @@ System.register(["foo", "foo-bar", "./directory/foo-bar"], function (_export) { - "use strict"; - - return { + return { setters: [function (_foo) {}, function (_fooBar) {}, function (_directoryFooBar) {}], execute: function () {} }; diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-system/overview/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-system/overview/expected.js index c818618f83..c9afd43f8e 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-system/overview/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-system/overview/expected.js @@ -1,7 +1,5 @@ System.register(["foo", "foo-bar", "./directory/foo-bar"], function (_export) { - "use strict"; - - var foo, foo2, bar, bar2, test2; + var foo, foo2, bar, bar2, test2; return { setters: [function (_foo) { foo = _foo["default"]; diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-system/remap/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-system/remap/expected.js index 7bedb706ab..93bb4496c3 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-system/remap/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-system/remap/expected.js @@ -1,7 +1,5 @@ System.register([], function (_export) { - "use strict"; - - var test, a, b, d; + var test, a, b, d; return { setters: [], execute: function () { diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-umd/exports-default/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-umd/exports-default/expected.js index 3709b608c1..ae2b74d80c 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-umd/exports-default/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-umd/exports-default/expected.js @@ -11,9 +11,7 @@ global.actual = mod.exports; } })(this, function (exports, module) { - "use strict"; - - module.exports = foo; + module.exports = foo; module.exports = 42; module.exports = {}; module.exports = []; @@ -39,4 +37,4 @@ module.exports = (function () { return "foo"; })(); -}); \ No newline at end of file +}); diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-umd/exports-from/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-umd/exports-from/expected.js index aabf9607e2..69b2a0a2a5 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-umd/exports-from/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-umd/exports-from/expected.js @@ -11,9 +11,7 @@ global.actual = mod.exports; } })(this, function (exports, _foo) { - "use strict"; - - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports, "__esModule", { value: true }); babelHelpers.defaults(exports, babelHelpers.interopExportWildcard(_foo, babelHelpers.defaults)); diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-umd/exports-named/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-umd/exports-named/expected.js index b4ecf1daf0..77898e1f56 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-umd/exports-named/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-umd/exports-named/expected.js @@ -11,9 +11,7 @@ global.actual = mod.exports; } })(this, function (exports) { - "use strict"; - - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports, "__esModule", { value: true }); exports.foo = foo; @@ -23,4 +21,4 @@ exports["default"] = foo; exports["default"] = foo; exports.bar = bar; -}); \ No newline at end of file +}); diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-umd/exports-variable/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-umd/exports-variable/expected.js index 1f7eb76e77..4f6edb07ca 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-umd/exports-variable/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-umd/exports-variable/expected.js @@ -11,9 +11,7 @@ global.actual = mod.exports; } })(this, function (exports) { - "use strict"; - - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports, "__esModule", { value: true }); exports.foo7 = foo7; @@ -41,4 +39,4 @@ }; exports.foo8 = foo8; -}); \ No newline at end of file +}); diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-umd/hoist-function-exports/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-umd/hoist-function-exports/expected.js index ce7b90e568..4c30b7fd35 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-umd/hoist-function-exports/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-umd/hoist-function-exports/expected.js @@ -11,9 +11,7 @@ global.actual = mod.exports; } })(this, function (exports, _evens) { - "use strict"; - - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports, "__esModule", { value: true }); exports.nextOdd = nextOdd; diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-umd/imports-default/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-umd/imports-default/expected.js index b5f1086266..540a33a0ca 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-umd/imports-default/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-umd/imports-default/expected.js @@ -11,12 +11,10 @@ global.actual = mod.exports; } })(this, function (exports, _foo) { - "use strict"; - - var _foo2 = babelHelpers.interopRequireDefault(_foo); + var _foo2 = babelHelpers.interopRequireDefault(_foo); var _foo22 = babelHelpers.interopRequireDefault(_foo); _foo2["default"]; _foo22["default"]; -}); \ No newline at end of file +}); diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-umd/imports-glob/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-umd/imports-glob/expected.js index 383d739202..db716ced9f 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-umd/imports-glob/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-umd/imports-glob/expected.js @@ -11,7 +11,5 @@ global.actual = mod.exports; } })(this, function (exports, _foo) { - "use strict"; - - _foo; -}); \ No newline at end of file + _foo; +}); diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-umd/imports-mixing/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-umd/imports-mixing/expected.js index 68f099dee8..e446ec93ea 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-umd/imports-mixing/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-umd/imports-mixing/expected.js @@ -11,9 +11,7 @@ global.actual = mod.exports; } })(this, function (exports, _foo) { - "use strict"; - - var _foo2 = babelHelpers.interopRequireDefault(_foo); + var _foo2 = babelHelpers.interopRequireDefault(_foo); _foo.baz; -}); \ No newline at end of file +}); diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-umd/imports-named/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-umd/imports-named/expected.js index 365b09d3fe..6d262b1f3c 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-umd/imports-named/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-umd/imports-named/expected.js @@ -11,12 +11,10 @@ global.actual = mod.exports; } })(this, function (exports, _foo) { - "use strict"; - - _foo.bar; + _foo.bar; _foo.bar2; _foo.baz; _foo.bar; _foo.bar; _foo.xyz; -}); \ No newline at end of file +}); diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-umd/module-id/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-umd/module-id/expected.js index 8ccda53fd5..f7eb363ec6 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-umd/module-id/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-umd/module-id/expected.js @@ -11,7 +11,5 @@ global.MyLib = mod.exports; } })(this, function (exports) { - "use strict"; - - foobar(); -}); \ No newline at end of file + foobar(); +}); diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-umd/module-name/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-umd/module-name/expected.js index fbe1110e75..a6c8848e4a 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-umd/module-name/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-umd/module-name/expected.js @@ -11,7 +11,5 @@ global.es6ModulesUmdModuleNameExpected = mod.exports; } })(this, function (exports) { - "use strict"; - - foobar(); -}); \ No newline at end of file + foobar(); +}); diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-umd/options.json b/packages/babel-core/test/fixtures/transformation/es6.modules-umd/options.json index 467807a47b..61b3905da7 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-umd/options.json +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-umd/options.json @@ -1,4 +1,4 @@ { - "externalHelpers": true, + "plugins": ["external-helpers"], "modules": "umd" } diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-umd/overview/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-umd/overview/expected.js index 1f4fd0ad33..1f06e7aaea 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-umd/overview/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-umd/overview/expected.js @@ -11,9 +11,7 @@ global.actual = mod.exports; } })(this, function (exports, _foo, _fooBar, _directoryFooBar) { - "use strict"; - - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports, "__esModule", { value: true }); @@ -27,4 +25,4 @@ _foo.bar; _foo.foo; -}); \ No newline at end of file +}); diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules-umd/remap/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules-umd/remap/expected.js index 70cc20ee55..97dece8cc5 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules-umd/remap/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules-umd/remap/expected.js @@ -11,9 +11,7 @@ global.actual = mod.exports; } })(this, function (exports) { - "use strict"; - - Object.defineProperty(exports, "__esModule", { + Object.defineProperty(exports, "__esModule", { value: true }); var test = 2; @@ -42,4 +40,4 @@ exports.f = d; exports.f = exports.e = d = 4; -}); \ No newline at end of file +}); diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules/comments-explosion/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules/comments-explosion/expected.js index 966456dcd2..111778b28a 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules/comments-explosion/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules/comments-explosion/expected.js @@ -1,5 +1,3 @@ -"use strict"; - export { foo }; bar(); diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules/options.json b/packages/babel-core/test/fixtures/transformation/es6.modules/options.json deleted file mode 100644 index 896d86d463..0000000000 --- a/packages/babel-core/test/fixtures/transformation/es6.modules/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "blacklist": ["es6.modules"] -} diff --git a/packages/babel-core/test/fixtures/transformation/es6.modules/spec/expected.js b/packages/babel-core/test/fixtures/transformation/es6.modules/spec/expected.js index 9af4aaa240..48e42c9e77 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.modules/spec/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.modules/spec/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _null = null; export { _null as __proto__ }; var foo = ""; diff --git a/packages/babel-core/test/fixtures/transformation/es6.object-super/options.json b/packages/babel-core/test/fixtures/transformation/es6.object-super/options.json index 7d6e6cda1c..019532b4f9 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.object-super/options.json +++ b/packages/babel-core/test/fixtures/transformation/es6.object-super/options.json @@ -1,3 +1,3 @@ { - "externalHelpers": true + "plugins": ["external-helpers"] } diff --git a/packages/babel-core/test/fixtures/transformation/es6.object-super/statically-bound/expected.js b/packages/babel-core/test/fixtures/transformation/es6.object-super/statically-bound/expected.js index c73cac5319..cfee4015ce 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.object-super/statically-bound/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.object-super/statically-bound/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _obj; var o = _obj = { diff --git a/packages/babel-core/test/fixtures/transformation/es6.parameters/default-before-last/expected.js b/packages/babel-core/test/fixtures/transformation/es6.parameters/default-before-last/expected.js index cc754fd872..fb8ada05e6 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.parameters/default-before-last/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.parameters/default-before-last/expected.js @@ -1,5 +1,3 @@ -"use strict"; - function foo(a, b) { if (a === undefined) a = "foo"; } diff --git a/packages/babel-core/test/fixtures/transformation/es6.parameters/default-eval/expected.js b/packages/babel-core/test/fixtures/transformation/es6.parameters/default-eval/expected.js index 15897c4d3b..7f93a0e21f 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.parameters/default-eval/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.parameters/default-eval/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var x = "outside"; function outer() { var a = arguments.length <= 0 || arguments[0] === undefined ? function () { @@ -10,4 +8,4 @@ function outer() { return a(); })(); } -outer(); \ No newline at end of file +outer(); diff --git a/packages/babel-core/test/fixtures/transformation/es6.parameters/default-multiple/expected.js b/packages/babel-core/test/fixtures/transformation/es6.parameters/default-multiple/expected.js index 637ba23555..b20c12fa6d 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.parameters/default-multiple/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.parameters/default-multiple/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var t = function t() { var e = arguments.length <= 0 || arguments[0] === undefined ? "foo" : arguments[0]; var f = arguments.length <= 1 || arguments[1] === undefined ? 5 : arguments[1]; @@ -11,4 +9,4 @@ var a = function a(e) { var f = arguments.length <= 1 || arguments[1] === undefined ? 5 : arguments[1]; return e + " bar " + f; -}; \ No newline at end of file +}; diff --git a/packages/babel-core/test/fixtures/transformation/es6.parameters/default-single/expected.js b/packages/babel-core/test/fixtures/transformation/es6.parameters/default-single/expected.js index 57a8db5ea2..4afa50f338 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.parameters/default-single/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.parameters/default-single/expected.js @@ -1,7 +1,5 @@ -"use strict"; - var t = function t() { var f = arguments.length <= 0 || arguments[0] === undefined ? "foo" : arguments[0]; return f + " bar"; -}; \ No newline at end of file +}; diff --git a/packages/babel-core/test/fixtures/transformation/es6.parameters/options.json b/packages/babel-core/test/fixtures/transformation/es6.parameters/options.json index 7d6e6cda1c..019532b4f9 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.parameters/options.json +++ b/packages/babel-core/test/fixtures/transformation/es6.parameters/options.json @@ -1,3 +1,3 @@ { - "externalHelpers": true + "plugins": ["external-helpers"] } diff --git a/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-arrow-functions/expected.js b/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-arrow-functions/expected.js index af24e56f78..76e62c3d36 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-arrow-functions/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-arrow-functions/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var concat = function concat() { var x = arguments[0]; var y = arguments[1]; diff --git a/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-async-function/expected.js b/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-async-function/expected.js index 30a54f9006..0d6e350e14 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-async-function/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-async-function/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _this = this; var fn = function fn() { diff --git a/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-async-function/options.json b/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-async-function/options.json deleted file mode 100644 index b0b9a96ef0..0000000000 --- a/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-async-function/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "stage": 0 -} diff --git a/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-binding-deoptimisation/expected.js b/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-binding-deoptimisation/expected.js index b5288257f7..6b72b34994 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-binding-deoptimisation/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-binding-deoptimisation/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var deepAssign = function deepAssign() { for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; diff --git a/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-deepest-common-ancestor-earliest-child/expected.js b/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-deepest-common-ancestor-earliest-child/expected.js index 140431c53e..320886f014 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-deepest-common-ancestor-earliest-child/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-deepest-common-ancestor-earliest-child/expected.js @@ -1,6 +1,4 @@ // single referenes -"use strict"; - function r() { if (noNeedToWork) return 0; diff --git a/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-flow-parameter-reference/expected.js b/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-flow-parameter-reference/expected.js index d5babadbd7..2f2a31c5bb 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-flow-parameter-reference/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-flow-parameter-reference/expected.js @@ -1,5 +1,3 @@ -"use strict"; - function foo(x) { for (var _len = arguments.length, types = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { types[_key - 1] = arguments[_key]; diff --git a/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-member-expression-deoptimisation/expected.js b/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-member-expression-deoptimisation/expected.js index b95a32286a..69c06843f0 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-member-expression-deoptimisation/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-member-expression-deoptimisation/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var x = function x(foo) { for (var _len = arguments.length, bar = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { bar[_key - 1] = arguments[_key]; diff --git a/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-member-expression-optimisation/expected.js b/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-member-expression-optimisation/expected.js index add403243b..3a9c5ab53c 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-member-expression-optimisation/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-member-expression-optimisation/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var t = function t() { var x = arguments[0]; var y = arguments[1]; diff --git a/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-multiple/expected.js b/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-multiple/expected.js index 18fc23f505..fcb6ad5ddf 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-multiple/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-multiple/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var t = function t(f) { var x = f; x = arguments[1]; diff --git a/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-nested-iife/expected.js b/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-nested-iife/expected.js index ef7ece2359..5283750ede 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-nested-iife/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-nested-iife/expected.js @@ -1,5 +1,3 @@ -"use strict"; - function broken(x) { for (var _len = arguments.length, foo = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { foo[_key - 1] = arguments[_key]; diff --git a/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-pattern/expected.js b/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-pattern/expected.js index a52993a722..fff6e2b5b4 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-pattern/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-pattern/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var foo = function foo() { var a = arguments[0], b = arguments[1]; diff --git a/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-spread-optimisation/expected.js b/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-spread-optimisation/expected.js index e8460c6642..659c51c607 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-spread-optimisation/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.parameters/rest-spread-optimisation/expected.js @@ -1,7 +1,5 @@ // optimisation -"use strict"; - function foo() { foo.apply(undefined, arguments); } diff --git a/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/argument/expected.js b/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/argument/expected.js index 04b57e5996..3d213b2a00 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/argument/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/argument/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _foo; foo((_foo = {}, _foo[bar] = "foobar", _foo)); diff --git a/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/assignment/expected.js b/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/assignment/expected.js index 9d9df1af31..bd9d00ee91 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/assignment/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/assignment/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _foo; foo = (_foo = {}, _foo[bar] = "foobar", _foo); diff --git a/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/coerce/expected.js b/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/coerce/expected.js index 9bd540d65d..021d373f2d 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/coerce/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/coerce/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _obj; var obj = (_obj = { diff --git a/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/ignore-symbol/expected.js b/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/ignore-symbol/expected.js index b6290c7e20..39b056cf1e 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/ignore-symbol/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/ignore-symbol/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _foo; var foo = (_foo = {}, _foo[Symbol.iterator] = "foobar", _foo); diff --git a/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/method/expected.js b/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/method/expected.js index 5ddd0c37d4..b4a01454cd 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/method/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/method/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _obj; var obj = (_obj = {}, _obj[foobar] = function () { diff --git a/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/mixed/expected.js b/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/mixed/expected.js index 3d6db24771..486ccadcb4 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/mixed/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/mixed/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _obj; var obj = (_obj = {}, _obj["x" + foo] = "heh", _obj["y" + bar] = "noo", _obj.foo = "foo", _obj.bar = "bar", _obj); diff --git a/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/multiple/expected.js b/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/multiple/expected.js index 6a23087ca8..13145e4a26 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/multiple/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/multiple/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _obj; var obj = (_obj = {}, _obj["x" + foo] = "heh", _obj["y" + bar] = "noo", _obj); diff --git a/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/options.json b/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/options.json index e2f0353e41..79da122a18 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/options.json +++ b/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/options.json @@ -1,4 +1,3 @@ { - "blacklist": ["es5.properties.mutators"], "loose": ["es6.properties.computed"] } diff --git a/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/single/expected.js b/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/single/expected.js index 5edaf8d9e8..59f3248681 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/single/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/single/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _obj; var obj = (_obj = {}, _obj["x" + foo] = "heh", _obj); diff --git a/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/this/expected.js b/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/this/expected.js index e5db7b747f..b7059d21b4 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/this/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/this/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _obj; var obj = (_obj = {}, _obj["x" + foo.bar] = "heh", _obj); diff --git a/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/two/expected.js b/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/two/expected.js index 636144a921..17be5789fa 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/two/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/two/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _obj; var obj = (_obj = { diff --git a/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/variable/expected.js b/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/variable/expected.js index 33f0163d3a..48e3cc1437 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/variable/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.properties.computed-loose/variable/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _foo; var foo = (_foo = {}, _foo[bar] = "foobar", _foo); diff --git a/packages/babel-core/test/fixtures/transformation/es6.properties.computed/argument/expected.js b/packages/babel-core/test/fixtures/transformation/es6.properties.computed/argument/expected.js index 6bc0ebf221..9fa59eebe3 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.properties.computed/argument/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.properties.computed/argument/expected.js @@ -1,3 +1 @@ -"use strict"; - foo(babelHelpers.defineProperty({}, bar, "foobar")); diff --git a/packages/babel-core/test/fixtures/transformation/es6.properties.computed/assignment/expected.js b/packages/babel-core/test/fixtures/transformation/es6.properties.computed/assignment/expected.js index 8ec8aae33e..f3a556fa0b 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.properties.computed/assignment/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.properties.computed/assignment/expected.js @@ -1,3 +1 @@ -"use strict"; - foo = babelHelpers.defineProperty({}, bar, "foobar"); diff --git a/packages/babel-core/test/fixtures/transformation/es6.properties.computed/ignore-symbol/expected.js b/packages/babel-core/test/fixtures/transformation/es6.properties.computed/ignore-symbol/expected.js index 683d1d51bf..a2226f929b 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.properties.computed/ignore-symbol/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.properties.computed/ignore-symbol/expected.js @@ -1,3 +1 @@ -"use strict"; - var foo = babelHelpers.defineProperty({}, Symbol.iterator, "foobar"); diff --git a/packages/babel-core/test/fixtures/transformation/es6.properties.computed/method/expected.js b/packages/babel-core/test/fixtures/transformation/es6.properties.computed/method/expected.js index 440ed65220..7388f306b9 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.properties.computed/method/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.properties.computed/method/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var obj = babelHelpers.defineProperty({}, foobar, function () { return "foobar"; }); diff --git a/packages/babel-core/test/fixtures/transformation/es6.properties.computed/mixed/expected.js b/packages/babel-core/test/fixtures/transformation/es6.properties.computed/mixed/expected.js index 225abc7834..edd2f74e58 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.properties.computed/mixed/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.properties.computed/mixed/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _obj; var obj = (_obj = {}, babelHelpers.defineProperty(_obj, "x" + foo, "heh"), babelHelpers.defineProperty(_obj, "y" + bar, "noo"), babelHelpers.defineProperty(_obj, "foo", "foo"), babelHelpers.defineProperty(_obj, "bar", "bar"), _obj); diff --git a/packages/babel-core/test/fixtures/transformation/es6.properties.computed/multiple/expected.js b/packages/babel-core/test/fixtures/transformation/es6.properties.computed/multiple/expected.js index 9da44049fe..38b2b44309 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.properties.computed/multiple/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.properties.computed/multiple/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _obj; var obj = (_obj = {}, babelHelpers.defineProperty(_obj, "x" + foo, "heh"), babelHelpers.defineProperty(_obj, "y" + bar, "noo"), _obj); diff --git a/packages/babel-core/test/fixtures/transformation/es6.properties.computed/options.json b/packages/babel-core/test/fixtures/transformation/es6.properties.computed/options.json index 7d6e6cda1c..9bd429db72 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.properties.computed/options.json +++ b/packages/babel-core/test/fixtures/transformation/es6.properties.computed/options.json @@ -1,3 +1,3 @@ { - "externalHelpers": true + "plugins": ["external-helpers", "transform-es2015-computed-properties"] } diff --git a/packages/babel-core/test/fixtures/transformation/es6.properties.computed/single/expected.js b/packages/babel-core/test/fixtures/transformation/es6.properties.computed/single/expected.js index 396ee17f25..15bdcc4c0e 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.properties.computed/single/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.properties.computed/single/expected.js @@ -1,3 +1 @@ -"use strict"; - var obj = babelHelpers.defineProperty({}, "x" + foo, "heh"); diff --git a/packages/babel-core/test/fixtures/transformation/es6.properties.computed/this/expected.js b/packages/babel-core/test/fixtures/transformation/es6.properties.computed/this/expected.js index 71edef2562..5763859300 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.properties.computed/this/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.properties.computed/this/expected.js @@ -1,3 +1 @@ -"use strict"; - var obj = babelHelpers.defineProperty({}, "x" + foo.bar, "heh"); diff --git a/packages/babel-core/test/fixtures/transformation/es6.properties.computed/two/expected.js b/packages/babel-core/test/fixtures/transformation/es6.properties.computed/two/expected.js index ea2e468d81..2c8e1e09bd 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.properties.computed/two/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.properties.computed/two/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var obj = babelHelpers.defineProperty({ first: "first" }, "second", "second"); diff --git a/packages/babel-core/test/fixtures/transformation/es6.properties.computed/variable/expected.js b/packages/babel-core/test/fixtures/transformation/es6.properties.computed/variable/expected.js index 53abd07fc8..fa6b4554cf 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.properties.computed/variable/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.properties.computed/variable/expected.js @@ -1,3 +1 @@ -"use strict"; - var foo = babelHelpers.defineProperty({}, bar, "foobar"); diff --git a/packages/babel-core/test/fixtures/transformation/es6.properties.shorthand/method-computed/expected.js b/packages/babel-core/test/fixtures/transformation/es6.properties.shorthand/method-computed/expected.js index dee1e103a4..86aeebf521 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.properties.shorthand/method-computed/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.properties.shorthand/method-computed/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var x = "y"; var valueSet; var obj = Object.defineProperties({}, babelHelpers.defineProperty({}, x, { @@ -13,4 +11,4 @@ var obj = Object.defineProperties({}, babelHelpers.defineProperty({}, x, { enumerable: true })); obj.y = "foo"; -obj.y === 1 && valueSet === "foo"; \ No newline at end of file +obj.y === 1 && valueSet === "foo"; diff --git a/packages/babel-core/test/fixtures/transformation/es6.properties.shorthand/method-computed/options.json b/packages/babel-core/test/fixtures/transformation/es6.properties.shorthand/method-computed/options.json index 7d6e6cda1c..019532b4f9 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.properties.shorthand/method-computed/options.json +++ b/packages/babel-core/test/fixtures/transformation/es6.properties.shorthand/method-computed/options.json @@ -1,3 +1,3 @@ { - "externalHelpers": true + "plugins": ["external-helpers"] } diff --git a/packages/babel-core/test/fixtures/transformation/es6.properties.shorthand/method-plain/expected.js b/packages/babel-core/test/fixtures/transformation/es6.properties.shorthand/method-plain/expected.js index 5d05971896..d4274143b3 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.properties.shorthand/method-plain/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.properties.shorthand/method-plain/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var obj = { method: function method() { return 5 + 5; diff --git a/packages/babel-core/test/fixtures/transformation/es6.properties.shorthand/options.json b/packages/babel-core/test/fixtures/transformation/es6.properties.shorthand/options.json new file mode 100644 index 0000000000..ff6dc638d8 --- /dev/null +++ b/packages/babel-core/test/fixtures/transformation/es6.properties.shorthand/options.json @@ -0,0 +1,3 @@ +{ + "plugins": ["transform-es2015-shorthand-properties"] +} diff --git a/packages/babel-core/test/fixtures/transformation/es6.properties.shorthand/shorthand-comments/expected.js b/packages/babel-core/test/fixtures/transformation/es6.properties.shorthand/shorthand-comments/expected.js index bb002dfed6..c5040d1fb3 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.properties.shorthand/shorthand-comments/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.properties.shorthand/shorthand-comments/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var A = "a"; var o = { A: A // comment diff --git a/packages/babel-core/test/fixtures/transformation/es6.properties.shorthand/shorthand-mixed/expected.js b/packages/babel-core/test/fixtures/transformation/es6.properties.shorthand/shorthand-mixed/expected.js index aca3a91133..128af922ca 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.properties.shorthand/shorthand-mixed/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.properties.shorthand/shorthand-mixed/expected.js @@ -1,3 +1 @@ -"use strict"; - var coords = { x: x, y: y, foo: "bar" }; diff --git a/packages/babel-core/test/fixtures/transformation/es6.properties.shorthand/shorthand-multiple/expected.js b/packages/babel-core/test/fixtures/transformation/es6.properties.shorthand/shorthand-multiple/expected.js index 02284f765b..aebd2a7bc7 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.properties.shorthand/shorthand-multiple/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.properties.shorthand/shorthand-multiple/expected.js @@ -1,3 +1 @@ -"use strict"; - var coords = { x: x, y: y }; diff --git a/packages/babel-core/test/fixtures/transformation/es6.properties.shorthand/shorthand-single/expected.js b/packages/babel-core/test/fixtures/transformation/es6.properties.shorthand/shorthand-single/expected.js index ac167b7ecb..eb07f9597c 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.properties.shorthand/shorthand-single/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.properties.shorthand/shorthand-single/expected.js @@ -1,3 +1 @@ -"use strict"; - var coords = { x: x }; diff --git a/packages/babel-core/test/fixtures/transformation/es6.regex.sticky/basic/expected.js b/packages/babel-core/test/fixtures/transformation/es6.regex.sticky/basic/expected.js index 41168a027c..46f0571570 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.regex.sticky/basic/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.regex.sticky/basic/expected.js @@ -1,3 +1 @@ -"use strict"; - var re = new RegExp("o+", "y"); diff --git a/packages/babel-core/test/fixtures/transformation/es6.regex.sticky/ignore-non-sticky/expected.js b/packages/babel-core/test/fixtures/transformation/es6.regex.sticky/ignore-non-sticky/expected.js index 9f8d8d1460..8a861816fd 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.regex.sticky/ignore-non-sticky/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.regex.sticky/ignore-non-sticky/expected.js @@ -1,3 +1 @@ -"use strict"; - var re = /o+/; diff --git a/packages/babel-core/test/fixtures/transformation/es6.regex.unicode/basic/expected.js b/packages/babel-core/test/fixtures/transformation/es6.regex.unicode/basic/expected.js index 670ac43a38..4a89fc4bc4 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.regex.unicode/basic/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.regex.unicode/basic/expected.js @@ -1,4 +1,2 @@ -"use strict"; - var string = "foo💩bar"; var match = string.match(/foo((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]))bar/); diff --git a/packages/babel-core/test/fixtures/transformation/es6.regex.unicode/ignore-non-unicode/expected.js b/packages/babel-core/test/fixtures/transformation/es6.regex.unicode/ignore-non-unicode/expected.js index 2a77fc0b65..3bf193d0ac 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.regex.unicode/ignore-non-unicode/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.regex.unicode/ignore-non-unicode/expected.js @@ -1,4 +1,2 @@ -"use strict"; - var string = "foo💩bar"; var match = string.match(/foo(.)bar/); diff --git a/packages/babel-core/test/fixtures/transformation/es6.spec.symbols/instanceof/expected.js b/packages/babel-core/test/fixtures/transformation/es6.spec.symbols/instanceof/expected.js index 4ddd47c253..5991efed09 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.spec.symbols/instanceof/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.spec.symbols/instanceof/expected.js @@ -1,3 +1 @@ -"use strict"; - babelHelpers._instanceof(a, b); diff --git a/packages/babel-core/test/fixtures/transformation/es6.spec.symbols/options.json b/packages/babel-core/test/fixtures/transformation/es6.spec.symbols/options.json index e007f6a10a..fdf82aa75a 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.spec.symbols/options.json +++ b/packages/babel-core/test/fixtures/transformation/es6.spec.symbols/options.json @@ -1,4 +1,4 @@ { - "externalHelpers": true, + "plugins": ["external-helpers"], "optional": ["es6.spec.symbols"] } diff --git a/packages/babel-core/test/fixtures/transformation/es6.spec.symbols/typeof/expected.js b/packages/babel-core/test/fixtures/transformation/es6.spec.symbols/typeof/expected.js index fc73784fe4..50931cbb5f 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.spec.symbols/typeof/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.spec.symbols/typeof/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var s = Symbol("s"); assert.ok((typeof s === "undefined" ? "undefined" : babelHelpers._typeof(s)) === "symbol"); assert.equal(typeof s === "undefined" ? "undefined" : babelHelpers._typeof(s), "symbol"); diff --git a/packages/babel-core/test/fixtures/transformation/es6.spec.template-literals/escape-quotes/expected.js b/packages/babel-core/test/fixtures/transformation/es6.spec.template-literals/escape-quotes/expected.js index c34ee53b93..287788efd9 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.spec.template-literals/escape-quotes/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.spec.template-literals/escape-quotes/expected.js @@ -1,3 +1 @@ -"use strict"; - var t = "'" + String(foo) + "' \"" + String(bar) + "\""; diff --git a/packages/babel-core/test/fixtures/transformation/es6.spec.template-literals/functions/expected.js b/packages/babel-core/test/fixtures/transformation/es6.spec.template-literals/functions/expected.js index 20228e55fb..9268305f36 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.spec.template-literals/functions/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.spec.template-literals/functions/expected.js @@ -1,3 +1 @@ -"use strict"; - var foo = "test " + String(_.test(foo)) + " " + String(bar); diff --git a/packages/babel-core/test/fixtures/transformation/es6.spec.template-literals/multiline/expected.js b/packages/babel-core/test/fixtures/transformation/es6.spec.template-literals/multiline/expected.js index 80999853d6..f679f38c70 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.spec.template-literals/multiline/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.spec.template-literals/multiline/expected.js @@ -1,3 +1 @@ -"use strict"; - var o = "wow\nthis is\nactually multiline!"; diff --git a/packages/babel-core/test/fixtures/transformation/es6.spec.template-literals/multiple/expected.js b/packages/babel-core/test/fixtures/transformation/es6.spec.template-literals/multiple/expected.js index 47b9641c7b..29a6093e5c 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.spec.template-literals/multiple/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.spec.template-literals/multiple/expected.js @@ -1,3 +1 @@ -"use strict"; - var foo = "test " + String(foo) + " " + String(bar); diff --git a/packages/babel-core/test/fixtures/transformation/es6.spec.template-literals/none/expected.js b/packages/babel-core/test/fixtures/transformation/es6.spec.template-literals/none/expected.js index 5917e8e433..7768209432 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.spec.template-literals/none/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.spec.template-literals/none/expected.js @@ -1,3 +1 @@ -"use strict"; - var foo = "test"; diff --git a/packages/babel-core/test/fixtures/transformation/es6.spec.template-literals/only/expected.js b/packages/babel-core/test/fixtures/transformation/es6.spec.template-literals/only/expected.js index 1515a86363..eadb924d1d 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.spec.template-literals/only/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.spec.template-literals/only/expected.js @@ -1,3 +1 @@ -"use strict"; - var foo = "" + String(test); diff --git a/packages/babel-core/test/fixtures/transformation/es6.spec.template-literals/single/expected.js b/packages/babel-core/test/fixtures/transformation/es6.spec.template-literals/single/expected.js index 971b630db3..265332f7f2 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.spec.template-literals/single/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.spec.template-literals/single/expected.js @@ -1,3 +1 @@ -"use strict"; - var foo = "test " + String(foo); diff --git a/packages/babel-core/test/fixtures/transformation/es6.spec.template-literals/statement/expected.js b/packages/babel-core/test/fixtures/transformation/es6.spec.template-literals/statement/expected.js index abddef1a72..7625842cc8 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.spec.template-literals/statement/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.spec.template-literals/statement/expected.js @@ -1,3 +1 @@ -"use strict"; - var foo = "test " + String(foo + bar); diff --git a/packages/babel-core/test/fixtures/transformation/es6.spread/arguments-array/expected.js b/packages/babel-core/test/fixtures/transformation/es6.spread/arguments-array/expected.js index 18aecfa027..bfb6ca25d1 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.spread/arguments-array/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.spread/arguments-array/expected.js @@ -1,5 +1,3 @@ -"use strict"; - function foo() { return bar([].concat(babelHelpers.slice.call(arguments))); } diff --git a/packages/babel-core/test/fixtures/transformation/es6.spread/arguments-concat/expected.js b/packages/babel-core/test/fixtures/transformation/es6.spread/arguments-concat/expected.js index 23468169cb..6fc41df2fc 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.spread/arguments-concat/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.spread/arguments-concat/expected.js @@ -1,5 +1,3 @@ -"use strict"; - function foo() { return bar.apply(undefined, ["test"].concat(babelHelpers.slice.call(arguments))); } diff --git a/packages/babel-core/test/fixtures/transformation/es6.spread/arguments/expected.js b/packages/babel-core/test/fixtures/transformation/es6.spread/arguments/expected.js index 52a18f07e7..d45e71391e 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.spread/arguments/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.spread/arguments/expected.js @@ -1,5 +1,3 @@ -"use strict"; - function foo() { return bar.apply(undefined, arguments); } diff --git a/packages/babel-core/test/fixtures/transformation/es6.spread/array-literal-first/expected.js b/packages/babel-core/test/fixtures/transformation/es6.spread/array-literal-first/expected.js index 65e76aebc6..1da8c64e83 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.spread/array-literal-first/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.spread/array-literal-first/expected.js @@ -1,3 +1 @@ -"use strict"; - var lyrics = [].concat(babelHelpers.toConsumableArray(parts), ["head", "and", "toes"]); diff --git a/packages/babel-core/test/fixtures/transformation/es6.spread/array-literal-middle/expected.js b/packages/babel-core/test/fixtures/transformation/es6.spread/array-literal-middle/expected.js index 91292cb698..76defd138b 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.spread/array-literal-middle/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.spread/array-literal-middle/expected.js @@ -1,3 +1 @@ -"use strict"; - var a = [b].concat(babelHelpers.toConsumableArray(c), [d]); diff --git a/packages/babel-core/test/fixtures/transformation/es6.spread/array-literal-multiple/expected.js b/packages/babel-core/test/fixtures/transformation/es6.spread/array-literal-multiple/expected.js index a9e349d03b..1d09cbb113 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.spread/array-literal-multiple/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.spread/array-literal-multiple/expected.js @@ -1,3 +1 @@ -"use strict"; - var a = [b].concat(babelHelpers.toConsumableArray(c), [d, e], babelHelpers.toConsumableArray(f)); diff --git a/packages/babel-core/test/fixtures/transformation/es6.spread/array-literals/expected.js b/packages/babel-core/test/fixtures/transformation/es6.spread/array-literals/expected.js index 436c91026b..26f0d99de6 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.spread/array-literals/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.spread/array-literals/expected.js @@ -1,3 +1 @@ -"use strict"; - var lyrics = ["head", "and", "toes"].concat(babelHelpers.toConsumableArray(parts)); diff --git a/packages/babel-core/test/fixtures/transformation/es6.spread/contexted-computed-method-call-multiple-args/expected.js b/packages/babel-core/test/fixtures/transformation/es6.spread/contexted-computed-method-call-multiple-args/expected.js index 93e7396960..7cb616ab7f 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.spread/contexted-computed-method-call-multiple-args/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.spread/contexted-computed-method-call-multiple-args/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _obj; (_obj = obj)[method].apply(_obj, [foo, bar].concat(babelHelpers.toConsumableArray(args))); diff --git a/packages/babel-core/test/fixtures/transformation/es6.spread/contexted-computed-method-call-single-arg/expected.js b/packages/babel-core/test/fixtures/transformation/es6.spread/contexted-computed-method-call-single-arg/expected.js index e1a10318ec..3222c2d75d 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.spread/contexted-computed-method-call-single-arg/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.spread/contexted-computed-method-call-single-arg/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _obj; (_obj = obj)[method].apply(_obj, babelHelpers.toConsumableArray(args)); diff --git a/packages/babel-core/test/fixtures/transformation/es6.spread/contexted-method-call-multiple-args/expected.js b/packages/babel-core/test/fixtures/transformation/es6.spread/contexted-method-call-multiple-args/expected.js index 97f2cdfdf0..43d764258d 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.spread/contexted-method-call-multiple-args/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.spread/contexted-method-call-multiple-args/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _foob, _foob$test; (_foob = foob).add.apply(_foob, [foo, bar].concat(babelHelpers.toConsumableArray(numbers))); diff --git a/packages/babel-core/test/fixtures/transformation/es6.spread/contexted-method-call-single-arg/expected.js b/packages/babel-core/test/fixtures/transformation/es6.spread/contexted-method-call-single-arg/expected.js index 868a092240..0738e9cbf1 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.spread/contexted-method-call-single-arg/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.spread/contexted-method-call-single-arg/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _foob, _foob$test; (_foob = foob).add.apply(_foob, babelHelpers.toConsumableArray(numbers)); diff --git a/packages/babel-core/test/fixtures/transformation/es6.spread/known-rest/expected.js b/packages/babel-core/test/fixtures/transformation/es6.spread/known-rest/expected.js index 9c8a2feacf..ef1a228a9f 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.spread/known-rest/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.spread/known-rest/expected.js @@ -1,5 +1,3 @@ -"use strict"; - function foo() { for (var _len = arguments.length, bar = Array(_len), _key = 0; _key < _len; _key++) { bar[_key] = arguments[_key]; diff --git a/packages/babel-core/test/fixtures/transformation/es6.spread/method-call-array-literal/expected.js b/packages/babel-core/test/fixtures/transformation/es6.spread/method-call-array-literal/expected.js index a370047756..c395b0f120 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.spread/method-call-array-literal/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.spread/method-call-array-literal/expected.js @@ -1,3 +1 @@ -"use strict"; - f.apply(undefined, [1, 2, 3]); diff --git a/packages/babel-core/test/fixtures/transformation/es6.spread/method-call-first/expected.js b/packages/babel-core/test/fixtures/transformation/es6.spread/method-call-first/expected.js index b21bb56b0b..7a10a2554e 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.spread/method-call-first/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.spread/method-call-first/expected.js @@ -1,3 +1 @@ -"use strict"; - add.apply(undefined, babelHelpers.toConsumableArray(numbers).concat([foo, bar])); diff --git a/packages/babel-core/test/fixtures/transformation/es6.spread/method-call-middle/expected.js b/packages/babel-core/test/fixtures/transformation/es6.spread/method-call-middle/expected.js index aa58d4b763..37fbf0e473 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.spread/method-call-middle/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.spread/method-call-middle/expected.js @@ -1,3 +1 @@ -"use strict"; - add.apply(undefined, [foo].concat(babelHelpers.toConsumableArray(numbers), [bar])); diff --git a/packages/babel-core/test/fixtures/transformation/es6.spread/method-call-multiple-args/expected.js b/packages/babel-core/test/fixtures/transformation/es6.spread/method-call-multiple-args/expected.js index b05198cb1f..7846105c95 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.spread/method-call-multiple-args/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.spread/method-call-multiple-args/expected.js @@ -1,3 +1 @@ -"use strict"; - add.apply(undefined, [foo, bar].concat(babelHelpers.toConsumableArray(numbers))); diff --git a/packages/babel-core/test/fixtures/transformation/es6.spread/method-call-multiple/expected.js b/packages/babel-core/test/fixtures/transformation/es6.spread/method-call-multiple/expected.js index efbcb25bb6..822019bdbd 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.spread/method-call-multiple/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.spread/method-call-multiple/expected.js @@ -1,3 +1 @@ -"use strict"; - add.apply(undefined, [foo].concat(babelHelpers.toConsumableArray(numbers), [bar, what], babelHelpers.toConsumableArray(test))); diff --git a/packages/babel-core/test/fixtures/transformation/es6.spread/method-call-single-arg/expected.js b/packages/babel-core/test/fixtures/transformation/es6.spread/method-call-single-arg/expected.js index 3b817b4f15..c24e938c22 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.spread/method-call-single-arg/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.spread/method-call-single-arg/expected.js @@ -1,3 +1 @@ -"use strict"; - add.apply(undefined, babelHelpers.toConsumableArray(numbers)); diff --git a/packages/babel-core/test/fixtures/transformation/es6.spread/new-expression/expected.js b/packages/babel-core/test/fixtures/transformation/es6.spread/new-expression/expected.js index 2b726aaab6..af203c87d1 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.spread/new-expression/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.spread/new-expression/expected.js @@ -1,4 +1,2 @@ -"use strict"; - new (babelHelpers.bind.apply(Numbers, [null].concat(babelHelpers.toConsumableArray(nums))))(); new (babelHelpers.bind.apply(Numbers, [null].concat([1], babelHelpers.toConsumableArray(nums))))(); diff --git a/packages/babel-core/test/fixtures/transformation/es6.spread/options.json b/packages/babel-core/test/fixtures/transformation/es6.spread/options.json index 02c3a96413..db29d06ec6 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.spread/options.json +++ b/packages/babel-core/test/fixtures/transformation/es6.spread/options.json @@ -1,4 +1,3 @@ { - "externalHelpers": true, - "blacklist": ["es6.tailCall"] + "plugins": ["external-helpers", "transform-es2015-spread"] } diff --git a/packages/babel-core/test/fixtures/transformation/es6.spread/single/expected.js b/packages/babel-core/test/fixtures/transformation/es6.spread/single/expected.js index 68249fd331..9286e2ae99 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.spread/single/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.spread/single/expected.js @@ -1,3 +1 @@ -"use strict"; - [].concat(babelHelpers.toConsumableArray(foo)); diff --git a/packages/babel-core/test/fixtures/transformation/es6.spread/this-context/expected.js b/packages/babel-core/test/fixtures/transformation/es6.spread/this-context/expected.js index 3a9d917b5a..eb82fafbd5 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.spread/this-context/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.spread/this-context/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var obj = { foo: function foo() { this.bar.apply(this, arguments); diff --git a/packages/babel-core/test/fixtures/transformation/es6.tail-call/call-apply/expected.js b/packages/babel-core/test/fixtures/transformation/es6.tail-call/call-apply/expected.js index c7dcd045d5..3634614940 100755 --- a/packages/babel-core/test/fixtures/transformation/es6.tail-call/call-apply/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.tail-call/call-apply/expected.js @@ -1,5 +1,3 @@ -"use strict"; - (function f(_x) { var _this = this, _arguments = arguments; diff --git a/packages/babel-core/test/fixtures/transformation/es6.tail-call/default-parameters/expected.js b/packages/babel-core/test/fixtures/transformation/es6.tail-call/default-parameters/expected.js index 43e6c9cc73..f7f9998032 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.tail-call/default-parameters/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.tail-call/default-parameters/expected.js @@ -1,5 +1,3 @@ -"use strict"; - function sum() { var _arguments = arguments; var _again = true; @@ -17,4 +15,4 @@ function sum() { } return a; } -} \ No newline at end of file +} diff --git a/packages/babel-core/test/fixtures/transformation/es6.tail-call/expression-consequent/expected.js b/packages/babel-core/test/fixtures/transformation/es6.tail-call/expression-consequent/expected.js index fba01025e8..d31e15410c 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.tail-call/expression-consequent/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.tail-call/expression-consequent/expected.js @@ -1,5 +1,3 @@ -"use strict"; - function f() { var _again = true; diff --git a/packages/babel-core/test/fixtures/transformation/es6.tail-call/expressions/expected.js b/packages/babel-core/test/fixtures/transformation/es6.tail-call/expressions/expected.js index 1246e98c10..92a92ecf49 100755 --- a/packages/babel-core/test/fixtures/transformation/es6.tail-call/expressions/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.tail-call/expressions/expected.js @@ -1,5 +1,3 @@ -"use strict"; - (function f(_x) { var _left; diff --git a/packages/babel-core/test/fixtures/transformation/es6.tail-call/factorial/expected.js b/packages/babel-core/test/fixtures/transformation/es6.tail-call/factorial/expected.js index 55fbf85b21..456b29f725 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.tail-call/factorial/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.tail-call/factorial/expected.js @@ -1,5 +1,3 @@ -"use strict"; - function fact(_x2) { var _arguments = arguments; var _again = true; @@ -17,4 +15,4 @@ function fact(_x2) { return acc; } } -} \ No newline at end of file +} diff --git a/packages/babel-core/test/fixtures/transformation/es6.tail-call/ignore-reassigned/expected.js b/packages/babel-core/test/fixtures/transformation/es6.tail-call/ignore-reassigned/expected.js index 66d333d054..cfb6182a00 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.tail-call/ignore-reassigned/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.tail-call/ignore-reassigned/expected.js @@ -1,8 +1,6 @@ // we need to deopt `test` if it's reassigned as we can't be certain of it's // state, ie. it could have been rebound or dereferenced -"use strict"; - function test(exit) { if (exit) { return this.x; diff --git a/packages/babel-core/test/fixtures/transformation/es6.tail-call/max-args/expected.js b/packages/babel-core/test/fixtures/transformation/es6.tail-call/max-args/expected.js index 5e609ac64e..30f534efc0 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.tail-call/max-args/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.tail-call/max-args/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var count = function count() { var _arguments = arguments; var _again = true; @@ -30,4 +28,4 @@ function count2() { _again2 = true; continue _function2; } -} \ No newline at end of file +} diff --git a/packages/babel-core/test/fixtures/transformation/es6.tail-call/parameter-exceeds/expected.js b/packages/babel-core/test/fixtures/transformation/es6.tail-call/parameter-exceeds/expected.js index c666b193c7..c0236f6b32 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.tail-call/parameter-exceeds/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.tail-call/parameter-exceeds/expected.js @@ -1,5 +1,3 @@ -"use strict"; - function foo(a, b) { if (b) { return foo(b); diff --git a/packages/babel-core/test/fixtures/transformation/es6.tail-call/recursion/expected.js b/packages/babel-core/test/fixtures/transformation/es6.tail-call/recursion/expected.js index 62607b250f..7ed702bc92 100755 --- a/packages/babel-core/test/fixtures/transformation/es6.tail-call/recursion/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.tail-call/recursion/expected.js @@ -1,5 +1,3 @@ -"use strict"; - (function f(_x2) { var _arguments = arguments; var _again = true; @@ -27,4 +25,4 @@ _again = true; continue _function; } -})(1e6, true) === "foo"; \ No newline at end of file +})(1e6, true) === "foo"; diff --git a/packages/babel-core/test/fixtures/transformation/es6.tail-call/shadow/expected.js b/packages/babel-core/test/fixtures/transformation/es6.tail-call/shadow/expected.js index c5f7327030..2417064bb7 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.tail-call/shadow/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.tail-call/shadow/expected.js @@ -1,5 +1,3 @@ -"use strict"; - (function () { var _this = this, _arguments2 = arguments; diff --git a/packages/babel-core/test/fixtures/transformation/es6.tail-call/try-catch/expected.js b/packages/babel-core/test/fixtures/transformation/es6.tail-call/try-catch/expected.js index 4be762ccb2..2602d65a55 100755 --- a/packages/babel-core/test/fixtures/transformation/es6.tail-call/try-catch/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.tail-call/try-catch/expected.js @@ -1,5 +1,3 @@ -"use strict"; - (function f(n) { if (n <= 0) { return "foo"; diff --git a/packages/babel-core/test/fixtures/transformation/es6.template-literals/escape-quotes/expected.js b/packages/babel-core/test/fixtures/transformation/es6.template-literals/escape-quotes/expected.js index b13235af59..67956e60ff 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.template-literals/escape-quotes/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.template-literals/escape-quotes/expected.js @@ -1,3 +1 @@ -"use strict"; - var t = "'" + foo + "' \"" + bar + "\""; diff --git a/packages/babel-core/test/fixtures/transformation/es6.template-literals/expression-first/actual.js b/packages/babel-core/test/fixtures/transformation/es6.template-literals/expression-first/actual.js index 2ad884f81c..0f3a53f8a1 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.template-literals/expression-first/actual.js +++ b/packages/babel-core/test/fixtures/transformation/es6.template-literals/expression-first/actual.js @@ -1,9 +1,9 @@ -const foo = 5; -const bar = 10; -const baz = 15; +var foo = 5; +var bar = 10; +var baz = 15; -const example = `${"a"}`; -const example2 = `${1}`; -const example3 = 1 + `${foo}${bar}${baz}`; -const example4 = 1 + `${foo}bar${baz}`; -const example5 = `${""}`; +var example = `${"a"}`; +var example2 = `${1}`; +var example3 = 1 + `${foo}${bar}${baz}`; +var example4 = 1 + `${foo}bar${baz}`; +var example5 = `${""}`; diff --git a/packages/babel-core/test/fixtures/transformation/es6.template-literals/expression-first/expected.js b/packages/babel-core/test/fixtures/transformation/es6.template-literals/expression-first/expected.js index 1fbcec8925..801e7db5ad 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.template-literals/expression-first/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.template-literals/expression-first/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var foo = 5; var bar = 10; var baz = 15; diff --git a/packages/babel-core/test/fixtures/transformation/es6.template-literals/functions/expected.js b/packages/babel-core/test/fixtures/transformation/es6.template-literals/functions/expected.js index 83df73bd85..027f457d3c 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.template-literals/functions/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.template-literals/functions/expected.js @@ -1,3 +1 @@ -"use strict"; - var foo = "test " + _.test(foo) + " " + bar; diff --git a/packages/babel-core/test/fixtures/transformation/es6.template-literals/multiline/expected.js b/packages/babel-core/test/fixtures/transformation/es6.template-literals/multiline/expected.js index 80999853d6..f679f38c70 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.template-literals/multiline/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.template-literals/multiline/expected.js @@ -1,3 +1 @@ -"use strict"; - var o = "wow\nthis is\nactually multiline!"; diff --git a/packages/babel-core/test/fixtures/transformation/es6.template-literals/multiple/expected.js b/packages/babel-core/test/fixtures/transformation/es6.template-literals/multiple/expected.js index 664df108b0..cf7167ad71 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.template-literals/multiple/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.template-literals/multiple/expected.js @@ -1,3 +1 @@ -"use strict"; - var foo = "test " + foo + " " + bar; diff --git a/packages/babel-core/test/fixtures/transformation/es6.template-literals/none/expected.js b/packages/babel-core/test/fixtures/transformation/es6.template-literals/none/expected.js index 5917e8e433..7768209432 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.template-literals/none/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.template-literals/none/expected.js @@ -1,3 +1 @@ -"use strict"; - var foo = "test"; diff --git a/packages/babel-core/test/fixtures/transformation/es6.template-literals/only/expected.js b/packages/babel-core/test/fixtures/transformation/es6.template-literals/only/expected.js index 7fa1c086e7..e7d47c4755 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.template-literals/only/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.template-literals/only/expected.js @@ -1,3 +1 @@ -"use strict"; - var foo = "" + test; diff --git a/packages/babel-core/test/fixtures/transformation/es6.template-literals/options.json b/packages/babel-core/test/fixtures/transformation/es6.template-literals/options.json new file mode 100644 index 0000000000..341222f184 --- /dev/null +++ b/packages/babel-core/test/fixtures/transformation/es6.template-literals/options.json @@ -0,0 +1,3 @@ +{ + "plugins": ["transform-es2015-template-literals"] +} diff --git a/packages/babel-core/test/fixtures/transformation/es6.template-literals/single/expected.js b/packages/babel-core/test/fixtures/transformation/es6.template-literals/single/expected.js index 1acf0454aa..dae1e8ea59 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.template-literals/single/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.template-literals/single/expected.js @@ -1,3 +1 @@ -"use strict"; - var foo = "test " + foo; diff --git a/packages/babel-core/test/fixtures/transformation/es6.template-literals/statement/expected.js b/packages/babel-core/test/fixtures/transformation/es6.template-literals/statement/expected.js index ee58935944..4d5209dbd6 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.template-literals/statement/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.template-literals/statement/expected.js @@ -1,3 +1 @@ -"use strict"; - var foo = "test " + (foo + bar); diff --git a/packages/babel-core/test/fixtures/transformation/es6.template-literals/tag-loose/expected.js b/packages/babel-core/test/fixtures/transformation/es6.template-literals/tag-loose/expected.js index 9378680632..d8563b0301 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.template-literals/tag-loose/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.template-literals/tag-loose/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _templateObject = _taggedTemplateLiteralLoose(["wow\na", "b ", ""], ["wow\\na", "b ", ""]), _templateObject2 = _taggedTemplateLiteralLoose(["wow\nab", " ", ""], ["wow\\nab", " ", ""]), _templateObject3 = _taggedTemplateLiteralLoose(["wow\naB", " ", ""], ["wow\\naB", " ", ""]); @@ -8,4 +6,4 @@ function _taggedTemplateLiteralLoose(strings, raw) { strings.raw = raw; return s var foo = bar(_templateObject, 42, _.foobar()); var bar = bar(_templateObject2, 42, _.foobar()); -var bar = bar(_templateObject3, 42, _.baz()); \ No newline at end of file +var bar = bar(_templateObject3, 42, _.baz()); diff --git a/packages/babel-core/test/fixtures/transformation/es6.template-literals/tag/expected.js b/packages/babel-core/test/fixtures/transformation/es6.template-literals/tag/expected.js index 7749db566b..947ec93f83 100644 --- a/packages/babel-core/test/fixtures/transformation/es6.template-literals/tag/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es6.template-literals/tag/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _templateObject = _taggedTemplateLiteral(["wow\na", "b ", ""], ["wow\\na", "b ", ""]); function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } diff --git a/packages/babel-core/test/fixtures/transformation/es7.class-properties/constructor-collision/expected.js b/packages/babel-core/test/fixtures/transformation/es7.class-properties/constructor-collision/expected.js index 7717ef7e3d..3c4da0c5ac 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.class-properties/constructor-collision/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.class-properties/constructor-collision/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var foo = "bar"; var Foo = (function () { diff --git a/packages/babel-core/test/fixtures/transformation/es7.class-properties/derived/expected.js b/packages/babel-core/test/fixtures/transformation/es7.class-properties/derived/expected.js index 221a69fd86..04ad4dc07d 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.class-properties/derived/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.class-properties/derived/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var Foo = (function (_Bar) { babelHelpers.inherits(Foo, _Bar); diff --git a/packages/babel-core/test/fixtures/transformation/es7.class-properties/instance-undefined/expected.js b/packages/babel-core/test/fixtures/transformation/es7.class-properties/instance-undefined/expected.js index c99d5881af..4f46d4a642 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.class-properties/instance-undefined/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.class-properties/instance-undefined/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var Foo = function Foo() { babelHelpers.classCallCheck(this, Foo); }; diff --git a/packages/babel-core/test/fixtures/transformation/es7.class-properties/instance/expected.js b/packages/babel-core/test/fixtures/transformation/es7.class-properties/instance/expected.js index 8f200f662d..f832ea3565 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.class-properties/instance/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.class-properties/instance/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var Foo = function Foo() { babelHelpers.classCallCheck(this, Foo); this.bar = "foo"; diff --git a/packages/babel-core/test/fixtures/transformation/es7.class-properties/options.json b/packages/babel-core/test/fixtures/transformation/es7.class-properties/options.json index 46f7f11c3b..c4fd4ec0e4 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.class-properties/options.json +++ b/packages/babel-core/test/fixtures/transformation/es7.class-properties/options.json @@ -1,4 +1,3 @@ { - "externalHelpers": true, - "optional": ["es7.classProperties"] + "plugins": ["external-helpers", "transform-class-properties"] } diff --git a/packages/babel-core/test/fixtures/transformation/es7.class-properties/static-undefined/expected.js b/packages/babel-core/test/fixtures/transformation/es7.class-properties/static-undefined/expected.js index c99d5881af..4f46d4a642 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.class-properties/static-undefined/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.class-properties/static-undefined/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var Foo = function Foo() { babelHelpers.classCallCheck(this, Foo); }; diff --git a/packages/babel-core/test/fixtures/transformation/es7.class-properties/static/expected.js b/packages/babel-core/test/fixtures/transformation/es7.class-properties/static/expected.js index 0ccd55f431..2d68553c98 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.class-properties/static/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.class-properties/static/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var Foo = (function () { function Foo() { babelHelpers.classCallCheck(this, Foo); diff --git a/packages/babel-core/test/fixtures/transformation/es7.class-properties/super-expression/expected.js b/packages/babel-core/test/fixtures/transformation/es7.class-properties/super-expression/expected.js index d7eb6e3d51..e4eb6240d8 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.class-properties/super-expression/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.class-properties/super-expression/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var Foo = (function (_Bar) { babelHelpers.inherits(Foo, _Bar); diff --git a/packages/babel-core/test/fixtures/transformation/es7.class-properties/super-statement/expected.js b/packages/babel-core/test/fixtures/transformation/es7.class-properties/super-statement/expected.js index 37cf39e659..35b94e660a 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.class-properties/super-statement/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.class-properties/super-statement/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var Foo = (function (_Bar) { babelHelpers.inherits(Foo, _Bar); diff --git a/packages/babel-core/test/fixtures/transformation/es7.comprehensions/arguments/expected.js b/packages/babel-core/test/fixtures/transformation/es7.comprehensions/arguments/expected.js index ea21a12ae3..f02ad56b61 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.comprehensions/arguments/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.comprehensions/arguments/expected.js @@ -1,5 +1,3 @@ -"use strict"; - function add() { var _arguments = arguments; diff --git a/packages/babel-core/test/fixtures/transformation/es7.comprehensions/array-expression-single-if/expected.js b/packages/babel-core/test/fixtures/transformation/es7.comprehensions/array-expression-single-if/expected.js index f36d1c6137..8bcbe9767d 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.comprehensions/array-expression-single-if/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.comprehensions/array-expression-single-if/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var arr = (function () { var _arr = []; var _arr2 = [1, 2, 3]; diff --git a/packages/babel-core/test/fixtures/transformation/es7.comprehensions/array-expression-single/expected.js b/packages/babel-core/test/fixtures/transformation/es7.comprehensions/array-expression-single/expected.js index 0758f1ede6..b26a15eadd 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.comprehensions/array-expression-single/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.comprehensions/array-expression-single/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var arr = (function () { var _arr = []; var _arr2 = [1, 2, 3]; diff --git a/packages/babel-core/test/fixtures/transformation/es7.comprehensions/array-multiple-if/expected.js b/packages/babel-core/test/fixtures/transformation/es7.comprehensions/array-multiple-if/expected.js index 099cb320f3..7036c1a738 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.comprehensions/array-multiple-if/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.comprehensions/array-multiple-if/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var seattlers = (function () { var _seattlers = []; var _iteratorNormalCompletion = true; diff --git a/packages/babel-core/test/fixtures/transformation/es7.comprehensions/array-multiple/expected.js b/packages/babel-core/test/fixtures/transformation/es7.comprehensions/array-multiple/expected.js index cf9691a164..73311444e9 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.comprehensions/array-multiple/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.comprehensions/array-multiple/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var arr = (function () { var _arr = []; var _iteratorNormalCompletion = true; diff --git a/packages/babel-core/test/fixtures/transformation/es7.comprehensions/array-single-if/expected.js b/packages/babel-core/test/fixtures/transformation/es7.comprehensions/array-single-if/expected.js index 5c8a0bcdea..4d4bc5e399 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.comprehensions/array-single-if/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.comprehensions/array-single-if/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var arr = (function () { var _arr = []; var _iteratorNormalCompletion = true; @@ -30,4 +28,4 @@ var arr = (function () { } return _arr; -})(); \ No newline at end of file +})(); diff --git a/packages/babel-core/test/fixtures/transformation/es7.comprehensions/array-single/expected.js b/packages/babel-core/test/fixtures/transformation/es7.comprehensions/array-single/expected.js index 730fc32af8..70fa294f4f 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.comprehensions/array-single/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.comprehensions/array-single/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var arr = (function () { var _arr = []; var _iteratorNormalCompletion = true; @@ -28,4 +26,4 @@ var arr = (function () { } return _arr; -})(); \ No newline at end of file +})(); diff --git a/packages/babel-core/test/fixtures/transformation/es7.comprehensions/array-this/expected.js b/packages/babel-core/test/fixtures/transformation/es7.comprehensions/array-this/expected.js index 4ca4eeaee8..c207994ede 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.comprehensions/array-this/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.comprehensions/array-this/expected.js @@ -1,5 +1,3 @@ -"use strict"; - function add() { var _this = this; diff --git a/packages/babel-core/test/fixtures/transformation/es7.comprehensions/options.json b/packages/babel-core/test/fixtures/transformation/es7.comprehensions/options.json deleted file mode 100644 index 408f26ae20..0000000000 --- a/packages/babel-core/test/fixtures/transformation/es7.comprehensions/options.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "stage": 0, - "blacklist": ["es6.tailCall"] -} diff --git a/packages/babel-core/test/fixtures/transformation/es7.decorators/class-getter-and-setter/expected.js b/packages/babel-core/test/fixtures/transformation/es7.decorators/class-getter-and-setter/expected.js index b30456d7c3..590dba750a 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.decorators/class-getter-and-setter/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.decorators/class-getter-and-setter/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var Foo = (function () { function Foo() { babelHelpers.classCallCheck(this, Foo); @@ -12,4 +10,4 @@ var Foo = (function () { set: function set(bar) {} }]); return Foo; -})(); \ No newline at end of file +})(); diff --git a/packages/babel-core/test/fixtures/transformation/es7.decorators/class-getter/expected.js b/packages/babel-core/test/fixtures/transformation/es7.decorators/class-getter/expected.js index dc3a201004..f1ab0064a3 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.decorators/class-getter/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.decorators/class-getter/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var Foo = (function () { function Foo() { babelHelpers.classCallCheck(this, Foo); @@ -11,4 +9,4 @@ var Foo = (function () { get: function get() {} }]); return Foo; -})(); \ No newline at end of file +})(); diff --git a/packages/babel-core/test/fixtures/transformation/es7.decorators/class-init-instance-props/expected.js b/packages/babel-core/test/fixtures/transformation/es7.decorators/class-init-instance-props/expected.js index cacebd7e5d..1160ef3561 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.decorators/class-init-instance-props/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.decorators/class-init-instance-props/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var Foo = (function () { var _instanceInitializers = {}; @@ -17,4 +15,4 @@ var Foo = (function () { enumerable: true }], null, _instanceInitializers); return Foo; -})(); \ No newline at end of file +})(); diff --git a/packages/babel-core/test/fixtures/transformation/es7.decorators/class-init-static-props/expected.js b/packages/babel-core/test/fixtures/transformation/es7.decorators/class-init-static-props/expected.js index 6ac35e3513..029d2e94d3 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.decorators/class-init-static-props/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.decorators/class-init-static-props/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var Foo = (function () { var _staticInitializers = {}; @@ -17,4 +15,4 @@ var Foo = (function () { }], null, _staticInitializers); babelHelpers.defineDecoratedPropertyDescriptor(Foo, "foo", _staticInitializers); return Foo; -})(); \ No newline at end of file +})(); diff --git a/packages/babel-core/test/fixtures/transformation/es7.decorators/class-method/expected.js b/packages/babel-core/test/fixtures/transformation/es7.decorators/class-method/expected.js index 2ad2f8b0aa..152db01c9d 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.decorators/class-method/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.decorators/class-method/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var Foo = (function () { function Foo() { babelHelpers.classCallCheck(this, Foo); @@ -11,4 +9,4 @@ var Foo = (function () { value: function foo() {} }]); return Foo; -})(); \ No newline at end of file +})(); diff --git a/packages/babel-core/test/fixtures/transformation/es7.decorators/class-modules/expected.js b/packages/babel-core/test/fixtures/transformation/es7.decorators/class-modules/expected.js index f6bd5d84b2..0ea1e37433 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.decorators/class-modules/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.decorators/class-modules/expected.js @@ -1,5 +1,3 @@ -"use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/packages/babel-core/test/fixtures/transformation/es7.decorators/class-no-init-instance-props/expected.js b/packages/babel-core/test/fixtures/transformation/es7.decorators/class-no-init-instance-props/expected.js index 1a02daa7e6..939e4d245d 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.decorators/class-no-init-instance-props/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.decorators/class-no-init-instance-props/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var Foo = (function () { var _instanceInitializers = {}; diff --git a/packages/babel-core/test/fixtures/transformation/es7.decorators/class-no-init-static-props/expected.js b/packages/babel-core/test/fixtures/transformation/es7.decorators/class-no-init-static-props/expected.js index 50e829f93d..641c2a3e49 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.decorators/class-no-init-static-props/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.decorators/class-no-init-static-props/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var Foo = (function () { var _staticInitializers = {}; diff --git a/packages/babel-core/test/fixtures/transformation/es7.decorators/class-setter/expected.js b/packages/babel-core/test/fixtures/transformation/es7.decorators/class-setter/expected.js index 1b50456308..a7ddb37b63 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.decorators/class-setter/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.decorators/class-setter/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var Foo = (function () { function Foo() { babelHelpers.classCallCheck(this, Foo); @@ -11,4 +9,4 @@ var Foo = (function () { set: function set(arg) {} }]); return Foo; -})(); \ No newline at end of file +})(); diff --git a/packages/babel-core/test/fixtures/transformation/es7.decorators/class-super/expected.js b/packages/babel-core/test/fixtures/transformation/es7.decorators/class-super/expected.js index 00c54848e8..0a55813a3f 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.decorators/class-super/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.decorators/class-super/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var Foo = (function (_Bar) { babelHelpers.inherits(Foo, _Bar); diff --git a/packages/babel-core/test/fixtures/transformation/es7.decorators/class/expected.js b/packages/babel-core/test/fixtures/transformation/es7.decorators/class/expected.js index 96ff2b4054..ced98e9835 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.decorators/class/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.decorators/class/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var Foo = (function () { function Foo() { babelHelpers.classCallCheck(this, _Foo); diff --git a/packages/babel-core/test/fixtures/transformation/es7.decorators/object-getter-and-setter/expected.js b/packages/babel-core/test/fixtures/transformation/es7.decorators/object-getter-and-setter/expected.js index 79182f88a2..8f48c08081 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.decorators/object-getter-and-setter/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.decorators/object-getter-and-setter/expected.js @@ -1,8 +1,6 @@ -"use strict"; - var obj = babelHelpers.createDecoratedObject([{ key: "foo", decorators: [foo, foo], get: function get() {}, set: function set(bar) {} -}]); \ No newline at end of file +}]); diff --git a/packages/babel-core/test/fixtures/transformation/es7.decorators/object-getter/expected.js b/packages/babel-core/test/fixtures/transformation/es7.decorators/object-getter/expected.js index 4a49654744..f75059b079 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.decorators/object-getter/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.decorators/object-getter/expected.js @@ -1,7 +1,5 @@ -"use strict"; - var obj = babelHelpers.createDecoratedObject([{ key: "foo", decorators: [foo], get: function get() {} -}]); \ No newline at end of file +}]); diff --git a/packages/babel-core/test/fixtures/transformation/es7.decorators/object-setter/expected.js b/packages/babel-core/test/fixtures/transformation/es7.decorators/object-setter/expected.js index e1d9cd2fa3..4ad8956247 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.decorators/object-setter/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.decorators/object-setter/expected.js @@ -1,7 +1,5 @@ -"use strict"; - var obj = babelHelpers.createDecoratedObject([{ key: "foo", decorators: [foo], set: function set(bar) {} -}]); \ No newline at end of file +}]); diff --git a/packages/babel-core/test/fixtures/transformation/es7.decorators/object/expected.js b/packages/babel-core/test/fixtures/transformation/es7.decorators/object/expected.js index 448ac93fc9..0f5ebb8d1f 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.decorators/object/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.decorators/object/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var obj = babelHelpers.createDecoratedObject([{ key: "bar", decorators: [foo], diff --git a/packages/babel-core/test/fixtures/transformation/es7.decorators/options.json b/packages/babel-core/test/fixtures/transformation/es7.decorators/options.json index 0806d65527..d241add8f9 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.decorators/options.json +++ b/packages/babel-core/test/fixtures/transformation/es7.decorators/options.json @@ -1,4 +1,3 @@ { - "externalHelpers": true, - "optional": ["es7.decorators", "es7.classProperties"] + "plugins": ["external-helpers", "transform-decorators", "transform-class-properties"] } diff --git a/packages/babel-core/test/fixtures/transformation/es7.do-expressions/options.json b/packages/babel-core/test/fixtures/transformation/es7.do-expressions/options.json index 560a4cc08d..72f5e34bb4 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.do-expressions/options.json +++ b/packages/babel-core/test/fixtures/transformation/es7.do-expressions/options.json @@ -1,3 +1,3 @@ { - "optional": ["es7.doExpressions"] + "plugins": ["transform-do-expressions"] } diff --git a/packages/babel-core/test/fixtures/transformation/es7.exponentian-operator/assignment/expected.js b/packages/babel-core/test/fixtures/transformation/es7.exponentian-operator/assignment/expected.js index 3cc44c2190..f18ea2dc12 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.exponentian-operator/assignment/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.exponentian-operator/assignment/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var num = 1; num = Math.pow(num, 2); diff --git a/packages/babel-core/test/fixtures/transformation/es7.exponentian-operator/binary/expected.js b/packages/babel-core/test/fixtures/transformation/es7.exponentian-operator/binary/expected.js index ea7fbea158..00a73cfe37 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.exponentian-operator/binary/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.exponentian-operator/binary/expected.js @@ -1,3 +1 @@ -"use strict"; - Math.pow(2, 2); diff --git a/packages/babel-core/test/fixtures/transformation/es7.export-extensions/default-commonjs/expected.js b/packages/babel-core/test/fixtures/transformation/es7.export-extensions/default-commonjs/expected.js index 071100b51e..c704c59cb1 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.export-extensions/default-commonjs/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.export-extensions/default-commonjs/expected.js @@ -1,5 +1,3 @@ -"use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -8,4 +6,4 @@ var _bar = require("bar"); var _bar2 = babelHelpers.interopRequireDefault(_bar); -exports.foo = _bar2["default"]; \ No newline at end of file +exports.foo = _bar2["default"]; diff --git a/packages/babel-core/test/fixtures/transformation/es7.export-extensions/default-compound-es6/expected.js b/packages/babel-core/test/fixtures/transformation/es7.export-extensions/default-compound-es6/expected.js index dcbc7758a2..45bc5549fd 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.export-extensions/default-compound-es6/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.export-extensions/default-compound-es6/expected.js @@ -1,5 +1,3 @@ -"use strict"; - import _v from "mod"; export { _v as v }; export { x, y as w } from "mod"; diff --git a/packages/babel-core/test/fixtures/transformation/es7.export-extensions/default-compound-es6/options.json b/packages/babel-core/test/fixtures/transformation/es7.export-extensions/default-compound-es6/options.json deleted file mode 100644 index 896d86d463..0000000000 --- a/packages/babel-core/test/fixtures/transformation/es7.export-extensions/default-compound-es6/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "blacklist": ["es6.modules"] -} diff --git a/packages/babel-core/test/fixtures/transformation/es7.export-extensions/default-es6/expected.js b/packages/babel-core/test/fixtures/transformation/es7.export-extensions/default-es6/expected.js index cc76180081..076607d0d7 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.export-extensions/default-es6/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.export-extensions/default-es6/expected.js @@ -1,4 +1,2 @@ -"use strict"; - import _foo from "bar"; export { _foo as foo }; diff --git a/packages/babel-core/test/fixtures/transformation/es7.export-extensions/default-es6/options.json b/packages/babel-core/test/fixtures/transformation/es7.export-extensions/default-es6/options.json deleted file mode 100644 index 896d86d463..0000000000 --- a/packages/babel-core/test/fixtures/transformation/es7.export-extensions/default-es6/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "blacklist": ["es6.modules"] -} diff --git a/packages/babel-core/test/fixtures/transformation/es7.export-extensions/namespace-commonjs/expected.js b/packages/babel-core/test/fixtures/transformation/es7.export-extensions/namespace-commonjs/expected.js index f1418a9c88..00001a04dc 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.export-extensions/namespace-commonjs/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.export-extensions/namespace-commonjs/expected.js @@ -1,5 +1,3 @@ -"use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -8,4 +6,4 @@ var _bar = require("bar"); var _foo = babelHelpers.interopRequireWildcard(_bar); -exports.foo = _foo; \ No newline at end of file +exports.foo = _foo; diff --git a/packages/babel-core/test/fixtures/transformation/es7.export-extensions/namespace-compound-es6/expected.js b/packages/babel-core/test/fixtures/transformation/es7.export-extensions/namespace-compound-es6/expected.js index 2b2067baab..4db1e64aa3 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.export-extensions/namespace-compound-es6/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.export-extensions/namespace-compound-es6/expected.js @@ -1,5 +1,3 @@ -"use strict"; - import _v from "mod"; export { _v as v }; import * as _ns from "mod"; diff --git a/packages/babel-core/test/fixtures/transformation/es7.export-extensions/namespace-compound-es6/options.json b/packages/babel-core/test/fixtures/transformation/es7.export-extensions/namespace-compound-es6/options.json deleted file mode 100644 index 896d86d463..0000000000 --- a/packages/babel-core/test/fixtures/transformation/es7.export-extensions/namespace-compound-es6/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "blacklist": ["es6.modules"] -} diff --git a/packages/babel-core/test/fixtures/transformation/es7.export-extensions/namespace-es6/expected.js b/packages/babel-core/test/fixtures/transformation/es7.export-extensions/namespace-es6/expected.js index 58aec8dcdf..2f4c84d761 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.export-extensions/namespace-es6/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.export-extensions/namespace-es6/expected.js @@ -1,4 +1,2 @@ -"use strict"; - import * as _foo from "bar"; export { _foo as foo }; diff --git a/packages/babel-core/test/fixtures/transformation/es7.export-extensions/namespace-es6/options.json b/packages/babel-core/test/fixtures/transformation/es7.export-extensions/namespace-es6/options.json deleted file mode 100644 index 896d86d463..0000000000 --- a/packages/babel-core/test/fixtures/transformation/es7.export-extensions/namespace-es6/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "blacklist": ["es6.modules"] -} diff --git a/packages/babel-core/test/fixtures/transformation/es7.export-extensions/options.json b/packages/babel-core/test/fixtures/transformation/es7.export-extensions/options.json index 1a6e61aa55..1ecf20e277 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.export-extensions/options.json +++ b/packages/babel-core/test/fixtures/transformation/es7.export-extensions/options.json @@ -1,4 +1,3 @@ { - "externalHelpers": true, - "optional": "es7.exportExtensions" + "plugins": ["external-helpers", "export-extensions"] } diff --git a/packages/babel-core/test/fixtures/transformation/es7.function-bind/bind/expected.js b/packages/babel-core/test/fixtures/transformation/es7.function-bind/bind/expected.js index 22ae9099a5..a47fb151f3 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.function-bind/bind/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.function-bind/bind/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _context; var f = (_context = ctx, ns.obj.func).bind(_context); diff --git a/packages/babel-core/test/fixtures/transformation/es7.function-bind/call/expected.js b/packages/babel-core/test/fixtures/transformation/es7.function-bind/call/expected.js index b48a0bdb3e..ccc091a886 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.function-bind/call/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.function-bind/call/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _context; (_context = ctx, ns.obj.func).call(_context); diff --git a/packages/babel-core/test/fixtures/transformation/es7.function-bind/complex-call/expected.js b/packages/babel-core/test/fixtures/transformation/es7.function-bind/complex-call/expected.js index b15ae7d381..f0178f069e 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.function-bind/complex-call/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.function-bind/complex-call/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _context; var _iterlib = require("iterlib"); diff --git a/packages/babel-core/test/fixtures/transformation/es7.function-bind/options.json b/packages/babel-core/test/fixtures/transformation/es7.function-bind/options.json index bdc665fe51..6661827d54 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.function-bind/options.json +++ b/packages/babel-core/test/fixtures/transformation/es7.function-bind/options.json @@ -1,3 +1,3 @@ { - "optional": "es7.functionBind" + "plugins": ["transform-function-bind"] } diff --git a/packages/babel-core/test/fixtures/transformation/es7.function-bind/static-contexts/expected.js b/packages/babel-core/test/fixtures/transformation/es7.function-bind/static-contexts/expected.js index 4f95b6ffa9..0a23379d35 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.function-bind/static-contexts/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.function-bind/static-contexts/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var bar = function bar() {}; bar.bind(foo); diff --git a/packages/babel-core/test/fixtures/transformation/es7.object-spread/assignment/expected.js b/packages/babel-core/test/fixtures/transformation/es7.object-spread/assignment/expected.js index 55e8e562b3..8d12badcab 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.object-spread/assignment/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.object-spread/assignment/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; z = _extends({ x: x }, y); diff --git a/packages/babel-core/test/fixtures/transformation/es7.object-spread/expression/expected.js b/packages/babel-core/test/fixtures/transformation/es7.object-spread/expression/expected.js index 6473abeefa..4851fe7dfc 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.object-spread/expression/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.object-spread/expression/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; _extends({ x: x }, y, { a: a }, b, { c: c }); diff --git a/packages/babel-core/test/fixtures/transformation/es7.object-spread/options.json b/packages/babel-core/test/fixtures/transformation/es7.object-spread/options.json deleted file mode 100644 index b0b9a96ef0..0000000000 --- a/packages/babel-core/test/fixtures/transformation/es7.object-spread/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "stage": 0 -} diff --git a/packages/babel-core/test/fixtures/transformation/es7.object-spread/variable-declaration/expected.js b/packages/babel-core/test/fixtures/transformation/es7.object-spread/variable-declaration/expected.js index 4180a0fdb0..da081be7b7 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.object-spread/variable-declaration/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.object-spread/variable-declaration/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var z = _extends({}, x); diff --git a/packages/babel-core/test/fixtures/transformation/es7.trailing-function-commas/arrow-function/expected.js b/packages/babel-core/test/fixtures/transformation/es7.trailing-function-commas/arrow-function/expected.js index e3c54f65fb..cf585a0a16 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.trailing-function-commas/arrow-function/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.trailing-function-commas/arrow-function/expected.js @@ -1,3 +1 @@ -"use strict"; - (function (x, y) {}); diff --git a/packages/babel-core/test/fixtures/transformation/es7.trailing-function-commas/call/expected.js b/packages/babel-core/test/fixtures/transformation/es7.trailing-function-commas/call/expected.js index 2dd6272d57..f7830fd7a7 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.trailing-function-commas/call/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.trailing-function-commas/call/expected.js @@ -1,3 +1 @@ -"use strict"; - Math.max(1, 2, 3); diff --git a/packages/babel-core/test/fixtures/transformation/es7.trailing-function-commas/declaration/expected.js b/packages/babel-core/test/fixtures/transformation/es7.trailing-function-commas/declaration/expected.js index 08d7e90a5c..f52619513c 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.trailing-function-commas/declaration/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.trailing-function-commas/declaration/expected.js @@ -1,5 +1,3 @@ -"use strict"; - function thisIsAFunctionWithAVeryLongNameAndWayTooManyParameters(thisIsTheFirstParameter, andThisOneIsRelatedToIt, butNotThisOne, andNeitherThis, inFactThereArentThatManyParameters) { throw null; } diff --git a/packages/babel-core/test/fixtures/transformation/es7.trailing-function-commas/new-expression/expected.js b/packages/babel-core/test/fixtures/transformation/es7.trailing-function-commas/new-expression/expected.js index 70e032ca1c..dbfd4d3267 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.trailing-function-commas/new-expression/expected.js +++ b/packages/babel-core/test/fixtures/transformation/es7.trailing-function-commas/new-expression/expected.js @@ -1,3 +1 @@ -"use strict"; - new Foo(a, b); diff --git a/packages/babel-core/test/fixtures/transformation/es7.trailing-function-commas/options.json b/packages/babel-core/test/fixtures/transformation/es7.trailing-function-commas/options.json index 08f3cc3d41..43dbbaddde 100644 --- a/packages/babel-core/test/fixtures/transformation/es7.trailing-function-commas/options.json +++ b/packages/babel-core/test/fixtures/transformation/es7.trailing-function-commas/options.json @@ -1,3 +1,3 @@ { - "optional": ["es7.trailingFunctionCommas"] + "plugins": ["transform-trailing-function-commas"] } diff --git a/packages/babel-core/test/fixtures/transformation/flow/options.json b/packages/babel-core/test/fixtures/transformation/flow/options.json deleted file mode 100644 index 1ed4f62ce4..0000000000 --- a/packages/babel-core/test/fixtures/transformation/flow/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "whitelist": ["flow", "es7.asyncFunctions", "es7.classProperties"] -} diff --git a/packages/babel-core/test/fixtures/transformation/jscript/options.json b/packages/babel-core/test/fixtures/transformation/jscript/options.json index 7cd5899040..0c7fdca5db 100644 --- a/packages/babel-core/test/fixtures/transformation/jscript/options.json +++ b/packages/babel-core/test/fixtures/transformation/jscript/options.json @@ -1,3 +1,3 @@ { - "optional": ["jscript"] + "plugins": ["transform-jscript"] } diff --git a/packages/babel-core/test/fixtures/transformation/jscript/simple-class/expected.js b/packages/babel-core/test/fixtures/transformation/jscript/simple-class/expected.js index 7d044480a4..9a9dc38685 100644 --- a/packages/babel-core/test/fixtures/transformation/jscript/simple-class/expected.js +++ b/packages/babel-core/test/fixtures/transformation/jscript/simple-class/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var Test = (function () { function Test() { babelHelpers.classCallCheck(this, Test); diff --git a/packages/babel-core/test/fixtures/transformation/jscript/simple-class/options.json b/packages/babel-core/test/fixtures/transformation/jscript/simple-class/options.json index 7d6e6cda1c..019532b4f9 100644 --- a/packages/babel-core/test/fixtures/transformation/jscript/simple-class/options.json +++ b/packages/babel-core/test/fixtures/transformation/jscript/simple-class/options.json @@ -1,3 +1,3 @@ { - "externalHelpers": true + "plugins": ["external-helpers"] } diff --git a/packages/babel-core/test/fixtures/transformation/jscript/var-named-function-expression/expected.js b/packages/babel-core/test/fixtures/transformation/jscript/var-named-function-expression/expected.js index a47668aa6f..cc2a8c592d 100644 --- a/packages/babel-core/test/fixtures/transformation/jscript/var-named-function-expression/expected.js +++ b/packages/babel-core/test/fixtures/transformation/jscript/var-named-function-expression/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var IdenticalName = (function () { function IdenticalName(x) { return x; diff --git a/packages/babel-core/test/fixtures/transformation/minification.dead-code-elimination/completion-statements/expected.js b/packages/babel-core/test/fixtures/transformation/minification.dead-code-elimination/completion-statements/expected.js index d1728e6ead..2e07e00fe7 100644 --- a/packages/babel-core/test/fixtures/transformation/minification.dead-code-elimination/completion-statements/expected.js +++ b/packages/babel-core/test/fixtures/transformation/minification.dead-code-elimination/completion-statements/expected.js @@ -1,5 +1,3 @@ -"use strict"; - for (var key in foo) { break; } diff --git a/packages/babel-core/test/fixtures/transformation/minification.dead-code-elimination/issue-1408/expected.js b/packages/babel-core/test/fixtures/transformation/minification.dead-code-elimination/issue-1408/expected.js index e40ad2c45a..b98c313051 100644 --- a/packages/babel-core/test/fixtures/transformation/minification.dead-code-elimination/issue-1408/expected.js +++ b/packages/babel-core/test/fixtures/transformation/minification.dead-code-elimination/issue-1408/expected.js @@ -1,5 +1,3 @@ -"use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/packages/babel-core/test/fixtures/transformation/minification.dead-code-elimination/issue-1409/expected.js b/packages/babel-core/test/fixtures/transformation/minification.dead-code-elimination/issue-1409/expected.js index 2ac448d116..9c82b8eae8 100644 --- a/packages/babel-core/test/fixtures/transformation/minification.dead-code-elimination/issue-1409/expected.js +++ b/packages/babel-core/test/fixtures/transformation/minification.dead-code-elimination/issue-1409/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var a = new ((function () { function A() { babelHelpers.classCallCheck(this, A); diff --git a/packages/babel-core/test/fixtures/transformation/minification.dead-code-elimination/issue-1523/expected.js b/packages/babel-core/test/fixtures/transformation/minification.dead-code-elimination/issue-1523/expected.js index 80eccc460c..0f1e0eca71 100644 --- a/packages/babel-core/test/fixtures/transformation/minification.dead-code-elimination/issue-1523/expected.js +++ b/packages/babel-core/test/fixtures/transformation/minification.dead-code-elimination/issue-1523/expected.js @@ -1,5 +1,3 @@ -"use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/packages/babel-core/test/fixtures/transformation/minification.dead-code-elimination/issue-1524/expected.js b/packages/babel-core/test/fixtures/transformation/minification.dead-code-elimination/issue-1524/expected.js index a656c4c4af..c8f6caca10 100644 --- a/packages/babel-core/test/fixtures/transformation/minification.dead-code-elimination/issue-1524/expected.js +++ b/packages/babel-core/test/fixtures/transformation/minification.dead-code-elimination/issue-1524/expected.js @@ -1,5 +1,3 @@ -"use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/packages/babel-core/test/fixtures/transformation/minification.dead-code-elimination/issue-1546/expected.js b/packages/babel-core/test/fixtures/transformation/minification.dead-code-elimination/issue-1546/expected.js index 64a735f5e9..1c0b12e5f2 100644 --- a/packages/babel-core/test/fixtures/transformation/minification.dead-code-elimination/issue-1546/expected.js +++ b/packages/babel-core/test/fixtures/transformation/minification.dead-code-elimination/issue-1546/expected.js @@ -1,5 +1,3 @@ -"use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/packages/babel-core/test/fixtures/transformation/minification.dead-code-elimination/options.json b/packages/babel-core/test/fixtures/transformation/minification.dead-code-elimination/options.json index d3218f85cd..a6d8f9c810 100644 --- a/packages/babel-core/test/fixtures/transformation/minification.dead-code-elimination/options.json +++ b/packages/babel-core/test/fixtures/transformation/minification.dead-code-elimination/options.json @@ -1,6 +1,3 @@ { - "experimental": true, - "externalHelpers": true, - "blacklist": ["regenerator"], - "optional": ["minification.deadCodeElimination"] + "plugins": ["external-helpers", "transform-dead-code-elimination"] } diff --git a/packages/babel-core/test/fixtures/transformation/minification.member-expression-literals/invalid-identifiers/expected.js b/packages/babel-core/test/fixtures/transformation/minification.member-expression-literals/invalid-identifiers/expected.js index 6e04d07d27..235484a7f1 100644 --- a/packages/babel-core/test/fixtures/transformation/minification.member-expression-literals/invalid-identifiers/expected.js +++ b/packages/babel-core/test/fixtures/transformation/minification.member-expression-literals/invalid-identifiers/expected.js @@ -1,4 +1,2 @@ -"use strict"; - foo["default"]; foo["import"]; diff --git a/packages/babel-core/test/fixtures/transformation/minification.member-expression-literals/options.json b/packages/babel-core/test/fixtures/transformation/minification.member-expression-literals/options.json index 2396412196..3abfb3103d 100644 --- a/packages/babel-core/test/fixtures/transformation/minification.member-expression-literals/options.json +++ b/packages/babel-core/test/fixtures/transformation/minification.member-expression-literals/options.json @@ -1,3 +1,3 @@ { - "optional": ["minification.memberExpressionLiterals"] + "plugins": ["transform-member-expression-literals"] } diff --git a/packages/babel-core/test/fixtures/transformation/minification.member-expression-literals/valid-identifiers/expected.js b/packages/babel-core/test/fixtures/transformation/minification.member-expression-literals/valid-identifiers/expected.js index baf1f2a692..8bf601550c 100644 --- a/packages/babel-core/test/fixtures/transformation/minification.member-expression-literals/valid-identifiers/expected.js +++ b/packages/babel-core/test/fixtures/transformation/minification.member-expression-literals/valid-identifiers/expected.js @@ -1,5 +1,3 @@ -"use strict"; - foo.bar; foo.foo; foo.bar; diff --git a/packages/babel-core/test/fixtures/transformation/minification.property-literals/invalid-identifiers/expected.js b/packages/babel-core/test/fixtures/transformation/minification.property-literals/invalid-identifiers/expected.js index aef44ca1d0..4ba2280c31 100644 --- a/packages/babel-core/test/fixtures/transformation/minification.property-literals/invalid-identifiers/expected.js +++ b/packages/babel-core/test/fixtures/transformation/minification.property-literals/invalid-identifiers/expected.js @@ -1,5 +1,3 @@ -"use strict"; - ({ "default": null, "import": null diff --git a/packages/babel-core/test/fixtures/transformation/minification.property-literals/options.json b/packages/babel-core/test/fixtures/transformation/minification.property-literals/options.json index 4522dd06b8..8d7765616d 100644 --- a/packages/babel-core/test/fixtures/transformation/minification.property-literals/options.json +++ b/packages/babel-core/test/fixtures/transformation/minification.property-literals/options.json @@ -1,3 +1,3 @@ { - "optional": ["minification.propertyLiterals"] + "plugins": ["transform-property-literals"] } diff --git a/packages/babel-core/test/fixtures/transformation/minification.property-literals/valid-identifiers/expected.js b/packages/babel-core/test/fixtures/transformation/minification.property-literals/valid-identifiers/expected.js index 6cdd9c3a41..4b9c5e9c49 100644 --- a/packages/babel-core/test/fixtures/transformation/minification.property-literals/valid-identifiers/expected.js +++ b/packages/babel-core/test/fixtures/transformation/minification.property-literals/valid-identifiers/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var obj = { foo: "foo", bar: "bar" diff --git a/packages/babel-core/test/fixtures/transformation/minification.remove-console/expression-nested/expected.js b/packages/babel-core/test/fixtures/transformation/minification.remove-console/expression-nested/expected.js index 065b51acf3..236d6f7326 100644 --- a/packages/babel-core/test/fixtures/transformation/minification.remove-console/expression-nested/expected.js +++ b/packages/babel-core/test/fixtures/transformation/minification.remove-console/expression-nested/expected.js @@ -1,5 +1,3 @@ -"use strict"; - function foo() { true; blah(); diff --git a/packages/babel-core/test/fixtures/transformation/minification.remove-console/expression-top-level/expected.js b/packages/babel-core/test/fixtures/transformation/minification.remove-console/expression-top-level/expected.js index b99fc7305a..7c38c1eed4 100644 --- a/packages/babel-core/test/fixtures/transformation/minification.remove-console/expression-top-level/expected.js +++ b/packages/babel-core/test/fixtures/transformation/minification.remove-console/expression-top-level/expected.js @@ -1,4 +1,2 @@ -"use strict"; - true; blah(); diff --git a/packages/babel-core/test/fixtures/transformation/minification.remove-console/options.json b/packages/babel-core/test/fixtures/transformation/minification.remove-console/options.json index d9c69c92a8..95459c1ad8 100644 --- a/packages/babel-core/test/fixtures/transformation/minification.remove-console/options.json +++ b/packages/babel-core/test/fixtures/transformation/minification.remove-console/options.json @@ -1,3 +1,3 @@ { - "optional": ["minification.removeConsole"] + "plugins": ["transform-remove-console"] } diff --git a/packages/babel-core/test/fixtures/transformation/minification.remove-console/statement-nested/expected.js b/packages/babel-core/test/fixtures/transformation/minification.remove-console/statement-nested/expected.js index e66ad6ee56..3b71ef2bfa 100644 --- a/packages/babel-core/test/fixtures/transformation/minification.remove-console/statement-nested/expected.js +++ b/packages/babel-core/test/fixtures/transformation/minification.remove-console/statement-nested/expected.js @@ -1,5 +1,3 @@ -"use strict"; - function foo() { blah(); } diff --git a/packages/babel-core/test/fixtures/transformation/minification.remove-console/statement-top-level/expected.js b/packages/babel-core/test/fixtures/transformation/minification.remove-console/statement-top-level/expected.js index 4794b9bb06..2eec0afbb9 100644 --- a/packages/babel-core/test/fixtures/transformation/minification.remove-console/statement-top-level/expected.js +++ b/packages/babel-core/test/fixtures/transformation/minification.remove-console/statement-top-level/expected.js @@ -1,3 +1 @@ -"use strict"; - blah(); diff --git a/packages/babel-core/test/fixtures/transformation/misc/enforce-newline-modules-blacklist/expected.js b/packages/babel-core/test/fixtures/transformation/misc/enforce-newline-modules-blacklist/expected.js index ec5eff1b43..8be9950ce5 100644 --- a/packages/babel-core/test/fixtures/transformation/misc/enforce-newline-modules-blacklist/expected.js +++ b/packages/babel-core/test/fixtures/transformation/misc/enforce-newline-modules-blacklist/expected.js @@ -1,5 +1,3 @@ -"use strict"; - export { foo }; export { bar }; diff --git a/packages/babel-core/test/fixtures/transformation/misc/enforce-newline-modules-blacklist/options.json b/packages/babel-core/test/fixtures/transformation/misc/enforce-newline-modules-blacklist/options.json deleted file mode 100644 index 896d86d463..0000000000 --- a/packages/babel-core/test/fixtures/transformation/misc/enforce-newline-modules-blacklist/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "blacklist": ["es6.modules"] -} diff --git a/packages/babel-core/test/fixtures/transformation/misc/options.json b/packages/babel-core/test/fixtures/transformation/misc/options.json index 7d6e6cda1c..019532b4f9 100644 --- a/packages/babel-core/test/fixtures/transformation/misc/options.json +++ b/packages/babel-core/test/fixtures/transformation/misc/options.json @@ -1,3 +1,3 @@ { - "externalHelpers": true + "plugins": ["external-helpers"] } diff --git a/packages/babel-core/test/fixtures/transformation/misc/regression-1130/expected.js b/packages/babel-core/test/fixtures/transformation/misc/regression-1130/expected.js index a94c4a5de4..165d31d24a 100644 --- a/packages/babel-core/test/fixtures/transformation/misc/regression-1130/expected.js +++ b/packages/babel-core/test/fixtures/transformation/misc/regression-1130/expected.js @@ -1,5 +1,3 @@ -"use strict"; - function A() { var a = undefined; } diff --git a/packages/babel-core/test/fixtures/transformation/misc/regression-1149/expected.js b/packages/babel-core/test/fixtures/transformation/misc/regression-1149/expected.js index e5a4077240..a2fe1a1436 100644 --- a/packages/babel-core/test/fixtures/transformation/misc/regression-1149/expected.js +++ b/packages/babel-core/test/fixtures/transformation/misc/regression-1149/expected.js @@ -1,5 +1,3 @@ -"use strict"; - function foo(bar) { var bar = bar[0]; } diff --git a/packages/babel-core/test/fixtures/transformation/misc/regression-1155/expected.js b/packages/babel-core/test/fixtures/transformation/misc/regression-1155/expected.js index 6559a17448..5d5654c193 100644 --- a/packages/babel-core/test/fixtures/transformation/misc/regression-1155/expected.js +++ b/packages/babel-core/test/fixtures/transformation/misc/regression-1155/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var Foo = (function (_Bar) { babelHelpers.inherits(Foo, _Bar); diff --git a/packages/babel-core/test/fixtures/transformation/misc/regression-1168/expected.js b/packages/babel-core/test/fixtures/transformation/misc/regression-1168/expected.js index fdb6f25f31..b16d3772ed 100644 --- a/packages/babel-core/test/fixtures/transformation/misc/regression-1168/expected.js +++ b/packages/babel-core/test/fixtures/transformation/misc/regression-1168/expected.js @@ -1,7 +1,5 @@ -"use strict"; - function test() { var x = arguments.length <= 0 || arguments[0] === undefined ? "hi" : arguments[0]; return x; -} \ No newline at end of file +} diff --git a/packages/babel-core/test/fixtures/transformation/misc/regression-1199/expected.js b/packages/babel-core/test/fixtures/transformation/misc/regression-1199/expected.js index 0e40ff7d1d..095bcf9a2c 100644 --- a/packages/babel-core/test/fixtures/transformation/misc/regression-1199/expected.js +++ b/packages/babel-core/test/fixtures/transformation/misc/regression-1199/expected.js @@ -1,5 +1,3 @@ -"use strict"; - var bug = 1; function foo() {} diff --git a/packages/babel-core/test/fixtures/transformation/misc/regression-1489/expected.js b/packages/babel-core/test/fixtures/transformation/misc/regression-1489/expected.js index c9b9b0a5b0..695d6fd8bb 100644 --- a/packages/babel-core/test/fixtures/transformation/misc/regression-1489/expected.js +++ b/packages/babel-core/test/fixtures/transformation/misc/regression-1489/expected.js @@ -1,7 +1,5 @@ System.register(["foo"], function (_export) { - "use strict"; - - var toString; + var toString; return { setters: [function (_foo) { toString = _foo["default"]; diff --git a/packages/babel-core/test/fixtures/transformation/misc/regression-lodash-tostring-import/expected.js b/packages/babel-core/test/fixtures/transformation/misc/regression-lodash-tostring-import/expected.js index aaa4600679..2c83e5660f 100644 --- a/packages/babel-core/test/fixtures/transformation/misc/regression-lodash-tostring-import/expected.js +++ b/packages/babel-core/test/fixtures/transformation/misc/regression-lodash-tostring-import/expected.js @@ -1,7 +1,5 @@ -"use strict"; - var _foo = require("foo"); var _foo2 = babelHelpers.interopRequireDefault(_foo); -_foo2["default"]; \ No newline at end of file +_foo2["default"]; diff --git a/packages/babel-core/test/fixtures/transformation/misc/shebang/expected.js b/packages/babel-core/test/fixtures/transformation/misc/shebang/expected.js index 4036130376..ef3bea62ac 100644 --- a/packages/babel-core/test/fixtures/transformation/misc/shebang/expected.js +++ b/packages/babel-core/test/fixtures/transformation/misc/shebang/expected.js @@ -1,4 +1,2 @@ #!/usr/bin/env node -"use strict"; - foobar(); diff --git a/packages/babel-core/test/fixtures/transformation/optimisation.modules.system/setters/expected.js b/packages/babel-core/test/fixtures/transformation/optimisation.modules.system/setters/expected.js index 5e7e71e623..925b06f414 100644 --- a/packages/babel-core/test/fixtures/transformation/optimisation.modules.system/setters/expected.js +++ b/packages/babel-core/test/fixtures/transformation/optimisation.modules.system/setters/expected.js @@ -1,7 +1,5 @@ System.register(["foo", "bar"], function (_export) { - "use strict"; - - var foo, bar; + var foo, bar; return { setters: [function (_foo) { var _exportObj = {}; diff --git a/packages/babel-core/test/fixtures/transformation/optimisation.react.constant-elements/children/expected.js b/packages/babel-core/test/fixtures/transformation/optimisation.react.constant-elements/children/expected.js index 6f8b7eb554..9f725b28e8 100644 --- a/packages/babel-core/test/fixtures/transformation/optimisation.react.constant-elements/children/expected.js +++ b/packages/babel-core/test/fixtures/transformation/optimisation.react.constant-elements/children/expected.js @@ -1,9 +1,7 @@ -"use strict"; - var _ref = ; var Foo = React.createClass({ - render: function render() { + render: function () { return