Commit Graph

1129 Commits

Author SHA1 Message Date
강동윤
0bd2a3a07e
fix(es/transforms): Fix bugs (#1783)
swc_ecma_transforms_base:
- `fixer`: Wrap operand of a unary expression if it's a binary expression. (#1781, #1789)

swc_ecma_transforms_module:
 - Allow multiple `export *` even if it has the same item. (#1780)
2021-06-05 11:13:42 +09:00
강동윤
4e7723a7a0
fix(bundler): Fix cycle detection (#1779)
swc_bundler:
 - Fix cycle detection. (denoland/deno#10820)
2021-06-03 14:15:20 +09:00
LongYinan
d6571933ff
feat(node-swc): Support windows aarch64 and linux aarch64 musl (#1773) 2021-06-02 09:34:27 +09:00
강동윤
ad55711e45
fix(es/transforms): Fix bugs (#1769)
swc_ecma_transforms_optimization:
 - `dce`: Mark references from decorator as usage. (denoland/deno#10789)

swc_ecma_transforms_proposal:
 - Allow using `super` in decorated class methods. (#846)
2021-05-30 19:52:51 +09:00
Shinobu Hayashi
5d219b8cd1
fix(es/codegen): Fix codegen of classes with minify enabled (#1767) 2021-05-30 15:05:14 +09:00
Shinobu Hayashi
65ffd87771
fix(es/parser): Report error for wrong declare keywords (#1760)
swc_ecma_parser:
 - Report `TS1031`.
2021-05-29 16:51:52 +09:00
muji
7b9b9fe9ce
fix(common): Fix compiler error (#1747)
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2021-05-28 20:57:57 +09:00
강동윤
99e738643a
feat(es/minifier): Implement rules and classify tests (#1750)
swc_ecma_minifier:
 - Classify tests so we can focus on MVP.
2021-05-28 19:44:03 +09:00
강동윤
9fa878c1a6
fix(es/transforms/base): Fix ts_resolver (#1761)
swc_ecma_transforms_base:
 - `ts_resolver`: Handle type-only imports properly. (denoland/deno_lint#705)
2021-05-28 14:04:00 +09:00
LongYinan
6a13615381
feat(node-swc): Support FreeBSD (#1758) 2021-05-28 12:47:02 +09:00
muji
3359188a20
fix(spack): Update the list of node js core modules (#1749)
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2021-05-27 15:10:23 +09:00
muji
1150fbc928
fix(spack): Fix node resolver (#1748)
spack:
 - Support file names ending with a period.
2021-05-27 12:53:16 +09:00
강동윤
c79db252dc
fix(swc): Fix bugs (#1753)
swc_ecma_parser:
 - Allow class members to be declared. (#1751)

node-swc:
 - Fix typescript type definitions. (#1746)
2021-05-27 11:59:04 +09:00
강동윤
8726c9caf2
fix(swc): Fix bugs (#1745)
swc_ecma_codegen:
 - Don't escape unicode characters for old targets. (#1744)

swc_ecma_transforms_compat:
 - `class_properties`: Preserve `this` for tagged template literals. (#1742)
2021-05-26 01:24:58 +09:00
강동윤
ef6a745599
feat(es/minifier): Implement more rules (#1735)
swc_ecma_minifier:
 - Implement `evaluate` partially.
 - Store 'expected output' from terser along with our result.

swc_ecma_transforms_base:
 - `fixer`: Don't wrap `+ (a % b)`.

swc_ecma_transforms_optimization:
 - `expr_simplifier`: Preserve this in calls.
2021-05-25 16:39:07 +09:00
강동윤
d60c3242af
fix(swc): Fix bugs (#1739)
swc_bundler:
 - Fix cycle detection for complex circular imports. (denoland/deno#10752)

swc_ecma_transforms_typescript:
 - Allow using large values for an enum variant.
2021-05-25 14:30:17 +09:00
강동윤
a795de7f43
fix(swc): Fix bugs (#1732)
swc_ecma_transforms_react:
 - Escape some characters. (#1661)

swc_ecma_transforms_compat:
 - `regenerator`: Handle `||` properly. (#1684)
2021-05-24 09:41:22 +00:00
강동윤
5e2db21e47
feat(es/minifier): Implement more rules (#1731)
swc_ecma_codegen:
 - Don't panic while checking if 2 dots are required.

swc_ecma_minifier:
 - Implement some rules related to the option `evaluate`.
 - Implement some rules related to strings.
 - Implement some rules related to numbers.

swc_ecma_transforms_base:
 - `fixer`: Handle `- (1 / 0)`.
 - `fixer`: Handle `(void 0)(0)`.
2021-05-23 15:39:59 +09:00
강동윤
3522fc71e4
feat(es/minifier): Implement more rules (#1730)
swc_ecma_codegen:
 - Fix codegen of `-0.0`.

swc_ecma_transforms_base:
 - `fixer`: Handle tag of tagged template literals.


swc_ecma_minifier:
 - Implement more rules for strings.
 - Implement more rules for teplate literals.
 - Implement more rules for comparisons.
 - Implement more rules for destructuring bindings.
 - Implement more rules for switch statements.
 - Implement more rules for expressions.
2021-05-23 11:19:11 +09:00
강동윤
a518c83485
fix(es): Fix bugs (#1728)
swc_ecma_transforms_compat:
 - `block_scoping`: Ensure that #1462 is fixed. (#1462)
 - `regenerator`: Inject variables at proper level. (#1718)

swc_ecam_transforms_typescript:
 - `strip`: Handle class expressions in arrow expressions correctly. (#1729)
2021-05-22 12:14:00 +09:00
강동윤
d20c1d3089
feat(es/minifier): Implement more rules (#1717)
swc_ecma_minifier:
 - Implement `global-defs` pass.
 - Implement `properties` pass partially.
2021-05-21 15:57:17 +09:00
강동윤
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
LongYinan
c2bd3195e8
fix(node-swc): Fix typescript definitions for react options (#1720) 2021-05-21 10:22:11 +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
강동윤
470c8f4745
fix(es/minifier): Publish (#1716) 2021-05-20 15:09:30 +09:00
강동윤
ded8f2b5e5
fix(es/minifier): Use log instead of stderr (#1715) 2021-05-20 14:23:01 +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
Pig Fang
b713972493
feat(es/parser): Enforce orders of override and async (#1670)
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2021-05-10 08:55:22 +00:00
강동윤
de15804b89 Bump version 2021-05-10 17:23:51 +09:00
Pig Fang
50f8048f2a
feat(es/parser): Enforce order of abstract and override (#1668)
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2021-05-10 17:09: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
nuintun
0cdabeb4c0
fix(node-swc): Fixed parseFile (#1654) 2021-05-09 07:03:09 +00: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
강동윤
4d013d98ca
fix(ci): Don't run tests on macos (#1659) 2021-05-09 11:51:37 +09:00