강동윤
85a216ef56
feat(es/parser): Allow stripping out typescript parser ( #1962 )
...
swc_ecma_parser:
- Add a cargo feature to remove typescript parser.
2021-07-25 09:37:59 +00:00
강동윤
204a71ca94
fix(es/transforms): Fix bugs ( #1950 )
...
swc_ecma_trasnsforms_base:
- `fixer`: Don't de-optimize `++foo || bar`.
swc_ecma_trasnsforms_typescript:
- Allow using properties from a decorated class. (#1869 )
swc_ecma_transforms_optimization:
- Fix infinite loop. (#1901 , #1946 )
2021-07-22 07:33:00 +00:00
강동윤
a26a18989f
fix(es/transforms): Allow using rest pattern in arrow functions. ( #1926 )
...
swc_ecma_transforms_compat:
- `parameters`: Allow using rest pattern within arrow functions.
2021-07-16 07:05:00 +00:00
David Sherret
6dc6d8a847
refactor(es/dep-graph): Remove SourceMap dependency ( #1908 )
2021-07-14 00:59:13 +09:00
강동윤
104be9837b
fix(es/transforms): Fix transforms ( #1909 )
...
swc_ecma_transforms_compat:
- `regenerator`: Use es6 import while folding module. (#1641 )
- `typeof_symbol`: Handle `undefined` specially. (#1843 )
- `regenerator`: Do not create useless codes. (#1687 )
- `typeof_symbol`: Migrate to `VisitMut`.
swc_ecma_transforms_module:
- Add `import_hoister`.
- Improve import analyzer. (#1682 )
- Allow overriding `export *` wth named exports. (#1714 )
swc_ecma_transforms_testing:
- Add a hack for `regenerator-runtime`.
swc:
- Run import analyzer ahead of time. (#1682 )
misc:
- Downgrade rustc to the version rust-analyzer supports.
2021-07-10 11:18:28 +00:00
OJ Kwon
480287aec4
fix(es/transforms/compat): Fix regenerator ( #1906 )
...
swc_ecma_transforms_compat:
- `regenerator`: Handle labeled continue jumps. (#1892 )
2021-07-09 14:13:16 +09:00
강동윤
69186eb74d
fix(es/transforms): Fix transforms ( #1900 )
...
node-swc:
- Use proper field name in `ObjectPattern`. (#1886 )
swc_ecma_codegen:
- Fix codegen of private properties. (#1898 )
swc_ecma_transforms_compat:
- Fix optional chaining expressions in a single-line arrow expression. (#1836 )
- `regenerator`: Preserve `ExportDefaultDecl`. (#1799 )
swc_ecma_transforms_module:
- Fix `export default function`. (#1799 )
2021-07-08 04:54:57 +00:00
OJ Kwon
6037332cb4
fix(es/transforms/compat): Handle nested optional chaining expression ( #1899 )
...
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2021-07-07 17:41:03 +09:00
Austaras
76341068d0
fix(es/ast): Fix handling of reserved words ( #1891 )
2021-07-04 19:44:33 +09:00
강동윤
33f2ab2d79
fix(es/transforms): Fix transforms ( #1861 )
...
swc_ecma_transforms_compat:
- Organize logical assignment pass correctly.
swc_ecma_transforms_optimization:
- `dead_branch_remover`: Handle nullish coalescing operator correctly. (#1851 )
2021-06-26 16:02:15 +09:00
강동윤
737ce63b78
chore(es/ast): Bump version ( #1853 )
2021-06-25 08:19:15 +00:00
강동윤
6ad3f7b90e
feat(es/visit): Groundwork to use VisitMut instead of Fold ( #1842 )
...
swc_ecma_transforms:
- Expose `VisitMut` if possible.
swc_ecma_visit:
- Implement `VisitMut` for` Folder<V>`.
- Implement `VisitMut` for `AndThen<A, B>`.
2021-06-23 04:18:41 +00:00
강동윤
5a6c4fd5a0
fix(swc): Fix sourcemap ( #1832 )
...
swc_common:
- `SourceMap`: Don't panic for dummy spans.
swc_ecma_codegen:
- Use span for `throw`. (#1685 )
- Use span for `var` / `let` / `const`.
- Use span for `new`.
- Use span for `if`.
- Add spans to braces of a block statement. (#1796 )
swc_ecma_transforms_compat:
- `parameters`: Don't drop the span of block statements. (#1796 )
swc:
- Allow specifying input source map in `.swcrc`.
- Ensure that the inline source map works properly. (#1713 )
2021-06-18 11:34:17 +00:00
강동윤
f9bdc7b227
fix(es/parser): Fix panic on debug mode ( #1828 )
...
swc_ecma_parser:
- Handle undefined unicode code point gracefully. (#1813 )
2021-06-16 15:55:20 +09:00
강동윤
d3944f5203
fix(swc): Fix bugs ( #1820 )
...
swc_ecma_preset_env:
- [x] Rename directory to be consistant.
- [x] Add es2020::operators. (#1812 )
swc_ecma_transforms_react:
- [x] Don't escpae unicodes. (#1782 )
2021-06-12 15:39:39 +09:00
강동윤
3c3fb359ee
fix(es): Remove UB ( #1815 )
...
swc_ecma_parser:
- Remove UB.
swc_ecma_codegen:
- Remove codes related to the UB of the parser. (#1782 )
2021-06-12 05:17:09 +00:00
강동윤
97ef7c0553
fix(swc): Fix bugs ( #1811 )
...
swc_ecma_ast:
- Add `es2021`.
swc_ecma_transforms_compat:
- Handle `||=`. (#1788 )
2021-06-11 16:55:34 +09:00
강동윤
7730a6ea5a
fix(es/transforms): Fix bugs ( #1795 )
...
swc_ecma_transforms_compat:
- `async_to_generator`: Handle await in async generators correctly. (#1752 )
swc_ecma_transforms_module:
- Don't panic on double import from one module. (#1757 )
2021-06-06 22:16:59 +09:00
강동윤
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
강동윤
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
강동윤
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
강동윤
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
강동윤
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
강동윤
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
강동윤
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
강동윤
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
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
강동윤
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
강동윤
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
강동윤
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
강동윤
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
강동윤
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
강동윤
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
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
강동윤
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
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
Devon Govett
14edb69826
fix(es/transforms/base/fixer): Fix parens of sequence expressions ( #1566 )
...
swc_ecma_transforms_base:
- Fix parens of sequence expressions in callee and function parameters.
2021-04-12 06:14:55 +00:00
Devon Govett
8f5daa3bbb
feat(es/transforms/react): Add pure annotation comments ( #1564 )
...
swc_ecma_transforms_react:
- Add pure annotations for react.
2021-04-11 15:09:27 +09:00