Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4942ba6dd7 | ||
|
|
b63bd8cba0 | ||
|
|
cd1eb11171 | ||
|
|
6e1c12fd78 | ||
|
|
a4ea71b85d | ||
|
|
5c39685650 |
@@ -2,6 +2,11 @@
|
||||
|
||||
Gaps between patch versions are faulty/broken releases.
|
||||
|
||||
## 2.0.2
|
||||
|
||||
* Inherit comments in `for-of` transformer.
|
||||
* Remove `interopRequire` from `system` module formatter.
|
||||
|
||||
## 2.0.1
|
||||
|
||||
* Remap `UpdateExpression` module export binding.
|
||||
|
||||
@@ -83,7 +83,7 @@ AMDFormatter.prototype.importSpecifier = function (specifier, node, nodes) {
|
||||
|
||||
if (t.isImportBatchSpecifier(specifier)) {
|
||||
// import * as bar from "foo";
|
||||
} else if (t.isSpecifierDefault(specifier)) {
|
||||
} else if (t.isSpecifierDefault(specifier) && !this.noInteropRequire) {
|
||||
// import foo from "foo";
|
||||
ref = t.callExpression(this.file.addDeclaration("interop-require"), [ref]);
|
||||
} else {
|
||||
|
||||
@@ -8,6 +8,7 @@ var _ = require("lodash");
|
||||
|
||||
function SystemFormatter(file) {
|
||||
this.exportIdentifier = file.generateUidIdentifier("export");
|
||||
this.noInteropRequire = true;
|
||||
|
||||
AMDFormatter.apply(this, arguments);
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ exports.ForOfStatement = function (node, parent, file, scope) {
|
||||
OBJECT: node.right
|
||||
});
|
||||
|
||||
t.inheritsComments(node2, node);
|
||||
t.ensureBlock(node);
|
||||
|
||||
var block = node2.body;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "6to5",
|
||||
"description": "Turn ES6 code into readable vanilla ES5 with source maps",
|
||||
"version": "2.0.1",
|
||||
"version": "2.0.2",
|
||||
"author": "Sebastian McKenzie <sebmck@gmail.com>",
|
||||
"homepage": "https://github.com/6to5/6to5",
|
||||
"repository": {
|
||||
|
||||
@@ -7,13 +7,8 @@ System.register("es6-modules-system/imports-default/expected", ["foo"], function
|
||||
execute: function () {
|
||||
"use strict";
|
||||
|
||||
var _interopRequire = function (obj) {
|
||||
return obj && (obj["default"] || obj);
|
||||
};
|
||||
|
||||
var foo = _interopRequire(_foo);
|
||||
|
||||
var foo = _interopRequire(_foo);
|
||||
var foo = _foo["default"];
|
||||
var foo = _foo["default"];
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
@@ -7,13 +7,8 @@ System.register("es6-modules-system/imports-mixing/expected", ["foo"], function
|
||||
execute: function () {
|
||||
"use strict";
|
||||
|
||||
var _interopRequire = function (obj) {
|
||||
return obj && (obj["default"] || obj);
|
||||
};
|
||||
|
||||
var foo = _interopRequire(_foo);
|
||||
|
||||
var foo = _foo["default"];
|
||||
var xyz = _foo.baz;
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
@@ -11,12 +11,7 @@ System.register("es6-modules-system/overview/expected", ["foo", "foo-bar", "./di
|
||||
execute: function () {
|
||||
"use strict";
|
||||
|
||||
var _interopRequire = function (obj) {
|
||||
return obj && (obj["default"] || obj);
|
||||
};
|
||||
|
||||
var foo = _interopRequire(_foo);
|
||||
|
||||
var foo = _foo["default"];
|
||||
var foo = _foo;
|
||||
var bar = _foo.bar;
|
||||
var bar = _foo.foo;
|
||||
@@ -27,4 +22,4 @@ System.register("es6-modules-system/overview/expected", ["foo", "foo-bar", "./di
|
||||
_export("default", test);
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user