From 9cb500613664b5321d0a3471390e72227b2d2bbd Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Fri, 24 Jul 2015 21:15:27 +0100 Subject: [PATCH] fix broken imports and test newlines --- packages/babel-cli/src/_babel-node.js | 3 ++- packages/babel-cli/src/babel-external-helpers.js | 4 ++-- .../fixtures/transformation/jscript/simple-class/expected.js | 1 + .../jscript/var-named-function-expression/expected.js | 2 ++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/babel-cli/src/_babel-node.js b/packages/babel-cli/src/_babel-node.js index b93e039dca..fe7d7fd76f 100644 --- a/packages/babel-cli/src/_babel-node.js +++ b/packages/babel-cli/src/_babel-node.js @@ -4,7 +4,8 @@ import Module from "module"; import { inspect } from "util"; import path from "path"; import repl from "repl"; -import babel, { util } from "babel-core"; +import { util } from "babel-core"; +import * as babel from "babel-core"; import vm from "vm"; import _ from "lodash"; diff --git a/packages/babel-cli/src/babel-external-helpers.js b/packages/babel-cli/src/babel-external-helpers.js index 51f287565a..76552a3a71 100755 --- a/packages/babel-cli/src/babel-external-helpers.js +++ b/packages/babel-cli/src/babel-external-helpers.js @@ -1,5 +1,5 @@ import commander from "commander"; -import { util, runtime } from "babel-core"; +import { util, buildExternalHelpers } from "babel-core"; commander.option("-l, --whitelist [whitelist]", "Whitelist of helpers to ONLY include", util.list); commander.option("-t, --output-type [type]", "Type of output (global|umd|var)", "global"); @@ -7,4 +7,4 @@ commander.option("-t, --output-type [type]", "Type of output (global|umd|var)", commander.usage("[options]"); commander.parse(process.argv); -console.log(runtime(commander.whitelist, commander.outputType)); +console.log(buildExternalHelpers(commander.whitelist, commander.outputType)); diff --git a/packages/babel/test/fixtures/transformation/jscript/simple-class/expected.js b/packages/babel/test/fixtures/transformation/jscript/simple-class/expected.js index 3ea408251f..7d044480a4 100644 --- a/packages/babel/test/fixtures/transformation/jscript/simple-class/expected.js +++ b/packages/babel/test/fixtures/transformation/jscript/simple-class/expected.js @@ -4,5 +4,6 @@ var Test = (function () { function Test() { babelHelpers.classCallCheck(this, Test); } + return Test; })(); diff --git a/packages/babel/test/fixtures/transformation/jscript/var-named-function-expression/expected.js b/packages/babel/test/fixtures/transformation/jscript/var-named-function-expression/expected.js index 33697f7b25..a47668aa6f 100644 --- a/packages/babel/test/fixtures/transformation/jscript/var-named-function-expression/expected.js +++ b/packages/babel/test/fixtures/transformation/jscript/var-named-function-expression/expected.js @@ -4,10 +4,12 @@ var IdenticalName = (function () { function IdenticalName(x) { return x; } + return IdenticalName; })(); (function () { function foo() {} + return foo; })();