Changelog: swc v1.1.51

Integration tests#

swc now compiles and run the test suite of three.js and redux as a part of ci process. I tried to add more stuffs, but the build system of other projects were too complex to make it use swc.

Bugfixes#

new expression#

As part of integration test, I found that swc miscompiles

new (a ? b : c)();

into

new a() ? b : c();

This is fixed by the pr which introduced integration tests.

Keywords in method name (#801)#

Previously, swc compiles

export class Foo {
delete(object: string, key: string) {
delete object[key];
}
}

as

var Foo = function() {
'use strict';
function Foo() {
_classCallCheck(this, Foo);
}
_createClass(Foo, [
{
key: 'delete',
value: function delete(object, key) {
delete object[key];
}
}
]);
return Foo;
}();
exports.Foo = Foo;

, which is wrong as function name cannot be delete. swc now compiles it as function _delete.