This version includes lots of bugfixes.optional chaining (
Nested property access in optional chaining is now properly compiled.
The affected code looks like below. Notice that there's no computed typescript properties (
This is a regression caused by
v1.2.18. The issue is about computed class properties in typescript.
The code above now works properly.temp var in nullish coalescing (
was miscompiled as
which is wrong because renaming of private class properties (
var _submissionIds; should be declared at tbe top level. This is fixed by visiting children nodes (like block statement) with a new empty variable buffer.
At the time of implementing
resolver, which is the core of the swc, there was no support for private class properties. It resulted in this bug, where
hygiene pass renaming private properties. This is fixed by not visiting private identifiers.
Affected code looks like below.
Two private identifiers with same name declared in different class, but in same file. This bug is found by @kitsonk while integrating bundler: too many exports (
swc_bundler into deno.
which is clearly wrong. This is fixed by collecting exported identifiers carefully.bundler: export * (
was handled inproperly by stack overflow of inliner (
This is fixed by migrating by working with pointers instead of passing structs around.bundler: import.meta support (
deno bundle, which works with
tsc and in a progress of integrating the bundler of swc into it, supports
import.meta, I added support for them.
Currently two meta properties are supported.bundler: namespaced imports (
is now bundled asbundler: namedspaced reexports (
Namespaced export statements like
is now properly handled.bundler: shorthand properties (
Bundler had a bug related to shorthand properties. But it's now fixed, and
is compiled asbundler: top level await (
deno supports top level await, I added support for it to the bundler.