Changelog: swc v1.2.9
#
Bugfixes#892)#
hygiene of class properties (Previously, swc miscompiled
as
This issue happened because class_properties pass did not check if an identifier used in a class constructor is reference. The bug is fixed by changing identifier only if it's used as a binding identifier.
The name collision check is required because in the code below, bar
should be "bar"
, not "foo".
#862)#
decorators on class and method (swc
now handle decorators on properties properly, even if it does not have default value.
Previously typescript_strip pass removed class properties without value, but I removed such behavior and it works.
#863)#
parameter decorators (While babel does not support this feature, I implemented it because tsc
supports it. Code like below now works well.
#
Performance#893)#
Parser (swc_ecma_parser
becomes faster by reducing the size of error struct and by providing single-threaded error reporting. Also it reduced possibility of stack overflow.
#
Improvements#886)#
works with stable rustc (Previously swc
used nightly rustc, which can have some bugs. After very hard work, I've managed to make swc to use stable rustc.
This would allow more rust users to use swc as a crate for their own projects.