Compare commits

...

4 Commits

Author SHA1 Message Date
Sebastian McKenzie
06a31c419a v5.0.12 2015-04-08 08:55:02 -07:00
Sebastian McKenzie
da566110c0 add 5.0.12 changelog 2015-04-08 08:53:40 -07:00
Sebastian McKenzie
c12c4a5c39 don't touch function name containers when remapping modules - fixes #1160 2015-04-08 08:52:53 -07:00
Sebastian McKenzie
d114349890 5.0.11 2015-04-08 08:15:15 -07:00
13 changed files with 149 additions and 5 deletions

View File

@@ -13,7 +13,12 @@ _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.10
## 5.0.12
* **Bug Fix**
* Fix incorrect remapping of module references inside of a function id redirection container.
## 5.0.11
* **Bug Fix**
* Fix new `for...of` loops not properly inheriting their original loop.

View File

@@ -1,7 +1,7 @@
{
"name": "babel-core",
"description": "Turn ES6 code into readable vanilla ES5 with source maps",
"version": "5.0.11",
"version": "5.0.12",
"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.10",
"version": "5.0.11",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
"repository": "babel/babel",
"preferGlobal": true,
"dependencies": {
"chokidar": "^0.12.6",
"babel-core": "^5.0.10",
"babel-core": "^5.0.11",
"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.10",
"version": "5.0.11",
"repository": "babel/babel",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"dependencies": {

View File

@@ -27,6 +27,7 @@ var wrap = function (state, method, id, scope) {
FUNCTION_ID: id,
FUNCTION_KEY: scope.generateUidIdentifier(id.name)
});
template.callee._skipModulesRemap = true;
// shim in dummy params to retain function arity, if you try to read the
// source then you'll get the original since it's proxied so it's all good

View File

@@ -46,6 +46,10 @@ var remapVisitor = {
}
}
if (node._skipModulesRemap) {
return this.skip();
}
if (t.isAssignmentExpression(node) && !node._ignoreModulesRemap) {
var exported = formatter.getExport(node.left, scope);
if (exported) {

View File

@@ -0,0 +1,8 @@
import last from "lodash/array/last"
export default class Container {
last(key) {
if (!this.has(key)) return
return last(this.tokens.get(key))
}
}

View File

@@ -0,0 +1,37 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _last2 = require("lodash/array/last");
var _last3 = babelHelpers.interopRequireWildcard(_last2);
var Container = (function () {
function Container() {
babelHelpers.classCallCheck(this, Container);
}
babelHelpers.createClass(Container, [{
key: "last",
value: (function (_last) {
function last(_x) {
return _last.apply(this, arguments);
}
last.toString = function () {
return _last.toString();
};
return last;
})(function (key) {
if (!this.has(key)) return;
return _last3["default"](this.tokens.get(key));
})
}]);
return Container;
})();
exports["default"] = Container;
module.exports = exports["default"];

View File

@@ -0,0 +1,7 @@
import {getForm} from "./store"
export default class Login extends React.Component {
getForm() {
return getForm().toJS()
}
}

View File

@@ -0,0 +1,39 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _getForm2 = require("./store");
var Login = (function (_React$Component) {
function Login() {
babelHelpers.classCallCheck(this, Login);
if (_React$Component != null) {
_React$Component.apply(this, arguments);
}
}
babelHelpers.inherits(Login, _React$Component);
babelHelpers.createClass(Login, [{
key: "getForm",
value: (function (_getForm) {
function getForm() {
return _getForm.apply(this, arguments);
}
getForm.toString = function () {
return _getForm.toString();
};
return getForm;
})(function () {
return _getForm2.getForm().toJS();
})
}]);
return Login;
})(React.Component);
exports["default"] = Login;
module.exports = exports["default"];

View File

@@ -0,0 +1,9 @@
import events from "events";
class Template {
events() {
return events;
}
}
console.log(new Template().events());

View File

@@ -0,0 +1,31 @@
"use strict";
var _events2 = require("events");
var _events3 = babelHelpers.interopRequireWildcard(_events2);
var Template = (function () {
function Template() {
babelHelpers.classCallCheck(this, Template);
}
babelHelpers.createClass(Template, [{
key: "events",
value: (function (_events) {
function events() {
return _events.apply(this, arguments);
}
events.toString = function () {
return _events.toString();
};
return events;
})(function () {
return _events3["default"];
})
}]);
return Template;
})();
console.log(new Template().events());

View File

@@ -0,0 +1,3 @@
{
"externalHelpers": true
}