Changelog: swc v1.1.7

Statement Expression type (#512)#

NOTE: Although this is a technically breaking change, I decided not to bump major version as I don't think someone has created a plugin which depends on exact type of an expression statement.

swc now stores expression statements as a new type named ExpressionStatement. This change is made to provide exact span of an expression statement.

Regex type (#511)#

NOTE: Although this is a technically breaking change, I decided not to bump major version as I don't think someone has created a plugin which depends on exact type of a regexp literal.

Type of Regex.expression and Regex.flags is string, not StringLiteral. This matches regexp type from babel and typescript.

Fixed parsing of const enum (#516)#

swc previously parsed const enum correctly on debug mode, but it has a bug in release mode. This is fixed and (currently) a const enum works as a normal enum.

Fixed space bug of the jsx trnasform (#519)#

<div>Hello World</div>

is compiled as

React.createElement("div", null, "Hello World");

instead of

React.createElement("div", null, "Hello World ");