design;type for typescript enums (#1248)#
Decorator metadata can be used to create very convenient tools. swc now supports it more correctly.
For example, the code below works with swcregenerator: ternary with await (
Previously, swc miscompiled the code below because
regenerator had a bug.
&mut, so logic differs even if it's a port.
Anyway, the code above works properly with swcbundler: Circular imports in wrapped module (
Previously the swc-based bundlers (
deno bundle and
spack) had a bug which occurs
path is loaded as a wrapped module.
https://deno.land/[email protected]/path/mod.ts has circular imports internally.
This is now fixed and such code works well.bundler: export * as alias (
I got the bug report from deno issue tracker, and fixed it by preserving export info.
See: https://github.com/denoland/deno/issues/8481bundler: fix deglobbing logic (
Previously, deglobbing logic was to aggressive so that it replaces
It was because previous logic only checked the originating module. This is fixed by comparing symbols.codegen: unicode escape sequnces (
There was a bug which ignores the value part in unicode escapes while printing result code.bundler: importing a module multiple time (
I was a bit curious about the usecase, but I fixed it to be spec-compilant and it works well.bundler: export default in reexport (
Previously the bundler broke code below,
https://deno.land/x/[email protected]/mod.ts is defined as
The bundler can now handle those kinds of reexports properly.bundler: export specifiers without alias (
Reported with https://github.com/denoland/deno/issues/8573
The bundler didn't handled it because while checking for reexports, the bundler modifies ast so that reexport specifier without alias does not exist. But in some circumstances, the bundler injects export specifiers without alias to maintain semantic of a module.bundler: improve sorting (
Reported with https://github.com/denoland/deno/issues/8574
The bug was that, the code below was not treated as an initializer of
The fix was trivial as there were already utilities to detect initialization.bundler: top-level-await flattening (
This resulted in a bug because the bundler assumed wrapped module is not async.
At first glance, it seems hard to fix, but there's a simple trick.
This fixes the issue.codegen: multiline jsx texts (
Affected code looks likeasync_to_generator: async method (
but it was transpiled as
which has wrong regenerator: no useless statements (
a in the parameter. This is fixed by simply removing all parameters.
I made a mistake while proting
regenerator pass. The mistake resulted in bit larger code, and very hard time debugging.
Now I find the cause of case number being not same as one of regenerator, so future bugs will be easily fixed.regenerator: track finally properly (
regenerator pass depends on shared mutable state hardly, and I made mistake while porting it.
Fixing it required some dirty code because we have to modify a value stored in a list after inserting it, but it's in managable range.