Compare commits

...

9 Commits

Author SHA1 Message Date
Sebastian McKenzie
f7c7da7526 v5.0.3 2015-04-03 15:24:47 +11:00
Sebastian McKenzie
d7fb9f67df t push
make publish
Merge branch 'master' of github.com:babel/babel
2015-04-03 15:23:03 +11:00
Sebastian McKenzie
eef6002324 add 5.0.3 changelog 2015-04-03 15:22:36 +11:00
Sebastian McKenzie
32bcf4c3a5 Merge pull request #1139 from cesarandreu/patch-3
Add breakConfig to options.json
2015-04-03 15:19:41 +11:00
Sebastian McKenzie
86060cb0ce switch back to global uid registry - fixes #1136 2015-04-03 15:18:04 +11:00
Cesar Andreu
66a836d435 breakConfig should be hiddebn 2015-04-02 21:14:26 -07:00
Cesar Andreu
ecc14c2a31 Add breakConfig to options.json 2015-04-02 21:09:56 -07:00
Sebastian McKenzie
7e9b60fba5 turn into absolute location if not for rc resolution - fixes #1137 2015-04-03 15:03:00 +11:00
Sebastian McKenzie
313f1e755a 5.0.2 2015-04-03 06:55:53 +11:00
19 changed files with 94 additions and 76 deletions

View File

@@ -13,6 +13,14 @@ _Note: Gaps between patch versions are faulty/broken releases._
See [CHANGELOG - 6to5](CHANGELOG-6to5.md) for the pre-4.0.0 version changelog.
## 5.0.3
* **Bug Fix**
* Make relative location absolute before calling `resolveRc`.
* **Internal**
* Switch to global UID registry.
* Add `breakConfig` option to prevent Babel from erroring when hitting that option.
## 5.0.1
* **Bug Fix**

View File

