Commit Graph

524 Commits

Author SHA1 Message Date
강동윤
a1341dcdc6
fix(es/transforms/compat): Fix async_to_generator pass. (#1724)
swc_ecma_transforms_compat:
 - `async_to_generator`: Fix async iife. (#1722)
 - `async_to_generator`: Don't apply iife optimization to named function expressions.
 - `async_to_generator`: Remove duplicated works.
 - `async_to_generator`: Support `await for`. (#1721)
 - `async_to_generator`: Support async generators.
2021-05-21 13:13:22 +09:00
강동윤
8a2909bc51
fix(es/preset-env): Update core js compat data (#1719)
swc_ecma_preset_env:
 - Update `core-js-compat`. (https://github.com/swc-project/swc/issues/1712#issuecomment-844959483)
2021-05-20 20:46:03 +09:00
강동윤
c6b22c57f8
feat(es/minifier): Implement minifier partially (#1302)
Co-authored-by: Fábio Santos <fabiosantosart@gmail.com>
2021-05-20 13:51:30 +09:00
강동윤
b6589af92b
fix(swc): Fix bugs (#1712)
swc_ecma_preset_env:
 - Update compat data. (#1704)
 - Support `export-namespace-from`.

swc_ecma_transforms_compat:
 - Use proper argument for private field accesses in a private method. (#1711)
2021-05-19 00:55:01 +09:00
강동윤
a0241c88b2
fix(es/transforms/base): Fix resolver (#1710)
swc_ecma_transforms_base:
 - `ts_resolver`: Treat the type parameter of a mapped type as a binding.
2021-05-18 17:47:43 +09:00
강동윤
dee82904f8
fix(es): Fix bugs (#1709)
swc_ecma_transforms_base:
 - `fixer`: Fix regression related to `??` and `||`. (denoland/deno#10668)
2021-05-18 15:34:44 +09:00
강동윤
57d1aaf80f
fix(es): Fix various bugs (#1707)
swc_ecma_codegen:
 - Fix codegen of `\r\n` in template literals when targeting `es2020`. (denoland/deno#10282)

swc_ecma_parser:
 - Support non-identifier getters in typescript. (#1708)

swc_ecma_transforms_typescript:
 - Skip `export {}` if it was not a module. (#1706)
 - Skip `export {}` if the result is module without it. (#1706)
2021-05-17 22:27:59 +09:00
강동윤
8a36435ee1
fix(es/transforsm/compat): Transform private field access in private methods (#1703)
swc_ecma_transforms_compat:
 - `class_properties`: Handle private field accesses in private methods. (#1702)
2021-05-16 16:11:35 +09:00
강동윤
b044d2c6dd
fix(es/transforms/compat): Support private methods (#1700)
swc_ecma_transforms_base:
 - Add some helpers.

swc_ecma_transforms_compat:
 - `class_properties`: Support private methods. (Closes #1694)
2021-05-15 20:35:24 +09:00
강동윤
b4aa1d48e3
fix(es/transform): Fix bugs (#1699)
swc_ecma_transforms_base:
 - Fix bug of `ts_resolver`.

swc_ecma_transforms_typescript:
 - `strip`: Emit `export {}` for type-only modules. (#1698)
 - `strip`: Support scripts.
2021-05-15 16:07:24 +09:00
Pig Fang
1dbc3644a5
feat(es): Support type-only import equals declaration (#1695)
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2021-05-15 14:26:24 +09:00
강동윤
f0d7a3d064
fix(es/transforms): Fix bugs (#1691)
swc_ecma_transforms_optimization:
 - Don't optimize optional chaining expressions. (#1688)

swc_ecma_transforms_react:
 - Don't panic. (#1683)
2021-05-14 00:11:27 +09:00
강동윤
24bd5ea4a4
fix(es): Fix various bugs (#1680)
swc_ecma_parser:
 - Allow a class member named `declare`. (#1671)

swc_ecma_transforms_optimization:
 - Preserve side effects while inlining array index operations. (#1674)

wasm/web: 
 - Fix ci script. (#1675)
2021-05-11 16:29:29 +00:00
강동윤
2ad0af9e91
fix(es/transforms/compat): Improve performance (#1673)
swc_ecma_transforms_compat:
 - `classes`: Fast-path.
 - `destructuring`: Fast-path.
 - `sticky_regex`: Fast-path.
 - `spread`: Fast-path.
 - `shorthand`: Fast-path.
 - `typeof_symbol`: Fast-path.
 - `block_scoped_functions`: Fast path.
 - `duplicate_keys`: Use fxhash.
 - `instance_of`: Fast path.
 - `reserved_words`: Make string comparison efficient.
2021-05-11 04:53:36 +00:00
강동윤
9381d0dbc2
fix(es/transforms/base): Fix resolver (#1672)
swc_ecma_transforms_base:
 - `resolver`: Handle variables in for in/of loop body correctly.
2021-05-10 20:39:07 +09:00
강동윤
de15804b89 Bump version 2021-05-10 17:23:51 +09:00
강동윤
2b918b0c3d
fix(es/transforms/compat): Don't create unnecessary IIFE. (#1669)
swc_ecma_transforms_compat:
 - `class_properties`: Do not create iife if possible. (#1660)
2021-05-10 16:18:31 +09:00
Pig Fang
1548f6d799
feat(es/parser): Allow override in parameter properties (#1667)
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2021-05-09 22:17:58 +09:00
Pig Fang
4aed9423de
fix(es/parser): Allow using override with static (#1663) 2021-05-09 21:04:42 +09:00
강동윤
9585500476
fix(es/transforms/base): Fix resolver (#1666)
swc_ecma_transforms_base:
 - `resolver`: Handle function declarations in arrow body.
2021-05-09 09:52:29 +00:00
강동윤
aea08fb8c9
fix(es/tranforms/base): resolver: Handle function declarations in ts modules (#1665)
swc_ecma_transforms_base:
 - `resolver`: Handle function names in ts modules correctly.
2021-05-09 16:03:59 +09:00
강동윤
b0b0709e1a
fix(es): Fix various bugs. (#1664)
swc_ecma_codegen:
 - Emit comments of `BytePos(0)`. (#1657)

swc_ecma_transforms_compat:
 - `classes`: Optimize class expresssions. (#1660)
2021-05-09 14:23:03 +09:00
강동윤
c3bf517dc9
fix(es/transforms/compat): Fix span for comments in classes transform. (#1658)
swc_ecma_transforms_compat:
 - classes: Fix span for `PURE` comments. (#1657)
2021-05-09 02:26:45 +09:00
Niklas Mischkulnig
f4d0e46cbb
feat(es/transforms/compat): Add pure comment to classes (#1646)
swc_ecma_transforms_compat:
 - Add pure annotations while tranpiling classes.
2021-05-08 15:47:20 +09:00
강동윤
f368c5f81c fix(es/transforms/react): Bump version 2021-05-07 22:21:56 +09:00
강동윤
1b1c46b492
fix(es/transforms/compat): Allow keywords in method names. (#1651)
swc_ecma_transforsm_compat:
 - Allow using a keyword as a method name.
2021-05-07 11:27:25 +00:00
강동윤
abc24c9256
fix(es/transforms/resolver): Fix setter properties (#1647)
swc_ecma_transorms_base:
 - Handle parameters of a setter property correctly.
2021-05-06 13:56:42 +09:00
강동윤
deec1f67a3
fix(es/transforms/resolver): Fix setter properties (#1645)
swc_ecma_transorms_base:
 - Handle parameters of a setter property correctly.
2021-05-06 03:09:03 +09:00
Niklas Mischkulnig
fe107a1223
fix(es/transforms/react): Change order of passes (#1639) 2021-05-05 14:13:06 +09:00
강동윤
27a1c30fef
fix(es/transforms/fixer): Handle binary expressions in super class expr (#1636)
swc_ecma_transforms_base:
 - Handle binary expressions in super class expressions. (denoland/deno#10487)
2021-05-04 12:11:40 +09:00
강동윤
2724cefe2c
fix(es/transforms/react): Expose RefreshOptions (#1635)
swc_ecma_transforms_react:
 - Expose `RefreshOptions`. (#1634)
 - Expose `Runtime`.
2021-05-03 19:31:04 +09:00
Niklas Mischkulnig
b6ff4d6f71
fix(es/transforms/optimization): Preserve x instanceof Object (#1630) 2021-05-03 18:12:15 +09:00
강동윤
d10671bbda
fix(swc): Fix various bugs. (#1632)
swc_ecma_transforms_typescript:
 - Fix import analyzer. (denoland/deno#10462)
2021-05-03 13:34:13 +09:00
강동윤
28bb61fb8d
fix(swc): Fix bugs (#1624)
spack:
 - Add ability to exclude module from the bundle. (#1385)

swc_ecma_ast:
 - Make `Param.decorators` optional. (#1603).

swc_ecma_transforms_compat:
 - Fix super calls in seq exprs in a class. (#1617)

swc_ecma_transforms_module:
- `common_js`: Fix dynamic imports. (#1614)

swc_ecma_transforms_typescript:
 - Fix common js imports. (#1593)
2021-04-30 06:25:24 +00:00
강동윤
5a0bacb5b8
fix(swc): Fix various bugs (#1613)
swc_ecma_codegen:
 - Fix codegen of `\x00`. (#1619)

swc_ecma_preset_env:
 - Fix order of core-js imports. (#1605)

swc_ecma_transforms_react:
 - Preserve `&nbsp;`. (#1446)

swc:
 - Upgrade dashmap. (#1616)
2021-04-28 14:49:21 +09:00
Will Binns-Smith
f943021de0
feat(es/transforms/optimization): simplify: Preserve do-while loops with conditional stoppers (#1618) 2021-04-28 10:14:13 +09:00
강동윤
dbec753ca1
fix(swc): Fix bugs (#1591)
swc_ecma_parser:
 - Support optional async class methods. (#1454)

swc_ecma_transforms_compat:
 - Hoist import statements. (#1457)
2021-04-21 09:26:07 +09:00
Devon Govett
1c4fa63bdc
fix(es/transforms/compat): Handle references to arguments inside arrow functions and block scoped loops (#1585)
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2021-04-19 15:50:44 +00:00
강동윤
c765c7e06e
fix: Fix bugs (#1590)
swc_ecma_transforms_proposal:
 - Detect decorators in typescript parameter properties. (#1456)

swc:
 - Add tests for #1362. (#1362)
2021-04-19 10:16:10 +00:00
강동윤
4db24fb7f6
fix(swc): Fix various bugs (#1588)
swc_ecma_transforms_module:
 - Change the order of functions exported as default. (#1568)
 - Handle mixed imports correctly. (#1525)

swc:
 - Ensure that #1581 is fixed. (#1581)
2021-04-18 20:58:30 +00:00
Devon Govett
d7ea5ae00c
fix(es/transforms/compat): Fix syntax context of super classes (#1586) 2021-04-18 15:40:06 +00:00
강동윤
46c3d62ebd
fix(swc): Fix bugs (#1560)
spack:
 - Ensure that #1533 is fixed. (#1533) 

swc_ecma_parser:
 - Support `async override` in classes. (#1558)

swc_ecma_transforms_compat:
 - `async_to_generator`: Preserve this in async object methods. (#1575)
 - `nullish_coaelscing`: Fix assignments. (#1570)
 - `export_namespace_from`: Preserve order of statements. (#1457)

swc:
 - Disable aes. (#1583)
2021-04-17 06:00:14 +00:00
Devon Govett
efa7a9af78
fix(es/transforms/compat): Fix regenerator pass for yield* expressions (#1580)
swc_ecma_transforms_compat:
 - `regenerator`: Fix delegating yield expressions.
2021-04-16 15:44:36 +00:00
grimly
60ad0df3f5
@swc/helpers exports typeOf instead of typeof (#1578)
swc_ecma_transforms_base:
 - Fix helper names.
2021-04-16 13:48:37 +09:00
Devon Govett
00461f3a76
fix(es/transforms/base): Fix precedence of yield expression inside ternary (#1577) 2021-04-15 05:50:43 +00:00
강동윤
246bdd5088
fix(bundler): Fix bugs (#1572)
swc_bundler:
 - Ensure that denoland/deno#10141 is fixed. 
 - Run deno tests on ci.
 - Support nested `export *`. (denoland/deno#10153, denoland/deno#10174)

swc_ecma_codegen:
 - Remove `,` after rest elements. (#1573, denoland/deno#10167)

swc_ecma_transforms_optimization:
 - Don't drop items used by the discriminant of a switch.

swc_ecma_transforms_typescript:
 - Remove constructors without a body.
2021-04-14 14:00:33 +00:00
Devon Govett
d8a18dfd9e
fix(es/transforms/compat): Fix block scoping of class declarations (#1569) 2021-04-14 17:42:07 +09:00
Austaras
df2a926e9d
fix(es/transforms/module): Use correct this (#1561)
swc_ecma_transforms_module:
 - Preserve semantics of `this` in imported functions. (#1556)
2021-04-14 00:18:24 +09:00
Devon Govett
92bbde3b53
fix(es/transforms/base): Fix nested function scopes (#1559)
swc_ecma_transforms_base:
 - `resolver`: Handle nested function scopes correctly.
2021-04-13 16:23:04 +09:00
Niklas Mischkulnig
e43de77ec6
fix(es/transforms/optimization): Preserve missing object members (#1567)
swc_ecma_transforms_optimization:
 - Don't replace missing object members with undefined
2021-04-12 11:18:17 +00:00