Compare commits

...

6 Commits

Author SHA1 Message Date
Sebastian McKenzie
4942ba6dd7 v2.0.2 2014-12-28 01:14:54 +11:00
Sebastian McKenzie
b63bd8cba0 remove interopRequire from system module formatter 2014-12-28 01:14:08 +11:00
Sebastian McKenzie
cd1eb11171 Merge branch 'master' of github.com:6to5/6to5 2014-12-28 01:10:00 +11:00
Sebastian McKenzie
6e1c12fd78 inherit comments in for-of transformer 2014-12-28 01:09:48 +11:00
Sebastian McKenzie
a4ea71b85d Merge pull request #337 from guybedford/master
Correct system format base support tests
2014-12-28 01:03:35 +11:00
guybedford
5c39685650 correct system format base support tests 2014-12-27 15:59:52 +02:00
8 changed files with 16 additions and 24 deletions

View File

@@ -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.

View File

@@ -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 {

View File

@@ -8,6 +8,7 @@ var _ = require("lodash");
function SystemFormatter(file) {
this.exportIdentifier = file.generateUidIdentifier("export");
this.noInteropRequire = true;
AMDFormatter.apply(this, arguments);

View File

@@ -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;

View File

@@ -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": {

View File

@@ -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"];
}
};
});
});

View File

@@ -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;
}
};
});
});

View File

@@ -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);
}
};
});
});