Commit Graph

1106 Commits

Author SHA1 Message Date
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
Donny/강동윤
a099e8f846
perf(es/minifier): Make name mangler parallel (#2527)
swc_ecma_minifier:
 - Remove useless `RefCell<T>`.
 - Make name mangler parallel.
2021-10-25 07:09:00 +00:00
Donny/강동윤
e7189fbdbd
fix(es/transforms/compat): Fix async_to_generator (#2526)
swc_ecma_transforms_compat:
 - `async_to_generator`: Handle `for-await` correctly. (#2306)
2021-10-25 05:37:13 +00:00
Donny/강동윤
709b3c7cd6
fix(es/transforms/optimization): Fix inline_globals (#2524)
swc_ecma_transforms_optimization:
 - `inline_globals`: Skip assignment to `process.env.FOO`. (#2499)
2021-10-24 21:51:08 +00:00
Donny/강동윤
a8b29b662e
test(es/minifier): Add a test for moment.js (#2522)
swc_ecma_minifier:
 - Ensure that `moment.js` is minified correctly. (#2521)
2021-10-24 14:54:23 +00:00
Sosuke Suzuki
65c83e8cb4
feat(es/transforms): Move stage 4 proposals to es2022 (#2519) 2021-10-24 21:28:40 +09:00
Donny/강동윤
fce3b79e79
fix(es/minifier): Improve name mangler (#2509)
swc_ecma_transforms_base:
 - Expose renamer.

swc_ecma_minifier:
 - Improve name mangler.

swc:
 - Disable hygiene if mangler is enabled.
2021-10-24 10:52:09 +00:00
Sosuke Suzuki
ecd617af39
feat(es/transforms): Move class_properties to es2022 (#2512) 2021-10-23 23:25:14 +09:00
Austaras
c482162206
feat(es/transforms/module): Fix transform of this for classes (#2514) 2021-10-23 21:13:56 +09:00