@@ -1,7 +1,7 @@
{
"name": "babel-core",
"description": "Turn ES6 code into readable vanilla ES5 with source maps",
"version": "5.0.2",
"version": "5.0.3",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
"repository": "babel/babel",

View File

@@ -1,14 +1,14 @@
{
"name": "babel",
"description": "Turn ES6 code into readable vanilla ES5 with source maps",
"version": "5.0.1",
"version": "5.0.2",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
"repository": "babel/babel",
"preferGlobal": true,
"dependencies": {
"chokidar": "^0.12.6",
"babel-core": "^5.0.1",
"babel-core": "^5.0.2",
"commander": "^2.6.0",
"fs-readdir-recursive": "^0.1.0",
"output-file-sync": "^1.1.0",

View File

@@ -1,7 +1,7 @@
{
"name": "babel-runtime",
"description": "babel selfContained runtime",
"version": "5.0.1",
"version": "5.0.2",
"repository": "babel/babel",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"dependencies": {

View File

@@ -44,6 +44,7 @@ export default class File {
this.usedHelpers = {};
this.dynamicData = {};
this.data = {};
this.uids = {};
this.lastStatements = [];
this.log = new Logger(this, opts.filename || "unknown");
@@ -89,8 +90,10 @@ export default class File {
normalizeOptions(opts: Object) {
opts = assign({}, opts);
if (opts.filename && isAbsolute(opts.filename)) {
opts = resolveRc(opts.filename, opts);
if (opts.filename) {
var rcFilename = opts.filename;
if (!isAbsolute(rcFilename)) rcFilename = path.join(process.cwd(), rcFilename);
opts = resolveRc(rcFilename, opts);
}
//

View File

@@ -194,5 +194,13 @@
"moduleRoot": {
"type": "string",
"description": "optional prefix for the AMD module formatter that will be prepend to the filename on module definitions"
},
"breakConfig": {
"type": "boolean",
"default": false,
"hidden": true,
"description": "stop trying to load .babelrc files"
}
}

View File

@@ -135,7 +135,7 @@ export default class Scope {
uid = this._generateUid(name, i);
i++;
} while (this.hasBinding(uid) || this.hasGlobal(uid) || this.hasUid(uid));
this.getFunctionParent().uids[uid] = true;
this.file.uids[uid] = true;
return uid;
}
@@ -152,7 +152,7 @@ export default class Scope {
hasUid(name): boolean {
var scope = this;
do {
if (scope.uids[name]) return true;
if (scope.file.uids[name]) return true;
scope = scope.parent;
} while (scope);
return false;
@@ -434,8 +434,7 @@ export default class Scope {
info = this.block._scopeInfo = {
bindings: object(),
globals: object(),
uids: object()
globals: object()
};
extend(this, info);
@@ -658,7 +657,7 @@ export default class Scope {
if (!name) return false;
if (this.hasOwnBinding(name)) return true;
if (this.parentHasBinding(name)) return true;
if (this.uids[name]) return true;
if (this.file.uids[name]) return true;
if (includes(Scope.globals, name)) return true;
if (includes(Scope.contextVariables, name)) return true;
return false;

View File

@@ -11,17 +11,17 @@ function one() {
one(1, 2);
function two() {
var _arguments = arguments;
var _arguments2 = arguments;
var inner = function inner() {
return _arguments;
return _arguments2;
};
var another = function another() {
var _arguments2 = arguments;
var _arguments3 = arguments;
var inner2 = function inner2() {
return _arguments2;
return _arguments3;
};
};
@@ -30,20 +30,20 @@ function two() {
two(1, 2);
function three() {
var _arguments = arguments;
var _arguments4 = arguments;
var fn = function fn() {
return _arguments[0] + "bar";
return _arguments4[0] + "bar";
};
return fn();
}
three("foo");
function four() {
var _arguments = arguments;
var _arguments5 = arguments;
var fn = function fn() {
return _arguments[0].foo + "bar";
return _arguments5[0].foo + "bar";
};
return fn();
}
@@ -66,4 +66,4 @@ function six(obj) {
};
return fn();
}
six();
six();

View File

@@ -16,7 +16,7 @@
}
};
_loop: for (var i in nums) {
_loop2: for (var i in nums) {
var _ret = _loop(i);
switch (_ret) {
@@ -24,7 +24,7 @@
continue;
case "break":
break _loop;
break _loop2;
default:
if (typeof _ret === "object") return _ret.v;

View File

@@ -20,11 +20,11 @@ var Test = (function (_Foo) {
babelHelpers.inherits(Test, _Foo);
Test.prototype.test = function test() {
var _Foo$prototype$test, _Foo$prototype$test2;
var _Foo$prototype$test3, _Foo$prototype$test4;
_Foo.prototype.test.call(this);
(_Foo$prototype$test = _Foo.prototype.test).call.apply(_Foo$prototype$test, [this].concat(babelHelpers.slice.call(arguments)));
(_Foo$prototype$test2 = _Foo.prototype.test).call.apply(_Foo$prototype$test2, [this, "test"].concat(babelHelpers.slice.call(arguments)));
(_Foo$prototype$test3 = _Foo.prototype.test).call.apply(_Foo$prototype$test3, [this].concat(babelHelpers.slice.call(arguments)));
(_Foo$prototype$test4 = _Foo.prototype.test).call.apply(_Foo$prototype$test4, [this, "test"].concat(babelHelpers.slice.call(arguments)));
};
Test.foo = function foo() {

View File

@@ -21,21 +21,21 @@ var Test = (function (_Foo) {
babelHelpers.createClass(Test, [{
key: "test",
value: function test() {
var _babelHelpers$get;
var _babelHelpers$get3;
babelHelpers.get(Object.getPrototypeOf(Test.prototype), "test", this).call(this);
babelHelpers.get(Object.getPrototypeOf(Test.prototype), "test", this).apply(this, arguments);
(_babelHelpers$get = babelHelpers.get(Object.getPrototypeOf(Test.prototype), "test", this)).call.apply(_babelHelpers$get, [this, "test"].concat(babelHelpers.slice.call(arguments)));
(_babelHelpers$get3 = babelHelpers.get(Object.getPrototypeOf(Test.prototype), "test", this)).call.apply(_babelHelpers$get3, [this, "test"].concat(babelHelpers.slice.call(arguments)));
}
}], [{
key: "foo",
value: function foo() {
var _babelHelpers$get;
var _babelHelpers$get4;
babelHelpers.get(Object.getPrototypeOf(Test), "foo", this).call(this);
babelHelpers.get(Object.getPrototypeOf(Test), "foo", this).apply(this, arguments);
(_babelHelpers$get = babelHelpers.get(Object.getPrototypeOf(Test), "foo", this)).call.apply(_babelHelpers$get, [this, "test"].concat(babelHelpers.slice.call(arguments)));
(_babelHelpers$get4 = babelHelpers.get(Object.getPrototypeOf(Test), "foo", this)).call.apply(_babelHelpers$get4, [this, "test"].concat(babelHelpers.slice.call(arguments)));
}
}]);
return Test;
})(Foo);
})(Foo);

View File

@@ -9,29 +9,29 @@ function somethingAdvanced(_ref) {
var y2 = _ref$bottomRight.y;
}
function unpackObject(_ref) {
var title = _ref.title;
var author = _ref.author;
function unpackObject(_ref2) {
var title = _ref2.title;
var author = _ref2.author;
return title + " " + author;
}
console.log(unpackObject({ title: "title", author: "author" }));
var unpackArray = function unpackArray(_ref, _ref3) {
var _ref2 = babelHelpers.slicedToArray(_ref, 3);
var a = _ref2[0];
var b = _ref2[1];
var c = _ref2[2];
var unpackArray = function unpackArray(_ref3, _ref4) {
var _ref32 = babelHelpers.slicedToArray(_ref3, 3);
var x = _ref32[0];
var y = _ref32[1];
var z = _ref32[2];
var a = _ref32[0];
var b = _ref32[1];
var c = _ref32[2];
var _ref42 = babelHelpers.slicedToArray(_ref4, 3);
var x = _ref42[0];
var y = _ref42[1];
var z = _ref42[2];
return a + b + c;
};
console.log(unpackArray(["hello", ", ", "world"], [1, 2, 3]));
console.log(unpackArray(["hello", ", ", "world"], [1, 2, 3]));

View File

@@ -9,8 +9,8 @@ var x = function x(foo) {
};
var y = function y(foo) {
for (var _len = arguments.length, bar = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
bar[_key - 1] = arguments[_key];
for (var _len2 = arguments.length, bar = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
bar[_key2 - 1] = arguments[_key2];
}
var x = function z(bar) {
@@ -19,8 +19,8 @@ var y = function y(foo) {
};
var b = function b(x, y) {
for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
args[_key - 2] = arguments[_key];
for (var _len3 = arguments.length, args = Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {
args[_key3 - 2] = arguments[_key3];
}
console.log(args[0]);
@@ -29,8 +29,8 @@ var b = function b(x, y) {
};
var z = function z(foo) {
for (var _len = arguments.length, bar = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
bar[_key - 1] = arguments[_key];
for (var _len4 = arguments.length, bar = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
bar[_key4 - 1] = arguments[_key4];
}
var x = function x() {
@@ -39,18 +39,18 @@ var z = function z(foo) {
};
var a = function a(foo) {
for (var _len = arguments.length, bar = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
bar[_key - 1] = arguments[_key];
for (var _len5 = arguments.length, bar = Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) {
bar[_key5 - 1] = arguments[_key5];
}
return bar.join(",");
};
var b = function b(foo) {
for (var _len = arguments.length, bar = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
bar[_key - 1] = arguments[_key];
for (var _len6 = arguments.length, bar = Array(_len6 > 1 ? _len6 - 1 : 0), _key6 = 1; _key6 < _len6; _key6++) {
bar[_key6 - 1] = arguments[_key6];
}
var join = "join";
return bar[join];
};
};

View File

@@ -43,21 +43,21 @@
} finally {}
})(1000000) === "foo";
(function f(_x) {
var _again = true;
(function f(_x2) {
var _again2 = true;
_function: while (_again) {
_again = false;
var n = _x;
_function2: while (_again2) {
_again2 = false;
var n = _x2;
if (n <= 0) {
return "foo";
}
try {} finally {
_x = n - 1;
_again = true;
continue _function;
_x2 = n - 1;
_again2 = true;
continue _function2;
}
}
})(1000000) === "foo";

View File

@@ -11,9 +11,9 @@ function render(text) {
var Foo2 = require("Foo");
function createComponent(text) {
var _ref = <Foo2>{text}</Foo2>;
var _ref2 = <Foo2>{text}</Foo2>;
return function render() {
return _ref;
return _ref2;
};
}

View File

@@ -6,8 +6,8 @@ function render() {
return _ref;
}
var _ref = <div className="foo"><input type="checkbox" checked={true} /></div>;
var _ref2 = <div className="foo"><input type="checkbox" checked={true} /></div>;
function render() {
return _ref;
return _ref2;
}

View File

@@ -12,7 +12,7 @@ function render() {
function render() {
var text = getText();
var _ref = {
var _ref2 = {
type: "foo",
ref: null,
props: {
@@ -21,6 +21,6 @@ function render() {
key: null
};
return function () {
return _ref;
return _ref2;
};
}
}

View File

@@ -7,9 +7,9 @@ var foo = function foo() {
};
var bar = function bar() {
var _this = this;
var _this2 = this;
return function () {
return React.createElement(_this.foo, null);
return React.createElement(_this2.foo, null);
};
};
};

View File

@@ -17,9 +17,9 @@ var f = (function (_f) {
})(function (f) {});
var obj = {
f: (function (_f) {
function f(_x) {
return _f.apply(this, arguments);
f: (function (_f2) {
function f(_x2) {
return _f2.apply(this, arguments);
}
f.toString = function () {