Commit Graph

1114 Commits

Author SHA1 Message Date
Donny
76d9ae7656 chore: Publish crates 2021-11-08 16:01:09 +09:00
OJ Kwon
891591382d
refactor(es/transforms/bugfix): Migrate edge_default_param to VisitMut (#2676) 2021-11-08 06:28:51 +00:00
Donny
98fc40988c chore: Publish crates 2021-11-08 13:06:54 +09:00
OJ Kwon
01727c0e5a
fix(es/transforms/async_to_generator): Fix handling of this (#2667)
swc_emca_transforms_compat:
 - `async_to_generator`: Do not bind `this` to generator for prototypes.
2021-11-08 12:39:14 +09:00
OJ Kwon
94cb4303ae
refactor: Remove trailing whitespace (#2668) 2021-11-07 20:46:12 +09:00
Donny/강동윤
994c9655c8
feat(es/ast): Add utils (#2657)
swc_ecma_ast:
 - Add `as_ident` to `PatOrExpr`.
 - Add `as_ident_mut` to `PatOrExpr`.
 - Replace `Is` macro for `ParOrExpr` with custom impl.
2021-11-05 16:09:08 +09:00
Donny
224972f487 chore: Publish crates 2021-11-05 05:14:56 +09:00
Sosuke Suzuki
d1523dc5e8
fix(es/transforms/compat): Fix static blocks (#2652)
swc_ecma_transforms_compat:
 - `static_blocks`: Use correct name for generated private properties.
2021-11-05 05:14:24 +09:00
Donny
46e32a6a72 chore: Publish crates 2021-11-04 19:59:54 +09:00
Donny/강동윤
0414c31480
feat(es/ast): Implement Take for more types (#2649) 2021-11-04 19:59:28 +09:00
Donny
7403956d4a chore: Publish crates 2021-11-03 22:46:51 +09:00
Donny/강동윤
808d57822b
fix(es/minifier): Fix for @emotion/react and murmur2 (#2637)
swc_ecma_minifier:
 - Check for the operator while folding binary assignments. 
 - `sequences`: More check before inlining into operator assignments.
2021-11-03 22:46:25 +09:00
Donny
a973b0bed4 chore: Publish crates 2021-11-03 13:55:27 +09:00
Donny/강동윤
f4efd7ad92
fix(es/transforms): Fix detection of this (#2634)
swc_ecma_utils:
 - `contains_this_expr`: Exclude `this` in object properties.

swc_ecma_transforms_compat:
 - `arrow`: Exclude `this` in object properties. (https://github.com/vercel/next.js/issues/30592)
 - `parameters`: Exclude `this` in object properties.
2021-11-03 13:53:23 +09:00
Donny
1c5f75485f chore: Publish crates 2021-11-03 13:21:40 +09:00
Donny/강동윤
550584f93c
fix(es/compat): Fix order of transforms (#2629)
swc_ecma_transforms_compat:
 - Change order of `regenerator` and `destructring`. (https://github.com/vercel/next.js/issues/30683, Closes https://github.com/swc-project/swc/issues/2413)
2021-11-03 13:18:43 +09:00
Donny
4e003b60f7 chore: Publish crates 2021-11-03 11:25:56 +09:00
OJ Kwon
12be4b1799
fix(es/transforms/typescript): Allow (foo as any) = bar (#2631)
swc_ecma_transforms_typescript:
 - `strip`: Handle paren in the LHS of assignment expressions properly. (Closes https://github.com/swc-project/swc/issues/2606)
2021-11-03 11:25:18 +09:00
Donny
170a53a4ce chore: Publish crates 2021-11-02 18:42:35 +09:00
Donny/강동윤
7ea4ee81c2
fix(es/minifier): Fix for react-countup (#2625)
swc_ecma_minifier:
 -  `analyzer`: Mark the LHS of an operator assignment as usage.
2021-11-02 18:42:05 +09:00
Donny
9a2f729322 chore: Publish crates 2021-11-02 14:53:36 +09:00
OJ Kwon
d2f2409528
fix(es/transforms/strip): Strip types for typescript export equals (#2623)
swc_ecma_transforms_typescript:
 - `strip`: Visit the RHS of typescript export equals.
2021-11-02 05:50:42 +00:00
Donny
6644a06da6 chore: Publish crates 2021-11-02 14:00:33 +09:00
Donny
befda9752e chore: Publish crates 2021-11-02 13:59:56 +09:00
OJ Kwon
5b141ee80a
fix(es/transforms/cjs): Allow using multiple export * (#2598)
swc_ecma_transforms_module:
 - Preserve order of imports for reexports. (#2594)
2021-11-02 13:59:33 +09:00
Donny/강동윤
9cb3bf96dc
fix(es/minifier): Fix bugs of the minifier (#2610)
swc_ecma_minifier:
 - Increase max pass limit. (#2604, #2604)

swc:
 - Change default value of `compress` and `mangle`. (#2591)
2021-11-01 14:11:43 +00:00
Donny/강동윤
3280b4cd7a
refactor(es/parser): Deprecate JscTarget (#2600)
swc_ecma_parser:
 - Deprecate `JscTarget`.
2021-10-31 12:25:15 +00:00
Donny/강동윤
e589d00f62
refactor: Move HANDLER to swc_common (#2599)
swc_common:
 - Add `HANDLER`.

swc_ecma_utils:
 - Replace `HANDLER` with one from `swc_common`.
 - Make `StmtLike` `: Send + Sync`.
2021-10-31 20:41:36 +09:00
Donny
cd2a2777d9 chore: Publish crates 2021-10-31 18:17:31 +09:00
Jeremy Grieshop
7e3fb0a0ab
fix(es/transforms/cjs): Allow mixing named exports and export stars. (#2583)
swc_ecma_transforms_module:
 - `common_js`: Fix _exportNames when exporting aliases and using `export *`s . (#2548)
2021-10-31 09:12:36 +00:00
Donny/강동윤
306cf989db
fix(es/minifier): Fix minifier (#2597)
swc_ecma_minifier:
 - Fix `negate_cost`.
2021-10-31 08:43:44 +00:00
Donny
4328276414 chore: Publish crates 2021-10-30 21:41:20 +09:00
Antonio Musolino
52318a4a8e
fix(es/lexer): Fix parsing of interpreter (#2589) 2021-10-30 21:10:45 +09:00
Donny
bb189c74ac chore: Publish crates 2021-10-30 15:53:07 +09:00
Christopher Hlubek
3f5c826251
fix(es/transform/react): Allow multiple JSX pragmas in single Comment (#2561) 2021-10-30 15:18:43 +09:00
Donny/강동윤
33bc3d2b91
feat(es/transforms/regenerator): Allow configuring import path (#2581)
swc_ecma_transforms_compat:
 - `regenerator`: Allow configuring import path of `regenerator-runtime`.
2021-10-29 14:36:11 +00:00
OJ Kwon
7cc51beb45
fix(es/transforms/cjs): Allow reassignment to exported functions (#2569)
swc_ecma_transforms_module:
 - `common_js`: Reassign exports for the functions. (#2549)
2021-10-29 16:03:02 +09:00
Donny/강동윤
69cfa98c50
fix(es/minifier): Fix block unwrapping issue (#2570)
swc_ecma_minifier:
 - Check more before removing `{` and `}`.
2021-10-28 10:58:26 +00:00
Donny/강동윤
4b2903e3b4
fix(es/minifier): Fix minifier (#2564)
swc_ecma_minifier:
 - Don't change depth of function while negating if statements. (#2558)

swc_ecma_transforms_optimization:
 - `dead_branch_remover`: Preserve `this`. (#2465, #2466)

swc:
 - Make `toplevel` default to true if `module` is true. (#2254)
2021-10-28 04:35:45 +00:00
Donny/강동윤
0364f9a2ae
feat(es/transforms/testing): Reduce CI time by caching execution result (#2565)
swc_ecma_transforms_testing:
 - Cache execution test result on CI.
2021-10-28 04:00:25 +00:00
Donny/강동윤
7e29685a17
chore: Fix failing tests and improve CI scripts (#2563) 2021-10-28 02:55:49 +00:00
David Sherret
7b4af435f2
feat(es/parser): Enable ergonomic brand checks for TypeScript (#2562) 2021-10-28 09:22:51 +09:00
Donny/강동윤
79a426e0d8
fix(es/minifier): Don't treat catch clause as a scope (#2557)
swc_ecma_minifier:
 - Don't treat a catch clause as a scope.
2021-10-27 11:19:30 +00:00
OJ Kwon
97b5a738c2
fix(es/fixer): Preserve more parens (#2553)
swc_ecma_transforms_base:
 - `fixer`: Preserve parens of a binary expression if the LHS is an object literal. (#2550)
2021-10-27 16:56:45 +09:00
Donny/강동윤
5f0524c54e
fix(es/transforms/react): Revert #2542 (#2552) 2021-10-27 04:42:12 +00:00
Donny/강동윤
f81b60fd1b
fix(es/minifier): Fix minifier (#2551)
swc_ecma_minifier:
 - `hoist_props`: Check for infection. (#2506)
2021-10-27 04:19:14 +00:00
Donny/강동윤
70f55833e9
feat(es/transforms/react): Improve development more (#2542)
swc_ecma_transforms_react:
 - `jsx_src`: Add column to `__source`.
 - `jsx`: Support `jsxDEV`.
 - `jsx`: Handle `__source` and `__self` specially.
2021-10-26 11:09:09 +00:00
Donny/강동윤
b8933e3db9
fix(swc): Fix bugs (#2538)
swc_ecma_transforms_base:
 - `unique_scopes`: Handle method properties.
 - `hygiene`: Fix handling of method properties. (#2539)

swc_ecma_transforms_compat:
  - Fold children of for-of/in statements. (#2531)

swc_ecma_minifier:
 - `name_mangler`: Fix handling of method properties.
2021-10-26 07:43:32 +00:00
Nayeem Rahman
693181ee6a
fix(es/transforms/typescript): Remove declared class properties (#2530)
swc_ecma_transforms_typescript:
 - `strip`: Remove class properties with `declare` keyword.
2021-10-26 14:31:20 +09:00
Donny/강동윤
dcf5f05195
fix(es/minifier): Fix minifier (#2528)
swc_ecma_minifier:
 - `collapse_vars`: Respect operator.
2021-10-25 12:24:40 +00:00